-
Notifications
You must be signed in to change notification settings - Fork 670
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
support for pagination for timestream.list_databases list_tables #1846
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
Looks good!
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.
Looks good, let's just make sure the CB passes
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.
Do you think it's worthwhile to create some tests for this? Creating too many timestream databases/tables might take too long, but maybe we could just mock the boto
calls in order to make sure that we're actually testing the pagination. As in the first response returns nextToken
, but the second one does not.
I've written and deployed code in the past where my while "nextToken" in response
was never properly tested, and thus ended up not working when we needed to do pagination.
I'm ok updating the tests to check that pagination works properly - but in that case it is better if I handle MaxResults (add a "limit" argument to list_databases/list_tables perhaps?) as well to avoid having to create tens of databases/tables. Long term I'm actually wondering if it is worth having list_databases and list_tables at all in our API. People can use straight-boto3 and I'm not sure what value we're adding for these two calls. Any thought on this? |
@cnfait My 2 cents: it's things like handling pagination is the value add here so we still might be a bit more convenient than pure boto3 calls. Also btw we could look into using generators and |
I thought about it but didn't want to change the type signature of the functions. Perhaps it's okay though, or I can do it for 3.0.0? |
@cnfait I guess type signature could be a |
Btw all of that is just a wishlist and can be addressed by the following PRs - this one looks great already! |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Feature or Bugfix
Relates
wr.timestream.list_databases
andwr.timestream.list_tables
#1822By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.