Open whytewolf opened 2 years ago
You mean instead of
def _format_repo_args(
comment=None, component=None, distribution=None, uploaders_file=None, saltenv="base"
):
it should be
def _format_repo_args(
comment=None, component=None, distribution=None, uploaders_file=None, saltenv=None
):
if saltenv is None:
saltenv = __opts__.get("saltenv", "base")
?
personally i would prefer opts for this since saltenv is one of those important settings that controls how things operate globally and config.get pulls from many sources.
but in essence yes.
also need to make sure that it doesn't break by making that change. hence the audit and not all out change right now.
Also need to check the documentation.
For example: https://docs.saltproject.io/en/latest/ref/renderers/index.html#writing-renderers
(that one also uses six
)
agreed, documents should also make sure that the practice of using saltenv="base"
is not seen as how it should be done.
Description of the tech debt to be addressed, include links and screenshots
while working on cmdmod not taking into consideration saltenv setup in config. i ran a quick command to see just how many modules might have this same problem.
here are the results of that command
Now it is entirely possible given the search simplicity that these are not an issue. however this is something that needs to be looked into to make sure we are not making the same mistake everywhere and that saltenv is not ignored when it is set in the config file.
Versions Report
This was run against the master branch of the gitrepo.