)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"036e52ed35b362a4fa252a6e3ac9e1c3edb6c1b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"77b0509d_82da2e22","updated":"2024-12-09 15:25:58.000000000","message":"recheck unstable test?","commit_id":"4b395e7ca5ae9a0e4f46beb2e9796d2f22076991"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f8f8df82672e46bd32af125bc8cdef09c41a8719","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"10171062_bd26ceca","updated":"2024-12-09 15:28:39.000000000","message":"so\n\nwatcher.tests.common.test_utils.TestCommonUtils.test_async_compat\n-----------------------------------------------------------------\n\nCaptured traceback:\n~~~~~~~~~~~~~~~~~~~\n    Traceback (most recent call last):\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/watcher/tests/common/test_utils.py\", line 32, in test_async_compat\n    ret_val \u003d utils.async_compat_call(self.test_coro)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/watcher/common/utils.py\", line 202, in async_compat_call\n    return tpool.execute(tpool_wrapper)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py312/lib/python3.12/site-packages/eventlet/tpool.py\", line 117, in execute\n    rv \u003d e.wait()\n         ^^^^^^^^\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py312/lib/python3.12/site-packages/eventlet/event.py\", line 124, in wait\n    result \u003d hub.switch()\n             ^^^^^^^^^^^^\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py312/lib/python3.12/site-packages/eventlet/hubs/hub.py\", line 310, in switch\n    return self.greenlet.switch()\n           ^^^^^^^^^^^^^^^^^^^^^^\n\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py312/lib/python3.12/site-packages/eventlet/hubs/hub.py\", line 362, in run\n    self.wait(sleep_time)\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py312/lib/python3.12/site-packages/eventlet/hubs/poll.py\", line 80, in wait\n    presult \u003d self.do_poll(seconds)\n              ^^^^^^^^^^^^^^^^^^^^^\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py312/lib/python3.12/site-packages/eventlet/hubs/epolls.py\", line 31, in do_poll\n    return self.poll.poll(seconds)\n           ^^^^^^^^^^^^^^^^^^^^^^^\n\n    OverflowError: timeout is too large\n    \nis testing the async io compact code which im suspicious of in general.\n\nits possibel that the type may have changed between python versions but\n\nthat code is not modifed by this changes so this si a preexistign issues if its a real failure.","commit_id":"4b395e7ca5ae9a0e4f46beb2e9796d2f22076991"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"01f13d93cfae8beeff683b0bdfb1be6c0de097ee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9a0223e0_55bc647a","updated":"2024-12-10 00:32:25.000000000","message":"i need to rework this\n\nas i change how i call the base i keep moving between the version that fials to intialise the mainloop and the one that result in blocking calls on the main loop.\n\nso either we break continous auits or we block the eventlet main loop...","commit_id":"85dcb6db8c2eabbe685f54ad17f102ae5bdb961d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6c6479dfe77275238affb6dd7db0849feeb278ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"55740b2b_0c3cbec2","updated":"2024-12-10 00:44:23.000000000","message":"nope striping back to just the basclass order change thsi is still leading top blockign calls so i need to pull the poion back into the inti path and see if i can find how we are calling oslo.db form a context where the unpatched time modules is allowing time.sleep(0) to be a blocking call\n\nhttps://paste.opendev.org/show/bjjx0gs9obbEZlOzDfs3/\n\nunless im misreading that excption?","commit_id":"4d3df789ab39c1332435f91f045e10c55b59ceb7"}],"watcher/__init__.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"17cbdc1fd8d0902b099074e2b335718fc90754ba","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2cb72daf_244848c3","line":48,"updated":"2024-12-04 19:43:01.000000000","message":"this is useful for debuging in the gate, and perfectly valid to do as a test fixture.\n\nbut while this should never fire (if it does it means there is a bug) im not sure i want to keep this in the production code path.\n\nwhat do others think should i move this only into the unit tests as a fixture or shoudl i leave it here.\n\nim leaning toward test fixture.","commit_id":"78d7a7bbf8c9a6c68fd8fa7fc4ddf953f23afd44"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c2cf8c2e8f57585fb0a06316e58a26c614f36d92","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6bb099b1_bd81c21c","line":48,"in_reply_to":"2cb72daf_244848c3","updated":"2024-12-04 19:53:42.000000000","message":"for context if this is the first time people have seen poison fixture before.\n\nThe intent is to hard fail if an invalid situation occurs, i.e., if the background scheduler\u0027s main loop starts in a context where threading is not monkey-patched.\n\n\nthe goal of a poison fixture is to kill the current processes or test if its contract is violated.\n\nthe most typical types of poison fixtures we use in OpenStack are import poison fixtures that will hard fail if we forget to properly mock out improts of some moduels of functions.\n\ni.e. in the nova unit test we should never import libvirt we have a libvirt fixture so if a test imports libvirt it means we are missing a mock and our libvirt fixture is not being used.\n\nOther common examples are mocking POPEN or file access because, again, we should not be spawning subprocesses to invoke commands or reading arbitrary files in a unit test in general.\n\nthe call_or_raise function is technically a \"spy\" in that its a wrapper function that does a direct call through to the original function  but it provides a speace\nto inspect the function inputs or output  and can technial modify them if desired.\n\nin this case im injecting the contdioal poison check raise_not_patched as a precondtion to calling the poisoned function","commit_id":"78d7a7bbf8c9a6c68fd8fa7fc4ddf953f23afd44"}],"watcher/common/scheduling.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"608579574e564ba225a7d056548e2f54c05adbcf","unresolved":true,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def start(self):"},{"line_number":73,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":74,"context_line":"        background.BackgroundScheduler.start(self)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def stop(self):"},{"line_number":77,"context_line":"        \"\"\"Stop service.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"c8a2636b_c6898b81","side":"PARENT","line":74,"updated":"2024-12-04 18:14:27.000000000","message":"i think this call via a direct refernce ot the base class instead\nof \n\nsuper().start()\n\nmight be the issue.\n\ni think that result in _main_loop form BackgroundScheduler being sued instead of the one defiend in the subcalss.\n\nso this would have the side effect of not evenlet monkey patching when required.","commit_id":"811a704f809652af660b2ffd3a4c76e4196f930f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c5f3be5906944ec7250d459dc3d14ba92bf54eeb","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def start(self):"},{"line_number":73,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":74,"context_line":"        background.BackgroundScheduler.start(self)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def stop(self):"},{"line_number":77,"context_line":"        \"\"\"Stop service.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"18c45e22_f5cf5567","side":"PARENT","line":74,"in_reply_to":"936da41b_2ed424ae","updated":"2024-12-04 19:12:19.000000000","message":"Acknowledged","commit_id":"811a704f809652af660b2ffd3a4c76e4196f930f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"125da2ef69bc4a5ae1ba2e7bc0b2e5294001c13c","unresolved":true,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def start(self):"},{"line_number":73,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":74,"context_line":"        background.BackgroundScheduler.start(self)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def stop(self):"},{"line_number":77,"context_line":"        \"\"\"Stop service.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"936da41b_2ed424ae","side":"PARENT","line":74,"in_reply_to":"c8a2636b_c6898b81","updated":"2024-12-04 18:57:26.000000000","message":"oh this is not quite why this is being done this way.\n\nso ServiceBase in oslo service requires\n\n```\n\n    @abc.abstractmethod\n    def start(self):\n        \"\"\"Start service.\"\"\"\n\n```\n\nBackgroundScheduler is defiend as \n\n```\ndef start(self, *args, **kwargs):\n        if self._event is None or self._event.is_set():\n            self._event \u003d Event()\n```\n\nso this was converting the type signature.","commit_id":"811a704f809652af660b2ffd3a4c76e4196f930f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e30f8f1ace00dd8e588c59a8fd2d25c3c9e12b4c","unresolved":true,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def start(self):"},{"line_number":73,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":74,"context_line":"        background.BackgroundScheduler.start(self)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def stop(self):"},{"line_number":77,"context_line":"        \"\"\"Stop service.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"f0e58d03_54cbf5b4","side":"PARENT","line":74,"updated":"2024-12-04 19:19:53.000000000","message":"in addtion to resolving the signiture mismatch that is why this was doing a direct call via the baseclass and passing self.\n\nhowever background.BackgroundScheduler.start on the base class calls _main_loop\n\nand i think the probelm is basiclly that it was calling the _main_loop in teh BackgroundScheduler class not in this class.","commit_id":"811a704f809652af660b2ffd3a4c76e4196f930f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"494e3b0f0039f4c483d7bf843e70cc42fb36f66b","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def start(self):"},{"line_number":73,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":74,"context_line":"        background.BackgroundScheduler.start(self)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def stop(self):"},{"line_number":77,"context_line":"        \"\"\"Stop service.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"a8a21d8d_f22791c7","side":"PARENT","line":74,"in_reply_to":"f0e58d03_54cbf5b4","updated":"2024-12-06 15:46:15.000000000","message":"Acknowledged","commit_id":"811a704f809652af660b2ffd3a4c76e4196f930f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e30f8f1ace00dd8e588c59a8fd2d25c3c9e12b4c","unresolved":true,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class BackgroundSchedulerService("},{"line_number":53,"context_line":"        background.BackgroundScheduler, service.ServiceBase):"},{"line_number":54,"context_line":"    def __init__(self, gconfig\u003dNone, **options):"},{"line_number":55,"context_line":"        self.should_patch \u003d eventlet_helper.is_patched()"},{"line_number":56,"context_line":"        if options is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"60f7e847_ba0c864d","line":53,"updated":"2024-12-04 19:19:53.000000000","message":"so we are using multiple inheritance with a third party base class\nbackground.BackgroundScheduler that is _not_ a mixin and an abstract class.\n\n\nthat means that the order of the base classes is sginficant as it change the method resolution order when calling functions via self or super.\n\nmainly super.","commit_id":"78d7a7bbf8c9a6c68fd8fa7fc4ddf953f23afd44"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"494e3b0f0039f4c483d7bf843e70cc42fb36f66b","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class BackgroundSchedulerService("},{"line_number":53,"context_line":"        background.BackgroundScheduler, service.ServiceBase):"},{"line_number":54,"context_line":"    def __init__(self, gconfig\u003dNone, **options):"},{"line_number":55,"context_line":"        self.should_patch \u003d eventlet_helper.is_patched()"},{"line_number":56,"context_line":"        if options is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"d979f3ec_ca0c7d7f","line":53,"in_reply_to":"60f7e847_ba0c864d","updated":"2024-12-06 15:46:15.000000000","message":"Acknowledged","commit_id":"78d7a7bbf8c9a6c68fd8fa7fc4ddf953f23afd44"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"16c8abab39cd9979f03537944152adb1da3116c8","unresolved":true,"context_lines":[{"line_number":67,"context_line":"            # as we do not use eventlet_helper.patch() here to ensure"},{"line_number":68,"context_line":"            # eventlet.monkey_patch() is actually called."},{"line_number":69,"context_line":"            eventlet.monkey_patch()"},{"line_number":70,"context_line":"        super()._main_loop(self)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def start(self):"},{"line_number":73,"context_line":"        super().start(self)"}],"source_content_type":"text/x-python","patch_set":3,"id":"c83c1312_9e84f131","line":70,"updated":"2024-12-10 00:12:13.000000000","message":"interesting \n\nDec 09 16:24:17.765984 np0039304095 watcher-decision-engine[86575]: DEBUG oslo_concurrency.lockutils [None req-65cd721e-629b-450e-92e1-96d9780d7860 None None] Releasing lock \"singleton_lock\" {{(pid\u003d86575) lock /opt/stack/data/venv/lib/python3.12/site-packages/oslo_concurrency/lockutils.py:331}}\n\nDec 09 16:24:17.768815 np0039304095 watcher-decision-engine[86575]: Exception in thread APScheduler:\n\nDec 09 16:24:17.768815 np0039304095 watcher-decision-engine[86575]: Traceback (most recent call last):\n\nDec 09 16:24:17.768815 np0039304095 watcher-decision-engine[86575]:   File \"/usr/lib/python3.12/threading.py\", line 1073, in _bootstrap_inner\n\nDec 09 16:24:17.769232 np0039304095 watcher-decision-engine[86575]:     self.run()\n\nDec 09 16:24:17.769337 np0039304095 watcher-decision-engine[86575]:   File \"/usr/lib/python3.12/threading.py\", line 1010, in run\n\nDec 09 16:24:17.769599 np0039304095 watcher-decision-engine[86575]:     self._target(*self._args, **self._kwargs)\n\nDec 09 16:24:17.769680 np0039304095 watcher-decision-engine[86575]:   File \"/opt/stack/watcher/watcher/common/scheduling.py\", line 70, in _main_loop\n\nDec 09 16:24:17.769865 np0039304095 watcher-decision-engine[86575]:     super()._main_loop(self)\n\nDec 09 16:24:17.769942 np0039304095 watcher-decision-engine[86575]: TypeError: BlockingScheduler._main_loop() takes 1 positional argument but 2 were given\n\nDec 09 16:24:17.807809 np0039304095 watcher-decision-engine[86575]: Exception in thread APScheduler:\n\nDec 09 16:24:17.807809 np0039304095 watcher-decision-engine[86575]: Traceback (most recent call last):\n\nDec 09 16:24:17.807809 np0039304095 watcher-decision-engine[86575]:   File \"/usr/lib/python3.12/threading.py\", line 1073, in _bootstrap_inner\n\nDec 09 16:24:17.808172 np0039304095 watcher-decision-engine[86575]:     self.run()\n\nDec 09 16:24:17.808273 np0039304095 watcher-decision-engine[86575]:   File \"/usr/lib/python3.12/threading.py\", line 1010, in run\n\nDec 09 16:24:17.808722 np0039304095 watcher-decision-engine[86575]:     self._target(*self._args, **self._kwargs)\n\nDec 09 16:24:17.808887 np0039304095 watcher-decision-engine[86575]:   File \"/opt/stack/watcher/watcher/common/scheduling.py\", line 70, in _main_loop\n\nDec 09 16:24:17.808962 np0039304095 watcher-decision-engine[86575]:     super()._main_loop(self)\n\nDec 09 16:24:17.809030 np0039304095 watcher-decision-engine[86575]: TypeError: BlockingScheduler._main_loop() takes 1 positional argument but 2 were given\n\n\nso this is why i think the tempet test is failing\n\ni think i will need to call this via the explcilt base class\n\ni.e. \n\n background.BackgroundScheduler._main_loop(self)\n \nto have a form that works with the test poison and in the main code path.","commit_id":"4b395e7ca5ae9a0e4f46beb2e9796d2f22076991"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"01f13d93cfae8beeff683b0bdfb1be6c0de097ee","unresolved":true,"context_lines":[{"line_number":67,"context_line":"            # as we do not use eventlet_helper.patch() here to ensure"},{"line_number":68,"context_line":"            # eventlet.monkey_patch() is actually called."},{"line_number":69,"context_line":"            eventlet.monkey_patch()"},{"line_number":70,"context_line":"        super()._main_loop(self)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def start(self):"},{"line_number":73,"context_line":"        super().start(self)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0ba1c4_fe3eb06b","line":70,"in_reply_to":"c83c1312_9e84f131","updated":"2024-12-10 00:32:25.000000000","message":"if i revert back to this form it starts but reintroduced the issue\n\nhttps://paste.opendev.org/show/bjjx0gs9obbEZlOzDfs3/","commit_id":"4b395e7ca5ae9a0e4f46beb2e9796d2f22076991"}]}
