Skip to content
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

Fix bug where paginators looped forever on empty string next token #1054

Merged
merged 2 commits into from Jan 10, 2022

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Jan 10, 2022

Motivation and Context

EC2 (and possibly other services) reply with <nextToken></nextToken> instead of omitting the field. This caused our paginators to loop indefinitely.

Description

  • Add a explicit handling of empty strings to the paginator logic
  • add loop-detection the ensure that paginators will abort immediately if a duplicate nextToken is received.

Testing

  • test the exact code in question against live ec2
  • adapt code in question into a recorded example
  • update dynamodb db tests

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rcoh rcoh requested a review from a team as a code owner January 10, 2022 15:04
@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

@github-actions
Copy link

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

@rcoh rcoh merged commit 2e50dab into main Jan 10, 2022
@rcoh rcoh deleted the paginators-reject-empty branch January 10, 2022 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants