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

make oras cp skip dangling referrers index deletion error #952

Closed
1 task done
qweeah opened this issue May 18, 2023 · 0 comments · Fixed by #957
Closed
1 task done

make oras cp skip dangling referrers index deletion error #952

qweeah opened this issue May 18, 2023 · 0 comments · Fixed by #957
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented May 18, 2023

What is the version of your ORAS CLI

1.0.0

What would you like to be added?

oras cp is by-design to stop on the first-met error. if the copy destination is an OCI-1.0-compliant registry with deletion disabled, then oras cp operation might be done half-way without copying all the nodes.

Consider copying the below artifacts via index A to such a registry(OCI 1.0+delete disabled) with concurrency set to 1.

graph TD;
  A--platform b-->B
  A--platform c-->C
  A--platform d-->D
  B--subject-->E
  C--subject-->E
  D--subject-->E
Loading

The copy process will cover all referrers of E, since the concurrency is set to 1, those three referrers, B, C and D will be copied one by one. Let's assume the sequence is B -> C -> D:

  1. When copying B, the referrer index is created with one descriptor pointing to B
  2. When copying C, the referrer index created in step 1) is fetched and append another descriptor of B. The referrer index created in step 1) is dangling and need to be cleaned up
  3. clean up will fail and copy terminated

In this case, D is not covered and the copy process stops.

Why is this needed for ORAS?

Copying progress should not be terminated when such failure encountered, it is not terminal and user can clean up the dangling referrer index after the cp process.

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.
@qweeah qweeah added the enhancement New feature or request label May 18, 2023
@qweeah qweeah changed the title oras cp should not be terminated by failure when deleting dangling referrers index make oras cp skip dangling referrers index deletion error May 22, 2023
@shizhMSFT shizhMSFT added this to the v1.1.0 milestone Jun 28, 2023
@qweeah qweeah self-assigned this Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants