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: create index from existing manifests (index create) #1475

Merged
merged 6 commits into from
Sep 6, 2024

Conversation

wangxiaoxuan273
Copy link
Contributor

@wangxiaoxuan273 wangxiaoxuan273 commented Aug 12, 2024

What this PR does / why we need it:
oras manifest index create command

Current output:

~# oras manifest index create wxxdevreg.azurecr.io/test:tag0,tag1,tag2 amd64 armv7
Fetching  amd64
Fetched   amd64
Fetching  armv7
Fetched   armv7
Packed    5123c2f12c03  application/vnd.oci.image.index.v1+json
Pushed    [registry] wxxdevreg.azurecr.io/test:tag0
Tagged    tag2
Tagged    tag1
Digest: sha256:5123c2f12c03cf1af0fc7b27dde0e5c363fa61ecff7885a0fe6c09d1af4e039f

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 #1053

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

codecov bot commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 88.33333% with 14 lines in your changes missing coverage. Please review.

Project coverage is 85.62%. Comparing base (3dc7eeb) to head (90f124c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/oras/root/manifest/index/create.go 84.94% 7 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1475      +/-   ##
==========================================
+ Coverage   85.54%   85.62%   +0.08%     
==========================================
  Files         113      116       +3     
  Lines        3936     4056     +120     
==========================================
+ Hits         3367     3473     +106     
- Misses        342      349       +7     
- Partials      227      234       +7     

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

@wangxiaoxuan273 wangxiaoxuan273 changed the title feat: create index from existing manifests feat: create index from existing manifests (index create) Aug 13, 2024
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
cmd/oras/root/manifest/index/create.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.

Please mark oras manifest index command set as "experimental".

internal/descriptor/descriptor_test.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/utils.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/text/manifest_push.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/handler.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
internal/descriptor/descriptor.go Outdated Show resolved Hide resolved
internal/descriptor/descriptor_test.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/handler.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/interface.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Outdated Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Outdated Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Outdated Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Outdated Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Outdated Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Outdated Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Show resolved Hide resolved
@wangxiaoxuan273 wangxiaoxuan273 force-pushed the index-create branch 2 times, most recently from 8fa09d4 to d56b7a2 Compare August 22, 2024 03:30
test/e2e/README.md Outdated Show resolved Hide resolved
test/e2e/internal/testdata/multi_arch/const.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Outdated Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Outdated Show resolved Hide resolved
test/e2e/suite/command/manifest_index.go Outdated Show resolved Hide resolved
test/e2e/internal/testdata/multi_arch/const.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
internal/descriptor/descriptor.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
internal/descriptor/descriptor.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/handler.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/interface.go Outdated Show resolved Hide resolved
internal/descriptor/descriptor.go Outdated Show resolved Hide resolved
internal/descriptor/descriptor.go Outdated Show resolved Hide resolved
internal/contentutil/reference.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Show resolved Hide resolved
internal/descriptor/descriptor.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.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

Copy link
Member

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

Xiaoxuan Wang added 6 commits September 6, 2024 09:46
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
@qweeah qweeah merged commit 40dd8f9 into oras-project:main Sep 6, 2024
8 checks passed
@wangxiaoxuan273 wangxiaoxuan273 deleted the index-create branch September 6, 2024 01:51
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.

5 participants