Skip to content
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

Make legacy and modern syntax detection work for module.wait #63006

Merged
merged 1 commit into from
Nov 7, 2022
Merged

Make legacy and modern syntax detection work for module.wait #63006

merged 1 commit into from
Nov 7, 2022

Conversation

redbaron4
Copy link
Contributor

What does this PR do?

This PR fixes module.run syntax detection when using module.wait. It also adds test cases for module.wait use-case.

What issues does this PR fix or reference?

Fixes: #62988

Previous Behavior

module.run syntax detection did not work for module.wait because of additional kwargs passed. This led to all module.wait syntaxes to be treated as legacy and states to fail if modern style was being used

New Behavior

sfun and __reqs__ has been added to list of items ignored in kwargs when deciding if module.run syntax is legacy or modern.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

No

@redbaron4 redbaron4 requested a review from a team as a code owner November 3, 2022 05:32
@redbaron4 redbaron4 requested review from garethgreenaway and removed request for a team November 3, 2022 05:32
PR#61772 added the ability to detect modern or legacy syntax for module.run
to allow both styles to co-exist. Those changes did not fully address
module.wait semantics which led to all module.wait syntaxes to be
treated as legacy. Using modern syntax led to state failure in such cases.

This commit adds additional keys that may be generated when module.wait is
used to the list of kwargs ignored by detection algorithm. It also adds
functional tests for module.wait test cases.

Fixes #62988
@Ch3LL Ch3LL requested a review from dwoz November 4, 2022 18:19
@Ch3LL Ch3LL merged commit 29812c3 into saltstack:master Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] module.run new style defintion is identified as legacy
3 participants