)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"9a88e315b0ebe59a83711a30fc5a7753458e9a88","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"fb2f6522_b7afa019","updated":"2026-10-05 09:21:08.000000000","message":"Looks quite good to me. Thank you for finding and fixing this. One small thing, could this get a releasenote please?","commit_id":"720d814b8e16083ec5e50b987dc7dadaefb7065f"},{"author":{"_account_id":37278,"name":"Mateus Nascimento","display_name":"Mateus Nascimento","email":"Mateus.SoaresdoNascimento@windriver.com","username":"msoaresd"},"change_message_id":"dc45038ffd72908ea8e06837c143a9c85a06b822","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f83afb8f_212e77d7","in_reply_to":"fb2f6522_b7afa019","updated":"2026-10-05 19:47:23.000000000","message":"Thanks for the review! Added a release note in patchset 2.","commit_id":"720d814b8e16083ec5e50b987dc7dadaefb7065f"},{"author":{"_account_id":37173,"name":"Alex Fernandes Figueirêdo","display_name":"Alex Figueiredo","email":"alex.fernandesfigueiredo@windriver.com","username":"afernand"},"change_message_id":"33a39269d3634b962f355fa45132e81769de453e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c5eeb336_96254dc5","updated":"2026-10-20 21:21:59.000000000","message":"@kajinamit@oss.nttdata.com @jwysogla@redhat.com thanks for your initial review on PATCHSET 1 submitted by @Mateus.SoaresdoNascimento@windriver.com. Your previous comments seem to be addressed.\n\nCould you please review the PATCHSET 2 and merge the fix if it looks?\n\nIt\u0027s worth mentioning that this fix has been also submitted and merged as a patch for StarlingX Openstack application at https://review.opendev.org/c/starlingx/openstack-armada-app/+/1007911. In this context, it has been successfully validated and will be delivered in the next StarlingX R13.0 release.","commit_id":"7e716e2755a4f58743be4e193cc1f97513839a47"}],"aodh/api/controllers/v2/alarm_rules/composite.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"dc861603b8c24982b02de9cc1651add6ea1a9f43","unresolved":true,"context_lines":[{"line_number":119,"context_line":"            alarm.composite_rule, \u0027prometheus\u0027))"},{"line_number":120,"context_line":"        if prometheus_rules:"},{"line_number":121,"context_line":"            plugin \u003d CompositeRule.threshold_plugins[\u0027prometheus\u0027].plugin"},{"line_number":122,"context_line":"            scope_to_project \u003d plugin.get_scope_to_project(alarm)"},{"line_number":123,"context_line":"            for rule in prometheus_rules:"},{"line_number":124,"context_line":"                rule[\u0027scope_to_project\u0027] \u003d scope_to_project"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @staticmethod"},{"line_number":127,"context_line":"    def update_hook(alarm):"}],"source_content_type":"text/x-python","patch_set":1,"id":"2954aea9_daa09c5c","line":124,"range":{"start_line":122,"start_character":12,"end_line":124,"end_character":59},"updated":"2026-10-05 14:24:40.000000000","message":"I could be wrong but isn\u0027t this already handled via wjson.fromjson call at L81 ?\nIf not I think it makes better sense to add this into the validate_compositerule instead and also use plugin.validate_alarm.","commit_id":"720d814b8e16083ec5e50b987dc7dadaefb7065f"},{"author":{"_account_id":37278,"name":"Mateus Nascimento","display_name":"Mateus Nascimento","email":"Mateus.SoaresdoNascimento@windriver.com","username":"msoaresd"},"change_message_id":"dc45038ffd72908ea8e06837c143a9c85a06b822","unresolved":true,"context_lines":[{"line_number":119,"context_line":"            alarm.composite_rule, \u0027prometheus\u0027))"},{"line_number":120,"context_line":"        if prometheus_rules:"},{"line_number":121,"context_line":"            plugin \u003d CompositeRule.threshold_plugins[\u0027prometheus\u0027].plugin"},{"line_number":122,"context_line":"            scope_to_project \u003d plugin.get_scope_to_project(alarm)"},{"line_number":123,"context_line":"            for rule in prometheus_rules:"},{"line_number":124,"context_line":"                rule[\u0027scope_to_project\u0027] \u003d scope_to_project"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @staticmethod"},{"line_number":127,"context_line":"    def update_hook(alarm):"}],"source_content_type":"text/x-python","patch_set":1,"id":"f2643db5_205d981f","line":124,"range":{"start_line":122,"start_character":12,"end_line":124,"end_character":59},"in_reply_to":"2954aea9_daa09c5c","updated":"2026-10-05 19:47:23.000000000","message":"No, fromjson only checks the sub-rule\u0027s attributes. validate_alarm is never called for the sub-rules, so on master they are stored without scope_to_project.\n\nChanged it as you suggested, valid_composite_rule now calls plugin.validate_alarm. It needs the alarm to get the project, so CompositeRule.validate_alarm passes it in.","commit_id":"720d814b8e16083ec5e50b987dc7dadaefb7065f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"d024e23bbea190cc540097a0921ddd1d9fd48400","unresolved":true,"context_lines":[{"line_number":80,"context_line":"                    \u0027scope_to_project\u0027, None)"},{"line_number":81,"context_line":"            wjson.fromjson(plugin, rules)"},{"line_number":82,"context_line":"            rule \u003d plugin(**rules, **server_side)"},{"line_number":83,"context_line":"            if alarm is not None and rule_type \u003d\u003d \u0027prometheus\u0027:"},{"line_number":84,"context_line":"                plugin.validate_alarm(type(alarm)("},{"line_number":85,"context_line":"                    type\u003drule_type, project_id\u003dalarm.project_id,"},{"line_number":86,"context_line":"                    prometheus_rule\u003drule))"}],"source_content_type":"text/x-python","patch_set":2,"id":"483ab619_b0994334","line":83,"range":{"start_line":83,"start_character":33,"end_line":83,"end_character":63},"updated":"2026-10-21 07:47:09.000000000","message":"Can we call validate_alarm regardless of rule_type here ?\nIt would prevent the situation where composite alarm is created/updated. but its child alarms are not properly created/update","commit_id":"7e716e2755a4f58743be4e193cc1f97513839a47"},{"author":{"_account_id":37278,"name":"Mateus Nascimento","display_name":"Mateus Nascimento","email":"Mateus.SoaresdoNascimento@windriver.com","username":"msoaresd"},"change_message_id":"e3fb29f77f3d729e610a5c9bb3df4f5d120c8354","unresolved":true,"context_lines":[{"line_number":80,"context_line":"                    \u0027scope_to_project\u0027, None)"},{"line_number":81,"context_line":"            wjson.fromjson(plugin, rules)"},{"line_number":82,"context_line":"            rule \u003d plugin(**rules, **server_side)"},{"line_number":83,"context_line":"            if alarm is not None and rule_type \u003d\u003d \u0027prometheus\u0027:"},{"line_number":84,"context_line":"                plugin.validate_alarm(type(alarm)("},{"line_number":85,"context_line":"                    type\u003drule_type, project_id\u003dalarm.project_id,"},{"line_number":86,"context_line":"                    prometheus_rule\u003drule))"}],"source_content_type":"text/x-python","patch_set":2,"id":"ac56d6dd_a965d70c","line":83,"range":{"start_line":83,"start_character":33,"end_line":83,"end_character":63},"in_reply_to":"483ab619_b0994334","updated":"2026-10-22 19:11:37.000000000","message":"Done in patchset 3, validate_alarm is now called for all sub-rule types, so gnocchi sub-rules get the same checks as a gnocchi alarm (aggregation method, and the project filter for by-resources). Added tests for both. The composite tests also clear the cached aggregation methods now, otherwise they fail depending on test order.","commit_id":"7e716e2755a4f58743be4e193cc1f97513839a47"}],"aodh/api/controllers/v2/alarm_rules/prometheus.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"dc861603b8c24982b02de9cc1651add6ea1a9f43","unresolved":true,"context_lines":[{"line_number":41,"context_line":"        self.scope_to_project \u003d scope_to_project"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @staticmethod"},{"line_number":44,"context_line":"    def get_scope_to_project(alarm):"},{"line_number":45,"context_line":"        return v2_utils.get_auth_project(alarm.project_id) or None"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"44c4c7e6_3c985dcb","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":28},"updated":"2026-10-05 14:24:40.000000000","message":"(nit) This isn\u0027t used anywhere else and quite simple. I\u0027d rather implement this in validate_alarm directly to reduce staticmethod.","commit_id":"720d814b8e16083ec5e50b987dc7dadaefb7065f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"d024e23bbea190cc540097a0921ddd1d9fd48400","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.scope_to_project \u003d scope_to_project"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @staticmethod"},{"line_number":44,"context_line":"    def get_scope_to_project(alarm):"},{"line_number":45,"context_line":"        return v2_utils.get_auth_project(alarm.project_id) or None"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"2b988f7c_3addffbe","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":28},"in_reply_to":"3f580f4a_645c513c","updated":"2026-10-21 07:47:09.000000000","message":"Done","commit_id":"720d814b8e16083ec5e50b987dc7dadaefb7065f"},{"author":{"_account_id":37278,"name":"Mateus Nascimento","display_name":"Mateus Nascimento","email":"Mateus.SoaresdoNascimento@windriver.com","username":"msoaresd"},"change_message_id":"dc45038ffd72908ea8e06837c143a9c85a06b822","unresolved":true,"context_lines":[{"line_number":41,"context_line":"        self.scope_to_project \u003d scope_to_project"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @staticmethod"},{"line_number":44,"context_line":"    def get_scope_to_project(alarm):"},{"line_number":45,"context_line":"        return v2_utils.get_auth_project(alarm.project_id) or None"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f580f4a_645c513c","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":28},"in_reply_to":"44c4c7e6_3c985dcb","updated":"2026-10-05 19:47:23.000000000","message":"Done in patchset 2. It was also called from composite.py, but now that the composite rule goes through validate_alarm() it isn\u0027t needed, so validate_alarm() is the original code again with cls replaced by rule.","commit_id":"720d814b8e16083ec5e50b987dc7dadaefb7065f"}]}
