Skip to content

The future of module.run needs decision #58763

Closed

Description

@cmcmarrow

Right now, Salt has a deprecation warning for salt.state.module.run for Phosphorus

Salt at one point was thinking on keeping module.run which can be seen here #58705.

This issue is so community members and salt employees can voice their opinion on what should happened to module.run.

Activity

  1. added
    Aluminium
    on Oct 19, 2020
  2. added this to the Aluminium milestone on Oct 19, 2020
  3. changed the title [-]The future of `module.run`[/-] [+]The future of `module.run` needs decision[/+] on Oct 19, 2020
  4. Timbus commented on Oct 21, 2020

    @Timbus
    Contributor

    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.

  5. OrangeDog commented on Oct 21, 2020

    @OrangeDog
    Contributor

    In order of preference:

    1. Remove the deprecated syntax as originally planned and already delayed
    2. Transparently support both syntaxes by checking the input structure instead of a feature flag

    In both cases the use_superseded option becomes unused and available for change / removal.
    To complicate matters, there's just been a new features option 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 use config.get.

  6. ixs commented on Oct 22, 2020

    @ixs
    Contributor

    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.

  7. added
    Silicon v3004.0
    and removed
    Aluminium
    on Jan 22, 2021
  8. modified the milestones: Aluminium, Silicon on Jan 22, 2021
  9. added
    doc-ex-missing
    doc-request
    on Mar 29, 2021
  10. Sxderp commented on Jun 3, 2021

    @Sxderp
    Contributor

    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.

    1. Feature detect and then deprecate.
    2. 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...

  11. modified the milestones: Silicon, Phosphorus on Aug 30, 2021
  12. added
    Phosphorus v3005.0
    and removed
    Silicon v3004.0
    on Aug 30, 2021
  13. waynew commented on Aug 30, 2021

    @waynew
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

DeprecationPhosphorus v3005.0doc-ex-missingdoc-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions