-
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
include the virtualname in the file name for core modules #50812
Conversation
ugh, it only works on py3, i need to fix this for py2 as well. |
still need to fix autodoc |
000a480
to
cd0aa1e
Compare
@saltstack/team-core can someone look at this? Thanks, |
=================== | ||
====================== | ||
salt.modules.ebuildpkg | ||
====================== |
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.
Doesn't this file need to be renamed?
salt/renderers/dson.py
Outdated
|
||
# Import salt libs | ||
from salt.ext import six | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
def __virtual__(): | ||
return dson, 'Failed to load: dson module not installed' |
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.
This will probably break if dson
is installed. The first value in the tuple should be either a string or a bool, in this case it's either a module or None
.
836d025
to
e274b62
Compare
bf23230
to
652831f
Compare
@gtmanfred are you able to resolve the conflicts here? |
Yeah, I need to do that and fix the tests still, i will try to get to it later today. |
fda0ee3
to
1c42592
Compare
Rebase done, waiting on the test suite to run so that I can see what tests need to be fixed. |
@dubb-b something is going on with bootstrapping of the tests and possibly nexus. Thanks, |
@gtmanfred looks like more-itertools that CherryPy depends on releases 6.0.0 and we need to pin earlier version for py2. They went py3 only. |
44dcc16
to
ab8708b
Compare
@dwoz this should be all ready to go once the tests pass |
Make sure that the virtualname is included in the actual filename of core modules. This will help speed up loading of modules that need to use the virtualname, so that we hit @Depends decorators less.
4e2caf0
to
33bb5bf
Compare
I squashed the commits so it would be easier to merge forward. |
Thanks @dwoz |
Does this need a changelog entry? |
Makes sense to me, i will write something for the 2018.3.5 release doc. |
Just thought I point out this discussion #30533 on module names. |
What does this PR do?
There is a condition in the loader for salt, where you could end up with finding modules taking forever.
When loading modules, we look at
This is usually not a problem, unless you are using some module that hits part 3, and is after
esxi.py
and possiblyvsphere.py
because those use the @Depends decorator, which takes longer to run when loading, and can cause it to take a really long time for the lazyloader to load the module you are looking for.This PR adds a unittest to make sure there are no modules in the core modules of salt that fall into the third category, so that we make sure to optimize loading of salt core modules (3 can still be hit by users custom modules)
Tests written?
Yes
Commits signed with GPG?
Yes