Skip to content

Conversation

@ianbotsf
Copy link
Contributor

Issue #

Resolves #1596

Description of changes

This change corrects an oversight in key field conversion, namely relying on ItemConverter implementations to respect and properly handle the onlyAttributes argument. Given that implementations may vary widely and come from untrusted/unmodifiable sources, this change manually trims post-conversion key fields to retain only key attributes (dropping non-key attributes). Currently this affects four parameters:

  • DeleteItemRequest.key
  • GetItemRequest.key
  • QueryRequest.exclusiveStartKey
  • ScanRequest.exclusiveStartKey

This should eliminate service errors when sending too many fields in the above operations requests.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ianbotsf ianbotsf requested a review from a team as a code owner June 16, 2025 23:26
Comment on lines 10 to 11
import aws.smithy.kotlin.runtime.ExperimentalApi
import kotlin.jvm.JvmName

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment: No clue why this is no longer necessary. 🤷‍♂️

@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

@github-actions

This comment has been minimized.

@sonarqubecloud
Copy link

@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

@github-actions
Copy link

Affected Artifacts

No artifacts changed size

@ianbotsf ianbotsf merged commit d08b78e into main Jun 17, 2025
25 checks passed
@ianbotsf ianbotsf deleted the fix-ddbm-pagination-key-coercion branch June 17, 2025 17:42
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.

DynamoDbMapper scan pagination ExclusiveStartKey issue

2 participants