Prevent an OceanBase CDC classpath collision
Removed duplicate Debezium API and core classes from the OceanBase CDC shaded jar and added a packaging integration test that reproduces the failing classloader order.
apache/seatunnel · #12477
Connector-packaging fix
OceanBase CDC no longer shadows SeaTunnel's serializable Debezium TableId or breaks Flink job-graph serialization when plugin discovery loads its jar first.
Problem
OceanBase CDC inherited debezium-core and debezium-api through its MySQL CDC dependency, so its shaded jar carried an original, non-serializable TableId beside SeaTunnel's patched serializable version. If plugin discovery loaded the OceanBase jar first, Flink failed while serializing the source into the job graph.
Approach
Applies the existing MySQL CDC Debezium exclusions to the OceanBase dependency and adds a failsafe-phase packaging test that rejects overlapping Debezium classes and serializes a TableId-keyed map with the connector jar loaded first.
Impact and scope
- Prevents classpath order from deciding whether an OceanBase CDC source can be submitted to Flink.
- Moves the exact failure mode into a deterministic packaging regression instead of relying on nondeterministic plugin discovery during a full E2E run.
- Reduces the connector jar from 28.6 MB to 22.3 MB by removing duplicate Debezium classes.
- The connector was new and unreleased on the development branch, so this protects the upcoming integration rather than correcting a released-user regression.
Validation
- Both packaging assertions failed on unchanged development code and passed with the patch on Java 8 and Java 11.
- OceanBase CDC E2E passed on Flink 1.18, Flink 1.20, and Zeta; Flink 1.13 and 1.15 were not rerun locally.
- Connector unit suites passed 137 tests on both supported JDKs, plus the two new packaging checks.
- The OceanBase integration shard passed; another hosted shard failed on an unrelated MinIO image problem already corrected on the development branch. A contributor approved the final authored change before merge.