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

Add filter to oras repo tags to filter by sha or tag #799

Closed
1 task done
TerryHowe opened this issue Feb 10, 2023 · 6 comments · Fixed by #800
Closed
1 task done

Add filter to oras repo tags to filter by sha or tag #799

TerryHowe opened this issue Feb 10, 2023 · 6 comments · Fixed by #800
Labels
enhancement New feature or request

Comments

@TerryHowe
Copy link
Member

TerryHowe commented Feb 10, 2023

What is the version of your ORAS CLI

1.0.0

What would you like to be added?

It would be convenient to have a filter for oras repo tags to get all the tags associated with a digest. Something like:

 oras repo tags ${REGISTRY}/curated-packages/prometheus/prometheus@sha256:c551125a624189cece9135981621f3f3144564ddabe14b523507bf74c2281d9b

Optionally, provide a tag and list other tags associated with the same tag

oras repo tags ${REGISTRY}/curated-packages/prometheus/prometheus:latest

Why is this needed for ORAS?

I want to know the version of the latest or I want to know the version associated with a digest

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

  • Yes, I am willing to implement it.
@TerryHowe
Copy link
Member Author

Implemented a simple WIP which works for digests.

@shizhMSFT
Copy link
Contributor

The idea is great. However, we still need to consider the performance.

According to #800 (comment), docker.io/library/alpine has 129 tags. Filtering requires roughly 47 seconds. Since the time complexity is linear to the number of tags in the repository, it is estimated to take 6 mins to filter a repo of 1,000 tags.

As @qweeah has suggested, we may want to

  1. Introduce --concurreny flag to accelerate the process.
  2. Users need to be warned for long running command.
  3. This feature is required to marked as experimental due to UX concerns.

@sajayantony
Copy link
Contributor

There are throttling issues to consider since registries typically throttle the tag listing API. Also we should consider outputting a progress like curl so that users know that there is something happening rather than waiting for a long time. Higher concurrency may result in 429s easily.

@TerryHowe
Copy link
Member Author

I order to support concurrency, most likely need to add support for it in oras-go oras-project/oras-go#445

@shizhMSFT
Copy link
Contributor

I order to support concurrency, most likely need to add support for it in oras-go oras-project/oras-go#445

Tag listing cannot be done in parallel but the process of resolving a tag to a digest can.

@qweeah
Copy link
Contributor

qweeah commented Feb 17, 2023

I order to support concurrency, most likely need to add support for it in oras-go oras-project/oras-go#445

Tag listing cannot be done in parallel but the process of resolving a tag to a digest can.

Does it mean oras-go will support resolving multiple references with tuned concurrency option in the future, and oras CLI can leverage that?

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
None yet
Development

Successfully merging a pull request may close this issue.

4 participants