You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why not just keep the old module.run as-is, and make a new function for the new syntax? I personally think the new syntax is better (though I would have settled for just improving the old one supporting an args parameter).. But I don't see how it has to replace the old way instead of coexisting.
@markuskramerIgitt you can check the minion version in jinja (e.g. grains['saltversioninfo']) and provide the appropriate syntax during a transition. Or to check the config setting use config.get.
For what's it worth, the new syntax is clearer/better.
I had it enabled by setting use_superseded: ['module.run'] but had to disable this again because I am using third-party formulas. And if you use use_superseded the old syntax becomes a no-op, which is kinda bad in that situation.
The way the initial deprecation rolled out was terrible. The inability to use both syntax at the same time creates undue burden on sysadmins. The need to go ensure all third-party states/formulas are in-line is a non-starter. Ideally the deprecation would allow for feature detection and gradual rollout. Right now it's an all or nothing situation.
Feature detect and then deprecate.
Feature detect and keep both around. This adds extra burden of supporting both methods on the Salt team.
I do recall that there was some edge case that I wasn't able to do with the new-style syntax. Unfortunately I can't remember any specifics as this was a very long time ago. I wish I could point them out. But memory may just be bad and I'm making things up...
To document discussion on this issue - deprecating module.run will break everything, and is undesirable. The new style is better for most cases by why break what we don't have to? Removing either syntax will break something for someone.
Since the syntax should be unambiguous, the plan is to make the config flag a noop, and pick which run-style based on the actual state declaration.
If there are cases where the run style is ambiguous, we could fallback on the run-style config value - I have some passing familiarity since I haven't dealt with that module recently, but I would be surprised if there was anything that was tricksy and would need the fallback option.
Activity
[-]The future of `module.run`[/-][+]The future of `module.run` needs decision[/+]Timbus commentedon Oct 21, 2020
Why not just keep the old
module.runas-is, and make a new function for the new syntax? I personally think the new syntax is better (though I would have settled for just improving the old one supporting anargsparameter).. But I don't see how it has to replace the old way instead of coexisting.OrangeDog commentedon Oct 21, 2020
In order of preference:
In both cases the
use_supersededoption becomes unused and available for change / removal.To complicate matters, there's just been a new
featuresoption added for unknown reasons.@markuskramerIgitt you can check the minion version in jinja (e.g.
grains['saltversioninfo']) and provide the appropriate syntax during a transition. Or to check the config setting useconfig.get.ixs commentedon Oct 22, 2020
For what's it worth, the new syntax is clearer/better.
I had it enabled by setting use_superseded: ['module.run'] but had to disable this again because I am using third-party formulas. And if you use use_superseded the old syntax becomes a no-op, which is kinda bad in that situation.
https://pbs.twimg.com/media/Ef75SfaXgAIbqUu?format=jpg&name=4096x4096 serves as illustration.
Sxderp commentedon Jun 3, 2021
The way the initial deprecation rolled out was terrible. The inability to use both syntax at the same time creates undue burden on sysadmins. The need to go ensure all third-party states/formulas are in-line is a non-starter. Ideally the deprecation would allow for feature detection and gradual rollout. Right now it's an all or nothing situation.
I do recall that there was some edge case that I wasn't able to do with the new-style syntax. Unfortunately I can't remember any specifics as this was a very long time ago. I wish I could point them out. But memory may just be bad and I'm making things up...
waynew commentedon Aug 30, 2021
To document discussion on this issue - deprecating module.run will break everything, and is undesirable. The new style is better for most cases by why break what we don't have to? Removing either syntax will break something for someone.
Since the syntax should be unambiguous, the plan is to make the config flag a noop, and pick which run-style based on the actual state declaration.
If there are cases where the run style is ambiguous, we could fallback on the run-style config value - I have some passing familiarity since I haven't dealt with that module recently, but I would be surprised if there was anything that was tricksy and would need the fallback option.