)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"27ad5ff300d235fb020ebff5c9d1c02e2c51cb56","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3d79d933_e1334158","updated":"2025-12-14 12:30:25.000000000","message":"recheck","commit_id":"bd0c689e38bc0650652f04dcc6806de9d239d440"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"cdcbd49b50e840b61fc53c6e77e2b979e995823c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"7f0b9b51_370bcc9f","updated":"2026-01-14 11:07:19.000000000","message":"lgtm","commit_id":"bd03b4879f3e7d5a0fd4f2ec8491448b79d8bbe0"}],"watcher/applier/messaging/trigger.py":[{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1493099d9ef4dcaf99ca8b64d1214b17baf1b7cb","unresolved":true,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def launch_action_plan(self, context, action_plan_uuid):"},{"line_number":46,"context_line":"        LOG.debug(\"Trigger ActionPlan %s\", action_plan_uuid)"},{"line_number":47,"context_line":"        action_plan \u003d objects.ActionPlan.get_by_uuid("},{"line_number":48,"context_line":"            context, action_plan_uuid, eager\u003dTrue)"},{"line_number":49,"context_line":"        action_plan.hostname \u003d CONF.host"},{"line_number":50,"context_line":"        action_plan.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"50dea4c2_def81300","line":47,"in_reply_to":"435526c7_177d9392","updated":"2025-12-11 15:13:14.000000000","message":"No need, imo. It should always exist and if there is any issue getting it, the underlying exception will be raised and logged.","commit_id":"4b1d243378bb0c6032ec9e8f34a63dbbb86a9f80"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ea34704a40436718d9603d0c5afc105a16aca6e7","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def launch_action_plan(self, context, action_plan_uuid):"},{"line_number":46,"context_line":"        LOG.debug(\"Trigger ActionPlan %s\", action_plan_uuid)"},{"line_number":47,"context_line":"        action_plan \u003d objects.ActionPlan.get_by_uuid("},{"line_number":48,"context_line":"            context, action_plan_uuid, eager\u003dTrue)"},{"line_number":49,"context_line":"        action_plan.hostname \u003d CONF.host"},{"line_number":50,"context_line":"        action_plan.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ce356445_22af5c80","line":47,"in_reply_to":"50dea4c2_def81300","updated":"2026-01-15 14:16:34.000000000","message":"Acknowledged","commit_id":"4b1d243378bb0c6032ec9e8f34a63dbbb86a9f80"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1493099d9ef4dcaf99ca8b64d1214b17baf1b7cb","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        LOG.debug(\"Trigger ActionPlan %s\", action_plan_uuid)"},{"line_number":47,"context_line":"        action_plan \u003d objects.ActionPlan.get_by_uuid("},{"line_number":48,"context_line":"            context, action_plan_uuid, eager\u003dTrue)"},{"line_number":49,"context_line":"        action_plan.hostname \u003d CONF.host"},{"line_number":50,"context_line":"        action_plan.save()"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        # submit"}],"source_content_type":"text/x-python","patch_set":1,"id":"3df640da_4698bbd3","line":49,"in_reply_to":"a02b0b2d_7cd28155","updated":"2025-12-11 15:13:14.000000000","message":"The log message in line 46 implicitely reports assignment to the local applier.","commit_id":"4b1d243378bb0c6032ec9e8f34a63dbbb86a9f80"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ea34704a40436718d9603d0c5afc105a16aca6e7","unresolved":true,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def launch_action_plan(self, context, action_plan_uuid):"},{"line_number":46,"context_line":"        LOG.debug(\"Trigger ActionPlan %s\", action_plan_uuid)"},{"line_number":47,"context_line":"        action_plan \u003d objects.ActionPlan.get_by_uuid("},{"line_number":48,"context_line":"            context, action_plan_uuid, eager\u003dTrue)"},{"line_number":49,"context_line":"        action_plan.hostname \u003d CONF.host"},{"line_number":50,"context_line":"        action_plan.save()"}],"source_content_type":"text/x-python","patch_set":4,"id":"25c3e0f5_54c7394e","line":47,"in_reply_to":"50b99486_7daa7abf","updated":"2026-01-15 14:16:34.000000000","message":"\u003e Missing error handling for ActionPlan.get_by_uuid in trigger.py\n\u003e \n\u003e **Severity**: WARNING | **Confidence**: 0.7\n\u003e \n\u003e **Impact**: Could cause uncaught exceptions if ActionPlan UUID is invalid\n\u003e \n\u003e **Suggestion**:\n\u003e Add try/except block to handle potential ActionPlanNotFound or database errors\n\n\nits technially posible it could have been deleted but the excpetion will propaget if that happens.","commit_id":"bd03b4879f3e7d5a0fd4f2ec8491448b79d8bbe0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ea34704a40436718d9603d0c5afc105a16aca6e7","unresolved":true,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def launch_action_plan(self, context, action_plan_uuid):"},{"line_number":46,"context_line":"        LOG.debug(\"Trigger ActionPlan %s\", action_plan_uuid)"},{"line_number":47,"context_line":"        action_plan \u003d objects.ActionPlan.get_by_uuid("},{"line_number":48,"context_line":"            context, action_plan_uuid, eager\u003dTrue)"},{"line_number":49,"context_line":"        action_plan.hostname \u003d CONF.host"},{"line_number":50,"context_line":"        action_plan.save()"}],"source_content_type":"text/x-python","patch_set":4,"id":"0e4d06e8_e0824bab","line":47,"in_reply_to":"dd2c69c0_7c6d2f48","updated":"2026-01-15 14:16:34.000000000","message":"\u003e Consider atomic hostname assignment with state transition\n\u003e \n\u003e **Severity**: SUGGESTION | **Confidence**: 0.6\n\u003e \n\u003e **Benefit**: Would ensure hostname and state changes are atomic operations\n\u003e \n\u003e **Recommendation**:\n\u003e Evaluate if hostname assignment should be combined with any state transition for consistency\n\n\nhum this woudl be an api change but perhaps it woudl make sense to add a Assigned state in the future.\nwe could also move it to Pending at this point but im not sure if that will break any other logic but we should consdier this, for now its porbaly not needed.","commit_id":"bd03b4879f3e7d5a0fd4f2ec8491448b79d8bbe0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ea34704a40436718d9603d0c5afc105a16aca6e7","unresolved":true,"context_lines":[{"line_number":46,"context_line":"        LOG.debug(\"Trigger ActionPlan %s\", action_plan_uuid)"},{"line_number":47,"context_line":"        action_plan \u003d objects.ActionPlan.get_by_uuid("},{"line_number":48,"context_line":"            context, action_plan_uuid, eager\u003dTrue)"},{"line_number":49,"context_line":"        action_plan.hostname \u003d CONF.host"},{"line_number":50,"context_line":"        action_plan.save()"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        # submit"}],"source_content_type":"text/x-python","patch_set":4,"id":"bc2316cd_6044ceb2","line":49,"in_reply_to":"6a1f50be_06ee9b71","updated":"2026-01-15 14:16:34.000000000","message":"\u003e Add logging for hostname assignment\n\u003e \n\u003e **Severity**: SUGGESTION | **Confidence**: 0.8\n\u003e \n\u003e **Benefit**: Improves observability and debugging of ActionPlan assignment process\n\u003e \n\u003e **Recommendation**:\n\u003e Add LOG.debug or LOG.info statement to track when hostname is assigned to ActionPlan\n\n\nthis is valid but could be a follow up.","commit_id":"bd03b4879f3e7d5a0fd4f2ec8491448b79d8bbe0"}]}
