-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Operations/methods missing paginators #1462
Comments
Thanks for generating this list. We need to do a little more auditing on these. Another important attribute for operations that we can support pagination for is if the operation has a list in the output (and preferably only one list). Sometimes APIs will paginate over maps or have multiple lists and this can be problematic for us as we aggregate the output on behalf of the user (this is unique to boto3/CLI in comparison to other SDKs). If anybody wants to start taking a crack at these please go ahead, ideally each service as a separate PR. |
any ETA on when these paginators will be available? |
This adds the missing pagination definitions for the CloudFormation APIs, as described in boto#1462. I've tested DescribeChangeSet and ListChangeSets and both work as expected after this change, ``` client = boto3.client('cloudformation', region_name='eu-west-1') paginator = client.get_paginator('list_change_sets') page_iterator = paginator.paginate(StackName='MyStack') for page in page_iterator: print(page) ```
So that there's one place to look for all of these, here's a list of other PRs I've found that add pagination definitions -
|
There are currently no pagination definitions for CloudWatch Events APIs. I've created them from the API Reference for this PR. The list of definitions now matches the API reference and also the list missing in boto#1462. ```python client = boto3.client('events', region_name='eu-west-1') paginator = client.get_paginator('list_rules') page_iterator = paginator.paginate(NamePrefix='RDS', PaginationConfig={'PageSize': 2}) for page in page_iterator: print(page) ```
I’ve done one off contribs on paginators before. I suggest a holistic approach geared towards coverage, ie default generators based on this heuristic, followed with api method specific customization as needed. |
I went ahead and extended this snippet to enable generation of paginators taking into the account additional constraints with regard to merged output fields, if I send a pr per service its on the order of 60+.. is that preferable to an individual pr? |
I just updated #1548 to fix a test failure. I agree that handling this at an individual service level seems prone to failure. It'd be great to have the paginator config auto-generated from the service JSON instead of being manually updated (or not, as the case may be). |
@kapilt I have a script that generates paginators, constrained heavily to only generate those that I can be absolutely certain about. I just merged a PR stemming from that that added a ton. What we really need to do is to have that be part of our release automation. Right now we're relying pretty much entirely on getting them from upstream. |
@JordonPhillips thanks, one thing missing from the pr was the script used to generate afaics re #1633 which ideally would be part of the source tree as well (scripts dir perhaps) |
This adds the missing pagination definitions for the CloudFormation APIs, as described in #1462. I've tested DescribeChangeSet and ListChangeSets and both work as expected after this change, ``` client = boto3.client('cloudformation', region_name='eu-west-1') paginator = client.get_paginator('list_change_sets') page_iterator = paginator.paginate(StackName='MyStack') for page in page_iterator: print(page) ```
The script doesn't identify methods where the token is not named |
Looks like this is still an issue:
|
@JonathanDCohen I suspect you're on an out-of-date version of boto3. Have you tried updating? I'm on a version from March and it works fine.
|
@brandond yeah that was it. All figured out :) |
The
|
@iann0036 investigated: https://github.com/iann0036/aws-pagination-rules I also investigated: aws-cloudformation/cloudformation-cli#663 |
I ran into a missing paginator for a function that uses "nextToken" instead of "NextToken"... it seems like this should have been fixed by now.
@JordonPhillips - would you be willing to share your script so others can use it? CONTRIBUTING.rst mentions this topic first added here:
I see one-offs being added to the code, but there are also several PRs sitting open (see above). Are one-offs now allowed? @jamesls - since you updated CONTRIBUTING.rst, where is the upstream location that we can modify to get this fixed across SDKs for all languages? |
Service teams are now the owners of their paginator models as those model definitions are shared across AWS SDKs. We are currently tracking paginator requests here in our cross-SDK respository: https://github.com/aws/aws-sdk/issues?q=is%3Aissue+is%3Aopen+label%3Apaginator. If you'd like to see a paginator for a specific service/API, please create an issue in that repository with your use case and request. You can also consider reaching out through AWS Support for further escalation on these types of requests. But since the paginator additions would need to happen upstream rather than in botocore directly, I'm going to close this issue. Please let us know if you had any questions or feedback regarding this. |
I brought this up at the openspace at pycon, there are lots of client methods missing paginator metadata. I went ahead and coded up simple script to identify all the missing paginators in botocore json sdk metadata.
Which results in the following output
The text was updated successfully, but these errors were encountered: