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

dynamodb_table_item create: use ConditionExpression #27517

Merged
merged 6 commits into from
Nov 16, 2022
Merged

dynamodb_table_item create: use ConditionExpression #27517

merged 6 commits into from
Nov 16, 2022

Commits on Oct 27, 2022

  1. dynamodb_table_item create: use ConditionExpression

    - per [AWS' documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html) `Expected` is a legacy parameter and should no longer be used
    - should fix #26080, or at least be more predictable, while maintaining the same behavior for tables without composite keys. It seems like `Expected` is only checking that the hash key does not exist whereas this `ConditionExpression` will check whether an item with the same hash key _and_ range key does not exist
    - [this blog post](https://www.alexdebrie.com/posts/dynamodb-condition-expressions/) explains how this `ConditionExpression` works, essentially the condition will always be compared against a single item and so it is sufficient to just check for the existence of the hash key
    milescrabill committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    6b3880b View commit details
    Browse the repository at this point in the history
  2. Run 'make fmt'.

    ewbankkit committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    e6dcc60 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    47c9709 View commit details
    Browse the repository at this point in the history
  4. Add 'TestAccDynamoDBTableItem_withDuplicateItemsSameRangeKey' and 'Te…

    …stAccDynamoDBTableItem_withDuplicateItemsDifferentRangeKey'.
    ewbankkit committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    84ec27c View commit details
    Browse the repository at this point in the history
  5. Add CHANGELOG entry.

    ewbankkit committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    68fafb9 View commit details
    Browse the repository at this point in the history
  6. Update 27517.txt

    ewbankkit committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    26b2188 View commit details
    Browse the repository at this point in the history