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 showing wrong digest #814

Closed
qweeah opened this issue Feb 14, 2023 · 1 comment
Closed

oras cp showing wrong digest #814

qweeah opened this issue Feb 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Feb 14, 2023

When copying an image of a certain arch from an index using --platform, if

  • recursively copying (-r is used), or
  • no tag specified in the target registry

Then the digest of index will be shown in the copy summary.

ORAS version

Version:        1.0.0-rc.1
Go version:     go1.19.5
Git commit:     a98931bc68a0e7a5de6c51df8e5aa09aadad3057
Git tree state: clean

Reproducing steps

# prepare index
oras cp ghcr.io/oras-project/oras:v1.0.0-rc.1 --to-oci-layout ./local/oras:v1.0.0-rc.1 -v

# attach to linux/s390x image
echo hello > hello
oras attach --artifact-type test.hello --oci-layout ./local/oras@sha256:d1903141acefdeed52e34811d495f7569aba7b97d69c5a7ad22a3f213679b117

# showing wrong digest when recursively copying
 oras cp --from-oci-layout ./local/oras:v1.0.0-rc.1 --to-oci-layout ./local/oras:v1.0.0-rc.1-test --platform linux/s390x -v
-r

# showing wrong digest when copying without tagging
 oras cp --from-oci-layout ./local/oras:v1.0.0-rc.1 --to-oci-layout ./local/oras --platform linux/s390x -v -r

Expected behavior

The image digest of the chosen arch should be shown.

This bug effects all released versions after 0.15.0

@qweeah qweeah added the bug Something isn't working label Feb 14, 2023
@qweeah qweeah added this to the v1.0.0-rc.2 milestone Feb 14, 2023
@qweeah qweeah self-assigned this Feb 14, 2023
@qweeah
Copy link
Contributor Author

qweeah commented Feb 24, 2023

Fixed by #818

@qweeah qweeah closed this as completed Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant