Skip to content

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

Closed

Description

@shizhMSFT

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

Activity

  1. added
    bug
    on Sep 22, 2023
  2. added this to the v1.2.0 milestone on Sep 22, 2023
  3. 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[/+] on Sep 22, 2023
  4. 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[/+] on Sep 22, 2023
  5. 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[/+] on Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions