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

Paginators should respect the page size limits of operations, and should clamp the user's request for page sizes outside of the limits. #3260

Closed
rustyconover opened this issue Sep 20, 2024 · 2 comments
Assignees

Comments

@rustyconover
Copy link

Describe the bug

When setting a PageSize for a PaginatorConfig, botocore should respect the min/max limits if they exist in the metadata of the limit key.

If a user requests a PageSize outside the bounds, it should be constrained to be in bounds.

Expected Behavior

I expected a request for 10,000 items per page to be clamped to the limit of the operation's limit_key.

Current Behavior

No clamping is done of the page value and the API request fails because the requested number of items is greater than what the API can provide.

Reproduction Steps

See PR

Possible Solution

See PR #3259

Additional Information/Context

No response

SDK version used

1.35.5

Environment details (OS name and version, etc.)

Mac OS X

@rustyconover rustyconover added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Sep 20, 2024
@tim-finnigan tim-finnigan self-assigned this Sep 24, 2024
@tim-finnigan tim-finnigan removed needs-triage This issue or PR still needs to be triaged. bug This issue is a confirmed bug. labels Sep 24, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out and creating that PR. Unfortunately we cannot accept the PR, because we do not do client-side validation on the pagination parameters — those are validated by service APIs. For example:

botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the ListTables operation: 1 validation error detected: Value '200' at 'limit' failed to satisfy constraint: Member must have value less than or equal to 100

Also as noted in the other issue you opened, there are some inconsistencies among service API models. There are no plans to change the existing behavior here.

@tim-finnigan tim-finnigan closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

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

No branches or pull requests

2 participants