New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid raising exceptions when calling Fileserver.envs #49388
Conversation
salt/master.py
Outdated
|
||
:param dict load: A payload received from a minion (ignored) | ||
''' | ||
return self._fs_file_envs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a function call, or an attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has historically been a function call but with the wrong arguments. Passing no args returns all environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes discussed on slack.
salt/master.py
Outdated
@@ -1276,6 +1276,14 @@ def __verify_load(self, load, verify_keys): | |||
|
|||
return load | |||
|
|||
def _file_envs(self, *args): | |||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so this should accept one keyword load
and then add a pylint exception to ignore that load
is not used.
superseded by #49389 |
What does this PR do?
Fixing the following errors seen in the tests:
salt.fileserver.Fileserver.envs
sanitizes it's batch keyword arg but that is not designed to handle dictionaries. This method get's called from the following line with a dictionary:https://github.com/saltstack/salt/blob/2018.3.3/salt/master.py#L1788
This
load
argument is not synonymous with either of the keyword args accepted bysalt.fileserver.Fileserver.envs
. Adding a proxy method that prevents passing anything tosalt.fileserver.Fileserver.envs
.Tests written?
No
Commits signed with GPG?
Yes