Skip to content
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 dynamic file_roots #50784

Merged
merged 1 commit into from Feb 8, 2019

Conversation

@sathieu
Copy link
Contributor

commented Dec 7, 2018

What does this PR do?

Implements Dynamic File Roots:

file_roots:
  base:
    - /srv/salt
  __env__:
    - /srv/default/salt

What issues does this PR fix or reference?

Fixes: #48132. Similar to #46309 for pillar_roots.

Previous Behavior

Using roots and gitfs with feature branches is not possible, unless you restrict those branch names to match file_roots envs.

New Behavior

You can add a default file_roots.

Tests written?

Yes.

Commits signed with GPG?

Yes

@sathieu sathieu requested a review from saltstack/team-core as a code owner Dec 7, 2018
@sathieu sathieu referenced this pull request Dec 7, 2018
@sathieu sathieu force-pushed the sathieu:dynamic_file_roots branch 3 times, most recently from 1fb2caa to dc1cbef Dec 7, 2018
@cachedout

This comment has been minimized.

Copy link
Collaborator

commented Dec 10, 2018

@sathieu We would want to put this into the develop branch. Right now it's on a bug fix branch which is not where it would ultimately get merged. You may wish to switch this. :)

@sathieu

This comment has been minimized.

Copy link
Contributor Author

commented Dec 11, 2018

Ok. Anyway it doesn't work. Any idea how to fix this?

does this means that 2018.3.4 is coming soon?

@cachedout

This comment has been minimized.

Copy link
Collaborator

commented Dec 11, 2018

@sathieu What do you mean by "it doesn't work"? Do you mean that this feature isn't doing what you intend it to or are you referring to some other functionality that isn't working as expected?

@sathieu

This comment has been minimized.

Copy link
Contributor Author

commented Dec 11, 2018

@cachedout My PR doesn't work. I have other problems but they may come from my specific version (2018.3.3 + several PRs).

@sathieu sathieu force-pushed the sathieu:dynamic_file_roots branch from dc1cbef to aa140fd Jan 17, 2019
@sathieu

This comment has been minimized.

Copy link
Contributor Author

commented Jan 17, 2019

Now working. And rebased on top of #51211.

@sathieu sathieu force-pushed the sathieu:dynamic_file_roots branch from aa140fd to 14bea79 Jan 17, 2019
@sathieu sathieu changed the title WIP Allow dynamic file_roots Allow dynamic file_roots Jan 17, 2019
@sathieu sathieu force-pushed the sathieu:dynamic_file_roots branch from 14bea79 to cf1506e Jan 17, 2019
@dwoz
dwoz approved these changes Jan 17, 2019
@dwoz dwoz requested a review from terminalmage Jan 17, 2019
@sathieu

This comment has been minimized.

Copy link
Contributor Author

commented Jan 23, 2019

@terminalmage can you please review? Without this, using gitfs with file_roots is limited to a list of branches.

salt/state.py Outdated Show resolved Hide resolved
@sathieu sathieu force-pushed the sathieu:dynamic_file_roots branch 2 times, most recently from 3d19035 to 2765311 Jan 23, 2019
@sathieu

This comment has been minimized.

Copy link
Contributor Author

commented Jan 26, 2019

I've added doc in doc/ref/configuration/master.rst and doc/topics/tutorials/gitfs.rst. @terminalmage please review...

@sathieu sathieu force-pushed the sathieu:dynamic_file_roots branch from 2765311 to 6f4f07c Jan 26, 2019
@sathieu

This comment has been minimized.

Copy link
Contributor Author

commented Feb 6, 2019

@terminalmage @dwoz You both approved. Anything missing?

Fixes: #48132
@sathieu sathieu force-pushed the sathieu:dynamic_file_roots branch from 6f4f07c to 7ca2aa4 Feb 6, 2019
@sathieu

This comment has been minimized.

Copy link
Contributor Author

commented Feb 8, 2019

@terminalmage you can merge, I've updated the versions.

@dwoz dwoz merged commit f7d50b1 into saltstack:2018.3 Feb 8, 2019
10 checks passed
10 checks passed
WIP Ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint Python lint test has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has passed
Details
@sathieu

This comment has been minimized.

Copy link
Contributor Author

commented Feb 8, 2019

@terminalmage @dwoz thanks to you both!

@sathieu sathieu deleted the sathieu:dynamic_file_roots branch Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.