zhangshenghang opened a new pull request, #13498:
URL: https://github.com/apache/seatunnel/pull/13498

   Do. This change adds Zeta engine E2E coverage only; no product code is 
modified.
   
   ### What this adds
   
   `MultiPipelinePartialFailureIT` plus two fixtures. One in-JVM Zeta cluster 
exposes five fixed slots
   (`dynamic-slot: false`, `schedule-strategy: WAIT`) and runs a single job 
whose two pipelines have
   different outcomes, then checks three things:
   
   1. the job reaches a terminal `FAILED` (it does not sit in `FAILING`) and 
the client `JobResult`
      carries the failing pipeline's error;
   2. the per-pipeline states end as exactly one `FAILED` and one `CANCELED`, 
i.e. the healthy sibling
      is canceled by the job-level failure path instead of being left running;
   3. a follow-up job with the same five-slot footprint still reaches 
`RUNNING`, which pins that the
      failed job returned every fixed slot it held.
   
   The failure is deterministic rather than racy: the failing pipeline's 
`InMemory` sink sleeps three
   seconds in its first write and then throws, and the test first observes both 
pipelines `RUNNING`, so
   the sibling is genuinely live when the failure arrives.
   
   Negative controls used while writing this test (both reverted, not part of 
the change):
   - skipping the sibling cancellation in `PhysicalPlan#stateProcess` leaves 
the job in `FAILING`; the
     test then fails at the terminal-state assertion, which is exactly the 
uncancelled-sibling symptom;
   - keeping the failed pipeline's slots assigned after it finishes leaves the 
probe job `PENDING`; the
     test then fails at the slot-release assertion.
   
   ### Why this boundary needs coverage
   
   A job is not a pipeline. `PhysicalPlan#addPipelineEndCallback` promotes a 
single pipeline failure to
   a job-level `FAILING` transition, and `stateProcess` is then responsible for 
canceling every other
   pipeline so the job can reach `FAILED`. Both halves fail silently if they 
regress: an uncancelled
   streaming sibling keeps running as a zombie, keeps its fixed slots and keeps 
writing its sink while
   the job already reports `FAILED`; without either half the job never leaves 
`FAILING` and the client
   never sees a terminal state.
   
   Existing runtime-failure E2Es (`SinkErrorToMysqlIT`, 
`TransformErrorToMysqlIT`,
   `JobClientJobProxyIT#testMultiTableSinkFailedWithThrowable`) are all 
single-pipeline jobs, so the
   job-level failure path never has a healthy sibling to cancel. The 
multi-pipeline E2Es cover
   different contracts: `ClusterFaultToleranceTwoPipelineIT` (worker loss 
during a batch restore),
   `MultiPipelineSavepointRestoreIT` (per-pipeline savepoints) and 
`MultiTableMetricsIT` (per-table
   metrics). None of them injects a runtime failure into one pipeline of a 
multi-pipeline job.
   
   ### Verification
   
   SPOTLESS:
   ```
   ./mvnw -o -pl 
seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base spotless:check
   ```
   Test (twice back to back, on dev HEAD with unmodified product code):
   ```
   ./mvnw -o -pl 
seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base verify \
     -DskipUT=true -DskipIT=false -Dit.test=MultiPipelinePartialFailureIT \
     -DfailIfNoTests=false
   ```
   Result: `Tests run: 1, Failures: 0, Errors: 0, Skipped: 0` / `BUILD 
SUCCESS`, ~28s per run.
   
   Related: the job-level failure/cancel path guarded here was last touched by 
#12353 (mark pipelines
   cancel-requested before canceling them) and #10675 (terminal zombie jobs 
after a master switch).
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to