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

Skip to content

harden test_dynamodb_stream_records_with_update_item #11094

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 26, 2024

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Jun 26, 2024

Motivation

Following up another test failure in https://app.circleci.com/pipelines/github/localstack/localstack/26140/workflows/8cc6ef1b-70fd-4e35-bea3-77ff3637a2db/jobs/221443/tests

And follow up from #10973 which was unsuccessful at fixing the test as it didn't tackle the proper origin of the problem.

I've tried to harden the test to be more resilient. It seems the flake came from the fact that we would try to fetch the records, and if there weren't enough in the kinesis stream, we would fetch again and extend the already existing list of records with newly fetched records, leading to duplicate items (we can see the twoINSERT events have the same SequenceNumber

Changes

  • update the logic to fetch the records from DynamoDB Streams

\cc @alexrashed

@bentsku bentsku added aws:dynamodbstreams AWS DynamoDB Streams semver: patch Non-breaking changes which can be included in patch releases labels Jun 26, 2024
@bentsku bentsku self-assigned this Jun 26, 2024
Copy link

github-actions bot commented Jun 26, 2024

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 35m 23s ⏱️ -27s
3 151 tests ±0  2 755 ✅ ±0  396 💤 ±0  0 ❌ ±0 
3 153 runs  ±0  2 755 ✅ ±0  398 💤 ±0  0 ❌ ±0 

Results for commit 05d2d44. ± Comparison against base commit 301039f.

♻️ This comment has been updated with latest results.

Copy link
Member

@giograno giograno 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 jumping on this 💯 The fix makes sense to me! Hopefully, it will stabilize the test.

@bentsku bentsku merged commit 79a10dc into master Jun 26, 2024
38 checks passed
@bentsku bentsku deleted the fix-ddb-stream-update-test branch June 26, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:dynamodbstreams AWS DynamoDB Streams 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