-
Notifications
You must be signed in to change notification settings - Fork 202
chore(ux): improve oras backup error message #1833
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
Conversation
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1833 +/- ##
==========================================
+ Coverage 85.21% 85.25% +0.04%
==========================================
Files 143 143
Lines 6737 6742 +5
==========================================
+ Hits 5741 5748 +7
+ Misses 708 707 -1
+ Partials 288 287 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
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.
Pull Request Overview
This PR improves the error message when using oras backup
with an output path that ends with .tar
but points to an existing directory instead of a file. The enhancement provides clearer guidance to users about the conflict and suggests actionable solutions.
- Enhanced error handling to detect directory conflicts when creating tar archives
- Added user-friendly error message with specific recommendations
- Included comprehensive test coverage for the new error scenario
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
cmd/oras/root/backup.go | Added directory detection logic and improved error message for tar output conflicts |
test/e2e/suite/command/backup.go | Added end-to-end test to verify the new error message behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
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.
LGTM
What this PR does / why we need it:
This PR improves the error message in
oras backup
for the case where the output path ends with.tar
but is an existing directory.BEFORE:
AFTER:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1831
Please check the following list: