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

Consider removing the --skip-delete-referrers #1041

Closed
1 task
sajayantony opened this issue Aug 2, 2023 · 5 comments · Fixed by #1059
Closed
1 task

Consider removing the --skip-delete-referrers #1041

sajayantony opened this issue Aug 2, 2023 · 5 comments · Fixed by #1059
Labels
enhancement New feature or request
Milestone

Comments

@sajayantony
Copy link
Contributor

What is the version of your ORAS CLI

1.1.0-rc.1+unreleased

What would you like to be added?

The '--skip-delete-referrers' flag in the ORAS CLI currently serves as a fallback mechanism to avoid deleting referrers until all registries fully support the referrers API. However, with the increasing adoption of the referrers API among registries, the recommendation here is to remove this flag to streamline the CLI.

Why is this needed for ORAS?

Eliminating Fallback Mechanism: As registries widely adopt the referrers API, using a fallback mechanism becomes unnecessary. Removing the flag will align the ORAS CLI with modern registry standards and encourage users to embrace the benefits of the referrers API, such as improved storage management and performance.

Non-Zero Exit Code Issue: The current behavior of the ORAS CLI, where deleting referrers using the tag schema results in a non-zero exit code, can cause problems in CI/CD pipelines. By removing the flag, we ensure a consistent zero exit code, providing clearer feedback to users and preventing false pipeline failures.

Alignment with Registry Behavior: Registries already handle tag updates by attaching new manifests without deleting old ones. Removing the '--skip-delete-referrers' flag will allow the ORAS CLI to align seamlessly with this standard registry behavior, promoting consistency and reducing potential disruptions.

Recommended Solution:
To enhance the ORAS CLI's usability and ensure it stays coordinated with modern registry practices, we propose removing the '--skip-delete-referrers' flag. This will simplify the CLI, avoid non-zero exit code issues, and align it with how registries handle tag updates. Additionally, we can update the documentation to inform users about this change during the change release.

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

  • Yes, I am willing to implement it.
@sajayantony sajayantony added the enhancement New feature or request label Aug 2, 2023
@qweeah
Copy link
Contributor

qweeah commented Aug 2, 2023

LGTM. BTW this issue actually proposes two changes:

  1. remove --skip-delete-referrers
  2. set default behavior to --skip-delete-referrers=true, which means old referrers will not be cleaned by oras

@shizhMSFT shizhMSFT added this to the v1.1.0 milestone Aug 2, 2023
@shizhMSFT
Copy link
Contributor

LGTM

@shizhMSFT
Copy link
Contributor

After discussing with @sajayantony, this proposal is for v1.1.0. The patch release v1.0.1 for v1.0.0 remains the previous behavior.

@qweeah
Copy link
Contributor

qweeah commented Aug 3, 2023

We agreed to exclude --skip-delete-referrers in #1038, so originally the flag won't be added to v1.0.1, right?

@FeynmanZhou
Copy link
Member

We agreed to exclude --skip-delete-referrers in #1038, so originally the flag won't be added to v1.0.1, right?

This change doesn't impact v1.0.1 release as explained in #1038.

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
Development

Successfully merging a pull request may close this issue.

4 participants