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

fix: join next link instead of append for pagination in get_tags #174

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

natefaerber
Copy link
Contributor

Resolves #173

Some simple testing (see original issue for reproduction):

>>> tags = client.get_tags('my/image')
>>> len(tags)
3232
>>> tags = client.get_tags('my/image', N=100)
>>> len(tags)
100
>>> tags = client.get_tags('my/image', N=1)
>>> len(tags)
1
>>> tags = client.get_tags('my/other_image')
>>> len(tags)
5
>>> tags = client.get_tags('my/other_image', N=10)
>>> len(tags)
5
>>> tags = client.get_tags('my/other_image', N=1)
>>> len(tags)
1

Note that an error will still occur when passing N > 1000 but I'm not trying to add that guardrail here.

@natefaerber natefaerber force-pushed the fix/ecr-get-tags-pagination branch from d487eed to 69ba7e8 Compare December 5, 2024 19:51
@vsoch
Copy link
Contributor

vsoch commented Dec 6, 2024

This looks good - pending tests passing, would you please bump the version and update the CHANGELOG.md with the corresponding version and a note about the change?

@natefaerber
Copy link
Contributor Author

This looks good - pending tests passing, would you please bump the version and update the CHANGELOG.md with the corresponding version and a note about the change?

I can do that. I wasn't sure (didn't actually check) if that was part of the process. Coming soon.

@vsoch
Copy link
Contributor

vsoch commented Dec 6, 2024

I can do that. I wasn't sure (didn't actually check) if that was part of the process. Coming soon.

That's a good point! I can add a note to the readme about it.

@natefaerber
Copy link
Contributor Author

@vsoch , I think I need some guidance after all. I see this in the CHANGELOG.md

check for blob existence before uploading (0.2.26)

But the version in main is 0.2.25

Do you expect me to add this PR as 0.2.27 or as a second feature of unreleased 0.2.26?

@vsoch
Copy link
Contributor

vsoch commented Dec 6, 2024

That means the release isn't done yet - so you can add an indentation under 0.2.26 with your change. We can do the release this time, so feel free to bump the version too.

@natefaerber
Copy link
Contributor Author

I have pushed a commit with updated CHANGELOG and version bumped but if you want to wait a bit. I can provide a PR to fix #167.

@natefaerber natefaerber force-pushed the fix/ecr-get-tags-pagination branch from 1db4167 to 17f1a60 Compare December 6, 2024 03:02
@vsoch
Copy link
Contributor

vsoch commented Dec 6, 2024

We can do that in a separate PR (and I'll hold off on the release if you want to do it to add it). Thanks @natefaerber !

@vsoch vsoch merged commit 2fb51e3 into oras-project:main Dec 6, 2024
5 checks passed
@natefaerber
Copy link
Contributor Author

Here that other PR: #176

@natefaerber natefaerber deleted the fix/ecr-get-tags-pagination branch December 6, 2024 04:02
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.

Pagination broken in get_tags for ECR when limit None is given
2 participants