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

snapshot test for return values on condition check failure #9984

Merged
merged 2 commits into from Jan 5, 2024

Conversation

giograno
Copy link
Member

@giograno giograno commented Jan 3, 2024

Motivation

This PR arises from #9040.

When an operation (e.g., PutItem or DeleteItem) fails on DDB due to a conditional check, we can ask to receive back the items that failed the check with the ReturnValuesOnConditionCheckFailure set to ALL_OLD.
This feature was implemented in DynamoDBLocal version 2.2.0, released in December 2023, so we can now support it out of the box. This PR simply adds a snapshot test to verify the behavior.

Changes

  • Adding a snapshot test to verify we return a set of items when ReturnValuesOnConditionCheckFailure is set to ALL_OLD.

@giograno giograno added aws:dynamodb Amazon DynamoDB semver: patch Non-breaking changes which can be included in patch releases labels Jan 3, 2024
Copy link

github-actions bot commented Jan 3, 2024

LocalStack Community integration with Pro

    2 files      2 suites   1h 14m 3s ⏱️
2 431 tests 2 205 ✅ 226 💤 0 ❌
2 432 runs  2 205 ✅ 227 💤 0 ❌

Results for commit cfa8120.

♻️ This comment has been updated with latest results.

@coveralls
Copy link

Coverage Status

coverage: 84.032% (+0.01%) from 84.022%
when pulling cfa8120 on ddb-condition-check-on-failure
into 7548ba6 on master.

@giograno giograno changed the title support for ReturnValuesOnConditionCheckFailure snapshot test for return values on condition check failure Jan 4, 2024
@giograno giograno marked this pull request as ready for review January 4, 2024 08:37
Copy link
Member

@viren-nadkarni viren-nadkarni left a comment

Choose a reason for hiding this comment

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

Thanks for adding this @giograno!

@giograno giograno merged commit a9f80a3 into master Jan 5, 2024
30 checks passed
@giograno giograno deleted the ddb-condition-check-on-failure branch January 5, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:dynamodb Amazon DynamoDB semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants