)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"99a21d7fc3149783b47156d2c907b715a5d41222","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2cb9fb52_27383d08","updated":"2026-01-12 18:55:47.000000000","message":"I like the idea, but see my suggestions about moving the conditions around.","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"change_message_id":"c379c0693673e275b828915736d5d13a8f4cf870","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"10784d6b_61126e0a","updated":"2026-01-13 13:26:23.000000000","message":"LGTM","commit_id":"739005603c1291baf0e3fd577d18f62a66f24ea2"}],"ceilometer/publisher/gnocchi.py":[{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"99a21d7fc3149783b47156d2c907b715a5d41222","unresolved":true,"context_lines":[{"line_number":289,"context_line":"    @property"},{"line_number":290,"context_line":"    def gnocchi_project_id(self):"},{"line_number":291,"context_line":"        if not self.enable_filter_project:"},{"line_number":292,"context_line":"            return None"},{"line_number":293,"context_line":"        if self._gnocchi_project_id is not None:"},{"line_number":294,"context_line":"            return self._gnocchi_project_id"},{"line_number":295,"context_line":"        with self._gnocchi_project_id_lock:"}],"source_content_type":"text/x-python","patch_set":2,"id":"b59c304b_1002065e","line":292,"updated":"2026-01-12 18:55:47.000000000","message":"By adding the condition here. The function doesn\u0027t do what its name says anymore. I know it\u0027s not very likely, but what if we want to extend the code in the future and need to find out gnocchi\u0027s project id. It could get confusing that the function returns None at some situations even though it should return a value.","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"f751e90b52159dd81411a399d88f98112fd143ce","unresolved":true,"context_lines":[{"line_number":289,"context_line":"    @property"},{"line_number":290,"context_line":"    def gnocchi_project_id(self):"},{"line_number":291,"context_line":"        if not self.enable_filter_project:"},{"line_number":292,"context_line":"            return None"},{"line_number":293,"context_line":"        if self._gnocchi_project_id is not None:"},{"line_number":294,"context_line":"            return self._gnocchi_project_id"},{"line_number":295,"context_line":"        with self._gnocchi_project_id_lock:"}],"source_content_type":"text/x-python","patch_set":2,"id":"f1b784c9_c4c536c9","line":292,"in_reply_to":"b59c304b_1002065e","updated":"2026-01-12 19:41:54.000000000","message":"Ceilometer shouldn\u0027t even be trying to resolve the Gnocchi service project if filtering is disabled, since there is a very high chance that whatever is configured in `filter_project` and `filter_domain` will be incorrect (and thus generate a useless warning). This is why I added this condition.\n\nI think the way it is is fine as it is, as if filtering is disabled (and resolving the Gnocchi project is disabled), it returns `None` to say there is no particular Gnocchi project resolved.","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"6e40827b83a22f574f7634094bb021bafa3beecc","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    @property"},{"line_number":290,"context_line":"    def gnocchi_project_id(self):"},{"line_number":291,"context_line":"        if not self.enable_filter_project:"},{"line_number":292,"context_line":"            return None"},{"line_number":293,"context_line":"        if self._gnocchi_project_id is not None:"},{"line_number":294,"context_line":"            return self._gnocchi_project_id"},{"line_number":295,"context_line":"        with self._gnocchi_project_id_lock:"}],"source_content_type":"text/x-python","patch_set":2,"id":"39404092_b9c2dc28","line":292,"in_reply_to":"f1b784c9_c4c536c9","updated":"2026-01-12 19:58:43.000000000","message":"I didn\u0027t notice the usage of filter_project later in here. In this case adding the condition now makes more sense to me +1","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"99a21d7fc3149783b47156d2c907b715a5d41222","unresolved":true,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def _is_gnocchi_activity(self, sample):"},{"line_number":334,"context_line":"        if not self.enable_filter_project:"},{"line_number":335,"context_line":"            return False"},{"line_number":336,"context_line":"        return (self.filter_project and self.gnocchi_project_id and ("},{"line_number":337,"context_line":"            # avoid anything from the user used by gnocchi"},{"line_number":338,"context_line":"            sample.project_id \u003d\u003d self.gnocchi_project_id or"}],"source_content_type":"text/x-python","patch_set":2,"id":"c560f1ff_c2539fa6","line":335,"updated":"2026-01-12 18:55:47.000000000","message":"Similar here. The function is called \"is gnocchi activity\", which should be its return value.","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"6e40827b83a22f574f7634094bb021bafa3beecc","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def _is_gnocchi_activity(self, sample):"},{"line_number":334,"context_line":"        if not self.enable_filter_project:"},{"line_number":335,"context_line":"            return False"},{"line_number":336,"context_line":"        return (self.filter_project and self.gnocchi_project_id and ("},{"line_number":337,"context_line":"            # avoid anything from the user used by gnocchi"},{"line_number":338,"context_line":"            sample.project_id \u003d\u003d self.gnocchi_project_id or"}],"source_content_type":"text/x-python","patch_set":2,"id":"4722b395_b0cfe320","line":335,"in_reply_to":"98f4cf94_78497bf5","updated":"2026-01-12 19:58:43.000000000","message":"Acknowledged","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"f751e90b52159dd81411a399d88f98112fd143ce","unresolved":true,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def _is_gnocchi_activity(self, sample):"},{"line_number":334,"context_line":"        if not self.enable_filter_project:"},{"line_number":335,"context_line":"            return False"},{"line_number":336,"context_line":"        return (self.filter_project and self.gnocchi_project_id and ("},{"line_number":337,"context_line":"            # avoid anything from the user used by gnocchi"},{"line_number":338,"context_line":"            sample.project_id \u003d\u003d self.gnocchi_project_id or"}],"source_content_type":"text/x-python","patch_set":2,"id":"98f4cf94_78497bf5","line":335,"in_reply_to":"c560f1ff_c2539fa6","updated":"2026-01-12 19:41:54.000000000","message":"Similarly, I added this condition to stop it from running the below checks. I can move this to `filter_gnocchi_activity` as suggested though.","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"99a21d7fc3149783b47156d2c907b715a5d41222","unresolved":true,"context_lines":[{"line_number":355,"context_line":"        \"\"\""},{"line_number":356,"context_line":"        filtered_samples \u003d []"},{"line_number":357,"context_line":"        for sample in samples:"},{"line_number":358,"context_line":"            if not self._is_gnocchi_activity(sample):"},{"line_number":359,"context_line":"                filtered_samples.append(sample)"},{"line_number":360,"context_line":"                LOG.debug(\"Sample [%s] is not a Gnocchi activity; therefore, \""},{"line_number":361,"context_line":"                          \"we do not filter it out and push it to Gnocchi.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"130dc703_b34ef6c5","line":358,"updated":"2026-01-12 18:55:47.000000000","message":"Instead of having the conditions in those 2 functions above. Could we modify this as suggested? I think that\u0027ll result in the same behavior while keeping those 2 functions behaving as I\u0027d suspected by looking at their names\n```suggestion\n            if not self._is_gnocchi_activity(sample) or not self.enable_filter_project:\n```","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"f751e90b52159dd81411a399d88f98112fd143ce","unresolved":true,"context_lines":[{"line_number":355,"context_line":"        \"\"\""},{"line_number":356,"context_line":"        filtered_samples \u003d []"},{"line_number":357,"context_line":"        for sample in samples:"},{"line_number":358,"context_line":"            if not self._is_gnocchi_activity(sample):"},{"line_number":359,"context_line":"                filtered_samples.append(sample)"},{"line_number":360,"context_line":"                LOG.debug(\"Sample [%s] is not a Gnocchi activity; therefore, \""},{"line_number":361,"context_line":"                          \"we do not filter it out and push it to Gnocchi.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"43728ced_c486888a","line":358,"in_reply_to":"130dc703_b34ef6c5","updated":"2026-01-12 19:41:54.000000000","message":"I think this is a good idea, but I think `filter_gnocchi_activity_openstack` should just return `samples` directly without even looping through and doing the checks, since that would just be doing iterations for debug logging per sample and nothing else.","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"6e40827b83a22f574f7634094bb021bafa3beecc","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        \"\"\""},{"line_number":356,"context_line":"        filtered_samples \u003d []"},{"line_number":357,"context_line":"        for sample in samples:"},{"line_number":358,"context_line":"            if not self._is_gnocchi_activity(sample):"},{"line_number":359,"context_line":"                filtered_samples.append(sample)"},{"line_number":360,"context_line":"                LOG.debug(\"Sample [%s] is not a Gnocchi activity; therefore, \""},{"line_number":361,"context_line":"                          \"we do not filter it out and push it to Gnocchi.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"68ba535b_d99f812a","line":358,"in_reply_to":"43728ced_c486888a","updated":"2026-01-12 19:58:43.000000000","message":"this is good improvement. thanks.","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"99a21d7fc3149783b47156d2c907b715a5d41222","unresolved":true,"context_lines":[{"line_number":359,"context_line":"                filtered_samples.append(sample)"},{"line_number":360,"context_line":"                LOG.debug(\"Sample [%s] is not a Gnocchi activity; therefore, \""},{"line_number":361,"context_line":"                          \"we do not filter it out and push it to Gnocchi.\","},{"line_number":362,"context_line":"                          sample)"},{"line_number":363,"context_line":"            else:"},{"line_number":364,"context_line":"                LOG.debug(\"Sample [%s] is a Gnocchi activity; therefore, \""},{"line_number":365,"context_line":"                          \"we filter it out and do not push it to Gnocchi.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"6bf4e93e_7ac6c408","line":362,"updated":"2026-01-12 18:55:47.000000000","message":"This log message won\u0027t be true when the filtering is disabled. What about something like `Sample [%s] is not a Gnocchi activity or filtering Gnocchi activities is disabled; therefore, we do not filet it out and push it to Gnocchi`?\n\nSimilar should happen in the message below.","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"f751e90b52159dd81411a399d88f98112fd143ce","unresolved":true,"context_lines":[{"line_number":359,"context_line":"                filtered_samples.append(sample)"},{"line_number":360,"context_line":"                LOG.debug(\"Sample [%s] is not a Gnocchi activity; therefore, \""},{"line_number":361,"context_line":"                          \"we do not filter it out and push it to Gnocchi.\","},{"line_number":362,"context_line":"                          sample)"},{"line_number":363,"context_line":"            else:"},{"line_number":364,"context_line":"                LOG.debug(\"Sample [%s] is a Gnocchi activity; therefore, \""},{"line_number":365,"context_line":"                          \"we filter it out and do not push it to Gnocchi.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"f0557488_e8bfee6b","line":362,"in_reply_to":"6bf4e93e_7ac6c408","updated":"2026-01-12 19:41:54.000000000","message":"I\u0027ll make it so that a relevant debug message is output telling the user that filtering is disabled.","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"},{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"6e40827b83a22f574f7634094bb021bafa3beecc","unresolved":false,"context_lines":[{"line_number":359,"context_line":"                filtered_samples.append(sample)"},{"line_number":360,"context_line":"                LOG.debug(\"Sample [%s] is not a Gnocchi activity; therefore, \""},{"line_number":361,"context_line":"                          \"we do not filter it out and push it to Gnocchi.\","},{"line_number":362,"context_line":"                          sample)"},{"line_number":363,"context_line":"            else:"},{"line_number":364,"context_line":"                LOG.debug(\"Sample [%s] is a Gnocchi activity; therefore, \""},{"line_number":365,"context_line":"                          \"we filter it out and do not push it to Gnocchi.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"0d7f54c4_992e4749","line":362,"in_reply_to":"f0557488_e8bfee6b","updated":"2026-01-12 19:58:43.000000000","message":"Acknowledged","commit_id":"742ef5c795cfddfcad9c6a0a9d55bacabd33e52e"}],"ceilometer/tests/unit/publisher/test_gnocchi.py":[{"author":{"_account_id":32968,"name":"Juan Larriba","email":"jlarriba@redhat.com","username":"jlarriba"},"change_message_id":"7c80c1b1b49ece931e7a4480ba73821d7f833ab3","unresolved":true,"context_lines":[{"line_number":324,"context_line":"                                 params\u003dNone):"},{"line_number":325,"context_line":"        url_str \u003d \"gnocchi://\""},{"line_number":326,"context_line":"        if params:"},{"line_number":327,"context_line":"            url_str +\u003d \"?\" + \",\".join(f\"{k}\u003d{v}\" for k, v in params.items())"},{"line_number":328,"context_line":"        url \u003d netutils.urlsplit(url_str)"},{"line_number":329,"context_line":"        d \u003d gnocchi.GnocchiPublisher(self.conf.conf, url)"},{"line_number":330,"context_line":"        d._already_checked_archive_policies \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"2c8736f4_6c5e6aeb","line":327,"updated":"2026-01-12 09:07:55.000000000","message":"This seems to be an issue. I believe the comma should be a \"\u0026\" for this to work with multiple parameters. Currently the test pass because only parameter is passed, but I would ask for the separator to be correct to avoid confusions.","commit_id":"2293ae8043c228469559dcdf32d05378b8f4e86e"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"73faf2e7bb12e89d3971b582ec55c4f090d450a6","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                                 params\u003dNone):"},{"line_number":325,"context_line":"        url_str \u003d \"gnocchi://\""},{"line_number":326,"context_line":"        if params:"},{"line_number":327,"context_line":"            url_str +\u003d \"?\" + \",\".join(f\"{k}\u003d{v}\" for k, v in params.items())"},{"line_number":328,"context_line":"        url \u003d netutils.urlsplit(url_str)"},{"line_number":329,"context_line":"        d \u003d gnocchi.GnocchiPublisher(self.conf.conf, url)"},{"line_number":330,"context_line":"        d._already_checked_archive_policies \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"f57b80b5_683b46bb","line":327,"in_reply_to":"2c8736f4_6c5e6aeb","updated":"2026-01-12 09:15:59.000000000","message":"Whoops! Thanks for pointing that out; now fixed.","commit_id":"2293ae8043c228469559dcdf32d05378b8f4e86e"}]}
