-
Notifications
You must be signed in to change notification settings - Fork 354
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: local checkpoint download path fix #8722
Conversation
✅ Deploy Preview for determined-ui canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8722 +/- ##
==========================================
- Coverage 47.26% 47.25% -0.01%
==========================================
Files 1045 1045
Lines 166692 166692
Branches 2244 2244
==========================================
- Hits 78780 78777 -3
- Misses 87754 87757 +3
Partials 158 158
Flags with carried forward coverage won't be shown. Click here to find out more. |
if !strings.HasSuffix(prefix, "/") { | ||
prefix += "/" | ||
} | ||
return &LocalDownloader{ | ||
aw: aw, | ||
prefix: filepath.Clean(prefix), |
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.
why do we need filepath.Clean
in the first place?
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.
the original instance of filepath.Clean
in archivePath
was added because the go sec linter desired some validation for open, altho one could argue we could ignore the linter there. it does seem helpful to cleanup the input here as we don't need to be as concerned with the internal implementation of filepath.Walk
and what sort of path names might be returned when we trim the prefix during listing.
Description
Fixes an issue with local checkpoint download where file contents are relative to the root.
Test Plan
e2e tests
Commentary (optional)
This bug fix is for unreleased code in PR #8684.
Checklist
docs/release-notes/
.See Release Note for details.
Ticket