Skip to content
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

Merged
merged 7 commits into from
Sep 19, 2022

Conversation

wju-MSFT
Copy link
Contributor

Resolves #355

Signed-off-by: Jun [email protected]

@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2022

Codecov Report

Merging #574 (18385e0) into main (9390323) will not change coverage.
The diff coverage is n/a.

@@           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.

@shizhMSFT shizhMSFT added this to the v0.15.0 milestone Sep 16, 2022
cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
cmd/oras/tag/tag.go Show resolved Hide resolved
cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
// 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)
Copy link
Member

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?

Copy link
Contributor Author

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

cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is related to #355 but does not resolve it since #355 is to support multiple tags for oras push. Please also support oras manifest push related to #355.

cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
@wju-MSFT
Copy link
Contributor Author

This PR is related to #355 but does not resolve it since #355 is to support multiple tags for oras push. Please also support oras manifest push related to #355.

Shiwei, I will start a new PR to include changes for oras push and oras manifest push

@wju-MSFT wju-MSFT requested review from Wwwsylvia and shizhMSFT and removed request for Wwwsylvia and shizhMSFT September 19, 2022 11:18
cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
cmd/oras/tag/tag.go Outdated Show resolved Hide resolved
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT merged commit 24abf93 into oras-project:main Sep 19, 2022
@wju-MSFT wju-MSFT deleted the wju/355 branch September 19, 2022 11:54
TerryHowe pushed a commit to TerryHowe/oras that referenced this pull request Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Multiple tags at the once
4 participants