-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
CloudHSMv2 Integration #8532
base: master
Are you sure you want to change the base?
CloudHSMv2 Integration #8532
Conversation
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.
Thanks for the PR @Singha22.
It looks like the ServerMode tests are currently failing - let me know if you need any help looking into them
if not max_results: | ||
return tags, None | ||
|
||
if next_token: |
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.
What is the reasoning behind manipulating the next_token
?
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.
The token has to be converted into base64 so without it, we get something like eyJwYXJhbWV0ZXJDaGVja3N1bSI6IDQyMzg4OTQxMTIsICJ1bmlxdWVBdHRyaWJ1dGVzIjogIlByb2plY3QifQ
instead of eyJwYXJhbWV0ZXJDaGVja3N1bSI6IDQyMzg4OTQxMTIsICJ1bmlxdWVBdHRyaWJ1dGVzIjogIlByb2plY3QifQ==
. Is this not the right approach?
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.
That explains what it does - I wanted to know why 🙂
The nextToken
that AWS returns is usually a random string, and the user should not care about the exact format of it. So my question was more: why do we need to manipulate the token, and can we not use the token that the Paginator
returns?
If we don't have to manipulate the token, then we can rip this all out and replace it with the @paginate
decorator instead, which would be much nicer (IMHO).
If there is a good reason we must manipulate the token, then that's fine as well - I would just want to know why.
|
||
clusters = sorted(clusters, key=lambda x: x.create_timestamp) | ||
|
||
if not max_results: |
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.
This doesn't look right - even if we don't have max_results
specified, we may have a next_token
that we should honor.
Can we use the @paginate
-decorator here instead?
Resolves #8571