Repository navigation
Conversation
DanielLeens
left a comment
There was a problem hiding this comment.
Review of be6afda0d611833ac1781719a6165ea5c9744748 — no blocking source findings. Merge remains blocked by unfinished current-head CI and required approval.
Basic information: [Fix][Zeta] Avoid port conflicts in HTTPS truststore test; author nzw921rx; target dev; +7/-22 in one test file. Report time: 2026-10-28 02:38:48 EDT (UTC-0400). Local branch codex-review-13028-20261028, worktree /Volumes/disk8/tmp/seatunnel-review-13028-20261028.
What changes: the truststore fixture used a fixed TLS listener at 18443 while its base class allocated a random 100-port Hazelcast discovery range. For example, a range covering 18443 allowed Hazelcast to reach the TLS listener with its own protocol. Both REST ports now use the same TestUtils allocation registry as Hazelcast. This affects normal test setup; production startup is unchanged.
Key findings:
RestApiHttpsForTruststoreTest.java:49-51allocates both ports throughTestUtils. Java initializes the superclass instance first, soAbstractSeaTunnelServerTest.java:62reserves the Hazelcast range before subclass REST allocation. Either allocation order is protected by the synchronized non-overlap registry inTestUtils.java:77-112.- All three TLS request URLs use the new
httpsPort; the disabled HTTP check uses the separately allocatedhttpPort. All four original tests and their exact success/failure assertions are preserved. RemovingfindFreePortExcludingremoves an uncoordinated allocator, not coverage. - The allocator checks bindability and records ranges within this JVM; it does not reserve sockets against unrelated processes. That existing external-process race remains a limitation and is not a new defect from this patch.
Code, compatibility and lifecycle: the fixture still builds Hazelcast configuration, loads HTTP/TLS configuration and certificates, starts SeaTunnel, and delegates cleanup to the unchanged base fixture. SeaTunnelServer.java creates JettyService when HTTPS is enabled; JettyService.enableHttps binds precisely the configured TLS port, which now matches every test URL. No production/API/SPI/configuration/default/checkpoint/serialization/connector-registration behavior changes. No new timer, thread pool, retry, queue, log-volume or resource-ownership changes. Windows remains disabled exactly as before. No migration is required.
Tests and documentation: this is an existing engine component/integration fixture, not a new production hook or E2E feature. testRestApiHttp protects disabled HTTP, testRestApiHttps checks successful authenticated access and response content, and the two negative TLS tests retain their SSLHandshakeException contracts. Existing TestUtilsTest checks non-overlap. English/Chinese user documentation is unnecessary because only fixture addresses change. No assertions, timeouts or CI selection are weakened.
Change-location assessment: the root cause is independent allocation in this fixture; the current fixture fields and URL references are the best repair location. Reusing the existing allocator is both the smallest safe fix and the best project-level fix for this case. Changing production discovery/TLS behavior or extending the shared allocator would enlarge compatibility and regression risk without addressing an additional demonstrated requirement. The existing base-class allocator and TLS setup remain intact.
Actual verification:
git fetch upstream pull/13028/head:codex-review-13028-20261028, exact-refgit show, fullgit diff 91ba231cb4b524d42e22935d03f194d584cf2fd3...codex-review-13028-20261028,git diff --check: passed; complete one-file diff and affected fixture/allocator/Jetty chains inspected.- Certificate resources
https/server_keystore.jksandhttps/client_truststore.jksexist at the reviewed head. gh pr view 13028 --json headRefOid,mergeable,mergeStateStatus,reviewDecision,reviews,statusCheckRollupand REST review/comment reads: passed. No existing formal or inline reviews/comments were present at review time.- Compilation, unit tests, integration tests, E2E, Docker and services: not run, under the repository's CI-only runtime-validation rule. No build artifacts were reused;
seatunnel-engine-uiwas not built because no build was run. Contributor-reported local executions were not treated as independently verified results.
Completeness cross-check: all changed lines, allocation order and overlap boundaries, TLS URL propagation, teardown, exception paths, preserved assertions, resource paths, compatibility and current merge gates were examined. There is no unreviewed changed file. No evidenced introduced blocking or nonblocking source defect was found.
Merge gates at review time: MERGEABLE, mergeStateStatus=BLOCKED, reviewDecision=REVIEW_REQUIRED; PR signal succeeded, while Build is in progress. These signals do not yet establish that the relevant current-head tests passed. Conclusion: source review has no blocking findings, but do not merge until current-head CI and the repository's required independent approval are satisfied. This COMMENT does not change approval state.
Publication gate snapshot (2026-10-28 02:45:27 EDT (UTC-0400)): reviewed head be6afda0d611833ac1781719a6165ea5c9744748 remains current; mergeable=MERGEABLE, mergeStateStatus=BLOCKED, reviewDecision=REVIEW_REQUIRED. Exact-head checks: Signal pull request update COMPLETED/SUCCESS; Build IN_PROGRESS. This latest snapshot supersedes earlier gate observations above; it does not replace required runtime coverage or approval.
|
Thanks for the contribution. The CI fact cited in my previous conclusion has changed; this follow-up updates that gate on the unchanged reviewed head, without issuing another full source review. Gate snapshot (2026-10-28T15:42:57+00:00), head CI was previously the only remaining technical gate in my conclusion; CI is now passing, so that CI objection is withdrawn and my technical conclusion is clear to proceed. Daniel currently has READ permission. I have not changed the effective GitHub review state to APPROVED; a write-capable maintainer must perform the final approve/dismiss action required by branch protection. Comparison recorded in this scan: base |
|
#13030 merged! |
Purpose of this pull request
Fix the flaky
RestApiHttpsForTruststoreTeststartup failure observed in this CI run.The fixed HTTPS port
18443can fall inside Hazelcast's randomly allocated discovery range. Hazelcast then connects to the HTTPS listener, reportsUnknown protocol, and eventually fails to start. Allocate both REST ports through the existingTestUtilsallocator so they cannot overlap the Hazelcast range, and remove the redundant local port helper.Does this PR introduce any user-facing change?
No. This change only updates the test fixture.
How was this patch tested?
JDK 17: Spotless and 12 tests across
TestUtilsTest,RestApiHttpsTest, andRestApiHttpsForTruststoreTestpassed:./mvnw -o -nsu -pl seatunnel-engine/seatunnel-engine-server -Dmaven.gitcommitid.skip=true spotless:apply test -Dtest=RestApiHttpsForTruststoreTest,RestApiHttpsTest,TestUtilsTest -DfailIfNoTests=falseRepeated the four Truststore tests in three additional runs; all passed:
Temporarily forced Hazelcast's range to
18376–18475: the original fixture reproduced the CI failure; the repaired fixture passed all four tests. Removed the temporary reproduction settings before final validation.git diff --checkpassed. Mavenverifywas not run.