Skip to content

Detect module run syntax version#61772

Merged
Ch3LL merged 3 commits intosaltstack:masterfrom
dwoz:issue/master/58763
Mar 22, 2022
Merged

Detect module run syntax version#61772
Ch3LL merged 3 commits intosaltstack:masterfrom
dwoz:issue/master/58763

Conversation

@dwoz
Copy link
Contributor

@dwoz dwoz commented Mar 9, 2022

What does this PR do?

Detect which syntax (new style or old style) is being used for a module.run state call.

What issues does this PR fix or reference?

Fixes: #58763

Previous Behavior

Users needed to opt-in to use the new style of calling module.run and were not able to mix new and legacy module.run calls.

New Behavior

Users no longer need to opt-in to the new style of calling module.run. Both styles are now supported and which style being used is detected automatically.

Merge requirements satisfied?

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

@dwoz dwoz requested a review from a team as a code owner March 9, 2022 21:14
@dwoz dwoz requested review from MKLeb and removed request for a team March 9, 2022 21:14
@dwoz dwoz added the Phosphorus v3005.0 Release code name and version label Mar 9, 2022
@dwoz dwoz force-pushed the issue/master/58763 branch from a104db0 to cfda82e Compare March 9, 2022 21:19
@dwoz dwoz requested review from garethgreenaway and waynew March 9, 2022 21:20
@dwoz dwoz force-pushed the issue/master/58763 branch 2 times, most recently from ebf1711 to 3e5f13a Compare March 13, 2022 21:37
@dwoz dwoz requested review from Ch3LL and waynew and removed request for MKLeb March 13, 2022 22:12
@dwoz dwoz changed the title [WIP] Detect module run syntax version Detect module run syntax version Mar 13, 2022
twangboy
twangboy previously approved these changes Mar 15, 2022
Copy link
Contributor

@Ch3LL Ch3LL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the module.run docs you should be able to do this:

test.ping:
  module.run

When I run that with your PR I get this error:

          ID: test.ping
    Function: module.run
      Result: False
     Comment: No function provided.
     Started: 13:26:24.650959
    Duration: 1.005 ms
     Changes:   

But it passes on the head of master.

@dwoz
Copy link
Contributor Author

dwoz commented Mar 16, 2022

According to the module.run docs you should be able to do this:

test.ping:
  module.run

When I run that with your PR I get this error:

          ID: test.ping
    Function: module.run
      Result: False
     Comment: No function provided.
     Started: 13:26:24.650959
    Duration: 1.005 ms
     Changes:   

But it passes on the head of master.

I've added a test case for this.

@dwoz dwoz requested review from Ch3LL, s0undt3ch and twangboy March 16, 2022 20:10
Ch3LL
Ch3LL previously approved these changes Mar 16, 2022
twangboy
twangboy previously approved these changes Mar 16, 2022
@dwoz dwoz dismissed stale reviews from twangboy and Ch3LL via 876be9d March 21, 2022 21:06
@dwoz dwoz force-pushed the issue/master/58763 branch from 863e59f to 876be9d Compare March 21, 2022 21:06
@dwoz dwoz force-pushed the issue/master/58763 branch from 876be9d to 0b48d81 Compare March 22, 2022 06:52
Copy link
Contributor

@waynew waynew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Ch3LL Ch3LL merged commit e9025fe into saltstack:master Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Phosphorus v3005.0 Release code name and version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The future of module.run needs decision

6 participants