-
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
Fix/wheel file roots find #59803
Fix/wheel file roots find #59803
Conversation
…alt into fix/wheel_file_roots_find
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
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 require test coverage
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.
While looking at the implementation of subdir=True, I am a bit confused
if subdir:
if real_path.startswith(real_root):
return real_path
else:
if os.path.dirname(real_path) == os.path.normpath(real_root):
return real_path
Why are we calling normpath
in the else and not the subdir
case?
I didn't see any existing test in place for these modules to extend so will have to read up on tests and put something together |
@waynew maybe a good candidate for the Test Clinic next Tuesday |
This will close the corresponding issue with a comprehensive test suite: #64429. |
What does this PR do?
Adds
subdir=True
towheel.file_roots.find
What issues does this PR fix or reference?
Fixes: #59800
Previous Behavior
When attempting to read a file in a subdirectory with
wheel.file_roots.read
it would fail aswheel.file_roots.find
is not able to read from a subdirectory.New Behavior
You can successfully read a file in a subdirectory
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.