Activity log for bug #1439762

Date Who What changed Old value New value Message
2015-04-02 16:02:04 Csaba Henk bug added bug
2015-04-02 16:02:25 Csaba Henk summary Formatting errors in log messages leave % placeholders unresolved Formatting anti-pattern in log messages leave % placeholders unresolved
2015-04-02 16:10:47 Ben Swartzlander manila: assignee Csaba Henk (chenk)
2015-04-02 16:10:50 Ben Swartzlander manila: importance Undecided Low
2015-04-02 16:10:53 Ben Swartzlander manila: milestone kilo-rc1
2015-04-02 16:10:57 Ben Swartzlander manila: status New Triaged
2015-04-07 13:50:11 Ben Swartzlander manila: assignee Csaba Henk (chenk) Ramana Raja (rraja)
2015-04-07 13:51:49 OpenStack Infra manila: status Triaged In Progress
2015-04-07 21:09:39 Csaba Henk description The following anti-pattern is frequent across Manila source: msg = ("The number of %(bar)ses found is %(quux)d that exceeds limit %(lim)d.", {"bar": "wooz", "quux": 14, "lim": 9}) LOG.error(msg) raise exception.BarQuuxException(message=msg) This results in actual messages like: ERROR <component> (u'The number of %(bar)ses found is %(quux)d that exceeds limit %(lim)d.', {'bar': 'wooz', 'quux': 14, limit: 9}) ... TRACE <component> BarQuuxException: ("The number of %(bar)s found is %(quux)d that exceeds limit %(lim)d.", {"bar": "wooz", "quux": 14, "lim": 9}) While a properly formatted message would be: The number of wooz found is 14 that exceeds limit 9. ("The number of %(bar)s found is %(quux)d that exceeds limit %(lim)d", {"bar": "wooz", "quux": 14, "lim": 9}) For a real life example please see the attachment of https://bugs.launchpad.net/manila/+bug/1417352, https://launchpadlibrarian.net/198010156/manila-bug-1417352-stacktrace.txt The following anti-pattern is frequent across Manila source: msg = ("The number of %(bar)ses found is %(quux)d that exceeds limit %(lim)d.", {"bar": "wooz", "quux": 14, "lim": 9}) LOG.error(msg) raise exception.BarQuuxException(message=msg) This results in actual messages like: ERROR <component> (u'The number of %(bar)ses found is %(quux)d that exceeds limit %(lim)d.', {'bar': 'wooz', 'quux': 14, 'lim': 9}) ... TRACE <component> BarQuuxException: ("The number of %(bar)ses found is %(quux)d that exceeds limit %(lim)d.", {"bar": "wooz", "quux": 14, "lim": 9}) While a properly formatted message would be: The number of woozes found is 14 that exceeds limit 9. For a real life example please see the attachment of https://bugs.launchpad.net/manila/+bug/1417352, https://launchpadlibrarian.net/198010156/manila-bug-1417352-stacktrace.txt
2015-04-08 16:12:27 OpenStack Infra manila: status In Progress Fix Committed
2015-04-13 18:39:24 Thierry Carrez manila: status Fix Committed Fix Released
2015-04-15 12:13:15 Csaba Henk attachment added script for detecting said antipattern https://bugs.launchpad.net/manila/+bug/1439762/+attachment/4376179/+files/meval.py
2015-04-30 12:43:19 Thierry Carrez manila: milestone kilo-rc1 2015.1.0