-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport loader contexts 3000 #399
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit 5c15def) Honor loaded_base_name (cherry picked from commit 26b5714) Ensure thin_dir is available. (cherry picked from commit 23906b6) ensure master_tops is available. (cherry picked from commit 9590157) Need to ensure cachedir and fsclient are preserved throughout the call. (cherry picked from commit d94d96f) override get_new_ioloop for TestEventListener (cherry picked from commit 82202c6) Increase self.wait timeout in the test_clean_by_request to 30 seconds. (cherry picked from commit 0508a3f) bump timeouts up to 60 seconds. (cherry picked from commit ad8ab60) Removing the timeouts from self.wait. Bumping up the sleep before yielding the eventpublisher_process from 2 seconds to 8 seconds. (cherry picked from commit 84de52d) Revert "override get_new_ioloop for TestEventListener" This reverts commit ab39a52260ba61722b808ffd5b03ceee7960ca3e. (cherry picked from commit 59d8076) Add global lazyloader test (cherry picked from commit 5078637)
This is done in two stages, first, the module instance in `sys.modules` is set to `None`. Then at a second stage, when creating a loader with the same namespace, it's actually removed from `sys.modules`. The reason for this two stage cleanup procedure is because this function might get called during the GC collection cycle and trigger https://bugs.python.org/issue40327 We seem to specially trigger this during the CI test runs with `coverage.py` tracking the code usage: Traceback (most recent call last): File "/urs/lib64/python3.6/site-packages/coverage/multiproc.py", line 37, in _bootstrap cov.start() File "/urs/lib64/python3.6/site-packages/coverage/control.py", line 527, in start self._init_for_start() File "/urs/lib64/python3.6/site-packages/coverage/control.py", line 455, in _init_for_start concurrency=concurrency, File "/urs/lib64/python3.6/site-packages/coverage/collector.py", line 111, in __init__ self.origin = short_stack() File "/urs/lib64/python3.6/site-packages/coverage/debug.py", line 157, in short_stack stack = inspect.stack()[limit:skip:-1] File "/usr/lib64/python3.6/inspect.py", line 1501, in stack return getouterframes(sys._getframe(1), context) File "/usr/lib64/python3.6/inspect.py", line 1478, in getouterframes frameinfo = (frame,) + getframeinfo(frame, context) File "/usr/lib64/python3.6/inspect.py", line 1452, in getframeinfo lines, lnum = findsource(frame) File "/usr/lib64/python3.6/inspect.py", line 780, in findsource module = getmodule(object, file) File "/usr/lib64/python3.6/inspect.py", line 732, in getmodule for modname, module in list(sys.modules.items()): RuntimeError: dictionary changed size during iteration (cherry picked from commit a6921d6)
(cherry picked from commit ada0019)
(cherry picked from commit df44efccaedbc0b5d4969ed4e2af22e1885d7da3) Slow test fixes (cherry picked from commit ada1176e1689f263b13c0afe022eb8a5cd26f6cd) Use patch_if to clean up tests (cherry picked from commit dab4e96b89eeab9643361135ab7900a912c2721a) Add more tests and better docstrings (cherry picked from commit 54d959f888a0011e7c4d4b009d4d48b55fa4a22b) Fix test_loader_globals case (cherry picked from commit ea4d8681a1d385e985881609b5470127bf796e89) Fix typo (cherry picked from commit e703f3961e2d9c56d04e59d90f1d98a90a796111) Combine isinstance checks (cherry picked from commit dd2232dfa7fa6064317235a9b0249039b677a94f) Syntax cleanup (cherry picked from commit af1b9b2b2780944cfb6c578256fe80ed87bcbcce) Make sure test fails without loader changes (cherry picked from commit d358c8b0e644fec424fed677095ceb91c397a300) Make sure boto apigateway tests pass under pytest (cherry picked from commit df756700a0c06bfce04b70b553e9a115b2ecfd08) fix pre-commit issues (cherry picked from commit a34cde93194c7fcca9360e624e7a019d33740347) Fix older pytest runs (cherry picked from commit 2661472c542c68459b7e9a3d00fb3432bda96b9c)
We need to add |
vzhestkov
approved these changes
Jul 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Backport of saltstack/salt#56513, saltstack/salt#58862, saltstack/salt#58630 and saltstack/salt#58853. I tried to revert all changes breaking Python2 compatibility. I hope I didn't miss anything.
I also added the
slowTest
definition from saltstack/salt#56872, but I didn't cherry pick the commit since that changes a ton of unrelated tests.