)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ae42ffcf0bf9e2cd5585f6beeb438ae4d004a3fd","unresolved":true,"context_lines":[{"line_number":14,"context_line":"  As event audit was added in 1.4 microversion"},{"line_number":15,"context_line":"- Since Microversion test class inherits from"},{"line_number":16,"context_line":"  base.BaseInfraOptimTest. It will specific tests falling in that"},{"line_number":17,"context_line":"  microversion range. Some tests contain object with specific names."},{"line_number":18,"context_line":"  Since resources are not cleanup. When microversion tested will run"},{"line_number":19,"context_line":"  again. It will cause name collision. This cr also drops names from"},{"line_number":20,"context_line":"  audit create tests."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"abf6b50f_12f87c7b","line":18,"range":{"start_line":17,"start_character":22,"end_line":18,"end_character":34},"updated":"2025-10-03 14:18:40.000000000","message":"so this is a bug.\n\nall resoce create durign a tempet run should alwasy be clenaed ups\n\nwe can share resocues at the class level but that is the only excption so instead of renaming resouces you shoudl be ensuring that the audits/actionplance ectra are deleted/cleaned up.","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":14,"context_line":"  As event audit was added in 1.4 microversion"},{"line_number":15,"context_line":"- Since Microversion test class inherits from"},{"line_number":16,"context_line":"  base.BaseInfraOptimTest. It will specific tests falling in that"},{"line_number":17,"context_line":"  microversion range. Some tests contain object with specific names."},{"line_number":18,"context_line":"  Since resources are not cleanup. When microversion tested will run"},{"line_number":19,"context_line":"  again. It will cause name collision. This cr also drops names from"},{"line_number":20,"context_line":"  audit create tests."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"9dafa1d9_f703e392","line":18,"range":{"start_line":17,"start_character":22,"end_line":18,"end_character":34},"in_reply_to":"abf6b50f_12f87c7b","updated":"2025-11-25 07:01:33.000000000","message":"fixed as a part of refactoring https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/967522/15?usp\u003drelated-change","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"5e2f9f08d3440a6fb687a17cbc975119d59e54a1","unresolved":true,"context_lines":[{"line_number":14,"context_line":"  As event audit was added in 1.4 microversion"},{"line_number":15,"context_line":"- Added self.addCleanup to most of the audit tests to cleanup created"},{"line_number":16,"context_line":"  audit and audit template."},{"line_number":17,"context_line":"  self.addCleanup cannot be added to classmethod create_audit and"},{"line_number":18,"context_line":"  create_audit_template that\u0027s why we are added it in tests."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #2118904"},{"line_number":21,"context_line":"Assisted-By: Cursor (GPT-5)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"a6eb0026_841e9f4b","line":18,"range":{"start_line":17,"start_character":0,"end_line":18,"end_character":60},"updated":"2025-10-08 17:50:30.000000000","message":"In scenario tests we cleanup in create_audit* methods, but they are not classmethods there.","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"0875d5104931d2eea5cc6d0a4e3f04b938e3410d","unresolved":false,"context_lines":[{"line_number":14,"context_line":"  As event audit was added in 1.4 microversion"},{"line_number":15,"context_line":"- Added self.addCleanup to most of the audit tests to cleanup created"},{"line_number":16,"context_line":"  audit and audit template."},{"line_number":17,"context_line":"  self.addCleanup cannot be added to classmethod create_audit and"},{"line_number":18,"context_line":"  create_audit_template that\u0027s why we are added it in tests."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #2118904"},{"line_number":21,"context_line":"Assisted-By: Cursor (GPT-5)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"6a16f8b0_158f244d","line":18,"range":{"start_line":17,"start_character":0,"end_line":18,"end_character":60},"in_reply_to":"a6eb0026_841e9f4b","updated":"2025-10-09 14:22:54.000000000","message":"Done","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Chandan Kumar \u003cchkumar@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2025-11-11 03:36:21 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added tempest API tests for continous audit"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This cr adds two tempest api tests:"},{"line_number":10,"context_line":"- Run continuous audit with start/end time added in microversion"},{"line_number":11,"context_line":"  1.1"},{"line_number":12,"context_line":"- Run continuous audit with crontab interval expression"},{"line_number":13,"context_line":"- Moved test_create_audit_event under TestCreateUpdateDeleteAuditV14."},{"line_number":14,"context_line":"  As event audit was added in 1.4 microversion"},{"line_number":15,"context_line":"- Added self.addCleanup to most of the audit tests to cleanup created"},{"line_number":16,"context_line":"  audit and audit template."},{"line_number":17,"context_line":"  In scenario tests we cleanup in create_audit* methods, but they are"},{"line_number":18,"context_line":"  not classmethods there."},{"line_number":19,"context_line":"- Added cancel_audit method and replace existing cancel audit code with"},{"line_number":20,"context_line":"  this method"},{"line_number":21,"context_line":"- Added is_audit_pending method and used in create_audit method to check"},{"line_number":22,"context_line":"  for audit entering into Pending state."},{"line_number":23,"context_line":"- Added UTC import to work with both py3.9 and py3.12"},{"line_number":24,"context_line":"- Enhanced create_audit method with 5-retry mechanism to handle"},{"line_number":25,"context_line":"  intermittent audit creation failures"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Closes-Bug: #2118904"},{"line_number":28,"context_line":"Assisted-By: Cursor (GPT-5)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"bbcb9225_b3ed55b2","line":25,"range":{"start_line":7,"start_character":0,"end_line":25,"end_character":38},"updated":"2025-11-11 12:48:10.000000000","message":"this is not true anymore \n\n\ncan you update the commit message to reflect what was actually changed.\n\nwe are not doing 5 retires\nwe do not support python 3.9 after flamingo the support is for 3.10+\n\naws noted inline doign self.addCleanup is not wrong persay but its not howe this shoudl work\n\nit correctign the resouce leak in the tests you are updateign but the create_audit and the create_audit_template methods shoudl do that internally.\n\nwe shoudl not have divergence between the too. its aslo nto clear thaty these shold be calss methods.\n\nthey can be but we shoudl not have diffent defitions fo create_audit_template for the api and sechairo tests\n\nthey shoudl be factored into the base test class or a utility mixim with a single common defintion shared betwen the api and scenairo tests.","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Chandan Kumar \u003cchkumar@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2025-11-11 03:36:21 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added tempest API tests for continous audit"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This cr adds two tempest api tests:"},{"line_number":10,"context_line":"- Run continuous audit with start/end time added in microversion"},{"line_number":11,"context_line":"  1.1"},{"line_number":12,"context_line":"- Run continuous audit with crontab interval expression"},{"line_number":13,"context_line":"- Moved test_create_audit_event under TestCreateUpdateDeleteAuditV14."},{"line_number":14,"context_line":"  As event audit was added in 1.4 microversion"},{"line_number":15,"context_line":"- Added self.addCleanup to most of the audit tests to cleanup created"},{"line_number":16,"context_line":"  audit and audit template."},{"line_number":17,"context_line":"  In scenario tests we cleanup in create_audit* methods, but they are"},{"line_number":18,"context_line":"  not classmethods there."},{"line_number":19,"context_line":"- Added cancel_audit method and replace existing cancel audit code with"},{"line_number":20,"context_line":"  this method"},{"line_number":21,"context_line":"- Added is_audit_pending method and used in create_audit method to check"},{"line_number":22,"context_line":"  for audit entering into Pending state."},{"line_number":23,"context_line":"- Added UTC import to work with both py3.9 and py3.12"},{"line_number":24,"context_line":"- Enhanced create_audit method with 5-retry mechanism to handle"},{"line_number":25,"context_line":"  intermittent audit creation failures"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Closes-Bug: #2118904"},{"line_number":28,"context_line":"Assisted-By: Cursor (GPT-5)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"de9509ec_429fa041","line":25,"range":{"start_line":7,"start_character":0,"end_line":25,"end_character":38},"in_reply_to":"bbcb9225_b3ed55b2","updated":"2025-11-25 07:01:33.000000000","message":"Done","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"6d4539eac792eba48c3773961d90fbbf14639ab4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"cbc7512c_a08f33ef","updated":"2025-09-23 17:22:44.000000000","message":"I think that looks good, and tests are passing. Thanks","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"3d1e20cbf55b97289ba11cb6b143499dbc0f2a0a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"2f8565e1_b3c8effa","updated":"2025-09-30 05:12:56.000000000","message":"check-rdo","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6084b52db7d7f0fa9ade473ab2e60e548b1af2b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":23,"id":"4c810ea0_8eb18009","updated":"2025-10-08 06:48:27.000000000","message":"recheck","commit_id":"6fe9fd2f409a520a7b9bdfcc580b73051366b577"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"5e2f9f08d3440a6fb687a17cbc975119d59e54a1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"08ee3443_182d0cb8","updated":"2025-10-08 17:50:30.000000000","message":"some questions inline, but looks good","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"2dd1765d1c0b99c682a5da8310d1e00500bd732e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"ae4537ba_9a24c067","updated":"2025-10-10 13:50:28.000000000","message":"Some small improvements, but I think that looks good to get in.","commit_id":"bb035be6204cba8679834255c300220b1d6f6832"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"cee9e54c0b1bd1e9f508041b4dcb9e87e5e87127","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":31,"id":"28f5a276_c476c2f4","updated":"2025-11-07 05:50:20.000000000","message":"recheck","commit_id":"d1abb1ddf7be6c6422b2d6176a93657c84f9c546"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":33,"id":"8311d2fb_0083d91f","updated":"2025-11-11 12:48:10.000000000","message":"im kind of torn \nyou are addign some addtional tests coverage here but not as much as you had in the senario tests patch. your also fixing some of the resouce leakage issues but your not takign the time to do it properly so whyile your paying down some technial debt yoru also creating mroe.\n\nyou ahve also mix these test case enhancment with unrelated refactors and you dont really have enough coverage in this patch to consier the bug closed.\n\nso while you are making prgress i think it might make sense to take a step back and think is htis the right way to do this.","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"f2a5e102862a9863448a0ad3e6b3eb09a798cb23","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":33,"id":"4c05d673_723e319e","updated":"2025-11-18 13:08:37.000000000","message":"rebasing on top of refactoring https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/967522","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":33,"id":"cc16b735_3b7cc92d","in_reply_to":"8311d2fb_0083d91f","updated":"2025-11-25 07:01:33.000000000","message":"Done as a part of https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/967522/15 by moving common method into a mixing class.","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"ef6621e2e46ea0593742d7d333234089ee2fd63b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"bc44961c_f3b97151","updated":"2025-11-28 13:49:26.000000000","message":"lgtm, much better now after the refactoring in parent change","commit_id":"acd50f856980e2dc97f87d1dccaaa75d7086b3d9"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"52633f4d28560c17b27c35bcc84136ca8eb1390e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"134cf974_f8655432","updated":"2025-11-26 06:47:59.000000000","message":"recheck","commit_id":"acd50f856980e2dc97f87d1dccaaa75d7086b3d9"}],"watcher_tempest_plugin/tests/api/admin/base.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ae42ffcf0bf9e2cd5585f6beeb438ae4d004a3fd","unresolved":true,"context_lines":[{"line_number":234,"context_line":"                audit_template_uuid\u003daudit_template_uuid,"},{"line_number":235,"context_line":"                audit_type\u003daudit_type, state\u003dstate, interval\u003dinterval,"},{"line_number":236,"context_line":"                parameters\u003dparameters, name\u003dname, start_time\u003dstart_time,"},{"line_number":237,"context_line":"                end_time\u003dend_time)"},{"line_number":238,"context_line":"            audit_uuid \u003d body[\u0027uuid\u0027]"},{"line_number":239,"context_line":"            test_utils.call_until_true("},{"line_number":240,"context_line":"                func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"}],"source_content_type":"text/x-python","patch_set":19,"id":"3d31a9b4_16f91b6d","line":237,"updated":"2025-10-03 14:18:40.000000000","message":"we should be doing self.addCleanup to ensure the udit is cleaned up automaticly\nregardless of if the test passes or not","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                audit_template_uuid\u003daudit_template_uuid,"},{"line_number":235,"context_line":"                audit_type\u003daudit_type, state\u003dstate, interval\u003dinterval,"},{"line_number":236,"context_line":"                parameters\u003dparameters, name\u003dname, start_time\u003dstart_time,"},{"line_number":237,"context_line":"                end_time\u003dend_time)"},{"line_number":238,"context_line":"            audit_uuid \u003d body[\u0027uuid\u0027]"},{"line_number":239,"context_line":"            test_utils.call_until_true("},{"line_number":240,"context_line":"                func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"}],"source_content_type":"text/x-python","patch_set":19,"id":"5b29d8ad_79cde488","line":237,"in_reply_to":"3d31a9b4_16f91b6d","updated":"2025-11-25 07:01:33.000000000","message":"Done","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ae42ffcf0bf9e2cd5585f6beeb438ae4d004a3fd","unresolved":true,"context_lines":[{"line_number":241,"context_line":"                duration\u003d30,"},{"line_number":242,"context_line":"                sleep_for\u003d2"},{"line_number":243,"context_line":"            )"},{"line_number":244,"context_line":"            if cls.has_audit_failed(audit_uuid):"},{"line_number":245,"context_line":"                audit_success \u003d False"},{"line_number":246,"context_line":"                cls.delete_audit(audit_uuid)"},{"line_number":247,"context_line":"                time.sleep(5)"},{"line_number":248,"context_line":"            else:"},{"line_number":249,"context_line":"                audit_success \u003d True"},{"line_number":250,"context_line":"            retry -\u003d 1"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        assert audit_success"},{"line_number":253,"context_line":"        cls.created_audits.add(body[\u0027uuid\u0027])"},{"line_number":254,"context_line":"        cls.created_action_plans_audit_uuids.add(body[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":19,"id":"54cc16fb_b2eb0f34","line":251,"range":{"start_line":244,"start_character":10,"end_line":251,"end_character":1},"updated":"2025-10-03 14:18:40.000000000","message":"we shoudl not need to loop like this either this was probaly n eleri attpet to work around it. but its not really correct.","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":true,"context_lines":[{"line_number":241,"context_line":"                duration\u003d30,"},{"line_number":242,"context_line":"                sleep_for\u003d2"},{"line_number":243,"context_line":"            )"},{"line_number":244,"context_line":"            if cls.has_audit_failed(audit_uuid):"},{"line_number":245,"context_line":"                audit_success \u003d False"},{"line_number":246,"context_line":"                cls.delete_audit(audit_uuid)"},{"line_number":247,"context_line":"                time.sleep(5)"},{"line_number":248,"context_line":"            else:"},{"line_number":249,"context_line":"                audit_success \u003d True"},{"line_number":250,"context_line":"            retry -\u003d 1"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        assert audit_success"},{"line_number":253,"context_line":"        cls.created_audits.add(body[\u0027uuid\u0027])"},{"line_number":254,"context_line":"        cls.created_action_plans_audit_uuids.add(body[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":19,"id":"7343f21f_6a33d08e","line":251,"range":{"start_line":244,"start_character":10,"end_line":251,"end_character":1},"in_reply_to":"54cc16fb_b2eb0f34","updated":"2025-11-25 07:01:33.000000000","message":"no longer needed, it is removed as a part of https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/967522/15?usp\u003drelated-change","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"7518a0bdab903d66461018ef2a289f655d09bda7","unresolved":true,"context_lines":[{"line_number":229,"context_line":"        :return: A tuple with The HTTP response and its body"},{"line_number":230,"context_line":"        \"\"\""},{"line_number":231,"context_line":"        cls.wait_for_all_action_plans_to_finish()"},{"line_number":232,"context_line":"        resp, body \u003d cls.client.create_audit("},{"line_number":233,"context_line":"            audit_template_uuid\u003daudit_template_uuid,"},{"line_number":234,"context_line":"            audit_type\u003daudit_type, state\u003dstate, interval\u003dinterval,"},{"line_number":235,"context_line":"            parameters\u003dparameters, name\u003dname, start_time\u003dstart_time,"}],"source_content_type":"text/x-python","patch_set":21,"id":"9ef8c555_03fb985b","line":232,"updated":"2025-10-07 13:56:59.000000000","message":"+1 good cleanup, the previous code was a clear telling of an underlying bug","commit_id":"91f7a9cfbfe2f7fd116c43e20153bd7e87fef16d"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"8153d70bb7633bc404bff6d2998642329adf5014","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        :return: A tuple with The HTTP response and its body"},{"line_number":230,"context_line":"        \"\"\""},{"line_number":231,"context_line":"        cls.wait_for_all_action_plans_to_finish()"},{"line_number":232,"context_line":"        resp, body \u003d cls.client.create_audit("},{"line_number":233,"context_line":"            audit_template_uuid\u003daudit_template_uuid,"},{"line_number":234,"context_line":"            audit_type\u003daudit_type, state\u003dstate, interval\u003dinterval,"},{"line_number":235,"context_line":"            parameters\u003dparameters, name\u003dname, start_time\u003dstart_time,"}],"source_content_type":"text/x-python","patch_set":21,"id":"54874bc0_7b898f4a","line":232,"in_reply_to":"9ef8c555_03fb985b","updated":"2025-10-24 15:09:48.000000000","message":"Done","commit_id":"91f7a9cfbfe2f7fd116c43e20153bd7e87fef16d"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"7518a0bdab903d66461018ef2a289f655d09bda7","unresolved":true,"context_lines":[{"line_number":239,"context_line":"        cls.created_audits.add(body[\u0027uuid\u0027])"},{"line_number":240,"context_line":"        cls.created_action_plans_audit_uuids.add(body[\u0027uuid\u0027])"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        test_utils.call_until_true("},{"line_number":243,"context_line":"            func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"},{"line_number":244,"context_line":"            duration\u003d30,"},{"line_number":245,"context_line":"            sleep_for\u003d2"}],"source_content_type":"text/x-python","patch_set":21,"id":"de6fe2bf_b8b5fcb8","line":242,"updated":"2025-10-07 13:56:59.000000000","message":"If we add this wait here we should document it in the docstring. I think it\u0027s ok to add it since it won\u0027t break any existing tests, but we will probably have redundant waits","commit_id":"91f7a9cfbfe2f7fd116c43e20153bd7e87fef16d"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"afaa25701965606ebe0626944707038d76122e6f","unresolved":true,"context_lines":[{"line_number":239,"context_line":"        cls.created_audits.add(body[\u0027uuid\u0027])"},{"line_number":240,"context_line":"        cls.created_action_plans_audit_uuids.add(body[\u0027uuid\u0027])"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        test_utils.call_until_true("},{"line_number":243,"context_line":"            func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"},{"line_number":244,"context_line":"            duration\u003d30,"},{"line_number":245,"context_line":"            sleep_for\u003d2"}],"source_content_type":"text/x-python","patch_set":21,"id":"c6f3032b_09362136","line":242,"in_reply_to":"7003240b_549a333f","updated":"2025-10-08 09:26:18.000000000","message":"I have improved docs string, if we remove wait conditions, it break other tests.","commit_id":"91f7a9cfbfe2f7fd116c43e20153bd7e87fef16d"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"8153d70bb7633bc404bff6d2998642329adf5014","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        cls.created_audits.add(body[\u0027uuid\u0027])"},{"line_number":240,"context_line":"        cls.created_action_plans_audit_uuids.add(body[\u0027uuid\u0027])"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        test_utils.call_until_true("},{"line_number":243,"context_line":"            func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"},{"line_number":244,"context_line":"            duration\u003d30,"},{"line_number":245,"context_line":"            sleep_for\u003d2"}],"source_content_type":"text/x-python","patch_set":21,"id":"fd13da61_573e1e73","line":242,"in_reply_to":"c6f3032b_09362136","updated":"2025-10-24 15:09:48.000000000","message":"Acknowledged","commit_id":"91f7a9cfbfe2f7fd116c43e20153bd7e87fef16d"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"722e7b74c11067734942f82963b189cc00f42166","unresolved":true,"context_lines":[{"line_number":239,"context_line":"        cls.created_audits.add(body[\u0027uuid\u0027])"},{"line_number":240,"context_line":"        cls.created_action_plans_audit_uuids.add(body[\u0027uuid\u0027])"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        test_utils.call_until_true("},{"line_number":243,"context_line":"            func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"},{"line_number":244,"context_line":"            duration\u003d30,"},{"line_number":245,"context_line":"            sleep_for\u003d2"}],"source_content_type":"text/x-python","patch_set":21,"id":"7003240b_549a333f","line":242,"in_reply_to":"de6fe2bf_b8b5fcb8","updated":"2025-10-08 04:51:32.000000000","message":"+1, indeed it was redundant, I have removed it. thanks Joan","commit_id":"91f7a9cfbfe2f7fd116c43e20153bd7e87fef16d"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"5e2f9f08d3440a6fb687a17cbc975119d59e54a1","unresolved":true,"context_lines":[{"line_number":246,"context_line":"        # Wait for audit to finish"},{"line_number":247,"context_line":"        test_utils.call_until_true("},{"line_number":248,"context_line":"            func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"},{"line_number":249,"context_line":"            duration\u003d30,"},{"line_number":250,"context_line":"            sleep_for\u003d2"},{"line_number":251,"context_line":"        )"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"c03485c9_5782c9d9","line":249,"range":{"start_line":249,"start_character":0,"end_line":249,"end_character":24},"updated":"2025-10-08 17:50:30.000000000","message":"if the start_time is more than 30s in the future, we should fail here, right? At least for continuous audits. We would just need to take care with that when building tests with start_time.\nHow stable is https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/956004/24/watcher_tempest_plugin/tests/api/admin/test_audit.py#270? since you add a continuous audit to start 1 minute ahead. has_audit_finished will only return true if continuous audits change from pending to ongoing.","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"2dd1765d1c0b99c682a5da8310d1e00500bd732e","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        # Wait for audit to finish"},{"line_number":247,"context_line":"        test_utils.call_until_true("},{"line_number":248,"context_line":"            func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"},{"line_number":249,"context_line":"            duration\u003d30,"},{"line_number":250,"context_line":"            sleep_for\u003d2"},{"line_number":251,"context_line":"        )"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"992417f6_199c2672","line":249,"range":{"start_line":249,"start_character":0,"end_line":249,"end_character":24},"in_reply_to":"653c2221_0758d26e","updated":"2025-10-10 13:50:28.000000000","message":"I think that makes sense to wait for PENDING for CONTINUOUS audit with start_time. Then, it is up to the test itself, that defined the start_time, to sleep the amount time and check if moves to ONGOING. Agree.","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"0875d5104931d2eea5cc6d0a4e3f04b938e3410d","unresolved":true,"context_lines":[{"line_number":246,"context_line":"        # Wait for audit to finish"},{"line_number":247,"context_line":"        test_utils.call_until_true("},{"line_number":248,"context_line":"            func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"},{"line_number":249,"context_line":"            duration\u003d30,"},{"line_number":250,"context_line":"            sleep_for\u003d2"},{"line_number":251,"context_line":"        )"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"653c2221_0758d26e","line":249,"range":{"start_line":249,"start_character":0,"end_line":249,"end_character":24},"in_reply_to":"c03485c9_5782c9d9","updated":"2025-10-09 14:22:54.000000000","message":"good catch! yes correct The current logic fails for continuous audits with start_time \u003e30s in the future. The audit remains PENDING until start_time, but we\n  wait only 30s for it to reach ONGOING. I\u0027ll add conditional logic to handle this case. \n  \nThe test with start_time \u003d now + 1 minute is indeed unstable because has_audit_finished waits for PENDING→ONGOING transition, but the 30s\n   timeout expires before the 1-minute delay. I fixed it by reducing start_time to 10 seconds for faster execution\n   \nI think it will fix the above scenario.","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"2dd1765d1c0b99c682a5da8310d1e00500bd732e","unresolved":true,"context_lines":[{"line_number":261,"context_line":"                audit_success \u003d True"},{"line_number":262,"context_line":"            else:"},{"line_number":263,"context_line":"                test_utils.call_until_true("},{"line_number":264,"context_line":"                    func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"},{"line_number":265,"context_line":"                    duration\u003d30,"},{"line_number":266,"context_line":"                    sleep_for\u003d2"},{"line_number":267,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":27,"id":"fadef5d3_1107b999","line":264,"range":{"start_line":264,"start_character":47,"end_line":264,"end_character":65},"updated":"2025-10-10 13:50:28.000000000","message":"ack, so this covers CONTINUOUS without start_time too. Isn\u0027t eady to read in the end, but it is correct","commit_id":"bb035be6204cba8679834255c300220b1d6f6832"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":true,"context_lines":[{"line_number":261,"context_line":"                audit_success \u003d True"},{"line_number":262,"context_line":"            else:"},{"line_number":263,"context_line":"                test_utils.call_until_true("},{"line_number":264,"context_line":"                    func\u003dfunctools.partial(cls.has_audit_finished, audit_uuid),"},{"line_number":265,"context_line":"                    duration\u003d30,"},{"line_number":266,"context_line":"                    sleep_for\u003d2"},{"line_number":267,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":27,"id":"73a7486b_7b3cec13","line":264,"range":{"start_line":264,"start_character":47,"end_line":264,"end_character":65},"in_reply_to":"fadef5d3_1107b999","updated":"2025-11-25 07:01:33.000000000","message":"covered in https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/967522/15?usp\u003drelated-change","commit_id":"bb035be6204cba8679834255c300220b1d6f6832"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"2dd1765d1c0b99c682a5da8310d1e00500bd732e","unresolved":true,"context_lines":[{"line_number":336,"context_line":"        return audit.get(\u0027state\u0027) \u003d\u003d \u0027SUCCEEDED\u0027"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    @classmethod"},{"line_number":339,"context_line":"    def has_audit_finished(cls, audit_uuid):"},{"line_number":340,"context_line":"        _, audit \u003d cls.client.show_audit(audit_uuid)"},{"line_number":341,"context_line":"        finished_states \u003d cls.FINISHED_STATES"},{"line_number":342,"context_line":"        if audit.get(\u0027audit_type\u0027) \u003d\u003d \u0027CONTINUOUS\u0027:"},{"line_number":343,"context_line":"            finished_states +\u003d (\u0027ONGOING\u0027,)"},{"line_number":344,"context_line":"        return audit.get(\u0027state\u0027) in finished_states"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    @classmethod"},{"line_number":347,"context_line":"    def has_audit_failed(cls, audit_uuid):"}],"source_content_type":"text/x-python","patch_set":27,"id":"e0935484_0f55304b","line":344,"range":{"start_line":339,"start_character":0,"end_line":344,"end_character":52},"updated":"2025-10-10 13:50:28.000000000","message":"You could get this result from show_audit() to read the start_time (if not empty) to decide that finished_state also includes PENDING, for continous audits. Would avoid the logic changed in create_audit?","commit_id":"bb035be6204cba8679834255c300220b1d6f6832"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"4351f01a42217b38d331168cf16b772f94b770fb","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        return audit.get(\u0027state\u0027) \u003d\u003d \u0027SUCCEEDED\u0027"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    @classmethod"},{"line_number":339,"context_line":"    def has_audit_finished(cls, audit_uuid):"},{"line_number":340,"context_line":"        _, audit \u003d cls.client.show_audit(audit_uuid)"},{"line_number":341,"context_line":"        finished_states \u003d cls.FINISHED_STATES"},{"line_number":342,"context_line":"        if audit.get(\u0027audit_type\u0027) \u003d\u003d \u0027CONTINUOUS\u0027:"},{"line_number":343,"context_line":"            finished_states +\u003d (\u0027ONGOING\u0027,)"},{"line_number":344,"context_line":"        return audit.get(\u0027state\u0027) in finished_states"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    @classmethod"},{"line_number":347,"context_line":"    def has_audit_failed(cls, audit_uuid):"}],"source_content_type":"text/x-python","patch_set":27,"id":"23e2ddc5_1cbcbbec","line":344,"range":{"start_line":339,"start_character":0,"end_line":344,"end_character":52},"in_reply_to":"e0935484_0f55304b","updated":"2025-10-17 06:31:54.000000000","message":"Done","commit_id":"bb035be6204cba8679834255c300220b1d6f6832"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"a9a7c57225c9f1b6c264cb2d2dbad5bdf81ebffa","unresolved":true,"context_lines":[{"line_number":238,"context_line":"        audit_success \u003d False"},{"line_number":239,"context_line":"        cls.wait_for_all_action_plans_to_finish()"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        while not audit_success and retry:"},{"line_number":242,"context_line":"            resp, body \u003d cls.client.create_audit("},{"line_number":243,"context_line":"                audit_template_uuid\u003daudit_template_uuid,"},{"line_number":244,"context_line":"                audit_type\u003daudit_type, state\u003dstate, interval\u003dinterval,"}],"source_content_type":"text/x-python","patch_set":28,"id":"148e869b_44c0ca42","line":241,"range":{"start_line":241,"start_character":0,"end_line":241,"end_character":42},"updated":"2025-11-04 13:06:38.000000000","message":"I know that this code was already here, and you are extending it. But I don\u0027t know/remember why we need to loop in case of failure. Is there a reason for an audit fail here, that we can\u0027t avoid in the test itself?","commit_id":"bba74c91d742f168d5c1a29d7b239fc5bff96793"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":true,"context_lines":[{"line_number":238,"context_line":"        audit_success \u003d False"},{"line_number":239,"context_line":"        cls.wait_for_all_action_plans_to_finish()"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        while not audit_success and retry:"},{"line_number":242,"context_line":"            resp, body \u003d cls.client.create_audit("},{"line_number":243,"context_line":"                audit_template_uuid\u003daudit_template_uuid,"},{"line_number":244,"context_line":"                audit_type\u003daudit_type, state\u003dstate, interval\u003dinterval,"}],"source_content_type":"text/x-python","patch_set":28,"id":"95e96146_ecf3c650","line":241,"range":{"start_line":241,"start_character":0,"end_line":241,"end_character":42},"in_reply_to":"148e869b_44c0ca42","updated":"2025-11-25 07:01:33.000000000","message":"dropped from refactoring code https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/967522/15?usp\u003drelated-change","commit_id":"bba74c91d742f168d5c1a29d7b239fc5bff96793"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"21f3b8254660dff8dc1d2cfd7b8f7c9b98070b3c","unresolved":true,"context_lines":[{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            resp, _ \u003d cls.client.delete_audit_template(uuid)"},{"line_number":205,"context_line":"        except Exception:"},{"line_number":206,"context_line":"            # Resource might already be deleted"},{"line_number":207,"context_line":"            resp \u003d None"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"49230780_c80d6ba4","line":205,"updated":"2025-11-07 21:05:54.000000000","message":"this shoudl not eb using a bare except","commit_id":"3fa8f3590969dfedd03762ecf44330a96e414486"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            resp, _ \u003d cls.client.delete_audit_template(uuid)"},{"line_number":205,"context_line":"        except Exception:"},{"line_number":206,"context_line":"            # Resource might already be deleted"},{"line_number":207,"context_line":"            resp \u003d None"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"fbd07e32_5bfaf9ee","line":205,"in_reply_to":"49230780_c80d6ba4","updated":"2025-11-25 07:01:33.000000000","message":"Acknowledged","commit_id":"3fa8f3590969dfedd03762ecf44330a96e414486"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"21f3b8254660dff8dc1d2cfd7b8f7c9b98070b3c","unresolved":true,"context_lines":[{"line_number":304,"context_line":"            if audit.get(\u0027state\u0027) in (\u0027ONGOING\u0027, \u0027PENDING\u0027):"},{"line_number":305,"context_line":"                cls.cancel_audit(audit_uuid)"},{"line_number":306,"context_line":"            resp, _ \u003d cls.client.delete_audit(audit_uuid)"},{"line_number":307,"context_line":"        except Exception:"},{"line_number":308,"context_line":"            # Resource might already be deleted"},{"line_number":309,"context_line":"            resp \u003d None"},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"91c5df2e_a624eb54","line":307,"updated":"2025-11-07 21:05:54.000000000","message":"[severity: warning]* Use of bare except clause in delete_audit method - Confidence: 0.7\nLocation: /home/zuul/src/review.opendev.org/openstack/watcher-tempest-plugin/watcher_tempest_plugin/tests/api/admin/base.py:308-310\nImpact: Error handling\nSuggestion: Replace bare except with specific exception types to avoid masking unexpected errors\n\nthis seams valid \n\nif the resocue was already deleted we shoudl get a 404\n\ncan we be moer speciric here and catch a not found exctpiop?","commit_id":"3fa8f3590969dfedd03762ecf44330a96e414486"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            if audit.get(\u0027state\u0027) in (\u0027ONGOING\u0027, \u0027PENDING\u0027):"},{"line_number":305,"context_line":"                cls.cancel_audit(audit_uuid)"},{"line_number":306,"context_line":"            resp, _ \u003d cls.client.delete_audit(audit_uuid)"},{"line_number":307,"context_line":"        except Exception:"},{"line_number":308,"context_line":"            # Resource might already be deleted"},{"line_number":309,"context_line":"            resp \u003d None"},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"e052ddcf_27ccf168","line":307,"in_reply_to":"91c5df2e_a624eb54","updated":"2025-11-25 07:01:33.000000000","message":"Acknowledged","commit_id":"3fa8f3590969dfedd03762ecf44330a96e414486"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[{"line_number":251,"context_line":"        )"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        # Fail if audit was cancelled or failed"},{"line_number":254,"context_line":"        assert not cls.has_audit_failed(audit_uuid), ("},{"line_number":255,"context_line":"            f\"Audit {audit_uuid} failed unexpectedly\""},{"line_number":256,"context_line":"        )"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"700998dc_24474a54","line":254,"in_reply_to":"4a41e6f2_b8db11ba","updated":"2025-11-11 12:48:10.000000000","message":"\u003e F-string usage in assertion message - (Severity: warning, Confidence: 0.9)\n\nthat valid but the real bug is you shoudl not use assert not ...\n\n\n```suggestion\n        self.assertFalse(cls.has_audit_failed(audit_uuid))\n```\n\nwe should not use raw assert statement in any of test code.","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        )"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        # Fail if audit was cancelled or failed"},{"line_number":254,"context_line":"        assert not cls.has_audit_failed(audit_uuid), ("},{"line_number":255,"context_line":"            f\"Audit {audit_uuid} failed unexpectedly\""},{"line_number":256,"context_line":"        )"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"fbc5d68d_3f92bb36","line":254,"in_reply_to":"700998dc_24474a54","updated":"2025-11-25 07:01:33.000000000","message":"no longer needed as code is moved to https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/967522/15?usp\u003drelated-change","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"}],"watcher_tempest_plugin/tests/api/admin/test_audit.py":[{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"e56a26894b9af0a59b4778111f1c96d8c9f3e70a","unresolved":true,"context_lines":[{"line_number":243,"context_line":"        )"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"class TestCreateUpdateDeleteAuditV11(TestCreateUpdateDeleteAudit):"},{"line_number":247,"context_line":"    \"\"\"Audit tests with microversion greater than 1.1\"\"\""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    min_microversion \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"e42cb4f9_122f5c9a","line":246,"range":{"start_line":246,"start_character":6,"end_line":246,"end_character":36},"updated":"2025-08-13 19:13:23.000000000","message":"So here you have inherit all tests from TestCreateUpdateDeleteAudit, which will run again with \u00271.1\u0027\nNot sure if we want to run all tests in all microversions, or just run new ones in their current minimal microversions.","commit_id":"fd68bd0931f4973113e3f87f84bce6e878716a8e"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"dd4762cf4bc61d86890c5a102ea171ecb5fa3908","unresolved":true,"context_lines":[{"line_number":243,"context_line":"        )"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"class TestCreateUpdateDeleteAuditV11(TestCreateUpdateDeleteAudit):"},{"line_number":247,"context_line":"    \"\"\"Audit tests with microversion greater than 1.1\"\"\""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    min_microversion \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"ae2b2e71_df1f83c0","line":246,"range":{"start_line":246,"start_character":6,"end_line":246,"end_character":36},"in_reply_to":"2c71a419_5df0e03a","updated":"2025-09-17 11:37:01.000000000","message":"as you pointed in the tempest example, it inherits from a TestBase class that has no tests defined. So each microversion test class only tests the change added in each microversion only. But here you are inheriting from TestCreateUpdateDeleteAudit which has already multiple tests. This will trigger all tests again, but for a new microversion. We don\u0027t usually run all tests for all microversions.","commit_id":"fd68bd0931f4973113e3f87f84bce6e878716a8e"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"6d4539eac792eba48c3773961d90fbbf14639ab4","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        )"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"class TestCreateUpdateDeleteAuditV11(TestCreateUpdateDeleteAudit):"},{"line_number":247,"context_line":"    \"\"\"Audit tests with microversion greater than 1.1\"\"\""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    min_microversion \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a42841b_cf1cdea0","line":246,"range":{"start_line":246,"start_character":6,"end_line":246,"end_character":36},"in_reply_to":"ae2b2e71_df1f83c0","updated":"2025-09-23 17:22:44.000000000","message":"Done","commit_id":"fd68bd0931f4973113e3f87f84bce6e878716a8e"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c68088e9a812432d50b527323a0955ab7bdb71a6","unresolved":true,"context_lines":[{"line_number":243,"context_line":"        )"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"class TestCreateUpdateDeleteAuditV11(TestCreateUpdateDeleteAudit):"},{"line_number":247,"context_line":"    \"\"\"Audit tests with microversion greater than 1.1\"\"\""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    min_microversion \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"260cef84_3027d96b","line":246,"range":{"start_line":246,"start_character":6,"end_line":246,"end_character":36},"in_reply_to":"ae2b2e71_df1f83c0","updated":"2025-09-23 04:53:53.000000000","message":"I have fixed it now https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_a94/openstack/a946db4398c5436b8eb8e71457c8d222/testr_results.html. only microversion test will run now.","commit_id":"fd68bd0931f4973113e3f87f84bce6e878716a8e"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"e77be12a532ea17e548d414147a32d0c05bb73e9","unresolved":true,"context_lines":[{"line_number":243,"context_line":"        )"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"class TestCreateUpdateDeleteAuditV11(TestCreateUpdateDeleteAudit):"},{"line_number":247,"context_line":"    \"\"\"Audit tests with microversion greater than 1.1\"\"\""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    min_microversion \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"2c71a419_5df0e03a","line":246,"range":{"start_line":246,"start_character":6,"end_line":246,"end_character":36},"in_reply_to":"e42cb4f9_122f5c9a","updated":"2025-08-15 05:04:04.000000000","message":"I was checking the tempest microversion related tests. https://github.com/openstack/tempest/blob/e7e3947694b4412a09c7d151c78a3fd47033adfc/tempest/api/compute/admin/test_hypervisor.py#L111 and https://github.com/openstack/tempest/blob/e7e3947694b4412a09c7d151c78a3fd47033adfc/tempest/api/compute/servers/test_server_rescue.py#L259 there are many more example.\n\nI am trying to follow the same pattern. I am not sure what is the correct approach here.","commit_id":"fd68bd0931f4973113e3f87f84bce6e878716a8e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ae42ffcf0bf9e2cd5585f6beeb438ae4d004a3fd","unresolved":true,"context_lines":[{"line_number":211,"context_line":"        _, goal \u003d self.client.show_goal(\"dummy\")"},{"line_number":212,"context_line":"        _, strategy \u003d self.client.show_strategy(\"dummy\")"},{"line_number":213,"context_line":"        _, audit_template \u003d self.create_audit_template("},{"line_number":214,"context_line":"            goal[\u0027uuid\u0027], strategy\u003dstrategy[\u0027uuid\u0027])"},{"line_number":215,"context_line":"        cron_expr \u003d \u0027*/5 * * * *\u0027  # every 5 minutes"},{"line_number":216,"context_line":"        audit_params \u003d dict("},{"line_number":217,"context_line":"            audit_template_uuid\u003daudit_template[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f212042_253bfc1b","line":214,"updated":"2025-10-03 14:18:40.000000000","message":"create_audit_template and create_audit are note interally clening up the audits today so the thest need to do it instead.\n\nideally you woudl just fix them ot handle the delete internally by using add_cleanup\n\nhttps://docs.openstack.org/tempest/latest/HACKING.html#test-fixtures-and-resources\n\n```\nTest level resources should be cleaned-up after the test execution. Clean-up is best scheduled using addCleanup which ensures that the resource cleanup code is always invoked, and in reverse order with respect to the creation order.\n\nTest class level resources should be defined in the resource_setup method of the test class, except for any credential obtained from the credentials provider, which should be set-up in the setup_credentials method. Cleanup is best scheduled using addClassResourceCleanup which ensures that the cleanup code is always invoked, and in reverse order with respect to the creation order.\n\nIn both cases - test level and class level cleanups - a wait loop should be scheduled before the actual delete of resources with an asynchronous delete.\n\nThe test base class BaseTestCase defines Tempest framework for class level fixtures. setUpClass and tearDownClass are defined here and cannot be overwritten by subclasses (enforced via hacking rule T105).\n\nSet-up is split in a series of steps (setup stages), which can be overwritten by test classes. Set-up stages are:\n\n    skip_checks\n\n    setup_credentials\n\n    setup_clients\n\n    resource_setup\n\nTear-down is also split in a series of steps (teardown stages), which are stacked for execution only if the corresponding setup stage had been reached during the setup phase. Tear-down stages are:\n\n    clear_credentials (defined in the base test class)\n\n    resource_cleanup\n```\n\nwe shoudl be following that same styl guiance in this plugin.\n\ni think we shoudl fix this before making the isseu worse by addign new tests.","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"21f3b8254660dff8dc1d2cfd7b8f7c9b98070b3c","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        _, goal \u003d self.client.show_goal(\"dummy\")"},{"line_number":212,"context_line":"        _, strategy \u003d self.client.show_strategy(\"dummy\")"},{"line_number":213,"context_line":"        _, audit_template \u003d self.create_audit_template("},{"line_number":214,"context_line":"            goal[\u0027uuid\u0027], strategy\u003dstrategy[\u0027uuid\u0027])"},{"line_number":215,"context_line":"        cron_expr \u003d \u0027*/5 * * * *\u0027  # every 5 minutes"},{"line_number":216,"context_line":"        audit_params \u003d dict("},{"line_number":217,"context_line":"            audit_template_uuid\u003daudit_template[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"8b0b2673_6d33aa26","line":214,"in_reply_to":"200b7c21_1dfbb02f","updated":"2025-11-07 21:05:54.000000000","message":"Acknowledged","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"4079a7f3b2bb28dc1e6af8cae828cd6f26805e79","unresolved":true,"context_lines":[{"line_number":211,"context_line":"        _, goal \u003d self.client.show_goal(\"dummy\")"},{"line_number":212,"context_line":"        _, strategy \u003d self.client.show_strategy(\"dummy\")"},{"line_number":213,"context_line":"        _, audit_template \u003d self.create_audit_template("},{"line_number":214,"context_line":"            goal[\u0027uuid\u0027], strategy\u003dstrategy[\u0027uuid\u0027])"},{"line_number":215,"context_line":"        cron_expr \u003d \u0027*/5 * * * *\u0027  # every 5 minutes"},{"line_number":216,"context_line":"        audit_params \u003d dict("},{"line_number":217,"context_line":"            audit_template_uuid\u003daudit_template[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"200b7c21_1dfbb02f","line":214,"in_reply_to":"5f212042_253bfc1b","updated":"2025-10-06 10:36:10.000000000","message":"Thank you Sean for the reviews. I have added self.addCleanup for audit and audittemplate for each tests.\n\nSince create_audit and create_audit_template are classmethod and self.addCleanup is an instance method, So I have to add self.addCleanup method in each test where ever we are creating the resources.\n\nI am not sure I am doing it correctly.\n\nHere https://github.com/openstack/watcher-tempest-plugin/blob/master/watcher_tempest_plugin/tests/api/admin/base.py#L132 we have resource_cleanup which should take care of cleaning up all the created resources. Need your help here.","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"6d4539eac792eba48c3773961d90fbbf14639ab4","unresolved":true,"context_lines":[{"line_number":229,"context_line":"        _, audit \u003d self.client.show_audit(body[\u0027uuid\u0027])"},{"line_number":230,"context_line":"        self.assert_expected(audit, body)"},{"line_number":231,"context_line":"        # Clean up by cancelling the audit"},{"line_number":232,"context_line":"        _, audit \u003d self.update_audit("},{"line_number":233,"context_line":"            body[\u0027uuid\u0027],"},{"line_number":234,"context_line":"            [{\u0027op\u0027: \u0027replace\u0027, \u0027path\u0027: \u0027/state\u0027, \u0027value\u0027: \u0027CANCELLED\u0027}]"},{"line_number":235,"context_line":"        )"},{"line_number":236,"context_line":"        test_utils.call_until_true("},{"line_number":237,"context_line":"            func\u003dfunctools.partial("},{"line_number":238,"context_line":"                self.is_audit_idle, body[\u0027uuid\u0027]),"}],"source_content_type":"text/x-python","patch_set":19,"id":"29f55bb8_b241b95d","line":235,"range":{"start_line":232,"start_character":0,"end_line":235,"end_character":9},"updated":"2025-09-23 17:22:44.000000000","message":"yeah, I was doing the same in the scenario test. I think we can improve de deletion method in the future, by auto-cancelling audits before deleting them. But something to another patch, where we can discuss more","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"5e2f9f08d3440a6fb687a17cbc975119d59e54a1","unresolved":true,"context_lines":[{"line_number":229,"context_line":"        _, audit \u003d self.client.show_audit(body[\u0027uuid\u0027])"},{"line_number":230,"context_line":"        self.assert_expected(audit, body)"},{"line_number":231,"context_line":"        # Clean up by cancelling the audit"},{"line_number":232,"context_line":"        _, audit \u003d self.update_audit("},{"line_number":233,"context_line":"            body[\u0027uuid\u0027],"},{"line_number":234,"context_line":"            [{\u0027op\u0027: \u0027replace\u0027, \u0027path\u0027: \u0027/state\u0027, \u0027value\u0027: \u0027CANCELLED\u0027}]"},{"line_number":235,"context_line":"        )"},{"line_number":236,"context_line":"        test_utils.call_until_true("},{"line_number":237,"context_line":"            func\u003dfunctools.partial("},{"line_number":238,"context_line":"                self.is_audit_idle, body[\u0027uuid\u0027]),"}],"source_content_type":"text/x-python","patch_set":19,"id":"2c6136a1_8fe4deae","line":235,"range":{"start_line":232,"start_character":0,"end_line":235,"end_character":9},"in_reply_to":"29f55bb8_b241b95d","updated":"2025-10-08 17:50:30.000000000","message":"with the updated cleanup method, do we need to keep this?","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"0875d5104931d2eea5cc6d0a4e3f04b938e3410d","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        _, audit \u003d self.client.show_audit(body[\u0027uuid\u0027])"},{"line_number":230,"context_line":"        self.assert_expected(audit, body)"},{"line_number":231,"context_line":"        # Clean up by cancelling the audit"},{"line_number":232,"context_line":"        _, audit \u003d self.update_audit("},{"line_number":233,"context_line":"            body[\u0027uuid\u0027],"},{"line_number":234,"context_line":"            [{\u0027op\u0027: \u0027replace\u0027, \u0027path\u0027: \u0027/state\u0027, \u0027value\u0027: \u0027CANCELLED\u0027}]"},{"line_number":235,"context_line":"        )"},{"line_number":236,"context_line":"        test_utils.call_until_true("},{"line_number":237,"context_line":"            func\u003dfunctools.partial("},{"line_number":238,"context_line":"                self.is_audit_idle, body[\u0027uuid\u0027]),"}],"source_content_type":"text/x-python","patch_set":19,"id":"d406f6b1_7ea18aa6","line":235,"range":{"start_line":232,"start_character":0,"end_line":235,"end_character":9},"in_reply_to":"2c6136a1_8fe4deae","updated":"2025-10-09 14:22:54.000000000","message":"Done","commit_id":"7dba7ed664cdb609300d8ee9ce35fbda7787e355"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"5e2f9f08d3440a6fb687a17cbc975119d59e54a1","unresolved":true,"context_lines":[{"line_number":273,"context_line":"        _, audit_template \u003d self.create_audit_template(goal[\u0027uuid\u0027])"},{"line_number":274,"context_line":"        self.addCleanup(self.delete_audit_template, audit_template[\u0027uuid\u0027])"},{"line_number":275,"context_line":"        # Set start time to current time + 1 minute"},{"line_number":276,"context_line":"        start_time \u003d datetime.utcnow() + timedelta(minutes\u003d1)"},{"line_number":277,"context_line":"        # Set end time to current time + 1 hour"},{"line_number":278,"context_line":"        end_time \u003d datetime.utcnow() + timedelta(hours\u003d1)"},{"line_number":279,"context_line":"        start_time_str \u003d start_time.strftime(\"%Y-%m-%dT%H:%M:%S\")"}],"source_content_type":"text/x-python","patch_set":24,"id":"af3f5e1c_4a86f0e1","line":276,"range":{"start_line":276,"start_character":30,"end_line":276,"end_character":36},"updated":"2025-10-08 17:50:30.000000000","message":"DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        _, audit_template \u003d self.create_audit_template(goal[\u0027uuid\u0027])"},{"line_number":274,"context_line":"        self.addCleanup(self.delete_audit_template, audit_template[\u0027uuid\u0027])"},{"line_number":275,"context_line":"        # Set start time to current time + 1 minute"},{"line_number":276,"context_line":"        start_time \u003d datetime.utcnow() + timedelta(minutes\u003d1)"},{"line_number":277,"context_line":"        # Set end time to current time + 1 hour"},{"line_number":278,"context_line":"        end_time \u003d datetime.utcnow() + timedelta(hours\u003d1)"},{"line_number":279,"context_line":"        start_time_str \u003d start_time.strftime(\"%Y-%m-%dT%H:%M:%S\")"}],"source_content_type":"text/x-python","patch_set":24,"id":"57913217_ef34aa1c","line":276,"range":{"start_line":276,"start_character":30,"end_line":276,"end_character":36},"in_reply_to":"af3f5e1c_4a86f0e1","updated":"2025-11-25 07:01:33.000000000","message":"Done","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"5e2f9f08d3440a6fb687a17cbc975119d59e54a1","unresolved":true,"context_lines":[{"line_number":300,"context_line":"        _, audit \u003d self.client.show_audit(body[\u0027uuid\u0027])"},{"line_number":301,"context_line":"        self.assert_expected(audit, body)"},{"line_number":302,"context_line":"        # Clean up by cancelling the audit"},{"line_number":303,"context_line":"        _, audit \u003d self.update_audit("},{"line_number":304,"context_line":"            body[\u0027uuid\u0027],"},{"line_number":305,"context_line":"            [{\u0027op\u0027: \u0027replace\u0027, \u0027path\u0027: \u0027/state\u0027, \u0027value\u0027: \u0027CANCELLED\u0027}]"},{"line_number":306,"context_line":"        )"},{"line_number":307,"context_line":"        test_utils.call_until_true("},{"line_number":308,"context_line":"            func\u003dfunctools.partial("},{"line_number":309,"context_line":"                self.is_audit_idle, body[\u0027uuid\u0027]),"},{"line_number":310,"context_line":"            duration\u003d10,"},{"line_number":311,"context_line":"            sleep_for\u003d.5"},{"line_number":312,"context_line":"        )"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"class TestCreateUpdateDeleteAuditV14(base.BaseInfraOptimTest):"}],"source_content_type":"text/x-python","patch_set":24,"id":"36e2847e_dc0c32dc","line":312,"range":{"start_line":303,"start_character":0,"end_line":312,"end_character":9},"updated":"2025-10-08 17:50:30.000000000","message":"if is not needed, we can remove, otherwise, we could create a method for cancelling audit instead.","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"0875d5104931d2eea5cc6d0a4e3f04b938e3410d","unresolved":true,"context_lines":[{"line_number":300,"context_line":"        _, audit \u003d self.client.show_audit(body[\u0027uuid\u0027])"},{"line_number":301,"context_line":"        self.assert_expected(audit, body)"},{"line_number":302,"context_line":"        # Clean up by cancelling the audit"},{"line_number":303,"context_line":"        _, audit \u003d self.update_audit("},{"line_number":304,"context_line":"            body[\u0027uuid\u0027],"},{"line_number":305,"context_line":"            [{\u0027op\u0027: \u0027replace\u0027, \u0027path\u0027: \u0027/state\u0027, \u0027value\u0027: \u0027CANCELLED\u0027}]"},{"line_number":306,"context_line":"        )"},{"line_number":307,"context_line":"        test_utils.call_until_true("},{"line_number":308,"context_line":"            func\u003dfunctools.partial("},{"line_number":309,"context_line":"                self.is_audit_idle, body[\u0027uuid\u0027]),"},{"line_number":310,"context_line":"            duration\u003d10,"},{"line_number":311,"context_line":"            sleep_for\u003d.5"},{"line_number":312,"context_line":"        )"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"class TestCreateUpdateDeleteAuditV14(base.BaseInfraOptimTest):"}],"source_content_type":"text/x-python","patch_set":24,"id":"6195f016_48743aca","line":312,"range":{"start_line":303,"start_character":0,"end_line":312,"end_character":9},"in_reply_to":"36e2847e_dc0c32dc","updated":"2025-10-09 14:22:54.000000000","message":"Moved","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        _, audit \u003d self.client.show_audit(body[\u0027uuid\u0027])"},{"line_number":301,"context_line":"        self.assert_expected(audit, body)"},{"line_number":302,"context_line":"        # Clean up by cancelling the audit"},{"line_number":303,"context_line":"        _, audit \u003d self.update_audit("},{"line_number":304,"context_line":"            body[\u0027uuid\u0027],"},{"line_number":305,"context_line":"            [{\u0027op\u0027: \u0027replace\u0027, \u0027path\u0027: \u0027/state\u0027, \u0027value\u0027: \u0027CANCELLED\u0027}]"},{"line_number":306,"context_line":"        )"},{"line_number":307,"context_line":"        test_utils.call_until_true("},{"line_number":308,"context_line":"            func\u003dfunctools.partial("},{"line_number":309,"context_line":"                self.is_audit_idle, body[\u0027uuid\u0027]),"},{"line_number":310,"context_line":"            duration\u003d10,"},{"line_number":311,"context_line":"            sleep_for\u003d.5"},{"line_number":312,"context_line":"        )"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"class TestCreateUpdateDeleteAuditV14(base.BaseInfraOptimTest):"}],"source_content_type":"text/x-python","patch_set":24,"id":"76b921ba_0a8d6fc0","line":312,"range":{"start_line":303,"start_character":0,"end_line":312,"end_character":9},"in_reply_to":"6195f016_48743aca","updated":"2025-11-25 07:01:33.000000000","message":"Done","commit_id":"a592c9f14d81c5dbe7f43c95101cc1f25fab3620"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"2dd1765d1c0b99c682a5da8310d1e00500bd732e","unresolved":true,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from datetime import datetime"},{"line_number":20,"context_line":"from datetime import timedelta"},{"line_number":21,"context_line":"try:"},{"line_number":22,"context_line":"    from datetime import UTC"},{"line_number":23,"context_line":"except ImportError:"},{"line_number":24,"context_line":"    # For Python \u003c 3.11 compatibility"},{"line_number":25,"context_line":"    from datetime import timezone"},{"line_number":26,"context_line":"    UTC \u003d timezone.utc"},{"line_number":27,"context_line":"from tempest.lib.common.utils import test_utils"},{"line_number":28,"context_line":"from tempest.lib import decorators"},{"line_number":29,"context_line":"from tempest.lib import exceptions"}],"source_content_type":"text/x-python","patch_set":27,"id":"a3f03e1f_6cb3bc35","line":26,"range":{"start_line":21,"start_character":0,"end_line":26,"end_character":22},"updated":"2025-10-10 13:50:28.000000000","message":"right, tempest is branchless and we need to support multiple versions\n😞","commit_id":"bb035be6204cba8679834255c300220b1d6f6832"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from datetime import datetime"},{"line_number":20,"context_line":"from datetime import timedelta"},{"line_number":21,"context_line":"try:"},{"line_number":22,"context_line":"    from datetime import UTC"},{"line_number":23,"context_line":"except ImportError:"},{"line_number":24,"context_line":"    # For Python \u003c 3.11 compatibility"},{"line_number":25,"context_line":"    from datetime import timezone"},{"line_number":26,"context_line":"    UTC \u003d timezone.utc"},{"line_number":27,"context_line":"from tempest.lib.common.utils import test_utils"},{"line_number":28,"context_line":"from tempest.lib import decorators"},{"line_number":29,"context_line":"from tempest.lib import exceptions"}],"source_content_type":"text/x-python","patch_set":27,"id":"204b210b_5bfad9b6","line":26,"range":{"start_line":21,"start_character":0,"end_line":26,"end_character":22},"in_reply_to":"0bd951c2_e875bed1","updated":"2025-11-25 07:01:33.000000000","message":"Acknowledged","commit_id":"bb035be6204cba8679834255c300220b1d6f6832"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from datetime import datetime"},{"line_number":20,"context_line":"from datetime import timedelta"},{"line_number":21,"context_line":"try:"},{"line_number":22,"context_line":"    from datetime import UTC"},{"line_number":23,"context_line":"except ImportError:"},{"line_number":24,"context_line":"    # For Python \u003c 3.11 compatibility"},{"line_number":25,"context_line":"    from datetime import timezone"},{"line_number":26,"context_line":"    UTC \u003d timezone.utc"},{"line_number":27,"context_line":"from tempest.lib.common.utils import test_utils"},{"line_number":28,"context_line":"from tempest.lib import decorators"},{"line_number":29,"context_line":"from tempest.lib import exceptions"}],"source_content_type":"text/x-python","patch_set":27,"id":"0bd951c2_e875bed1","line":26,"range":{"start_line":21,"start_character":0,"end_line":26,"end_character":22},"in_reply_to":"a3f03e1f_6cb3bc35","updated":"2025-11-11 12:48:10.000000000","message":"well this is not related to tempst this is realted to the testing runtime sand we have to supprot python 3.10 on master because fo that.\nso this woudl be required even if tempest was branched.\n\nhttps://github.com/openstack/governance/blob/master/reference/runtimes/2026.1.rst#python","commit_id":"bb035be6204cba8679834255c300220b1d6f6832"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[{"line_number":48,"context_line":"    def test_create_audit_oneshot(self):"},{"line_number":49,"context_line":"        _, goal \u003d self.client.show_goal(\"dummy\")"},{"line_number":50,"context_line":"        _, audit_template \u003d self.create_audit_template(goal[\u0027uuid\u0027])"},{"line_number":51,"context_line":"        self.addCleanup(self.delete_audit_template, audit_template[\u0027uuid\u0027])"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        audit_params \u003d dict("},{"line_number":54,"context_line":"            audit_template_uuid\u003daudit_template[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":33,"id":"ba345bea_09dea7d6","line":51,"updated":"2025-11-11 12:48:10.000000000","message":"self.create_audit_template shoudl be doign the template cleanup.\n\nthis si ok for now but shoudl be fixed in a followup.\n\nif we want to have a secodn _create_audit_template that does not do the add cleanup that fine but the default behvaior fo create_audit_template shoudl be to register the template cleanup.","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def test_create_audit_oneshot(self):"},{"line_number":49,"context_line":"        _, goal \u003d self.client.show_goal(\"dummy\")"},{"line_number":50,"context_line":"        _, audit_template \u003d self.create_audit_template(goal[\u0027uuid\u0027])"},{"line_number":51,"context_line":"        self.addCleanup(self.delete_audit_template, audit_template[\u0027uuid\u0027])"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        audit_params \u003d dict("},{"line_number":54,"context_line":"            audit_template_uuid\u003daudit_template[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":33,"id":"e9602acc_413d2360","line":51,"in_reply_to":"ba345bea_09dea7d6","updated":"2025-11-25 07:01:33.000000000","message":"moved the code as a part of https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/967522/15?usp\u003drelated-change","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[{"line_number":56,"context_line":"            name\u003d\u0027audit_oneshot\u0027,"},{"line_number":57,"context_line":"        )"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        _, body \u003d self.create_audit(**audit_params)"},{"line_number":60,"context_line":"        self.addCleanup(self.delete_audit, body[\u0027uuid\u0027])"},{"line_number":61,"context_line":"        audit_params.pop(\u0027audit_template_uuid\u0027)"},{"line_number":62,"context_line":"        audit_params[\u0027goal_uuid\u0027] \u003d goal[\u0027uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"065585dd_fd5ed766","line":59,"updated":"2025-11-11 12:48:10.000000000","message":"the same is true for create_audit","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            name\u003d\u0027audit_oneshot\u0027,"},{"line_number":57,"context_line":"        )"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        _, body \u003d self.create_audit(**audit_params)"},{"line_number":60,"context_line":"        self.addCleanup(self.delete_audit, body[\u0027uuid\u0027])"},{"line_number":61,"context_line":"        audit_params.pop(\u0027audit_template_uuid\u0027)"},{"line_number":62,"context_line":"        audit_params[\u0027goal_uuid\u0027] \u003d goal[\u0027uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"f2c7a5d5_f7570ae9","line":59,"in_reply_to":"065585dd_fd5ed766","updated":"2025-11-25 07:01:33.000000000","message":"https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/967522/15?usp\u003drelated-change","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        self.assertTrue(is_audit_deleted(audit_uuid))"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":215,"context_line":"    @decorators.idempotent_id(\u0027c7a5e9f2-6b4c-4e5a-9d2e-1a0b3c4d5e6f\u0027)"},{"line_number":216,"context_line":"    def test_create_continuous_audit_with_crontab_interval(self):"},{"line_number":217,"context_line":"        \"\"\"Test creating continuous audit with crontab-style interval\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"40f977fc_1fe8b680","line":214,"updated":"2025-11-11 12:48:10.000000000","message":"in general we shoudl have a very small number of smoke test to porve out the basic funcaitonlaty of the service.\n\nso we shoudl not just atge all api tesst with smoke\n\n1 per type of audit is more then enough.\n\nso this is fine as a smoke test for continous audits","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        self.assertTrue(is_audit_deleted(audit_uuid))"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":215,"context_line":"    @decorators.idempotent_id(\u0027c7a5e9f2-6b4c-4e5a-9d2e-1a0b3c4d5e6f\u0027)"},{"line_number":216,"context_line":"    def test_create_continuous_audit_with_crontab_interval(self):"},{"line_number":217,"context_line":"        \"\"\"Test creating continuous audit with crontab-style interval\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"8932c449_163c9bb4","line":214,"in_reply_to":"40f977fc_1fe8b680","updated":"2025-11-25 07:01:33.000000000","message":"Done","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[{"line_number":250,"context_line":"        super(TestCreateUpdateDeleteAuditV11, self).assert_expected("},{"line_number":251,"context_line":"            expected, actual, keys)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":254,"context_line":"    @decorators.idempotent_id(\u00274f8a2c1e-6b3d-4e5a-9c7b-1a2e3f4d5c6b\u0027)"},{"line_number":255,"context_line":"    def test_create_continuous_audit_with_start_end_time(self):"},{"line_number":256,"context_line":"        \"\"\"Test creating continuous audit with start_time and end_time\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"f21552ba_7d2faa06","line":253,"updated":"2025-11-11 12:48:10.000000000","message":"but this should not be tagged as smoke.","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"a4711a25d6f00abd3af23592434e61084bbb9238","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        super(TestCreateUpdateDeleteAuditV11, self).assert_expected("},{"line_number":251,"context_line":"            expected, actual, keys)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":254,"context_line":"    @decorators.idempotent_id(\u00274f8a2c1e-6b3d-4e5a-9c7b-1a2e3f4d5c6b\u0027)"},{"line_number":255,"context_line":"    def test_create_continuous_audit_with_start_end_time(self):"},{"line_number":256,"context_line":"        \"\"\"Test creating continuous audit with start_time and end_time\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"34c5ae8d_9457c811","line":253,"in_reply_to":"f21552ba_7d2faa06","updated":"2025-11-25 11:34:54.000000000","message":"Acknowledged","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    min_microversion \u003d \u00271.4\u0027"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":295,"context_line":"    @decorators.idempotent_id(\u0027f26573d6-4020-4971-8868-495bffde982e\u0027)"},{"line_number":296,"context_line":"    def test_create_audit_event(self):"},{"line_number":297,"context_line":"        \"\"\"Test Event Audit\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"f7d525f7_696557e5","line":294,"updated":"2025-11-11 12:48:10.000000000","message":"again its fien to have 1 smoke test for event based audits but in genreal \nthe deifnition fo the smoke atribute is \n\n```\nSmoke Attribute\n\nThe type\u003d\u0027smoke\u0027 attribute is used to signify that a test is a so-called smoke test, which is a type of test that tests the most vital OpenStack functionality, like listing servers or flavors or creating volumes. The attribute should be sparingly applied to only the tests that sanity-check the most essential functionality of an OpenStack cloud.\n```\n\nwe don\u0027t really expect there to be a lot of smoke test and addition it to each type of audit is probably incorrect so \n\ntechinaly haveing even one smoke test to create an audit si enough to sanity check that audits can be created, 2 is ok 3 or 4 smoke tests that creeat audits is incorect.\n\nwe already have too many test tagged with smoke today so we likely shold not add more and may want to remvoe some of the existing smoke atibutes.","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":false,"context_lines":[{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    min_microversion \u003d \u00271.4\u0027"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":295,"context_line":"    @decorators.idempotent_id(\u0027f26573d6-4020-4971-8868-495bffde982e\u0027)"},{"line_number":296,"context_line":"    def test_create_audit_event(self):"},{"line_number":297,"context_line":"        \"\"\"Test Event Audit\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"b52a38a8_306c41a6","line":294,"in_reply_to":"f7d525f7_696557e5","updated":"2025-11-25 07:01:33.000000000","message":"Acknowledged","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8f1bdce76988bb65f76b5e379d927a8cf4a7b781","unresolved":true,"context_lines":[{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        _, audit \u003d self.client.show_audit(body[\u0027uuid\u0027])"},{"line_number":319,"context_line":"        self.assertEqual(audit[\u0027state\u0027], \u0027CANCELLED\u0027)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"class TestShowListAudit(base.BaseInfraOptimTest):"},{"line_number":323,"context_line":"    \"\"\"Tests for audit.\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"bb9d3103_29c766e7","line":320,"updated":"2025-11-11 12:48:10.000000000","message":"you had a lot mote test coverage in \n\nhttps://review.opendev.org/c/openstack/watcher-tempest-plugin/+/955472/11/watcher_tempest_plugin/tests/scenario/test_continuous_audit.py#255\n\n\nyou should either incoude those tests in thsi patch as well or restore them in the other patch.","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"a4711a25d6f00abd3af23592434e61084bbb9238","unresolved":false,"context_lines":[{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        _, audit \u003d self.client.show_audit(body[\u0027uuid\u0027])"},{"line_number":319,"context_line":"        self.assertEqual(audit[\u0027state\u0027], \u0027CANCELLED\u0027)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"class TestShowListAudit(base.BaseInfraOptimTest):"},{"line_number":323,"context_line":"    \"\"\"Tests for audit.\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"e4582491_c2266dc7","line":320,"in_reply_to":"59a975cc_11d77f46","updated":"2025-11-25 11:34:54.000000000","message":"Done","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c6f85cf34177c9757af98b87aad800ea8728e8ec","unresolved":true,"context_lines":[{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        _, audit \u003d self.client.show_audit(body[\u0027uuid\u0027])"},{"line_number":319,"context_line":"        self.assertEqual(audit[\u0027state\u0027], \u0027CANCELLED\u0027)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"class TestShowListAudit(base.BaseInfraOptimTest):"},{"line_number":323,"context_line":"    \"\"\"Tests for audit.\"\"\""}],"source_content_type":"text/x-python","patch_set":33,"id":"59a975cc_11d77f46","line":320,"in_reply_to":"bb9d3103_29c766e7","updated":"2025-11-25 07:01:33.000000000","message":"I have restored these tests in current api coverage patch.","commit_id":"36bf4fdab86d24c8bd42b09b21419e267b66ba28"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dce60bd23db42de01455641e03fb8402e949eb24","unresolved":true,"context_lines":[{"line_number":14,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":15,"context_line":"# limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import functools"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from datetime import datetime"},{"line_number":20,"context_line":"from datetime import timedelta"},{"line_number":21,"context_line":"try:"},{"line_number":22,"context_line":"    from datetime import UTC"},{"line_number":23,"context_line":"except ImportError:"},{"line_number":24,"context_line":"    # For Python \u003c 3.11 compatibility"},{"line_number":25,"context_line":"    from datetime import timezone"},{"line_number":26,"context_line":"    UTC \u003d timezone.utc"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from tempest.lib.common.utils import test_utils"},{"line_number":30,"context_line":"from tempest.lib import decorators"}],"source_content_type":"text/x-python","patch_set":36,"id":"e2330b42_66e0f218","line":27,"range":{"start_line":17,"start_character":0,"end_line":27,"end_character":1},"updated":"2025-11-25 18:54:48.000000000","message":"```suggestion\nimport functools\n\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom datetime import timezone\n```\n\nthen just do timezone.UTC where its needed\n\ndatetime.UTC was added in 3.11 but its just an alias of\ndatetime.timezone.UTC\n\nthey did not remove that and its not deprecated so let just use that directly\nto aovid the need to deal with python versions.\n\nwe can consider adopting datetime.UTC when we drop python 3.10 supprot but i dont see a reason to add this complextiy today","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"0d7cc9e46662dafe3644bee50ee10d5146312419","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":15,"context_line":"# limitations under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import functools"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from datetime import datetime"},{"line_number":20,"context_line":"from datetime import timedelta"},{"line_number":21,"context_line":"try:"},{"line_number":22,"context_line":"    from datetime import UTC"},{"line_number":23,"context_line":"except ImportError:"},{"line_number":24,"context_line":"    # For Python \u003c 3.11 compatibility"},{"line_number":25,"context_line":"    from datetime import timezone"},{"line_number":26,"context_line":"    UTC \u003d timezone.utc"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from tempest.lib.common.utils import test_utils"},{"line_number":30,"context_line":"from tempest.lib import decorators"}],"source_content_type":"text/x-python","patch_set":36,"id":"b04ee46d_819478e2","line":27,"range":{"start_line":17,"start_character":0,"end_line":27,"end_character":1},"in_reply_to":"e2330b42_66e0f218","updated":"2025-11-26 05:24:11.000000000","message":"Done","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dce60bd23db42de01455641e03fb8402e949eb24","unresolved":true,"context_lines":[{"line_number":233,"context_line":"        _, goal \u003d self.client.show_goal(\"dummy\")"},{"line_number":234,"context_line":"        _, audit_template \u003d self.create_audit_template(goal[\u0027uuid\u0027])"},{"line_number":235,"context_line":"        # Set start time to current time + 10 seconds"},{"line_number":236,"context_line":"        start_time \u003d datetime.now(UTC) + timedelta(seconds\u003d10)"},{"line_number":237,"context_line":"        # Set end time to current time + 1 hour"},{"line_number":238,"context_line":"        end_time \u003d datetime.now(UTC) + timedelta(hours\u003d1)"},{"line_number":239,"context_line":"        start_time_str \u003d start_time.strftime(\"%Y-%m-%dT%H:%M:%S\")"}],"source_content_type":"text/x-python","patch_set":36,"id":"185caeda_bc365c38","line":236,"range":{"start_line":236,"start_character":21,"end_line":236,"end_character":38},"updated":"2025-11-25 18:54:48.000000000","message":"datetime.now(tz\u003dtimezone.utc)","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"0d7cc9e46662dafe3644bee50ee10d5146312419","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        _, goal \u003d self.client.show_goal(\"dummy\")"},{"line_number":234,"context_line":"        _, audit_template \u003d self.create_audit_template(goal[\u0027uuid\u0027])"},{"line_number":235,"context_line":"        # Set start time to current time + 10 seconds"},{"line_number":236,"context_line":"        start_time \u003d datetime.now(UTC) + timedelta(seconds\u003d10)"},{"line_number":237,"context_line":"        # Set end time to current time + 1 hour"},{"line_number":238,"context_line":"        end_time \u003d datetime.now(UTC) + timedelta(hours\u003d1)"},{"line_number":239,"context_line":"        start_time_str \u003d start_time.strftime(\"%Y-%m-%dT%H:%M:%S\")"}],"source_content_type":"text/x-python","patch_set":36,"id":"c87d1033_106b59a3","line":236,"range":{"start_line":236,"start_character":21,"end_line":236,"end_character":38},"in_reply_to":"185caeda_bc365c38","updated":"2025-11-26 05:24:11.000000000","message":"Done","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dce60bd23db42de01455641e03fb8402e949eb24","unresolved":true,"context_lines":[{"line_number":298,"context_line":"                               if ap.get(\u0027state\u0027) \u003d\u003d \u0027RECOMMENDED\u0027]"},{"line_number":299,"context_line":"            cancelled_aps \u003d [ap for ap in all_aps"},{"line_number":300,"context_line":"                             if ap.get(\u0027state\u0027) \u003d\u003d \u0027CANCELLED\u0027]"},{"line_number":301,"context_line":"            # Verify exactly one RECOMMENDED (the latest)"},{"line_number":302,"context_line":"            self.assertEqual(1, len(recommended_aps),"},{"line_number":303,"context_line":"                             \"Should have exactly 1 RECOMMENDED action plan\")"},{"line_number":304,"context_line":"            # Verify at least one CANCELLED (previous ones)"},{"line_number":305,"context_line":"            self.assertGreaterEqual(len(cancelled_aps), 1,"},{"line_number":306,"context_line":"                                    \"Should have at least 1 CANCELLED \""},{"line_number":307,"context_line":"                                    \"action plan\")"},{"line_number":308,"context_line":"        except ValueError:"},{"line_number":309,"context_line":"            self.skipTest(\"Only one action plan created, superseding test \""},{"line_number":310,"context_line":"                          \"skipped\")"}],"source_content_type":"text/x-python","patch_set":36,"id":"fcb0dcde_5d75cac6","line":307,"range":{"start_line":301,"start_character":1,"end_line":307,"end_character":50},"updated":"2025-11-25 18:54:48.000000000","message":"your not assertign the the one that is recommed it the latest action plan.","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"0d7cc9e46662dafe3644bee50ee10d5146312419","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                               if ap.get(\u0027state\u0027) \u003d\u003d \u0027RECOMMENDED\u0027]"},{"line_number":299,"context_line":"            cancelled_aps \u003d [ap for ap in all_aps"},{"line_number":300,"context_line":"                             if ap.get(\u0027state\u0027) \u003d\u003d \u0027CANCELLED\u0027]"},{"line_number":301,"context_line":"            # Verify exactly one RECOMMENDED (the latest)"},{"line_number":302,"context_line":"            self.assertEqual(1, len(recommended_aps),"},{"line_number":303,"context_line":"                             \"Should have exactly 1 RECOMMENDED action plan\")"},{"line_number":304,"context_line":"            # Verify at least one CANCELLED (previous ones)"},{"line_number":305,"context_line":"            self.assertGreaterEqual(len(cancelled_aps), 1,"},{"line_number":306,"context_line":"                                    \"Should have at least 1 CANCELLED \""},{"line_number":307,"context_line":"                                    \"action plan\")"},{"line_number":308,"context_line":"        except ValueError:"},{"line_number":309,"context_line":"            self.skipTest(\"Only one action plan created, superseding test \""},{"line_number":310,"context_line":"                          \"skipped\")"}],"source_content_type":"text/x-python","patch_set":36,"id":"56475910_6ed0e84b","line":307,"range":{"start_line":301,"start_character":1,"end_line":307,"end_character":50},"in_reply_to":"fcb0dcde_5d75cac6","updated":"2025-11-26 05:24:11.000000000","message":"Done","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dce60bd23db42de01455641e03fb8402e949eb24","unresolved":true,"context_lines":[{"line_number":307,"context_line":"                                    \"action plan\")"},{"line_number":308,"context_line":"        except ValueError:"},{"line_number":309,"context_line":"            self.skipTest(\"Only one action plan created, superseding test \""},{"line_number":310,"context_line":"                          \"skipped\")"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    @decorators.idempotent_id(\u0027d4e5f678-9012-3456-def0-456789012345\u0027)"},{"line_number":313,"context_line":"    def test_continuous_audit_interval_updates(self):"}],"source_content_type":"text/x-python","patch_set":36,"id":"26855cba_1f7affec","line":310,"updated":"2025-11-25 18:54:48.000000000","message":"skipTest shoudl very very rarely be used.\n\nthse seams like a logic bgu to me.","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"0d7cc9e46662dafe3644bee50ee10d5146312419","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                                    \"action plan\")"},{"line_number":308,"context_line":"        except ValueError:"},{"line_number":309,"context_line":"            self.skipTest(\"Only one action plan created, superseding test \""},{"line_number":310,"context_line":"                          \"skipped\")"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    @decorators.idempotent_id(\u0027d4e5f678-9012-3456-def0-456789012345\u0027)"},{"line_number":313,"context_line":"    def test_continuous_audit_interval_updates(self):"}],"source_content_type":"text/x-python","patch_set":36,"id":"28363217_7c7bb8b6","line":310,"in_reply_to":"26855cba_1f7affec","updated":"2025-11-26 05:24:11.000000000","message":"removed!","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dce60bd23db42de01455641e03fb8402e949eb24","unresolved":true,"context_lines":[{"line_number":333,"context_line":"            {\"op\": \"replace\", \"path\": \"/interval\", \"value\": \"*/1 * * * *\"}])"},{"line_number":334,"context_line":"        _, updated_audit \u003d self.client.show_audit(audit_uuid)"},{"line_number":335,"context_line":"        self.assertEqual(\"*/1 * * * *\", updated_audit.get(\u0027interval\u0027))"},{"line_number":336,"context_line":"        # Test 2: Various crontab expression formats"},{"line_number":337,"context_line":"        test_formats \u003d ["},{"line_number":338,"context_line":"            (\"*/1 * * * *\", \"every minute\"),"},{"line_number":339,"context_line":"            (\"0 * * * *\", \"hourly\"),"}],"source_content_type":"text/x-python","patch_set":36,"id":"c2367528_2a0d164f","line":336,"range":{"start_line":336,"start_character":0,"end_line":336,"end_character":2},"updated":"2025-11-25 18:54:48.000000000","message":"this shoudld be in a sperate test.\n\nyou shoudl have one over all test per test function.\n\nif you want to do a data driven test with multiple format then you should use  ddt or subTests\n\nhttps://docs.python.org/3/library/unittest.html#unittest.TestCase.subTest or\nhttps://ddt.readthedocs.io/en/latest/example.html","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"38dc5c8ed36a50cd7e6f8467cee1868bc697779e","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            {\"op\": \"replace\", \"path\": \"/interval\", \"value\": \"*/1 * * * *\"}])"},{"line_number":334,"context_line":"        _, updated_audit \u003d self.client.show_audit(audit_uuid)"},{"line_number":335,"context_line":"        self.assertEqual(\"*/1 * * * *\", updated_audit.get(\u0027interval\u0027))"},{"line_number":336,"context_line":"        # Test 2: Various crontab expression formats"},{"line_number":337,"context_line":"        test_formats \u003d ["},{"line_number":338,"context_line":"            (\"*/1 * * * *\", \"every minute\"),"},{"line_number":339,"context_line":"            (\"0 * * * *\", \"hourly\"),"}],"source_content_type":"text/x-python","patch_set":36,"id":"490ece96_1a407d0c","line":336,"range":{"start_line":336,"start_character":0,"end_line":336,"end_character":2},"in_reply_to":"c189dbe8_08717f4d","updated":"2025-11-28 17:55:30.000000000","message":"stestr does not print subtests as nicly as weith ddt currenly but i belive they are fixing it and longterm that the better of the two approches\n\nddt is the older of the two tha twe have used in openstack for a long time\n\nso either are good chocies for this type of repetiive testing where only the parmaters change but the logic of the test is common.","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"0d7cc9e46662dafe3644bee50ee10d5146312419","unresolved":true,"context_lines":[{"line_number":333,"context_line":"            {\"op\": \"replace\", \"path\": \"/interval\", \"value\": \"*/1 * * * *\"}])"},{"line_number":334,"context_line":"        _, updated_audit \u003d self.client.show_audit(audit_uuid)"},{"line_number":335,"context_line":"        self.assertEqual(\"*/1 * * * *\", updated_audit.get(\u0027interval\u0027))"},{"line_number":336,"context_line":"        # Test 2: Various crontab expression formats"},{"line_number":337,"context_line":"        test_formats \u003d ["},{"line_number":338,"context_line":"            (\"*/1 * * * *\", \"every minute\"),"},{"line_number":339,"context_line":"            (\"0 * * * *\", \"hourly\"),"}],"source_content_type":"text/x-python","patch_set":36,"id":"c189dbe8_08717f4d","line":336,"range":{"start_line":336,"start_character":0,"end_line":336,"end_character":2},"in_reply_to":"c2367528_2a0d164f","updated":"2025-11-26 05:24:11.000000000","message":"I was not aware about subTest, Added it in the test, thank you!","commit_id":"c3d671aadcc24960922b8f3c09129c5ec6d9cf48"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"38dc5c8ed36a50cd7e6f8467cee1868bc697779e","unresolved":true,"context_lines":[{"line_number":224,"context_line":"    def assert_expected(self, expected, actual,"},{"line_number":225,"context_line":"                        keys\u003d(\u0027created_at\u0027, \u0027updated_at\u0027, \u0027next_run_time\u0027,"},{"line_number":226,"context_line":"                              \u0027deleted_at\u0027, \u0027state\u0027, \u0027hostname\u0027)):"},{"line_number":227,"context_line":"        super(TestCreateUpdateDeleteAuditV11, self).assert_expected("},{"line_number":228,"context_line":"            expected, actual, keys)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    @decorators.idempotent_id(\u00274f8a2c1e-6b3d-4e5a-9c7b-1a2e3f4d5c6b\u0027)"}],"source_content_type":"text/x-python","patch_set":37,"id":"5a4adebe_46a07b6f","line":227,"range":{"start_line":227,"start_character":8,"end_line":227,"end_character":51},"updated":"2025-11-28 17:55:30.000000000","message":"nit: dont use python2 style supper calles for new code.","commit_id":"acd50f856980e2dc97f87d1dccaaa75d7086b3d9"}]}
