Skip to content

[Iceberg CDC sink] Integration tests - #40230

Merged
ahmedabu98 merged 18 commits into
apache:masterfrom
ahmedabu98:cdc-write-it
Sep 29, 2026
Merged

ahmedabu98 merged 18 commits into
apache:masterfrom
ahmedabu98:cdc-write-it

Conversation

@ahmedabu98

@ahmedabu98 ahmedabu98 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Adding some end-to-end testing for the new CDC sink.
Includes roundtrip tests through the Iceberg CDC source.
Includes a Delta -> Iceberg CDC test

Part of #39979


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions github-actions Bot added java io iceberg Iceberg IO connector labels Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @Abacn for label java.
R: @chamikaramj for label iceberg.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@chamikaramj chamikaramj left a comment

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.

Thanks!

@chamikaramj chamikaramj left a comment

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.

Thanks!

@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.62%. Comparing base (3afe19a) to head (6d5f2a7).
⚠️ Report is 37 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #40230      +/-   ##
============================================
+ Coverage     56.14%   58.62%   +2.47%     
- Complexity     2288    13798   +11510     
============================================
  Files          1121     2579    +1458     
  Lines        177152   270217   +93065     
  Branches       1488    11192    +9704     
============================================
+ Hits          99467   158406   +58939     
- Misses        75161   105788   +30627     
- Partials       2524     6023    +3499     
Flag Coverage Δ
java 64.99% <ø> (-10.73%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ahmedabu98
ahmedabu98 merged commit ea3c5df into apache:master Sep 29, 2026
30 of 31 checks passed
// CDC sink. The native-ValueKind round trip tests run on legacy worker.
// The change-type-column tests run on Runner v2.
includeTestsMatching 'org.apache.beam.sdk.io.iceberg.catalog.LakehouseCatalogCdcWriteIT.changelogOfSinkWrittenTableRoundTripsThroughTheSource'
includeTestsMatching 'org.apache.beam.sdk.io.iceberg.catalog.LakehouseCatalogCdcWriteIT.changelogOfSinkWrittenTableRoundTripsThroughTheSourceWithChangeTypeColumn'

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.

There are two tests never worked:

  • changeFeedAppliesToIcebergTableWithChangeTypeColumn

  • changelogOfSinkWrittenTableRoundTripsThroughTheSourceWithChangeTypeColumn

e.g. https://github.com/apache/beam/actions/runs/39764361133/job/119776009999

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They're passing on the regular Dataflow test suite (green)
Failing on managed service tests because the service hasn't upgraded to 2.77 yet

* relies on it drops the Runner v2 experiments and runs on the legacy worker there. This is a
* no-op for other runners.
*/
public static void useLegacyDataflowWorker(PipelineOptions options) {

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.

This hacky override made test pass but user still see the use case breaking in default options (managed transform enabled), as it happened in Dataflow tests. We should disable runner v2 when ValueKind and other runner capability not supported by portable runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants