-
Notifications
You must be signed in to change notification settings - Fork 181
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
feat: support tagging multiple tags at once to a remote registry #574
Conversation
Signed-off-by: Jun <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #574 +/- ##
=======================================
Coverage 72.54% 72.54%
=======================================
Files 14 14
Lines 510 510
=======================================
Hits 370 370
Misses 112 112
Partials 28 28 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
cmd/oras/tag/tag.go
Outdated
// Override PushReference method to print off which tag(s) were added successfully. | ||
func (w *wrapper) PushReference(ctx context.Context, expected ocispec.Descriptor, content io.Reader, reference string) error { | ||
if err := w.Repository.PushReference(ctx, expected, content, reference); err != nil { | ||
return fmt.Errorf("failed %s", reference) |
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 failed %s
error message looks a bit confusing. What does the error message look like if we return the err
directly?
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 error itself looks like: Error: failed to tag localhost:12900/hello:latest as tag55:1,: invalid reference: invalid tag
changed to what Shiwei suggested fmt.Errorf("%s: %w", reference, err)
and now error looks like: Error: failed to tag localhost:12900/hello:latest as tag55:1,: tag55:1,: invalid reference: invalid tag
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.
Signed-off-by: Jun <[email protected]>
Signed-off-by: Jun <[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
Resolves #355
Signed-off-by: Jun [email protected]