)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08bb89a39e13676e2685df0c8bc8d96ab8d5d96e","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Amit Uniyal \u003cauniyal@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2023-11-24 10:01:08 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"enforce remote sonsole shutdown"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I5d7e8faf1d271e9dd98d24e825631246308e7141"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1d817a6f_a09f17c1","line":7,"range":{"start_line":7,"start_character":15,"end_line":7,"end_character":22},"updated":"2023-11-28 16:02:57.000000000","message":"console","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Amit Uniyal \u003cauniyal@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2023-11-24 10:01:08 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"enforce remote sonsole shutdown"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I5d7e8faf1d271e9dd98d24e825631246308e7141"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"becaf4cd_2368a647","line":7,"range":{"start_line":7,"start_character":15,"end_line":7,"end_character":22},"in_reply_to":"1d817a6f_a09f17c1","updated":"2023-12-04 12:04:59.000000000","message":"Done","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"d49ce3e1d201d5f43d0aef112a7f7f16d6de35f4","unresolved":true,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2023-12-04 11:57:45 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"enforce remote console shutdown"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I5d7e8faf1d271e9dd98d24e825631246308e7141"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"d5af60d3_3dc97cdc","line":8,"updated":"2023-12-04 12:27:45.000000000","message":"yet to update commit msg for all changes","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"cd944c967e7a96d9529a02960a4550555e911c4e","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2023-12-04 11:57:45 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"enforce remote console shutdown"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I5d7e8faf1d271e9dd98d24e825631246308e7141"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"21befb1f_84ce4e97","line":8,"in_reply_to":"d5af60d3_3dc97cdc","updated":"2024-01-23 08:30:02.000000000","message":"Done","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1119ef3681240fb7aa473b624d76f42a4e704f25","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6966038c_e7e68377","updated":"2023-11-28 18:41:00.000000000","message":"I think we can avoid the extra round trip to the database by adding the `expires` field to the ConsoleAuthToken and loading it along with the rest of the token from the DB in the query that we already do.","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"43977abe_5d5b2021","in_reply_to":"6966038c_e7e68377","updated":"2023-12-04 12:04:59.000000000","message":"Yes, updated, thanks.","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"b7e0d9028a46479c8f55f918772e59eef4897095","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"73dd5177_f2c6e880","updated":"2023-12-05 16:20:11.000000000","message":"The general direction is good, but the unit test failures are legit. See inline.","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a03b095c479c2199b1779fda6c6031c6b67acebe","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"d8d76e81_c9513190","updated":"2024-01-22 14:52:48.000000000","message":"Not a full review, just noting in writing in public what we talked about.","commit_id":"4f878e028abb8e6e49016d18b507742689f7311b"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"78385e1525b7676f54e6c626463530663d2fda11","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"47bd3782_e5990db7","updated":"2024-02-11 23:04:18.000000000","message":"I think the unit test churn is unnecessary, otherwise I think this is good.","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"aba45bfb_b739eca4","updated":"2024-02-20 17:31:42.000000000","message":"i","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a931ab4993912863cb8c2e2c25b79836a242a821","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"a284cfc0_ebd32331","updated":"2024-02-20 20:10:56.000000000","message":"two be clear the -1 are for the object issue and the create of a new websocket connection in _close_connection.","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"41f7ef50bb21e6d4a054a5722b86f69ff05ef839","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"29c55c91_73810363","updated":"2024-02-22 16:08:37.000000000","message":"recheck nova-ceph-multistore, nova-next unrelated tests","commit_id":"8fde98d93386c7436176ba170a87b63129b855cd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b0bb1c4eb8fe762c08cd1596b6f3b25ea9d477ef","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"40aa5d31_aaecd39c","updated":"2024-02-27 11:25:37.000000000","message":"I\u0027m almost good but please modify those last comments before I can +2.","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"a61fdfbd0a778d52daeb9690507ec59630d23d51","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"cf826fb4_1838acaf","updated":"2024-02-23 01:53:47.000000000","message":"recheck nova-ceph-multistore failing in CI for unrelated reasons","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a82e1dc661bdee2ece874e5c229189bea46ad8c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"409fdde7_6b32a44c","updated":"2024-02-23 11:33:04.000000000","message":"recheck nova-next is now fixed","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"7e623a07f1902b6255ec23b890d9269f5c5bb361","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"b8cd6111_177b8d68","updated":"2024-02-28 04:23:08.000000000","message":"recheck Kernel panic - not syncing: IO-APIC + timer doesn\u0027t work!","commit_id":"5ecf1d324d45e536590aac52f228f22a58a56b7a"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"062c55d0be0fdfd77300fab8e02720a102b4b834","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"75789535_419545e4","updated":"2024-02-28 01:36:19.000000000","message":"recheck tempest-integrated-compute TIMEOUT no test failed","commit_id":"5ecf1d324d45e536590aac52f228f22a58a56b7a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2748d77a975fa1dc2c464f6f6ca1b0d464ef942f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"b4c00a7c_69a040de","updated":"2024-02-28 11:23:32.000000000","message":"recheck timeout jobs","commit_id":"5ecf1d324d45e536590aac52f228f22a58a56b7a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e91b7c1c29206bfa35b566689b7a11c3de5e2773","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"ee6c57d6_19fc5e60","updated":"2024-02-27 13:45:36.000000000","message":"thanks, all good now","commit_id":"5ecf1d324d45e536590aac52f228f22a58a56b7a"}],"doc/source/admin/remote-console-access.rst":[{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"7b1e77ed745fdf855cfacf76a35deec4a5d9dff2","unresolved":true,"context_lines":[{"line_number":577,"context_line":"About ``nova-consoleauth``"},{"line_number":578,"context_line":"--------------------------"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"The now-removed :program:`nova-consoleauth` service was previously used to"},{"line_number":581,"context_line":"provide a shared service to manage token authentication that the client proxies"},{"line_number":582,"context_line":"outlined below could leverage. Token authentication was moved to the database in"},{"line_number":583,"context_line":"18.0.0 (Rocky) and the service was removed in 20.0.0 (Train)."}],"source_content_type":"text/x-rst","patch_set":13,"id":"c34a79c2_cb640f99","line":580,"range":{"start_line":580,"start_character":0,"end_line":580,"end_character":51},"updated":"2024-02-14 08:37:54.000000000","message":"is this alright ?","commit_id":"017a19e5de4f0dd9c3a852c28fae6546caa722c8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":false,"context_lines":[{"line_number":577,"context_line":"About ``nova-consoleauth``"},{"line_number":578,"context_line":"--------------------------"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"The now-removed :program:`nova-consoleauth` service was previously used to"},{"line_number":581,"context_line":"provide a shared service to manage token authentication that the client proxies"},{"line_number":582,"context_line":"outlined below could leverage. Token authentication was moved to the database in"},{"line_number":583,"context_line":"18.0.0 (Rocky) and the service was removed in 20.0.0 (Train)."}],"source_content_type":"text/x-rst","patch_set":13,"id":"d5c3a8e1_39cfc4d4","line":580,"range":{"start_line":580,"start_character":0,"end_line":580,"end_character":51},"in_reply_to":"c34a79c2_cb640f99","updated":"2024-02-20 17:31:42.000000000","message":"the service was removed yes","commit_id":"017a19e5de4f0dd9c3a852c28fae6546caa722c8"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"7b1e77ed745fdf855cfacf76a35deec4a5d9dff2","unresolved":true,"context_lines":[{"line_number":580,"context_line":"The now-removed :program:`nova-consoleauth` service was previously used to"},{"line_number":581,"context_line":"provide a shared service to manage token authentication that the client proxies"},{"line_number":582,"context_line":"outlined below could leverage. Token authentication was moved to the database in"},{"line_number":583,"context_line":"18.0.0 (Rocky) and the service was removed in 20.0.0 (Train)."},{"line_number":584,"context_line":""},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"Frequently Asked Questions"}],"source_content_type":"text/x-rst","patch_set":13,"id":"a045968d_756a1fff","line":583,"range":{"start_line":583,"start_character":19,"end_line":583,"end_character":42},"updated":"2024-02-14 08:37:54.000000000","message":"we are updating [consoleauth] option","commit_id":"017a19e5de4f0dd9c3a852c28fae6546caa722c8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":false,"context_lines":[{"line_number":580,"context_line":"The now-removed :program:`nova-consoleauth` service was previously used to"},{"line_number":581,"context_line":"provide a shared service to manage token authentication that the client proxies"},{"line_number":582,"context_line":"outlined below could leverage. Token authentication was moved to the database in"},{"line_number":583,"context_line":"18.0.0 (Rocky) and the service was removed in 20.0.0 (Train)."},{"line_number":584,"context_line":""},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"Frequently Asked Questions"}],"source_content_type":"text/x-rst","patch_set":13,"id":"37215406_598f5797","line":583,"range":{"start_line":583,"start_character":19,"end_line":583,"end_character":42},"in_reply_to":"a045968d_756a1fff","updated":"2024-02-20 17:31:42.000000000","message":"but the functionality and config options are still used.","commit_id":"017a19e5de4f0dd9c3a852c28fae6546caa722c8"}],"nova/conf/consoleauth.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1119ef3681240fb7aa473b624d76f42a4e704f25","unresolved":true,"context_lines":[{"line_number":39,"context_line":"        help\u003d\"\"\""},{"line_number":40,"context_line":"Enable or disable enforce session timeout for VM console."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"This allows operators to enforce consolse session timeout."},{"line_number":43,"context_line":"When set to True, Nova will automatically close console session"},{"line_number":44,"context_line":"on the server end once token_ttl expires, providing enhanced"},{"line_number":45,"context_line":"control over console session duration."}],"source_content_type":"text/x-python","patch_set":1,"id":"4af2d2eb_272ea97a","line":42,"range":{"start_line":42,"start_character":33,"end_line":42,"end_character":41},"updated":"2023-11-28 18:41:00.000000000","message":"\"console\"","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        help\u003d\"\"\""},{"line_number":40,"context_line":"Enable or disable enforce session timeout for VM console."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"This allows operators to enforce consolse session timeout."},{"line_number":43,"context_line":"When set to True, Nova will automatically close console session"},{"line_number":44,"context_line":"on the server end once token_ttl expires, providing enhanced"},{"line_number":45,"context_line":"control over console session duration."}],"source_content_type":"text/x-python","patch_set":1,"id":"a1c90109_8e1fb812","line":42,"range":{"start_line":42,"start_character":33,"end_line":42,"end_character":41},"in_reply_to":"4af2d2eb_272ea97a","updated":"2023-12-04 12:04:59.000000000","message":"Done","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"77c53b5a70e0882cee33dc9914f18e5546f69b49","unresolved":true,"context_lines":[{"line_number":42,"context_line":"This allows operators to enforce a console session timeout."},{"line_number":43,"context_line":"When set to True, Nova will automatically close the console session"},{"line_number":44,"context_line":"at the server end once token_ttl expires, providing enhanced"},{"line_number":45,"context_line":"control over console session duration."},{"line_number":46,"context_line":"\"\"\"),"},{"line_number":47,"context_line":"]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5994d1f3_66e4122d","line":45,"updated":"2024-01-29 04:41:26.000000000","message":"I believe this will work as documentaion as well.\nas here https://docs.openstack.org/nova/zed/configuration/config.html\n\nIs there any other document I should edit ?","commit_id":"f5b7b6bfc252d75d9ac38af6887bde16238df316"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":false,"context_lines":[{"line_number":42,"context_line":"This allows operators to enforce a console session timeout."},{"line_number":43,"context_line":"When set to True, Nova will automatically close the console session"},{"line_number":44,"context_line":"at the server end once token_ttl expires, providing enhanced"},{"line_number":45,"context_line":"control over console session duration."},{"line_number":46,"context_line":"\"\"\"),"},{"line_number":47,"context_line":"]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"526db796_2c7b3ddd","line":45,"in_reply_to":"2ec207e0_a8284806","updated":"2024-02-20 17:31:42.000000000","message":"Acknowledged","commit_id":"f5b7b6bfc252d75d9ac38af6887bde16238df316"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28d2658389d8c3422e8f8b67bba1b00c10076f2f","unresolved":true,"context_lines":[{"line_number":42,"context_line":"This allows operators to enforce a console session timeout."},{"line_number":43,"context_line":"When set to True, Nova will automatically close the console session"},{"line_number":44,"context_line":"at the server end once token_ttl expires, providing enhanced"},{"line_number":45,"context_line":"control over console session duration."},{"line_number":46,"context_line":"\"\"\"),"},{"line_number":47,"context_line":"]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ec39bfde_3a1d6a57","line":45,"in_reply_to":"5994d1f3_66e4122d","updated":"2024-02-13 09:37:43.000000000","message":"i think it would be good to update https://github.com/openstack/nova/blob/master/doc/source/admin/remote-console-access.rst\n\nto document this feature as well in the admin guide.","commit_id":"f5b7b6bfc252d75d9ac38af6887bde16238df316"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"8655e81a0d5a0695d638df19a0abebf92bc037c8","unresolved":true,"context_lines":[{"line_number":42,"context_line":"This allows operators to enforce a console session timeout."},{"line_number":43,"context_line":"When set to True, Nova will automatically close the console session"},{"line_number":44,"context_line":"at the server end once token_ttl expires, providing enhanced"},{"line_number":45,"context_line":"control over console session duration."},{"line_number":46,"context_line":"\"\"\"),"},{"line_number":47,"context_line":"]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"2ec207e0_a8284806","line":45,"in_reply_to":"ec39bfde_3a1d6a57","updated":"2024-02-14 07:23:22.000000000","message":"Done","commit_id":"f5b7b6bfc252d75d9ac38af6887bde16238df316"}],"nova/console/websocketproxy.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1119ef3681240fb7aa473b624d76f42a4e704f25","unresolved":true,"context_lines":[{"line_number":141,"context_line":"        # NOTE(PaulMurray) ConsoleAuthToken.validate validates the token."},{"line_number":142,"context_line":"        # We call the compute manager directly to check the console port"},{"line_number":143,"context_line":"        # is correct."},{"line_number":144,"context_line":"        connect_info \u003d objects.ConsoleAuthToken.validate(ctxt, token)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        valid_port \u003d self._check_console_port("},{"line_number":147,"context_line":"            ctxt, connect_info.instance_uuid, connect_info.port,"}],"source_content_type":"text/x-python","patch_set":1,"id":"f9ed55f3_49d18cff","line":144,"updated":"2023-11-28 18:41:00.000000000","message":"[2] Which calls validate() here...","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        # NOTE(PaulMurray) ConsoleAuthToken.validate validates the token."},{"line_number":142,"context_line":"        # We call the compute manager directly to check the console port"},{"line_number":143,"context_line":"        # is correct."},{"line_number":144,"context_line":"        connect_info \u003d objects.ConsoleAuthToken.validate(ctxt, token)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        valid_port \u003d self._check_console_port("},{"line_number":147,"context_line":"            ctxt, connect_info.instance_uuid, connect_info.port,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bebc5293_f3a1b700","line":144,"in_reply_to":"f9ed55f3_49d18cff","updated":"2023-12-04 12:04:59.000000000","message":"Acknowledged","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1119ef3681240fb7aa473b624d76f42a4e704f25","unresolved":true,"context_lines":[{"line_number":142,"context_line":"        # We call the compute manager directly to check the console port"},{"line_number":143,"context_line":"        # is correct."},{"line_number":144,"context_line":"        connect_info \u003d objects.ConsoleAuthToken.validate(ctxt, token)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        valid_port \u003d self._check_console_port("},{"line_number":147,"context_line":"            ctxt, connect_info.instance_uuid, connect_info.port,"},{"line_number":148,"context_line":"            connect_info.console_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"626b533f_ba9ab559","line":145,"updated":"2023-11-28 18:41:00.000000000","message":"[6] Which means we\u0027ll have the expiration time here in connect_info...","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        # We call the compute manager directly to check the console port"},{"line_number":143,"context_line":"        # is correct."},{"line_number":144,"context_line":"        connect_info \u003d objects.ConsoleAuthToken.validate(ctxt, token)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        valid_port \u003d self._check_console_port("},{"line_number":147,"context_line":"            ctxt, connect_info.instance_uuid, connect_info.port,"},{"line_number":148,"context_line":"            connect_info.console_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ca54c28c_b773278e","line":145,"in_reply_to":"626b533f_ba9ab559","updated":"2023-12-04 12:04:59.000000000","message":"Acknowledged","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"35195476c424368e70f280014b4b88ba49f803cf","unresolved":true,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def close_connection(self, tsock, host, port):"},{"line_number":162,"context_line":"        LOG.info(\"##\" * 10)"},{"line_number":163,"context_line":"        LOG.info(socket.SHUT_RDWR)"},{"line_number":164,"context_line":"        if tsock:"},{"line_number":165,"context_line":"            tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":166,"context_line":"            tsock.close()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fd09532d_5eb90659","line":163,"updated":"2023-11-24 10:07:35.000000000","message":"this is just to debug for now, I was getting\n`OSError: [Errno 9] Bad file descriptor`","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"ecca8876cba268a5c87a11e1218e9b656f890a78","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def close_connection(self, tsock, host, port):"},{"line_number":162,"context_line":"        LOG.info(\"##\" * 10)"},{"line_number":163,"context_line":"        LOG.info(socket.SHUT_RDWR)"},{"line_number":164,"context_line":"        if tsock:"},{"line_number":165,"context_line":"            tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":166,"context_line":"            tsock.close()"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfa56900_9ad6c54d","line":163,"in_reply_to":"4a3d1ac4_c05a4bfa","updated":"2023-12-11 16:43:52.000000000","message":"the reason was, once timer completes, we are closing connection, which creates an exception and which again tried to close the connection, but because conn is closed already, SHUT_RDWR becomes -1 hence the error.\n\nresolving this comment.\nwhether to use this flag or not, can be followed in next comment.\nthanks","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":true,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def close_connection(self, tsock, host, port):"},{"line_number":162,"context_line":"        LOG.info(\"##\" * 10)"},{"line_number":163,"context_line":"        LOG.info(socket.SHUT_RDWR)"},{"line_number":164,"context_line":"        if tsock:"},{"line_number":165,"context_line":"            tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":166,"context_line":"            tsock.close()"}],"source_content_type":"text/x-python","patch_set":1,"id":"4a3d1ac4_c05a4bfa","line":163,"in_reply_to":"fb7de6a6_20195248","updated":"2023-12-04 12:04:59.000000000","message":"this is originally  referred from https://github.com/novnc/websockify/blob/43c371fc7a7dc2439268b743ed722be489cd6fec/websockify/websocketproxy.py#L127-L129","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08bb89a39e13676e2685df0c8bc8d96ab8d5d96e","unresolved":true,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def close_connection(self, tsock, host, port):"},{"line_number":162,"context_line":"        LOG.info(\"##\" * 10)"},{"line_number":163,"context_line":"        LOG.info(socket.SHUT_RDWR)"},{"line_number":164,"context_line":"        if tsock:"},{"line_number":165,"context_line":"            tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":166,"context_line":"            tsock.close()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fb7de6a6_20195248","line":163,"in_reply_to":"fd09532d_5eb90659","updated":"2023-11-28 16:02:57.000000000","message":"i dont think (socket.SHUT_RDWR) is what you want","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08bb89a39e13676e2685df0c8bc8d96ab8d5d96e","unresolved":true,"context_lines":[{"line_number":163,"context_line":"        LOG.info(socket.SHUT_RDWR)"},{"line_number":164,"context_line":"        if tsock:"},{"line_number":165,"context_line":"            tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":166,"context_line":"            tsock.close()"},{"line_number":167,"context_line":"            self.vmsg(_(\"%(host)s:%(port)s: \""},{"line_number":168,"context_line":"                        \"Websocket client or target closed\") %"},{"line_number":169,"context_line":"                        {\u0027host\u0027: host, \u0027port\u0027: port})"}],"source_content_type":"text/x-python","patch_set":1,"id":"267f13f2_f91ca5fd","line":166,"range":{"start_line":166,"start_character":0,"end_line":166,"end_character":2},"updated":"2023-11-28 16:02:57.000000000","message":"i think we jsut need \n\ntsock.close()","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"ecca8876cba268a5c87a11e1218e9b656f890a78","unresolved":true,"context_lines":[{"line_number":163,"context_line":"        LOG.info(socket.SHUT_RDWR)"},{"line_number":164,"context_line":"        if tsock:"},{"line_number":165,"context_line":"            tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":166,"context_line":"            tsock.close()"},{"line_number":167,"context_line":"            self.vmsg(_(\"%(host)s:%(port)s: \""},{"line_number":168,"context_line":"                        \"Websocket client or target closed\") %"},{"line_number":169,"context_line":"                        {\u0027host\u0027: host, \u0027port\u0027: port})"}],"source_content_type":"text/x-python","patch_set":1,"id":"acfd36e6_2788fe93","line":166,"range":{"start_line":166,"start_character":0,"end_line":166,"end_character":2},"in_reply_to":"267f13f2_f91ca5fd","updated":"2023-12-11 16:43:52.000000000","message":"this is originally referred from https://github.com/novnc/websockify/blob/43c371fc7a7dc2439268b743ed722be489cd6fec/websockify/websocketproxy.py#L127-L129","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"be15e6095ad50b9043ea790ecdeb47a6d27ef4bc","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        LOG.info(socket.SHUT_RDWR)"},{"line_number":164,"context_line":"        if tsock:"},{"line_number":165,"context_line":"            tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":166,"context_line":"            tsock.close()"},{"line_number":167,"context_line":"            self.vmsg(_(\"%(host)s:%(port)s: \""},{"line_number":168,"context_line":"                        \"Websocket client or target closed\") %"},{"line_number":169,"context_line":"                        {\u0027host\u0027: host, \u0027port\u0027: port})"}],"source_content_type":"text/x-python","patch_set":1,"id":"5e53b4d7_b3973ab1","line":166,"range":{"start_line":166,"start_character":0,"end_line":166,"end_character":2},"in_reply_to":"acfd36e6_2788fe93","updated":"2024-02-22 17:21:48.000000000","message":"Done","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1119ef3681240fb7aa473b624d76f42a4e704f25","unresolved":true,"context_lines":[{"line_number":202,"context_line":"                            token \u003d cookie[\u0027token\u0027].value"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":205,"context_line":"        connect_info \u003d self._get_connect_info(ctxt, token)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        # Verify Origin"},{"line_number":208,"context_line":"        expected_origin_hostname \u003d self.headers.get(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"e31ea94a_2aebc0d7","line":205,"updated":"2023-11-28 18:41:00.000000000","message":"[1] We call _get_connect_info() here...","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                            token \u003d cookie[\u0027token\u0027].value"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":205,"context_line":"        connect_info \u003d self._get_connect_info(ctxt, token)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        # Verify Origin"},{"line_number":208,"context_line":"        expected_origin_hostname \u003d self.headers.get(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"88cbcce5_d05dde86","line":205,"in_reply_to":"e31ea94a_2aebc0d7","updated":"2023-12-04 12:04:59.000000000","message":"Acknowledged","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1119ef3681240fb7aa473b624d76f42a4e704f25","unresolved":true,"context_lines":[{"line_number":285,"context_line":"        try:"},{"line_number":286,"context_line":"            LOG.info(\"##\" * 10)"},{"line_number":287,"context_line":"            LOG.info(socket.SHUT_RDWR)"},{"line_number":288,"context_line":"            time_to_close_conn \u003d self._get_time_to_close_connection("},{"line_number":289,"context_line":"                ctxt, token, connect_info.instance_uuid"},{"line_number":290,"context_line":"            )"},{"line_number":291,"context_line":"            if CONF.consoleauth.enforce_session_timeout:"}],"source_content_type":"text/x-python","patch_set":1,"id":"d0b099c9_6f969cfe","line":288,"updated":"2023-11-28 18:41:00.000000000","message":"[7] And we won\u0027t need to call _get_time_to_close_connection() here with the extra round trip to the database. In fact we won\u0027t need _get_time_to_close_connection() at all.","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        try:"},{"line_number":286,"context_line":"            LOG.info(\"##\" * 10)"},{"line_number":287,"context_line":"            LOG.info(socket.SHUT_RDWR)"},{"line_number":288,"context_line":"            time_to_close_conn \u003d self._get_time_to_close_connection("},{"line_number":289,"context_line":"                ctxt, token, connect_info.instance_uuid"},{"line_number":290,"context_line":"            )"},{"line_number":291,"context_line":"            if CONF.consoleauth.enforce_session_timeout:"}],"source_content_type":"text/x-python","patch_set":1,"id":"aad9ef0b_e5dc3caf","line":288,"in_reply_to":"d0b099c9_6f969cfe","updated":"2023-12-04 12:04:59.000000000","message":"Acknowledged","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"d49ce3e1d201d5f43d0aef112a7f7f16d6de35f4","unresolved":true,"context_lines":[{"line_number":36,"context_line":"from nova import exception"},{"line_number":37,"context_line":"from nova.i18n import _"},{"line_number":38,"context_line":"from nova import objects"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# from nova.db.main import api"},{"line_number":41,"context_line":"# from nova import utils"},{"line_number":42,"context_line":"from oslo_utils import timeutils"},{"line_number":43,"context_line":"from threading import Timer"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"92593851_34961967","line":41,"range":{"start_line":39,"start_character":0,"end_line":41,"end_character":24},"updated":"2023-12-04 12:27:45.000000000","message":"this too.","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"3655cdd6fc2c994f87daddf9a35476ef1d20fd85","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from nova import exception"},{"line_number":37,"context_line":"from nova.i18n import _"},{"line_number":38,"context_line":"from nova import objects"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# from nova.db.main import api"},{"line_number":41,"context_line":"# from nova import utils"},{"line_number":42,"context_line":"from oslo_utils import timeutils"},{"line_number":43,"context_line":"from threading import Timer"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"f532dae9_05ad4249","line":41,"range":{"start_line":39,"start_character":0,"end_line":41,"end_character":24},"in_reply_to":"92593851_34961967","updated":"2023-12-08 10:51:54.000000000","message":"Done","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"d49ce3e1d201d5f43d0aef112a7f7f16d6de35f4","unresolved":true,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        return connect_info"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _close_connection(self, tsock, host, port, called_from\u003d\"timer\"):"},{"line_number":156,"context_line":"        if tsock:"},{"line_number":157,"context_line":"            try:"},{"line_number":158,"context_line":"                tsock.shutdown(socket.SHUT_RDWR)"}],"source_content_type":"text/x-python","patch_set":2,"id":"62ec3796_ef5945e4","line":155,"range":{"start_line":155,"start_character":51,"end_line":155,"end_character":62},"updated":"2023-12-04 12:27:45.000000000","message":"need to remove","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"3655cdd6fc2c994f87daddf9a35476ef1d20fd85","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        return connect_info"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _close_connection(self, tsock, host, port, called_from\u003d\"timer\"):"},{"line_number":156,"context_line":"        if tsock:"},{"line_number":157,"context_line":"            try:"},{"line_number":158,"context_line":"                tsock.shutdown(socket.SHUT_RDWR)"}],"source_content_type":"text/x-python","patch_set":2,"id":"805662b0_b8cc7ca6","line":155,"range":{"start_line":155,"start_character":51,"end_line":155,"end_character":62},"in_reply_to":"62ec3796_ef5945e4","updated":"2023-12-08 10:51:54.000000000","message":"Done","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"d49ce3e1d201d5f43d0aef112a7f7f16d6de35f4","unresolved":true,"context_lines":[{"line_number":287,"context_line":"                ))"},{"line_number":288,"context_line":"                Timer(time_to_close_conn, self._close_connection,"},{"line_number":289,"context_line":"                          [tsock, host, port]).start()"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"            self.do_proxy(tsock)"},{"line_number":292,"context_line":"        except Exception:"},{"line_number":293,"context_line":"            self._close_connection(tsock, host, port, called_from\u003d\u0027ex\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7d01cfd5_c77804a6","line":290,"updated":"2023-12-04 12:27:45.000000000","message":"should we set timer to -10 sec, and at that time, we can do tsock.send(\"connection will close in 10 sec\"), and front end app can run a count down ?","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"77c5cdc9eef741c80c140eeab179599d024583f6","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                ))"},{"line_number":288,"context_line":"                Timer(time_to_close_conn, self._close_connection,"},{"line_number":289,"context_line":"                          [tsock, host, port]).start()"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"            self.do_proxy(tsock)"},{"line_number":292,"context_line":"        except Exception:"},{"line_number":293,"context_line":"            self._close_connection(tsock, host, port, called_from\u003d\u0027ex\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"4734bdf0_a6b48476","line":290,"in_reply_to":"270c0b79_bd07435e","updated":"2024-02-14 05:38:48.000000000","message":"Acknowledged","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28d2658389d8c3422e8f8b67bba1b00c10076f2f","unresolved":true,"context_lines":[{"line_number":287,"context_line":"                ))"},{"line_number":288,"context_line":"                Timer(time_to_close_conn, self._close_connection,"},{"line_number":289,"context_line":"                          [tsock, host, port]).start()"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"            self.do_proxy(tsock)"},{"line_number":292,"context_line":"        except Exception:"},{"line_number":293,"context_line":"            self._close_connection(tsock, host, port, called_from\u003d\u0027ex\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"270c0b79_bd07435e","line":290,"in_reply_to":"7d01cfd5_c77804a6","updated":"2024-02-13 09:37:43.000000000","message":"no i dont think thats really a good idea.\nits likely that that would break the client as we are injecting messages into the protocol that they would not expect so we should not try and send messages to the client like that","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"d49ce3e1d201d5f43d0aef112a7f7f16d6de35f4","unresolved":true,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"            self.do_proxy(tsock)"},{"line_number":292,"context_line":"        except Exception:"},{"line_number":293,"context_line":"            self._close_connection(tsock, host, port, called_from\u003d\u0027ex\u0027)"},{"line_number":294,"context_line":"            raise"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def socket(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"4f85f404_37c4a1e1","line":293,"range":{"start_line":293,"start_character":54,"end_line":293,"end_character":65},"updated":"2023-12-04 12:27:45.000000000","message":"this","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"3655cdd6fc2c994f87daddf9a35476ef1d20fd85","unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"            self.do_proxy(tsock)"},{"line_number":292,"context_line":"        except Exception:"},{"line_number":293,"context_line":"            self._close_connection(tsock, host, port, called_from\u003d\u0027ex\u0027)"},{"line_number":294,"context_line":"            raise"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def socket(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"691a4e9c_115a84d0","line":293,"range":{"start_line":293,"start_character":54,"end_line":293,"end_character":65},"in_reply_to":"4f85f404_37c4a1e1","updated":"2023-12-08 10:51:54.000000000","message":"Done","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a03b095c479c2199b1779fda6c6031c6b67acebe","unresolved":true,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return connect_info"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _close_connection(self, tsock, host, port):"},{"line_number":154,"context_line":"        if tsock:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                tsock.shutdown(socket.SHUT_RDWR)"}],"source_content_type":"text/x-python","patch_set":8,"id":"a44595d0_d54d6ba6","line":153,"updated":"2024-01-22 14:52:48.000000000","message":"In your existing unit tests you mock out the Timer, which is fine, so I think we need to add a couple of unit tests for this method, and then IMO the test coverage should be sufficient.","commit_id":"4f878e028abb8e6e49016d18b507742689f7311b"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"cd944c967e7a96d9529a02960a4550555e911c4e","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        return connect_info"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _close_connection(self, tsock, host, port):"},{"line_number":154,"context_line":"        if tsock:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                tsock.shutdown(socket.SHUT_RDWR)"}],"source_content_type":"text/x-python","patch_set":8,"id":"f846f0e4_5019eaaf","line":153,"in_reply_to":"a44595d0_d54d6ba6","updated":"2024-01-23 08:30:02.000000000","message":"ack, done","commit_id":"4f878e028abb8e6e49016d18b507742689f7311b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":true,"context_lines":[{"line_number":157,"context_line":"            except OSError:"},{"line_number":158,"context_line":"                pass"},{"line_number":159,"context_line":"            finally:"},{"line_number":160,"context_line":"                if tsock.fileno() !\u003d -1:"},{"line_number":161,"context_line":"                    tsock.close()"},{"line_number":162,"context_line":"                    self.vmsg(_(\"%(host)s:%(port)s: \""},{"line_number":163,"context_line":"                        \"Websocket client or target closed\") %"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba36dfc2_e26d0f1a","line":160,"range":{"start_line":160,"start_character":37,"end_line":160,"end_character":39},"updated":"2024-02-20 17:31:42.000000000","message":"nit: i would prefer to use a constnat here but ok.\n\ni assume the file decriptor number is set to -1 if the clent has disconnected already before the timer has expired.","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"be15e6095ad50b9043ea790ecdeb47a6d27ef4bc","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            except OSError:"},{"line_number":158,"context_line":"                pass"},{"line_number":159,"context_line":"            finally:"},{"line_number":160,"context_line":"                if tsock.fileno() !\u003d -1:"},{"line_number":161,"context_line":"                    tsock.close()"},{"line_number":162,"context_line":"                    self.vmsg(_(\"%(host)s:%(port)s: \""},{"line_number":163,"context_line":"                        \"Websocket client or target closed\") %"}],"source_content_type":"text/x-python","patch_set":16,"id":"1d5ea9bb_6430d027","line":160,"range":{"start_line":160,"start_character":37,"end_line":160,"end_character":39},"in_reply_to":"ba36dfc2_e26d0f1a","updated":"2024-02-22 17:21:48.000000000","message":"Acknowledged","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":true,"context_lines":[{"line_number":162,"context_line":"                    self.vmsg(_(\"%(host)s:%(port)s: \""},{"line_number":163,"context_line":"                        \"Websocket client or target closed\") %"},{"line_number":164,"context_line":"                        {\u0027host\u0027: host, \u0027port\u0027: port})"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            # If the connection has not closed yet, try to create a new"},{"line_number":167,"context_line":"            # connection, that will for sure fail if the token has expired."},{"line_number":168,"context_line":"            self.new_websocket_client()"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def new_websocket_client(self):"},{"line_number":171,"context_line":"        \"\"\"Called after a new WebSocket connection has been established.\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"d85ab99c_0e671cfe","line":168,"range":{"start_line":165,"start_character":6,"end_line":168,"end_character":39},"updated":"2024-02-20 17:31:42.000000000","message":"am not _close_connection should not try to create a new connection","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"be15e6095ad50b9043ea790ecdeb47a6d27ef4bc","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                    self.vmsg(_(\"%(host)s:%(port)s: \""},{"line_number":163,"context_line":"                        \"Websocket client or target closed\") %"},{"line_number":164,"context_line":"                        {\u0027host\u0027: host, \u0027port\u0027: port})"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            # If the connection has not closed yet, try to create a new"},{"line_number":167,"context_line":"            # connection, that will for sure fail if the token has expired."},{"line_number":168,"context_line":"            self.new_websocket_client()"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def new_websocket_client(self):"},{"line_number":171,"context_line":"        \"\"\"Called after a new WebSocket connection has been established.\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"0c79c7ff_c8227c02","line":168,"range":{"start_line":165,"start_character":6,"end_line":168,"end_character":39},"in_reply_to":"d85ab99c_0e671cfe","updated":"2024-02-22 17:21:48.000000000","message":"Acknowledged","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"12360b99ed22b19d9a333a605b4dbff727722919","unresolved":true,"context_lines":[{"line_number":151,"context_line":"        return connect_info"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _close_connection(self, tsock, host, port):"},{"line_number":154,"context_line":"        if tsock:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":157,"context_line":"            except OSError:"}],"source_content_type":"text/x-python","patch_set":18,"id":"f3f11228_0ade6909","line":154,"range":{"start_line":154,"start_character":8,"end_line":154,"end_character":17},"updated":"2024-02-22 16:36:35.000000000","message":"so i think we should jsut remove this if and the else\n\nso just have this be\n```\n            try:\n                tsock.shutdown(socket.SHUT_RDWR)\n            except OSError:\n                pass\n            finally:\n                if tsock.fileno() !\u003d -1:\n                  tsock.close()\n                    self.vmsg(_(\"%(host)s:%(port)s: \"\n                        \"Websocket client or target closed\") %\n                        {\u0027host\u0027: host, \u0027port\u0027: port})\n```\n\ntock is not an optional parmater to the function so it should never be None","commit_id":"8fde98d93386c7436176ba170a87b63129b855cd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a82e1dc661bdee2ece874e5c229189bea46ad8c4","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        return connect_info"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _close_connection(self, tsock, host, port):"},{"line_number":154,"context_line":"        if tsock:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":157,"context_line":"            except OSError:"}],"source_content_type":"text/x-python","patch_set":18,"id":"a0296b1e_aea72452","line":154,"range":{"start_line":154,"start_character":8,"end_line":154,"end_character":17},"in_reply_to":"e246997e_74343b0d","updated":"2024-02-23 11:33:04.000000000","message":"Done","commit_id":"8fde98d93386c7436176ba170a87b63129b855cd"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"be15e6095ad50b9043ea790ecdeb47a6d27ef4bc","unresolved":true,"context_lines":[{"line_number":151,"context_line":"        return connect_info"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _close_connection(self, tsock, host, port):"},{"line_number":154,"context_line":"        if tsock:"},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                tsock.shutdown(socket.SHUT_RDWR)"},{"line_number":157,"context_line":"            except OSError:"}],"source_content_type":"text/x-python","patch_set":18,"id":"e246997e_74343b0d","line":154,"range":{"start_line":154,"start_character":8,"end_line":154,"end_character":17},"in_reply_to":"f3f11228_0ade6909","updated":"2024-02-22 17:21:48.000000000","message":"Done, updated, thanks","commit_id":"8fde98d93386c7436176ba170a87b63129b855cd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b0bb1c4eb8fe762c08cd1596b6f3b25ea9d477ef","unresolved":true,"context_lines":[{"line_number":280,"context_line":"            if CONF.consoleauth.enforce_session_timeout:"},{"line_number":281,"context_line":"                conn_timeout \u003d connect_info.expires - timeutils.utcnow_ts()"},{"line_number":282,"context_line":"                LOG.info(("},{"line_number":283,"context_line":"                    f\"{conn_timeout} seconds to terminate connection.\""},{"line_number":284,"context_line":"                ))"},{"line_number":285,"context_line":"                threading.Timer(conn_timeout, self._close_connection,"},{"line_number":286,"context_line":"                          [tsock, host, port]).start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"4273919b_2b709074","line":283,"range":{"start_line":283,"start_character":20,"end_line":283,"end_character":37},"updated":"2024-02-27 11:25:37.000000000","message":"I\u0027m not sure LOG.info accepts to directly pass f-strings. Could you please use the existing pattern ? Also, I don\u0027t see the i18n `_` method.\n```\nLOG.info(_(\"foo %s\", something))\n```","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e91b7c1c29206bfa35b566689b7a11c3de5e2773","unresolved":false,"context_lines":[{"line_number":280,"context_line":"            if CONF.consoleauth.enforce_session_timeout:"},{"line_number":281,"context_line":"                conn_timeout \u003d connect_info.expires - timeutils.utcnow_ts()"},{"line_number":282,"context_line":"                LOG.info(("},{"line_number":283,"context_line":"                    f\"{conn_timeout} seconds to terminate connection.\""},{"line_number":284,"context_line":"                ))"},{"line_number":285,"context_line":"                threading.Timer(conn_timeout, self._close_connection,"},{"line_number":286,"context_line":"                          [tsock, host, port]).start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a77e217_ebca5075","line":283,"range":{"start_line":283,"start_character":20,"end_line":283,"end_character":37},"in_reply_to":"2a0ae4bf_289f8564","updated":"2024-02-27 13:45:36.000000000","message":"Done","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"943c4abd9f0374d3926cf505f9f889308c835591","unresolved":true,"context_lines":[{"line_number":280,"context_line":"            if CONF.consoleauth.enforce_session_timeout:"},{"line_number":281,"context_line":"                conn_timeout \u003d connect_info.expires - timeutils.utcnow_ts()"},{"line_number":282,"context_line":"                LOG.info(("},{"line_number":283,"context_line":"                    f\"{conn_timeout} seconds to terminate connection.\""},{"line_number":284,"context_line":"                ))"},{"line_number":285,"context_line":"                threading.Timer(conn_timeout, self._close_connection,"},{"line_number":286,"context_line":"                          [tsock, host, port]).start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"2a0ae4bf_289f8564","line":283,"range":{"start_line":283,"start_character":20,"end_line":283,"end_character":37},"in_reply_to":"3ac30279_73806764","updated":"2024-02-27 13:06:28.000000000","message":"we do not translates logs anymore so LOG.info(_(\"foo %s\", something)) is wrong\n\nthe fstring will be rendered before being passed to the log function so yes this works.\n\nthe extra () is not needed  so this should just be\n\n```\nLOG.info(\n     f\"{conn_timeout} seconds to terminate connection.\")\n```","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c32d726570a7459ef4ac4ee76d05279e47a918d5","unresolved":true,"context_lines":[{"line_number":280,"context_line":"            if CONF.consoleauth.enforce_session_timeout:"},{"line_number":281,"context_line":"                conn_timeout \u003d connect_info.expires - timeutils.utcnow_ts()"},{"line_number":282,"context_line":"                LOG.info(("},{"line_number":283,"context_line":"                    f\"{conn_timeout} seconds to terminate connection.\""},{"line_number":284,"context_line":"                ))"},{"line_number":285,"context_line":"                threading.Timer(conn_timeout, self._close_connection,"},{"line_number":286,"context_line":"                          [tsock, host, port]).start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"3ac30279_73806764","line":283,"range":{"start_line":283,"start_character":20,"end_line":283,"end_character":37},"in_reply_to":"4273919b_2b709074","updated":"2024-02-27 12:56:00.000000000","message":"on using \"_(\" pre-commit says - N319 Don\u0027t translate logs\n\nwith fstring msg looks this below in logs\n`Feb 27 12:06:42 amit-devstack nova-novncproxy[1653758]: \u003cINFO nova.console.websocketproxy [None req-44e54cb2-3335-4fd6-befc-a910140b2455 None None] 52 seconds to terminate connection.`\n\nI tested with below, it works same, if its must I can respin.\n`LOG.info(\u0027%s seconds to terminate connection.\u0027, conn_timeout)`","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"}],"nova/db/main/models.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1119ef3681240fb7aa473b624d76f42a4e704f25","unresolved":true,"context_lines":[{"line_number":1176,"context_line":"    port \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":1177,"context_line":"    internal_access_path \u003d sa.Column(sa.String(255))"},{"line_number":1178,"context_line":"    instance_uuid \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":1179,"context_line":"    expires \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":1180,"context_line":"    access_url_base \u003d sa.Column(sa.String(255))"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"    instance \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":1,"id":"fe4f7cf4_16baa33d","line":1179,"updated":"2023-11-28 18:41:00.000000000","message":"[4] The DB stores the expiration date time...","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"    port \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":1177,"context_line":"    internal_access_path \u003d sa.Column(sa.String(255))"},{"line_number":1178,"context_line":"    instance_uuid \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":1179,"context_line":"    expires \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":1180,"context_line":"    access_url_base \u003d sa.Column(sa.String(255))"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"    instance \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":1,"id":"0bd0259f_1d3edd32","line":1179,"in_reply_to":"fe4f7cf4_16baa33d","updated":"2023-12-04 12:04:59.000000000","message":"Acknowledged","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"}],"nova/objects/console_auth_token.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1119ef3681240fb7aa473b624d76f42a4e704f25","unresolved":true,"context_lines":[{"line_number":52,"context_line":"        # database. A hash of the token is stored instead and is not a"},{"line_number":53,"context_line":"        # field on the object."},{"line_number":54,"context_line":"        \u0027token\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":55,"context_line":"    }"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @property"},{"line_number":58,"context_line":"    def access_url(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"0918b911_11f52ff2","line":55,"updated":"2023-11-28 18:41:00.000000000","message":"[5] But the object doesn\u0027t have a field for the expiration time. If we add one, we can have the expiration time directly in the ConsoleAuthToken...","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # database. A hash of the token is stored instead and is not a"},{"line_number":53,"context_line":"        # field on the object."},{"line_number":54,"context_line":"        \u0027token\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":55,"context_line":"    }"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @property"},{"line_number":58,"context_line":"    def access_url(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"adeb4e3d_cad139ff","line":55,"in_reply_to":"0918b911_11f52ff2","updated":"2023-12-04 12:04:59.000000000","message":"Acknowledged","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1119ef3681240fb7aa473b624d76f42a4e704f25","unresolved":true,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        if db_obj is not None:"},{"line_number":151,"context_line":"            db_obj[\u0027token\u0027] \u003d token"},{"line_number":152,"context_line":"            obj \u003d cls._from_db_object(context, cls(), db_obj)"},{"line_number":153,"context_line":"            LOG.debug(\"Validated token - console connection is \""},{"line_number":154,"context_line":"                      \"%(console)s\","},{"line_number":155,"context_line":"                      {\u0027console\u0027: strutils.mask_password(obj)})"}],"source_content_type":"text/x-python","patch_set":1,"id":"50150383_e7513643","line":152,"updated":"2023-11-28 18:41:00.000000000","message":"[3] Which pulls the token objects from the database...","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"aae2dd4a63e0c98f76e452d45e82117e0cfe2b5a","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        if db_obj is not None:"},{"line_number":151,"context_line":"            db_obj[\u0027token\u0027] \u003d token"},{"line_number":152,"context_line":"            obj \u003d cls._from_db_object(context, cls(), db_obj)"},{"line_number":153,"context_line":"            LOG.debug(\"Validated token - console connection is \""},{"line_number":154,"context_line":"                      \"%(console)s\","},{"line_number":155,"context_line":"                      {\u0027console\u0027: strutils.mask_password(obj)})"}],"source_content_type":"text/x-python","patch_set":1,"id":"cca84d67_4f23cd21","line":152,"in_reply_to":"50150383_e7513643","updated":"2023-12-04 12:04:59.000000000","message":"Acknowledged","commit_id":"bb9a835a755aa8b63aaab88d45a16ed52911a044"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"b7e0d9028a46479c8f55f918772e59eef4897095","unresolved":true,"context_lines":[{"line_number":37,"context_line":"    # Version 1.0: Initial version"},{"line_number":38,"context_line":"    # Version 1.1: Add clean_expired_console_auths method."},{"line_number":39,"context_line":"    #              The clean_expired_console_auths_for_host method"},{"line_number":40,"context_line":"    #              was deprecated."},{"line_number":41,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"92ce73f5_43710819","line":40,"updated":"2023-12-05 16:20:11.000000000","message":"You\u0027ll need to bump the object version here because of the new field.","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c217683e9177b0da3272673e19d2392cc4db7f4f","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    # Version 1.0: Initial version"},{"line_number":38,"context_line":"    # Version 1.1: Add clean_expired_console_auths method."},{"line_number":39,"context_line":"    #              The clean_expired_console_auths_for_host method"},{"line_number":40,"context_line":"    #              was deprecated."},{"line_number":41,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"f0badf80_3c2f098d","line":40,"in_reply_to":"4efd7c0a_08a5a5c7","updated":"2024-01-17 09:52:51.000000000","message":"Done","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"60fdc95083f01cca6fca499d162d6ecb065393af","unresolved":true,"context_lines":[{"line_number":37,"context_line":"    # Version 1.0: Initial version"},{"line_number":38,"context_line":"    # Version 1.1: Add clean_expired_console_auths method."},{"line_number":39,"context_line":"    #              The clean_expired_console_auths_for_host method"},{"line_number":40,"context_line":"    #              was deprecated."},{"line_number":41,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"4efd7c0a_08a5a5c7","line":40,"in_reply_to":"92ce73f5_43710819","updated":"2023-12-08 05:02:07.000000000","message":"Acknowledged","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"78385e1525b7676f54e6c626463530663d2fda11","unresolved":true,"context_lines":[{"line_number":40,"context_line":"    #              was deprecated."},{"line_number":41,"context_line":"    # Version 1.2: Add expires field."},{"line_number":42,"context_line":"    #              This is to see token expire time."},{"line_number":43,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    fields \u003d {"},{"line_number":46,"context_line":"        \u0027id\u0027: fields.IntegerField(),"}],"source_content_type":"text/x-python","patch_set":11,"id":"aa66113e_0cf25f3f","line":43,"updated":"2024-02-11 23:04:18.000000000","message":"I don\u0027t think we need to worry about rolling upgrades and RPC, \u0027cuz as far as I can tell this object stays on the controllers and never travels over the wire to the computes... @melwittt right?","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"b59101264eebd497bad527db97ccdf507dcedb4c","unresolved":true,"context_lines":[{"line_number":40,"context_line":"    #              was deprecated."},{"line_number":41,"context_line":"    # Version 1.2: Add expires field."},{"line_number":42,"context_line":"    #              This is to see token expire time."},{"line_number":43,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    fields \u003d {"},{"line_number":46,"context_line":"        \u0027id\u0027: fields.IntegerField(),"}],"source_content_type":"text/x-python","patch_set":11,"id":"dbb45f3e_78a19552","line":43,"in_reply_to":"388dfb99_d4cdcea1","updated":"2024-02-22 07:13:11.000000000","message":"Done","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28d2658389d8c3422e8f8b67bba1b00c10076f2f","unresolved":true,"context_lines":[{"line_number":40,"context_line":"    #              was deprecated."},{"line_number":41,"context_line":"    # Version 1.2: Add expires field."},{"line_number":42,"context_line":"    #              This is to see token expire time."},{"line_number":43,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    fields \u003d {"},{"line_number":46,"context_line":"        \u0027id\u0027: fields.IntegerField(),"}],"source_content_type":"text/x-python","patch_set":11,"id":"fe91932a_11acfe35","line":43,"in_reply_to":"aa66113e_0cf25f3f","updated":"2024-02-13 09:37:43.000000000","message":"if we add a field we bump the version period.\nalso im not sure if this is passed to the compute agent.\n\nthe console url show action is handeled by an rpc to the compute manager which returns a url with the auth token so if your sugesting we can skip the verion bump in veneral no we cant and should not even if its just between contoler services.","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"406000f93443856c929931dcb2dd68d21bfb4628","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    #              was deprecated."},{"line_number":41,"context_line":"    # Version 1.2: Add expires field."},{"line_number":42,"context_line":"    #              This is to see token expire time."},{"line_number":43,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    fields \u003d {"},{"line_number":46,"context_line":"        \u0027id\u0027: fields.IntegerField(),"}],"source_content_type":"text/x-python","patch_set":11,"id":"642f1d6e_334e147c","line":43,"in_reply_to":"dbb45f3e_78a19552","updated":"2024-02-22 16:41:14.000000000","message":"Done","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":true,"context_lines":[{"line_number":40,"context_line":"    #              was deprecated."},{"line_number":41,"context_line":"    # Version 1.2: Add expires field."},{"line_number":42,"context_line":"    #              This is to see token expire time."},{"line_number":43,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    fields \u003d {"},{"line_number":46,"context_line":"        \u0027id\u0027: fields.IntegerField(),"}],"source_content_type":"text/x-python","patch_set":11,"id":"388dfb99_d4cdcea1","line":43,"in_reply_to":"fe91932a_11acfe35","updated":"2024-02-20 17:31:42.000000000","message":"this object change was not part of the original approved spec.\nhttps://specs.openstack.org/openstack/nova-specs/specs/2024.1/approved/enforce-remote-console-session-timeout.html\n\ni see why this was required for this functionatliy as it was not previously passed to the proxy.\n\nnormally when we change an object like this we would also need to update a corresponding notificaiotn object but in this case there is no equvalent object so we just need to modify this file.","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":true,"context_lines":[{"line_number":54,"context_line":"        # database. A hash of the token is stored instead and is not a"},{"line_number":55,"context_line":"        # field on the object."},{"line_number":56,"context_line":"        \u0027token\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":57,"context_line":"        \u0027expires\u0027: fields.IntegerField(nullable\u003dFalse),"},{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":16,"id":"e4113c9f_48140fbb","line":57,"updated":"2024-02-20 17:31:42.000000000","message":"You are missing the compatiblity code to handle back leveling this object.\n\nlike this\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/flavor.py#L230-L234\n\n```\ndef obj_make_compatible(self, primitive, target_version):\n        super().obj_make_compatible(primitive, target_version)\n        target_version \u003d versionutils.convert_version_to_tuple(target_version)\n        if target_version \u003c (1, 2):\n            primitive.pop(\u0027expires\u0027)\n```","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"b59101264eebd497bad527db97ccdf507dcedb4c","unresolved":true,"context_lines":[{"line_number":54,"context_line":"        # database. A hash of the token is stored instead and is not a"},{"line_number":55,"context_line":"        # field on the object."},{"line_number":56,"context_line":"        \u0027token\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":57,"context_line":"        \u0027expires\u0027: fields.IntegerField(nullable\u003dFalse),"},{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":16,"id":"cf8db56d_7360fa67","line":57,"in_reply_to":"8fa243fe_18084452","updated":"2024-02-22 07:13:11.000000000","message":"Added version compatible and its tests, thanks.","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a931ab4993912863cb8c2e2c25b79836a242a821","unresolved":true,"context_lines":[{"line_number":54,"context_line":"        # database. A hash of the token is stored instead and is not a"},{"line_number":55,"context_line":"        # field on the object."},{"line_number":56,"context_line":"        \u0027token\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":57,"context_line":"        \u0027expires\u0027: fields.IntegerField(nullable\u003dFalse),"},{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":16,"id":"c5cb8686_ce1238b4","line":57,"in_reply_to":"a18fd43a_f512fe18","updated":"2024-02-20 20:10:56.000000000","message":"we bumped the version once before to add remotable method but im actully not sure if that was corerct to do.\n\nwe do need to add obj_make_compatible if we change the fileds\n\nbumping the object version like that to add remotable method woudl really only make sense if we also bumped the rpc version.","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"4dded0c0adc29a73aaa7580855aa21d1408bfe42","unresolved":true,"context_lines":[{"line_number":54,"context_line":"        # database. A hash of the token is stored instead and is not a"},{"line_number":55,"context_line":"        # field on the object."},{"line_number":56,"context_line":"        \u0027token\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":57,"context_line":"        \u0027expires\u0027: fields.IntegerField(nullable\u003dFalse),"},{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":16,"id":"8fa243fe_18084452","line":57,"in_reply_to":"c5cb8686_ce1238b4","updated":"2024-02-21 13:52:12.000000000","message":"Yeah, we need to have obj_make_compatible() method for it.","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"406000f93443856c929931dcb2dd68d21bfb4628","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        # database. A hash of the token is stored instead and is not a"},{"line_number":55,"context_line":"        # field on the object."},{"line_number":56,"context_line":"        \u0027token\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":57,"context_line":"        \u0027expires\u0027: fields.IntegerField(nullable\u003dFalse),"},{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":16,"id":"829f9a7e_30175b8c","line":57,"in_reply_to":"cf8db56d_7360fa67","updated":"2024-02-22 16:41:14.000000000","message":"Done","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"c17faaf3bc90e0954fc7ae01a2dcd786dddbfc7a","unresolved":true,"context_lines":[{"line_number":54,"context_line":"        # database. A hash of the token is stored instead and is not a"},{"line_number":55,"context_line":"        # field on the object."},{"line_number":56,"context_line":"        \u0027token\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":57,"context_line":"        \u0027expires\u0027: fields.IntegerField(nullable\u003dFalse),"},{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":16,"id":"a18fd43a_f512fe18","line":57,"in_reply_to":"e4113c9f_48140fbb","updated":"2024-02-20 17:41:35.000000000","message":"So that was my point on L43. There is not existing obj_make_compatible, even though we\u0027ve already bumped the version once. Though I guess we bumped it for a method, so maybe that\u0027s why? I initially thought this object just didn\u0027t travel over RPC at all...","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b0bb1c4eb8fe762c08cd1596b6f3b25ea9d477ef","unresolved":true,"context_lines":[{"line_number":84,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":85,"context_line":"        super().obj_make_compatible(primitive, target_version)"},{"line_number":86,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":87,"context_line":"        if target_version \u003c (1, 2) and \u0027expires\u0027 in primitive:"},{"line_number":88,"context_line":"            primitive.pop(\u0027expires\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @staticmethod"},{"line_number":91,"context_line":"    def _from_db_object(context, obj, db_obj):"}],"source_content_type":"text/x-python","patch_set":19,"id":"8c0d1df3_91ae0ff1","line":88,"range":{"start_line":87,"start_character":0,"end_line":88,"end_character":36},"updated":"2024-02-27 11:25:37.000000000","message":"you could have simplified it by \n```\nif target_version \u003c (1, 2):\n   primitive.pop(\u0027expires\u0027, None)\n```","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e91b7c1c29206bfa35b566689b7a11c3de5e2773","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":85,"context_line":"        super().obj_make_compatible(primitive, target_version)"},{"line_number":86,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":87,"context_line":"        if target_version \u003c (1, 2) and \u0027expires\u0027 in primitive:"},{"line_number":88,"context_line":"            primitive.pop(\u0027expires\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @staticmethod"},{"line_number":91,"context_line":"    def _from_db_object(context, obj, db_obj):"}],"source_content_type":"text/x-python","patch_set":19,"id":"6f4d6d2c_950b7a71","line":88,"range":{"start_line":87,"start_character":0,"end_line":88,"end_character":36},"in_reply_to":"05e3dfb0_16095a26","updated":"2024-02-27 13:45:36.000000000","message":"Done","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c32d726570a7459ef4ac4ee76d05279e47a918d5","unresolved":true,"context_lines":[{"line_number":84,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":85,"context_line":"        super().obj_make_compatible(primitive, target_version)"},{"line_number":86,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":87,"context_line":"        if target_version \u003c (1, 2) and \u0027expires\u0027 in primitive:"},{"line_number":88,"context_line":"            primitive.pop(\u0027expires\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @staticmethod"},{"line_number":91,"context_line":"    def _from_db_object(context, obj, db_obj):"}],"source_content_type":"text/x-python","patch_set":19,"id":"b48ff092_b0581bc3","line":88,"range":{"start_line":87,"start_character":0,"end_line":88,"end_character":36},"in_reply_to":"8c0d1df3_91ae0ff1","updated":"2024-02-27 12:56:00.000000000","message":"we need to check if \u0027expires\u0027 is in premitive first.\nelse unit.objects.test_objects.TestObjectVersions.test_obj_make_compatible fails","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"943c4abd9f0374d3926cf505f9f889308c835591","unresolved":true,"context_lines":[{"line_number":84,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":85,"context_line":"        super().obj_make_compatible(primitive, target_version)"},{"line_number":86,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":87,"context_line":"        if target_version \u003c (1, 2) and \u0027expires\u0027 in primitive:"},{"line_number":88,"context_line":"            primitive.pop(\u0027expires\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @staticmethod"},{"line_number":91,"context_line":"    def _from_db_object(context, obj, db_obj):"}],"source_content_type":"text/x-python","patch_set":19,"id":"05e3dfb0_16095a26","line":88,"range":{"start_line":87,"start_character":0,"end_line":88,"end_character":36},"in_reply_to":"b48ff092_b0581bc3","updated":"2024-02-27 13:06:28.000000000","message":"no we dont\nthat why i provided an exmaple using pop insted of del\n\n```\nif target_version \u003c (1, 2):\n   primitive.pop(\u0027expires\u0027, None)\n```\n\nor even\n\n```\nif target_version \u003c (1, 2):\n   primitive.pop(\u0027expires\u0027)\n```\n\nis all that is needed as pop by default returns None if its not in the dict.\n\n\ni saw this but decided not to comment on it because it didnt break things even if i intentionaly gave you an example without the in check because pop woudl do it for us","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"}],"nova/tests/unit/console/test_websocketproxy.py":[{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c217683e9177b0da3272673e19d2392cc4db7f4f","unresolved":true,"context_lines":[{"line_number":203,"context_line":"            \u0027host\u0027: \u0027node1\u0027,"},{"line_number":204,"context_line":"            \u0027port\u0027: \u002710000\u0027,"},{"line_number":205,"context_line":"            \u0027console_type\u0027: \u0027novnc\u0027,"},{"line_number":206,"context_line":"            # \u0027access_url_base\u0027: \u0027https://example.net:6080\u0027,"},{"line_number":207,"context_line":"            \u0027expires\u0027: \u0027100\u0027,"},{"line_number":208,"context_line":"        }"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"37cc3822_a2dac6e0","line":206,"updated":"2024-01-17 09:52:51.000000000","message":"remove this","commit_id":"565f0a29d78c68b1630343ec61ba8d31d345f42e"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"77c5cdc9eef741c80c140eeab179599d024583f6","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            \u0027host\u0027: \u0027node1\u0027,"},{"line_number":204,"context_line":"            \u0027port\u0027: \u002710000\u0027,"},{"line_number":205,"context_line":"            \u0027console_type\u0027: \u0027novnc\u0027,"},{"line_number":206,"context_line":"            # \u0027access_url_base\u0027: \u0027https://example.net:6080\u0027,"},{"line_number":207,"context_line":"            \u0027expires\u0027: \u0027100\u0027,"},{"line_number":208,"context_line":"        }"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fd968b11_cdf33100","line":206,"in_reply_to":"301c495b_e6e31c6c","updated":"2024-02-14 05:38:48.000000000","message":"Done","commit_id":"565f0a29d78c68b1630343ec61ba8d31d345f42e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28d2658389d8c3422e8f8b67bba1b00c10076f2f","unresolved":true,"context_lines":[{"line_number":203,"context_line":"            \u0027host\u0027: \u0027node1\u0027,"},{"line_number":204,"context_line":"            \u0027port\u0027: \u002710000\u0027,"},{"line_number":205,"context_line":"            \u0027console_type\u0027: \u0027novnc\u0027,"},{"line_number":206,"context_line":"            # \u0027access_url_base\u0027: \u0027https://example.net:6080\u0027,"},{"line_number":207,"context_line":"            \u0027expires\u0027: \u0027100\u0027,"},{"line_number":208,"context_line":"        }"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"301c495b_e6e31c6c","line":206,"in_reply_to":"37cc3822_a2dac6e0","updated":"2024-02-13 09:37:43.000000000","message":"yes remove the comment the next revion this is still unadressed\n\nalthough if you revert the refactor this goes away too.","commit_id":"565f0a29d78c68b1630343ec61ba8d31d345f42e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"a03b095c479c2199b1779fda6c6031c6b67acebe","unresolved":true,"context_lines":[{"line_number":196,"context_line":"        \u0027Host\u0027: \u0027example.net:6080\u0027,"},{"line_number":197,"context_line":"    }"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    fake_conn_params \u003d {"},{"line_number":200,"context_line":"            \u0027id\u0027: 1,"},{"line_number":201,"context_line":"            \u0027token\u0027: \u0027123-456-789\u0027,"},{"line_number":202,"context_line":"            \u0027instance_uuid\u0027: uuids.instance,"}],"source_content_type":"text/x-python","patch_set":8,"id":"0ed501a1_74d73d25","line":199,"updated":"2024-01-22 14:52:48.000000000","message":"We talked about this on a video call, by centralizing this value, and doing params.update in the individual test methods, you\u0027re messing with the state of other unit tests, and making the results unpredictable depending on the order in which the test methods run. If you\u0027re doing to do this, copy.deepcopy in all the places below where you do params.update()","commit_id":"4f878e028abb8e6e49016d18b507742689f7311b"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"cd944c967e7a96d9529a02960a4550555e911c4e","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        \u0027Host\u0027: \u0027example.net:6080\u0027,"},{"line_number":197,"context_line":"    }"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    fake_conn_params \u003d {"},{"line_number":200,"context_line":"            \u0027id\u0027: 1,"},{"line_number":201,"context_line":"            \u0027token\u0027: \u0027123-456-789\u0027,"},{"line_number":202,"context_line":"            \u0027instance_uuid\u0027: uuids.instance,"}],"source_content_type":"text/x-python","patch_set":8,"id":"61ae8219_84e6faeb","line":199,"in_reply_to":"0ed501a1_74d73d25","updated":"2024-01-23 08:30:02.000000000","message":"create a copy obj first worked, thanks","commit_id":"4f878e028abb8e6e49016d18b507742689f7311b"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c217683e9177b0da3272673e19d2392cc4db7f4f","unresolved":true,"context_lines":[{"line_number":503,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":504,"context_line":"                \u0027_check_console_port\u0027)"},{"line_number":505,"context_line":"    @mock.patch(\u0027nova.objects.ConsoleAuthToken.validate\u0027)"},{"line_number":506,"context_line":"    def test_new_websocket_client_novnc_bad_console_type(self, validate,"},{"line_number":507,"context_line":"                                                         check_port):"},{"line_number":508,"context_line":"        params \u003d self.fake_conn_params"},{"line_number":509,"context_line":"        params.pop(\u0027expires\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"81ecb0bf_e53b5e7a","line":506,"updated":"2024-01-17 09:52:51.000000000","message":"this tc is failing in CI but passing locally.\n\nissue: websocketclient returning None instead of rasing validation error\n`\nTraceback (most recent call last):\n  File \"/usr/lib/python3.10/unittest/mock.py\", line 1379, in patched\n    return func(*newargs, **newkeywargs)\n  File \"/home/zuul/src/opendev.org/openstack/nova/nova/tests/unit/console/test_websocketproxy.py\", line 518, in test_new_websocket_client_novnc_bad_console_type\n    self.assertRaises(exception.ValidationError,\n  File \"/home/zuul/src/opendev.org/openstack/nova/.tox/shared/lib/python3.10/site-packages/testtools/testcase.py\", line 468, in assertRaises\n    self.assertThat(our_callable, matcher)\n  File \"/home/zuul/src/opendev.org/openstack/nova/.tox/shared/lib/python3.10/site-packages/testtools/testcase.py\", line 481, in assertThat\n    raise mismatch_error\ntesttools.matchers._impl.MismatchError: \u003cbound method NovaProxyRequestHandler.new_websocket_client of \u003cnova.console.websocketproxy.NovaProxyRequestHandler object at 0x7f38c60542e0\u003e\u003e returned None`","commit_id":"4f878e028abb8e6e49016d18b507742689f7311b"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"cd944c967e7a96d9529a02960a4550555e911c4e","unresolved":false,"context_lines":[{"line_number":503,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":504,"context_line":"                \u0027_check_console_port\u0027)"},{"line_number":505,"context_line":"    @mock.patch(\u0027nova.objects.ConsoleAuthToken.validate\u0027)"},{"line_number":506,"context_line":"    def test_new_websocket_client_novnc_bad_console_type(self, validate,"},{"line_number":507,"context_line":"                                                         check_port):"},{"line_number":508,"context_line":"        params \u003d self.fake_conn_params"},{"line_number":509,"context_line":"        params.pop(\u0027expires\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5e2929e9_59a5aea3","line":506,"in_reply_to":"81ecb0bf_e53b5e7a","updated":"2024-01-23 08:30:02.000000000","message":"same obj was getting updated for each tc","commit_id":"4f878e028abb8e6e49016d18b507742689f7311b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28d2658389d8c3422e8f8b67bba1b00c10076f2f","unresolved":true,"context_lines":[{"line_number":142,"context_line":"        self.wh.msg \u003d mock.MagicMock()"},{"line_number":143,"context_line":"        self.wh.do_proxy \u003d mock.MagicMock()"},{"line_number":144,"context_line":"        self.wh.headers \u003d mock.MagicMock()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    fake_header \u003d {"},{"line_number":147,"context_line":"        \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"},{"line_number":148,"context_line":"        \u0027Origin\u0027: \u0027https://example.net:6080\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"108c2b1a_6edaaf78","line":145,"updated":"2024-02-13 09:37:43.000000000","message":"you should be creating a test fixture for threading.Timer here\nso that we dont have timer created in general in any of the fucntions below if we ever change the default to true.","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"d736849106b81e5ce6cfd19cf142181bd1a6aacf","unresolved":true,"context_lines":[{"line_number":142,"context_line":"        self.wh.msg \u003d mock.MagicMock()"},{"line_number":143,"context_line":"        self.wh.do_proxy \u003d mock.MagicMock()"},{"line_number":144,"context_line":"        self.wh.headers \u003d mock.MagicMock()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    fake_header \u003d {"},{"line_number":147,"context_line":"        \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"},{"line_number":148,"context_line":"        \u0027Origin\u0027: \u0027https://example.net:6080\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"d115670d_fbd6c4d2","line":145,"in_reply_to":"108c2b1a_6edaaf78","updated":"2024-02-19 15:21:13.000000000","message":"ack, removed fake_timer added fixture","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"b59101264eebd497bad527db97ccdf507dcedb4c","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self.wh.msg \u003d mock.MagicMock()"},{"line_number":143,"context_line":"        self.wh.do_proxy \u003d mock.MagicMock()"},{"line_number":144,"context_line":"        self.wh.headers \u003d mock.MagicMock()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    fake_header \u003d {"},{"line_number":147,"context_line":"        \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"},{"line_number":148,"context_line":"        \u0027Origin\u0027: \u0027https://example.net:6080\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"e6016d44_63476554","line":145,"in_reply_to":"d115670d_fbd6c4d2","updated":"2024-02-22 07:13:11.000000000","message":"Done","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"78385e1525b7676f54e6c626463530663d2fda11","unresolved":true,"context_lines":[{"line_number":195,"context_line":"        \u0027Origin\u0027: \u0027https://example.net:6080\u0027,"},{"line_number":196,"context_line":"        \u0027Host\u0027: \u0027example.net:6080\u0027,"},{"line_number":197,"context_line":"    }"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    fake_conn_params \u003d {"},{"line_number":200,"context_line":"            \u0027id\u0027: 1,"},{"line_number":201,"context_line":"            \u0027token\u0027: \u0027123-456-789\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"ed1c14d9_cdb2789c","line":198,"updated":"2024-02-11 23:04:18.000000000","message":"I think we should avoid this kind of refactoring. The value is... dubious (unless you\u0027re careful and you copy.deepcopy, you\u0027ll end up messing with shared state), and the code churn makes backports more difficult (in and of itself this is not a bad thing, but there needs to be a clear advantage to churning code in this manner).\n\nI\u0027d rather you just add `access_url_base` where needed.","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"77c5cdc9eef741c80c140eeab179599d024583f6","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \u0027Origin\u0027: \u0027https://example.net:6080\u0027,"},{"line_number":196,"context_line":"        \u0027Host\u0027: \u0027example.net:6080\u0027,"},{"line_number":197,"context_line":"    }"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    fake_conn_params \u003d {"},{"line_number":200,"context_line":"            \u0027id\u0027: 1,"},{"line_number":201,"context_line":"            \u0027token\u0027: \u0027123-456-789\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"038fb550_d196e266","line":198,"in_reply_to":"2f6c5319_e9f9bac7","updated":"2024-02-14 05:38:48.000000000","message":"Done","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28d2658389d8c3422e8f8b67bba1b00c10076f2f","unresolved":true,"context_lines":[{"line_number":195,"context_line":"        \u0027Origin\u0027: \u0027https://example.net:6080\u0027,"},{"line_number":196,"context_line":"        \u0027Host\u0027: \u0027example.net:6080\u0027,"},{"line_number":197,"context_line":"    }"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    fake_conn_params \u003d {"},{"line_number":200,"context_line":"            \u0027id\u0027: 1,"},{"line_number":201,"context_line":"            \u0027token\u0027: \u0027123-456-789\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"2f6c5319_e9f9bac7","line":198,"in_reply_to":"ed1c14d9_cdb2789c","updated":"2024-02-13 09:37:43.000000000","message":"im not entirly agaisnt it but it should not be in this patch.\n\nthis could be pulled out into a seperate patch before this but i would be fine with dropping it.","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28d2658389d8c3422e8f8b67bba1b00c10076f2f","unresolved":true,"context_lines":[{"line_number":650,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":651,"context_line":"                \u0027_check_console_port\u0027)"},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.objects.ConsoleAuthToken.validate\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.Timer\u0027)"},{"line_number":654,"context_line":"    def test_enforce_session_timeout_timer_called("},{"line_number":655,"context_line":"            self, mock_timer, validate, check_port):"},{"line_number":656,"context_line":"        params \u003d copy.deepcopy(self.fake_conn_params)"}],"source_content_type":"text/x-python","patch_set":11,"id":"8955f960_405d84f2","line":653,"range":{"start_line":653,"start_character":3,"end_line":653,"end_character":52},"updated":"2024-02-13 09:37:43.000000000","message":"this is threading.Timer\n\nwe dont have a Timer module or class in  \u0027nova.console.websocketproxy\u0027","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"b59101264eebd497bad527db97ccdf507dcedb4c","unresolved":false,"context_lines":[{"line_number":650,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":651,"context_line":"                \u0027_check_console_port\u0027)"},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.objects.ConsoleAuthToken.validate\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.Timer\u0027)"},{"line_number":654,"context_line":"    def test_enforce_session_timeout_timer_called("},{"line_number":655,"context_line":"            self, mock_timer, validate, check_port):"},{"line_number":656,"context_line":"        params \u003d copy.deepcopy(self.fake_conn_params)"}],"source_content_type":"text/x-python","patch_set":11,"id":"044f4b2f_e0aa895e","line":653,"range":{"start_line":653,"start_character":3,"end_line":653,"end_character":52},"in_reply_to":"203421a6_5f970a66","updated":"2024-02-22 07:13:11.000000000","message":"Done","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"d736849106b81e5ce6cfd19cf142181bd1a6aacf","unresolved":true,"context_lines":[{"line_number":650,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":651,"context_line":"                \u0027_check_console_port\u0027)"},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.objects.ConsoleAuthToken.validate\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.Timer\u0027)"},{"line_number":654,"context_line":"    def test_enforce_session_timeout_timer_called("},{"line_number":655,"context_line":"            self, mock_timer, validate, check_port):"},{"line_number":656,"context_line":"        params \u003d copy.deepcopy(self.fake_conn_params)"}],"source_content_type":"text/x-python","patch_set":11,"id":"203421a6_5f970a66","line":653,"range":{"start_line":653,"start_character":3,"end_line":653,"end_character":52},"in_reply_to":"6082309b_a4847317","updated":"2024-02-19 15:21:13.000000000","message":"Acknowledged, removed mock","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"8f3a22832debf54f3fedb3f38f28a70114c420c2","unresolved":true,"context_lines":[{"line_number":650,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":651,"context_line":"                \u0027_check_console_port\u0027)"},{"line_number":652,"context_line":"    @mock.patch(\u0027nova.objects.ConsoleAuthToken.validate\u0027)"},{"line_number":653,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.Timer\u0027)"},{"line_number":654,"context_line":"    def test_enforce_session_timeout_timer_called("},{"line_number":655,"context_line":"            self, mock_timer, validate, check_port):"},{"line_number":656,"context_line":"        params \u003d copy.deepcopy(self.fake_conn_params)"}],"source_content_type":"text/x-python","patch_set":11,"id":"6082309b_a4847317","line":653,"range":{"start_line":653,"start_character":3,"end_line":653,"end_character":52},"in_reply_to":"8955f960_405d84f2","updated":"2024-02-14 10:15:37.000000000","message":"this is because we are importing Timer there, and at use, it will be mocked here,\n\nadded a fake_timer at top.","commit_id":"51b026f4d6bb37990de8e268deb1bedd7ffb8df4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":true,"context_lines":[{"line_number":31,"context_line":"from nova import test"},{"line_number":32,"context_line":"from nova.tests.unit import fake_console_auth_token as fake_ca"},{"line_number":33,"context_line":"from nova import utils"},{"line_number":34,"context_line":"import threading"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"a501a7ac_3cb038d7","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":16},"updated":"2024-02-20 17:31:42.000000000","message":"you do not need to import this to mock it\nsince your mocking it by name with \n\nself.useFixture(fixtures.MockPatch(\u0027threading.Timer\u0027, mock.DEFAULT))","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"b59101264eebd497bad527db97ccdf507dcedb4c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from nova import test"},{"line_number":32,"context_line":"from nova.tests.unit import fake_console_auth_token as fake_ca"},{"line_number":33,"context_line":"from nova import utils"},{"line_number":34,"context_line":"import threading"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"883e32fa_2c180a45","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":16},"in_reply_to":"a501a7ac_3cb038d7","updated":"2024-02-22 07:13:11.000000000","message":"Acknowledged, thanks\n\nwith previous chanage we need this because in tests we were directly checking `threading.Timer.assert`\nelse we get `NameError: name \u0027threading\u0027 is not defined`","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":true,"context_lines":[{"line_number":145,"context_line":"        self.wh.do_proxy \u003d mock.MagicMock()"},{"line_number":146,"context_line":"        self.wh.headers \u003d mock.MagicMock()"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        self.useFixture(fixtures.MockPatch(\u0027threading.Timer\u0027, mock.DEFAULT))"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    fake_header \u003d {"},{"line_number":151,"context_line":"        \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"0f619cad_0c78b6d6","line":148,"updated":"2024-02-20 17:31:42.000000000","message":"you should save this as \n\nself.treading_mock \u003d self.useFixture(fixtures.MockPatch(\u0027threading.Timer\u0027, mock.DEFAULT))","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"b59101264eebd497bad527db97ccdf507dcedb4c","unresolved":true,"context_lines":[{"line_number":145,"context_line":"        self.wh.do_proxy \u003d mock.MagicMock()"},{"line_number":146,"context_line":"        self.wh.headers \u003d mock.MagicMock()"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        self.useFixture(fixtures.MockPatch(\u0027threading.Timer\u0027, mock.DEFAULT))"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    fake_header \u003d {"},{"line_number":151,"context_line":"        \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"d8dea589_7079dc3b","line":148,"in_reply_to":"0f619cad_0c78b6d6","updated":"2024-02-22 07:13:11.000000000","message":"in other fixtures like Cinder and libvirt Fixture, its not saved in var, and later in test, obj is directly used.\n\n\nwith this change, later in test, was getting `AttributeError: \u0027MockPatch\u0027 object has no attribute \u0027Timer\u0027`, adding `.mock` works\nthanks","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"406000f93443856c929931dcb2dd68d21bfb4628","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        self.wh.do_proxy \u003d mock.MagicMock()"},{"line_number":146,"context_line":"        self.wh.headers \u003d mock.MagicMock()"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        self.useFixture(fixtures.MockPatch(\u0027threading.Timer\u0027, mock.DEFAULT))"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    fake_header \u003d {"},{"line_number":151,"context_line":"        \u0027cookie\u0027: \u0027token\u003d\"123-456-789\"\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"e74e2aa2_e81ae181","line":148,"in_reply_to":"d8dea589_7079dc3b","updated":"2024-02-22 16:41:14.000000000","message":"yep you need to use .mock to get the mock.\nlooks good to me.","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8639a583db5fb14a3df708bf1ecbed93ec731157","unresolved":true,"context_lines":[{"line_number":731,"context_line":"        self.flags(enforce_session_timeout\u003dTrue, group\u003d\u0027consoleauth\u0027)"},{"line_number":732,"context_line":"        # import rpdb;rpdb.set_trace()"},{"line_number":733,"context_line":"        self.wh.new_websocket_client()"},{"line_number":734,"context_line":"        threading.Timer.assert_called_once()"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":737,"context_line":"                \u0027_check_console_port\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"21c71a19_0ddbf85e","line":734,"updated":"2024-02-20 17:31:42.000000000","message":"then do self.threading_mock.Timer.assert_called_once()","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a931ab4993912863cb8c2e2c25b79836a242a821","unresolved":true,"context_lines":[{"line_number":731,"context_line":"        self.flags(enforce_session_timeout\u003dTrue, group\u003d\u0027consoleauth\u0027)"},{"line_number":732,"context_line":"        # import rpdb;rpdb.set_trace()"},{"line_number":733,"context_line":"        self.wh.new_websocket_client()"},{"line_number":734,"context_line":"        threading.Timer.assert_called_once()"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":737,"context_line":"                \u0027_check_console_port\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"64de1426_7ccdf395","line":734,"in_reply_to":"0dc0b960_0e266289","updated":"2024-02-20 20:10:56.000000000","message":"this is not the same\n\nbut looking at dan test code with a fresh set of eyes I would generally say that is not how we typically do it and it may be worth rewriting that too.\n\nI was going to say it looks sketchy as it\u0027s very close but not the same as a similar pattern.\n\nassigning a mock to an imported module.\n\nAssigning a mock to an imported module causes cross-test state sharing which causes race conditions in the tests.\n\nso threading.Timer\u003dsomthing would be problematic if you ever forgot to enable the mock and we have had gate issues caused by this in the past which is why i think this is a bad pattern to follow.\n\n\nthis does not rise to the level of a -1 by its self but the code be improved by following the safe patterns we normally use.","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"c17faaf3bc90e0954fc7ae01a2dcd786dddbfc7a","unresolved":true,"context_lines":[{"line_number":731,"context_line":"        self.flags(enforce_session_timeout\u003dTrue, group\u003d\u0027consoleauth\u0027)"},{"line_number":732,"context_line":"        # import rpdb;rpdb.set_trace()"},{"line_number":733,"context_line":"        self.wh.new_websocket_client()"},{"line_number":734,"context_line":"        threading.Timer.assert_called_once()"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":737,"context_line":"                \u0027_check_console_port\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"0dc0b960_0e266289","line":734,"in_reply_to":"21c71a19_0ddbf85e","updated":"2024-02-20 17:41:35.000000000","message":"I proposed this method to Amit because that\u0027s exactly how Dan Smith did it in his stable node UUID functional tests:\n\nhttps://review.opendev.org/c/openstack/nova/+/872441/2/nova/tests/functional/test_service.py#26\n\nImport virt.node, mock out the methods in it, and assert stuff about the mocked out methods using the node import directly.","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"406000f93443856c929931dcb2dd68d21bfb4628","unresolved":false,"context_lines":[{"line_number":731,"context_line":"        self.flags(enforce_session_timeout\u003dTrue, group\u003d\u0027consoleauth\u0027)"},{"line_number":732,"context_line":"        # import rpdb;rpdb.set_trace()"},{"line_number":733,"context_line":"        self.wh.new_websocket_client()"},{"line_number":734,"context_line":"        threading.Timer.assert_called_once()"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":737,"context_line":"                \u0027_check_console_port\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5c45cc9d_c8c4ac5a","line":734,"in_reply_to":"30f0867f_a6e7eb8a","updated":"2024-02-22 16:41:14.000000000","message":"Done","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"b59101264eebd497bad527db97ccdf507dcedb4c","unresolved":true,"context_lines":[{"line_number":731,"context_line":"        self.flags(enforce_session_timeout\u003dTrue, group\u003d\u0027consoleauth\u0027)"},{"line_number":732,"context_line":"        # import rpdb;rpdb.set_trace()"},{"line_number":733,"context_line":"        self.wh.new_websocket_client()"},{"line_number":734,"context_line":"        threading.Timer.assert_called_once()"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":737,"context_line":"                \u0027_check_console_port\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"30f0867f_a6e7eb8a","line":734,"in_reply_to":"39a21883_08a797d7","updated":"2024-02-22 07:13:11.000000000","message":"updated","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"22311f1e1f789a3acc6c78694a519964412d24d5","unresolved":true,"context_lines":[{"line_number":731,"context_line":"        self.flags(enforce_session_timeout\u003dTrue, group\u003d\u0027consoleauth\u0027)"},{"line_number":732,"context_line":"        # import rpdb;rpdb.set_trace()"},{"line_number":733,"context_line":"        self.wh.new_websocket_client()"},{"line_number":734,"context_line":"        threading.Timer.assert_called_once()"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"    @mock.patch(\u0027nova.console.websocketproxy.NovaProxyRequestHandler.\u0027"},{"line_number":737,"context_line":"                \u0027_check_console_port\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"39a21883_08a797d7","line":734,"in_reply_to":"64de1426_7ccdf395","updated":"2024-02-20 20:30:31.000000000","message":"this is an example of the problematic pattern in case you ahve not seen that before.\n\nhttps://review.opendev.org/c/openstack/nova/+/655843/2/nova/tests/unit/test_rpc.py#b105\n\nthis is why i don\u0027t like doing assert via the import directly.\n\nits much eiser to leak state.\n\nthis patch and dans are not leaking state but i dont like haveing the congintive overhead of having to prove that to my self when reviewing code.","commit_id":"d365f714f38cdcd6afa852dd6d92e19e378f8782"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"be15e6095ad50b9043ea790ecdeb47a6d27ef4bc","unresolved":false,"context_lines":[{"line_number":775,"context_line":"    def test__close_connection_invalid_socket(self, mock_new_socket):"},{"line_number":776,"context_line":"        self.wh._close_connection(None, \"\", \"\")"},{"line_number":777,"context_line":"        mock_new_socket.assert_called_once()"},{"line_number":778,"context_line":""},{"line_number":779,"context_line":"    def test__close_connection_raise_OSError(self):"},{"line_number":780,"context_line":"        tsock \u003d mock.MagicMock()"},{"line_number":781,"context_line":"        self.wh.vmsg \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":18,"id":"88888b85_d9a265a9","line":778,"updated":"2024-02-22 17:21:48.000000000","message":"for close_connection, a valid tsock will be passed, removing this test.","commit_id":"8fde98d93386c7436176ba170a87b63129b855cd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b0bb1c4eb8fe762c08cd1596b6f3b25ea9d477ef","unresolved":true,"context_lines":[{"line_number":32,"context_line":"from nova.tests.unit import fake_console_auth_token as fake_ca"},{"line_number":33,"context_line":"from nova import utils"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"c5773a03_3a13ccda","line":35,"updated":"2024-02-27 11:25:37.000000000","message":"unnnecessary change","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e91b7c1c29206bfa35b566689b7a11c3de5e2773","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from nova.tests.unit import fake_console_auth_token as fake_ca"},{"line_number":33,"context_line":"from nova import utils"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"e25db3a7_ed269831","line":35,"in_reply_to":"901ebb63_a3edd70a","updated":"2024-02-27 13:45:36.000000000","message":"Done","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"943c4abd9f0374d3926cf505f9f889308c835591","unresolved":true,"context_lines":[{"line_number":32,"context_line":"from nova.tests.unit import fake_console_auth_token as fake_ca"},{"line_number":33,"context_line":"from nova import utils"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"901ebb63_a3edd70a","line":35,"in_reply_to":"b8ae1e26_a89ef102","updated":"2024-02-27 13:06:28.000000000","message":"pep8 requires 2 blank line before a clas or module level function its not related to the imports.\n\ni dont mind either way","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c32d726570a7459ef4ac4ee76d05279e47a918d5","unresolved":true,"context_lines":[{"line_number":32,"context_line":"from nova.tests.unit import fake_console_auth_token as fake_ca"},{"line_number":33,"context_line":"from nova import utils"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"b8ae1e26_a89ef102","line":35,"in_reply_to":"c5773a03_3a13ccda","updated":"2024-02-27 12:56:00.000000000","message":"I follow this from sometime now.\nnot sure if its still true, but it was a pep8 convention to use 2 blank lines after imports, I know pre-commit does not care about this as of now, but its looks clean too.","commit_id":"ab9ab4ee5cef2c8109849fa00bc8a811e0076257"}],"nova/tests/unit/objects/test_objects.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"b7e0d9028a46479c8f55f918772e59eef4897095","unresolved":true,"context_lines":[{"line_number":1085,"context_line":"    \u0027CellMappingList\u0027: \u00271.1-496ef79bb2ab41041fff8bcb57996352\u0027,"},{"line_number":1086,"context_line":"    \u0027ComputeNode\u0027: \u00271.19-af6bd29a6c3b225da436a0d8487096f2\u0027,"},{"line_number":1087,"context_line":"    \u0027ComputeNodeList\u0027: \u00271.17-52f3b0962b1c86b98590144463ebb192\u0027,"},{"line_number":1088,"context_line":"    \u0027ConsoleAuthToken\u0027: \u00271.1-8da320fb065080eb4d3c2e5c59f8bf52\u0027,"},{"line_number":1089,"context_line":"    \u0027CpuDiagnostics\u0027: \u00271.0-d256f2e442d1b837735fd17dfe8e3d47\u0027,"},{"line_number":1090,"context_line":"    \u0027Destination\u0027: \u00271.4-3b440d29459e2c98987ad5b25ad1cb2c\u0027,"},{"line_number":1091,"context_line":"    \u0027DeviceBus\u0027: \u00271.0-77509ea1ea0dd750d5864b9bd87d3f9d\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"f6215590_06dd66e0","line":1088,"updated":"2023-12-05 16:20:11.000000000","message":"Bump the version and change the hash here. The unit test output will tell you the new hash.","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c217683e9177b0da3272673e19d2392cc4db7f4f","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"    \u0027CellMappingList\u0027: \u00271.1-496ef79bb2ab41041fff8bcb57996352\u0027,"},{"line_number":1086,"context_line":"    \u0027ComputeNode\u0027: \u00271.19-af6bd29a6c3b225da436a0d8487096f2\u0027,"},{"line_number":1087,"context_line":"    \u0027ComputeNodeList\u0027: \u00271.17-52f3b0962b1c86b98590144463ebb192\u0027,"},{"line_number":1088,"context_line":"    \u0027ConsoleAuthToken\u0027: \u00271.1-8da320fb065080eb4d3c2e5c59f8bf52\u0027,"},{"line_number":1089,"context_line":"    \u0027CpuDiagnostics\u0027: \u00271.0-d256f2e442d1b837735fd17dfe8e3d47\u0027,"},{"line_number":1090,"context_line":"    \u0027Destination\u0027: \u00271.4-3b440d29459e2c98987ad5b25ad1cb2c\u0027,"},{"line_number":1091,"context_line":"    \u0027DeviceBus\u0027: \u00271.0-77509ea1ea0dd750d5864b9bd87d3f9d\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"47179fa4_9950dcf3","line":1088,"in_reply_to":"51e230f8_e4e16293","updated":"2024-01-17 09:52:51.000000000","message":"Done","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"60fdc95083f01cca6fca499d162d6ecb065393af","unresolved":true,"context_lines":[{"line_number":1085,"context_line":"    \u0027CellMappingList\u0027: \u00271.1-496ef79bb2ab41041fff8bcb57996352\u0027,"},{"line_number":1086,"context_line":"    \u0027ComputeNode\u0027: \u00271.19-af6bd29a6c3b225da436a0d8487096f2\u0027,"},{"line_number":1087,"context_line":"    \u0027ComputeNodeList\u0027: \u00271.17-52f3b0962b1c86b98590144463ebb192\u0027,"},{"line_number":1088,"context_line":"    \u0027ConsoleAuthToken\u0027: \u00271.1-8da320fb065080eb4d3c2e5c59f8bf52\u0027,"},{"line_number":1089,"context_line":"    \u0027CpuDiagnostics\u0027: \u00271.0-d256f2e442d1b837735fd17dfe8e3d47\u0027,"},{"line_number":1090,"context_line":"    \u0027Destination\u0027: \u00271.4-3b440d29459e2c98987ad5b25ad1cb2c\u0027,"},{"line_number":1091,"context_line":"    \u0027DeviceBus\u0027: \u00271.0-77509ea1ea0dd750d5864b9bd87d3f9d\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"51e230f8_e4e16293","line":1088,"in_reply_to":"f6215590_06dd66e0","updated":"2023-12-08 05:02:07.000000000","message":"Acknowledged","commit_id":"d1ccf228e0b698887d07bf757d0fa32a77fa6239"}]}
