Repository navigation
Root dir prepend fix gh #2 - #41281
Merged
Merged
Conversation
|
@alexbleotu, thanks for your PR! By analyzing the history of the files in this pull request, we identified @anlutro, @cro and @s0undt3ch to be potential reviewers. |
Contributor
Author
|
second attempt to this |
Contributor
Contributor
Author
|
All tests have been fixed. The pylint error is not due to my changes, I assume it will be fixed by someone else. |
Contributor
|
@alexbleotu -- I'm sorry for the trouble, could you rebase against current develop? That should clear up that last lint error (that's a Python 3-ism that crept in and got fixed). |
added 7 commits
May 17, 2017 17:21
…t.config.DEFAULT_API_OPTS array
alexbleotu
force-pushed
the
root_dir_prepend_fix-gh
branch
from
May 17, 2017 16:22
e95b6fd to
00d0c37
Compare
Contributor
Author
|
Sure - rebased. @cro - can you glance over the changes, see if they make sense |
Contributor
|
Yes, I'd be glad to. |
cro
approved these changes
May 17, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What issues does this PR fix or reference?
The PR fixes how the root_dir is prependend to relative paths. Also it fixes how the log_file path is derived when the log_dir override is set in the config file.
Previous Behavior
The previous logic of prepending the root_dir to relative paths doesn't take into consideration if the default root_dir (set in the code in
_syspaths.py) is included in the overriden root dir (set in the config file). The logic strips out just a segment of the root_dir (the default root_dir) so the prepend doesn't work correctly.Also, the default path assigned to the default log_file won't be overriden if the log_dir override is specified in the config file.
New Behavior
The prepend and log_file bugs are fixed. The default log_file path is adjusted if the log_dir override is specified. The logic to prepend the root_dir (either the default one in code or the override in the config) is fixed.
Tests written?
Yes
added to check that the prepend logic works correctly when the default root_dir is included in the override root_dir.
Please review Salt's Contributing Guide for best practices.