)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6dd1221c618427a70ba6bde62851861e96ae09fb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"2366f160_60221a65","updated":"2025-08-13 13:42:47.000000000","message":"Attached Screenshots:\n- Continuous Audit with Start/End time: https://ibb.co/k25xxZ0K\n- Continuous Audit created: https://ibb.co/Dg1bCKHz\n- Action Plan from Audit: https://ibb.co/sJv211K6","commit_id":"1211862a4f96a90541024aa0e995d37948f9998c"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"e4a5049eb120b7b0651bd43b339f44fd176869ca","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"eccd4d26_55f0c4f0","updated":"2025-08-14 07:27:16.000000000","message":"Attached screenshot\n- Create continuous audit: https://imgur.com/wOpNioR\n\u003d Start and end time in audit info: https://imgur.com/MktVPpV","commit_id":"1211862a4f96a90541024aa0e995d37948f9998c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"3ef72c1624301b651cade9a0e000ec5deb19d1ea","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"14727c55_d61a3cfb","updated":"2025-08-13 14:41:39.000000000","message":"One more detail, we should also show start_time and end_time fields in the Audit info detailed table as in https://ibb.co/sJv211K6","commit_id":"1211862a4f96a90541024aa0e995d37948f9998c"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"44c7562cc48115d9dd86306dbb328acf9feb74c4","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"42b57a5f_c7c987ec","in_reply_to":"eccd4d26_55f0c4f0","updated":"2025-08-14 07:47:13.000000000","message":"Continuous audit start field: https://i.imgur.com/1pjFbeh.png","commit_id":"1211862a4f96a90541024aa0e995d37948f9998c"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"79796f8ed5625443f7553e312986781f7cf8545f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"284a88d6_f9746c0c","updated":"2025-08-18 14:03:17.000000000","message":"Here is the screenshot without start/end time: https://imgur.com/wZwPq4Z and Audit Info: https://imgur.com/ZcsM7fZ (Added on the bug also)\n\nScreenshot with Create continuous audit: https://imgur.com/wOpNioR and Start and end time in audit info: https://imgur.com/MktVPpV","commit_id":"bb3c2aba3076dbe7fddf10d1dd3b554b2dfb3b7a"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a0d29e03cdd4c7e00b082fe4c38917c7ed119d4e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"d35b1c31_b0d10bc9","updated":"2025-08-14 15:51:17.000000000","message":"Tested locally","commit_id":"bb3c2aba3076dbe7fddf10d1dd3b554b2dfb3b7a"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"18b1c59488ed1fd876efdcb2d5f2c96f4250d487","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"16d2a5ba_50441787","updated":"2025-08-20 11:10:15.000000000","message":"lgtm, thanks for the screenshots Chandan!","commit_id":"bb3c2aba3076dbe7fddf10d1dd3b554b2dfb3b7a"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"c463dd4073554bf49febe0f22ef6c6677382f79c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"0aac01bd_50278710","updated":"2025-08-29 17:38:12.000000000","message":"tested in my environment, looks good, thanks","commit_id":"c2ad258aacef244aa4afa0baf255e00cffdd041d"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"c4144b48_ad50a8ba","updated":"2025-09-17 15:14:05.000000000","message":"Main blocker is, it\u0027s not using version 1.1 in the audit get calls so start_time and end_time is not presented in the audit details.\n\nOther than that i have some suggestions and doubts.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"51aee244_d56fc707","updated":"2025-09-18 08:59:20.000000000","message":"thank you @amoralej@redhat.com for the review, I tried to address most of the comment. Please have a look, thank you!","commit_id":"f35dee4e9880bf12bed0a1f89f85583be9ab26ea"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"a52cc2ea9e878b3def647253a95af339ceb4aaab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"7d5102fd_e99b3113","updated":"2025-09-19 15:22:46.000000000","message":"Are we ok with moving the min api version to 1.1? It only affects audits, but there is no use of watcher without audits, so it is kind of mandatory to have at least 1.1.\nLooks good to me in the end, start and end time was added in Stein release:\n- https://docs.openstack.org/releasenotes/watcher/stein.html#new-features","commit_id":"2fe7211c5aef8b1b055020b3e06b9f3f604cdfdd"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"63d66495a99f1caa826e3bef8790d32cedde3c3e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"e288f0c0_7d914af7","in_reply_to":"7d5102fd_e99b3113","updated":"2025-09-19 16:08:50.000000000","message":"Yes, I have also added it to the release notes.","commit_id":"2fe7211c5aef8b1b055020b3e06b9f3f604cdfdd"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"d0db522a170e1939b987d034a499261129c878aa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"fad08334_d8c70f75","in_reply_to":"e288f0c0_7d914af7","updated":"2025-09-22 09:43:50.000000000","message":"+1","commit_id":"2fe7211c5aef8b1b055020b3e06b9f3f604cdfdd"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"9d11f7768ded5f7c539e4c440fe812a91ab88e4c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"8db5b3db_7323aae3","updated":"2025-09-19 16:40:56.000000000","message":"Thanks, hope that everyone also agree with that.","commit_id":"fdea25a98e23d5bd9f0cae08b9f6f838a250b130"}],"releasenotes/notes/continuous-audit-start-end-time.yaml":[{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"a52cc2ea9e878b3def647253a95af339ceb4aaab","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add support for specifying start and end times when creating CONTINUOUS"},{"line_number":5,"context_line":"    audits in the Watcher dashboard. The Create Audit form now shows"},{"line_number":6,"context_line":"    ISO 8601 local time fields \"Start time\" and \"End time\" for CONTINUOUS"},{"line_number":7,"context_line":"    audits and submits them to the Watcher API. Times are sent in ISO 8601"},{"line_number":8,"context_line":"    format and are converted to UTC by the server."}],"source_content_type":"text/x-yaml","patch_set":16,"id":"9ebbb0c0_069b288b","line":8,"range":{"start_line":4,"start_character":0,"end_line":8,"end_character":50},"updated":"2025-09-19 15:22:46.000000000","message":"So with this change we are making api 1.1 as minimal supported api version, since Audits will always need 1.1, and Audit is a main resource of watcher. Should we clarify that here?","commit_id":"2fe7211c5aef8b1b055020b3e06b9f3f604cdfdd"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"63d66495a99f1caa826e3bef8790d32cedde3c3e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add support for specifying start and end times when creating CONTINUOUS"},{"line_number":5,"context_line":"    audits in the Watcher dashboard. The Create Audit form now shows"},{"line_number":6,"context_line":"    ISO 8601 local time fields \"Start time\" and \"End time\" for CONTINUOUS"},{"line_number":7,"context_line":"    audits and submits them to the Watcher API. Times are sent in ISO 8601"},{"line_number":8,"context_line":"    format and are converted to UTC by the server."}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5d7f602e_94dde8d9","line":8,"range":{"start_line":4,"start_character":0,"end_line":8,"end_character":50},"in_reply_to":"9ebbb0c0_069b288b","updated":"2025-09-19 16:08:50.000000000","message":"Done","commit_id":"2fe7211c5aef8b1b055020b3e06b9f3f604cdfdd"}],"watcher_dashboard/api/watcher.py":[{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"04fbc2fefe0462b9c3176e87a041691859cdc769","unresolved":true,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def watcherclient(request, password\u003dNone):"},{"line_number":27,"context_line":"    api_version \u003d \"1.4\""},{"line_number":28,"context_line":"    insecure \u003d getattr(settings, \u0027OPENSTACK_SSL_NO_VERIFY\u0027, False)"},{"line_number":29,"context_line":"    ca_file \u003d getattr(settings, \u0027OPENSTACK_SSL_CACERT\u0027, None)"},{"line_number":30,"context_line":"    insert_watcher_policy_file()"}],"source_content_type":"text/x-python","patch_set":3,"id":"8f73aee6_7973eca1","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":2},"updated":"2025-08-13 14:51:22.000000000","message":"According to other dashboards, setting a fixed version in the client seems to be the approach others are doing too\n\nhttps://github.com/openstack/manila-ui/blob/master/manila_ui/api/manila.py#L31C1-L31C15\n\nSo i guess this is fine, but i\u0027d like to see other\u0027s opinions.","commit_id":"1211862a4f96a90541024aa0e995d37948f9998c"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"cb45b850ebf2e08133a0534a20c1f35ae331c05a","unresolved":true,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def watcherclient(request, password\u003dNone):"},{"line_number":27,"context_line":"    api_version \u003d \"1.4\""},{"line_number":28,"context_line":"    insecure \u003d getattr(settings, \u0027OPENSTACK_SSL_NO_VERIFY\u0027, False)"},{"line_number":29,"context_line":"    ca_file \u003d getattr(settings, \u0027OPENSTACK_SSL_CACERT\u0027, None)"},{"line_number":30,"context_line":"    insert_watcher_policy_file()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bd830fa5_227db223","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":2},"in_reply_to":"8f73aee6_7973eca1","updated":"2025-08-14 07:49:20.000000000","message":"good idea, let me do that","commit_id":"1211862a4f96a90541024aa0e995d37948f9998c"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"e400615303d66b46a6ec7f8ffb98c1d5ff185504","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def watcherclient(request, password\u003dNone):"},{"line_number":27,"context_line":"    api_version \u003d \"1.4\""},{"line_number":28,"context_line":"    insecure \u003d getattr(settings, \u0027OPENSTACK_SSL_NO_VERIFY\u0027, False)"},{"line_number":29,"context_line":"    ca_file \u003d getattr(settings, \u0027OPENSTACK_SSL_CACERT\u0027, None)"},{"line_number":30,"context_line":"    insert_watcher_policy_file()"}],"source_content_type":"text/x-python","patch_set":3,"id":"b977285d_5da44c1c","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":2},"in_reply_to":"bd830fa5_227db223","updated":"2025-08-14 07:52:10.000000000","message":"Done","commit_id":"1211862a4f96a90541024aa0e995d37948f9998c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d2d4f0c4dc861b27f09af9fb00e68accb2cb3ddc","unresolved":true,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"WATCHER_SERVICE \u003d \u0027infra-optim\u0027"},{"line_number":24,"context_line":"WATCHER_API_VERSION \u003d \"1.4\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def watcherclient(request, password\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"0b4c2ae2_c693a41d","line":24,"updated":"2025-09-04 10:28:12.000000000","message":"this is invalid.\n\nthe micorvesion shoudl be passed when creating the client and shoudl eb overrieabel on each request.\n\nyou should not use the same micorverion for all calls so factoring this out into a constant is not correct.","commit_id":"d4b9bf56e143a85c489ebbc35b72cd128de19683"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"92ad9f39fdd3364b9b70f7e90421a684a946dfcf","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"WATCHER_SERVICE \u003d \u0027infra-optim\u0027"},{"line_number":24,"context_line":"WATCHER_API_VERSION \u003d \"1.4\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def watcherclient(request, password\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"f929d7de_42aaa519","line":24,"in_reply_to":"0b4c2ae2_c693a41d","updated":"2025-09-09 08:59:21.000000000","message":"Done","commit_id":"d4b9bf56e143a85c489ebbc35b72cd128de19683"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":true,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"WATCHER_SERVICE \u003d \u0027infra-optim\u0027"},{"line_number":24,"context_line":"WATCHER_API_VERSION \u003d \"1.4\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def watcherclient(request, password\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"6723919c_e665a6fc","line":24,"in_reply_to":"249008fe_9a8eaf8d","updated":"2025-09-18 08:59:20.000000000","message":"Done now!","commit_id":"d4b9bf56e143a85c489ebbc35b72cd128de19683"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"2982737cad3b0eb22b3d7ee89d5f4799446c17b2","unresolved":true,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"WATCHER_SERVICE \u003d \u0027infra-optim\u0027"},{"line_number":24,"context_line":"WATCHER_API_VERSION \u003d \"1.4\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def watcherclient(request, password\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"249008fe_9a8eaf8d","line":24,"in_reply_to":"f929d7de_42aaa519","updated":"2025-09-16 13:29:48.000000000","message":"I think that this proposal is still incomplete. What Sean mentioned is correct, we should default to minimal here (1.0) and then we override on specific requests, that require a newer version. IIUC none of these requests are setting any microversion.","commit_id":"d4b9bf56e143a85c489ebbc35b72cd128de19683"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d2d4f0c4dc861b27f09af9fb00e68accb2cb3ddc","unresolved":true,"context_lines":[{"line_number":39,"context_line":"        watcher_url\u003dendpoint,"},{"line_number":40,"context_line":"        insecure\u003dinsecure,"},{"line_number":41,"context_line":"        ca_file\u003dca_file,"},{"line_number":42,"context_line":"        username\u003drequest.user.username,"},{"line_number":43,"context_line":"        password\u003dpassword,"},{"line_number":44,"context_line":"        os_auth_token\u003drequest.user.token.id"},{"line_number":45,"context_line":"    )"},{"line_number":46,"context_line":"    return client"}],"source_content_type":"text/x-python","patch_set":10,"id":"4d081795_0c91d394","line":43,"range":{"start_line":42,"start_character":1,"end_line":43,"end_character":26},"updated":"2025-09-04 10:28:12.000000000","message":"this is also wrong we shoudl not be using the user username and password we shoudl be using the token auth  auth method but that an existign bug.\n\nwe shoudl fix that as this will not work if the cloud is using 2 factor auth for example.\n\nthis shoudl be fixed in a seperate change however.","commit_id":"d4b9bf56e143a85c489ebbc35b72cd128de19683"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"d228a1cc483b1beb4aace8c5c5175d8344c15d5f","unresolved":true,"context_lines":[{"line_number":39,"context_line":"        watcher_url\u003dendpoint,"},{"line_number":40,"context_line":"        insecure\u003dinsecure,"},{"line_number":41,"context_line":"        ca_file\u003dca_file,"},{"line_number":42,"context_line":"        username\u003drequest.user.username,"},{"line_number":43,"context_line":"        password\u003dpassword,"},{"line_number":44,"context_line":"        os_auth_token\u003drequest.user.token.id"},{"line_number":45,"context_line":"    )"},{"line_number":46,"context_line":"    return client"}],"source_content_type":"text/x-python","patch_set":10,"id":"6fc36f8b_4e523d3d","line":43,"range":{"start_line":42,"start_character":1,"end_line":43,"end_character":26},"in_reply_to":"4d081795_0c91d394","updated":"2025-09-04 13:30:31.000000000","message":"Filed a bug for the same https://bugs.launchpad.net/watcher-dashboard/+bug/2122043 \nI will propose a fix .","commit_id":"d4b9bf56e143a85c489ebbc35b72cd128de19683"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"738bee1312e9893001bd46a6a8fd4af4f4098614","unresolved":true,"context_lines":[{"line_number":39,"context_line":"        watcher_url\u003dendpoint,"},{"line_number":40,"context_line":"        insecure\u003dinsecure,"},{"line_number":41,"context_line":"        ca_file\u003dca_file,"},{"line_number":42,"context_line":"        username\u003drequest.user.username,"},{"line_number":43,"context_line":"        password\u003dpassword,"},{"line_number":44,"context_line":"        os_auth_token\u003drequest.user.token.id"},{"line_number":45,"context_line":"    )"},{"line_number":46,"context_line":"    return client"}],"source_content_type":"text/x-python","patch_set":10,"id":"85f71a5e_6b072832","line":43,"range":{"start_line":42,"start_character":1,"end_line":43,"end_character":26},"in_reply_to":"6fc36f8b_4e523d3d","updated":"2025-09-04 14:12:12.000000000","message":"Addressed here: https://review.opendev.org/c/openstack/watcher-dashboard/+/959528","commit_id":"d4b9bf56e143a85c489ebbc35b72cd128de19683"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"92ad9f39fdd3364b9b70f7e90421a684a946dfcf","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        watcher_url\u003dendpoint,"},{"line_number":40,"context_line":"        insecure\u003dinsecure,"},{"line_number":41,"context_line":"        ca_file\u003dca_file,"},{"line_number":42,"context_line":"        username\u003drequest.user.username,"},{"line_number":43,"context_line":"        password\u003dpassword,"},{"line_number":44,"context_line":"        os_auth_token\u003drequest.user.token.id"},{"line_number":45,"context_line":"    )"},{"line_number":46,"context_line":"    return client"}],"source_content_type":"text/x-python","patch_set":10,"id":"913c72d5_e6306915","line":43,"range":{"start_line":42,"start_character":1,"end_line":43,"end_character":26},"in_reply_to":"85f71a5e_6b072832","updated":"2025-09-09 08:59:21.000000000","message":"Done","commit_id":"d4b9bf56e143a85c489ebbc35b72cd128de19683"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":true,"context_lines":[{"line_number":107,"context_line":"            payload[\u0027end_time\u0027] \u003d end_time"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # Choose microversion based on payload features"},{"line_number":110,"context_line":"        required_mv \u003d wv.infer_required_microversion_for_audit(payload)"},{"line_number":111,"context_line":"        client \u003d watcherclient(request, api_version\u003drequired_mv)"},{"line_number":112,"context_line":"        return client.audit.create(**payload)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"255eed0e_00a28a9b","line":110,"range":{"start_line":110,"start_character":0,"end_line":110,"end_character":2},"updated":"2025-09-17 15:14:05.000000000","message":"See my comment about inferring microversion. I\u0027d simply use 1.1 for any audit.create call.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":true,"context_lines":[{"line_number":107,"context_line":"            payload[\u0027end_time\u0027] \u003d end_time"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # Choose microversion based on payload features"},{"line_number":110,"context_line":"        required_mv \u003d wv.infer_required_microversion_for_audit(payload)"},{"line_number":111,"context_line":"        client \u003d watcherclient(request, api_version\u003drequired_mv)"},{"line_number":112,"context_line":"        return client.audit.create(**payload)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"2a65ef0a_72cc77dc","line":110,"range":{"start_line":110,"start_character":0,"end_line":110,"end_character":2},"in_reply_to":"255eed0e_00a28a9b","updated":"2025-09-18 08:59:20.000000000","message":"Done","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":true,"context_lines":[{"line_number":141,"context_line":"                 the ID"},{"line_number":142,"context_line":"        :rtype:  :py:class:`~.Audit`"},{"line_number":143,"context_line":"        \"\"\""},{"line_number":144,"context_line":"        return watcherclient(request).audit.get(audit\u003daudit_id)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    @classmethod"},{"line_number":147,"context_line":"    def delete(cls, request, audit_id):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fc6b9cc9_c239244a","line":144,"range":{"start_line":144,"start_character":0,"end_line":144,"end_character":2},"updated":"2025-09-17 15:14:05.000000000","message":"you also need to use 1.1 version to get the start_time and end_time values here and add them in the audit details page.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":true,"context_lines":[{"line_number":141,"context_line":"                 the ID"},{"line_number":142,"context_line":"        :rtype:  :py:class:`~.Audit`"},{"line_number":143,"context_line":"        \"\"\""},{"line_number":144,"context_line":"        return watcherclient(request).audit.get(audit\u003daudit_id)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    @classmethod"},{"line_number":147,"context_line":"    def delete(cls, request, audit_id):"}],"source_content_type":"text/x-python","patch_set":14,"id":"38053aeb_73d39e23","line":144,"range":{"start_line":144,"start_character":0,"end_line":144,"end_character":2},"in_reply_to":"fc6b9cc9_c239244a","updated":"2025-09-18 08:59:20.000000000","message":"Done","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a2688f6bb7593d44be95e879f5ae55c41caccf23","unresolved":true,"context_lines":[{"line_number":15,"context_line":"from django.conf import settings"},{"line_number":16,"context_line":"from django.utils.translation import gettext_lazy as _"},{"line_number":17,"context_line":"from openstack_dashboard.api import base"},{"line_number":18,"context_line":"from watcher_dashboard.common import client as wv"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from watcher_dashboard.utils import errors as errors_utils"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3479b833_1d3273cb","line":18,"range":{"start_line":18,"start_character":47,"end_line":18,"end_character":49},"updated":"2025-09-19 17:23:24.000000000","message":"why did you change this\n\nwc was not a great abriation before but wv is much worse.\n\nplease fix this in a follow up\n\nyou descrtiption names like common_client not 2-3 letter names form imports like this.","commit_id":"fdea25a98e23d5bd9f0cae08b9f6f838a250b130"}],"watcher_dashboard/common/microversion.py":[{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":true,"context_lines":[{"line_number":1,"context_line":"# Copyright 2025,  Red Hat, Inc."},{"line_number":2,"context_line":"# All rights reserved."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not"}],"source_content_type":"text/x-python","patch_set":14,"id":"2481e5b4_6a3299ae","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":2},"updated":"2025-09-17 15:14:05.000000000","message":"I think client.py would be more appropriate for this file.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":true,"context_lines":[{"line_number":43,"context_line":"    if not value:"},{"line_number":44,"context_line":"        return (1, 0)"},{"line_number":45,"context_line":"    try:"},{"line_number":46,"context_line":"        major, minor \u003d value.split(\u0027.\u0027)"},{"line_number":47,"context_line":"        return (int(major), int(minor) if minor !\u003d \u0027latest\u0027 else 10**9)"},{"line_number":48,"context_line":"    except Exception:"},{"line_number":49,"context_line":"        return (1, 0)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"db34d10c_df9a4c05","line":47,"range":{"start_line":46,"start_character":0,"end_line":47,"end_character":71},"updated":"2025-09-17 15:14:05.000000000","message":"I\u0027m not sure what\u0027s the expected logic for \u0027latest\u0027 value. My understanding is that in that case value would be \u0027latest\u0027 string and in that case this code would fail:\n\n```\n\u003e\u003e\u003e value\u003d\"latest\"\n\u003e\u003e\u003e major, minor \u003d value.split(\u0027.\u0027)\nTraceback (most recent call last):\n  File \"\u003cpython-input-9\u003e\", line 1, in \u003cmodule\u003e\n    major, minor \u003d value.split(\u0027.\u0027)\n```\n\nI think the right way would be, if value\u003d\u0027latest\u0027 then it should return max_microversion found in the server or in that case we may totally skip and just use \u0027latest\u0027 as api_microversion wichi is a valid value iirc.\n\nAlso, I think microversion_parse library was created for this.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":true,"context_lines":[{"line_number":43,"context_line":"    if not value:"},{"line_number":44,"context_line":"        return (1, 0)"},{"line_number":45,"context_line":"    try:"},{"line_number":46,"context_line":"        major, minor \u003d value.split(\u0027.\u0027)"},{"line_number":47,"context_line":"        return (int(major), int(minor) if minor !\u003d \u0027latest\u0027 else 10**9)"},{"line_number":48,"context_line":"    except Exception:"},{"line_number":49,"context_line":"        return (1, 0)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"2b996fa3_ebe8a28f","line":47,"range":{"start_line":46,"start_character":0,"end_line":47,"end_character":71},"in_reply_to":"db34d10c_df9a4c05","updated":"2025-09-18 08:59:20.000000000","message":"Removed it all these and making it too confusing","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":true,"context_lines":[{"line_number":56,"context_line":"        return cached"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    try:"},{"line_number":59,"context_line":"        endpoint \u003d base.url_for(request, WATCHER_SERVICE)"},{"line_number":60,"context_line":"    except Exception as exc:"},{"line_number":61,"context_line":"        LOG.debug(\u0027Failed to resolve Watcher endpoint: %s\u0027, exc)"},{"line_number":62,"context_line":"        result \u003d (None, None)"},{"line_number":63,"context_line":"        setattr(request, \u0027_watcher_mv_range\u0027, result)"},{"line_number":64,"context_line":"        return result"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    insecure \u003d getattr(settings, \u0027OPENSTACK_SSL_NO_VERIFY\u0027, False)"},{"line_number":67,"context_line":"    ca_file \u003d getattr(settings, \u0027OPENSTACK_SSL_CACERT\u0027, None)"},{"line_number":68,"context_line":"    headers \u003d {}"},{"line_number":69,"context_line":"    token \u003d getattr(getattr(request, \u0027user\u0027, None), \u0027token\u0027, None)"},{"line_number":70,"context_line":"    if token and getattr(token, \u0027id\u0027, None):"},{"line_number":71,"context_line":"        headers[\u0027X-Auth-Token\u0027] \u003d token.id"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    try:"},{"line_number":74,"context_line":"        verify \u003d False if insecure else (ca_file or True)"},{"line_number":75,"context_line":"        # Hint API to respond with version range headers"},{"line_number":76,"context_line":"        headers.setdefault(\u0027OpenStack-API-Version\u0027, f\u0027{HEADER_SERVICE} 1.0\u0027)"},{"line_number":77,"context_line":"        resp \u003d requests.get("},{"line_number":78,"context_line":"            endpoint, headers\u003dheaders, verify\u003dverify, timeout\u003d10)"},{"line_number":79,"context_line":"        min_ver \u003d resp.headers.get(\u0027OpenStack-API-Minimum-Version\u0027)"},{"line_number":80,"context_line":"        max_ver \u003d resp.headers.get(\u0027OpenStack-API-Maximum-Version\u0027)"},{"line_number":81,"context_line":"        result \u003d (min_ver, max_ver)"},{"line_number":82,"context_line":"    except Exception as exc:"},{"line_number":83,"context_line":"        LOG.debug(\u0027Failed to fetch server microversion range: %s\u0027, exc)"},{"line_number":84,"context_line":"        result \u003d (None, None)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    setattr(request, \u0027_watcher_mv_range\u0027, result)"},{"line_number":87,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":14,"id":"0f756b64_18f5b1be","line":84,"range":{"start_line":59,"start_character":17,"end_line":84,"end_character":29},"updated":"2025-09-17 15:14:05.000000000","message":"There is an openstackclient method to do this instead of using requests directly:\n\n```\n$ openstack version show --service infra-optim\n+-------------+-----------------------+---------+---------+-------------------------------------------------------+------------------+------------------+\n| Region Name | Service Type          | Version | Status  | Endpoint                                              | Min Microversion | Max Microversion |\n+-------------+-----------------------+---------+---------+-------------------------------------------------------+------------------+------------------+\n| regionOne   | resource-optimization | 1.0     | CURRENT | https://watcher-public-openstack.apps-crc.testing/v1/ | 1.0              | 1.4              |\n+-------------+-----------------------+---------+---------+-------------------------------------------------------+------------------+------------------+\nsh-5.1$ \n```\n\nAlso it can be done with openstacksdk:\n\n```\nfrom openstack import connection\nconn \u003d connection.Connection(cloud\u003d\u0027default\u0027)\nconn.infra_optim.get_all_version_data()\n{\u0027regionOne\u0027: {\u0027public\u0027: {\u0027resource-optimization\u0027: [{\u0027version\u0027: \u00271.0\u0027, \u0027url\u0027: \u0027https://watcher-public-openstack.apps-crc.testing/v1/\u0027, \u0027collection\u0027: None, \u0027max_microversion\u0027: \u00271.4\u0027, \u0027min_microversion\u0027: \u00271.0\u0027, \u0027next_min_version\u0027: None, \u0027not_before\u0027: None, \u0027status\u0027: \u0027CURRENT\u0027, \u0027raw_status\u0027: \u0027CURRENT\u0027}]}}}\n\n```","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":true,"context_lines":[{"line_number":56,"context_line":"        return cached"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    try:"},{"line_number":59,"context_line":"        endpoint \u003d base.url_for(request, WATCHER_SERVICE)"},{"line_number":60,"context_line":"    except Exception as exc:"},{"line_number":61,"context_line":"        LOG.debug(\u0027Failed to resolve Watcher endpoint: %s\u0027, exc)"},{"line_number":62,"context_line":"        result \u003d (None, None)"},{"line_number":63,"context_line":"        setattr(request, \u0027_watcher_mv_range\u0027, result)"},{"line_number":64,"context_line":"        return result"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    insecure \u003d getattr(settings, \u0027OPENSTACK_SSL_NO_VERIFY\u0027, False)"},{"line_number":67,"context_line":"    ca_file \u003d getattr(settings, \u0027OPENSTACK_SSL_CACERT\u0027, None)"},{"line_number":68,"context_line":"    headers \u003d {}"},{"line_number":69,"context_line":"    token \u003d getattr(getattr(request, \u0027user\u0027, None), \u0027token\u0027, None)"},{"line_number":70,"context_line":"    if token and getattr(token, \u0027id\u0027, None):"},{"line_number":71,"context_line":"        headers[\u0027X-Auth-Token\u0027] \u003d token.id"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    try:"},{"line_number":74,"context_line":"        verify \u003d False if insecure else (ca_file or True)"},{"line_number":75,"context_line":"        # Hint API to respond with version range headers"},{"line_number":76,"context_line":"        headers.setdefault(\u0027OpenStack-API-Version\u0027, f\u0027{HEADER_SERVICE} 1.0\u0027)"},{"line_number":77,"context_line":"        resp \u003d requests.get("},{"line_number":78,"context_line":"            endpoint, headers\u003dheaders, verify\u003dverify, timeout\u003d10)"},{"line_number":79,"context_line":"        min_ver \u003d resp.headers.get(\u0027OpenStack-API-Minimum-Version\u0027)"},{"line_number":80,"context_line":"        max_ver \u003d resp.headers.get(\u0027OpenStack-API-Maximum-Version\u0027)"},{"line_number":81,"context_line":"        result \u003d (min_ver, max_ver)"},{"line_number":82,"context_line":"    except Exception as exc:"},{"line_number":83,"context_line":"        LOG.debug(\u0027Failed to fetch server microversion range: %s\u0027, exc)"},{"line_number":84,"context_line":"        result \u003d (None, None)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    setattr(request, \u0027_watcher_mv_range\u0027, result)"},{"line_number":87,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":14,"id":"587f5ccc_905984aa","line":84,"range":{"start_line":59,"start_character":17,"end_line":84,"end_character":29},"in_reply_to":"0f756b64_18f5b1be","updated":"2025-09-18 08:59:20.000000000","message":"openstacksdk is not used in Horizon itself https://github.com/openstack/horizon/blob/master/requirements.txt and recently they reverted  https://github.com/openstack/horizon/commit/0700d12541fb25b77e0937cf0a3662987011a1ad openstacksdk use.\n\nI think this option is not available on the table.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":true,"context_lines":[{"line_number":87,"context_line":"    return result"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def get_server_microversion_range(request):"},{"line_number":91,"context_line":"    \"\"\"Return (min_version, max_version) advertised by the server."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    Returns (None, None) if headers are missing or discovery fails."},{"line_number":94,"context_line":"    \"\"\""},{"line_number":95,"context_line":"    return _discover_range(request)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_max_supported_microversion(request):"}],"source_content_type":"text/x-python","patch_set":14,"id":"f07c4210_45f4ba90","line":95,"range":{"start_line":90,"start_character":0,"end_line":95,"end_character":35},"updated":"2025-09-17 15:14:05.000000000","message":"why not keeping just a method, (get_server_microversion_range or _discover_range) instead of having an intermediate doing nothing?","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":true,"context_lines":[{"line_number":87,"context_line":"    return result"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def get_server_microversion_range(request):"},{"line_number":91,"context_line":"    \"\"\"Return (min_version, max_version) advertised by the server."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    Returns (None, None) if headers are missing or discovery fails."},{"line_number":94,"context_line":"    \"\"\""},{"line_number":95,"context_line":"    return _discover_range(request)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_max_supported_microversion(request):"}],"source_content_type":"text/x-python","patch_set":14,"id":"527f4b30_9729ca46","line":95,"range":{"start_line":90,"start_character":0,"end_line":95,"end_character":35},"in_reply_to":"f07c4210_45f4ba90","updated":"2025-09-18 08:59:20.000000000","message":"dropped it and using api version1.1 directly in get/create/list call.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":true,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    If required is supported return it; otherwise return \u00271.0\u0027."},{"line_number":126,"context_line":"    \"\"\""},{"line_number":127,"context_line":"    if required and is_supported(request, required):"},{"line_number":128,"context_line":"        return required"},{"line_number":129,"context_line":"    return MIN_DEFAULT"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"def infer_required_microversion_for_audit(payload):"}],"source_content_type":"text/x-python","patch_set":14,"id":"20614a5d_51220bc7","line":129,"range":{"start_line":127,"start_character":0,"end_line":129,"end_character":22},"updated":"2025-09-17 15:14:05.000000000","message":"If a call requires a version which is not supported, shouldn\u0027t it fail with some exception instead using min_default? That means we are doing probably an unsupported call, otherwise we shouldn\u0027t require that version.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":true,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    If required is supported return it; otherwise return \u00271.0\u0027."},{"line_number":126,"context_line":"    \"\"\""},{"line_number":127,"context_line":"    if required and is_supported(request, required):"},{"line_number":128,"context_line":"        return required"},{"line_number":129,"context_line":"    return MIN_DEFAULT"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"def infer_required_microversion_for_audit(payload):"}],"source_content_type":"text/x-python","patch_set":14,"id":"b8711df8_9cf40744","line":129,"range":{"start_line":127,"start_character":0,"end_line":129,"end_character":22},"in_reply_to":"20614a5d_51220bc7","updated":"2025-09-18 08:59:20.000000000","message":"Dropped","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":true,"context_lines":[{"line_number":129,"context_line":"    return MIN_DEFAULT"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"def infer_required_microversion_for_audit(payload):"},{"line_number":133,"context_line":"    \"\"\"Infer required microversion for an audit create/update payload."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    Returns START_END_TIME (\u00271.1\u0027) when payload includes start/end fields,"},{"line_number":136,"context_line":"    otherwise returns None (caller should default to \u00271.0\u0027)."},{"line_number":137,"context_line":"    \"\"\""},{"line_number":138,"context_line":"    if not isinstance(payload, dict):"},{"line_number":139,"context_line":"        return None"},{"line_number":140,"context_line":"    has_start \u003d payload.get(\u0027start_time\u0027) is not None"},{"line_number":141,"context_line":"    has_end \u003d payload.get(\u0027end_time\u0027) is not None"},{"line_number":142,"context_line":"    if has_start or has_end:"},{"line_number":143,"context_line":"        return START_END_TIME"},{"line_number":144,"context_line":"    return None"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def get_client(request, required\u003dNone):"}],"source_content_type":"text/x-python","patch_set":14,"id":"31e735ad_feed3270","line":144,"range":{"start_line":132,"start_character":0,"end_line":144,"end_character":15},"updated":"2025-09-17 15:14:05.000000000","message":"I wonder if this is overcomplicating to guess microversion for a minor version 1.1 which was added much before any supported version. I agree in the goal of using per-call microversion, but I\u0027d use 1.1 to any audit create call.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    return MIN_DEFAULT"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"def infer_required_microversion_for_audit(payload):"},{"line_number":133,"context_line":"    \"\"\"Infer required microversion for an audit create/update payload."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    Returns START_END_TIME (\u00271.1\u0027) when payload includes start/end fields,"},{"line_number":136,"context_line":"    otherwise returns None (caller should default to \u00271.0\u0027)."},{"line_number":137,"context_line":"    \"\"\""},{"line_number":138,"context_line":"    if not isinstance(payload, dict):"},{"line_number":139,"context_line":"        return None"},{"line_number":140,"context_line":"    has_start \u003d payload.get(\u0027start_time\u0027) is not None"},{"line_number":141,"context_line":"    has_end \u003d payload.get(\u0027end_time\u0027) is not None"},{"line_number":142,"context_line":"    if has_start or has_end:"},{"line_number":143,"context_line":"        return START_END_TIME"},{"line_number":144,"context_line":"    return None"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def get_client(request, required\u003dNone):"}],"source_content_type":"text/x-python","patch_set":14,"id":"74a066cb_75da09a1","line":144,"range":{"start_line":132,"start_character":0,"end_line":144,"end_character":15},"in_reply_to":"31e735ad_feed3270","updated":"2025-09-18 08:59:20.000000000","message":"Done","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"}],"watcher_dashboard/content/audits/forms.py":[{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"04fbc2fefe0462b9c3176e87a041691859cdc769","unresolved":true,"context_lines":[{"line_number":62,"context_line":"        help_text\u003d_(\"Local time in ISO 8601 (e.g. 2025-01-02T18:30:00); \""},{"line_number":63,"context_line":"                    \"only used for CONTINUOUS audits. Watcher converts local \""},{"line_number":64,"context_line":"                    \"time to UTC.\"),"},{"line_number":65,"context_line":"        widget\u003dforms.TextInput(attrs\u003d{"},{"line_number":66,"context_line":"            \u0027class\u0027: \u0027switched\u0027,"},{"line_number":67,"context_line":"            \u0027data-switch-on\u0027: \u0027audit_type\u0027,"},{"line_number":68,"context_line":"            \u0027data-audit_type-continuous\u0027: _(\"Start time (ISO 8601, local)\"),"}],"source_content_type":"text/x-python","patch_set":3,"id":"84fde03c_ff764cbe","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":38},"updated":"2025-08-13 14:51:22.000000000","message":"Whould it be possible to use a forms.DateTimeInput widget? something like in https://opendev.org/openstack/blazar-dashboard/src/branch/master/blazar_dashboard/content/leases/forms.py#L39-L55","commit_id":"1211862a4f96a90541024aa0e995d37948f9998c"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"e400615303d66b46a6ec7f8ffb98c1d5ff185504","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        help_text\u003d_(\"Local time in ISO 8601 (e.g. 2025-01-02T18:30:00); \""},{"line_number":63,"context_line":"                    \"only used for CONTINUOUS audits. Watcher converts local \""},{"line_number":64,"context_line":"                    \"time to UTC.\"),"},{"line_number":65,"context_line":"        widget\u003dforms.TextInput(attrs\u003d{"},{"line_number":66,"context_line":"            \u0027class\u0027: \u0027switched\u0027,"},{"line_number":67,"context_line":"            \u0027data-switch-on\u0027: \u0027audit_type\u0027,"},{"line_number":68,"context_line":"            \u0027data-audit_type-continuous\u0027: _(\"Start time (ISO 8601, local)\"),"}],"source_content_type":"text/x-python","patch_set":3,"id":"85d1a03a_0a7a78d9","line":65,"range":{"start_line":65,"start_character":8,"end_line":65,"end_character":38},"in_reply_to":"84fde03c_ff764cbe","updated":"2025-08-14 07:52:10.000000000","message":"Done","commit_id":"1211862a4f96a90541024aa0e995d37948f9998c"}],"watcher_dashboard/templates/infra_optim/audits/details.html":[{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a82f10501dc7acb9b03bd8d69ed134963c69c3b2","unresolved":true,"context_lines":[{"line_number":25,"context_line":"        {% endif %}"},{"line_number":26,"context_line":"        \u003cdt\u003e{% trans \"Auto Trigger\" %}\u003c/dt\u003e"},{"line_number":27,"context_line":"        \u003cdd\u003e{{ audit.auto_trigger }}\u003c/dd\u003e"},{"line_number":28,"context_line":"        \u003cdt\u003e{% trans \"Start Time\" %}\u003c/dt\u003e"},{"line_number":29,"context_line":"        \u003cdd\u003e{{ audit.start_time|parse_isotime|default:_(\"-\") }}\u003c/dd\u003e"},{"line_number":30,"context_line":"        \u003cdt\u003e{% trans \"End Time\" %}\u003c/dt\u003e"},{"line_number":31,"context_line":"        \u003cdd\u003e{{ audit.end_time|parse_isotime|default:_(\"-\") }}\u003c/dd\u003e"},{"line_number":32,"context_line":"        {% url \u0027horizon:admin:audit_templates:detail\u0027 audit.audit_template_uuid as audit_template_url %}"},{"line_number":33,"context_line":"        \u003cdt\u003e{% trans \"State\" %}\u003c/dt\u003e"},{"line_number":34,"context_line":"        \u003cdd\u003e{{ audit.state|default:_(\"-\") }}\u003c/dd\u003e"}],"source_content_type":"text/html","patch_set":14,"id":"04cb3cf8_0ba852a1","line":31,"range":{"start_line":28,"start_character":0,"end_line":31,"end_character":66},"updated":"2025-09-17 15:14:05.000000000","message":"For some reason, I\u0027m not getting this values in the audit details screen even when it\u0027s creating it properly. In my example i get this values as seen with openstackclient:\n\n```\n| Start Time    | 2025-09-18T15:00:44                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n| End Time      | 2025-09-19T00:00:00     \n```\n\nBut i get empty values in the audit details page.\n\nI think this is because you are not using api version 1.1 in the audit get calls.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"6c8e0c52ba5c741cda91ef4bab260e2451fb611d","unresolved":true,"context_lines":[{"line_number":25,"context_line":"        {% endif %}"},{"line_number":26,"context_line":"        \u003cdt\u003e{% trans \"Auto Trigger\" %}\u003c/dt\u003e"},{"line_number":27,"context_line":"        \u003cdd\u003e{{ audit.auto_trigger }}\u003c/dd\u003e"},{"line_number":28,"context_line":"        \u003cdt\u003e{% trans \"Start Time\" %}\u003c/dt\u003e"},{"line_number":29,"context_line":"        \u003cdd\u003e{{ audit.start_time|parse_isotime|default:_(\"-\") }}\u003c/dd\u003e"},{"line_number":30,"context_line":"        \u003cdt\u003e{% trans \"End Time\" %}\u003c/dt\u003e"},{"line_number":31,"context_line":"        \u003cdd\u003e{{ audit.end_time|parse_isotime|default:_(\"-\") }}\u003c/dd\u003e"},{"line_number":32,"context_line":"        {% url \u0027horizon:admin:audit_templates:detail\u0027 audit.audit_template_uuid as audit_template_url %}"},{"line_number":33,"context_line":"        \u003cdt\u003e{% trans \"State\" %}\u003c/dt\u003e"},{"line_number":34,"context_line":"        \u003cdd\u003e{{ audit.state|default:_(\"-\") }}\u003c/dd\u003e"}],"source_content_type":"text/html","patch_set":14,"id":"ce42b688_eba20ac2","line":31,"range":{"start_line":28,"start_character":0,"end_line":31,"end_character":66},"in_reply_to":"04cb3cf8_0ba852a1","updated":"2025-09-18 08:59:20.000000000","message":"I have fixed it.","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a2688f6bb7593d44be95e879f5ae55c41caccf23","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        {% endif %}"},{"line_number":26,"context_line":"        \u003cdt\u003e{% trans \"Auto Trigger\" %}\u003c/dt\u003e"},{"line_number":27,"context_line":"        \u003cdd\u003e{{ audit.auto_trigger }}\u003c/dd\u003e"},{"line_number":28,"context_line":"        \u003cdt\u003e{% trans \"Start Time\" %}\u003c/dt\u003e"},{"line_number":29,"context_line":"        \u003cdd\u003e{{ audit.start_time|parse_isotime|default:_(\"-\") }}\u003c/dd\u003e"},{"line_number":30,"context_line":"        \u003cdt\u003e{% trans \"End Time\" %}\u003c/dt\u003e"},{"line_number":31,"context_line":"        \u003cdd\u003e{{ audit.end_time|parse_isotime|default:_(\"-\") }}\u003c/dd\u003e"},{"line_number":32,"context_line":"        {% url \u0027horizon:admin:audit_templates:detail\u0027 audit.audit_template_uuid as audit_template_url %}"},{"line_number":33,"context_line":"        \u003cdt\u003e{% trans \"State\" %}\u003c/dt\u003e"},{"line_number":34,"context_line":"        \u003cdd\u003e{{ audit.state|default:_(\"-\") }}\u003c/dd\u003e"}],"source_content_type":"text/html","patch_set":14,"id":"ecc7f4e8_ab4bb750","line":31,"range":{"start_line":28,"start_character":0,"end_line":31,"end_character":66},"in_reply_to":"ce42b688_eba20ac2","updated":"2025-09-19 17:23:24.000000000","message":"Acknowledged","commit_id":"dee239cd5921a175ffb26c4fb8ab95c0b58a0115"}],"watcher_dashboard/test/api_tests/test_watcher.py":[{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"c463dd4073554bf49febe0f22ef6c6677382f79c","unresolved":true,"context_lines":[{"line_number":273,"context_line":"            auto_trigger\u003dTrue,"},{"line_number":274,"context_line":"            name\u003daudit_name)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def test_audit_create_with_start_end_time(self):"},{"line_number":277,"context_line":"        audit \u003d self.api_audits.list()[1]"},{"line_number":278,"context_line":"        audit_template_id \u003d self.api_audit_templates.first()[\u0027uuid\u0027]"},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"04f5e7b1_85f994da","line":276,"range":{"start_line":276,"start_character":8,"end_line":276,"end_character":45},"updated":"2025-08-29 17:38:12.000000000","message":"we could add more negative tests too, but we can do this as a follow up too.","commit_id":"bb3c2aba3076dbe7fddf10d1dd3b554b2dfb3b7a"}]}
