jjj-n opened a new pull request, #12925:
URL: https://github.com/apache/seatunnel/pull/12925

   ### Purpose of this pull request
   
   Yes, I am contributing to Apache SeaTunnel.
   
   The E2E restore helper copies connector JARs directly over paths already 
referenced by the running service. During that copy, `/job-info/{jobId}` can 
deserialize a logical DAG through an incomplete archive and return HTTP 500 
with `ClassNotFoundException: ...LocalFileSink`, even though the final JAR is 
valid and restore eventually succeeds.
   
   This patch stages each selected connector JAR under a unique non-JAR 
filename in the destination directory, then publishes it with `mv -f` after 
copying completes. It checks the publication result and attempts to remove only 
that staged file on failure, preserving the original exception and interrupt 
status.
   
   Remote paths use POSIX separators on every host. It extends 
`ContainerUtilTest` with distinct content and failure-path checks. 
`SavepointRestoreIT` verifies old/new SHA-256 and failed-copy retention in a 
real container, then checks REST and recovery through the real shared helper. 
Its scoped REST sampler has finite request deadlines and bounded shutdown, with 
no-response and interruption regressions. The existing savepoint boundary, 
append-only offset, duplicate-offset, cancellation, and CLI-exit assertions 
remain unchanged. Engine checkpoint code, APIs, configuration, and dependencies 
are unchanged.
   
   Related context: [#12316](https://github.com/apache/seatunnel/pull/12316). 
This E2E publication fix is based on dev and does not include that PR's source 
handoff changes. Closes #12924.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. This change affects E2E test artifact publication and regression 
coverage.
   
   ### How was this patch tested?
   
   The original non-atomic helper failed the earlier REST regression with HTTP 
500 and a LocalFileSink class-loading exception. During this revision, 
test-first Windows path/content checks failed with the pre-revision helper (5 
of 10 UTs), and an unresponsive REST endpoint exceeded the regression's 
3-second deadline. The revised helper passes all 10 UTs on Windows Maven, 
standalone Windows Java 17, and Linux Java 11. An actual Testcontainers TAR 
check on Windows confirms that copy and exec address the same path.
   
   Five previously completed serial Linux rounds passed all 25 tests: 10 
recovery tests and 15 local REST timeout/interruption/copy-failure tests, with 
no skips. Each round verifies distinct old/new connector hashes and failure 
retention/cleanup in the real container; 587 publication-window job-info 
requests returned HTTP 200, with no corresponding REST ERROR lines. Two 
external mutation controls confirm that skipping publication and deleting the 
old file on failure are rejected by the regressions.
   
   The IT runs use fixed dev runtime artifacts and freshly compiled current 
sources via JUnit ConsoleLauncher in an isolated Docker daemon, rather than 
Maven Failsafe. Loaded class and starter hashes are recorded. The strengthened 
IT checks the old hash before its partial-copy REST request, so this revision 
does not claim a fresh HTTP500 observation from the same new IT bytecode. 
Original checkpoint and offset methods are byte-for-byte unchanged.
   
   Maven validation:
   
   ```bash
   ./mvnw -B -pl :seatunnel-e2e-common,:connector-seatunnel-e2e-base 
spotless:apply
   ./mvnw -B -T 1 -pl :seatunnel-e2e-common -am \
     -Dtest=ContainerUtilTest -Dsurefire.failIfNoSpecifiedTests=false \
     -DfailIfNoTests=false -DskipUT=false -DskipIT=true \
     -Dskip.ui=true -Dlicense.skipAddThirdParty=true verify
   ./mvnw -B -T 1 -pl :connector-seatunnel-e2e-base -am \
     -DskipTests -DskipUT=true -DskipIT=true \
     -Dskip.ui=true -Dlicense.skipAddThirdParty=true verify
   ```
   
   The directed unit run passed 10 tests with no failures or skips. The 
affected quick-verify reactor passed 66 modules; that command skips tests, UI 
building, and third-party license generation. Full-repository UT/IT coverage is 
not claimed.
   
   Historical startup/build setup failures remain archived separately from 
these completed rounds. These finite runs do not establish long-term stability 
or resolve the previously observed copy latency.
   
   ### Check list
   
   - [ ] New JAR license notice: not applicable; no new binary dependency.
   - [ ] User documentation: not applicable; no user-facing change.
   - [ ] Incompatible changes and migration guide: not applicable; no 
API/configuration/data-format change.
   - [ ] Connector registration, distribution POM, CI labels, plugin 
configuration: not applicable; no connector added or changed.
   
   Supplemental standard Maven Failsafe execution was explicitly skipped; no 
Failsafe success or remote CI result is claimed here. The public issue 
[#12924](https://github.com/apache/seatunnel/issues/12924) contains the 
reproduction outline and per-round local results.
   


-- 
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