-
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
Extmods should override the internal salt module even with different filename #52521
Comments
looks like i'm able to replicate this behavior all the way back to the 2017.7 branch. But in our docs (https://docs.saltstack.com/en/latest/ref/modules/#virtual-function) it states :
so it seems we need to make sure this behavior is added in. thanks |
I believe this is intended behavior, and the docs are slightly misleading. There is a couple of related comments in the loader: Lines 1699 to 1700 in 961d192
Line 1729 in 961d192
To achieve what you want (override just one existing function), you can use a hack from https://github.com/saltstack/salt-jenkins/blob/develop/_modules/pip.py |
looks like your right @max-arnold ping @saltstack/team-core i assume we want to keep this behavior? any thoughts? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
The documentation have not been updated and this should be reopened. |
Description of Issue/Question
Currently when we define an extmods with
__virtual__
returning the same name as an already existing salt internal module that's only merge new function and not override the already existing one.Steps to Reproduce Issue
Created a simple extmodule to override
test
I sync salt modules and try to execute the 2 function and
echo
does not get overwritedRenaming the python file with the same name as the one from salt internal really override the whole module
Versions Report
The text was updated successfully, but these errors were encountered: