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

oras cp -r fails if index has a child manifest as subject #1129

Closed
1 task done
shizhMSFT opened this issue Sep 22, 2023 · 0 comments · Fixed by #1130, #1266 or armbian/build#6964 · May be fixed by jnnycn007/Armbian-build#20
Closed
1 task done

oras cp -r fails if index has a child manifest as subject #1129

shizhMSFT opened this issue Sep 22, 2023 · 0 comments · Fixed by #1130, #1266 or armbian/build#6964 · May be fixed by jnnycn007/Armbian-build#20
Assignees
Labels
bug Something isn't working
Milestone

Comments

@shizhMSFT
Copy link
Contributor

shizhMSFT commented Sep 22, 2023

What happened in your environment?

oras cp -r fails if an index points to the same manifest as a child manifest and a subject.

$ oras cp -r -v ghcr.io/sudo-bmitch/oci-sandbox:loop --to-oci-layout sandbox:loop
Error: sha256:ab497c435e6242b8d9ce0a7ec9e74f4c7550e7b1890b64c6d31e6f9ddc8ee885: application/vnd.oci.image.index.v1+json: not found

What did you expect to happen?

$ oras cp -r -v ghcr.io/sudo-bmitch/oci-sandbox:loop --to-oci-layout sandbox
Copied [registry] ghcr.io/sudo-bmitch/oci-sandbox:loop => [oci-layout] sandbox
Digest: sha256:ab497c435e6242b8d9ce0a7ec9e74f4c7550e7b1890b64c6d31e6f9ddc8ee885

How can we reproduce it?

Run oras cp -r -v ghcr.io/sudo-bmitch/oci-sandbox:loop --to-oci-layout sandbox:loop

What is the version of your ORAS CLI?

Version:        1.1.0+unreleased
Go version:     go1.21.1
Git commit:     8cf946fb9170242eece7e79967462e8274cbace1
Git tree state: clean

What is your OS environment?

ubuntu 22.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Credit

Credit to @sudo-bmitch for finding the bug (Slack conversation).

@shizhMSFT shizhMSFT added the bug Something isn't working label Sep 22, 2023
@shizhMSFT shizhMSFT added this to the v1.2.0 milestone Sep 22, 2023
@shizhMSFT shizhMSFT changed the title oras cp --r fails if destination ref has a tag oras cp --r fails if an index points to the same manifest as child manifest and subject Sep 22, 2023
@shizhMSFT shizhMSFT changed the title oras cp --r fails if an index points to the same manifest as child manifest and subject oras cp --r fails if index has a child manifest as subject Sep 22, 2023
@shizhMSFT shizhMSFT assigned shizhMSFT and unassigned qweeah Sep 22, 2023
@shizhMSFT shizhMSFT changed the title oras cp --r fails if index has a child manifest as subject oras cp -r fails if index has a child manifest as subject Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment