)]}'
{"ceilometer/publisher/gnocchi.py":[{"author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"change_message_id":"6716e1e06b54595659d2fe195c1c3881291ad711","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    continue"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"                # NOTE(sileht): / is forbidden by Gnocchi"},{"line_number":352,"context_line":"                resource_id \u003d resource_id.replace(\u0027/\u0027, \u0027_\u0027)"},{"line_number":353,"context_line":"                if resource_id not in gnocchi_data:"},{"line_number":354,"context_line":"                    gnocchi_data[resource_id] \u003d {"},{"line_number":355,"context_line":"                        \u0027resource_type\u0027: rd.cfg[\u0027resource_type\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_d86a047f","line":352,"updated":"2020-09-10 06:49:41.000000000","message":"How does moving this line inside the next loop change the behavior? Inside the loop resource_id is not changed.","commit_id":"75ba6ef47d8db6d6ac504a8fce4f4a8e221dfc5c"},{"author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"change_message_id":"5a1682d8d470093935753ea3b778ba8c39eaf908","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    continue"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"                # NOTE(sileht): / is forbidden by Gnocchi"},{"line_number":352,"context_line":"                resource_id \u003d resource_id.replace(\u0027/\u0027, \u0027_\u0027)"},{"line_number":353,"context_line":"                if resource_id not in gnocchi_data:"},{"line_number":354,"context_line":"                    gnocchi_data[resource_id] \u003d {"},{"line_number":355,"context_line":"                        \u0027resource_type\u0027: rd.cfg[\u0027resource_type\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_05907a4d","line":352,"in_reply_to":"9f560f44_6e92fb4c","updated":"2020-09-11 11:51:44.000000000","message":"Sure. I just did. Thanks for the review.\n\nSide note, it is not just about Neutron, it is about Unhandled metrics that do not have resource_id. We should not care if they have the proper expected format as they are unhandled/discarded.","commit_id":"75ba6ef47d8db6d6ac504a8fce4f4a8e221dfc5c"},{"author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"change_message_id":"7c7bd7f17022a45d5f17ad9c138439b94db2696c","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    continue"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"                # NOTE(sileht): / is forbidden by Gnocchi"},{"line_number":352,"context_line":"                resource_id \u003d resource_id.replace(\u0027/\u0027, \u0027_\u0027)"},{"line_number":353,"context_line":"                if resource_id not in gnocchi_data:"},{"line_number":354,"context_line":"                    gnocchi_data[resource_id] \u003d {"},{"line_number":355,"context_line":"                        \u0027resource_type\u0027: rd.cfg[\u0027resource_type\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_6e92fb4c","line":352,"in_reply_to":"9f560f44_87cb0970","updated":"2020-09-11 06:56:33.000000000","message":"can we please add a unittest for this?\n\nJust to make sure we don\u0027t break it in a next commit?\nAlso to make sure this doesn\u0027t break anything outside neutron?","commit_id":"75ba6ef47d8db6d6ac504a8fce4f4a8e221dfc5c"},{"author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"change_message_id":"56261640fce2841f3e2c55a705c89e215d802353","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    continue"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"                # NOTE(sileht): / is forbidden by Gnocchi"},{"line_number":352,"context_line":"                resource_id \u003d resource_id.replace(\u0027/\u0027, \u0027_\u0027)"},{"line_number":353,"context_line":"                if resource_id not in gnocchi_data:"},{"line_number":354,"context_line":"                    gnocchi_data[resource_id] \u003d {"},{"line_number":355,"context_line":"                        \u0027resource_type\u0027: rd.cfg[\u0027resource_type\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_87cb0970","line":352,"in_reply_to":"9f560f44_d86a047f","updated":"2020-09-10 11:05:17.000000000","message":"Line 343 `rd \u003d self.metric_map.get(metric_name)` will try to get the resource definition. If the resource is not allowed pushes to Gnocchi (or some other backend), then it is going inside the conditional at line 346, which makes us hit the continue at line 351.\n\nDid you understand? \n\nIf the `resource_id \u003d resource_id.replace(\u0027/\u0027, \u0027_\u0027)` is placed above line 345, we will be processing `resource_id` even for metrics of resources that we do not want to push to the backend, which may lead to errors like the one I am describing in the commit message with the newly and merged implementation of Neutron granular network metering agent.","commit_id":"75ba6ef47d8db6d6ac504a8fce4f4a8e221dfc5c"}],"ceilometer/tests/unit/publisher/test_gnocchi.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"a89d891b3bbd7f08a50928839d2735dbcee6be8b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9f560f44_40a38043","line":768,"updated":"2020-09-11 13:05:32.000000000","message":"pep8: E305 expected 2 blank lines after class or function definition, found 1","commit_id":"ff87a67d38ec9b4f91e8c882ad798368f3613c3a"}]}
