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?
Credit
Credit to @sudo-bmitch for finding the bug (Slack conversation).
What happened in your environment?
oras cp -rfails if an index points to the same manifest as a child manifest and a subject.What did you expect to happen?
How can we reproduce it?
Run
oras cp -r -v ghcr.io/sudo-bmitch/oci-sandbox:loop --to-oci-layout sandbox:loopWhat is the version of your ORAS CLI?
What is your OS environment?
ubuntu 22.04
Are you willing to submit PRs to fix it?
Credit
Credit to @sudo-bmitch for finding the bug (Slack conversation).