)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"886350a7da39cce541d4e94d65f688839cb34579","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This change complements glance change #106776 by raising some logging"},{"line_number":10,"context_line":"levels and fixing some of the translations of logging."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Related to bp refactoring-glance-logging"},{"line_number":13,"context_line":"Closes-Bug: #1336955"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ib547f4603025ebe4f6c055779032ab4064784490"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"5a890539_ff9d9e5a","line":12,"updated":"2014-11-19 18:39:46.000000000","message":"Just a minor nit.  Should this say \"Implements\" instead of \"Related to\"?\n\nImplements: blueprint refactoring-glance-logging\n\n(https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_GIT_commit_message_structure)","commit_id":"47753132071b8fe81f0f47fa0eb14ff32b909581"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"0ba3f9fa684062543c5e197f1ea37ec142f13a56","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This change complements glance change #106776 by raising some logging"},{"line_number":10,"context_line":"levels and fixing some of the translations of logging."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Related to bp refactoring-glance-logging"},{"line_number":13,"context_line":"Closes-Bug: #1336955"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ib547f4603025ebe4f6c055779032ab4064784490"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"5a890539_ff8e7d26","line":12,"in_reply_to":"5a890539_ff9d9e5a","updated":"2014-11-19 18:57:04.000000000","message":"No, since that blueprint also covers translation. That is addressed in https://review.openstack.org/#/c/117204/ (dependent on this commit).","commit_id":"47753132071b8fe81f0f47fa0eb14ff32b909581"}],"glance/api/common.py":[{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"311955d31af17d5f56e195b437360aa5e62a6f06","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # exception is when there is no room left at all, thus we know"},{"line_number":164,"context_line":"        # it will not fit"},{"line_number":165,"context_line":"        if remaining \u003c\u003d 0:"},{"line_number":166,"context_line":"            LOG.warn(_LW(\"User %(user)s attempted to upload an image of\""},{"line_number":167,"context_line":"                         \" unknown size that will exceeed the quota.\""},{"line_number":168,"context_line":"                         \" %(remaining)d bytes remaining.\")"},{"line_number":169,"context_line":"                     % {\u0027user\u0027: user, \u0027remaining\u0027: remaining})"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_dc057915","line":166,"updated":"2014-11-08 15:28:35.000000000","message":"Info feels like the right level here.\n\nMy reasoning is that it\u0027s unlikely this is an error condition in normal operation.  The user has exceeded the quota and we are working as expected.  \n\nIf you agree, you should look at other places where you changed from info to warning as they apply as well.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76dca081fabf0bb9134a8b82c1d2f7f16bd05002","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # exception is when there is no room left at all, thus we know"},{"line_number":164,"context_line":"        # it will not fit"},{"line_number":165,"context_line":"        if remaining \u003c\u003d 0:"},{"line_number":166,"context_line":"            LOG.warn(_LW(\"User %(user)s attempted to upload an image of\""},{"line_number":167,"context_line":"                         \" unknown size that will exceeed the quota.\""},{"line_number":168,"context_line":"                         \" %(remaining)d bytes remaining.\")"},{"line_number":169,"context_line":"                     % {\u0027user\u0027: user, \u0027remaining\u0027: remaining})"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_41e4343b","line":166,"in_reply_to":"5a890539_dc057915","updated":"2014-11-10 12:16:42.000000000","message":"This has been widely debated around this change before. Reasoning behind this is the current level definitions being \"interesting\" so to say. info should not contain any failure related logging and warn should be treated as info with failure. This will hopefully change in future but these are aligned with the current approach.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"767d604e85965236fff13b9463e3e1a07eb97bf0","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            LOG.warn(_LW(\"User %(user)s attempted to upload an image of\""},{"line_number":167,"context_line":"                         \" unknown size that will exceeed the quota.\""},{"line_number":168,"context_line":"                         \" %(remaining)d bytes remaining.\")"},{"line_number":169,"context_line":"                     % {\u0027user\u0027: user, \u0027remaining\u0027: remaining})"},{"line_number":170,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"},{"line_number":171,"context_line":"                                             remaining\u003dremaining)"},{"line_number":172,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_93a029f6","line":169,"updated":"2014-11-10 18:32:50.000000000","message":"You shouldn\u0027t manually do string formatting here, just let logging do that.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"2fd0322faeaa212803954baed942ffeacf16b0db","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            LOG.warn(_LW(\"User %(user)s attempted to upload an image of\""},{"line_number":167,"context_line":"                         \" unknown size that will exceeed the quota.\""},{"line_number":168,"context_line":"                         \" %(remaining)d bytes remaining.\")"},{"line_number":169,"context_line":"                     % {\u0027user\u0027: user, \u0027remaining\u0027: remaining})"},{"line_number":170,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"},{"line_number":171,"context_line":"                                             remaining\u003dremaining)"},{"line_number":172,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_f4579200","line":169,"in_reply_to":"5a890539_93a029f6","updated":"2014-11-10 22:49:03.000000000","message":"And why that would be better option?","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"71c4ecaa1033f99d0881034f58d9c05d48c43887","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            LOG.warn(_LW(\"User %(user)s attempted to upload an image of\""},{"line_number":167,"context_line":"                         \" unknown size that will exceeed the quota.\""},{"line_number":168,"context_line":"                         \" %(remaining)d bytes remaining.\")"},{"line_number":169,"context_line":"                     % {\u0027user\u0027: user, \u0027remaining\u0027: remaining})"},{"line_number":170,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"},{"line_number":171,"context_line":"                                             remaining\u003dremaining)"},{"line_number":172,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_f48312ca","line":169,"in_reply_to":"5a890539_f4579200","updated":"2014-11-10 23:26:13.000000000","message":"Doing it that way means that the fairly slow string formatting will not take place if the logging levels are set such that the log message is not emitted anywhere.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"83b89dcaf1b27e5ba4f89404ecf611009bc1c492","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            LOG.warn(_LW(\"User %(user)s attempted to upload an image of\""},{"line_number":167,"context_line":"                         \" unknown size that will exceeed the quota.\""},{"line_number":168,"context_line":"                         \" %(remaining)d bytes remaining.\")"},{"line_number":169,"context_line":"                     % {\u0027user\u0027: user, \u0027remaining\u0027: remaining})"},{"line_number":170,"context_line":"            raise exception.StorageQuotaFull(image_size\u003dimage_size,"},{"line_number":171,"context_line":"                                             remaining\u003dremaining)"},{"line_number":172,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_baffb100","line":169,"in_reply_to":"5a890539_f48312ca","updated":"2014-11-11 00:41:31.000000000","message":"That is valid point but out of the scope of this PS which is apparently too big already. Please feel free to tag the PS to the blueprint or open a bug to remind to get that done across the codebase rather than in couple of modules.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"767d604e85965236fff13b9463e3e1a07eb97bf0","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        LOG.warn(_LW(\"User %(user)s attempted to upload an image of size\""},{"line_number":176,"context_line":"                     \" %(size)d that will exceeed the quota. %(remaining)d\""},{"line_number":177,"context_line":"                     \" bytes remaining.\")"},{"line_number":178,"context_line":"                 % {\u0027user\u0027: user, \u0027size\u0027: image_size, \u0027remaining\u0027: remaining})"},{"line_number":179,"context_line":"        raise exception.StorageQuotaFull(image_size\u003dimage_size,"},{"line_number":180,"context_line":"                                         remaining\u003dremaining)"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_d3aab1d3","line":178,"updated":"2014-11-10 18:32:50.000000000","message":"Same here.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"}],"glance/api/policy.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"6a7156892a33f94e9e4461f97932afb0a2fc7cc0","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        mtime \u003d os.path.getmtime(self.policy_path)"},{"line_number":109,"context_line":"        if not self.policy_file_contents or mtime !\u003d self.policy_file_mtime:"},{"line_number":110,"context_line":"            LOG.info(_LI(\"Loading policy from %s\") % self.policy_path)"},{"line_number":111,"context_line":"            with open(self.policy_path) as fap:"},{"line_number":112,"context_line":"                raw_contents \u003d fap.read()"},{"line_number":113,"context_line":"                rules_dict \u003d jsonutils.loads(raw_contents)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_4f3f89b4","line":110,"updated":"2014-10-14 22:16:53.000000000","message":"I think the general policy around using INFO logs in openstack may have changed. Please correct me if I\u0027m mis-interpreting here. \n\nhttps://wiki.openstack.org/wiki/LoggingStandards\n\nMay be unit of work could be interpreted differently in Glance, not sure.. What are your thoughts?","commit_id":"76d3522e85cc5cdc6ebde89a05fd2d8f13d6297f"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"a68e286d76173f00938da2126987b433b19fb0b3","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        mtime \u003d os.path.getmtime(self.policy_path)"},{"line_number":109,"context_line":"        if not self.policy_file_contents or mtime !\u003d self.policy_file_mtime:"},{"line_number":110,"context_line":"            LOG.info(_LI(\"Loading policy from %s\") % self.policy_path)"},{"line_number":111,"context_line":"            with open(self.policy_path) as fap:"},{"line_number":112,"context_line":"                raw_contents \u003d fap.read()"},{"line_number":113,"context_line":"                rules_dict \u003d jsonutils.loads(raw_contents)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_377a6c24","line":110,"in_reply_to":"baa201ad_4f3f89b4","updated":"2014-10-16 09:59:40.000000000","message":"I don\u0027t think it has changed. Do you have anything specific in mind?\n\nIMO that is exactly the direction I\u0027ve tried to get with this change. Please share if you don\u0027t agree. Single INFO log event telling that the policy was reloaded from specific file. Arguably could be moved to the end of the function ensuring that we don\u0027t log it if something goes wrong while parsing. This just seemed good place to raise that to operator as the message was specific where it is loading those policies. (see the next point \"shouldn\u0027t need secret decoder\")","commit_id":"76d3522e85cc5cdc6ebde89a05fd2d8f13d6297f"},{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"311955d31af17d5f56e195b437360aa5e62a6f06","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        mtime \u003d os.path.getmtime(self.policy_path)"},{"line_number":109,"context_line":"        if not self.policy_file_contents or mtime !\u003d self.policy_file_mtime:"},{"line_number":110,"context_line":"            LOG.info(_LI(\"Loading policy from %s\") % self.policy_path)"},{"line_number":111,"context_line":"            with open(self.policy_path) as fap:"},{"line_number":112,"context_line":"                raw_contents \u003d fap.read()"},{"line_number":113,"context_line":"                rules_dict \u003d jsonutils.loads(raw_contents)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_fc02350a","line":110,"updated":"2014-11-08 15:28:35.000000000","message":"Loading policy is a debug kind of thing.  Info is for business/process actions mostly.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76dca081fabf0bb9134a8b82c1d2f7f16bd05002","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        mtime \u003d os.path.getmtime(self.policy_path)"},{"line_number":109,"context_line":"        if not self.policy_file_contents or mtime !\u003d self.policy_file_mtime:"},{"line_number":110,"context_line":"            LOG.info(_LI(\"Loading policy from %s\") % self.policy_path)"},{"line_number":111,"context_line":"            with open(self.policy_path) as fap:"},{"line_number":112,"context_line":"                raw_contents \u003d fap.read()"},{"line_number":113,"context_line":"                rules_dict \u003d jsonutils.loads(raw_contents)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_a10f98e0","line":110,"in_reply_to":"5a890539_fc02350a","updated":"2014-11-10 12:16:42.000000000","message":"I do not agree. It is definitely operator relevant information if the policy was (re-)loaded or not. We should not log anything operator relevant \u003cINFO.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"767d604e85965236fff13b9463e3e1a07eb97bf0","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        mtime \u003d os.path.getmtime(self.policy_path)"},{"line_number":109,"context_line":"        if not self.policy_file_contents or mtime !\u003d self.policy_file_mtime:"},{"line_number":110,"context_line":"            LOG.info(_LI(\"Loading policy from %s\") % self.policy_path)"},{"line_number":111,"context_line":"            with open(self.policy_path) as fap:"},{"line_number":112,"context_line":"                raw_contents \u003d fap.read()"},{"line_number":113,"context_line":"                rules_dict \u003d jsonutils.loads(raw_contents)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_7382dd53","line":110,"updated":"2014-11-10 18:32:50.000000000","message":"You shouldn\u0027t manually do string formatting here, just let logging do that.\n\n    LOG.info(_LI(\"Loading policy from %s\"), self.policy_path)","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"}],"glance/api/v1/images.py":[{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"48248b9671d8426a541e8407af9bdfacc4603b6a","unresolved":false,"context_lines":[{"line_number":724,"context_line":"                        msg \u003d (_LW(\"Provided image size must match the stored\""},{"line_number":725,"context_line":"                                   \" image size. (provided size: %(ps)d, \""},{"line_number":726,"context_line":"                                   \"stored size: %(ss)d)\") %"},{"line_number":727,"context_line":"                               {\"ps\": image_size_meta,"},{"line_number":728,"context_line":"                                \"ss\": image_size_store})"},{"line_number":729,"context_line":"                        LOG.warn(msg)"},{"line_number":730,"context_line":"                        raise HTTPConflict(explanation\u003dmsg,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_baec3391","line":727,"updated":"2014-08-25 14:35:50.000000000","message":"Why not retain the original indention and formatting here? It was a little clearer when reading the code.","commit_id":"59d2f591d865cffeb4ca22f7a9c68d0d87e40986"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"b62db4c9f438984b294f42ccc813e480ad210307","unresolved":false,"context_lines":[{"line_number":724,"context_line":"                        msg \u003d (_LW(\"Provided image size must match the stored\""},{"line_number":725,"context_line":"                                   \" image size. (provided size: %(ps)d, \""},{"line_number":726,"context_line":"                                   \"stored size: %(ss)d)\") %"},{"line_number":727,"context_line":"                               {\"ps\": image_size_meta,"},{"line_number":728,"context_line":"                                \"ss\": image_size_store})"},{"line_number":729,"context_line":"                        LOG.warn(msg)"},{"line_number":730,"context_line":"                        raise HTTPConflict(explanation\u003dmsg,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_2ba51604","line":727,"in_reply_to":"1abeadc6_92649fe6","updated":"2014-08-26 09:42:34.000000000","message":"Yes, that actually does and I can see why you would like to keep it like that. Personally this is one of those points where I prefer the more consistent style with the rest of the project, but I can change it back if that is what\u0027s preferred by others.","commit_id":"59d2f591d865cffeb4ca22f7a9c68d0d87e40986"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"f9f45fe3ebb03ee694c63fbe642dd123a928d36e","unresolved":false,"context_lines":[{"line_number":724,"context_line":"                        msg \u003d (_LW(\"Provided image size must match the stored\""},{"line_number":725,"context_line":"                                   \" image size. (provided size: %(ps)d, \""},{"line_number":726,"context_line":"                                   \"stored size: %(ss)d)\") %"},{"line_number":727,"context_line":"                               {\"ps\": image_size_meta,"},{"line_number":728,"context_line":"                                \"ss\": image_size_store})"},{"line_number":729,"context_line":"                        LOG.warn(msg)"},{"line_number":730,"context_line":"                        raise HTTPConflict(explanation\u003dmsg,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_92649fe6","line":727,"in_reply_to":"1abeadc6_b62fddf5","updated":"2014-08-26 08:22:12.000000000","message":"Doesn\u0027t this work? https://gist.github.com/kragniz/cf2637dafd05e685bbee","commit_id":"59d2f591d865cffeb4ca22f7a9c68d0d87e40986"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"e7d096618a23cb6d63d3e2feee479630c66d1e2e","unresolved":false,"context_lines":[{"line_number":724,"context_line":"                        msg \u003d (_LW(\"Provided image size must match the stored\""},{"line_number":725,"context_line":"                                   \" image size. (provided size: %(ps)d, \""},{"line_number":726,"context_line":"                                   \"stored size: %(ss)d)\") %"},{"line_number":727,"context_line":"                               {\"ps\": image_size_meta,"},{"line_number":728,"context_line":"                                \"ss\": image_size_store})"},{"line_number":729,"context_line":"                        LOG.warn(msg)"},{"line_number":730,"context_line":"                        raise HTTPConflict(explanation\u003dmsg,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_b62fddf5","line":727,"in_reply_to":"1abeadc6_baec3391","updated":"2014-08-25 23:22:55.000000000","message":"That\u0027s Python/PEP8 for you. The first line got too long and the indention of the dict goes by the first parenthesis, not by the string within the translation function parameters.","commit_id":"59d2f591d865cffeb4ca22f7a9c68d0d87e40986"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":559,"context_line":"                               request\u003dreq,"},{"line_number":560,"context_line":"                               content_type\u003d\"text/plain\")"},{"line_number":561,"context_line":"        except exception.Invalid as e:"},{"line_number":562,"context_line":"            msg \u003d (_LE(\"Failed to reserve image. Got error: %s\") %"},{"line_number":563,"context_line":"                   utils.exception_to_str(e))"},{"line_number":564,"context_line":"            for line in msg.split(\u0027\\n\u0027):"},{"line_number":565,"context_line":"                LOG.exception(line)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_9692a149","line":562,"updated":"2014-09-09 16:38:58.000000000","message":"_() should be used in messages presented to user.","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"311955d31af17d5f56e195b437360aa5e62a6f06","unresolved":false,"context_lines":[{"line_number":565,"context_line":"            msg \u003d (_(\"Failed to reserve image. Got error: %s\") %"},{"line_number":566,"context_line":"                   utils.exception_to_str(e))"},{"line_number":567,"context_line":"            for line in msg.split(\u0027\\n\u0027):"},{"line_number":568,"context_line":"                LOG.exception(line)"},{"line_number":569,"context_line":"            raise HTTPBadRequest(explanation\u003dmsg,"},{"line_number":570,"context_line":"                                 request\u003dreq,"},{"line_number":571,"context_line":"                                 content_type\u003d\"text/plain\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_e71c5e6d","line":568,"updated":"2014-11-08 15:28:35.000000000","message":"I\u0027m pretty sure you can have exception perform a traceback logging.  if so, then this is going be really ugly in the log file.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76dca081fabf0bb9134a8b82c1d2f7f16bd05002","unresolved":false,"context_lines":[{"line_number":565,"context_line":"            msg \u003d (_(\"Failed to reserve image. Got error: %s\") %"},{"line_number":566,"context_line":"                   utils.exception_to_str(e))"},{"line_number":567,"context_line":"            for line in msg.split(\u0027\\n\u0027):"},{"line_number":568,"context_line":"                LOG.exception(line)"},{"line_number":569,"context_line":"            raise HTTPBadRequest(explanation\u003dmsg,"},{"line_number":570,"context_line":"                                 request\u003dreq,"},{"line_number":571,"context_line":"                                 content_type\u003d\"text/plain\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_618f7024","line":568,"in_reply_to":"5a890539_e71c5e6d","updated":"2014-11-10 12:16:42.000000000","message":"Sorry, I didn\u0027t really catch your point here.\n\nAlthough thanks for pointing this specific line out as I think we need to remove that for loop with the split on separate PS.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"311955d31af17d5f56e195b437360aa5e62a6f06","unresolved":false,"context_lines":[{"line_number":997,"context_line":"            msg \u003d (_(\"Forbidden to update image: %s\") %"},{"line_number":998,"context_line":"                   utils.exception_to_str(e))"},{"line_number":999,"context_line":"            for line in msg.split(\u0027\\n\u0027):"},{"line_number":1000,"context_line":"                LOG.warn(line)"},{"line_number":1001,"context_line":"            raise HTTPForbidden(explanation\u003dmsg,"},{"line_number":1002,"context_line":"                                request\u003dreq,"},{"line_number":1003,"context_line":"                                content_type\u003d\"text/plain\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_071a4a6e","line":1000,"updated":"2014-11-08 15:28:35.000000000","message":"Forbidden actions due to permissions is definitely not a warning.  In fact this could be a DOS vector for those that turn logging at warning but not at lower levels.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76dca081fabf0bb9134a8b82c1d2f7f16bd05002","unresolved":false,"context_lines":[{"line_number":997,"context_line":"            msg \u003d (_(\"Forbidden to update image: %s\") %"},{"line_number":998,"context_line":"                   utils.exception_to_str(e))"},{"line_number":999,"context_line":"            for line in msg.split(\u0027\\n\u0027):"},{"line_number":1000,"context_line":"                LOG.warn(line)"},{"line_number":1001,"context_line":"            raise HTTPForbidden(explanation\u003dmsg,"},{"line_number":1002,"context_line":"                                request\u003dreq,"},{"line_number":1003,"context_line":"                                content_type\u003d\"text/plain\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_013cec2e","line":1000,"in_reply_to":"5a890539_071a4a6e","updated":"2014-11-10 12:16:42.000000000","message":"Thanks for pointing this out. I was in impression that we should never get here if the caller does not have permission, but actually that might not be the case. The above lift in that case is even more worrying.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"767d604e85965236fff13b9463e3e1a07eb97bf0","unresolved":false,"context_lines":[{"line_number":765,"context_line":"                                 \" image size. (provided size: %(ps)d, \""},{"line_number":766,"context_line":"                                 \"stored size: %(ss)d)\") %"},{"line_number":767,"context_line":"                               {\"ps\": image_size_meta,"},{"line_number":768,"context_line":"                                \"ss\": image_size_store})"},{"line_number":769,"context_line":"                        LOG.warn(msg)"},{"line_number":770,"context_line":"                        raise HTTPConflict(explanation\u003dmsg,"},{"line_number":771,"context_line":"                                           request\u003dreq,"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_53e4013b","line":768,"updated":"2014-11-10 18:32:50.000000000","message":"You shouldn\u0027t manually do string formatting here, just let logging do that.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"767d604e85965236fff13b9463e3e1a07eb97bf0","unresolved":false,"context_lines":[{"line_number":986,"context_line":"                                 content_type\u003d\"text/plain\")"},{"line_number":987,"context_line":"        except exception.NotFound as e:"},{"line_number":988,"context_line":"            msg \u003d _(\"Failed to find image to update: %s\")"},{"line_number":989,"context_line":"            lmsg \u003d \"Failed to find image to update: %s\""},{"line_number":990,"context_line":"            e_str \u003d utils.exception_to_str(e)"},{"line_number":991,"context_line":"            LOG.debug(lmsg % e_str)"},{"line_number":992,"context_line":"            raise HTTPNotFound(explanation\u003dmsg % e_str,"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_fd25bc0a","line":989,"updated":"2014-11-10 18:32:50.000000000","message":"Why is this duplicated from the line above and not translated?","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"71c4ecaa1033f99d0881034f58d9c05d48c43887","unresolved":false,"context_lines":[{"line_number":986,"context_line":"                                 content_type\u003d\"text/plain\")"},{"line_number":987,"context_line":"        except exception.NotFound as e:"},{"line_number":988,"context_line":"            msg \u003d _(\"Failed to find image to update: %s\")"},{"line_number":989,"context_line":"            lmsg \u003d \"Failed to find image to update: %s\""},{"line_number":990,"context_line":"            e_str \u003d utils.exception_to_str(e)"},{"line_number":991,"context_line":"            LOG.debug(lmsg % e_str)"},{"line_number":992,"context_line":"            raise HTTPNotFound(explanation\u003dmsg % e_str,"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_14b6ded9","line":989,"in_reply_to":"5a890539_94480e5d","updated":"2014-11-10 23:26:13.000000000","message":"Okay!","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"2fd0322faeaa212803954baed942ffeacf16b0db","unresolved":false,"context_lines":[{"line_number":986,"context_line":"                                 content_type\u003d\"text/plain\")"},{"line_number":987,"context_line":"        except exception.NotFound as e:"},{"line_number":988,"context_line":"            msg \u003d _(\"Failed to find image to update: %s\")"},{"line_number":989,"context_line":"            lmsg \u003d \"Failed to find image to update: %s\""},{"line_number":990,"context_line":"            e_str \u003d utils.exception_to_str(e)"},{"line_number":991,"context_line":"            LOG.debug(lmsg % e_str)"},{"line_number":992,"context_line":"            raise HTTPNotFound(explanation\u003dmsg % e_str,"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_94480e5d","line":989,"in_reply_to":"5a890539_fd25bc0a","updated":"2014-11-10 22:49:03.000000000","message":"Because debug log messages should not be translated but exceptions should.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"767d604e85965236fff13b9463e3e1a07eb97bf0","unresolved":false,"context_lines":[{"line_number":994,"context_line":"                               content_type\u003d\"text/plain\")"},{"line_number":995,"context_line":"        except exception.Forbidden as e:"},{"line_number":996,"context_line":"            msg \u003d _(\"Forbidden to update image: %s\")"},{"line_number":997,"context_line":"            lmsg \u003d \"Forbidden to update image: %s\""},{"line_number":998,"context_line":"            e_str \u003d utils.exception_to_str(e)"},{"line_number":999,"context_line":"            LOG.debug(lmsg % e_str)"},{"line_number":1000,"context_line":"            raise HTTPForbidden(explanation\u003dmsg % e_str,"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_7d2b8ceb","line":997,"updated":"2014-11-10 18:32:50.000000000","message":"Same here.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"}],"glance/api/v1/upload_utils.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        def _kill_mismatched(image_meta, attr, actual):"},{"line_number":126,"context_line":"            supplied \u003d image_meta.get(attr)"},{"line_number":127,"context_line":"            if supplied and supplied !\u003d actual:"},{"line_number":128,"context_line":"                msg \u003d (_LE(\"Supplied %(attr)s (%(supplied)s) and \""},{"line_number":129,"context_line":"                           \"%(attr)s generated from uploaded image \""},{"line_number":130,"context_line":"                           \"(%(actual)s) did not match. Setting image \""},{"line_number":131,"context_line":"                           \"status to \u0027killed\u0027.\") % {\u0027attr\u0027: attr,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_b6b085de","line":128,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                                      content_type\u003d\"text/plain\")"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    except store_api.StorageFull as e:"},{"line_number":198,"context_line":"        msg \u003d (_LE(\"Image storage media is full: %s\") %"},{"line_number":199,"context_line":"               utils.exception_to_str(e))"},{"line_number":200,"context_line":"        LOG.error(msg)"},{"line_number":201,"context_line":"        safe_kill(req, image_id, \u0027saving\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_d6b349e7","line":198,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                                                  content_type\u003d\u0027text/plain\u0027)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    except store_api.StorageWriteDenied as e:"},{"line_number":208,"context_line":"        msg \u003d (_LE(\"Insufficient permissions on image storage media: %s\") %"},{"line_number":209,"context_line":"               utils.exception_to_str(e))"},{"line_number":210,"context_line":"        LOG.error(msg)"},{"line_number":211,"context_line":"        safe_kill(req, image_id, \u0027saving\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_f6c92d5b","line":208,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                                               content_type\u003d\u0027text/plain\u0027)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    except exception.ImageSizeLimitExceeded as e:"},{"line_number":218,"context_line":"        msg \u003d (_LW(\"Denying attempt to upload image larger than %d bytes.\")"},{"line_number":219,"context_line":"               % CONF.image_size_cap)"},{"line_number":220,"context_line":"        LOG.warn(msg)"},{"line_number":221,"context_line":"        safe_kill(req, image_id, \u0027saving\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_16c5d13c","line":218,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                                                  content_type\u003d\u0027text/plain\u0027)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    except exception.StorageQuotaFull as e:"},{"line_number":228,"context_line":"        msg \u003d (_LW(\"Denying attempt to upload image because it exceeds the .\""},{"line_number":229,"context_line":"                   \"quota: %s\") % utils.exception_to_str(e))"},{"line_number":230,"context_line":"        LOG.warn(msg)"},{"line_number":231,"context_line":"        safe_kill(req, image_id, \u0027saving\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_76dd3d14","line":228,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                                       request\u003dreq)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    except Exception as e:"},{"line_number":257,"context_line":"        msg \u003d _LE(\"Failed to upload image %s\") % image_id"},{"line_number":258,"context_line":"        LOG.exception(msg)"},{"line_number":259,"context_line":"        safe_kill(req, image_id, \u0027saving\u0027)"},{"line_number":260,"context_line":"        notifier.error(\u0027image.upload\u0027, msg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_96e0e1cd","line":257,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8ac06b96dba8e487f2ac457761ebd2ed1dd46e4d","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                     content_type\u003d\"text/plain\")"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    except exception.Forbidden as e:"},{"line_number":189,"context_line":"        msg \u003d u\"Forbidden upload attempt: %s\" % e"},{"line_number":190,"context_line":"        LOG.debug(msg)"},{"line_number":191,"context_line":"        safe_kill(req, image_id, \u0027saving\u0027)"},{"line_number":192,"context_line":"        notifier.error(\u0027image.upload\u0027, msg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_ad9ada6b","line":189,"updated":"2014-09-10 11:46:01.000000000","message":"We\u0027re translating other messages passed to LOG. Why this isn\u0027t? Probably it\u0027s another part of logging refactoring that should be done in a separate patch.","commit_id":"730e9991116532ec09476da92b1428bea7dbc8be"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"847661e4f186a275f35c2f982446dbe5aeded930","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                     content_type\u003d\"text/plain\")"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    except exception.Forbidden as e:"},{"line_number":189,"context_line":"        msg \u003d u\"Forbidden upload attempt: %s\" % e"},{"line_number":190,"context_line":"        LOG.debug(msg)"},{"line_number":191,"context_line":"        safe_kill(req, image_id, \u0027saving\u0027)"},{"line_number":192,"context_line":"        notifier.error(\u0027image.upload\u0027, msg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_542007f7","line":189,"in_reply_to":"fa98f980_ad9ada6b","updated":"2014-09-10 21:24:09.000000000","message":"No Michal,\n\ndebug messages are not translated atm. by OpenStack translation guidelines.","commit_id":"730e9991116532ec09476da92b1428bea7dbc8be"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8ac06b96dba8e487f2ac457761ebd2ed1dd46e4d","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            safe_kill(req, image_id, \u0027saving\u0027)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    except (ValueError, IOError) as e:"},{"line_number":249,"context_line":"        msg \u003d \"Client disconnected before sending all data to backend\""},{"line_number":250,"context_line":"        LOG.debug(msg)"},{"line_number":251,"context_line":"        msg \u003d _(\"Client disconnected before sending all data to backend\")"},{"line_number":252,"context_line":"        safe_kill(req, image_id, \u0027saving\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_edbdc2d8","line":249,"updated":"2014-09-10 11:46:01.000000000","message":"ditto","commit_id":"730e9991116532ec09476da92b1428bea7dbc8be"}],"glance/api/v2/image_data.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                image.set_data(data, size)"},{"line_number":77,"context_line":"                image_repo.save(image)"},{"line_number":78,"context_line":"            except exception.NotFound as e:"},{"line_number":79,"context_line":"                msg \u003d (_LW(\"Image %(id)s could not be found after upload.\""},{"line_number":80,"context_line":"                           \"The image may have been deleted during the \""},{"line_number":81,"context_line":"                           \"upload: %(error)s Cleaning up the chunks \""},{"line_number":82,"context_line":"                           \"uploaded\") %"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_56d679f2","line":79,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        except glance_store.StorageFull as e:"},{"line_number":118,"context_line":"            msg \u003d _LE(\"Image storage media \""},{"line_number":119,"context_line":"                      \"is full: %s\") % utils.exception_to_str(e)"},{"line_number":120,"context_line":"            LOG.error(msg)"},{"line_number":121,"context_line":"            self._restore(image_repo, image)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_96070181","line":118,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                                                      request\u003dreq)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        except exception.StorageQuotaFull as e:"},{"line_number":126,"context_line":"            msg \u003d _LE(\"Image exceeds the storage \""},{"line_number":127,"context_line":"                      \"quota: %s\") % utils.exception_to_str(e)"},{"line_number":128,"context_line":"            LOG.error(msg)"},{"line_number":129,"context_line":"            self._restore(image_repo, image)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_b6fec569","line":126,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                                                      request\u003dreq)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        except exception.ImageSizeLimitExceeded as e:"},{"line_number":134,"context_line":"            msg \u003d _LE(\"The incoming image is \""},{"line_number":135,"context_line":"                      \"too large: %s\") % utils.exception_to_str(e)"},{"line_number":136,"context_line":"            LOG.error(msg)"},{"line_number":137,"context_line":"            self._restore(image_repo, image)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_d601896b","line":134,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                                                      request\u003dreq)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        except glance_store.StorageWriteDenied as e:"},{"line_number":142,"context_line":"            msg \u003d _LE(\"Insufficient permissions on image \""},{"line_number":143,"context_line":"                      \"storage media: %s\") % utils.exception_to_str(e)"},{"line_number":144,"context_line":"            LOG.error(msg)"},{"line_number":145,"context_line":"            self._restore(image_repo, image)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_16f311a0","line":142,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"},{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"da807553253c5e53796ab0f49fea67117862dffc","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":"_LE \u003d gettextutils._LE"},{"line_number":32,"context_line":"_LW \u003d gettextutils._LW"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class ImageDataController(object):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_1d37e8e4","line":32,"updated":"2014-11-10 17:15:43.000000000","message":"_LW assignment unnecessary as it\u0027s unused.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"}],"glance/api/v2/images.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"82f047c193f516e0fb3aefe79b9ef4969d4e9859","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        except exception.InvalidParameterValue as e:"},{"line_number":135,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":136,"context_line":"        except exception.StorageQuotaFull as e:"},{"line_number":137,"context_line":"            msg \u003d (_LE(\"Denying attempt to upload image because it exceeds the\""},{"line_number":138,"context_line":"                       \" .quota: %s\") % utils.exception_to_str(e))"},{"line_number":139,"context_line":"            LOG.error(msg)"},{"line_number":140,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge("}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_192fcfa2","line":137,"updated":"2014-09-09 12:10:38.000000000","message":"Messages presented to user shall be translated with _() instead of _??(). msg is returned to user in L141.","commit_id":"f7dbd06008b15bf22562e90421d0c0720169ad22"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"82f42a95405fe1643648d2a1b54e3fd1931280a0","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        except exception.InvalidParameterValue as e:"},{"line_number":135,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":136,"context_line":"        except exception.StorageQuotaFull as e:"},{"line_number":137,"context_line":"            msg \u003d (_LE(\"Denying attempt to upload image because it exceeds the\""},{"line_number":138,"context_line":"                       \" .quota: %s\") % utils.exception_to_str(e))"},{"line_number":139,"context_line":"            LOG.error(msg)"},{"line_number":140,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge("}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_87a431ba","line":137,"in_reply_to":"fa98f980_192fcfa2","updated":"2014-09-09 14:14:43.000000000","message":"Correct, good catch, thanks!","commit_id":"f7dbd06008b15bf22562e90421d0c0720169ad22"},{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"311955d31af17d5f56e195b437360aa5e62a6f06","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        except exception.StorageQuotaFull as e:"},{"line_number":139,"context_line":"            msg \u003d (_(\"Denying attempt to upload image because it exceeds the\""},{"line_number":140,"context_line":"                     \" .quota: %s\") % utils.exception_to_str(e))"},{"line_number":141,"context_line":"            LOG.error(msg)"},{"line_number":142,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge("},{"line_number":143,"context_line":"                explanation\u003dmsg, request\u003dreq, content_type\u003d\u0027text/plain\u0027)"},{"line_number":144,"context_line":"        except exception.LimitExceeded as e:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_c73682e7","line":141,"updated":"2014-11-08 15:28:35.000000000","message":"Warning or error or info?  consistency?","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76dca081fabf0bb9134a8b82c1d2f7f16bd05002","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        except exception.StorageQuotaFull as e:"},{"line_number":139,"context_line":"            msg \u003d (_(\"Denying attempt to upload image because it exceeds the\""},{"line_number":140,"context_line":"                     \" .quota: %s\") % utils.exception_to_str(e))"},{"line_number":141,"context_line":"            LOG.error(msg)"},{"line_number":142,"context_line":"            raise webob.exc.HTTPRequestEntityTooLarge("},{"line_number":143,"context_line":"                explanation\u003dmsg, request\u003dreq, content_type\u003d\u0027text/plain\u0027)"},{"line_number":144,"context_line":"        except exception.LimitExceeded as e:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_21772804","line":141,"in_reply_to":"5a890539_c73682e7","updated":"2014-11-10 12:16:42.000000000","message":"Good catch, thanks.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"da807553253c5e53796ab0f49fea67117862dffc","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":39,"context_line":"_LI \u003d gettextutils._LI"},{"line_number":40,"context_line":"_LE \u003d gettextutils._LE"},{"line_number":41,"context_line":"_LW \u003d gettextutils._LW"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_9d791896","line":40,"updated":"2014-11-10 17:15:43.000000000","message":"_LE unused and not necessary.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cdad54dafe7f20be5c422d2d96f0f589fa4d1690","unresolved":false,"context_lines":[{"line_number":36,"context_line":"import glance.schema"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":39,"context_line":"_LI \u003d gettextutils._LI"},{"line_number":40,"context_line":"_LE \u003d gettextutils._LE"},{"line_number":41,"context_line":"_LW \u003d gettextutils._LW"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_0b913999","line":39,"updated":"2014-11-12 04:34:06.000000000","message":"_LI appears unused as well.","commit_id":"2d4112b59702b3460f4d2fb6a35c50a5a33cacf5"}],"glance/api/v2/tasks.py":[{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"767d604e85965236fff13b9463e3e1a07eb97bf0","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            task_executor \u003d executor_factory.new_task_executor(req.context)"},{"line_number":69,"context_line":"            new_task.run(task_executor)"},{"line_number":70,"context_line":"        except exception.Forbidden as e:"},{"line_number":71,"context_line":"            msg \u003d (_LW(\"Forbidden to create task. Reason: %(reason)s\")"},{"line_number":72,"context_line":"                   % {\u0027reason\u0027: utils.exception_to_str(e)})"},{"line_number":73,"context_line":"            LOG.warn(msg)"},{"line_number":74,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_9304a916","line":71,"updated":"2014-11-10 18:32:50.000000000","message":"Why do you create this variable?","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"83b89dcaf1b27e5ba4f89404ecf611009bc1c492","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            task_executor \u003d executor_factory.new_task_executor(req.context)"},{"line_number":69,"context_line":"            new_task.run(task_executor)"},{"line_number":70,"context_line":"        except exception.Forbidden as e:"},{"line_number":71,"context_line":"            msg \u003d (_LW(\"Forbidden to create task. Reason: %(reason)s\")"},{"line_number":72,"context_line":"                   % {\u0027reason\u0027: utils.exception_to_str(e)})"},{"line_number":73,"context_line":"            LOG.warn(msg)"},{"line_number":74,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_37259cc2","line":71,"in_reply_to":"5a890539_54d866ef","updated":"2014-11-11 00:41:31.000000000","message":"The logging level bumps created already too big PS to get people reviewing it. That big part of our logging lines (to maintain consistency) does not fit to the scope (the reason why lowering and raising the levels were split to two different PS already) and variables are cheap. Feel free to tag the change against the same bp or file a bug if you think it being important enough to get done (otherwise I will forget it on next round looking into these as well).","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"71c4ecaa1033f99d0881034f58d9c05d48c43887","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            task_executor \u003d executor_factory.new_task_executor(req.context)"},{"line_number":69,"context_line":"            new_task.run(task_executor)"},{"line_number":70,"context_line":"        except exception.Forbidden as e:"},{"line_number":71,"context_line":"            msg \u003d (_LW(\"Forbidden to create task. Reason: %(reason)s\")"},{"line_number":72,"context_line":"                   % {\u0027reason\u0027: utils.exception_to_str(e)})"},{"line_number":73,"context_line":"            LOG.warn(msg)"},{"line_number":74,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_54d866ef","line":71,"in_reply_to":"5a890539_74b9e22d","updated":"2014-11-10 23:26:13.000000000","message":"I guess you didn\u0027t actually create it. :P I more meant to ask why you don\u0027t remove it along with similar intermediate variables as you\u0027re already doing a refactor.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"2fd0322faeaa212803954baed942ffeacf16b0db","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            task_executor \u003d executor_factory.new_task_executor(req.context)"},{"line_number":69,"context_line":"            new_task.run(task_executor)"},{"line_number":70,"context_line":"        except exception.Forbidden as e:"},{"line_number":71,"context_line":"            msg \u003d (_LW(\"Forbidden to create task. Reason: %(reason)s\")"},{"line_number":72,"context_line":"                   % {\u0027reason\u0027: utils.exception_to_str(e)})"},{"line_number":73,"context_line":"            LOG.warn(msg)"},{"line_number":74,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_74b9e22d","line":71,"in_reply_to":"5a890539_9304a916","updated":"2014-11-10 22:49:03.000000000","message":"I did not. Why I left it there, consistency, that hobgoblin of little minds.","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"}],"glance/db/sqlalchemy/api.py":[{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"311955d31af17d5f56e195b437360aa5e62a6f06","unresolved":false,"context_lines":[{"line_number":49,"context_line":"BASE \u003d models.BASE"},{"line_number":50,"context_line":"sa_logger \u003d None"},{"line_number":51,"context_line":"LOG \u003d os_logging.getLogger(__name__)"},{"line_number":52,"context_line":"_LE \u003d i18n._LE"},{"line_number":53,"context_line":"_LI \u003d i18n._LI"},{"line_number":54,"context_line":"_LW \u003d i18n._LW"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_47529214","line":52,"updated":"2014-11-08 15:28:35.000000000","message":"Unnecessary assignment?","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"76dca081fabf0bb9134a8b82c1d2f7f16bd05002","unresolved":false,"context_lines":[{"line_number":49,"context_line":"BASE \u003d models.BASE"},{"line_number":50,"context_line":"sa_logger \u003d None"},{"line_number":51,"context_line":"LOG \u003d os_logging.getLogger(__name__)"},{"line_number":52,"context_line":"_LE \u003d i18n._LE"},{"line_number":53,"context_line":"_LI \u003d i18n._LI"},{"line_number":54,"context_line":"_LW \u003d i18n._LW"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_c1a4a459","line":52,"in_reply_to":"5a890539_47529214","updated":"2014-11-10 12:16:42.000000000","message":"Yup, ghost from the early PS than did not get cleaned up, thanks.","commit_id":"d1c9739baf0d20d5fd079d2ab3f0bb70ba31eb16"}],"glance/image_cache/drivers/sqlite.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fcb30e43533504eac8e70a9e2eeb022a84e305","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            \"\"\")"},{"line_number":124,"context_line":"            conn.close()"},{"line_number":125,"context_line":"        except sqlite3.DatabaseError as e:"},{"line_number":126,"context_line":"            msg \u003d _LE(\"Failed to initialize the image cache database. \""},{"line_number":127,"context_line":"                      \"Got error: %s\") % e"},{"line_number":128,"context_line":"            LOG.error(msg)"},{"line_number":129,"context_line":"            raise exception.BadDriverConfiguration(driver_name\u003d\u0027sqlite\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_d638a93f","line":126,"updated":"2014-09-09 16:38:58.000000000","message":"ditto","commit_id":"3db7f208afddab136004919fb05fed0691394177"}],"glance/registry/api/v1/members.py":[{"author":{"_account_id":11864,"name":"Ben Roble","email":"ben.roble@rackspace.com","username":"broble"},"change_message_id":"7953787bf575a7b871654f0534de99081889827c","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        except exception.Forbidden:"},{"line_number":108,"context_line":"            # If it\u0027s private and doesn\u0027t belong to them, don\u0027t let on"},{"line_number":109,"context_line":"            # that it exists"},{"line_number":110,"context_line":"            msg \u003d _LW(\"Access denied to image %(id)s but returning\""},{"line_number":111,"context_line":"                      \" \u0027not found\u0027\") % {\u0027id\u0027: image_id}"},{"line_number":112,"context_line":"            LOG.warn(msg)"},{"line_number":113,"context_line":"            raise webob.exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_5752c467","line":110,"updated":"2014-11-21 19:36:53.000000000","message":"Just curious why _LW is added here but not on the other msg 6 lines above","commit_id":"4f46fb67f2a6168c103b627a75a8f6f9c25fc530"},{"author":{"_account_id":11864,"name":"Ben Roble","email":"ben.roble@rackspace.com","username":"broble"},"change_message_id":"ed5760e3c86d14da2e354d0f675a018cb811633a","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        except exception.Forbidden:"},{"line_number":108,"context_line":"            # If it\u0027s private and doesn\u0027t belong to them, don\u0027t let on"},{"line_number":109,"context_line":"            # that it exists"},{"line_number":110,"context_line":"            msg \u003d _LW(\"Access denied to image %(id)s but returning\""},{"line_number":111,"context_line":"                      \" \u0027not found\u0027\") % {\u0027id\u0027: image_id}"},{"line_number":112,"context_line":"            LOG.warn(msg)"},{"line_number":113,"context_line":"            raise webob.exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_09b49c80","line":110,"in_reply_to":"5a890539_526bb21d","updated":"2014-11-21 21:46:19.000000000","message":"That makes perfect sense, thanks for the explanation.","commit_id":"4f46fb67f2a6168c103b627a75a8f6f9c25fc530"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"0e690e93e635360102f5fbaf7f475b0da720a46c","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        except exception.Forbidden:"},{"line_number":108,"context_line":"            # If it\u0027s private and doesn\u0027t belong to them, don\u0027t let on"},{"line_number":109,"context_line":"            # that it exists"},{"line_number":110,"context_line":"            msg \u003d _LW(\"Access denied to image %(id)s but returning\""},{"line_number":111,"context_line":"                      \" \u0027not found\u0027\") % {\u0027id\u0027: image_id}"},{"line_number":112,"context_line":"            LOG.warn(msg)"},{"line_number":113,"context_line":"            raise webob.exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_526bb21d","line":110,"in_reply_to":"5a890539_5752c467","updated":"2014-11-21 20:15:39.000000000","message":"The msg 6 lines up is used both as a log message (line 105) and as a message in an exception (line 106) so it needs to be wrapped with the broader _() instead of the _LW() (which would indicate it is only part of a warning log message).\n\nWhy does it matter?  The idea is that this distinction allows translators to prioritize the translation of messages.   They know they have to do the _() first and can then do the log ones as they have time.","commit_id":"4f46fb67f2a6168c103b627a75a8f6f9c25fc530"}],"glance/scrubber.py":[{"author":{"_account_id":11356,"name":"Louis Taylor","email":"louis@kragniz.eu","username":"kragniz"},"change_message_id":"767d604e85965236fff13b9463e3e1a07eb97bf0","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        \"\"\""},{"line_number":256,"context_line":"        if not os.path.exists(self.scrubber_datadir):"},{"line_number":257,"context_line":"            LOG.warn(_LW(\"%s directory does not exist.\") %"},{"line_number":258,"context_line":"                     self.scrubber_datadir)"},{"line_number":259,"context_line":"            return []"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        ret \u003d []"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_f3408d37","line":258,"updated":"2014-11-10 18:32:50.000000000","message":"You shouldn\u0027t manually do string formatting here, just let logging do that.\n\n    LOG.warn(_LW(\"%s directory does not exist.\"), self.scrubber_datadir)","commit_id":"1b6b86bf06d2d5b7c4aea3d74270d604c15f25c6"}],"glance/store/gridfs.py":[{"author":{"_account_id":12825,"name":"Szymon Wróblewski","email":"szymon.wroblewski@ovhcloud.com","username":"bluex"},"change_message_id":"ceab4b49a8c8840083b70a4cc3180b824e0fec29","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        if not result:"},{"line_number":113,"context_line":"            reason \u003d (_(\"Could not find %(param)s in configuration \""},{"line_number":114,"context_line":"                        \"options.\") % {\u0027param\u0027: param})"},{"line_number":115,"context_line":"            LOG.exception(reason)"},{"line_number":116,"context_line":"            raise exception.BadStoreConfiguration(store_name\u003d\"gridfs\","},{"line_number":117,"context_line":"                                                  reason\u003dreason)"},{"line_number":118,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_b8bf56a9","line":115,"updated":"2014-09-03 08:14:55.000000000","message":"This should be LOG.error(reason) as \"exception\" method should only be called from an exception handler.","commit_id":"25f637aa356a8242c02c0d9fce3fd4dc4a28eb3a"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"e5f635f05618cb9ba343078040420889a7dba0b8","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        if not result:"},{"line_number":113,"context_line":"            reason \u003d (_(\"Could not find %(param)s in configuration \""},{"line_number":114,"context_line":"                        \"options.\") % {\u0027param\u0027: param})"},{"line_number":115,"context_line":"            LOG.exception(reason)"},{"line_number":116,"context_line":"            raise exception.BadStoreConfiguration(store_name\u003d\"gridfs\","},{"line_number":117,"context_line":"                                                  reason\u003dreason)"},{"line_number":118,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_10a91691","line":115,"in_reply_to":"fa98f980_b8bf56a9","updated":"2014-09-03 09:03:04.000000000","message":"Very good point there. I think this is not the first place where this is used at the wrong end. Will look into that.","commit_id":"25f637aa356a8242c02c0d9fce3fd4dc4a28eb3a"}]}
