← 输入框|github.com|刷新
Skip to content

[connectors] Make DynamoDB test failures show their cause - #7917

Merged
blp merged 1 commit into
mainfrom
dynamodb-test-diagnostics
Nov 10, 2026
Merged

blp merged 1 commit into
mainfrom
dynamodb-test-diagnostics

Conversation

@bestouff

Copy link
Copy Markdown
Contributor

Linked Issue

Refs #7908. This PR does not close the issue: the cause of the failure is not known. The PR makes the next occurrence show it.

What changed

dynamodb_conditional_put_skips_existing_row found 1 row where it expected 2 in a merge queue run. The log had only the row count.

Change Reason
scan_table uses consistent_read(true) A default scan is eventually consistent. The AWS usage notes say this is also true for DynamoDB Local.
The three conditional tests assert dynamodb_output_failed_items_total == 0 before they read the table The test endpoint has no controller, so batch_end reports a failed write nowhere. A dropped write looked like a wrong row count.
wait_for_dynamodb starts the test logger The retry and drop warnings of the connector now reach the captured output of the test.
amazon/dynamodb-local is pinned to 3.3.2 with its digest latest can change the emulator between runs. 3.3.2 is the version of the failed run.

Only test code and the CI workflow change.

Describe Manual Test Plan

  • Ran the dynamodb cases of connector_suites against the pinned image: 49 passed.
  • Made the write of dynamodb_conditional_put_skips_existing_row fail with an invalid condition expression. The test then failed on the new assertion, and the output had the connector warning with the DynamoDB error. Reverted that change.

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

Breaking Changes?

None.

dynamodb_conditional_put_skips_existing_row found 1 row where it expected
2 in a merge queue run, and the log did not show why. The endpoint of the
test has no controller, so a failed write was reported nowhere, and the
test had no logger for the retry warnings.

- Scan with consistent_read. A default scan is eventually consistent,
  also on DynamoDB Local.
- Assert that the connector dropped no item before the conditional
  tests read the table.
- Start the test logger in every test that uses the service.
- Pin the DynamoDB Local image of the adapter tests to 3.3.2.

Refs #7908

Signed-off-by: Xavier Bestel <xavier.bestel@feldera.com>
@mythical-fred-oss

Copy link
Copy Markdown
Contributor

LGTM.

What I ran

Check Result
cargo check --locked -p dbsp_connectors --tests pass
cargo test --locked -p dbsp_connectors dynamodb (no emulator) 58 pass. 1 fail: dynamodb_progress_counter_batch_start_resets timed out waiting for the endpoint because there is no DynamoDB Local here. The PR does not cause it.
Pinned amazon/dynamodb-local:3.3.2 digest vs Docker Hub matches

Only test code and CI change, so no gates apply. batch_end is synchronous, so checking failed_items_total before the scan is race-free. init_test_logger uses try_init, so calling it from every test is safe.

@bestouff
bestouff requested review from blp and swanandx November 10, 2026 17:30
fn assert_no_failed_items(metrics: &DynamoDBOutputMetrics) {
assert_eq!(
dynamodb_metric(metrics, "dynamodb_output_failed_items_total"),
0.0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

floating point?

@blp
blp added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit c6ede75 Nov 10, 2026
3 checks passed
@blp
blp deleted the dynamodb-test-diagnostics branch November 10, 2026 20:44
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.

3 participants