-
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
new feature: add saltenv directory to file_roots, pillar_roots and ext_pillar.stack for dynamic environments #55812
Conversation
1a48c7d
to
55aa437
Compare
38442a9
to
38bcda8
Compare
I think the failed checks are perhaps artifacts of the check process? |
Codecov Report
@@ Coverage Diff @@
## master #55812 +/- ##
=========================================
Coverage ? 22.71%
=========================================
Files ? 1536
Lines ? 272509
Branches ? 58530
=========================================
Hits ? 61870
Misses ? 204679
Partials ? 5960
|
Codecov Report
@@ Coverage Diff @@
## master #55812 +/- ##
=========================================
Coverage ? 22.71%
=========================================
Files ? 1536
Lines ? 272509
Branches ? 58530
=========================================
Hits ? 61870
Misses ? 204679
Partials ? 5960
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #55812 +/- ##
=========================================
Coverage ? 22.71%
=========================================
Files ? 1536
Lines ? 272509
Branches ? 58530
=========================================
Hits ? 61870
Misses ? 204679
Partials ? 5960
|
@garethgreenaway, @dwoz: I think this pull request is ready to merge and has been for a week, how do I get somebody to review it? |
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.
@morgana2313 thanks for the PR!
It's looking good, but it's definitely missing some test coverage. I will be OOO this week but I'll put it on the list of things to discuss with our architecture team. At the very least, we will require some more tests - if you struggle with writing tests please let us know and we can figure out a time to help train on testing.
Hello, |
Closing this due to inactivity. Anyone should feel free to re-open it if they want to see it through to the end in one release cycle. |
What does this PR do?
Extends dynamic environments for file_roots, pillar_roots and ext_pillar.stack; the requestor's saltenv/pillarenv can be inserted to a requested file-path with the token
__env__
. Glob-style wildcard matching for environments in file_roots, pillar_roots and ext_pillar.stack.This allows for file_roots, pillar_roots and ext_pillar.stack variants of the gitfs, svnfs and hgfs behavior where branches and tags are translated into salt environments; salt environments are translated into directories. This allows for adding saltenvs dynamically without restarting the salt-master.
What issues does this PR fix or reference?
Fixes: #55747. Extends #50784 and #46309
New Behavior
glob-style wildcard matching of saltenv/pillarenv. Backwards compatible; specifying
__env__
as environment has the same effect as '*' and matches all environments. The first matching saltenv/pillarenv is used.__env__
in a path is replaced by the requistor's saltenv/pillarenv.new option for ext_pillar stack: pillarenv
Tests written?
Yes: Existing unit tests modified to expect new behavior.
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.