)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"e93014f463edfe28a4d408430eb92d5b052562c7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3a742ee6_1f343965","updated":"2025-05-12 06:02:51.000000000","message":"check-rdo","commit_id":"9fef708c3d825e1766104f6f1a21e1d6592aaa66"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"dfddf33828c0a5c4bd4013215dc1046cc3d64b7e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c1a5400c_3dd84330","updated":"2025-05-13 07:34:29.000000000","message":"lgtm, thanks Alfredo","commit_id":"9fef708c3d825e1766104f6f1a21e1d6592aaa66"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"ae31a4286024264138a57cad9f5c1b974b879959","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"62d59926_a7bb130d","updated":"2025-05-21 17:29:19.000000000","message":"-1: question about the notification in case of failures. \nThanks Alfredo!","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"0f775256dd1488772f86a687e1550bc8163041ef","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"2c5a0a2a_f81e88d3","updated":"2025-05-20 12:54:01.000000000","message":"Merging this will make jobs uncover existing issues that were leading actions to fail. i.e. We should merge https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/950389 first","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"6e1007c3dd7174a1d24ceabd84f7c574e2ce12a6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"465ff33c_f41657d9","updated":"2025-05-20 08:48:54.000000000","message":"recheck","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"b1086f93206544e3769eb661e22a43d1d664f5cd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"56512bb8_89dacf19","updated":"2025-05-19 06:13:10.000000000","message":"recheck","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"660614ecf818d53b8f7616e98b1a05c0455e60f6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"e6b5d2b2_6b8c0a92","updated":"2025-05-21 13:10:37.000000000","message":"recheck","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"af55535e00686cd8ea5f811db439248324b3e06b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"da00b7bc_db99e057","updated":"2025-05-26 11:54:41.000000000","message":"a minor issue with the enum you used otherwise im +2","commit_id":"d0be262be375d217d23e26190ab5d944025732b7"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"2b2909ea6d79efa975f4da7363abaebdfae2d075","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"01e1b2f4_554f97bd","updated":"2025-05-26 13:53:16.000000000","message":"LGTM, thanks for also adding the notification part. Thanks!","commit_id":"88d81c104edb24f482e588ca6e2914dfa07ee0dd"}],"releasenotes/notes/fix-action-plan-state-on-failure-69e498d902ada5c5.yaml":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"30f9d657ff25bdba56867dfa15f75b4ce3be93ce","unresolved":true,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #2106407 \u003chttps://bugs.launchpad.net/watcher/+bug/2106407\u003e`_:"},{"line_number":5,"context_line":"    Action Plans will now be correctly reported as FAILED state when any Action"},{"line_number":6,"context_line":"    within the plan fails."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"e113b2da_ce3053a2","line":6,"updated":"2025-05-16 14:32:03.000000000","message":"This should be more like the following\n```\nPrevisously, if an action action failed in an action plan, acction plan state was reported as SUCCEEDED if the execution of the action has finished  regardless of the outcome.\n\nWatcher will now reflect the actual state of all the actions in the plan\nafter the execution has finished. If any action has status FAILED, it\nwill set the state of the action plan as FAILED. This is the expected\nbehavior according to Watcher documentation.\nFor more info see: https://bugs.launchpad.net/watcher/+bug/2106407\n```","commit_id":"a9838d5548f2ce56825a6c4dd14f0d25a0837cb2"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"c3c19f757d3121b5b165b25335814b5792d7c490","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #2106407 \u003chttps://bugs.launchpad.net/watcher/+bug/2106407\u003e`_:"},{"line_number":5,"context_line":"    Action Plans will now be correctly reported as FAILED state when any Action"},{"line_number":6,"context_line":"    within the plan fails."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"18eeddf9_019bd421","line":6,"in_reply_to":"e113b2da_ce3053a2","updated":"2025-05-16 14:42:18.000000000","message":"Done","commit_id":"a9838d5548f2ce56825a6c4dd14f0d25a0837cb2"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"af55535e00686cd8ea5f811db439248324b3e06b","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":9,"id":"b0625cd1_8df47fed","line":14,"updated":"2025-05-26 11:54:41.000000000","message":"+1 this is a nice succinct release note.\nthe only enhancement that comes to mind is perhaps adding a link to the relevant doc but i think this is ok in its current form","commit_id":"d0be262be375d217d23e26190ab5d944025732b7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"198134f3823d28dae0ff7735fe3f16eb2b7f3411","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"91ede77e_362f7135","line":14,"in_reply_to":"b0625cd1_8df47fed","updated":"2025-05-26 13:21:46.000000000","message":"Acknowledged","commit_id":"d0be262be375d217d23e26190ab5d944025732b7"}],"watcher/applier/action_plan/default.py":[{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"ae31a4286024264138a57cad9f5c1b974b879959","unresolved":true,"context_lines":[{"line_number":69,"context_line":"            action_plan.save()"},{"line_number":70,"context_line":"            notifications.action_plan.send_action_notification("},{"line_number":71,"context_line":"                self.ctx, action_plan,"},{"line_number":72,"context_line":"                action\u003dfields.NotificationAction.EXECUTION,"},{"line_number":73,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        except exception.ActionPlanCancelled as e:"},{"line_number":76,"context_line":"            LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"6b199d8b_8bfe0887","line":73,"range":{"start_line":72,"start_character":0,"end_line":73,"end_character":51},"updated":"2025-05-21 17:29:19.000000000","message":"should we change these parameters if the action plan failed? like the exception cases below that configure:\n`priority\u003dfields.NotificationPriority.ERROR,`\n`phase\u003dfields.NotificationPhase.ERROR`","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"c1d184db4b5090df4e6b668faa72490c6f7e385a","unresolved":true,"context_lines":[{"line_number":69,"context_line":"            action_plan.save()"},{"line_number":70,"context_line":"            notifications.action_plan.send_action_notification("},{"line_number":71,"context_line":"                self.ctx, action_plan,"},{"line_number":72,"context_line":"                action\u003dfields.NotificationAction.EXECUTION,"},{"line_number":73,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        except exception.ActionPlanCancelled as e:"},{"line_number":76,"context_line":"            LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"f5953e25_f3827688","line":73,"range":{"start_line":72,"start_character":0,"end_line":73,"end_character":51},"in_reply_to":"6b199d8b_8bfe0887","updated":"2025-05-22 10:52:07.000000000","message":"I don\u0027t have much context about how this notification fields migh be consumed, but this case seems different to me than an error, at least for the phase part. I think `fields.NotificationPhase.END` makes sense here since the action plane actually executed, unlike the case of an error or cancellation. setting the priority to `ERROR` seems ok to me","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"198134f3823d28dae0ff7735fe3f16eb2b7f3411","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            action_plan.save()"},{"line_number":70,"context_line":"            notifications.action_plan.send_action_notification("},{"line_number":71,"context_line":"                self.ctx, action_plan,"},{"line_number":72,"context_line":"                action\u003dfields.NotificationAction.EXECUTION,"},{"line_number":73,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        except exception.ActionPlanCancelled as e:"},{"line_number":76,"context_line":"            LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"c5c081c9_2e35af6d","line":73,"range":{"start_line":72,"start_character":0,"end_line":73,"end_character":51},"in_reply_to":"e712e391_5e2a00bc","updated":"2025-05-26 13:21:46.000000000","message":"Done","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"f8f821e4ec98c6bed01ae9853d65c2e5a40bd2f0","unresolved":true,"context_lines":[{"line_number":69,"context_line":"            action_plan.save()"},{"line_number":70,"context_line":"            notifications.action_plan.send_action_notification("},{"line_number":71,"context_line":"                self.ctx, action_plan,"},{"line_number":72,"context_line":"                action\u003dfields.NotificationAction.EXECUTION,"},{"line_number":73,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        except exception.ActionPlanCancelled as e:"},{"line_number":76,"context_line":"            LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa985c98_b9d62451","line":73,"range":{"start_line":72,"start_character":0,"end_line":73,"end_character":51},"in_reply_to":"f5953e25_f3827688","updated":"2025-05-22 13:33:15.000000000","message":"I was wondering the same. It\u0027s unclear to me what NotificationPhase we should use. For me, doing how Joan said would mean, the action_plan finished with an error, which would be correct. However, checking the existing usage of NotificationPriority.ERROR, it is always used together with NotificationPhase.ERROR and actually, the send_action_notification method has specific logic to include information about errors in the payload when using NotificationPhase.ERROR as phase (https://github.com/openstack/watcher/blob/188e583dcb0b48e77f43923ae349a0b7046b65a5/watcher/notifications/action_plan.py#L348-L363) so I\u0027m inclined to use what Doug proposed.","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"44012b3cc54ba4bdc2190247cfd74eefb86a8b15","unresolved":true,"context_lines":[{"line_number":69,"context_line":"            action_plan.save()"},{"line_number":70,"context_line":"            notifications.action_plan.send_action_notification("},{"line_number":71,"context_line":"                self.ctx, action_plan,"},{"line_number":72,"context_line":"                action\u003dfields.NotificationAction.EXECUTION,"},{"line_number":73,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        except exception.ActionPlanCancelled as e:"},{"line_number":76,"context_line":"            LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"e712e391_5e2a00bc","line":73,"range":{"start_line":72,"start_character":0,"end_line":73,"end_character":51},"in_reply_to":"f9030016_9c8a0c0b","updated":"2025-05-22 14:26:02.000000000","message":"Sorry, i sent this before reading last comment from @viroel@gmail.com . I\u0027ll try with that.","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"242c29d45cc9c72f5852147939ce8a47f4cac9b3","unresolved":true,"context_lines":[{"line_number":69,"context_line":"            action_plan.save()"},{"line_number":70,"context_line":"            notifications.action_plan.send_action_notification("},{"line_number":71,"context_line":"                self.ctx, action_plan,"},{"line_number":72,"context_line":"                action\u003dfields.NotificationAction.EXECUTION,"},{"line_number":73,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        except exception.ActionPlanCancelled as e:"},{"line_number":76,"context_line":"            LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"f9030016_9c8a0c0b","line":73,"range":{"start_line":72,"start_character":0,"end_line":73,"end_character":51},"in_reply_to":"fa985c98_b9d62451","updated":"2025-05-22 14:24:17.000000000","message":"Actually, thinking about this, if we use NotificationPhase.ERROR it will look for an exception to get the fault into the notification, however setting this AP as failed is not based on any exception but in checking an state. We probably have an exception in the failed execution but note that the failure in the action has also generated its own notification with:\n\n                notifications.action.send_execution_notification(\n                    self.engine.context, db_action,\n                    fields.NotificationAction.EXECUTION,\n                    fields.NotificationPhase.ERROR,\n                    priority\u003dfields.NotificationPriority.ERROR)\n\n\nso, I\u0027m now inclined tu use:\n\n                priority\u003dfields.NotificationPriority.ERROR,\n                phase\u003dfields.NotificationPhase.END\n\n\nIs there any documentation specifying the expected notifications from watcher?","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"4cd0e800a728c7e2ba58b6b703e929e93d2e22ee","unresolved":true,"context_lines":[{"line_number":69,"context_line":"            action_plan.save()"},{"line_number":70,"context_line":"            notifications.action_plan.send_action_notification("},{"line_number":71,"context_line":"                self.ctx, action_plan,"},{"line_number":72,"context_line":"                action\u003dfields.NotificationAction.EXECUTION,"},{"line_number":73,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        except exception.ActionPlanCancelled as e:"},{"line_number":76,"context_line":"            LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fccfaa56_bb40bbb9","line":73,"range":{"start_line":72,"start_character":0,"end_line":73,"end_character":51},"in_reply_to":"fa985c98_b9d62451","updated":"2025-05-22 14:11:10.000000000","message":"So the Priority is something that is used to filter the notifications, so in this case we need to set it NotificationPriority.ERROR, otherwise services/users that are filtering only ERROR and CRITICAL will not receive it.\nThe EXECUTION action and the END phase is already linked with a SUCCEEDED result, while EXECUTION action and ERROR phase is already linked with a FAILED execution below (lines 100-104).\nFor me, makes more sense to go with:\n`priority\u003dfields.NotificationPriority.ERROR` and\n`phase\u003dfields.NotificationPhase.ERROR`.\ngiven the limited phases that we have here.","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"0aefeef45f256211c7ea8471e7b9b13d6ad52e11","unresolved":true,"context_lines":[{"line_number":69,"context_line":"            action_plan.save()"},{"line_number":70,"context_line":"            notifications.action_plan.send_action_notification("},{"line_number":71,"context_line":"                self.ctx, action_plan,"},{"line_number":72,"context_line":"                action\u003dfields.NotificationAction.EXECUTION,"},{"line_number":73,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        except exception.ActionPlanCancelled as e:"},{"line_number":76,"context_line":"            LOG.exception(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"c5ad3b04_5e6fb8e5","line":73,"range":{"start_line":72,"start_character":0,"end_line":73,"end_character":51},"in_reply_to":"fccfaa56_bb40bbb9","updated":"2025-05-22 14:20:13.000000000","message":"thanks for context @viroel@gmail.com, it makes sense to go with your proposal then","commit_id":"4fe2d03d4ad16c3bffb4a134d40dc6ccce413740"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"af55535e00686cd8ea5f811db439248324b3e06b","unresolved":true,"context_lines":[{"line_number":71,"context_line":"                ap_state \u003d objects.action_plan.State.FAILED"},{"line_number":72,"context_line":"                notification_kwargs \u003d {"},{"line_number":73,"context_line":"                    \u0027phase\u0027: fields.NotificationPhase.ERROR,"},{"line_number":74,"context_line":"                    \u0027priority\u0027: fields.NotificationPhase.ERROR"},{"line_number":75,"context_line":"                }"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            action_plan.state \u003d ap_state"}],"source_content_type":"text/x-python","patch_set":9,"id":"b6297699_288386fd","line":74,"range":{"start_line":74,"start_character":32,"end_line":74,"end_character":62},"updated":"2025-05-26 11:54:41.000000000","message":"fields.NotificationPriority.ERROR\n\nwhile they might be the same value as they are diffent types the are nto required to be so we should ensure we use the corect enum.\n\nhttps://github.com/openstack/watcher/blob/master/watcher/objects/fields.py#L138\nhttps://github.com/openstack/watcher/blob/master/watcher/objects/fields.py#L147","commit_id":"d0be262be375d217d23e26190ab5d944025732b7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"198134f3823d28dae0ff7735fe3f16eb2b7f3411","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                ap_state \u003d objects.action_plan.State.FAILED"},{"line_number":72,"context_line":"                notification_kwargs \u003d {"},{"line_number":73,"context_line":"                    \u0027phase\u0027: fields.NotificationPhase.ERROR,"},{"line_number":74,"context_line":"                    \u0027priority\u0027: fields.NotificationPhase.ERROR"},{"line_number":75,"context_line":"                }"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            action_plan.state \u003d ap_state"}],"source_content_type":"text/x-python","patch_set":9,"id":"83a26c6c_b5de2b5c","line":74,"range":{"start_line":74,"start_character":32,"end_line":74,"end_character":62},"in_reply_to":"7899a0a6_07245172","updated":"2025-05-26 13:21:46.000000000","message":"Done","commit_id":"d0be262be375d217d23e26190ab5d944025732b7"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"7ed77df0918895ac23f499e0a9a355739f0f32cc","unresolved":true,"context_lines":[{"line_number":71,"context_line":"                ap_state \u003d objects.action_plan.State.FAILED"},{"line_number":72,"context_line":"                notification_kwargs \u003d {"},{"line_number":73,"context_line":"                    \u0027phase\u0027: fields.NotificationPhase.ERROR,"},{"line_number":74,"context_line":"                    \u0027priority\u0027: fields.NotificationPhase.ERROR"},{"line_number":75,"context_line":"                }"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"            action_plan.state \u003d ap_state"}],"source_content_type":"text/x-python","patch_set":9,"id":"7899a0a6_07245172","line":74,"range":{"start_line":74,"start_character":32,"end_line":74,"end_character":62},"in_reply_to":"b6297699_288386fd","updated":"2025-05-26 12:55:53.000000000","message":"ups, thanks for catching it","commit_id":"d0be262be375d217d23e26190ab5d944025732b7"}]}
