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

feat: Add ability query tags for oras repo tags command #800

Merged
merged 8 commits into from
Feb 23, 2023

Conversation

TerryHowe
Copy link
Member

@TerryHowe TerryHowe commented Feb 10, 2023

Add a ability for the oras repo tags command to get the tags associated with a specified digest or tag. Given a tag, it will return the digest. Given a digest, it will return the tag.

Closes: #799

Signed-off-by: Terry Howe tlhowe@amazon.com

@TerryHowe TerryHowe marked this pull request as draft February 10, 2023 21:50
@TerryHowe TerryHowe changed the title feat: Add filter option to oras repo tags command feat: Add ability query tags for oras repo tags command Feb 11, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2023

Codecov Report

Merging #800 (c3a8e4a) into main (4d97bbd) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main     #800   +/-   ##
=======================================
  Coverage   63.50%   63.50%           
=======================================
  Files          21       21           
  Lines         844      844           
=======================================
  Hits          536      536           
  Misses        265      265           
  Partials       43       43           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@TerryHowe TerryHowe marked this pull request as ready for review February 11, 2023 13:52
@qweeah
Copy link
Contributor

qweeah commented Feb 13, 2023

Given a tag, it will return the digest.

This is an inconsistent user experience since the return value is not tags any more. Functionally it's already covered by oras manifest get. I think it's better to return error.

cmd/oras/repository/tags.go Outdated Show resolved Hide resolved
cmd/oras/repository/tags.go Outdated Show resolved Hide resolved
cmd/oras/repository/tags.go Outdated Show resolved Hide resolved
cmd/oras/repository/tags.go Outdated Show resolved Hide resolved
Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with suggestions. Also, I have added test enhancement in #829. Feel free to comment if you are interested in adding them, or you come up with any new cases.

@qweeah
Copy link
Contributor

qweeah commented Feb 21, 2023

@TerryHowe Can you help rebase the PR? @shizhMSFT Please take a look when you have time, thanks.

cmd/oras/repository/tags.go Outdated Show resolved Hide resolved
cmd/oras/repository/tags.go Outdated Show resolved Hide resolved
@shizhMSFT
Copy link
Contributor

@TerryHowe The PR overall LGTM but I left some comments on the user experience.

Terry Howe added 6 commits February 22, 2023 08:18
Signed-off-by: Terry Howe <tlhowe@amazon.com>
Signed-off-by: Terry Howe <tlhowe@amazon.com>
Signed-off-by: Terry Howe <tlhowe@amazon.com>
Signed-off-by: Terry Howe <tlhowe@amazon.com>
Signed-off-by: Terry Howe <tlhowe@amazon.com>
Signed-off-by: Terry Howe <tlhowe@amazon.com>
Terry Howe added 2 commits February 22, 2023 08:18
Signed-off-by: Terry Howe <tlhowe@amazon.com>
Signed-off-by: Terry Howe <tlhowe@amazon.com>
Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qweeah qweeah merged commit 0a34492 into oras-project:main Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add filter to oras repo tags to filter by sha or tag
4 participants