You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Suresh-Krishna-Kusuma (via GitHub)" <gi...@apache.org> on 2026/02/05 19:38:07 UTC

[I] [Improvement][E2E] Enhance JDBC Schema Evolution Test Stability and CI Resiliency [seatunnel]

Suresh-Krishna-Kusuma opened a new issue, #10457:
URL: https://github.com/apache/seatunnel/issues/10457

   ### Search before asking
   
   - [x] I had searched in the [feature](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22) and found no similar feature requirement.
   
   
   ### Description
   
   
   ### Description
   The `SqlServerSchemaChangeIT` and related JDBC schema evolution E2E tests are frequently flaky in CI environments.
   The root cause is primarily timing issues where test assertions execute before the sink container (SQL Server/MySQL) is fully ready or before the internal SeaTunnel engine has stabilized.
   
   **Symptoms observed in CI logs:**
   1. `ConditionTimeout` in `assertSchemaEvolution`: The test waits for source/sink convergence but times out.
   2. `Status 409: Container is not running`: The engine container dies unexpectedly during the test, likely due to startup race conditions or resource constraints.
   3. Network failures during driver downloads: The `ContainerExtendedFactory` uses a single `wget` command which fails on transient network glitches.
   
   ### Motivation
   These flaky tests cause unrelated PRs to fail (false negatives), wasting CI resources and developer time requiring multiple re-runs. Improving the resiliency of these base tests will stabilize the build pipeline for the entire community.
   
   ### Proposed Changes
   I propose the following enhancements to `AbstractSchemaChangeBaseIT` and `ContainerExtendedFactory`:
   
   1. **Increase Timeouts**:
      - Update Awaitility timeouts in `assertSchemaEvolution` from `60s` to `180s` to account for slower CI runners.
   
   2. **Robust Wait Strategies**:
      - Add explicit `Wait.forListeningPort()` and `StartupTimeout` to sink containers in `initSinkContainer()`.
      - Implement a `waitForSinkDbReady()` helper to verify JDBC connectivity before running assertions.
   
   3. **Network Resiliency**:
      - Wrap the JDBC driver download (`wget`) in a retry loop inside `ContainerExtendedFactory` to handle transient network failures.
   
   4. **Diagnostics**:
      - Attach a `Slf4jLogConsumer` to the sink and engine containers to capture logs upon failure, aiding future debugging.
   
   ### Task List
   - [ ] Refactor `AbstractSchemaChangeBaseIT` to use longer timeouts.
   - [ ] Add retry logic for `wget` in test container setup.
   - [ ] Add health checks for Sink containers before assertion phases.
   - [ ] Verify stability by running `SqlServerSchemaChangeIT` locally.
   
   ### Usage Scenario
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][E2E] Enhance JDBC Schema Evolution Test Stability and CI Resiliency [seatunnel]

Posted by "DanielCarter-stack (via GitHub)" <gi...@apache.org>.
DanielCarter-stack commented on issue #10457:
URL: https://github.com/apache/seatunnel/issues/10457#issuecomment-3857715148

   <!-- code-pr-reviewer -->
   Thank you for proposing this improvement to stabilize the JDBC Schema Evolution E2E tests. This is a valuable contribution.
   
   Based on the codebase review:
   
   1. **Network resilience**: Confirmed that `AbstractSchemaChangeBaseIT.java:159-174` uses `wget` without retry, while `DorisSchemaChangeIT.java:92` and `StarRocksSchemaChangeIT.java:120` use `curl`. Standardizing on `curl` or adding retry logic makes sense.
   
   2. **Timeouts**: Most tests use 60s (e.g., `AbstractSchemaChangeBaseIT.java:295,310,324`), but `StarRocksSchemaChangeIT.java:171` uses 360s. Increasing to 180s is reasonable for slower CI runners.
   
   3. **Health checks**: `SqlServerSchemaChangeIT.java:93-96` has `Wait.forLogMessage` but lacks `Wait.forListeningPort()` and JDBC connection validation. The sink containers in `AbstractSchemaChangeBaseIT.java:122-124` also lack unified readiness checks.
   
   4. **Log consumers**: Already implemented in `SqlServerSchemaChangeIT.java:97-99`, so no changes needed there.
   
   **Clarification needed**: Could you provide a specific CI log link for the "Status 409: Container is not running" error mentioned? Also, should we add a unified `waitForSinkDbReady()` method to `AbstractSchemaChangeBaseIT`?
   
   Looking forward to your PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org