)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"793d439a173b2865a1c17eef9df97dfc7dc8cc0c","unresolved":true,"context_lines":[{"line_number":23,"context_line":"backgound tasks form running like reconsiling audits."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"This change adresses this by overloading the background scheduler _main_loop"},{"line_number":26,"context_line":"to monky patch the main loop if the calling thread was monkey patched."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Closes-Bug: #2086710"},{"line_number":29,"context_line":"Change-Id: I672c183274b0a17cb40d7b5ab8c313197760b5a0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"acf12fd6_3b59e088","line":26,"range":{"start_line":26,"start_character":3,"end_line":26,"end_character":8},"updated":"2024-11-19 14:31:22.000000000","message":"nit: monkey","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc4fe8d20a9712601c7fd93849a691450c93c08a","unresolved":false,"context_lines":[{"line_number":23,"context_line":"backgound tasks form running like reconsiling audits."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"This change adresses this by overloading the background scheduler _main_loop"},{"line_number":26,"context_line":"to monky patch the main loop if the calling thread was monkey patched."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Closes-Bug: #2086710"},{"line_number":29,"context_line":"Change-Id: I672c183274b0a17cb40d7b5ab8c313197760b5a0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"0227bfcf_d38264f5","line":26,"range":{"start_line":26,"start_character":3,"end_line":26,"end_character":8},"in_reply_to":"acf12fd6_3b59e088","updated":"2024-11-22 17:09:43.000000000","message":"Done","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"21d6d57f1c13ad27e8338a01e54600f416949078","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"87ea43e4_b15c38e9","updated":"2024-11-07 16:05:24.000000000","message":"the host i was dugging this on got repovisioned so i have lost my working env adn the split out patches.\n\ni had broken this up into a number of smaller commits.\n\nim going to redo that and push them seperatly then ill come back to this later.\n\nthe clip notes version is the existing unit tests are broken.\n\nthey are not monkey patched intially  but call code that invokes eventlet.swpan\nif the cmd tests run in the exectuor before the test that use eventlet.swapn then the process is monky patched as a side effect of the import of watcher.cmd\n\n\nim going to move forward by adding monkey patching of the unit tests.\nin the long term we shoudl look to split up the tests into two types\n\nfunctional tests that are monkey patched.\nunit tests that are not.\n\ni wont start on that now however.","commit_id":"fe5f9ec9bca4c88fc8794a0be6fbf372f430f5fe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"028495887c947e2b56c5fe2d7c68ffbdcbbb4d5f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"fb4c3a02_2da347cc","updated":"2024-11-19 18:35:25.000000000","message":"Why no test? Surely if there aren\u0027t already some tests around this code we should add some as part of this?","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d4e1c9f276cb4613dc6e29e3446fd9beda6ded4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ead16320_b7dcfbc8","updated":"2024-11-22 16:09:54.000000000","message":"Okay I don\u0027t see it in the unit reports either...","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"056b2db2b27a5581e479883505b08cf31eb39349","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"f86cf080_9b2d9954","updated":"2024-11-28 11:52:19.000000000","message":"Applied this patch in my env, at least for now, I don\u0027t see the issue in logs. Thanks","commit_id":"f07694ba6c75315dac1407c3751645de35ed14f4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f9af70ee84b8924389f58e45efb1df7905a40b48","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"b2cff7f2_72b4893c","updated":"2024-12-02 18:42:15.000000000","message":"the parent is now merged","commit_id":"f07694ba6c75315dac1407c3751645de35ed14f4"}],"watcher/common/scheduling.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"19779be8a6ddb00f57c50a0546162bcd57452a99","unresolved":true,"context_lines":[{"line_number":17,"context_line":"# limitations under the License."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from apscheduler import events"},{"line_number":20,"context_line":"from apscheduler.executors.pool import BasePoolExecutor"},{"line_number":21,"context_line":"from apscheduler.schedulers import background"},{"line_number":22,"context_line":"import futurist"},{"line_number":23,"context_line":"from oslo_service import service"}],"source_content_type":"text/x-python","patch_set":5,"id":"1bb3dc11_663088ec","side":"PARENT","line":20,"updated":"2024-11-19 14:48:12.000000000","message":"This is just applying the rule of only importing modules. \ntechnically unrelated but it was more relevant in previous iterations of this patch.","commit_id":"9abec18c8b0211d0c448b9c21fbebdc28f894275"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc4fe8d20a9712601c7fd93849a691450c93c08a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"# limitations under the License."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from apscheduler import events"},{"line_number":20,"context_line":"from apscheduler.executors.pool import BasePoolExecutor"},{"line_number":21,"context_line":"from apscheduler.schedulers import background"},{"line_number":22,"context_line":"import futurist"},{"line_number":23,"context_line":"from oslo_service import service"}],"source_content_type":"text/x-python","patch_set":5,"id":"52888929_2cffab23","side":"PARENT","line":20,"in_reply_to":"1bb3dc11_663088ec","updated":"2024-11-22 17:09:43.000000000","message":"Acknowledged","commit_id":"9abec18c8b0211d0c448b9c21fbebdc28f894275"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"793d439a173b2865a1c17eef9df97dfc7dc8cc0c","unresolved":true,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from oslo_service import service"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from watcher import eventlet as eventlet_helper"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"job_events \u003d events"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"62df0859_b7370891","line":29,"updated":"2024-11-19 14:31:22.000000000","message":"shouldn\u0027t all those imports be grouped into 3 groups?","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc4fe8d20a9712601c7fd93849a691450c93c08a","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from oslo_service import service"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from watcher import eventlet as eventlet_helper"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"job_events \u003d events"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"19995e3b_fa58b9d2","line":29,"in_reply_to":"4112a577_7e75dec3","updated":"2024-11-22 17:09:43.000000000","message":"Acknowledged","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"73fcdc4e5b6a8a250f796c95557cd92c4c4075a0","unresolved":true,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from oslo_service import service"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from watcher import eventlet as eventlet_helper"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"job_events \u003d events"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"4112a577_7e75dec3","line":29,"in_reply_to":"62df0859_b7370891","updated":"2024-11-19 14:37:27.000000000","message":"i always split `import ...`  and `form ...`\n\nmy brain just cant compute what hacking is lookign for otherwise.\n\nits too much work to change the hacking check but this is a continual pain point for me so if fix it in ever file i interact with as i go.\n\n\ndepending on the repo we either have 3 or 4 goroups\n\n```\nstandard lib\n\nthird paryty python\n\nthird party openstack\n\nproject opnetack\n```\n\nand with the slight tweak that i apply it becomes\n\n```\nimport stdlib\n\nfrom stdlib\n\nimport third-party\n\nfrom third-party\n\nimport other-openstack\n\nfrom other-openstack\n\nimport current-project\n\nfrom curent-project\n```\n\ni woudl like to eventually enforce this with tooling but its never been a high enough priority to automate.","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"2b92ad2fbd8da9383e42fee82a8431c2347cbfec","unresolved":true,"context_lines":[{"line_number":52,"context_line":"class BackgroundSchedulerService("},{"line_number":53,"context_line":"        service.ServiceBase, background.BackgroundScheduler):"},{"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:"},{"line_number":57,"context_line":"            options \u003d {\u0027executors\u0027: executors}"},{"line_number":58,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"e6797762_e7b2848c","line":55,"updated":"2024-11-22 12:22:43.000000000","message":"aren\u0027t we missing a negation here? I would think that should_patch would be true when is_patched is False (i.e. we have not patched before, so we need to patch now). I\u0027m not very familiar with the code base, so I could be wrong","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc4fe8d20a9712601c7fd93849a691450c93c08a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"class BackgroundSchedulerService("},{"line_number":53,"context_line":"        service.ServiceBase, background.BackgroundScheduler):"},{"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:"},{"line_number":57,"context_line":"            options \u003d {\u0027executors\u0027: executors}"},{"line_number":58,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"61ac2b23_cba9a4ad","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":0},"in_reply_to":"59a4d601_42101742","updated":"2024-11-22 17:09:43.000000000","message":"Acknowledged","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"5830696ea8b6020762cf285ea909b82c08ddcb45","unresolved":true,"context_lines":[{"line_number":52,"context_line":"class BackgroundSchedulerService("},{"line_number":53,"context_line":"        service.ServiceBase, background.BackgroundScheduler):"},{"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:"},{"line_number":57,"context_line":"            options \u003d {\u0027executors\u0027: executors}"},{"line_number":58,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"59a4d601_42101742","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":0},"in_reply_to":"679a6b44_be8319fb","updated":"2024-11-22 15:35:38.000000000","message":"ok, now I see where I was wrong with my assumption, I assumed the check was testing whether we had ever monkey patched. Thanks for the clarification!","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7861a6a1302afce58c602042a9c696fe2f26d196","unresolved":true,"context_lines":[{"line_number":52,"context_line":"class BackgroundSchedulerService("},{"line_number":53,"context_line":"        service.ServiceBase, background.BackgroundScheduler):"},{"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:"},{"line_number":57,"context_line":"            options \u003d {\u0027executors\u0027: executors}"},{"line_number":58,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"679a6b44_be8319fb","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":0},"in_reply_to":"e6797762_e7b2848c","updated":"2024-11-22 15:23:44.000000000","message":"no, so the problem is that if we have ever monkey patched we need to ensure that all thread within the same process are also patched.\nso if the main trhead that spawns the native background thread is patched then we need to also patch in the main loop.\n\nif we are using  a worker process instead of a worker thread then we would not need the seperate process to be consitent.\nthat is why i am not passing this boolean as a parameter to the executor main loop and wraping it with funtools.partial.","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"1a8815773db623bec355d3d7f0098f27cb521185","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if self.should_patch:"},{"line_number":65,"context_line":"            eventlet.monkey_patch()"},{"line_number":66,"context_line":"        super()._main_loop()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def start(self):"},{"line_number":69,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":70,"context_line":"        background.BackgroundScheduler.start(self)"}],"source_content_type":"text/x-python","patch_set":5,"id":"b2f2a21c_fd4d74ff","line":67,"updated":"2024-11-20 08:17:38.000000000","message":"as i went looking for it, leaving the link here in case it is useful for others (Sean added is_patched() and monkey_patch() earlier there: \nhttps://opendev.org/openstack/watcher/src/commit/1f8d06e075b5a6818e2a10c54acf7bf473284d63/watcher/eventlet.py#L20-L24 )","commit_id":"7fa3073a7e2cede393613a780c546055f5f1c52f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"40c2e753b9fb3fcd7851a3af483fd7b6da39c404","unresolved":true,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def stop(self):"},{"line_number":78,"context_line":"        \"\"\"Stop service.\"\"\""},{"line_number":79,"context_line":"        self.shutdown(wait\u003dself.wait_on_shutdown)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def wait(self):"},{"line_number":82,"context_line":"        \"\"\"Wait for service to complete.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"4ab51b4f_f7f4f16e","line":79,"updated":"2024-11-22 15:55:43.000000000","message":"Coverage report shows this didn\u0027t ever get called. In fact, it looks like your `common/test_scheduling` is never being run at all. Am I missing it?\n\nBut also, when will this ever be False? I don\u0027t see that it ever changes.","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8d60a96dba94847e2c5e4543f0035d60eb045115","unresolved":true,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def stop(self):"},{"line_number":78,"context_line":"        \"\"\"Stop service.\"\"\""},{"line_number":79,"context_line":"        self.shutdown(wait\u003dself.wait_on_shutdown)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def wait(self):"},{"line_number":82,"context_line":"        \"\"\"Wait for service to complete.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"617f5461_5868d95b","line":79,"in_reply_to":"3a6884a8_d8a28b2c","updated":"2024-11-22 16:23:44.000000000","message":"i should note that this change and adding wait_on_shutdown was only for testing so i can remove this that is proably better long term as i am not supper happy with the oslo service style lauch test.","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"122e7e56a7ca283488e41b1f79e60d6796ce2797","unresolved":true,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def stop(self):"},{"line_number":78,"context_line":"        \"\"\"Stop service.\"\"\""},{"line_number":79,"context_line":"        self.shutdown(wait\u003dself.wait_on_shutdown)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def wait(self):"},{"line_number":82,"context_line":"        \"\"\"Wait for service to complete.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a6884a8_d8a28b2c","line":79,"in_reply_to":"4ab51b4f_f7f4f16e","updated":"2024-11-22 16:07:43.000000000","message":"so this is only to allow the testing to funciton.\nbut let me take a look. i ran this locally with\n```\ntox -e py3 -- TestSchedulerMonkeyPatching\n```\nbut i have not run the coverage target.","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc4fe8d20a9712601c7fd93849a691450c93c08a","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def stop(self):"},{"line_number":78,"context_line":"        \"\"\"Stop service.\"\"\""},{"line_number":79,"context_line":"        self.shutdown(wait\u003dself.wait_on_shutdown)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def wait(self):"},{"line_number":82,"context_line":"        \"\"\"Wait for service to complete.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"aa1d3a2e_597e3cda","line":79,"in_reply_to":"5a9ed05d_81e7b6e1","updated":"2024-11-22 17:09:43.000000000","message":"Acknowledged","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f39de1a5eaa716fb7bc53a75f23fe731dc27915a","unresolved":true,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def stop(self):"},{"line_number":78,"context_line":"        \"\"\"Stop service.\"\"\""},{"line_number":79,"context_line":"        self.shutdown(wait\u003dself.wait_on_shutdown)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def wait(self):"},{"line_number":82,"context_line":"        \"\"\"Wait for service to complete.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a9ed05d_81e7b6e1","line":79,"in_reply_to":"617f5461_5868d95b","updated":"2024-11-22 16:32:15.000000000","message":"Yeah, if always true, better to just do `wait\u003dTrue` here I think.","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc4fe8d20a9712601c7fd93849a691450c93c08a","unresolved":true,"context_lines":[{"line_number":61,"context_line":"        super().__init__(gconfig or {}, **options)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _main_loop(self):"},{"line_number":64,"context_line":"        if self.should_patch:"},{"line_number":65,"context_line":"            # NOTE(sean-k-mooney): is_patched and monkey_patch form"},{"line_number":66,"context_line":"            # watcher.eventlet check a non thread local variable to early out"},{"line_number":67,"context_line":"            # as we do not use eventlet_helper.patch() here to ensure"}],"source_content_type":"text/x-python","patch_set":7,"id":"c924748b_6eb98181","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":2},"updated":"2024-11-22 17:09:43.000000000","message":"the only reason i have made this condtional is to not patch if you disable monkey patching in general.\n\nthat would only happen when debugging or when we start removing eventlet.","commit_id":"2ae3131082ede6636befbf6b5a25b135409daa81"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6dc0992022e20a03d5f7a3917546505b4b02e9d5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        super().__init__(gconfig or {}, **options)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _main_loop(self):"},{"line_number":64,"context_line":"        if self.should_patch:"},{"line_number":65,"context_line":"            # NOTE(sean-k-mooney): is_patched and monkey_patch form"},{"line_number":66,"context_line":"            # watcher.eventlet check a non thread local variable to early out"},{"line_number":67,"context_line":"            # as we do not use eventlet_helper.patch() here to ensure"}],"source_content_type":"text/x-python","patch_set":7,"id":"9e829520_ef4d84fd","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":2},"in_reply_to":"c924748b_6eb98181","updated":"2024-11-25 16:09:00.000000000","message":"Acknowledged","commit_id":"2ae3131082ede6636befbf6b5a25b135409daa81"}],"watcher/tests/common/test_scheduling.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8d60a96dba94847e2c5e4543f0035d60eb045115","unresolved":true,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def _cleanup_scheduler(self):"},{"line_number":35,"context_line":"        if self.started:"},{"line_number":36,"context_line":"            self.test_scheduler.shutdown()"},{"line_number":37,"context_line":"            self.started \u003d False"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _start_scheduler(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"c83586c5_1aa28450","line":36,"updated":"2024-11-22 16:23:44.000000000","message":"oh im not calling stop in the general case im directly calling shutdown\ni can update this to stop although that breaks my current testcase that laucnhes the schdler liek an oslo service.\n\ni could just remove that test case as it not really a unit test.\n\nill see if can make this work quickly but see my other commetns.","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3537a761595ebd16488c57b43ff416eba31e9fd1","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def _cleanup_scheduler(self):"},{"line_number":35,"context_line":"        if self.started:"},{"line_number":36,"context_line":"            self.test_scheduler.shutdown()"},{"line_number":37,"context_line":"            self.started \u003d False"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _start_scheduler(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"f2615f0d_e04bb76b","line":36,"in_reply_to":"c83586c5_1aa28450","updated":"2024-11-22 17:10:26.000000000","message":"Acknowledged","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8d60a96dba94847e2c5e4543f0035d60eb045115","unresolved":true,"context_lines":[{"line_number":48,"context_line":"    @mock.patch.object(scheduling.BackgroundSchedulerService, \u0027shutdown\u0027)"},{"line_number":49,"context_line":"    def test_scheduler_stop(self, mock_shutdown):"},{"line_number":50,"context_line":"        self._start_scheduler()"},{"line_number":51,"context_line":"        self.test_scheduler.stop()"},{"line_number":52,"context_line":"        mock_shutdown.assert_called_once_with(wait\u003dTrue)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @mock.patch.object(scheduling.BackgroundSchedulerService, \u0027_main_loop\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dc41da66_29a70d4d","line":51,"updated":"2024-11-22 16:23:44.000000000","message":"currently this is the only place im calling stop directly","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc4fe8d20a9712601c7fd93849a691450c93c08a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    @mock.patch.object(scheduling.BackgroundSchedulerService, \u0027shutdown\u0027)"},{"line_number":49,"context_line":"    def test_scheduler_stop(self, mock_shutdown):"},{"line_number":50,"context_line":"        self._start_scheduler()"},{"line_number":51,"context_line":"        self.test_scheduler.stop()"},{"line_number":52,"context_line":"        mock_shutdown.assert_called_once_with(wait\u003dTrue)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @mock.patch.object(scheduling.BackgroundSchedulerService, \u0027_main_loop\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"6a424ce8_4557390c","line":51,"in_reply_to":"b427d399_b216dfc0","updated":"2024-11-22 17:09:43.000000000","message":"Acknowledged","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f39de1a5eaa716fb7bc53a75f23fe731dc27915a","unresolved":true,"context_lines":[{"line_number":48,"context_line":"    @mock.patch.object(scheduling.BackgroundSchedulerService, \u0027shutdown\u0027)"},{"line_number":49,"context_line":"    def test_scheduler_stop(self, mock_shutdown):"},{"line_number":50,"context_line":"        self._start_scheduler()"},{"line_number":51,"context_line":"        self.test_scheduler.stop()"},{"line_number":52,"context_line":"        mock_shutdown.assert_called_once_with(wait\u003dTrue)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @mock.patch.object(scheduling.BackgroundSchedulerService, \u0027_main_loop\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"b427d399_b216dfc0","line":51,"in_reply_to":"dc41da66_29a70d4d","updated":"2024-11-22 16:32:15.000000000","message":"Right, I was trying to figure out why the coverage report doesn\u0027t show this as covered, and then realized that it seems like these tests aren\u0027t even running.","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8d60a96dba94847e2c5e4543f0035d60eb045115","unresolved":true,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_scheduler_monkey_patched_when_launched(self):"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        self.test_scheduler.wait_on_shutdown \u003d False"},{"line_number":94,"context_line":"        launcher \u003d watcher_service.launch(self.conf, self.test_scheduler)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        def work():"}],"source_content_type":"text/x-python","patch_set":6,"id":"f194a898_1d0b1a9d","line":93,"updated":"2024-11-22 16:23:44.000000000","message":"this is the only time its ever false\n\nits only heare becasue you cant stop the schduler form a greenthread that is runign on the executor your stoping.\n\nits  a bit of a hack but im thinking i should just drop this test case and the related changes.\n\nthis wa my last ditch attpemt to reproduce the failure after several hours of trying and it still could not so i dont think its adding much value.","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3537a761595ebd16488c57b43ff416eba31e9fd1","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_scheduler_monkey_patched_when_launched(self):"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        self.test_scheduler.wait_on_shutdown \u003d False"},{"line_number":94,"context_line":"        launcher \u003d watcher_service.launch(self.conf, self.test_scheduler)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        def work():"}],"source_content_type":"text/x-python","patch_set":6,"id":"50c7bc6f_1c16e0a6","line":93,"in_reply_to":"f194a898_1d0b1a9d","updated":"2024-11-22 17:10:26.000000000","message":"Acknowledged","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8d60a96dba94847e2c5e4543f0035d60eb045115","unresolved":true,"context_lines":[{"line_number":102,"context_line":"            nonlocal job"},{"line_number":103,"context_line":"            job.remove()"},{"line_number":104,"context_line":"            nonlocal launcher"},{"line_number":105,"context_line":"            launcher.stop()"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        self.test_scheduler.add_listener("},{"line_number":108,"context_line":"            job_canceler, events.EVENT_JOB_EXECUTED)"}],"source_content_type":"text/x-python","patch_set":6,"id":"be2221cb_ac426484","line":105,"updated":"2024-11-22 16:23:44.000000000","message":"this should call stop indirectly","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3537a761595ebd16488c57b43ff416eba31e9fd1","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            nonlocal job"},{"line_number":103,"context_line":"            job.remove()"},{"line_number":104,"context_line":"            nonlocal launcher"},{"line_number":105,"context_line":"            launcher.stop()"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        self.test_scheduler.add_listener("},{"line_number":108,"context_line":"            job_canceler, events.EVENT_JOB_EXECUTED)"}],"source_content_type":"text/x-python","patch_set":6,"id":"d88d53b0_31ba9521","line":105,"in_reply_to":"be2221cb_ac426484","updated":"2024-11-22 17:10:26.000000000","message":"Acknowledged","commit_id":"6a979d27981104eff4db81ff30453cfcfbf55a59"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"b01f0796afef2bd96ccb3a58f00b2c6aa884b7cb","unresolved":true,"context_lines":[{"line_number":83,"context_line":"        job \u003d self.test_scheduler.add_job(work, \u0027interval\u0027, seconds\u003d2)"},{"line_number":84,"context_line":"        self._start_scheduler()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        wait_for_job.wait()"},{"line_number":87,"context_line":"        self.assertTrue(loop_is_patched)"},{"line_number":88,"context_line":"        self.assertEqual(test_thread_id, job_thread_id)"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"95c75e64_e9045e01","line":86,"updated":"2024-11-25 07:18:41.000000000","message":"timing out here on last run https://531a3e63782aa6e9ec6d-b08d635a9941444d91f5e0463ea7a01d.ssl.cf5.rackcdn.com/933890/9/check/openstack-tox-py39/b8a3d67/job-output.txt\n\n```\n2024-11-22 18:03:02.981742 | ubuntu-focal | Captured traceback:\n2024-11-22 18:03:02.981765 | ubuntu-focal | ~~~~~~~~~~~~~~~~~~~\n2024-11-22 18:03:02.981788 | ubuntu-focal |     Traceback (most recent call last):\n2024-11-22 18:03:02.981812 | ubuntu-focal |\n2024-11-22 18:03:02.981835 | ubuntu-focal |       File \"/home/zuul/src/opendev.org/openstack/watcher/watcher/tests/common/test_scheduling.py\", line 86, in test_main_loop_is_monkey_patched\n2024-11-22 18:03:02.981859 | ubuntu-focal |     wait_for_job.wait()\n2024-11-22 18:03:02.981882 | ubuntu-focal |\n```\n\ni noticed you aren\u0027t mocking the scheduler for this particular test but I am not sure if that is on purpose (kind of that is the point of this test but I don\u0027t fully follow all the things here so not sure what the problem is)","commit_id":"b096f8e9c4d785edfe7c20d6ac27ad4aa8a1ee0b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6dc0992022e20a03d5f7a3917546505b4b02e9d5","unresolved":true,"context_lines":[{"line_number":83,"context_line":"        job \u003d self.test_scheduler.add_job(work, \u0027interval\u0027, seconds\u003d2)"},{"line_number":84,"context_line":"        self._start_scheduler()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        wait_for_job.wait()"},{"line_number":87,"context_line":"        self.assertTrue(loop_is_patched)"},{"line_number":88,"context_line":"        self.assertEqual(test_thread_id, job_thread_id)"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"c23f5741_57f0f2d8","line":86,"in_reply_to":"6c74c921_ab8f2fb4","updated":"2024-11-25 16:09:00.000000000","message":"locally the current version in ps 10 seams to be stable\n\n{0} watcher.tests.common.test_scheduling.TestSchedulerMonkeyPatching.test_main_loop_is_monkey_patched [2.004027s] ... ok\n\n\u003d\u003d\u003d\u003d\u003d\u003d\nTotals\n\u003d\u003d\u003d\u003d\u003d\u003d\nRan: 425 tests in 2666.5558 sec.\n - Passed: 425\n - Skipped: 0\n - Expected Fail: 0\n - Unexpected Success: 0\n - Failed: 0\nSum of execute time for each test: 851.4401 sec.\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nWorker Balance\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n - Worker 0 (425 tests) \u003d\u003e 0:44:26.555842\n \nbut the issue is in the api with the lower perfomance and heigher load.","commit_id":"b096f8e9c4d785edfe7c20d6ac27ad4aa8a1ee0b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dd7f2f21fea0fe7107047e8d144e19fe270a5377","unresolved":true,"context_lines":[{"line_number":83,"context_line":"        job \u003d self.test_scheduler.add_job(work, \u0027interval\u0027, seconds\u003d2)"},{"line_number":84,"context_line":"        self._start_scheduler()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        wait_for_job.wait()"},{"line_number":87,"context_line":"        self.assertTrue(loop_is_patched)"},{"line_number":88,"context_line":"        self.assertEqual(test_thread_id, job_thread_id)"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"6c74c921_ab8f2fb4","line":86,"in_reply_to":"95c75e64_e9045e01","updated":"2024-11-25 15:19:40.000000000","message":"that was intentional yes.\n\nim considerign remvoing this test however.\n\ni have one more locall attempt that ill push shortly.\n\nif that does not sablize this test ill remove it and just invoke the main_loop directly.\n\ni do not actully need to run it via the schduler ot assert what this test is tryign to cover i just did it that way to be closer to reality but form a pure unit testing perspecteve callign it directly woudl be more correct.\n\ncurrently this is more of a functional test then a unit test.","commit_id":"b096f8e9c4d785edfe7c20d6ac27ad4aa8a1ee0b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"31c25a2c37e560bd8a9c637840767064f42f9f39","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        job \u003d self.test_scheduler.add_job(work, \u0027interval\u0027, seconds\u003d2)"},{"line_number":84,"context_line":"        self._start_scheduler()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        wait_for_job.wait()"},{"line_number":87,"context_line":"        self.assertTrue(loop_is_patched)"},{"line_number":88,"context_line":"        self.assertEqual(test_thread_id, job_thread_id)"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"a5ab70cb_fddb2c86","line":86,"in_reply_to":"c23f5741_57f0f2d8","updated":"2024-11-25 18:28:40.000000000","message":"Acknowledged","commit_id":"b096f8e9c4d785edfe7c20d6ac27ad4aa8a1ee0b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"65bd5ae4ef9588877033f9e3cbc65f2992b207a7","unresolved":true,"context_lines":[{"line_number":90,"context_line":"        self.assertEqual("},{"line_number":91,"context_line":"            eventlet_helper.is_patched(), self.test_scheduler.should_patch)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def test_scheduler_eventlet_monkey_patch_called_when_should_patch(self):"},{"line_number":94,"context_line":"        wait_for_job \u003d threading.Event()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        def work():"}],"source_content_type":"text/x-python","patch_set":10,"id":"91149ee3_169fea27","line":93,"updated":"2024-11-25 16:29:26.000000000","message":"this also seems stable locally \n\n{0} watcher.tests.common.test_scheduling.TestSchedulerMonkeyPatching.test_scheduler_eventlet_monkey_patch_called_when_should_patch [2.002574s] ... ok\n\n\u003d\u003d\u003d\u003d\u003d\u003d\nTotals\n\u003d\u003d\u003d\u003d\u003d\u003d\nRan: 186 tests in 1151.2985 sec.\n - Passed: 186\n - Skipped: 0\n - Expected Fail: 0\n - Unexpected Success: 0\n - Failed: 0\nSum of execute time for each test: 372.6581 sec.\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nWorker Balance\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n - Worker 0 (186 tests) \u003d\u003e 0:19:11.298491","commit_id":"28f96eefd4ec8b96e1c500898578b6d9ea9e8c54"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"31c25a2c37e560bd8a9c637840767064f42f9f39","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        self.assertEqual("},{"line_number":91,"context_line":"            eventlet_helper.is_patched(), self.test_scheduler.should_patch)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def test_scheduler_eventlet_monkey_patch_called_when_should_patch(self):"},{"line_number":94,"context_line":"        wait_for_job \u003d threading.Event()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        def work():"}],"source_content_type":"text/x-python","patch_set":10,"id":"da3ae3eb_881dfa03","line":93,"in_reply_to":"0a0efdfc_841f2559","updated":"2024-11-25 18:28:40.000000000","message":"Done","commit_id":"28f96eefd4ec8b96e1c500898578b6d9ea9e8c54"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a697f5fba22a503e03d24c84f7b2a78cf5a72365","unresolved":true,"context_lines":[{"line_number":90,"context_line":"        self.assertEqual("},{"line_number":91,"context_line":"            eventlet_helper.is_patched(), self.test_scheduler.should_patch)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def test_scheduler_eventlet_monkey_patch_called_when_should_patch(self):"},{"line_number":94,"context_line":"        wait_for_job \u003d threading.Event()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        def work():"}],"source_content_type":"text/x-python","patch_set":10,"id":"0a0efdfc_841f2559","line":93,"in_reply_to":"91149ee3_169fea27","updated":"2024-11-25 16:34:00.000000000","message":"but it fails in ci\n\n\nwatcher.tests.common.test_scheduling.TestSchedulerMonkeyPatching.test_scheduler_eventlet_monkey_patch_called_when_should_patch\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_scheduling.py\", line 109, in test_scheduler_eventlet_monkey_patch_called_when_should_patch\n    wait_for_job.wait()\n\n      File \"/usr/lib/python3.9/threading.py\", line 574, in wait\n    signaled \u003d self._cond.wait(timeout)\n\n      File \"/usr/lib/python3.9/threading.py\", line 312, in wait\n    waiter.acquire()\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py39/lib/python3.9/site-packages/eventlet/semaphore.py\", line 115, in acquire\n    hubs.get_hub().switch()\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py39/lib/python3.9/site-packages/eventlet/hubs/hub.py\", line 310, in switch\n    return self.greenlet.switch()\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py39/lib/python3.9/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/py39/lib/python3.9/site-packages/eventlet/hubs/poll.py\", line 77, in wait\n    time.sleep(seconds)\n\n      File \"/home/zuul/src/opendev.org/openstack/watcher/.tox/py39/lib/python3.9/site-packages/fixtures/_fixtures/timeout.py\", line 52, in signal_handler\n    raise TimeoutException()\n\n    fixtures._fixtures.timeout.TimeoutException\n\nok im going to remove these test cases and simplry to avoid starting the schduler.\n\nill","commit_id":"28f96eefd4ec8b96e1c500898578b6d9ea9e8c54"}]}
