-
Notifications
You must be signed in to change notification settings - Fork 52
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
Auto-paginated through responses spread over multiple pages #181
Comments
Yup, looks like a pagination issue. In the debug logs I see this in the headers:
|
So, the question is how to return all results, similarly to the |
Ok, changing the UR to the below works:
...but this will break if you have >100 image versions 🤢 That's just a hack - it doesn't fix the issue, it just pushes the goalposts a bit further out. If there really is no way to specify to return all results (similar to the CLI) I guess this issue can be turned into a feature request for that functionality. |
Sorry pagination is not supported by this action. It's a supper thin wrapper to send requests to GitHub's REST API. I'd suggest to use an alternative action in this case. |
Silent truncation of data is a pretty user-hostile default which I think deserves a big warning in the README.
|
The action is a tool to utilize GitHub's REST API, the REST API documentation should be clear enough about the pagination limitation. I do agree however that the description at https://docs.github.com/en/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization is misleading.
Should be reworded to
That would be coherent with other |
I've created a PR internally at GitHub to fix this. Good spot! |
@gr2m Do you think it would be reasonable to add support for auto-pagination in this action? We do have the pagination plugin for Octokit, so it doesn't seem like a huge over-reach. We would have to think about whether we should paginate by default. |
I very much think it will be worthwhile. Even though my use-case isn't mission-critical, I still plan to move to a solution which lets me get all of the data - hopefully I won't need to! It's all well and good targeting a *"thin wrapper", however the REST API implements a mechanism to get all of your data - just follow the links recursively. For me, a tool designed to get data which by default will silently truncate your data and provides no mechanism to actually get all of your data doesn't make much sense. |
I think this would be a reasonable thing to add, but I don't think I'm going to have time to add it myself. I'll reopen this issue so the request is tracked. |
I would prefer we do not add auto-pagination. There are tons of other features we could implement that is part of Octokit but not of this action. Before going down this path I'd suggest we update the README and link to workarounds if pagination is needed.
|
I'm trying to get tags associated with container images by hitting the below endpoint:
When using this action the returned data appears to be truncated to 30 items!?!
Using the
gh
cli correctly returns all image ids/tags:Am I missing something obvious (e.g. a paginate argument) or is this a bug?
action.yml
The text was updated successfully, but these errors were encountered: