Allow kinesis get_records shard iterator to have surrounding quotes#9884
Merged
Allow kinesis get_records shard iterator to have surrounding quotes#9884
Conversation
4 tasks
etspaceman
added a commit
to etspaceman/localstack
that referenced
this pull request
Dec 18, 2023
dfangl
pushed a commit
to etspaceman/localstack
that referenced
this pull request
Dec 19, 2023
a4ff172 to
c7777e5
Compare
simonrw
approved these changes
Dec 19, 2023
Contributor
simonrw
left a comment
There was a problem hiding this comment.
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}"') |
Contributor
There was a problem hiding this comment.
Is there a scenario where there might be single quotes? Do we need to cover both cases?
Member
Author
There was a problem hiding this comment.
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 :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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