-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[3006.x] Fix parallel states on spawning platforms #66997
Merged
dwoz
merged 5 commits into
saltstack:3006.x
from
lkubb:fix/parallel-spawning-inject-globals
Oct 25, 2024
Merged
[3006.x] Fix parallel states on spawning platforms #66997
dwoz
merged 5 commits into
saltstack:3006.x
from
lkubb:fix/parallel-spawning-inject-globals
Oct 25, 2024
+137
−12
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
salt-project-bot-prod-environment
bot
changed the title
Fix parallel states on spawning platforms
[3006.x] Fix parallel states on spawning platforms
Oct 24, 2024
lkubb
force-pushed
the
fix/parallel-spawning-inject-globals
branch
from
October 24, 2024 13:58
3cf69dc
to
b707d24
Compare
dmurphy18
previously approved these changes
Oct 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs failing tests resolved
This was introduced by saltstack#66517 `__invocation_jid` is rewriten to `_State__invocation_id`, making `cls(**init_kwargs)` fail with a TypeError (unexpected argument `__invocation_jid` (this behavior is called name mangling).
This ensures dunders like __env__ are defined in states running in parallel on spawning platforms. The __running__ dict can contain salt.utils.process.Process instances, which are still picklable.
lkubb
force-pushed
the
fix/parallel-spawning-inject-globals
branch
from
October 24, 2024 19:04
b707d24
to
dd6d058
Compare
I rebased onto the current branch with #66986 merged, should be solved now |
Sorry for dismissing the review, I stumbled upon another related issue (#66999). |
dwoz
approved these changes
Oct 25, 2024
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?
__invocation_jid
to_State__invocation_jid
, causing a TypeError when instantiating the class instance with**init_kwargs
). This patch is not part of any release as of now.__env__
to be definedmatch
module has been invoked, which uses it to cache a LazyLoader instance)What issues does this PR fix or reference?
Fixes: #66996
Fixes: #66999
Previous Behavior
__env__
is not defined.__context__
, crashes with a TypeError, e.g.cannot pickle '_thread.RLock' object
New Behavior
Works as expected.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes