Skip to content

feat: create index from existing manifests (index create)#1475

Merged
qweeah merged 6 commits into
oras-project:mainfrom
wangxiaoxuan273:index-create
Sep 6, 2024
Merged

feat: create index from existing manifests (index create)#1475
qweeah merged 6 commits into
oras-project:mainfrom
wangxiaoxuan273:index-create

Conversation

@wangxiaoxuan273

@wangxiaoxuan273 wangxiaoxuan273 commented Aug 12, 2024

Copy link
Copy Markdown
Contributor

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?

@codecov

codecov Bot commented Aug 12, 2024

Copy link
Copy Markdown

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.

Comment thread cmd/oras/root/manifest/index/create.go
Comment thread cmd/oras/root/manifest/index/create.go Outdated
@wangxiaoxuan273 wangxiaoxuan273 changed the title feat: create index from existing manifests feat: create index from existing manifests (index create) Aug 13, 2024
Comment thread cmd/oras/root/manifest/index/create.go Outdated
Comment thread cmd/oras/root/manifest/index/create.go Outdated
Comment thread cmd/oras/root/manifest/index/create.go Outdated
Comment thread cmd/oras/root/manifest/index/create.go Outdated
Comment thread cmd/oras/root/manifest/index/create.go Outdated
Comment thread cmd/oras/root/manifest/index/create.go Outdated
Comment thread cmd/oras/root/manifest/index/create.go
Comment thread cmd/oras/root/manifest/index/create.go Outdated
Comment thread cmd/oras/root/manifest/index/create.go
Comment thread cmd/oras/root/manifest/index/create.go Outdated

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

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

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

@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

Comment thread cmd/oras/root/manifest/index/create.go Outdated
Comment thread cmd/oras/root/manifest/index/create.go

@Wwwsylvia Wwwsylvia left a comment

Copy link
Copy Markdown
Member

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

Xiaoxuan Wang added 6 commits September 6, 2024 09:46
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
@qweeah qweeah merged commit 40dd8f9 into oras-project:main Sep 6, 2024
@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