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

bump: bump oras-go to 2.5.0 #1303

Merged
merged 18 commits into from
Mar 28, 2024
Merged

bump: bump oras-go to 2.5.0 #1303

merged 18 commits into from
Mar 28, 2024

Conversation

wangxiaoxuan273
Copy link
Contributor

@wangxiaoxuan273 wangxiaoxuan273 commented Mar 22, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #1275
Fixes #1304

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

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.

The build and the lint failed.

The build failure is due to the E2E test failure caused by a bug in checking the reference for oci-layout (check line 77).

PreRunE: func(cmd *cobra.Command, args []string) error {
opts.RawReference = args[0]
if _, err := registry.ParseReference(opts.RawReference); err != nil {
return fmt.Errorf("unable to add tag for '%s': %w", opts.RawReference, err)
}
opts.targetRefs = args[1:]
return option.Parse(&opts)
},

@qweeah
Copy link
Contributor

qweeah commented Mar 25, 2024

@shizhMSFT is right, you need to 1) handle all invalid reference error in tag list reflecting #1058; 2) improve target.Parse to accommodate changes in oras-go.

@qweeah
Copy link
Contributor

qweeah commented Mar 25, 2024

Also need to refactor reference parsing for OCI image layout and do it in target.Parse, so unable to add tag for '%s' can be printed for OCI layout

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 covers #1307 but does not cover #1306

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.27%. Comparing base (24c2acf) to head (39155e8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1303      +/-   ##
==========================================
+ Coverage   82.10%   82.27%   +0.16%     
==========================================
  Files          83       83              
  Lines        4030     4029       -1     
==========================================
+ Hits         3309     3315       +6     
+ Misses        498      494       -4     
+ Partials      223      220       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

Since this PR also fixes #1304, we also need to enhance E2E tests.

cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
@wangxiaoxuan273
Copy link
Contributor Author

Since this PR also fixes #1304, we also need to enhance E2E tests.

Added a test case for #1304

cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

LGTM

cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
cmd/oras/root/tag.go Show resolved Hide resolved
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>

increase coverage

resolve comment

Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
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 with suggestions

cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/target.go Outdated Show resolved Hide resolved
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
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

Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

LGTM

@qweeah qweeah merged commit 093ed14 into oras-project:main Mar 28, 2024
8 checks passed
@wangxiaoxuan273 wangxiaoxuan273 deleted the bump branch March 28, 2024 07:56
FeynmanZhou pushed a commit to FeynmanZhou/oras that referenced this pull request May 11, 2024
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oras tag cannot retag an artifact in OCI image layout
3 participants