Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix flaky new DDB test #10973

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

Merged
merged 1 commit into from
Jun 6, 2024
Merged

fix flaky new DDB test #10973

merged 1 commit into from
Jun 6, 2024

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Jun 6, 2024

Motivation

As seen in this run, the ARM test failed for test_dynamodb_stream_records_with_update_item.
This looks like it can be due to parallel request being processed and not leaving the time to DynamoDB to properly ingest the first item (so it does not return it when looking if the object already exists when "updating" the item with the second call).

This is a race condition, DynamoDB has a somewhat eventual consistency, so maybe this can happen in AWS, or this could be treated as a race condition/bug in LocalStack, but we do not have a real way of preventing it for now. At least the test is more robust now.

Changes

  • update the test to make sure the first request has been properly processed, before sending the same request again

@bentsku bentsku added aws:dynamodb Amazon DynamoDB semver: patch Non-breaking changes which can be included in patch releases labels Jun 6, 2024
@bentsku bentsku requested a review from alexrashed June 6, 2024 13:08
@bentsku bentsku self-assigned this Jun 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 38m 23s ⏱️ - 1m 7s
3 020 tests ±0  2 698 ✅ ±0  322 💤 ±0  0 ❌ ±0 
3 022 runs  ±0  2 698 ✅ ±0  324 💤 ±0  0 ❌ ±0 

Results for commit 92529e8. ± Comparison against base commit 43e8992.

Copy link
Member

@alexrashed alexrashed 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 another proactive fix of a flaky test! 🦸🏽
This is really highly appreciated and everyone else benefits from less distractions due to a more stable pipeline! 🚀

@bentsku bentsku merged commit a7bf8d0 into master Jun 6, 2024
37 checks passed
@bentsku bentsku deleted the fix-ddb-flaky-test branch June 6, 2024 15:31
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.

2 participants