)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6130f436fe9e755f992ce4defb175ba75aa94b30","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously swift.common.utils monkey patched logging.thread,"},{"line_number":10,"context_line":"logging.threading, and logging._lock upon import with eventlet"},{"line_number":11,"context_line":"threading modules, but that is no longer reasonable or necessary."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I6f35ad41414898fb7dc5da422f524eb52ff2940f"},{"line_number":14,"context_line":"Closes-Bug: #1380815"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"08844d4e_0df93578","line":11,"updated":"2022-04-11 15:02:00.000000000","message":"I need to get a better grasp on the \u0027whys\u0027...\n\nWe don\u0027t need to pre-emptively patch the logging._lock because it will get patched retrospectively by the eventlet patcher when eventlet_monkey_patch is called...so does this imply we should not use eventlet threads with logging unless we\u0027ve eventlet_monkey_patch\u0027ed?\n\nWe don\u0027t need to patch logging.threading because we don\u0027t try to log threads.\n\nWe don\u0027t need to patch logging.thread because (a) it py2 only and (b) we don\u0027t try to log threads.\n\nBut I\u0027m not sure why we don\u0027t still need to patch logging.threading for the handler locks?","commit_id":"d3267fd7c5508f536624ebc2935abec32032fc01"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"238e4e5f0c44afcff129df7ec3ce6df5821d1126","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously swift.common.utils monkey patched logging.thread,"},{"line_number":10,"context_line":"logging.threading, and logging._lock upon import with eventlet"},{"line_number":11,"context_line":"threading modules, but that is no longer reasonable or necessary."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I6f35ad41414898fb7dc5da422f524eb52ff2940f"},{"line_number":14,"context_line":"Closes-Bug: #1380815"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"e16fb94f_ebb6ed35","line":11,"in_reply_to":"08844d4e_0df93578","updated":"2022-09-21 19:32:08.000000000","message":"mostly because we don\u0027t do a lot of runtime reconfiguraiton of loggers - but also because logging to syslog over udp can\u0027t interleave so it\u0027s naturally serialized w/o the need for a lock.","commit_id":"d3267fd7c5508f536624ebc2935abec32032fc01"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"609f8bb4e0cc2db35268010a32a53cd6fd12b071","unresolved":true,"context_lines":[{"line_number":13,"context_line":"With py3, the existing logging._lock is not patched by eventlet,"},{"line_number":14,"context_line":"unless the logging module is reloaded. The existing lock is not"},{"line_number":15,"context_line":"tracked by the gc so would not be found by eventlet\u0027s"},{"line_number":16,"context_line":"green_existing_locks()."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Instead we group all monkey patching into utils function and apply"},{"line_number":19,"context_line":"patching consistently across daemons and WSGI servers."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"24918a7d_287fefde","line":16,"updated":"2023-02-27 22:07:44.000000000","message":"is this still relevant?","commit_id":"8c083ee8ba6d26c1267387a00344de236ee6d59f"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"dfba355824e95b65d840fba87c8141cf15accb33","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"171e191c_331700e8","updated":"2022-04-08 21:24:43.000000000","message":"Heck yeah.","commit_id":"d3267fd7c5508f536624ebc2935abec32032fc01"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"93b99fabd041c1ec808bda945a61bf097029ea1e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"d8cc8c1f_2a6bd2ea","updated":"2022-04-11 15:11:40.000000000","message":"I think swift will continue to run fine on py2 and py3 with this change - and it will be importable without breaking logging and giving you a bunch of eventlet tracebacks even if the code importing swift.common.utils helpers has a totally different concurrency framework.\n\nIf stopping doing the bad thing causes any real problems that would be a (surprising) bug - and we would fix it w/o any evil import side effects.\n\nI am not concerned about correct thread_id logging or the locks created in the logging module - swift doesn\u0027t do any concurrent manipulation of logging handlers/etc during runtime and the only handler we *do* care about (our syslog handler) uses a big fat pipe mutex so we can log across greenthreads and os threads w/o anyone blocking each other.\n\nI know change can be scary - that\u0027s why this has stayed this way so long.  We need to land this change and move forward.","commit_id":"d3267fd7c5508f536624ebc2935abec32032fc01"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1d9717e96630d19974c2f2472eb1b2393acf3e0b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"83a8c6af_4be21ae8","updated":"2022-04-08 19:38:50.000000000","message":"I think we managed to wait this one out, i\u0027m not aware of any issues we still need to work around with eventlet and stdlib logging module level imports anymore.\n\nThis change has no effect on swift\u0027s logging in practice/production and is a long requested quality of life imporovement for anyone importing swift.common modules into non-eventlet based projects.","commit_id":"d3267fd7c5508f536624ebc2935abec32032fc01"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"96fd12f433671ae5f4ae210bfc16d20cd22acf73","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"83c05ba9_ef8731d1","updated":"2022-04-11 17:25:01.000000000","message":"I\u0027ll also try to add a test for the logThreadId being disabled ","commit_id":"d3267fd7c5508f536624ebc2935abec32032fc01"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"65cc15b00149a188b4012a5043dbf6b1ef70ad40","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"7b0e6adf_1da69973","updated":"2022-04-11 17:24:04.000000000","message":"we should probably patch \"thread\" in the daemons; maybe we could go ahead and do socket too just to keep it consistent, but it probably doesn\u0027t matter cause we always use explicit green sockets (but it *might* be relevant just cause \"patching thread\" is the best way to \"fix logging\")","commit_id":"d3267fd7c5508f536624ebc2935abec32032fc01"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"936d3dc5de349d6f27433c72f4163ff265c51b36","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"dc30645f_cf5c50c6","updated":"2022-04-13 21:15:15.000000000","message":"(BTW I think this is safe to re-check)","commit_id":"e2b2a2c3062fa78236bdda868542b8b9923e726c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"bd17880338decabb9da6ec943be909a22654bb69","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"91b2fb4e_7524d786","updated":"2022-04-18 22:31:32.000000000","message":"recheck","commit_id":"e2b2a2c3062fa78236bdda868542b8b9923e726c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6fda85799f5916f155f7b43d09203277e31bd1b0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"44f1de44_b81c4ff3","updated":"2022-04-22 15:43:02.000000000","message":"should we also be adding a call to eventlet_monkey_patch in internal_client, or do we assume that anywhere it is used should take care of that?","commit_id":"e2b2a2c3062fa78236bdda868542b8b9923e726c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8732d322b217df34ed70bc5a2e768011fa4fe9b0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ecd079ee_4ed6237a","in_reply_to":"44f1de44_b81c4ff3","updated":"2022-04-22 19:07:34.000000000","message":"FWIW, 1space does this already, but the inventory service does not. Not sure how much other external code we know about. Probably not a bad idea to call it, yeah?\n\nI think it probably isn\u0027t necessary if you\u0027ve got something like the MultiprocessInternalClient from https://review.opendev.org/c/openstack/swift/+/803536, but I don\u0027t think it\u0027d really hurt, either. Right?","commit_id":"e2b2a2c3062fa78236bdda868542b8b9923e726c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f5731d8c6e0289161690bcd8f261134819046e41","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"cbc2535a_d72406bd","updated":"2022-07-27 20:06:12.000000000","message":"Alistair\u0027s follow-up *might* be enough to sway me -- but I\u0027ve still got some nervousness about just *delaying* the lock monkey-patching... at the same time, I don\u0027t particularly want to continue patching stdlib forever :-(\n\nMaybe this is fine?","commit_id":"d09faee2627ad689c223d7142c806211fdd22af0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"238e4e5f0c44afcff129df7ec3ce6df5821d1126","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"95ec2dd4_261e994b","updated":"2022-09-21 19:32:08.000000000","message":"I squahed in the py3 explicit patch","commit_id":"8c083ee8ba6d26c1267387a00344de236ee6d59f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"609f8bb4e0cc2db35268010a32a53cd6fd12b071","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c2e6fb2a_d2e7d198","updated":"2023-02-27 22:07:44.000000000","message":"we\u0027ve been running this under py2 and py3 for awhile","commit_id":"8c083ee8ba6d26c1267387a00344de236ee6d59f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0e77ef02624cd1bd8f82cdf96d12f12e042a8bd4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"c2ce4206_d54d7e3e","updated":"2023-04-11 14:37:03.000000000","message":"i really don\u0027t remeber any of the reservations against this patch, it seems to do exactly what we want, runs in prod, closes an old bug.  What\u0027s not like?  I really don\u0027t recall.","commit_id":"1f99d8c5c7530e2252a8a45196e92b25f115d301"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c0cbca8ae0bfb5feb92343a3f9666dc9bbf0203d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"e99a1901_fa9755f8","updated":"2023-04-28 16:02:34.000000000","message":"Rebased and fixed up some tests that were added recently.","commit_id":"84b995f275c42795b2193a92eaef0329f68a1f20"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"76134d61cc91a3431b73dec027a07cc627541675","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"42edd14e_541438e7","updated":"2023-04-28 18:45:51.000000000","message":"recheck\n\n503s in test.probe.test_reconstructor_rebuild.TestReconstructorRebuildUTF8","commit_id":"84b995f275c42795b2193a92eaef0329f68a1f20"}],"swift/common/daemon.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e39b98e81f58b21c8f0c0568926715594e58a9f8","unresolved":true,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    # patch eventlet/logging early"},{"line_number":285,"context_line":"    utils.eventlet_monkey_patch()"},{"line_number":286,"context_line":"    eventlet.hubs.use_hub(utils.get_hub())"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    # once on command line (i.e. daemonize\u003dfalse) will over-ride config"},{"line_number":289,"context_line":"    once \u003d once or not utils.config_true_value(conf.get(\u0027daemonize\u0027, \u0027true\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"226f960e_2850c5c1","line":286,"updated":"2022-04-20 18:39:57.000000000","message":"ok, any subsequent instantiation of threading.RLock() will be patched, but under py3 I am not convinced that the existing logging._lock is patched:\nhttps://review.opendev.org/c/openstack/swift/+/838773\n\nThat\u0027s not saying it *should be*  - I have yet to wrap my head round that, but I just wanted to understand what we think is or is not happening.","commit_id":"e2b2a2c3062fa78236bdda868542b8b9923e726c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"238e4e5f0c44afcff129df7ec3ce6df5821d1126","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    # patch eventlet/logging early"},{"line_number":285,"context_line":"    utils.eventlet_monkey_patch()"},{"line_number":286,"context_line":"    eventlet.hubs.use_hub(utils.get_hub())"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    # once on command line (i.e. daemonize\u003dfalse) will over-ride config"},{"line_number":289,"context_line":"    once \u003d once or not utils.config_true_value(conf.get(\u0027daemonize\u0027, \u0027true\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"c195f8cd_c1aa0ee8","line":286,"in_reply_to":"226f960e_2850c5c1","updated":"2022-09-21 19:32:08.000000000","message":"we decided to squash down the py3 lock patch fix","commit_id":"e2b2a2c3062fa78236bdda868542b8b9923e726c"}],"swift/common/utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1d9717e96630d19974c2f2472eb1b2393acf3e0b","unresolved":true,"context_lines":[{"line_number":98,"context_line":"# logging doesn\u0027t import patched as cleanly as one would like"},{"line_number":99,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"}],"source_content_type":"text/x-python","patch_set":2,"id":"0ead14f0_277abb6b","side":"PARENT","line":101,"updated":"2022-04-08 19:38:50.000000000","message":"this doesn\u0027t even exist in py3","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"238e4e5f0c44afcff129df7ec3ce6df5821d1126","unresolved":false,"context_lines":[{"line_number":98,"context_line":"# logging doesn\u0027t import patched as cleanly as one would like"},{"line_number":99,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"}],"source_content_type":"text/x-python","patch_set":2,"id":"8ea4372e_cdd4fc32","side":"PARENT","line":101,"in_reply_to":"025904cc_79b60349","updated":"2022-09-21 19:32:08.000000000","message":"I think the eventlet ad-hoc fix and our explicit patch of the module global make this a moot point","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"edfa986191a6bd168815e6f43fd5d9029768d4b3","unresolved":true,"context_lines":[{"line_number":98,"context_line":"# logging doesn\u0027t import patched as cleanly as one would like"},{"line_number":99,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"}],"source_content_type":"text/x-python","patch_set":2,"id":"508bd410_7518277c","side":"PARENT","line":101,"in_reply_to":"0ead14f0_277abb6b","updated":"2022-04-08 22:36:15.000000000","message":"Does our dropping it mean that things no longer work on py2, though? We\u0027re going to drop it this cycle, but I want to make sure we\u0027re clear on *when* that happens, and signal it via packaging metadata before we actually start breaking things for py2.","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6130f436fe9e755f992ce4defb175ba75aa94b30","unresolved":true,"context_lines":[{"line_number":98,"context_line":"# logging doesn\u0027t import patched as cleanly as one would like"},{"line_number":99,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"}],"source_content_type":"text/x-python","patch_set":2,"id":"025904cc_79b60349","side":"PARENT","line":101,"in_reply_to":"508bd410_7518277c","updated":"2022-04-11 15:02:00.000000000","message":"AFAICT the import of thread in py2.7 logging is only used to test if the import succeeded, and if logThreads is True, which we set False in eventlet_monkey_patch i.e. logging.thread is tested for existence but logging.thread members are not accessed if eventlet_monkey_patch has been called","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1d9717e96630d19974c2f2472eb1b2393acf3e0b","unresolved":true,"context_lines":[{"line_number":99,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"}],"source_content_type":"text/x-python","patch_set":2,"id":"fdf62f7d_e54b04e4","side":"PARENT","line":102,"updated":"2022-04-08 19:38:50.000000000","message":"this is mostly for threading.get_ident/get_current - but we turn off logThreads https://review.opendev.org/c/openstack/swift/+/752593","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"238e4e5f0c44afcff129df7ec3ce6df5821d1126","unresolved":false,"context_lines":[{"line_number":99,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"}],"source_content_type":"text/x-python","patch_set":2,"id":"ec160602_804c4c72","side":"PARENT","line":102,"in_reply_to":"5873ebe3_0fdd4daf","updated":"2022-09-21 19:32:08.000000000","message":"i have tests that assert we turn off logThreads","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6130f436fe9e755f992ce4defb175ba75aa94b30","unresolved":true,"context_lines":[{"line_number":99,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"}],"source_content_type":"text/x-python","patch_set":2,"id":"5873ebe3_0fdd4daf","side":"PARENT","line":102,"in_reply_to":"fdf62f7d_e54b04e4","updated":"2022-04-11 15:02:00.000000000","message":"it\u0027s also used to instantiate threading.RLock instances, one of which is logging._lock covered on next line, but also when creating handlers\n\nAlso, since we\u0027ll rely more on https://review.opendev.org/c/openstack/swift/+/752593, perhaps we should have test coverage for it (AFAICT it is not covered)","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1d9717e96630d19974c2f2472eb1b2393acf3e0b","unresolved":true,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"},{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"97c552ae_c7792aa6","side":"PARENT","line":103,"updated":"2022-04-08 19:38:50.000000000","message":"this is mostly used for module level initialization stuff (like removeing handlers) but regardless eventlet takes care of it for us:\n\nhttps://github.com/eventlet/eventlet/commit/bbeaa2e3a0b6da26af08f5e6734767e04c187c5b","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"238e4e5f0c44afcff129df7ec3ce6df5821d1126","unresolved":false,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"},{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"13ec3a48_8f5203d6","side":"PARENT","line":103,"in_reply_to":"1565f82b_05c60ea1","updated":"2022-09-21 19:32:08.000000000","message":"i pulled in the py3 fix and our no-lock-logging test demonstrated it doesn\u0027t really matter anyway.","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"edfa986191a6bd168815e6f43fd5d9029768d4b3","unresolved":true,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"},{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9b26b2d4_01429b4b","side":"PARENT","line":103,"in_reply_to":"97c552ae_c7792aa6","updated":"2022-04-08 22:36:15.000000000","message":"And we dragged forward our eventlet requirement a while back to include that (among other things): https://github.com/openstack/swift/commit/0ebfeddf65adb473fda2adfd1705534b6308cd2b\n\nA little more color on the patching: https://github.com/eventlet/eventlet/pull/743\n\nNot that what we do here had any impact on that particular bug. Reminds me that I should bug temoto for a release that includes the fix, though ;-)","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6130f436fe9e755f992ce4defb175ba75aa94b30","unresolved":true,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"},{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"f9f88dc4_86561f65","side":"PARENT","line":103,"in_reply_to":"9b26b2d4_01429b4b","updated":"2022-04-11 15:02:00.000000000","message":"IIUC the eventlet patch fixes up existing instances of RLock, e.g. logging._lock would be patched if logging has been imported before we call eventlet_monkey_patch.\n\nBut, with this change applied, that leaves future instantiations of logging.threading.RLock() unpatched...don\u0027t we still need \n\n  logging.threading \u003d eventlet.green.threading\n\nsomewhere, to patch the locks that might be created for logging handlers?","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0db349789cf3b4dffb9fb2af6fd258129e2516d1","unresolved":true,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"},{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bc755cb4_05b11fb2","side":"PARENT","line":103,"in_reply_to":"b97cd3fa_276b73ea","updated":"2022-04-20 20:20:12.000000000","message":"I\u0027m getting worried now -- I think this may be the only thing saving us from https://github.com/eventlet/eventlet/issues/546 -- it sure seems like eventlet can\u0027t find the locks it needs to green on (at least) py36-39.\n\nI got a patch up to make it work on py310, though -- https://github.com/eventlet/eventlet/pull/754","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f5731d8c6e0289161690bcd8f261134819046e41","unresolved":true,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"},{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1565f82b_05c60ea1","side":"PARENT","line":103,"in_reply_to":"bc755cb4_05b11fb2","updated":"2022-07-27 20:06:12.000000000","message":"Still nervous about this, for a few reasons:\n\n- It\u0027s not clear to me how things will fail if we still need it but we take it out.\n- I\u0027m not at all convinced that any failure mode would be obvious or easy to debug.\n- Lock monkey-patching is known-broken on py3.\n- This monkey-patching has been present *since the beginning*, so we don\u0027t even have the benefit of some commit message or review back-and-forth to give us a hint as to what the goal is, or how things fail without it.","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"fdc54ecd9ffcccdb1bd611619b69e1bf88d97777","unresolved":true,"context_lines":[{"line_number":100,"context_line":"import logging"},{"line_number":101,"context_line":"logging.thread \u003d eventlet.green.thread"},{"line_number":102,"context_line":"logging.threading \u003d eventlet.green.threading"},{"line_number":103,"context_line":"logging._lock \u003d logging.threading.RLock()"},{"line_number":104,"context_line":"# setup notice level logging"},{"line_number":105,"context_line":"NOTICE \u003d 25"},{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"b97cd3fa_276b73ea","side":"PARENT","line":103,"in_reply_to":"f9f88dc4_86561f65","updated":"2022-04-11 15:19:39.000000000","message":"Something about this logic strikes me wrong. Threads and locks must always be consistent is what I believe. So, it makes no sense to stop greening locks of logging forcefully yet substitute the threading. Granted I didn\u0027t think about it as deep as Alistair did, but it looks fishy.","commit_id":"1cee51d5269c2b04f13623593710d2be0045781d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"238e4e5f0c44afcff129df7ec3ce6df5821d1126","unresolved":true,"context_lines":[{"line_number":491,"context_line":""},{"line_number":492,"context_line":"def logging_monkey_patch():"},{"line_number":493,"context_line":"    # explicitly patch the logging lock"},{"line_number":494,"context_line":"    logging._lock \u003d logging.threading.RLock()"},{"line_number":495,"context_line":"    # setup notice level logging"},{"line_number":496,"context_line":"    logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":497,"context_line":"    SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"ca1e1f24_a623f3a5","line":494,"updated":"2022-09-21 19:32:08.000000000","message":"this is really only for py3 - for py2 eventlet already does this","commit_id":"8c083ee8ba6d26c1267387a00344de236ee6d59f"}],"test/unit/common/test_wsgi.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e39b98e81f58b21c8f0c0568926715594e58a9f8","unresolved":true,"context_lines":[{"line_number":916,"context_line":"        # just clean_up_deemon_hygene()"},{"line_number":917,"context_line":"        self.assertEqual([], _d_privs.mock_calls)"},{"line_number":918,"context_line":"        self.assertEqual([mock.call()], _c_hyg.mock_calls)"},{"line_number":919,"context_line":"        self.assertEqual(0, logging.logThreads)  # fixed in our monkey_patch"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    @mock.patch(\u0027swift.common.wsgi.run_server\u0027)"},{"line_number":922,"context_line":"    @mock.patch(\u0027swift.common.wsgi.WorkersStrategy\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fb5e2966_279be77b","line":919,"updated":"2022-04-20 18:39:57.000000000","message":"+1","commit_id":"e2b2a2c3062fa78236bdda868542b8b9923e726c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"238e4e5f0c44afcff129df7ec3ce6df5821d1126","unresolved":false,"context_lines":[{"line_number":916,"context_line":"        # just clean_up_deemon_hygene()"},{"line_number":917,"context_line":"        self.assertEqual([], _d_privs.mock_calls)"},{"line_number":918,"context_line":"        self.assertEqual([mock.call()], _c_hyg.mock_calls)"},{"line_number":919,"context_line":"        self.assertEqual(0, logging.logThreads)  # fixed in our monkey_patch"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    @mock.patch(\u0027swift.common.wsgi.run_server\u0027)"},{"line_number":922,"context_line":"    @mock.patch(\u0027swift.common.wsgi.WorkersStrategy\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fa99ecf_daac7893","line":919,"in_reply_to":"fb5e2966_279be77b","updated":"2022-09-21 19:32:08.000000000","message":"Done","commit_id":"e2b2a2c3062fa78236bdda868542b8b9923e726c"}]}
