-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Allow kinesis get_records shard iterator to have surrounding quotes #9884
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
Conversation
a4ff172 to
c7777e5
Compare
simonrw
left a comment
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 adding this regression test, nice and clear. Only really a question about receiving any records, but otherwise 🎉
| StreamName=stream_name, ShardIteratorType="LATEST", ShardId=shard_id | ||
| )["ShardIterator"] | ||
|
|
||
| aws_client.kinesis.get_records(ShardIterator=f'"{shard_iterator}"') |
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.
Is there a scenario where there might be single quotes? Do we need to cover both cases?
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.
I did not check whether single quotes would be allowed, but the main issue of the customer was that the aws cli returns it wrapped in double quotes, so this is the most important case for now :)
Motivation
Using the AWS CLI, it is easily accomplished to have surrounding double quotes around the Shard Iterator of the
get_recordsrequest.Even though this is not technically correct, both the CLI and AWS allow this.
This PR will add a test for the behavior on LS side
Kinesis-mock issue: etspaceman/kinesis-mock#682
Upstream PR: etspaceman/kinesis-mock#689
Changes