Repository navigation
Conversation
…ts, which leads to the wrong minion ID being used when running salt proxy minions with multiprocessing disabled. Moving test to pytest.
garethgreenaway
requested review from
xeacott
and removed request for
a team
February 24, 2021 17:28
Ch3LL
suggested changes
Feb 24, 2021
…n_id in the engine_kwargs when using compound_match. Ensure minion_id is a valid argument for matchers which are called from compound_match.
garethgreenaway
force-pushed
the
59351_dont_change_opts_in_match_module
branch
from
February 25, 2021 17:38
2f06dbc to
4b5ec8f
Compare
Ch3LL
reviewed
Mar 2, 2021
Ch3LL
left a comment
Contributor
There was a problem hiding this comment.
Just a couple questions to help my understanding of some of the changes.
| """ | ||
| if not opts: | ||
| opts = __opts__ | ||
| minion_id = opts.get("minion_id", opts["id"]) |
Contributor
There was a problem hiding this comment.
What is expecting minion_id to be in opts? If we remove this are we removing functionality from somewhere else?
Contributor
Author
There was a problem hiding this comment.
I believe this was something that was previously in place to support metaproxy proxies but I found a few references related to pillar so I updated the code.
…use cases where minion_id is being passed in opts. Fallback to id.
Ch3LL
approved these changes
Mar 2, 2021
dwoz
approved these changes
Mar 3, 2021
xeacott
approved these changes
Mar 3, 2021
This file contains hidden or 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
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?
Changing the match module and various matchers to not change ID in opts, which leads to the wrong minion ID being used when running salt proxy minions with multiprocessing disabled. Moving test to pytest.
What issues does this PR fix or reference?
Fixes: #59351
Previous Behavior
When minion_id was passed as an argument to the various match functions, the minion id in opts was overwritten.
New Behavior
Now the various is simply passed along to the matcher functions as an optional argument.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes/No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.