-
Notifications
You must be signed in to change notification settings - Fork 4.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
Default ec2 page size to 1000 #1971
Conversation
@@ -102,6 +103,7 @@ def awscli_initialize(event_handlers): | |||
ec2_add_priv_launch_key) | |||
register_parse_global_args(event_handlers) | |||
register_pagination(event_handlers) | |||
event_handlers.register('operation-args-parsed.ec2.*', set_max_results_default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be doing this for every ec2 operation? Does every ec2 operation have the "paginate and give me a pagination token only if you gave me a page size to start"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set_max_results
checks if the function has pagination by looking for page_size
, which is only present on functions that both have pagination enabled, and also have a limit key. At that point in the stack, I have no access to the pagination config so that's the only way to check. I could potentially manually compile a list of pagination operations, but then that would break whenever EC2 adds more.
Looks fine. Had a couple of questions though that I would like answered. |
a21c6d9
to
812afc0
Compare
I rebased against develop since #1970 got merged. I also slightly simplified the if statement and clarified some of the logic. |
Hmm looks like you have some failing tests. |
Yeah, I think I may have messed up something when I rebased. |
If this value isn't set, EC2 will not paginate at all. Instead, they will attempt to return all values to you at once. Naturally, this can cause significant delay if you have a ton of resources.
812afc0
to
63f89c1
Compare
I ended up not being able to use |
Change looks good to me. Looks like this is just pending a clean run through travis. |
👍 |
Makes sense to me. 🚢 |
If this value isn't set, EC2 will not paginate at all. Instead, they will
attempt to return all values to you at once. Naturally, this can cause
significant delay if you have a ton of resources.
Built off of #1970
cc @kyleknap @jamesls