saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:

Home Page:https://repo.saltproject.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE REQUEST] Deprecate the ``__utils__`` dunder.

s0undt3ch opened this issue · comments

Is your feature request related to a problem? Please describe.

The __utils__ dunder(salt loader) tries to provide easy access to Salt's utility modules.

Issues with this approach:

  • Utility functions should not be available in dunders, they are utility functions.
  • All utilities are compacted into <module>.<funcname>, which does not recurse into submodules.
  • This kind of usage, is prone to memory leaks(because utilities were not coded to work within a salt loader context). See #62007 and #62021

Potential problems if we remove __utils__:

  • Utility functions aren't available in jinja templating for salt states.
    • They shouldn't, jinja uses it's own filters and Salt provides additional filters

Describe the solution you'd like
Completely remove support for __utils__

Describe alternatives you've considered
None.

If it's being removed in 3006 then it needs to be deprecated in 3005.

If it's being removed in 3006 then it needs to be deprecated in 3005.

The deprecation period, sadly, needs to be longer.