Skip to content

bump: bump oras-go to 2.5.0#1303

Merged
qweeah merged 18 commits into
oras-project:mainfrom
wangxiaoxuan273:bump
Mar 28, 2024
Merged

bump: bump oras-go to 2.5.0#1303
qweeah merged 18 commits into
oras-project:mainfrom
wangxiaoxuan273:bump

Conversation

@wangxiaoxuan273

@wangxiaoxuan273 wangxiaoxuan273 commented Mar 22, 2024

Copy link
Copy Markdown
Contributor

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?

@shizhMSFT shizhMSFT left a comment

Copy link
Copy Markdown
Contributor

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

qweeah commented Mar 25, 2024

Copy link
Copy Markdown
Contributor

@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

qweeah commented Mar 25, 2024

Copy link
Copy Markdown
Contributor

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

@shizhMSFT shizhMSFT left a comment

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Mar 25, 2024

Copy link
Copy Markdown

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.

@qweeah qweeah left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread cmd/oras/internal/option/target.go Outdated
Comment thread cmd/oras/internal/option/target.go Outdated
@wangxiaoxuan273 wangxiaoxuan273 force-pushed the bump branch 2 times, most recently from 4c4f143 to fc8679d Compare March 25, 2024 08:54
@wangxiaoxuan273

Copy link
Copy Markdown
Contributor Author

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

Added a test case for #1304

Comment thread cmd/oras/internal/option/target.go Outdated
Comment thread cmd/oras/internal/option/target.go
Comment thread cmd/oras/internal/option/target.go Outdated
Comment thread cmd/oras/internal/option/target.go Outdated

@qweeah qweeah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread cmd/oras/internal/option/target.go Outdated
Comment thread cmd/oras/internal/option/target.go Outdated
Comment thread cmd/oras/root/tag.go
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>

@shizhMSFT shizhMSFT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM with suggestions

Comment thread cmd/oras/internal/option/target.go Outdated
Comment thread cmd/oras/internal/option/target.go Outdated
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>

@shizhMSFT shizhMSFT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@qweeah qweeah left a comment

Copy link
Copy Markdown
Contributor

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