-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Allow proxy minion types to be dynamically loaded #50183
Conversation
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.
instead of having these larger if statements, can we just put those
if opts is None:
opts = __opts__
At the top?
if not opts: | ||
ckminions = salt.utils.minions.CkMinions(__opts__) | ||
else: | ||
ckminions = salt.utils.minions.CkMinions(opts) |
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.
can we just make this ckminions = salt.utils.minions.CkMinions(opts or __opts__)
and get rid of the rest of the if statement?
salt/matchers/cache_match.py
Outdated
if not opts: | ||
ckminions = salt.utils.minions.CkMinions(__opts__) | ||
else: | ||
ckminions = salt.utils.minions.CkMinions(opts) |
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.
same here
@cro This has several lint failures as well as some test failures. Can you take a look? |
@cro Still some proxy test failures here, I'm afraid. https://jenkinsci.saltstack.com/job/pr-kitchen-ubuntu1604-py2/job/PR-50183/7/ |
Yes, looks like they are related to the ProxyCaller. I am looking more closely at it now. |
796ce64
to
d4c15f7
Compare
174e1de
to
e35eb6a
Compare
a89d442
to
12c147a
Compare
if not opts: | ||
opts = __opts__ | ||
nodegroups = opts.get('nodegroups', {}) | ||
matchers = salt.loader.matchers(opts) |
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.
If you added a __matchers__
dunder to the packed items, similar to what we do for __salt__
in minion_mods
, then you don't need to instantiate a new LazyLoader here. I get that we might still need to do it, in cases where actual opts are passed in, but it shouldn't be necessary in most cases.
[2019.2.1] Porting metaproxy changes in #50183 to 2019.2.1
What does this PR do?
This PR creates a new loadable module type called a
metaproxy
and abstracts the existing proxy minion to become a type of metaproxy. This enables us to build different types of proxy minions that can still load existing proxymodules.Tests written?
No, but existing tests for proxy minions pass successfully.
Commits signed with GPG?
Yes