-
Notifications
You must be signed in to change notification settings - Fork 191
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
refactor: deprecate table format #1656
Conversation
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1656 +/- ##
==========================================
- Coverage 84.42% 84.40% -0.03%
==========================================
Files 125 125
Lines 5663 5667 +4
==========================================
+ Hits 4781 4783 +2
- Misses 627 629 +2
Partials 255 255 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 deprecates the table format used in the oras discover command by issuing a deprecation warning and updating related tests.
- Deprecates table format with a new deprecation message printed via the command's stderr.
- Updates the usage string for table format and adjusts tests to verify the deprecation message.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
cmd/oras/internal/option/format.go | Deprecation warning added for table format in flag parsing and usage string updated. |
test/e2e/suite/command/discover.go | Test cases modified to reflect the new default and to verify deprecation messaging for table format. |
Comments suppressed due to low confidence (2)
cmd/oras/internal/option/format.go:104
- [nitpick] Ensure the deprecation warning message printed here matches the deprecation notice in the usage string for FormatTypeTable for consistency. For example, you might adjust the text so both messages use similar wording regarding the future removal.
if opts.FormatFlag == "table" {
test/e2e/suite/command/discover.go:212
- The test expectation has been updated to check for the deprecation message, which now correctly flags the use of table format. Confirm that 'feature.Deprecated.Mark' is consistently defined to match the actual deprecation message printed.
Expect(err).To(gbytes.Say(feature.Deprecated.Mark))
Signed-off-by: Xiaoxuan Wang <[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
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
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:
Deprecate table format, which is only used in
oras discover
.When using

table
withoras discover
command:oras discover -h
: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 #
Please check the following list: