-
Notifications
You must be signed in to change notification settings - Fork 28
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: paginators not respecting start key #1101
Conversation
This comment has been minimized.
This comment has been minimized.
@@ -148,7 +148,7 @@ class PaginatorGenerator : KotlinIntegration { | |||
write("") | |||
withBlock("while (hasNextPage) {", "}") { | |||
withBlock("val req = initialRequest.copy {", "}") { | |||
write("this.$markerLiteral = cursor") | |||
write("this.$markerLiteral = this.$markerLiteral ?: cursor") |
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.
question / correctness: Won't this logic always use the initialRequest.$markerLiteral
if it's not null? How does the cursor get updated to fetch the second page in that case?
I was expecting the fix to be changing L146 to:
write("var cursor: #F = initialRequest.#L", cursorSymbol, markerLiteral)
This will be null
when the initialRequest.$markerLiteral
is not set, preserving existing behavior
{ | ||
"id": "15fb7dc6-dee9-4f40-adba-a48183d4f432", | ||
"type": "bugfix", | ||
"description": "Paginators not respecting start key", |
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.
nit: usually the changelog description should finish the sentence "This PR will..."
"Fix paginators not respecting start key"
Affected ArtifactsNo artifacts changed size |
Issue #
aws-sdk-kotlin#1330
Description of changes
Check if start key is exists before setting it to null
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.