Repository navigation
[Feature][Zeta] Add Web UI operation controls - #13008
DanielLeens wants to merge 30 commits into
Conversation
…-operations # Conflicts: # seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java # seatunnel-engine/seatunnel-engine-ui/src/service/job/index.ts # seatunnel-engine/seatunnel-engine-ui/src/tests/jobs.spec.ts
…I operation endpoints - Merge apache/dev and re-integrate the Workers tag editor with the new worker resource table; member identity (uuid, localMember, tags) is now stamped by the bounded health-metrics collector, including timed-out entries, so the local worker stays identifiable. - Reject restoreMode submissions while the source job has not reached an end state, and fail non-numeric restoreSourceJobId values with a clear 400; the Web UI submit panel now shows the engine failure message. - Document /update-local-member-tags, the /update-tags flat-map contract, the /http-service/status fields, the shared auth chain, the load-balancer limitation and the restore guard in English and Chinese. - Add RestApiIT coverage for /http-service/status and the target-validated tag endpoint on both the Jetty and Hazelcast REST ports. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- BasicAuthenticationIT asserts that /http-service/status, /update-local-member-tags and the legacy /update-tags reject unauthenticated requests and that authenticated requests reach the servlets behind the shared filter chain. - Document that /update-tags values must be strings. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…as a behavior change - RestApiSubmitJobStartWithSavePointTest submits an unbounded job, asserts a checkpoint restore from it is refused with 400 while it is RUNNING, and that the same request passes the guard once the job has been cancelled. - incompatible-changes.md (en, zh) records the narrowed restoreMode contract, its scope, the unchanged legacy path, and the migration step. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Replacement for #11613 (closed there with the reason). The exact head |
DanielLeens
left a comment
There was a problem hiding this comment.
Hi, and thank you for carrying this forward. The history of #11613 is preserved here and the scope (a thin Web UI over Zeta REST) is clear. I read the full diff at head 117cf5289a, the touched server classes in full, and the CI results from the fork run that the Build check points to. There are no earlier reviews on this PR, so everything below is a first pass on this head. I could not find a code problem in the engine-side REST changes, but the UI module does not currently build, so the PR cannot be merged yet.
What Problem Does This PR Solve?
Pain point: Operators of Zeta can only submit, stop, restore and tag jobs through raw REST calls. The Web UI is read-only, and the worker tag endpoint has no way to target a specific member (#11579).
Fix approach: It adds job submit (config text or file, with restoreMode / restoreSourceJobId), stop / savepoint / force-cancel controls, a Checkpoints tab, an Operations page, a worker tag editor, and three additive server pieces: /update-local-member-tags, /http-service/status, and member identity fields on /system-monitoring-information.
One-sentence summary: The Web UI gains day-two operation controls on top of small, additive REST endpoints, plus a server-side guard against restoring from a still-active job.
1. Code Change Review
1.1 Core Logic Analysis
Runtime flow of the restore guard (JobInfoService.java:536-600):
POST /submit-job?restoreMode=...&restoreSourceJobId=N
-> validateCheckpointRestoreRequest (mode normalised, id parsed with Long.parseLong)
-> getRestoreSourceJobStatus(N): local coordinator, or GetJobStatusOperation to master
-> rejectRestoreFromActiveSourceJob: non-end-state -> IllegalArgumentException (HTTP 400)
-> UNKNOWABLE / null -> falls through to the existing "No checkpoint found" path
Tag update flow: updateLocalMemberTags validates uuid against nodeEngine.getLocalMember(), then requires tags to be an object with string values only. The legacy updateTags keeps its flat-map coercion unchanged (UpdateTagsService.java:38-70), which I confirmed.
Key findings:
- The new tag logging (
N tag(s)) is content-free, which is a good choice for user-supplied input. HttpServiceStatusServletreturns only booleans, ports and context data; the mTLS flag reads the effective JettySslContextFactory, which is the right source.
1.2 Compatibility Impact
Partially incompatible. Additive endpoints and fields are safe, and the legacy isStartWithSavePoint + jobId path is untouched. However, an explicit restoreMode submission whose restoreSourceJobId is still RUNNING (or any non-end state) used to be accepted and is now rejected with 400, and a blank jobId now fails the legacy check. Both are documented in incompatible-changes.md (en and zh), which is the right place, so I consider this acceptable as long as the docs stay accurate.
1.3 Performance / Side-effects
- Each restore submission now issues one status lookup to the master. In
submitJobs(batch) this happens once per job at JobInfoService.java:514, and the remote path calls.join()with no timeout (JobInfoService.java:595-600). That is bounded by the batch size and the master RPC, so I rate it Low. /system-monitoring-informationnow addsuuid,localMemberandtagsper member, using the already bounded fan-out from #12161. No new RPC.
1.4 Error Handling and Logging
- Issue 4:
/http-service/statusfalls back to the configured port when no matching connector exists (HttpServiceStatusServlet.java:614-627). With HTTP disabled and HTTPS enabled,httpPortreports a port nothing is listening on. Low. - Issue 5: An invalid
restoreModevalue still surfaces the rawNo enum constant ...message (JobInfoService.java:538-541). Low, pre-existing behavior but now more visible through the UI.
2. Code Quality
2.1 Coding Standards
New classes and core methods carry Javadoc that explains why, not just what (for example the restore guard and withMemberIdentity). UpdateLocalMemberTagsServlet has no constructor Javadoc, which is fine. License headers are present.
2.2 Test Coverage
Server side is well covered: JobInfoServiceRestoreGuardTest, UpdateTagsServiceTest, HttpServiceStatusServletTest, BaseServiceHealthMetricsTest, and two real-HTTP cases in RestApiIT (foreign UUID rejected without side effects, secrets absent from the status body). Those tests each fail if the corresponding production logic is removed. Stability rating: Stable for the Java tests I read; I did not see timing-sensitive waits.
UI side has two failing tests on this head (fork run 40457447105, job "Build SeaTunnel UI"):
- Issue 2:
jobs.spec.ts:192, "Job Operations shows the engine failure message when a restore is refused" fails withNo "requestFailureMessage" export is defined on the "@/service/service" mock. The module mock at the top of the file (get,post,isRequestOutcomeUnknown) was not extended whenjob-operations.tsx:101started importingrequestFailureMessage. Fix: useimportOriginaland override only what is needed. - Issue 3:
managers.spec.ts:285, "worker table scrolls its action column with bounded slot summaries" expectsscrollX1200 but receives 1460. The component now setsscrollX={isMaster.value ? 1200 : 1460}(views/managers/index.tsx:486), and the existing assertion was not updated. The assertion should be changed to the new worker value, with a master-page assertion for 1200 added, so the check is not weakened.
2.3 Documentation
en and zh REST API, Web UI and incompatible-changes pages are updated in parallel. The body says /http-service/status is exercised on both the Jetty and Hazelcast REST ports, but RestApiIT only calls the status endpoint on the Jetty port (the tag endpoint covers both). Issue 6: please either add the Hazelcast-port status check or correct the wording. Low.
3. Architectural Soundness
3.1 Precise fix / long-term: keeping the UI thin and adding explicit-target endpoints is the right shape.
3.2 The local-only UUID check is a deliberate limit (load balancers are called out in the docs), so I do not treat it as a defect.
3.3 Basic auth and mTLS apply because both servlets share the existing context.
3.4 Historical compatibility: see 1.2. Issue 7 (Low): the PR description cites a "latest commit 379efa74e" and prettier results for 4aba1e689, but the head is 117cf5289a. Please refresh the description so the verification statement matches the head.
4. Issue Summary
| No. | Issue | Location | Severity |
|---|---|---|---|
| 1 | type-check fails (TS2769) so npm run build fails, which breaks the seatunnel-engine-ui Maven module and both engine-v2-it jobs |
seatunnel-engine-ui/src/views/managers/index.tsx:291 |
High |
| 2 | Mock missing requestFailureMessage, vitest failure |
seatunnel-engine-ui/src/tests/jobs.spec.ts:192 (mock at top of file) |
High |
| 3 | scrollX assertion stale after column change |
seatunnel-engine-ui/src/tests/managers.spec.ts:285 |
High |
| 4 | Status endpoint reports non-listening HTTP port | HttpServiceStatusServlet.java:614-627 |
Low |
| 5 | Raw enum error message for invalid restoreMode |
JobInfoService.java:538-541 |
Low |
| 6 | Docs/PR text claims status endpoint tested on Hazelcast port | RestApiIT.java (status test) |
Low |
| 7 | PR description cites stale commit SHAs | PR body | Low |
None of these were raised by another reviewer on this PR.
5. Merge Recommendation
Conclusion: Ready to merge after fixes
CI status: the Build check is red. Run 40457447105 shows Build SeaTunnel UI failing on Issues 2 and 3, and engine-v2-it (JDK 11 and 17) failing because the UI module's type-check fails (I read the JDK 17 log, index.tsx(291,63): error TS2769; I infer the JDK 11 job fails the same way). iceberg-connector-it (11) also failed; it touches nothing in this PR, so it looks unrelated, but I did not dig into its log. These failures are in code this PR adds, so they are not infrastructure noise.
Blockers
- Fix the TS2769 error at
views/managers/index.tsx:291(thecomputed<DataTableColumns<NodeResources>>column list, whose conditional spread andfixedliteral likely widen the type) and confirm withnpm run type-check. - Fix the
@/service/servicemock injobs.spec.ts. - Update the
scrollXexpectation inmanagers.spec.ts(keep it strict for both master and worker routes).
Recommended non-blocking fixes: Issues 4 to 7, and re-run the fork build on the new head so the Build check can be adopted from a green run.
Thanks again for the careful server-side work; once the UI build is green this looks close.
|
Follow-up at head |
DanielLeens
left a comment
There was a problem hiding this comment.
Sorry for missing the tag-key preservation issue in the earlier review. I re-read the complete current 55-file diff and traced the affected REST, UI and worker-tag paths at head e86481f3500c37a627f6e2516b986a0ea40940b0.
Basic information
- PR: #13008 — Add Web UI operation controls, author
DanielLeens, targetdev. - Reviewed head:
e86481f3500c37a627f6e2516b986a0ea40940b0; base403efeee0b3806c77e55c38368abdd41fbf828bd; 55 files, +4,196 / -126. - Report time: 2026-10-28 02:44:06 EDT (UTC-04:00).
- Local fetched ref:
codex-review-webslots-13008-20261028; isolated checkout:/Volumes/disk8/tmp/seatunnel-review-webslots-13008-20261028(checkout was still populating while exact committed files were read withgit show). - Review event: source review only. A COMMENT from the PR author's account does not constitute independent human approval.
What this PR changes
The existing console displays jobs; this change lets an operator submit configuration text/files, request stop/savepoint/cancel, inspect checkpoint history, browse connector option rules, and edit the serving worker's tags. For example, a terminal job's Checkpoints tab opens the submit panel with its source job ID and explicit CHECKPOINT or SAVEPOINT mode; the operator still supplies the matching job configuration.
1. Code review and complete findings
Key findings
- Normal UI actions reach existing REST operations. Added Java endpoints are narrowly scoped: target-validated local-member tag replacement and a status response containing operational switches/ports rather than credentials.
- The earlier source corrections are present: the monitoring cell type excludes structured fields; the Vitest service mock retains the real
requestFailureMessage; master and worker scroll widths now have separate strict assertions. These observations do not prove that the current UI builds or passes tests. - One introduced tag-preservation defect remains. It is listed below as the only evidenced source blocker in this full scan.
Finding 1 — Preserve existing tag keys and values when saving the editor
Severity: Medium (P2). Blocks merge: Yes.
Location: seatunnel-engine/seatunnel-engine-ui/src/views/managers/index.tsx:149-168, particularly the ordinary object allocation at line 150 and tags[key] = ... at line 166.
parseTags() accumulates arbitrary tag names in {}. The string key __proto__ therefore resolves to the inherited Object prototype setter instead of becoming an own data property. Assigning the parsed string value does not create a serializable __proto__ property. Entering __proto__=prod, or selecting an existing worker with that valid tag and saving it, consequently sends no such tag. If it is the only line, the request carries an empty tag map and clears the worker's tags while the page reports success.
The complete path is selectMonitor() (lines 224-230, serializes existing attributes into editor lines) → parseTags() → managerService.updateTags() → UpdateTagsService.updateTags() (.../rest/service/UpdateTagsService.java:69-79), which replaces the entire member attribute map. The legacy contract intentionally reserves no tag names, and the new structured endpoint accepts string keys/values without reserving this name. AbstractResourceManager.filterWorkerByTag() (.../resourcemanager/AbstractResourceManager.java:372-381) matches exact attribute keys and values, so dropping a configured routing tag changes worker eligibility for subsequent resource selection. The same editor round trip is lossy for other accepted string maps: an existing key zone=region is rendered as zone=region=prod and parsed back as key zone, and an existing value with leading/trailing spaces is trimmed even if the operator simply selects and saves it. Those are not server-side restrictions. These are source-derived counterexamples; no local runtime test was executed.
Root cause and best change location: the UI parser is using an ordinary JavaScript object as an arbitrary-key dictionary. The server already preserves literal tag names and should retain that contract. The smallest safe fix is to use an arbitrary-key-safe dictionary (Object.create(null) or Object.fromEntries) and refuse a save that would silently rewrite an existing map the line format cannot represent faithfully; preserve values rather than trimming them on a no-op edit. Extend managers.spec.ts with exact serialized-map assertions for the literal __proto__ key, an embedded = key, and whitespace-bearing values. A lossless structured/JSON tag editor is the global alternative if every API-valid string map should be editable; it is still a UI-only change but has a slightly larger presentation/test scope. Changing the server to reject or rename existing tags would create an unnecessary compatibility change. Both safe approaches leave engine state and public configuration unchanged.
Runtime, compatibility and side effects
- Submit paths: text submission preserves IDs as strings; file upload uses
config_file; restore-mode validation precedes execution inJobInfoService. The explicit restore guard is a deliberate behavior change: requests against active source jobs now return 400. English/Chinese incompatible-change docs include the affected endpoints and stop-first migration. The legacyisStartWithSavePoint+jobIdcontract remains a fallback. - Tag paths:
/update-tagsretains flat-map coercion and ordinaryuuid/tagskeys; the new endpoint checks the serving member UUID before mutation and rejects non-string structured values. Its server log records tag counts rather than arbitrary contents. Remote rows remain disabled and server-side UUID validation protects load-balanced misrouting. - HTTP status: both new servlets share the existing Jetty filter context, including basic authentication and effective HTTPS client-certificate policy.
mutualTlsEnabledreads the SSL context. Port fallback when a connector is absent is explicitly documented, so it is not treated as a hidden active-listener guarantee. - UI lifecycle: running-job polling invalidates older responses and clears its timer on unmount; worker monitoring retains its generation/disposal checks and refetches after tag replacement. Job operation requests deliberately disable the client timeout and display an unknown-outcome message for transport failure rather than advising a blind retry.
- No checkpoint serialization, connector registration, public option/default, persisted job JSON, import/export or datasource capability is removed. The intentional restore admission change is distinct from Finding 1's unintended loss of a valid tag name.
2. Test, documentation and verification assessment
- Read all changed server tests and both E2E additions.
JobInfoServiceRestoreGuardTestcovers active/terminal/unknown statuses; the real REST submit test checks active-source rejection and terminal-source behavior. Tag service tests protect legacy coercion and structured validation. Real HTTP tag tests cover foreign UUID rejection, no mutation on invalid input, both REST transports, successful replacement, and clearing. Basic-auth E2E exercises both rejection and authenticated endpoint access. - Read all five changed UI test files. They cover action request parameters, restore-source forwarding, server rejection messages, terminal-state restore controls, local-vs-remote tag editing, duplicate keys, and metadata rendering. None covers the literal
__proto__dictionary-key boundary. - English/Chinese REST API, Web UI, incompatible-change descriptions and locale keys were checked together. Refreshed operation screenshots remain an acknowledged documentation follow-up, rather than runtime proof.
- Actual commands:
gh pr view 13008 --json ...(passed, exact head/gates recorded);git fetch upstream pull/13008/head:codex-review-webslots-13008-20261028(passed);git diff <base>...<head>and scoped full diffs (passed, all 55 files inspected);git show <head>:<path>/git grep(passed for call-chain/source checks, with two initial guessed filenames corrected through symbol search);git diff --check <base>...<head>(passed). - Local compilation, Maven tests, npm/Vitest/type-check, E2E, service startup and browser runtime validation: not executed, under the repository's CI-only functional-validation rule. No backend/UI build output was reused, and no skipped module is represented as tested.
3. Change-location assessment
The UI remains a thin client over the engine's existing lifecycle and checkpoint APIs, which is the correct responsibility boundary. UUID-target validation belongs in the member mutation service; restore-source admission belongs in the REST submit service, not only a disabled UI button; HTTP operational status belongs beside the effective Jetty connectors. Moving those checks exclusively into the UI would leave other REST callers unprotected. Finding 1 belongs in the arbitrary-key parser and its UI regression, avoiding a wider server/API change.
Historical compatibility is additive except the explicitly documented restore admission restriction. Existing serialized states and older task configuration formats are untouched. A source review cannot establish runtime compatibility of the new UI without a current-head build and exercised flows.
4. Exhaustiveness and merge conclusion
Full scan completed: all 55 changed files; submit/upload/restore, stop/savepoint/cancel, checkpoint UI, tag selection/replacement/resource filtering, status/auth registration, option-rule response shape, polling/resource cleanup, tests/docs/locales, and CI/conflict/approval gates. All evidenced findings for this head are consolidated above; no intentionally deferred source finding remains.
Do not merge yet. Fix Finding 1 and obtain functional CI evidence for the resulting head. At the report snapshot GitHub returns MERGEABLE, BLOCKED, REVIEW_REQUIRED, with no check runs in the current-head rollup. This review does not approve the PR, does not claim that the previously failing UI now builds, and does not substitute for required human approval or runtime UI verification.
Publication gate snapshot (2026-10-28 02:52:52 EDT (UTC-0400)): reviewed head e86481f3500c37a627f6e2516b986a0ea40940b0 remains current; mergeable=MERGEABLE, mergeStateStatus=BLOCKED, reviewDecision=REVIEW_REQUIRED. No check results are currently reported for this head. 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:52:51+00:00), head The blocking jobs are Run / Build SeaTunnel UI The failed job list is observed, but its causal error is not established by the available summary. Please inspect the linked failed step/report before choosing a source change; no verified upstream sync-only cure is established in this follow-up. My previous source conclusion remains unchanged, including its independent source/documentation requests. CI is not being passed by inference, and this follow-up is not an effective approval. Comparison recorded in this scan: base |
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for addressing the TypeScript field union, request helper mock and table-width assertions. I re-read all 55 changed files and the complete REST/UI/control lifecycle. The tag round-trip blocker remains. Sorry for missing the stop-after-unmount polling path and exact REST error envelope in the previous round; those are carryovers from the earlier version, not defects newly introduced by the latest revision. The current UI lane passes, so my earlier cancelled-UI guidance is withdrawn; the two engine IT lanes now show the concrete assertion failure described below.
What Problem Does This PR Solve?
User pain point: Operators previously had to leave the UI to submit/restore jobs, inspect checkpoints and plugin rules, control running jobs or change local worker placement tags.
Fix approach: Add job operations, checkpoint and operations pages, running-job actions and a local-member tag editor backed by additive REST endpoints, structured tag validation and explicit restore admission checks.
One-sentence summary: An operator can select a completed checkpoint and submit a new restored job from the UI. For tags, however, saving an existing key a=b currently turns it into key a with value b=..., changing exact-match placement.
Review report time: 2026-10-29T12:40:22.425689-04:00. Current head bfd9bdddf535e11407f8c2d88b068d0a9fb74a61; base dev at 886a3ac6e59aad5e46755761cf9fb8ac2a6d3df9. Checks: Signal pull request update=SUCCESS; Build=FAILURE. Check references: Signal pull request update Build. Compare: diverged, ahead 22, behind 5; merge state blocked / BLOCKED.
1. Code Change Review
1.1 Core Logic Analysis
The complete 55-file diff includes workflow path selection, six documentation pages, REST service/servlet/command paths, UI services/types/routes/locales/pages and their unit/IT fixtures. JobInfoService validates restore modes and terminal source status before job submission; BaseService resolves explicit mode before legacy savepoint flags. UpdateTagsService.java:55-116 validates the serving member UUID and every structured string value before replacing the complete local tag map. BaseService adds uuid/localMember/tags to successful and failed health/metrics responses. HttpServiceStatusServlet exposes an allowlist of effective ports, enabled flags and needClientAuth, without secrets. Jetty registration retains existing Basic auth and exception filters; the Hazelcast legacy route retains its existing separate security boundary. UI operations submit/stop requests use timeout=0 and distinguish rejected requests from unknown transport outcomes. Manager polling has a disposed/generation guard, but the running-job action continuation lacks that lifetime guard. Option-rule rendering recursively follows condition metadata and escapes expressions as text. The changed workflow ui path output correctly selects the UI lane for UI-only changes.
Before:
// UI had read-oriented job/member views; no structured local-tag operation
// Existing exception envelope: ExceptionUtils.getMessage(exception)After:
validate target UUID and all structured tag values before updateAttribute(tags);
validate restore source end-state before submitting;
await stopJob(...); await fetch(); // continuation can outlive the page
const tags = {}; tags[key] = trimmedValue; // lossy string-map round tripKey Findings
- Normal authenticated Jetty calls reach the new status/tag endpoints; the legacy Hazelcast route also reaches the same UUID/value validation.
- Restore admission intentionally rejects active source jobs before asynchronous submission; checkpoint availability remains a separate later validation.
- The structured server map is validated before mutation, but the UI representation still changes valid keys/values and silently loses proto.
- The previous UI compile/mock/width issues are fixed, and the exact-head UI CI job succeeds.
- The current engine failures are deterministic error-envelope mismatches in this PR, not evidence of upstream drift.
Complete runtime path
UI route -> job-operations/checkpoints -> JobsService -> request(timeout=0)
-> Jetty filters -> JobInfoService.validateCheckpointRestoreRequest
-> local/remote source job status -> terminal guard -> RestJobExecutionEnvironment -> job submission
Running jobs -> controlJob awaits stopJob -> success continuation calls fetch
-> if page unmounted during POST: fetch starts a NEW generation and schedules another timer
Managers -> overview/metrics identifies serving member -> textarea serializes arbitrary tag strings
-> parseTags -> confirmation -> UpdateLocalMemberTagsServlet
-> validate UUID -> extract/validate map -> updateAttribute REPLACES entire local map
-> resource-manager exact tag matching and refreshed health/metrics
Invalid tag target -> IllegalArgumentException -> ExceptionHandlingFilter:70
-> JSON message includes exception type -> new bare-message E2E assertion fails
Operations -> status allowlist / OptionRulesService recursive metadata -> escaped tables
The effects depend on the entry and preconditions above. Recovery, batching and connector lifecycle retain their existing contracts unless explicitly described here; source inspection is not runtime proof.
1.2 Compatibility Impact
Partially incompatible. REST additions and health/metrics identity fields are additive; legacy flat tag coercion and its uuid/tags literal keys remain supported. Existing options, defaults, checkpoint serialization, plugin identities and job IDs remain unchanged. Explicit restore now rejects active source jobs, intentionally tightening admission; both incompatible-changes pages and REST guides document the migration to a terminal source. The UI tag editor must preserve the existing unrestricted string-map contract (Issue 2). No stored-checkpoint conversion is required.
1.3 Performance / Side-Effect Analysis
No new per-row engine cost or persistent state. New UI polling and REST calls are control-plane work. Managers avoids overlapping reads and ignores stale responses. Running jobs invalidates in-flight GETs on unmount, but an unresolved stop POST can restart polling afterward (Issue 3). Backend identity fields copy tag maps into bounded member responses. UUID validation prevents updating a different serving member through a load balancer; it is not authorization. Existing Jetty filters remain the authentication boundary, and the legacy Hazelcast API still requires its existing deployment/network protection. No passwords, key-store paths or tag values are newly logged. Job operation retries are intentionally left to explicit user decisions when an HTTP outcome is unknown.
1.4 Error Handling and Logging
Foreign UUID and non-string tags fail before mutation, with HTTP 400 through the existing filter. The exact error message is ExceptionUtils.getMessage(e), including the exception type, rather than e.getMessage(). Both new engine IT lanes demonstrate this mismatch. UI transport errors use the real requestFailureMessage helper retained by the revised partial mock. The following is the complete issue list for this head.
Issue 1: Match the existing REST error envelope in both integration tests
- Location:
seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/RestApiIT.java:1130-1148 - Problem description: The new tag guard throws IllegalArgumentException, and ExceptionHandlingFilter.java:70 serializes ExceptionUtils.getMessage(e). The assertion expects the bare text, while the response is IllegalArgumentException: Target member uuid must match the REST node serving this request. BasicAuthenticationIT.java:247 repeats the mismatch; the subsequent invalid-string-value assertion at RestApiIT.java:1148 has the same contract problem. Both JDK 11 and 17 engine-v2-it jobs fail on the first two assertions.
- Potential risk: Required current-head engine CI deterministically fails and stops the new tag integration test before its valid-mutation and legacy-route assertions. This is not a flaky timeout and not cured merely by syncing upstream.
- Best improvement / root-cause and location assessment: Keep the shared response envelope compatible and assert its actual typed message in both existing test classes, including the later non-string-value case; alternatively use a precise suffix/contains assertion if exception type is intentionally incidental. Retain status=400/status=fail and unchanged-member assertions. Rerun both engine IT lanes. Do not change the shared filter contract solely to satisfy these tests.
- Severity: High; blocking.
- Raised by another reviewer: No.
Issue 2: Preserve the complete existing tag string map
- Location:
seatunnel-engine/seatunnel-engine-ui/src/views/managers/index.tsx:149-168 - Problem description: This is the unchanged blocker from my previous review. The editor splits at the first equals sign and trims both key and value, then assigns into {}. Existing server tags may have a=b as a literal key, surrounding spaces as meaningful content, or proto as an ordinary JSON key. Editing another entry silently changes the first two and loses the last through the inherited prototype setter. The server then replaces the entire tag map, and scheduling/resource filtering compares exact keys and values.
- Potential risk: A normal edit can silently remove or rename placement tags and change worker selection. Server-side validation cannot reconstruct values already changed by the browser.
- Best improvement / root-cause and location assessment: Prefer a structured key/value-row or JSON editor that preserves arbitrary strings, constructing maps with Object.create(null) or Object.fromEntries. If retaining a line format, define escaping and reject unsupported existing values without mutation instead of silently normalizing them. Add round-trip tests for literal proto, keys containing =, and meaningful surrounding whitespace; do not narrow the existing server contract.
- Severity: High; blocking.
- Raised by another reviewer: No.
Issue 3: Prevent a completed job action from restarting polling after unmount
- Location:
seatunnel-engine/seatunnel-engine-ui/src/views/jobs/running-jobs.tsx:129 - Problem description: This is an earlier-version carryover I missed. Start stop/savepoint/cancel and navigate away while the timeout=0 POST is pending. onUnmounted:74 increments fetchVersion and clears the existing timer, but the successful continuation at :129 later calls fetch(), which increments fetchVersion again. Its finally branch :69 then schedules a new five-second loop for the destroyed component. The generation check only invalidates requests already started before unmount.
- Potential risk: Every such navigation can retain the component and a recurring GET loop, adding persistent browser/network and server load for pages no longer visible.
- Best improvement / root-cause and location assessment: Add a lifetime/disposed guard checked at fetch entry, before applying results/scheduling, and before the action continuation refreshes; set it on unmount, as the managers page already does. Extend the existing running-jobs test with a deferred stop promise: unmount before resolving it, then resolve and advance fake timers, asserting no later GET or scheduled loop. No engine lifecycle change is needed.
- Severity: Medium; blocking.
- Raised by another reviewer: No.
2. Code Quality Assessment
2.1 Coding Standards
The complete changed-file set, imports and removed lines were inspected. New Java core services document the local-member UUID boundary, restore admission and non-secret status projection. Vue state and service types keep the existing project style. Monitor fields now exclude structured tags/localMember values, fixing the earlier TypeScript error. The important remaining constraints are representation fidelity and asynchronous component lifetime; explanatory comments should accompany those fixes.
2.2 Test Coverage and Test Stability
Stability rating: Stable. The added UI tests use service stubs, flushPromises and owned fake timers with wrapper/timer cleanup; table widths now match 1200/1460. Java tag/status tests use real endpoints and independent per-test cluster setup; the tag mutations are not leaked across RestApiIT invocations. Restore admission waits for observed job status before assertions and cleans up jobs. No new fixed sleep substitutes for a readiness condition. Issue 1 is a deterministic assertion/contract failure, not an intermittent stability defect. The UI tests do not cover tag round trips or an action completing after unmount; add the deterministic cases in Issues 2/3. Browser visuals and real operator flows were not executed locally.
Local verification results: exact-head git fetch and isolated review branch seatunnel-review-13008 created; full git diff 886a3ac6e59aad5e46755761cf9fb8ac2a6d3df9...bfd9bdddf535e11407f8c2d88b068d0a9fb74a61 read (55 files); git diff --check passed; git show, rg and line-numbered source/caller/config/test reads used for the trace above. GitHub changed filenames are reconciled with this local diff before publication. No local compile, Maven verify, unit/IT/E2E, Docker, service or UI execution occurred, as required for this review task. No build/deployment artifact was reused; engine-ui was not built.
2.3 Documentation Updates
The en/zh Web UI, REST and incompatible-changes descriptions consistently cover modes, terminal-source admission, local-only tag targeting, status fields and port fallback. Legacy flat and structured tag shapes are distinguished. Refreshed UI screenshots remain a documented follow-up from #11613 rather than a claimed visual acceptance. Neither language should promise normalization of arbitrary existing tag strings.
3. Architectural Soundness
3.1 Elegance of the Solution
Precise fix.
3.2 Maintainability
Best change-location assessment: The REST guard belongs before mutation/submission and the current server placement is appropriate. The smallest safe fixes are existing IT assertions, the manager editor representation and the running-view lifetime guard. Changing engine scheduling, the shared exception envelope or arbitrary server tag rules would broaden this PR unnecessarily.
3.3 Extensibility
Keep existing connector identities and contracts. Reuse the current boundary and regression fixtures; no shared-framework redesign or unrelated dependency is needed for the behavior reviewed here.
3.4 Historical-Version Compatibility
REST additions and health/metrics identity fields are additive; legacy flat tag coercion and its uuid/tags literal keys remain supported. Existing options, defaults, checkpoint serialization, plugin identities and job IDs remain unchanged. Explicit restore now rejects active source jobs, intentionally tightening admission; both incompatible-changes pages and REST guides document the migration to a terminal source. The UI tag editor must preserve the existing unrestricted string-map contract (Issue 2). No stored-checkpoint conversion is required. This review does not claim an executed upgrade/recovery validation.
4. Issue Summary
| Number | Issue | Location | Severity |
|---|---|---|---|
| 1 | Match the existing REST error envelope in both integration tests | seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/RestApiIT.java:1130-1148 |
High, blocking |
| 2 | Preserve the complete existing tag string map | seatunnel-engine/seatunnel-engine-ui/src/views/managers/index.tsx:149-168 |
High, blocking |
| 3 | Prevent a completed job action from restarting polling after unmount | seatunnel-engine/seatunnel-engine-ui/src/views/jobs/running-jobs.tsx:129 |
Medium, blocking |
Completeness check: full diff and affected entry/call chain, failure/resource paths, compatibility, tests and stability, bilingual docs, configuration/registration and current CI/merge gates were inspected before enumerating these findings. No additional finding is reserved for a later round on this version.
Community review reconciliation: There are no non-Daniel review/inline findings on this replacement PR. I read davidzollo's #11613 replacement-history note; the carried review points were checked against the complete latest head rather than assumed fixed. This is Daniel's own PR, explicitly included by the task; a COMMENT is maintainer-style source feedback, not self-approval. Earlier source-blocking conclusions remain for the tag editor, while the type/mock/width items are closed.
5. Merge Recommendation
Conclusion: Ready to merge after fixes
- Blockers — must be fixed: Issue 1: Match the existing REST error envelope in both integration tests; Issue 2: Preserve the complete existing tag string map; Issue 3: Prevent a completed job action from restarting polling after unmount; Required current-head CI and effective maintainer review/merge gates must be satisfied.
- Recommended fixes — non-blocking: No additional unrelated redesign is requested.
Overall assessment: The REST guard belongs before mutation/submission and the current server placement is appropriate. The smallest safe fixes are existing IT assertions, the manager editor representation and the running-view lifetime guard. Changing engine scheduling, the shared exception envelope or arbitrary server tag rules would broaden this PR unnecessarily. Current head bfd9bdddf535e11407f8c2d88b068d0a9fb74a61; base dev at 886a3ac6e59aad5e46755761cf9fb8ac2a6d3df9. Checks: Signal pull request update=SUCCESS; Build=FAILURE. Check references: Signal pull request update Build. Compare: diverged, ahead 22, behind 5; merge state blocked / BLOCKED. Behind/diverged status alone is synchronization metadata and does not justify a sync-and-rerun instruction. Daniel has READ permission: this COMMENT is a technical conclusion, not an effective APPROVED event or dismissal of historical requested changes. A write-capable maintainer owns final approval/dismissal where required. Exact-head fork Build run 40829562876: UI job 123302627002 succeeded; engine-v2-it JDK 11 job 123302627396 and JDK 17 job 123302627357 fail with the same typed-versus-bare message assertion (Issue 1). The previous cancelled-UI CI fact has changed and is explicitly withdrawn. Current engine failures are directly in this PR's tests; a generic sync-and-rerun suggestion is not supported. Correct the assertions and source blockers, then rerun those lanes. Behind/diverged remains separately recorded metadata. Thanks again; happy to help with the focused next revision.
- Assert the existing Jetty REST error envelope ("<ExceptionType>: <message>")
in RestApiIT and BasicAuthenticationIT instead of the bare message.
- Preserve untouched worker tag entries verbatim in the tag editor: keys that
contain "=", values with surrounding whitespace and a literal "__proto__" key
round-trip unchanged; only new or edited lines are parsed.
- Stop a completed job action from restarting the running-jobs polling loop
after the component has been unmounted.
|
Pushed Issue 1 (High) - REST error envelope in both ITs. The Jetty
Issue 2 (High) - preserve the complete existing tag string map.
Issue 3 (Medium) - no polling restart after unmount.
Local verification was limited to |
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for fixing the typed REST assertions and the action-after-unmount guard. I re-read all 55 changed files and the complete UI-to-REST control path at this head. Those previous Issues 1 and 3 are closed in source. Issue 2, exact tag-map preservation, is improved but still incomplete. Sorry for missing the REST documentation envelope mismatch in the previous round; Issue 4 explicitly records that older omission as nonblocking.
What this PR solves
User pain: Operators must leave the UI to submit/restore/control jobs and change local worker placement tags.
Approach: Add operations/checkpoint pages, job actions, a structured local-tag endpoint and safe HTTP status projection.
In one sentence: Bring routine engine operations into the UI. For example, choose a terminal job's savepoint and prefill the restore form, without manually constructing REST parameters.
1. Code Change Review
1.1 Core Logic Analysis
The full diff covers backend path selection, six docs pages, Java services/endpoints/tests, all UI pages/services/types/routes/locales and UI regressions. Normal authenticated operator actions reach the new code.
// Previous tag implementation
const tags = {}; tags[trimmedKey] = trimmedValue
// Current managers/index.tsx:237-245,165-181
existingTagLines = new Map(Object.entries(monitor.tags || {}).map(
([key, value]) => [`${key}=${value}`, [key, value]]))
const [key, value] = existingTagLines.get(rawLine) ?? parseTagLine(rawLine)
return Object.fromEntries(tags)Jobs route -> JobOperations -> JobsService POST(timeout=0) -> Jetty authentication/error filters
-> JobInfoService.validateCheckpointRestoreRequest -> local coordinator or GetJobStatusOperation
-> reject active source -> BaseService.resolveRestoreMode -> RestJobExecutionEnvironment
-> build job identity/state selection -> local/remote SubmitJobOperation -> coordinator
Running-job action -> stop/savepoint/cancel POST -> disposed-guarded fetch -> one scheduled poll
Checkpoint tab -> overview/history -> all-pipeline state checks + terminal source guard
-> jobs route query -> explicit restoreSourceJobId/restoreMode submission
Managers -> health/worker resource reads -> serving UUID/localMember/tags
-> serialize existing strings into line-keyed Map -> parse/edit -> confirm
-> UpdateLocalMemberTagsServlet / legacy command processor -> validate serving UUID and string map
-> localMember.updateAttribute replaces whole map -> ResourceManager exact key/value filtering
Operations -> OptionRules metadata / HttpServiceStatusServlet -> escaped display / safe status fields
Key findings: (1) REST/UI normal control paths reach the new code. (2) Terminal-source restore admission is intentional and documented; it is not a storage-format conversion. (3) Disposed polling now prevents action completion from resurrecting a destroyed page. (4) Object.fromEntries fixes literal proto handling, but the line-keyed cache is not injective. (5) The current fixes are focused on the control boundary; actual CI/browser acceptance remains separate.
Backend status returns only switches/ports/context/auth flags, using effective Jetty connectors; UUID selection prevents mis-targeting, not unauthorized access. Jetty's existing filters remain the security boundary. Hazelcast legacy REST retains its separate deployment/network boundary.
Evidence: independent review branch seatunnel-review-13008, head c7f7680336f373475511591b5b96b7576795d533. Local Git fetch/diff and source/caller searches produced the complete changed-file evidence; I ran no local build, test, container or job.
1.2 Compatibility Impact
Partially incompatible: explicit CHECKPOINT/SAVEPOINT REST submission now rejects active source jobs; both incompatible-changes pages document stopping first. Legacy flat tags (including uuid/tags as literal names and non-string coercion), job options/defaults, protocols and checkpoint serialization remain intact. Health identity fields/endpoints are additive. The UI still must preserve the arbitrary existing string-map contract (Issue 2).
1.3 Performance / Side Effects
No data-plane/per-row overhead or new persistent engine state. Member responses copy attributes; health reads share a deadline. Managers suppresses overlapping/hidden-page refreshes. Running jobs now stops polling after unmount, including deferred POST completion. Job controls use no client deadline and distinguish unknown transport outcomes to avoid automatic duplicate submission. HTTP/metadata pages use on-demand reads. No new unbounded queue or engine lock found; the tag representation issue affects placement correctness rather than throughput.
1.4 Error Handling and Logging
Server validation precedes tag mutation and names invalid UUID/map/value cases. The old shared typed error envelope is retained; the corrected Java tests match it. Audit summaries expose counts, not arbitrary tag content. UI submission appends the server explanation and separates no-response uncertainty.
Issue 2: The existing-tag cache can silently drop valid entries (High, blocking; same previous tag-preservation issue).
- Location:
seatunnel-engine/seatunnel-engine-ui/src/views/managers/index.tsx:237-245and:165-181; downstreamseatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:76;.../resourcemanager/AbstractResourceManager.java:372-384. - Description: Existing tags are cached under
${key}=${value}. Distinct legal pairs['a=b','c']and['a','b=c']both producea=b=c, so new Map overwrites one during selection before the user edits anything. Saving after adding an unrelated tag submits only the surviving pair. A newline in an existing key/value also splits one entry into several raw lines, bypassing the exact-line lookup. The server accepts arbitrary string keys/values and replaces the entire map. - Risk: A normal UI save silently deletes/changes placement attributes; exact-match worker selection then changes. The previous proto/whitespace test does not cover collisions or embedded newlines.
- Best improvement: Use structured key/value rows or an escaped JSON editor and construct the object with Object.fromEntries. A smaller interim alternative is detect every unrepresentable/colliding existing entry and block mutation with a clear explanation, preserving the server contract. Add deterministic round-trip cases for both colliding pairs together and newline-containing strings; do not merely add another cache keyed by the same lossy encoding.
- Previously raised by others: No; this refines Daniel's existing Issue 2 against the revised implementation.
Issue 4: Keep the documented Jetty error message consistent with the corrected tests (Medium, nonblocking; earlier omission).
- Location:
docs/en/engines/zeta/rest-api-v2.md:1507-1516and Chinese equivalent:1497-1506;ExceptionHandlingFilter.java:70. - Description/risk: The new error table/example still promises a bare
Target member uuid ...message, but the shared filter returnsIllegalArgumentException: Target member uuid ..., as the corrected ITs now assert. Clients copying the example for an exact comparison will fail. - Best improvement: Include the prefix in both languages' Jetty response examples, or explicitly say the table shows the explanatory suffix and give one exact payload. Keep the shared filter unchanged.
- Previously raised by others: No; acknowledged above as a previous-round omission.
2. Code Quality Assessment
2.1 Coding Standards
The source uses existing component/service patterns. Core admission, status projection and tag validation contracts are documented in Javadoc/inline comments; no unsupported missing-comment claim is made from a comment-stripped diff. The remaining blocker is representation fidelity, not a request to redesign scheduling.
2.2 Test Coverage and Test Stability
Stability: Stable. New jobs.spec.ts:124-169 uses an owned deferred POST plus fake timers, unmounts before resolution and asserts no extra GET after 15 seconds; cleanup restores real timers. managers.spec.ts uses fixtures and owned timer/wrapper cleanup; its new tag case covers proto, one equals-containing key and whitespace, but not the non-injective pair/newline cases in Issue 2. RestApiIT and BasicAuthenticationIT now assert the actual typed 400 message, preserving no-mutation checks. Restore admission waits on observed RUNNING/end state, cleans up started jobs and accepts both legitimate checkpoint-race outcomes. Status tests use explicit connector fixtures and assert secret omission. No new sleep-based readiness or external-data assertion found. No local test/UI was run; cancelled CI is not test acceptance.
2.3 Documentation Updates
English/Chinese Web UI, REST and migration pages cover submission modes, terminal-source restore, local-node targeting, port/auth status and supported operations. Issue 4 remains a narrow payload mismatch. Existing screenshot refresh remains the replacement PR's known follow-up; no visual acceptance is claimed.
3. Architectural Soundness
3.1 Elegance
A focused control-plane extension, with server validation before mutation/submission. Structured tag editing is the cleanest remaining fix; a cache over an ambiguous line representation is a workaround with an incomplete domain.
3.2 Maintainability
Keep fixes in the manager representation and existing regression fixtures; avoid changing the shared exception envelope, scheduler matching or existing tag contract.
3.3 Extensibility
The operations page reuses OptionRule metadata instead of hard-coding connector validation. Existing engine/REST contracts remain reusable; arbitrary strings require an unambiguous UI representation.
3.4 Historical-Version Compatibility
The explicit-restore admission tightening is documented with migration instructions; historical checkpoint state, serialization, connector identities and legacy savepoint/flat-tag APIs retain their contracts. No executed upgrade validation is claimed.
4. Issue Summary
| ID | Issue | Location | Severity |
|---|---|---|---|
| 2 | Ambiguous tag-cache keys silently lose entries | managers/index.tsx:237-245 | High, blocking |
| 4 | Documented bare error differs from typed envelope | rest-api-v2.md:1507-1516 | Medium, nonblocking |
No non-Daniel review/inline findings exist on this replacement PR. I read @davidzollo's #11613 replacement-history note. This is Daniel's own PR, explicitly in scope for maintainer-style review; this COMMENT is not self-approval. Prior Issues 1 (typed IT assertions) and 3 (post-unmount polling) are closed in source; Issue 2 is not fully closed by the new exact-line cache.
5. Merge Recommendation
Conclusion: Can merge after fixes
- Blockers, must fix: Issue 2; GitHub also reports merge conflicts with dev, which the author must resolve by syncing the latest dev and rerunning affected checks. Successful current-head CI and independent maintainer review remain required.
- Suggested improvements, nonblocking: Issue 4 is a documentation correction and does not independently invalidate the functioning endpoint; retain the documented screenshot follow-up.
Prior failed-engine-assertion guidance no longer describes the source: those assertions are corrected. Exact-head fork Build 41162746789 is cancelled, including UI job 124448855843; retrieved jobs contain no failure conclusion. Apache current-head rollup is empty. Thus the previous head's green UI/failed-engine result is not current acceptance or a fresh failure reproduction. Compare is diverged with behind_by=9 and actual dirty merge conflicts. Please resolve those conflicts against latest dev, retain the tag correction, and rerun UI plus engine-v2-it; no upstream fix is claimed for Issue 2.
The source fixes for two previous blockers are sound. A structured representation makes the remaining tag fix both smaller to reason about and safer for existing users. Happy to review that revision.
Daniel has READ permission. This technical conclusion does not dismiss historical requested changes or satisfy a write-reviewer gate. GitHub does not permit me to approve my own PR.
Snapshot 2026-11-01T14:46:22.130491+00:00: head c7f7680336f373475511591b5b96b7576795d533, base dev; compare diverged, ahead 24 / behind 9; merge dirty / DIRTY, review decision REVIEW_REQUIRED. Drift is recorded separately; it does not itself request synchronization.
|
Pushed Issue 2 (tag cache is not injective) -
Issue 4 (documented error text) - CI: fork Build for this head is running at https://github.com/DanielLeens/seatunnel/actions/runs/41468624094 (the previous head's run was cancelled, so it gave no result). Local validation was scoped Prettier and Merge state: still conflicting with |
…ocument the exact REST error text - The worker tag editor serializes existing tags as key=value lines. Two legal tags such as a=b -> c and a -> b=c read the same, and a line break inside a key or value splits one entry into several lines, so saving the text could silently drop or alter existing placement tags. Selecting such a worker now shows an explanation and disables Update (re-checked in updateTags); Clear Tags stays available as an explicit full replacement. The server contract is unchanged. - The Jetty exception filter prefixes message with the exception class name; the update-local-member-tags error table and example (en, zh) now show the exact IllegalArgumentException: text that the integration tests assert. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DanielLeens
left a comment
There was a problem hiding this comment.
Self-review / maintainer status update for head f6358dc6ba4e96a71ab7c5514c77fa2ab524bdfb. This is my own PR, so this is a COMMENT, not an approval.
The new commit closes both items from the 2026-11-01 round: Issue 2 (the tag cache was not injective) and Issue 4 (the documented error text). The fork Build for this exact head is green. One blocker is left, and it is not a source problem: the branch conflicts with dev. I also apologize for three smaller items I should have raised in earlier rounds. They are carryovers, none blocks merging, and they are listed below as Issues 5-7.
What Problem Does This PR Solve?
User pain: To submit, restore, stop, savepoint or cancel a job, or to change the placement tags of a worker, operators have to leave the Zeta Web UI and build REST calls by hand.
Approach: The UI stays a thin client over the existing REST v2 endpoints. On the backend this adds two endpoints, a structured local tag update (/update-local-member-tags) and a credential-free status view (/http-service/status). It also adds a restore admission guard and member identity fields in /system-monitoring-information.
In one sentence: Routine engine operations move into the UI without any change to the engine data plane. For example, pick a finished job's savepoint on the Checkpoints tab and the restore form is filled in for you.
1. Code Change Review
1.1 Core Logic Analysis
What changed since c7f7680336, in seatunnel-engine/seatunnel-engine-ui/src/views/managers/index.tsx:249-262:
const entries = Object.entries(monitor.tags || {})
const lines = entries.map(([key, value]) => `${key}=${value}`)
existingTagLines = new Map(entries.map(([key, value], index) => [lines[index], [key, value]]))
tagEditBlocked.value =
existingTagLines.size !== entries.length || lines.some((line) => /[\r\n]/.test(line))updateTags checks the flag again at :211 and the Update button is disabled at :477. Clear Tags is still allowed because it is an explicit full replacement. Both cases from the last review are now refused before any request goes out: colliding pairs ({'a=b':'c', a:'b=c'}) and embedded line breaks. Representable maps still round-trip exactly, using the line-keyed cache plus Object.fromEntries. Server contracts are unchanged.
Full control path at this head:
Jobs: JobOperations -> POST /submit-job | /submit-job/upload (timeout 0)
-> Jetty ExceptionHandlingFilter -> BasicAuthFilter (only when enable-basic-auth)
-> JobInfoService.validateCheckpointRestoreRequest (JobInfoService.java:536)
blank/non-numeric restoreSourceJobId -> 400
getRestoreSourceJobStatus (:595): local CoordinatorService or GetJobStatusOperation to master
rejectRestoreFromActiveSourceJob (:578): non-end state -> 400; UNKNOWABLE falls through
-> BaseService.resolveRestoreMode (trim + Locale.ROOT) -> existing submit path -> coordinator
Running jobs: Stop / Savepoint / Cancel -> POST /stop-job {isStopWithSavePoint, force}
-> existing BaseService stop handling (force already supported, BaseService.java:1279)
-> one follow-up poll, guarded by `disposed` after unmount
Checkpoints tab -> /jobs/checkpoints[/history] -> restore enabled only for terminal source jobs
Workers: /system-monitoring-information -> BaseService.withMemberIdentity (:1471) adds uuid/localMember/tags
-> select -> unrepresentable check -> confirm -> POST /update-local-member-tags {uuid, tags}
-> UpdateTagsService.updateLocalMemberTags (:55) -> validateTargetMember (:88)
-> extractStructuredTagParams (:104, string values only) -> localMember.updateAttribute (whole map)
Legacy /update-tags: same updateTags, flat map, values still coerced to strings
Operations -> OptionRule metadata + HttpServiceStatusServlet (switches/ports/context/auth flags only)
Normal operator actions do reach the new code. Nothing touches the data plane, checkpoint storage or serialization.
1.2 Compatibility Impact
- Existing REST endpoints, request fields and defaults are kept. The legacy
/update-tagsflat-map contract (no reserved keys, non-string values coerced) is unchanged. On the Hazelcast REST port,RestHttpPostCommandProcessorchecks the longer path first, so the two tag paths cannot shadow each other. - There is one intentional behavior tightening. An explicit
restoreModesubmission against a source job that has not ended now returns 400. Bothincompatible-changes.mdpages document this with a migration guide. The legacyisStartWithSavePoint+jobIdpath is unchanged. /system-monitoring-informationgets additive fields only./update-tagsaudit logging now records tag counts, not tag contents. This was agreed with SEZ9, who added that log line in #12071, to keep arbitrary user-supplied tags (possibly secrets) out of logs (see Issue 7 for a leftover comment).
1.3 Performance / Side Effects
No per-row or engine-loop cost. The restore guard adds one job-status lookup per restore submission. Health reads keep the bounded shared deadline from #12161, and member identity is a small copy of the member attributes. The UI suppresses overlapping and hidden-page refreshes, and stops polling after unmount. Nothing here is unbounded.
1.4 Error Handling and Logging
Every new server validation runs before any mutation or submission, and failures surface as the shared typed 400 envelope (IllegalArgumentException: ...). The docs now show that exact text (rest-api-v2.md en :1501, zh :1491), and it matches what RestApiIT and BasicAuthenticationIT assert. The UI shows the server's explanation, and for a transport-level unknown outcome it shows a separate message instead of retrying.
Issue 5: The Web UI docs do not warn that the new state-changing controls are unauthenticated in the packaged config (Medium, nonblocking, carryover).
- Location:
docs/en/engines/zeta/web-ui.md:48,docs/zh/engines/zeta/web-ui.md:46; the packagedconfig/seatunnel.yamlsetsenable-http: trueand leavesenable-basic-authcommented out;JettyService.java:197-200installsBasicAuthFilteronly when it is enabled. - Problem: The page used to say the UI "does not submit jobs or provide lifecycle control actions". It now offers submit, stop, savepoint, cancel and tag mutation, but it has no note on access control. The server exposure itself already existed:
/stop-job,/submit-joband/update-tagswere already reachable the same way. The new endpoints add no stronger capability, andBasicAuthenticationITproves both sit behind the shared filter. What has changed is that an operator browsing the UI can now trigger these actions. Also, the mutating endpoints do not checkOriginorContent-Type(BaseServlet.requestBodyreads any body). So the server cannot tell a UI click from a cross-site request carrying the browser's cached Basic credentials (a CSRF exposure). That is pre-existing too. - Risk: In a default deployment, anyone who can reach port 8080 can stop or cancel jobs or rewrite placement tags from a browser.
- Best improvement: Add a short note in both languages, next to the capability summary and linking
security.md. It should say that the UI's state-changing controls are protected only by the existing REST authentication, and recommendenable-basic-auth/ HTTPS (mTLS) before exposing the UI. Server-side CSRF hardening (an Origin check, or requiringapplication/jsonon mutating endpoints) belongs in a separate follow-up issue, not in this PR. - Raised by another reviewer: Related to SEZ9's F3 (auth chain), which is addressed; the default-exposure and CSRF note is new.
2. Code Quality Assessment
2.1 Coding Standards
The new Java classes have ASF headers and Javadoc on every non-trivial method. The admission guard, status projection and tag validation explain why they exist. The new UI flag has a comment explaining why Clear stays allowed. Locales are in sync between en_US and zh_CN.
Issue 6: The unrepresentable-tag block is not reset after a successful Clear Tags (Low, nonblocking, carryover of the new commit).
- Location:
seatunnel-engine/seatunnel-engine-ui/src/views/managers/index.tsx:233-237(clear success) and:108-112(refresh only rebindsselectedMonitor). - Problem: After Clear Tags on a blocked worker,
tagContentis emptied buttagEditBlockedandexistingTagLineskeep their old values. The refresh only rebindsselectedMonitorand does not callselectMonitor. So when the operator types new tags on the now-empty worker, Update Tags stays disabled until they click Select again. - Risk: A UX dead end only. No tag can be lost.
- Best improvement: In the
clearsuccess branch, settagEditBlocked.value = falseandexistingTagLines = new Map(), or callselectMonitorwith the refreshed monitor. Optionally extend the newtest.eachcase with a clear-then-type step. - Raised by another reviewer: No.
Issue 7: The comment above the tag audit log is stale (Low, nonblocking, carryover).
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:70-77. - Problem: The comment from #12071 says the previous map is copied so the old tags are not "gone with no record of what they were". The log now records only
summarizeTagsForAudit(previousTags), which is a count. - Best improvement: Update the comment to say that only counts are logged on purpose, because tag content is arbitrary user input. Copying the whole map to count it is also unnecessary:
localMember.getAttributes().size()before the update would do. - Raised by another reviewer: No (the count-only change itself was endorsed by SEZ9 on #11613).
2.2 Test Coverage and Test Stability
Stability: Stable.
managers.spec.ts:261-287(new): fixture monitors with the colliding-pair and line-break cases. It asserts the explanation text, the disabled button, and thatupdateTagsis never called, even when the confirm handler is invoked directly. It fails onc7f7680336because both cases submitted a map with an entry missing. No timers, no external state.- Existing coverage is unchanged and still meaningful:
JobInfoServiceRestoreGuardTestandRestApiSubmitJobStartWithSavePointTest(restore admission).UpdateTagsServiceTest(legacy coercion, structured string-only values, content-free audit).HttpServiceStatusServletTest(secret omission, effective mTLS).BaseServiceHealthMetricsTest(identity on timed-out members).RestApiIT/BasicAuthenticationIT: real Jetty and Hazelcast REST ports, the UUID mismatch, 401 without credentials for both new endpoints and legacy/update-tags, and typed 400 messages.jobs.spec.ts(no repoll after unmount, using owned fake timers).
- Gap: the Clear-then-edit path from Issue 6 has no test.
2.3 Documentation Updates
The en and zh pages agree for Web UI, REST v2 and incompatible changes. SEZ9's #11613 items F1-F7 are addressed in source and docs. F8 (screenshots) is still an acknowledged follow-up: the outdated images were removed from the page, and replacements are promised in a separate docs PR. Issue 5 is the remaining docs gap.
3. Architecture
- The UI stays a client of existing REST contracts. Validation happens on the server before mutation. Connector metadata comes from OptionRule rather than hard-coded rules.
- The local-only UUID check is a targeting safeguard, not an authorization mechanism, and the load-balancer limitation is documented (SEZ9 F4).
- The block-on-ambiguity approach is the smaller, safe interim option. A structured key/value row editor is still the long-term cleanest representation and could be a follow-up.
- Historical compatibility: checkpoint state, serialization, connector identities and the legacy savepoint and flat-tag APIs keep their contracts. No upgrade run was executed for this review.
4. Issue Summary
| ID | Issue | Location | Severity | Status |
|---|---|---|---|---|
| 2 | Tag cache not injective, could silently drop entries | managers/index.tsx:249-262 | High | Fixed in f6358dc |
| 4 | Documented error text missed the typed prefix | rest-api-v2.md en:1501 / zh:1491 | Medium | Fixed in f6358dc |
| - | Merge conflict with dev |
incompatible-changes.md (en and zh) | Blocking | Open |
| 5 | No docs warning on unauthenticated default / CSRF for UI mutations | web-ui.md en:48 / zh:46 | Medium, nonblocking | Open (carryover) |
| 6 | Unrepresentable block survives Clear Tags | managers/index.tsx:233-237 | Low, nonblocking | Open |
| 7 | Stale audit-log comment | UpdateTagsService.java:70-77 | Low, nonblocking | Open (carryover) |
| F8 | Refreshed screenshots | web-ui.md | Low | Deferred follow-up (SEZ9 agreed that impractical asks can be split) |
Earlier Issues 1 (typed IT assertions) and 3 (repolling after unmount) were closed in c7f7680336 and remain closed.
5. Merge Recommendation
Conclusion: Ready to merge after fixes
- Blockers (must fix): GitHub reports
mergeable_state=dirty, with the branch 10 commits behinddev(25 ahead). A local three-way merge againstdevat70ef5cd546cshows conflicts in exactlydocs/en/introduction/concepts/incompatible-changes.mdanddocs/zh/introduction/concepts/incompatible-changes.md.RestApiSubmitJobStartWithSavePointTest.javawas also changed on both sides but merges cleanly. Please sync withdev, keep both entries in each incompatible-changes page, and rerun the Build. The green run below covers only this pre-sync head. No source-level blocker remains. - Nonblocking: Issue 5 is a short docs note, ideally done in this PR, plus a separate CSRF hardening follow-up issue. Issues 6 and 7 are small polish items. F8 screenshots go in the planned docs PR.
CI: Fork Build 41468624094 on f6358dc6ba completed success: 85 jobs succeeded and 11 were skipped by path filters. That includes Build SeaTunnel UI, unit-test (JDK 11/17, ubuntu and windows), engine-v2-it (11/17), engine-k8s-it and engine-resource-managers-it. No checks are reported on the apache-side PR rollup. I ran no local build, test or UI session for this review; all evidence comes from source and the fork CI.
The tag fix is careful and leaves no path where data could be lost. Once the two doc conflicts are resolved and the Build is green again, this is ready for a committer's look. Thanks to SEZ9 and davidzollo for the long review history on #11613.
|
Synced with the latest The only conflicts were CI evidence: the fork Build on the previous head |
Resolve the incompatible-changes.md conflicts (en, zh): dev moved the Engine Behavior Changes section under the dev heading, so the dev pages are taken as-is and the restoreMode restore-guard entry is re-added at the top of that section, ahead of the file-based IMap WAL note. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DanielLeens
left a comment
There was a problem hiding this comment.
Self-review re-check of the current head 69eb336df18f (previous self-review: 5746381025 on f6358dc6ba). This is my own PR, so this is a COMMENT, not an approval.
What changed since the last review
The only new commit is 69eb336df1, a merge of dev (no force push). The code and tests in this PR are unchanged. The merge only resolved the conflict that was the last blocker in the previous review. Because the source review on f6358dc6ba still applies in full, this re-check covers only the merge resolution, the open items, and CI.
What Problem Does This PR Solve?
It brings routine Zeta operations into the Web UI: submit and restore, stop, savepoint and cancel, and editing worker placement tags. The UI stays a thin client over REST v2. The PR also adds a structured local tag update endpoint, a credential-free HTTP status view, a restore admission guard, and member identity fields.
1 Merge resolution check
Previous blocker (conflict with dev in incompatible-changes.md, en and zh): fixed.
dev(#13065) split both pages into per-release sections. The PR's restore-guard entry now sits under## dev->### Engine Behavior Changes, ahead of the file-based IMap WAL note:- docs/en/introduction/concepts/incompatible-changes.md:460-476
- docs/zh/introduction/concepts/incompatible-changes.md:389-402
- Each page appears exactly once, and the PR diff for each page is now just that one entry (+18 en / +15 zh). No
devcontent was dropped. - The EN and ZH entries match: the affected endpoints, the exact 400 message, the four end states, the non-numeric and unknown-id behavior, the unchanged legacy
isStartWithSavePointpath, and the migration guide. - One other file was changed on both sides:
RestApiSubmitJobStartWithSavePointTest.java.dev(#13030) isolated the worker HTTP port. This PR adds the blank / non-numeric / active-source restore cases in a different region of the file. The two hunks do not overlap, and the new cases readworkerRestPortdynamically, so they pick up #13030's port change correctly. - No other file touched by
devsincef6358dc6baoverlaps this PR's 55 files.
2 Open items (unchanged, all non-blocking)
These are carried over from the previous review. The merge did not touch them, and I re-checked each on this head:
| ID | Issue | Location | Severity | Status |
|---|---|---|---|---|
| 5 | The Web UI page does not warn that the new state-changing controls are protected only by the existing REST auth (off in the packaged config), and that mutating endpoints have no Origin / Content-Type check | docs/en/engines/zeta/web-ui.md:48, docs/zh/engines/zeta/web-ui.md:46 | Medium, non-blocking | Open |
| 6 | After a successful Clear Tags on a worker whose tags were blocked, tagEditBlocked and existingTagLines are not reset, so Update Tags stays disabled until the worker is selected again |
seatunnel-engine/seatunnel-engine-ui/src/views/managers/index.tsx:233-235 (refresh rebinds selectedMonitor at :108-112 but does not call selectMonitor) |
Low, non-blocking | Open |
| 7 | The comment above the tag audit log still says the old tags would be lost "with no record of what they were", but only counts are logged now | seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:70-73 | Low, non-blocking | Open |
| F8 | Refreshed Web UI screenshots | web-ui.md | Low | Deferred to a separate docs PR, as agreed |
The best improvements are unchanged from the last review:
- Issue 5: add a short en/zh note next to the capability summary that links
security.mdand recommendsenable-basic-auth/ HTTPS before exposing the UI. Track CSRF hardening as a separate issue. - Issue 6: reset both values in the
clearsuccess branch. - Issue 7: reword the comment.
Doing Issue 5 in this PR would be ideal, but it does not block the merge.
3 Compatibility, tests, stability
- Compatibility: unchanged from the previous review. Existing REST endpoints, fields and defaults are kept, and
/system-monitoring-informationgets additive fields only. There is one intentional, documented behavior tightening: arestoreModesubmission against a source job that has not ended now returns 400. The legacy savepoint path and the flat/update-tagscontract are unchanged. - Tests: unchanged and still meaningful (
JobInfoServiceRestoreGuardTest,RestApiSubmitJobStartWithSavePointTest,UpdateTagsServiceTest,HttpServiceStatusServletTest,RestApiIT/BasicAuthenticationIT,managers.spec.ts,jobs.spec.ts). Stability: Stable. - Docs: en/zh parity holds for Web UI, REST v2 and incompatible changes.
4 Merge recommendation
Ready to merge. No non-CI blocker remains: the conflict is resolved, and Issues 5-7 are non-blocking.
CI: the fork Build 41566050818 on exactly this head completed success, and the apache-side Build pointer check passes. GitHub reports the PR as mergeable. dev has moved 4 commits since the merge, with no conflict reported, so being behind is not a reason to sync again.
Before merge, the PR still needs to be taken out of draft, and it needs an independent committer review, which this self-review does not replace. I ran nothing locally for this re-check; all evidence comes from source, the merge diff and the fork CI.
|
Pushed
CI: fork Build for this head is running at https://github.com/DanielLeens/seatunnel/actions/runs/42749739366 ; the previous head |
… Web UI access control - Web UI: after a successful Clear Tags on a worker whose existing tags were unrepresentable, reset the block and the line cache so newly typed tags can be saved without re-selecting the worker. The unrepresentable-tags test now continues with clear-then-type and asserts the typed tag is sent. - UpdateTagsService: the audit log records tag counts only, because tag content is arbitrary operator input; the comment now says so and the previous map is no longer copied just to count it. - web-ui.md (en, zh): note that the state-changing controls are protected only by the node's REST authentication, which the packaged config leaves off, and link the security page. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
DanielLeens
left a comment
There was a problem hiding this comment.
Self-review re-check of the current head 21a5e412b2dc (previous self-review: 5754783822 on 69eb336df1). This is my own PR, so this is a COMMENT, not an approval.
What changed since the last review
Two new commits, no force push:
d284cb5aa8addresses the three non-blocking items (5, 6, 7) from the previous self-review. It touches 5 files, +34 / -6.21a5e412b2mergesdevat535d4237dd4. I compared the PR's net patch againstdevbefore and after this merge. The only difference is exactly thed284cb5aa8delta. The merge auto-resolveddocs/en|zh/introduction/concepts/incompatible-changes.md:dev's new JSONDECIMALentry (#12871) now sits in the format section, and this PR's restore-guard entry stays at the top of### Engine Behavior Changes. Both pages are still additive only (+18 en / +15 zh). The PR still touches the same 55 files.
Everything else in the source review on f6358dc6ba still applies, so this re-check covers only the new delta, the open items and CI.
What Problem Does This PR Solve?
It brings routine Zeta operations into the Web UI: submit and restore, stop, savepoint and cancel, and editing worker placement tags. The UI stays a thin client over REST v2. The PR also adds a structured local tag update endpoint, a credential-free HTTP status view, a restore admission guard, and member identity fields.
1 Code Change Review (delta only)
1.1 Previous items, re-checked on this head
| ID | Previous issue | Status | Evidence |
|---|---|---|---|
| 5 | The Web UI page did not warn that the state-changing controls rely only on the node's REST auth, which is off in the packaged config | Fixed (one wording nit, Issue 8 below) | docs/en/engines/zeta/web-ui.md:50, docs/zh/engines/zeta/web-ui.md:48. I checked the claims against source. config/seatunnel.yaml ships enable-http: true with enable-basic-auth commented out. `docs/en |
| 6 | After a successful Clear Tags, tagEditBlocked and existingTagLines were not reset, so Update Tags stayed disabled |
Fixed | seatunnel-engine/seatunnel-engine-ui/src/views/managers/index.tsx:233-239 |
| 7 | The audit-log comment still claimed old tag content was recorded | Fixed | seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:69-78 |
| F8 | Refreshed screenshots | Deferred to a separate docs PR, as agreed | - |
Item 6, the key snippet:
if (clear) {
tagContent.value = ''
existingTagLines = new Map()
tagEditBlocked.value = false
}Runtime flow for the Clear path:
Clear Tags popconfirm -> updateTags(true)
-> skips the tagEditBlocked guard (clear only) index.tsx:211
-> POST /update-local-member-tags { uuid, tags: {} }
-> success: empty editor, empty line cache, block lifted index.tsx:233-239
-> refreshAfterTagUpdate(): re-binds selectedMonitor (now {} tags) but does not
call selectMonitor, so the block stays lifted, which is correct for an empty map
-> failure: block and cache stay as they were (the worker's tags were not replaced)
Saving right after a Clear cannot drop anything. The server map is now empty, and an Update replaces it with exactly what the operator typed. A stale in-flight poll can still show the old tags in the table for one cycle, but it does not re-block the editor or change what gets sent. On failure the old state is kept, which is the safe direction.
Item 7: previousTagCount is read before updateAttribute, and the log line is the same as before (N tag(s) for both sides). The change also removes one HashMap copy. Server behavior and log output are otherwise unchanged.
1.2 Compatibility
The delta does not change compatibility. It touches no REST contract, config option, default or serialized form. The audit log string format is identical. The overall assessment is unchanged from the previous review: /system-monitoring-information gets additive fields only, the flat /update-tags contract and the legacy isStartWithSavePoint path are unchanged, and the one intentional tightening (a restoreMode against an active source job returns 400) is documented in incompatible-changes en/zh.
1.3 Side effects
None beyond the intended UI unblock. No new state, timer or request.
1.4 Error handling / logging, and the issue found in this round
Issue 8: the new access-control note says the UI uses "the same REST endpoints as the CLI", but the CLI does not use REST
- Location: docs/en/engines/zeta/web-ui.md:50, docs/zh/engines/zeta/web-ui.md:48 (the corresponding Chinese wording)
- Problem:
bin/seatunnel.shsubmits and cancels throughSeaTunnelClientover the Hazelcast client protocol (seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ClientExecuteCommand.java:113), not over REST v2. The point of the note is still correct: these controls are protected only by the REST authentication. Only the comparison is wrong. - Risk: Low, doc accuracy only. A reader may assume that securing REST also secures the CLI path, or the other way round.
- Best improvement: say "call the engine's REST API v2 endpoints (the same ones used for automation)" in both languages, and drop the CLI comparison.
- Severity: Low, non-blocking.
- Raised by another reviewer: No.
Optional cosmetic: in both pages the ![overview.png] line directly follows the new paragraph with no blank line, so the image renders inline at the end of the access-control paragraph. This was already true of the previous paragraph, so it is not a regression. A blank line before the image would fix it.
2 Quality
2.1 Standards
The new code comments explain why, not what (index.tsx:234-235, UpdateTagsService.java:69-71). The small private summarizeTagCountForAudit helper is self-explanatory, and the existing Javadoc on summarizeTagsForAudit still applies.
2.2 Tests and stability
- The
managers.spec.tscaseblocks updating when existing tags are unrepresentable(seatunnel-engine/seatunnel-engine-ui/src/tests/managers.spec.ts:287-302) now goes on to Clear, then typeszone=prod, then asserts that Update is enabled and that{ uuid: 'worker-1', tags: { zone: 'prod' } }is sent. Without the fix,updateButton.props('disabled')staystrue, so the assertion fails. The test proves the fix and covers both parameterized cases. - On this head, the fork
Build SeaTunnel UIjob (lint +vitest+ build) passed. The engine-server unit tests also passed onunit-test (17, ubuntu-latest):JobInfoServiceRestoreGuardTest15/15,UpdateTagsServiceTest5/5,RestApiSubmitJobStartWithSavePointTest11/11,HttpServiceStatusServletTest2/2. - Stability: Stable.
2.3 Docs
en/zh parity holds for the new access-control note. The note has the same structure, links and keys in both languages, and has the same Issue 8 wording.
3 Architecture
No change. The fix stays inside the managers view and the tag service. Nothing leaks into shared UI services or engine core.
4 Issue table
| ID | Issue | Location | Severity | Status |
|---|---|---|---|---|
| 5 | Access-control warning on the Web UI page | web-ui.md en:50 / zh:48 | Medium | Fixed |
| 6 | Block survives Clear Tags | managers/index.tsx:233-239 | Low | Fixed |
| 7 | Stale audit-log comment | UpdateTagsService.java:69-71 | Low | Fixed |
| 8 | Note says the CLI uses the same REST endpoints, but the CLI uses the Hazelcast client | web-ui.md en:50 / zh:48 | Low, non-blocking | Open |
| F8 | Refreshed screenshots | web-ui.md | Low | Deferred (separate docs PR) |
5 CI
The fork Build 42749739366 on exactly this head completed with failure: 78 jobs succeeded, 6 failed and 1 was cancelled. None of the failures is in code touched by this PR:
engine-v2-it (11)andengine-v2-it (17):npm installofseatunnel-engine-uihitERR_SOCKET_TIMEOUTfetchingtslib-2.3.0.tgzfromregistry.npmmirror.combefore any test ran (job). This is the job that runsRestApiIT/BasicAuthenticationIT, so this PR's REST E2E did not execute on this head. They passed on69eb336df1(run 41566050818), and the delta since then does not touch the REST server path, but they still need a green run on the final head.connector-file-sftp-it (11, 17):SftpFileITContainerFetchException, from the removedatmoz/sftptag. This is fixed ondevby #13203, which this branch does not have yet (behind by 2).connector-file-local-it (17): Maven could not transfermysql-connector-java:8.0.27from Central.all-connectors-it-5 (17):TiDBCDCIT.startUpcommunications link failure (container startup).unit-test (11, ubuntu-latest): cancelled at the job timeout insideServerExecuteCommandTest. This is the known hang that #12640 addresses, and #12640 is still open.
On the apache side, PR signal run 42749747252 is action_required, so no Build check is reported on the PR yet.
Next step: sync dev once more to pick up #13203. That push starts a fresh fork Build. If any job then fails for environmental reasons only, rerun with gh run rerun <id> --failed.
6 Merge recommendation
Ready to merge after fixes. The only blocker is CI: a green fork Build on the final head is required, including engine-v2-it, which never got past npm install this time. No non-CI blocker remains. Items 5, 6 and 7 are fixed. Issue 8 is a one-line doc wording fix that I recommend folding into the same dev sync push, but it does not block the merge.
The PR is now out of draft. It still needs an independent committer review, which this self-review does not replace. I ran nothing locally for this re-check. All evidence comes from source, the PR and merge diffs, and the fork CI logs.
|
Maintenance update for The current-head Build failed. I requested one retry of the LocalFile job after Maven Central failed to transfer |
DanielLeens
left a comment
There was a problem hiding this comment.
The CI fact cited in my self-review has changed: the Apache Build relay now reports failure, and the fork Build shows attempt 3 queued. The earlier failed run still lacks a completed REST engine integration result. The guidance to take the separate SFTP image fix from #13203 remains; SFTP recovery will not establish that the REST lanes passed. This self-review does not supply the required independent approval.
SEZ9
left a comment
There was a problem hiding this comment.
Thanks for working on this. I reviewed the latest head 21a5e412b2dc.
What this PR fixes
- User pain: Zeta operators had to leave the Web UI and use curl/CLI for every lifecycle action (submit, restore from checkpoint/savepoint, graceful/savepoint stop, force cancel, worker tag edits), and an explicit
restoreModerestore could fork a source job that was still RUNNING because nothing checked its state. - Fix approach: keep the UI a thin client over REST and extend the server underneath it --
JobInfoService.validateCheckpointRestoreRequest()(JobInfoService.java:536-562, called from bothsubmitJoboverloads at:461/:494and per element insidesubmitJobsat:514) rejects blank/non-numericrestoreSourceJobIdand a non-end-state source job viagetRestoreSourceJobStatus()(:595, local coordinator on the master or aGetJobStatusOperationround trip with.join()otherwise); a new/update-local-member-tagsendpoint inUpdateTagsService.updateLocalMemberTags()(UpdateTagsService.java:54) enforces UUID-must-match-local-member and string-onlytags, and is registered on the Jetty context (JettyService.java:292) and inRestHttpPostCommandProcessor(:90); a read-onlyHttpServiceStatusServlet(JettyService.java:263) anduuid/localMember/tagson each/system-monitoring-informationrow viaBaseService.withMemberIdentity()(BaseService.java:1471) feed the new Vue views (service/job/index.ts:46-78,service/manager/index.ts:29); CI gains auipath filter so UI-only changes build the UI job. - One-line summary: Feature-complete and the restore guard closes a real foot-gun, but the guard still leaks
RestoreMode.valueOfenum text on bad input (JobInfoService.java:541), turns master round-trip failures into 500s (:600-605), runs mid-stream insubmitJobsso a batch can be half-submitted on a 400, and the new tags endpoint is reachable through the unauthenticated Hazelcast text-command path despite docs claiming otherwise -- COMMENT, these should be addressed before merge.
Runtime chain I rechecked
UI submit/restore
service/job/index.ts:46 post('/submit-job', config, {params: restoreMode, restoreSourceJobId})
-> SubmitJobServlet.doPost() SubmitJobServlet.java:47 jobInfoService.submitJob(requestParams, body)
-> JobInfoService.submitJob() JobInfoService.java:461 validateCheckpointRestoreRequest(requestParams)
-> RestoreMode.valueOf(restoreModeValue.trim().toUpperCase()) JobInfoService.java:541 (bare IllegalArgumentException on unknown value)
-> Long.parseLong(restoreSourceJobId) JobInfoService.java:554
-> getRestoreSourceJobStatus() JobInfoService.java:595
-> seaTunnelServer.getCoordinatorService().getJobStatus() :598 (master)
-> NodeEngineUtil.sendOperationToMasterNode(GetJobStatusOperation).join(); JobStatus.values()[ordinal] :600-605 (non-master; CompletionException -> 500)
-> rejectRestoreFromActiveSourceJob() JobInfoService.java:578-589 (400 unless null/isEndState)
-> submitJobInternal() JobInfoService.java:482
service/job/index.ts:64 post('/submit-job/upload') -> SubmitJobByUploadFileServlet.java:81 -> JobInfoService.submitJob(params, config) :494 same guard
RestHttpPostCommandProcessor.handleSubmitJobs() :108 -> JobInfoService.submitJobs() :499 -> stream.map(... validateCheckpointRestoreRequest :514 ... submitJobInternal :517) (guard per element, earlier elements already submitted)
UI worker tags
service/manager/index.ts:29 post('/update-local-member-tags', {uuid, tags})
-> Jetty: JettyService.java:292 context.addServlet(updateLocalMemberTagsHandler, REST_URL_UPDATE_LOCAL_MEMBER_TAGS)
-> UpdateLocalMemberTagsServlet.doPost() UpdateLocalMemberTagsServlet.java:41
-> Hazelcast text path: RestHttpPostCommandProcessor.handle() :90-91 -> handleUpdateLocalMemberTags() :139-143 (no BasicAuthFilter/mTLS)
-> UpdateTagsService.updateLocalMemberTags() UpdateTagsService.java:54
-> getLocalMember() :61 -> validateTargetMember() :88-93 (uuid must equal local member)
-> extractStructuredTagParams() :104-116 (tags must be Map, values String)
-> updateTags() :67-80 -> localMember.getAttributes().size(); localMember.updateAttribute(tags) :72-73 (unsynchronised read-then-replace)
UI status views
JettyService.java:263 new HttpServiceStatusServlet(nodeEngine, seaTunnelConfig, server) -> REST_URL_HTTP_SERVICE_STATUS
SystemMonitoringServlet -> BaseService.getSystemMonitoringInformationJsonValues() -> withMemberIdentity() BaseService.java:1471 (adds uuid/localMember/tags per member, :1499/:1508/:1516/:1527)
Findings
Issue 1: /update-local-member-tags is also wired into the Hazelcast text-command REST path, which has no BasicAuthFilter/mTLS, while the new docs and PR description assert it is only reachable behind the Jetty auth chain
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:90 - Why it matters: - Root cause:
RestHttpPostCommandProcessor.handle()gets a new branch at line 90 that dispatches/update-local-member-tagstoupdateTagsService.updateLocalMemberTags(...)(:139-143). That processor is registered inNodeExtension.createTextCommandService()on the Hazelcast member port; theBasicAuthFilterand the SSL/mTLS connector are only installed on the JettyServletContextHandlerinJettyService(context.addFilter(basicAuthFilterHolder, "/*", ...)), so nothing on the Hazelcast path checks credentials or client certificates. - Contradiction:
docs/en/engines/zeta/rest-api-v2.md:1466(and the ZH mirror at:1456) state the endpoint "is registered on the same servlet context as every other REST endpoint, so it is protected by the same basic authentication and mutual TLS configuration", and the PR description says auth is unchanged. The PR's ownRestApiITasserts a credential-less POST tohazelcastBase + REST_URL_UPDATE_LOCAL_MEMBER_TAGSreturns 200, which demonstrates the unauthenticated path works. - Impact: on clusters with
network.rest-api.enabled: true, anyone who can reach the member port can rewrite a node's scheduling tags, which changes where jobs are placed, even when operators have enabled basic auth / mTLS on Jetty believing that covers the endpoint. - Fix: drop the Hazelcast branch (the Web UI only calls the Jetty port) and the
hazelcastBaseassertions in the IT. If legacy-port parity is intentional, the EN/ZH docs must say explicitly that the Hazelcast port exposure is not covered byenable-basic-author mTLS. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:142 updateTagsService.updateLocalMemberTags(httpPostCommand.getData()));;docs/en/engines/zeta/rest-api-v2.md:1466/update-local-member-tagsis registered on the same servlet context as every other REST endpoint, so it is protected by the same basic authentication and mutual TLS configuration. No separate credentials or settings apply.;seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/RestApiIT.java:843 .post(hazelcastBase + RestConstant.REST_URL_UPDATE_LOCAL_MEMBER_TAGS) - Suggested fix: This branch serves
/update-local-member-tagson the Hazelcast text-command port, which never passes throughBasicAuthFilteror the Jetty SSL/mTLS connector (both are only added to the servlet context inJettyService). The new EN/ZH docs (rest-api-v2.md:1466/:1456) and the PR description claim the endpoint is protected by basic auth and mTLS "unchanged", andRestApiITasserts a credential-less POST tohazelcastBase + REST_URL_UPDATE_LOCAL_MEMBER_TAGSreturns 200. On clusters withrest-api.enabled: truethis lets anyone on the member port rewrite scheduling tags. I'd remove this branch (the UI only uses the Jetty port) and thehazelcastBaseassertions in the IT; if you want to keep legacy-port parity, the docs need to say explicitly that the Hazelcast port is unauthenticated. - Severity: Medium
Issue 2: Restore guard adds a hard master round trip to every explicit restore submission; failures surface as 500 with raw Hazelcast/engine exceptions instead of a 400 with an operator-facing message
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:604 - Why it matters: -
validateCheckpointRestoreRequestnow callsgetRestoreSourceJobStatus(restoreSourceJobId)(JobInfoService.java:560-561). On a non-master REST node this doesNodeEngineUtil.sendOperationToMasterNode(nodeEngine, new GetJobStatusOperation(...)).join()(:600-604); on the master it callsseaTunnelServer.getCoordinatorService().getJobStatus(...)(:598). - Neither call is wrapped.
.join()throwsCompletionExceptionwhen the invocation fails (master gone, member left during failover, operation timeout), andSeaTunnelServer.getCoordinatorService()throwsSeaTunnelEngineExceptionwhile the coordinator is still initialising. Neither is anIllegalArgumentException, so the JettyExceptionHandlingFilterandRestHttpPostCommandProcessor.handle()(:99-101) both fall through to the generic 500 path and echo the raw exception text. - Impact: a restore submitted from the new UI during master failover or coordinator start-up fails with a 500 carrying Hazelcast internals rather than a clear retry message, and the same submission would have succeeded a moment later. Every explicit restore now also pays a synchronous master round trip before the config is even parsed.
- Fix:
rejectRestoreFromActiveSourceJobalready treatsnullas "unknown, do not reject" (:580). Wrap the lookup in a try/catch that logs at WARN and returnsnull(the later checkpoint lookup still protects against a missing source), or rethrow asIllegalArgumentExceptionwith a "master unavailable, retry" message so the client receives a 400 it can act on. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:561 restoreMode, restoreSourceJobId, getRestoreSourceJobStatus(restoreSourceJobId));;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:598 return seaTunnelServer.getCoordinatorService().getJobStatus(restoreSourceJobId);;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:602 NodeEngineUtil.sendOperationToMasterNode( - Suggested fix:
.join()here (andgetCoordinatorService()on the master branch above) can throwCompletionException/SeaTunnelEngineExceptionwhile the master is failing over or the coordinator is still initialising. Those are notIllegalArgumentException, so both the JettyExceptionHandlingFilterandRestHttpPostCommandProcessorwill answer 500 with the raw exception text, and the UI submit panel will surface that to the operator. SincerejectRestoreFromActiveSourceJobalready treatsnullas "unknown, don't reject", I'd wrap this lookup in a try/catch that logs at WARN and returnsnull(the later checkpoint lookup still protects against a missing source), or rethrow as anIllegalArgumentExceptionwith a clear retry message so the client gets a 400. - Severity: Medium
Issue 3: /update-local-member-tags docs (EN+ZH) state the endpoint is only reachable through the Jetty servlet context and is therefore covered by basic auth / mTLS, but this PR also registers it in the Hazelcast text-command processor, which the PR's own IT exercises on the Hazelcast port.
- Location:
docs/en/engines/zeta/rest-api-v2.md:1466 - Why it matters: - Root cause:
RestHttpPostCommandProcessor.java:90-91addsuri.startsWith(CONTEXT_PATH + REST_URL_UPDATE_LOCAL_MEMBER_TAGS)->handleUpdateLocalMemberTags(...). That processor is registered unconditionally inNodeExtension.createTextCommandService()(register(HTTP_POST, new RestHttpPostCommandProcessor(this))), so the new endpoint is also served on the Hazelcast member port whenevernetwork.rest-api.enabledis on, whereBasicAuthFilter/ Jetty SSL do not apply. - The new doc paragraph at
docs/en/engines/zeta/rest-api-v2.md:1466(ZH mirror:1456) says the endpoint "is registered on the same servlet context as every other REST endpoint, so it is protected by the same basic authentication and mutual TLS configuration. No separate credentials or settings apply." That is only true for the Jetty port. - The PR's
RestApiIT.testUpdateLocalMemberTagsOnlyMutatesTheServingMemberasserts a 200 onhazelcastBase + REST_URL_UPDATE_LOCAL_MEMBER_TAGSwithout credentials, so the code and the test both contradict the documented security model. - Fix: either remove the Hazelcast registration (the Web UI only uses the Jetty context), or reword this paragraph and the ZH mirror to say that, like
/update-tags, the endpoint is also exposed on the Hazelcast REST port whennetwork.rest-api.enabledis on and is not protected byenable-basic-author mTLS there. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:91 handleUpdateLocalMemberTags(httpPostCommand);;docs/en/engines/zeta/rest-api-v2.md:1466/update-local-member-tagsis registered on the same servlet context as every other REST endpoint, so it is protected by the same basic authentication and mutual TLS configuration. No separate credentials or settings apply.;docs/zh/engines/zeta/rest-api-v2.md:1456/update-local-member-tags与其他所有 REST 接口注册在同一个 servlet context 上,因此受相同的 basic 认证和双向 TLS 配置保护,不需要额外的凭据或配置。 - Suggested fix: This paragraph says the endpoint is reachable only via the Jetty servlet context and is therefore covered by basic auth / mTLS, but
RestHttpPostCommandProcessor.java:90-91in this PR also routes/update-local-member-tagsthrough the Hazelcast text-command REST processor (registered unconditionally inNodeExtension.createTextCommandService()), andRestApiIT.testUpdateLocalMemberTagsOnlyMutatesTheServingMemberasserts a 200 onhazelcastBase + REST_URL_UPDATE_LOCAL_MEMBER_TAGS. On that port no Jetty filter runs. Could we either drop the Hazelcast registration (the Web UI only uses the Jetty context) or state here (and in the ZH mirror at line 1456) that, like/update-tags, the endpoint is also exposed on the Hazelcast REST port whennetwork.rest-api.enabledis on and is not protected byenable-basic-auththere? - Severity: Medium
Issue 4: /system-monitoring-information now returns uuid, localMember and tags per member, and the new /update-local-member-tags docs tell readers to look them up there, but the /system-monitoring-information section itself (EN and ZH) was not updated.
- Location:
docs/en/engines/zeta/rest-api-v2.md:1472 - Why it matters: - Root cause:
BaseService.withMemberIdentity()(BaseService.java:1475-1479) addsuuid,localMemberand a nestedtagsobject to every member entry, andcollectHealthMetricsapplies it to thetimeout/dispatch-failure/execution-failureerror entries as well (:1499,:1516,:1527). - The new field table at
docs/en/engines/zeta/rest-api-v2.md:1472points users to/system-monitoring-information, "whose entries carryuuidandlocalMemberfor every cluster member", but the### Returns System Monitoring Informationsection of the same file (lines 875-939) still shows the previous response shape and does not mention any of the three new keys. The ZH document has the same gap. - Impact: this is a response-shape change on an existing public endpoint; readers following the cross-reference will not find the fields they are told to read, and clients that validate the response strictly have no documented notice of the new keys.
- Fix: extend the example response in the
/system-monitoring-informationsection withuuid,localMemberandtags, add a short field table for them (noting they also appear on error entries), and mirror the change indocs/zh/engines/zeta/rest-api-v2.md. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1476 memberMetrics.add("localMember", member.localMember());;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1479 memberMetrics.add("tags", tags);;docs/en/engines/zeta/rest-api-v2.md:1472 |uuid| yes | string | Member UUID of the node that must serve this request. Read it from/system-monitoring-information, whose entries carryuuidandlocalMemberfor every cluster member. | - Suggested fix: This row sends readers to
/system-monitoring-informationforuuidandlocalMember, but that endpoint's own section (lines 875-939) still shows the old response and never mentionsuuid,localMemberor the nestedtagsobject thatBaseService.withMemberIdentity()now adds to every member entry (including thetimeout/dispatch-failure/execution-failureones). Since this is a response-shape change on an existing endpoint, could we extend the example there and add a short field table for the three new keys, and mirror it indocs/zh/engines/zeta/rest-api-v2.md? - Severity: Medium
Issue 5: Restore guard runs per element inside the submitJobs stream, so a rejected request on element N leaves elements 1..N-1 submitted while the whole batch answers 400
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:514 validateCheckpointRestoreRequest(requestParams); - Why it matters: - Root cause: in
submitJobs(JobInfoService.java:499-524),validateCheckpointRestoreRequest(requestParams)is invoked at:514inside the.map(...)lambda, immediately beforesubmitJobInternalat:517. The newly added checks (blank/non-numericrestoreSourceJobId, source job not in an end state viarejectRestoreFromActiveSourceJobat:560-561, and any master round-trip failure) are therefore evaluated only after the previous elements have already been handed to the coordinator. - Impact: a batch of three restores where the third source job is still RUNNING returns a single
400 restoreSourceJobId=... is still RUNNINGresponse, yet jobs one and two are already running. The caller has no indication of which elements were accepted, and a naive retry of the whole batch would start duplicates of the first two. - The pre-existing
DRY_RUNcheck at:509-512had the same shape, but the new guard makes this much more likely to trigger because it depends on live cluster state rather than on a static request flag. - Fix: run
validateCheckpointRestoreRequestfor every tuple in a first pass overconfigTuplesbefore anysubmitJobInternalcall, so a batch is rejected atomically; alternatively, return a per-element result array that records which elements were submitted and which were rejected. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:560 rejectRestoreFromActiveSourceJob(;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:561 restoreMode, restoreSourceJobId, getRestoreSourceJobStatus(restoreSourceJobId)); - Severity: Medium
Issue 6: Unsupported restoreMode values surface as a bare RestoreMode.valueOf failure that leaks the enum FQCN into the REST 400 message
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:541 - Why it matters: - Root cause:
validateCheckpointRestoreRequest()callsRestoreMode.valueOf(restoreModeValue.trim().toUpperCase(Locale.ROOT))atJobInfoService.java:541without catching theIllegalArgumentExceptionJava throws for unknown constants. BecauseIllegalArgumentExceptionis exactly what the REST layer maps to 400, the responsemessagebecomesIllegalArgumentException: No enum constant org.apache.seatunnel.engine.core.job.RestoreMode.FOO, exposing the fully-qualified class name and giving no hint of the accepted values. - The same parse is repeated in
BaseService.resolveRestoreModeatBaseService.java:1043(return RestoreMode.valueOf(...)), so the two parsers can drift apart and both leak the same text. - Contrast: a few lines below, the
restoreSourceJobIdparse (:555-558) is wrapped and rethrown with the messagerestoreSourceJobId must be a numeric job id, got: ..., which is the operator-facing style the new UI submit panel displays verbatim. - Fix: catch the
IllegalArgumentExceptionfromvalueOfand rethrow with a message listing the supported modes (NONE,CHECKPOINT,SAVEPOINT, ...), and extract that into a shared helper used by bothvalidateCheckpointRestoreRequestandBaseService.resolveRestoreMode. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1043 return RestoreMode.valueOf(restoreModeValue.trim().toUpperCase(Locale.ROOT));;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:557 "restoreSourceJobId must be a numeric job id, got: " + restoreSourceJobIdValue,;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1392 return RestoreMode.valueOf(restoreModeValue.trim().toUpperCase(Locale.ROOT)); - Suggested fix:
RestoreMode.valueOf(...)on a bad value throwsIllegalArgumentException("No enum constant org.apache.seatunnel.engine.core.job.RestoreMode.FOO"), which the REST layer returns verbatim as the 400 message and the new UI submit panel displays. You already giverestoreSourceJobIda clear message a few lines below; could you do the same here (catch and rethrow with the list of supported modes), and reuse that helper inBaseService.resolveRestoreModeso both parsers stay in sync? - Severity: Medium
Issue 7: /system-monitoring-information now publishes every member's full tag map to any REST reader, while the same PR's UpdateTagsService treats tag content as potentially secret; the exposure is undocumented and the two stances contradict each other
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1478 - Why it matters: - Root cause:
BaseService.withMemberIdentity()appendsuuid,localMemberand atagsobject built frommember.getAttributes()(BaseService.java:1478-1479) to every row returned by/system-monitoring-information, including the timeout/dispatch-failure/execution-failure rows. In the same PR, the comment inUpdateTagsService.updateTags()(UpdateTagsService.java:69-71) justifies logging only counts because "tag keys and values are arbitrary operator input and may carry secrets, so their content must never reach the server log". - If tags can carry secrets, broadcasting them in a widely polled read endpoint (the new Workers view polls it) is a far larger exposure than a server-side log line, and on the Hazelcast text-command port that read endpoint is not behind basic auth at all. If tags cannot carry secrets, the log redaction removes the audit trail of which keys changed for no benefit.
- Neither the EN nor the ZH
/system-monitoring-informationdocs mention that tags are now returned. - Fix: pick one position. The practical one is "tags are non-secret scheduling metadata visible to any authenticated REST client": document the new
uuid/localMember/tagsfields in the/system-monitoring-informationsection (EN/ZH) and log the tag keys on update. If secrets really are expected, do not emit tag values here. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1479 memberMetrics.add("tags", tags);;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:70 // counts are logged on purpose: tag keys and values are arbitrary operator input and may;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:71 // carry secrets, so their content must never reach the server log. - Suggested fix: This emits every member's full tag map to all
/system-monitoring-informationcallers (and the Web UI polls it), whileUpdateTagsService.updateTags()in this same PR refuses to log tag content because it "may carry secrets". The two positions conflict: if tags can hold secrets, this read endpoint is the bigger leak; if they cannot, the log redaction removes a useful audit trail for nothing. I'd settle on "tags are non-secret scheduling metadata visible to any authenticated REST client", document the newuuid/localMember/tagsfields in the/system-monitoring-informationsection of the EN/ZH REST docs (the new/update-local-member-tagsdocs already point readers there), and log the tag keys on update. - Severity: Low
Issue 8: Tag update is a whole-set replace with no concurrency protection across three independent UpdateTagsService instances, so concurrent operators silently overwrite each other
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:72 int previousTagCount = localMember.getAttributes().size(); - Why it matters: - Root cause:
updateTags(Map, MemberImpl)readslocalMember.getAttributes().size()(UpdateTagsService.java:72) and then callslocalMember.updateAttribute(tags)(:73), which replaces the entire attribute map. There is no compare-and-set, version, or lock around the read-then-replace. There are now three independentUpdateTagsServiceinstances on a node (the existingUpdateTagsServlet, the newUpdateLocalMemberTagsServletconstructed atUpdateLocalMemberTagsServlet.java:23, and the one insideRestHttpPostCommandProcessor), none of which coordinate. - Impact: with the Web UI making tag editing a one-click action, two operators (or the UI plus a CLI/automation script) editing the same node's tags at nearly the same time will each submit their full desired map; the second write silently discards the first, and the response to both is
status: success. The audit log line records only counts (see F7), so the lost update is also invisible after the fact. - Severity is LOW because tag edits are infrequent and the previous
/update-tagsendpoint had the same shape; the UI just makes the race easier to hit. - Fix options: accept an optional
expectedTags(or a version derived from the current map) in the request body and reject with 409 if the current attributes differ; or at minimum document that the endpoint is last-writer-wins and have the UI re-fetch/system-monitoring-informationimmediately before submitting. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:73 localMember.updateAttribute(tags);;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/UpdateLocalMemberTagsServlet.java:23 this.updateTagsService = new UpdateTagsService(nodeEngine); - Severity: Low
Review conclusion
Conclusion: final approval remains pending on the previous comments
2. Remaining follow-ups
- Issue 1: /update-local-member-tags is also wired into the Hazelcast text-command REST path, which has no BasicAuthFilter/mTLS, while the new docs and PR description assert it is only reachable behind the Jetty auth chain
- Issue 2: Restore guard adds a hard master round trip to every explicit restore submission; failures surface as 500 with raw Hazelcast/engine exceptions instead of a 400 with an operator-facing message
- Issue 3:
/update-local-member-tagsdocs (EN+ZH) state the endpoint is only reachable through the Jetty servlet context and is therefore covered by basic auth / mTLS, but this PR also registers it in the Hazelcast text-command processor, which the PR's own IT exercises on the Hazelcast port. - Issue 4:
/system-monitoring-informationnow returnsuuid,localMemberandtagsper member, and the new/update-local-member-tagsdocs tell readers to look them up there, but the/system-monitoring-informationsection itself (EN and ZH) was not updated. - Issue 5: Restore guard runs per element inside the
submitJobsstream, so a rejected request on element N leaves elements 1..N-1 submitted while the whole batch answers 400 - Issue 6: Unsupported restoreMode values surface as a bare
RestoreMode.valueOffailure that leaks the enum FQCN into the REST 400 message - Issue 7:
/system-monitoring-informationnow publishes every member's full tag map to any REST reader, while the same PR'sUpdateTagsServicetreats tag content as potentially secret; the exposure is undocumented and the two stances contradict each other - Issue 8: Tag update is a whole-set replace with no concurrency protection across three independent
UpdateTagsServiceinstances, so concurrent operators silently overwrite each other
Thanks for the updates so far. Happy to discuss the remaining points.
Reuse the single-line test fixture update merged in apache#13203.
SEZ9
left a comment
There was a problem hiding this comment.
Thanks for the follow-up. I checked the latest changes at bb0165d59b75 against my previous review comments.
The scope of this pass is limited to the findings from the previous review; it does not introduce a new set of review items.
Previous findings still requiring follow-up
Issue 1: PR13008-F1: /update-local-member-tags is also wired into the Hazelcast text-command REST path, which has no BasicAuthFilter or mTLS, while the new docs state the endpoint is protected by the Jetty basic-auth / mutual-TLS configuration
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:90 - Why it matters: - Root cause:
RestHttpPostCommandProcessor.handle()gains a branch at:90that routes/update-local-member-tagstohandleUpdateLocalMemberTags(...), which callsupdateTagsService.updateLocalMemberTags(...)(:139-143). That processor is registered inNodeExtension.createTextCommandService()(register(HTTP_POST, new RestHttpPostCommandProcessor(this))), so the endpoint is served on the Hazelcast member port. BasicAuthFilteris added only to the JettyServletContextHandlerinJettyService.createJettyServer()(context.addFilter(basicAuthFilterHolder, "/*", ...)), and the SSL / client-auth connector is added only to the JettyServerinenableHttps(). Nothing on the Hazelcast text-command path performs either check.- Impact: with
enable-basic-author mutual TLS configured, a caller that can reach the Hazelcast REST port can still replace a member's tags without credentials. The only precondition is the member UUID, which/system-monitoring-informationnow returns. - The new docs (
docs/en/engines/zeta/rest-api-v2.md:1466, ZH:1456) say the endpoint "is protected by the same basic authentication and mutual TLS configuration", which is true for the Jetty port only. - Test coverage reflects the gap:
BasicAuthenticationIT.testOperationEndpointsRequireCredentialsasserts 401 on the Jetty port only, whileRestApiIT.testUpdateLocalMemberTagsOnlyMutatesTheServingMemberposts tohazelcastBase + REST_URL_UPDATE_LOCAL_MEMBER_TAGSand expects 200. - Suggestion: the endpoint is new and the Web UI reaches it through Jetty, so the simplest fix is to drop the branch from
RestHttpPostCommandProcessor. If the legacy-port route is intentional, the docs must say explicitly that basic auth and mTLS do not cover it. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:142 updateTagsService.updateLocalMemberTags(httpPostCommand.getData()));;docs/en/engines/zeta/rest-api-v2.md:1466/update-local-member-tagsis registered on the same servlet context as every other REST endpoint, so it is protected by the same basic authentication and mutual TLS configuration. No separate credentials or settings apply.;seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/RestApiIT.java:843 .post(hazelcastBase + RestConstant.REST_URL_UPDATE_LOCAL_MEMBER_TAGS) - Suggested fix: This branch serves
/update-local-member-tagson the Hazelcast text-command port, which never passes throughBasicAuthFilteror the Jetty SSL/mTLS connector — both are installed only inJettyService. The new EN/ZH docs (rest-api-v2.md:1466/:1456) say the endpoint is protected by basic auth and mutual TLS, andBasicAuthenticationITonly asserts the 401 on the Jetty port, whileRestApiIT.testUpdateLocalMemberTagsOnlyMutatesTheServingMemberposts to the Hazelcast port and expects 200. Since this endpoint is new and the Web UI reaches it through Jetty, could we drop this branch? If the legacy-port route is intentional, the docs need to state that the auth settings do not apply to it. - Priority: P1 — should fix in this PR
Issue 2: PR13008-F2: Restore guard adds an unguarded master lookup to every explicit restore submission; lookup failures surface as a 500 carrying the raw engine exception instead of a clear operator-facing message
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:604 - Why it matters: -
validateCheckpointRestoreRequestnow ends withrejectRestoreFromActiveSourceJob(restoreMode, restoreSourceJobId, getRestoreSourceJobStatus(restoreSourceJobId))(JobInfoService.java:560-561), so every submission with a restorerestoreModeand a numericrestoreSourceJobIdresolves the source job status first. - On the master,
getRestoreSourceJobStatuscallsseaTunnelServer.getCoordinatorService().getJobStatus(...)(:598).SeaTunnelServer.getCoordinatorService()throwsSeaTunnelEngineRetryableExceptionwhen the coordinator is still not active after its short wait, andSeaTunnelEngineExceptionwhen the node loses mastership in between. - On a non-master REST node it calls
NodeEngineUtil.sendOperationToMasterNode(nodeEngine, new GetJobStatusOperation(...)).join()(:600-604), which rethrows any invocation failure as an unchecked exception. - Neither call is wrapped, and none of these exceptions is an
IllegalArgumentException. The JettyExceptionHandlingFiltertherefore falls intocatch (Exception e)andRestHttpPostCommandProcessor.handle()intocatch (Throwable e); both answer 500 with the exception type and message as the response text. - Impact: during master failover or coordinator initialisation, the operator gets an internal engine exception that says neither that the restore pre-check was what failed nor that the request is safe to retry.
- Suggestion: catch the lookup failure inside
getRestoreSourceJobStatusand rethrow with a message that namesrestoreSourceJobIdand states the source job status could not be resolved, keeping the original exception as the cause. Add a unit test for the failing-lookup path. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:561 restoreMode, restoreSourceJobId, getRestoreSourceJobStatus(restoreSourceJobId));;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:598 return seaTunnelServer.getCoordinatorService().getJobStatus(restoreSourceJobId);;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:602 NodeEngineUtil.sendOperationToMasterNode( - Suggested fix:
.join()here, andgetCoordinatorService()on the master branch just above, can throw while the master is failing over or the coordinator is still initialising (SeaTunnelEngineRetryableException/SeaTunnelEngineExceptionlocally, or the wrapped invocation failure fromjoin()). None of these is anIllegalArgumentException, so both the JettyExceptionHandlingFilterandRestHttpPostCommandProcessoranswer 500 with the raw exception text. Could you wrap the lookup and rethrow with a message that namesrestoreSourceJobIdand says the source job status could not be resolved, so the operator knows the pre-check failed and can retry? A test for this path would be good too. - Priority: P1 — should fix in this PR
Issue 3: PR13008-F5: Restore guard runs per element inside the submitJobs stream, so a rejected request on element N leaves elements 1..N-1 submitted while the whole batch answers 400
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:514 validateCheckpointRestoreRequest(requestParams); - Why it matters: - Root cause: in
submitJobs(JobInfoService.java:499-524),validateCheckpointRestoreRequest(requestParams)is called at:514inside the.map(...)lambda, immediately beforesubmitJobInternalat:517. The stream handles one element end to end before moving to the next, so the checks for element N run only after elements 1..N-1 have already been submitted. - The checks this PR adds — blank or non-numeric
restoreSourceJobId, a source job that has not reached an end state (rejectRestoreFromActiveSourceJobat:560-561), and any failure of the master status lookup — add new ways for a later element to abort the batch. - Impact: the
IllegalArgumentExceptionpropagates out of the stream and both REST entry points map it to a 400 for the whole request. The partially builtJsonArrayis discarded, so the caller does not learn which jobs were started. Retrying the same batch after fixing the offending element submits the earlier jobs a second time. - The active-source check depends on runtime state, so a batch that is syntactically valid can still be rejected halfway through.
- Suggestion: validate every element first (parameter checks and the restore guard) and submit only when all pass. If partial submission is intended, return a per-element result instead of failing the whole batch. A test with a valid first element and a rejected second one would pin the behaviour down.
- Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:560 rejectRestoreFromActiveSourceJob(;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:561 restoreMode, restoreSourceJobId, getRestoreSourceJobStatus(restoreSourceJobId)); - Priority: P1 — should fix in this PR
Issue 4: PR13008-F6: Unsupported restoreMode values surface as a bare RestoreMode.valueOf failure that leaks the enum's fully-qualified class name into the REST 400 message
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:541 - Why it matters: - Root cause:
validateCheckpointRestoreRequest()callsRestoreMode.valueOf(restoreModeValue.trim().toUpperCase(Locale.ROOT))atJobInfoService.java:541without handling theIllegalArgumentExceptionthrown for an unknown constant. IllegalArgumentExceptionis exactly what the REST layer maps to 400, and the JettyExceptionHandlingFilterwritesExceptionUtils.getMessage(e). The responsemessagetherefore becomesIllegalArgumentException: No enum constant org.apache.seatunnel.engine.core.job.RestoreMode.FOO.- Impact: the caller sees an internal class name and no hint about the accepted values (
NONE,SAVEPOINT,CHECKPOINT). This is inconsistent with the same method, which givesrestoreSourceJobIdan explicit message ("restoreSourceJobId must be a numeric job id, got: ..."at:557). BaseService.resolveRestoreMode()contains the same unguardedRestoreMode.valueOf(...). Because the new validation runs first, fixing it here covers the REST submit paths.- Suggestion: catch the
IllegalArgumentExceptionand rethrow with a message such asUnsupported restoreMode '<value>', supported values: NONE, SAVEPOINT, CHECKPOINT. Ideally do this in one shared helper used by both call sites, and add a test for the invalid-value case. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1043 return RestoreMode.valueOf(restoreModeValue.trim().toUpperCase(Locale.ROOT));;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:557 "restoreSourceJobId must be a numeric job id, got: " + restoreSourceJobIdValue,;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1392 return RestoreMode.valueOf(restoreModeValue.trim().toUpperCase(Locale.ROOT)); - Suggested fix:
RestoreMode.valueOf(...)throwsIllegalArgumentException("No enum constant org.apache.seatunnel.engine.core.job.RestoreMode.FOO")for an unknown value, and the REST layer returns that as the 400 message. You already giverestoreSourceJobIda clear message a few lines below; could you do the same here? Catch it and rethrow with the offending value and the supported modes (NONE,SAVEPOINT,CHECKPOINT). A shared helper would also cover the identicalvalueOfinBaseService.resolveRestoreMode(). - Priority: P1 — should fix in this PR
Issue 5: PR13008-F3: /update-local-member-tags docs (EN + ZH) describe only the Jetty servlet-context registration and conclude the endpoint is covered by basic auth / mTLS, but this PR also registers it in the Hazelcast text-command processor, which the PR's own IT exercises on the Hazelcast port
- Location:
docs/en/engines/zeta/rest-api-v2.md:1466 - Why it matters: - Root cause:
RestHttpPostCommandProcessor.java:90-91addsuri.startsWith(CONTEXT_PATH + REST_URL_UPDATE_LOCAL_MEMBER_TAGS)->handleUpdateLocalMemberTags(...). That processor is registered inNodeExtension.createTextCommandService()(register(HTTP_POST, new RestHttpPostCommandProcessor(this))), so the new endpoint is also served on the Hazelcast member port, whereBasicAuthFilterand the Jetty SSL connector do not apply. - The new Authentication paragraph (
docs/en/engines/zeta/rest-api-v2.md:1466,docs/zh/engines/zeta/rest-api-v2.md:1456) says the endpoint "is registered on the same servlet context as every other REST endpoint, so it is protected by the same basic authentication and mutual TLS configuration". That describes the Jetty route only. RestApiIT.testUpdateLocalMemberTagsOnlyMutatesTheServingMemberposts tohazelcastBase + REST_URL_UPDATE_LOCAL_MEMBER_TAGSand expects 200, and its Javadoc says the tags are applied "on both the Jetty and the legacy Hazelcast REST port". The second route is therefore intended behaviour that the docs omit.- Impact: an operator who reads this paragraph will conclude that enabling basic auth or mTLS fully protects tag mutation, which is not the case while the Hazelcast REST port is reachable.
- Suggestion: keep docs and code consistent in both languages. Either remove the Hazelcast-port route (see PR13008-F1), or reword the paragraph to say the protection applies to the Jetty HTTP/HTTPS port only and that the legacy Hazelcast REST port serves the endpoint without it.
- Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:91 handleUpdateLocalMemberTags(httpPostCommand);;docs/en/engines/zeta/rest-api-v2.md:1466/update-local-member-tagsis registered on the same servlet context as every other REST endpoint, so it is protected by the same basic authentication and mutual TLS configuration. No separate credentials or settings apply.;docs/zh/engines/zeta/rest-api-v2.md:1456/update-local-member-tags与其他所有 REST 接口注册在同一个 servlet context 上,因此受相同的 basic 认证和双向 TLS 配置保护,不需要额外的凭据或配置。 - Suggested fix: This paragraph covers only the Jetty servlet context and concludes the endpoint is protected by basic auth / mutual TLS. This PR also routes
/update-local-member-tagsthrough the Hazelcast text-command processor (RestHttpPostCommandProcessor.java:90-91, registered inNodeExtension.createTextCommandService()), andRestApiIT.testUpdateLocalMemberTagsOnlyMutatesTheServingMemberposts to the Hazelcast port and expects 200. NeitherBasicAuthFilternor the Jetty SSL connector applies there. Please either remove that route or state here, and in the ZH doc at:1456, that the protection covers the Jetty port only. - Priority: P2 — optional
Issue 6: PR13008-F4: /system-monitoring-information now returns uuid, localMember and tags per member, and the new /update-local-member-tags docs tell readers to look them up there, but the /system-monitoring-information section itself (EN and ZH) was not updated
- Location:
docs/en/engines/zeta/rest-api-v2.md:1472 - Why it matters: - Root cause:
BaseService.withMemberIdentity()(BaseService.java:1475-1479) addsuuid,localMemberand a nestedtagsobject to each member entry.collectHealthMetricsapplies it to thedispatch-failure,timeoutandexecution-failureerror entries as well (:1499,:1516,:1527); entries whose member is unknown are returned unchanged. - The new field table at
docs/en/engines/zeta/rest-api-v2.md:1472(ZH:1462) points users to/system-monitoring-information, "whose entries carryuuidandlocalMemberfor every cluster member". - That endpoint's own section (EN
:875-939, ZH:861-925) still shows the old response example, and its error example is still{"host": ..., "port": ..., "error": "timeout"}. Neither language mentionsuuid,localMemberortags. - Impact: this is a user-visible response change that the Web UI Workers page and the new endpoint both depend on, yet a reader who follows the cross-reference finds no description of the fields.
- Suggestion: update the
/system-monitoring-informationsection in bothdocs/enanddocs/zh. Add the three fields to the response example, describelocalMember(true for the member serving the request) andtags(object of string values), and note that error entries carry the same identity fields when the member is known. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1476 memberMetrics.add("localMember", member.localMember());;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1479 memberMetrics.add("tags", tags);;docs/en/engines/zeta/rest-api-v2.md:1472 |uuid| yes | string | Member UUID of the node that must serve this request. Read it from/system-monitoring-information, whose entries carryuuidandlocalMemberfor every cluster member. | - Suggested fix: This row sends readers to
/system-monitoring-informationforuuidandlocalMember, but that endpoint's own section (lines 875-939, and the ZH counterpart) still shows the old response. It never mentionsuuid,localMemberor the nestedtagsobject thatBaseService.withMemberIdentity()now adds to member entries, including thetimeout/dispatch-failure/execution-failureones. Since this is a response change other parts of this PR rely on, please update that section in both EN and ZH: extend the example and describe the three fields. - Priority: P2 — optional
Issue 7: PR13008-F7: /system-monitoring-information now returns every member's full tag map to any REST reader, while the same PR's UpdateTagsService treats tag content as potentially secret; the exposure is undocumented and the two stances contradict each other
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1478 - Why it matters: - Root cause:
BaseService.withMemberIdentity()builds atagsobject frommember.getAttributes()and adds it to each member entry (BaseService.java:1478-1479), alongsideuuidandlocalMember. This applies to every entry returned by/system-monitoring-information, including the timeout / dispatch-failure / execution-failure ones. - In the same PR, the comment in
UpdateTagsService.updateTags()(UpdateTagsService.java:69-71) explains that only counts are logged because tag keys and values "are arbitrary operator input and may carry secrets, so their content must never reach the server log". - These two positions conflict. If tags may hold secrets, returning the full map from a read endpoint is the larger exposure. If they may not, the log redaction costs a useful audit trail without a matching benefit.
- The docs do not mention that tags are returned by
/system-monitoring-information, and nothing tells operators whether sensitive values belong in tags. - Suggestion: pick one stance and document it in EN and ZH. The low-cost option is to state in the tag-update and
/system-monitoring-informationdocs that tags are readable by anyone with REST access and must not contain secrets, and to adjust theUpdateTagsServicecomment to match. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1479 memberMetrics.add("tags", tags);;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:70 // counts are logged on purpose: tag keys and values are arbitrary operator input and may;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:71 // carry secrets, so their content must never reach the server log. - Suggested fix: This returns every member's full tag map to all
/system-monitoring-informationcallers, whileUpdateTagsService.updateTags()in this same PR refuses to log tag content because it "may carry secrets". The two positions conflict: if tags can hold secrets, this read endpoint is the larger exposure; if they cannot, the log redaction gives up an audit trail for nothing. I'd suggest picking one stance and documenting it in EN and ZH — for example, state that tags are readable through the REST API and must not contain secrets, and align the comment inUpdateTagsService. - Priority: P2 — optional
Issue 8: PR13008-F8: Tag update is a whole-set replace with no concurrency protection across three independent UpdateTagsService instances, so concurrent operators silently overwrite each other
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:72 int previousTagCount = localMember.getAttributes().size(); - Why it matters: - Root cause:
updateTags(Map, MemberImpl)readslocalMember.getAttributes().size()(UpdateTagsService.java:72) for the audit log and then callslocalMember.updateAttribute(tags)(:73), which replaces the whole tag set. The request carries no expected-state precondition (version, previous tags, compare-and-set) and no lock surrounds the call. - A node now has three independent
UpdateTagsServiceinstances that can reach this method: the existingUpdateTagsServlet, the newUpdateLocalMemberTagsServlet(created in its constructor), andRestHttpPostCommandProcessor. There is no single point at which updates are serialised. - Impact: the Web UI flow is read tags, edit, post the full map. Two operators (or the UI and a script using
/update-tags) who start from the same view and change different tags will each post a complete map, and the later request silently discards the earlier change. Both receivesuccess. - Under concurrent requests the
previousTagscount in the audit log line can also be stale. Since tag content is deliberately not logged, the lost update cannot be reconstructed afterwards. - Suggestion: at minimum, document the last-writer-wins, full-replacement semantics for
/update-local-member-tags. A stronger option is an optional precondition in the request (for example the tag map the client last saw) that is rejected with 400 on mismatch, with the check and the replace serialised on the member. - Evidence:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/UpdateTagsService.java:73 localMember.updateAttribute(tags);;seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/UpdateLocalMemberTagsServlet.java:23 this.updateTagsService = new UpdateTagsService(nodeEngine); - Priority: P2 — optional
Review conclusion
Conclusion: final approval remains pending on the previous comments
2. Remaining follow-ups
- Issue 1:
/update-local-member-tagsis also wired into the Hazelcast text-command REST path, which has noBasicAuthFilteror mTLS, while the new docs state the endpoint is protected by the Jetty basic-auth / mutual-TLS configuration - Issue 2: Restore guard adds an unguarded master lookup to every explicit restore submission; lookup failures surface as a 500 carrying the raw engine exception instead of a clear operator-facing message
- Issue 3: Restore guard runs per element inside the
submitJobsstream, so a rejected request on element N leaves elements 1..N-1 submitted while the whole batch answers 400 - Issue 4: Unsupported
restoreModevalues surface as a bareRestoreMode.valueOffailure that leaks the enum's fully-qualified class name into the REST 400 message - Issue 5:
/update-local-member-tagsdocs (EN + ZH) describe only the Jetty servlet-context registration and conclude the endpoint is covered by basic auth / mTLS, but this PR also registers it in the Hazelcast text-command processor, which the PR's own IT exercises on the Hazelcast port - Issue 6:
/system-monitoring-informationnow returnsuuid,localMemberandtagsper member, and the new/update-local-member-tagsdocs tell readers to look them up there, but the/system-monitoring-informationsection itself (EN and ZH) was not updated - Issue 7:
/system-monitoring-informationnow returns every member's full tag map to any REST reader, while the same PR'sUpdateTagsServicetreats tag content as potentially secret; the exposure is undocumented and the two stances contradict each other - Issue 8: Tag update is a whole-set replace with no concurrency protection across three independent
UpdateTagsServiceinstances, so concurrent operators silently overwrite each other
Thanks for the updates so far. Happy to discuss the remaining points.
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks, @SEZ9. The current commit carries the same SFTP image update as dev. I rechecked the Web UI and both server transports on this head. Your remaining authentication and restore-preflight findings still apply.
What problem does this PR solve?
User pain. Web UI operators previously needed the CLI or direct REST calls for job lifecycle operations and worker tag edits.
Fix. Provide typed UI forms and a monitoring view backed by the existing job service, with serving-member identity for local tag changes.
Example. An operator can choose a completed source job and submit a restore from the Web UI using its exact numeric ID.
1. Code changes
1.1 Core logic
The earlier Web UI mostly monitored jobs and members. The new job-operations.tsx calls the existing submit/upload/stop service wrappers, and seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:536 now validates explicit restore selection.
Zeta UI routes -> typed operations forms and manager views
-> job submit/restore/stop service -> JobInfoService validation
-> active coordinator lookup -> existing job lifecycle and checkpoint restore
worker view -> monitoring member identity -> confirmed tag replace
-> Jetty servlet/auth chain -> UpdateTagsService checks serving-member UUID
legacy text-command dispatch on the same server also reaches the mutator
-> local Hazelcast member attributes affect worker selection
These are ordinary operator paths. UUID matching protects against updating the wrong member, while the transport must still establish authorization. Requests to older servers need to handle optional monitoring fields. Tag refresh and guarded form submission improve the normal UX.
1.2 Compatibility
Partially incompatible for REST callers that now receive active-source validation and new monitoring fields. Keep old readers compatible with optional fields, use opaque job IDs in the UI, and document the restore and full-replacement semantics. The patch does not change checkpoint bytes.
1.3 Performance and side effects
The UI de-duplicates polling and avoids inactive-tab refresh. Restore validation adds a coordinator lookup per explicit source job. Ensure it is bounded during failover and move request-wide validation ahead of any batch side effect.
1.4 Errors, logging, and findings
+1 to @SEZ9's current findings.
- Issue 1 (high):
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:90registers the new member-tag mutation outside the authenticated Jetty servlet path. Remove the legacy registration or enforce equivalent authorization, and align the documented protection and tests with both server listeners. - Issues 2 and 3 (high):
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:514validates each restore after earlier items may have already started. A status lookup failure at:595can also surface as an internal failure. Preflight the entire request before submission where possible, preserve safe retry semantics and return a clear retryable failure for coordinator transitions. - Remaining protocol and docs issues: Validate restore modes with an explicit operator-facing error. Document monitoring fields and tag visibility, and expose or guard full-replacement semantics so a stale browser edit cannot silently overwrite another operator's change.
Keep credentials out of response, telemetry and tag fields. The latest access-control wording is useful but needs the server route to enforce the documented policy.
2. Code quality
2.1 Conventions
The UI keeps service models, validation, translations and rendering separate. The server should provide one authenticated mutation boundary and a shared restore validation result.
2.2 Test coverage and stability
Stability: Stable on inspection. seatunnel-engine/seatunnel-engine-ui/src/tests/managers.spec.ts:399 controls slow and obsolete responses and asserts polling lifecycle behavior. The local-worker confirmation test at :188 awaits the refresh. The current REST coverage checks authentication only for Jetty and separately expects legacy transport success. Add an authorization regression and a batch whose later request fails before any job is sent.
2.3 Documentation
Keep EN/ZH REST and Web UI docs aligned to actual authentication, role, member-tag visibility and concurrency semantics. The configuration status page is informational and should not be interpreted as a separate credential check.
3. Architecture
3.1 Change location
Reusing Zeta lifecycle endpoints is appropriate. The new manager mutation should share the same access-control boundary and concurrency semantics as the management UI.
3.2 Maintainability
Keep frontend validation for fast feedback and server validation authoritative. Separate request preflight from job dispatch and keep error messages explicit through failover.
3.3 Extensibility
A versioned member update and common operation response can support future administrative actions without repeating authorization or retry logic.
3.4 Upgrade impact
Existing jobs and checkpoints keep their format. Clients must tolerate the newer restore preflight and optional monitor fields during rollout.
4. Findings summary
| # | Finding | Location | Severity |
|---|---|---|---|
| - | No new source blocker found | - | - |
5. Merge recommendation
Ready to merge after fixes
Blocking items: Resolve the alternate-listener authorization and partial restore submission risks, and verify the REST and UI checks on the resulting head.
Non-blocking suggestions: Improve invalid-mode errors, monitor-field docs and stale tag edit handling as noted in @SEZ9's review.
The old SFTP failure referenced the retired image. This head and current dev both use the replacement tag from #13203, so no further SFTP patch or sync is indicated by that former failure. The exact-head fork Build is queued, and there is no current Apache Build result.
CI and repository state: no check reported in the Apache rollup; Build: queued. GitHub reports BLOCKED / REVIEW_REQUIRED.
Verification: Reviewed all changed files and the referenced call sites at bb0165d59b751dedf2f480adc2fc3a196b884fbb against merge base 535d4237dd4b6ae92b14a9cbd790acf8d81cc71d. git diff --check passed. I did not build, run tests, or execute SeaTunnel locally.
DanielLeens
left a comment
There was a problem hiding this comment.
The exact-head Build has completed with failures, replacing the queued status in my previous review. Both all-connectors-it-5 lanes failed in TiDBCDCIT startup; the current dev already contains the TiDB readiness fix in #13269, which is absent from this head. Syncing that fix and rerunning the failed lanes is the useful CI next step; do not add a TiDB workaround to this feature. The alternate-listener authorization and partial-restore submission blockers from the full review remain separate and unresolved. Effective maintainer review is still required.
|
Thanks for the update. The failed Build run 43888410077 is separate from the earlier review points and doesn't change their status, so here is what is still open. Still blocking
Status needed The thread has no update on the remaining points, so could you confirm where each one stands?
For each one, a short note saying whether it is fixed or intentionally left as is would be enough for the next pass. |
DanielLeens
left a comment
There was a problem hiding this comment.
Thanks for continuing the Apache SeaTunnel Web UI work. I re-read the full current head, the server/UI entry points and both detailed @SEZ9 reviews. The UI polling and UUID handling are substantially more careful now. The earlier server-side findings below still need closure, so this is a technical recheck of Daniel's own PR rather than an approval.
What problem does this PR solve?
User pain: Operators can inspect jobs in the Web UI but lack submit/restore, lifecycle controls, checkpoint inspection and safe local-worker tag editing.
Fix: Add job text/upload submissions, explicit restore parameters and active-source guard, checkpoint views, per-job lifecycle actions, local UUID-bound tag replacement, HTTP-service status and connector option metadata.
In one sentence: Operators can perform common job operations from the Web UI; for example, stop a streaming job with a savepoint, inspect its latest state and prefill a new restore submission without copying an opaque ID by hand.
1. Code changes
1.1 Core logic
Complete runtime path:
Browser hash route -> jobs/checkpoints/managers/operations Vue components -> typed Axios services
-> Jetty servlet context -> exception filter -> configured BasicAuthFilter and HTTPS/mTLS connector -> REST service
Submit -> JobInfoService.validateCheckpointRestoreRequest -> local master CoordinatorService.getJobStatus
OR NodeEngineUtil.sendOperationToMasterNode(GetJobStatusOperation).join -> active-source rejection
-> decrypt/submitJobInternal -> existing job/checkpoint restore lifecycle
Batch -> submitJobs stream -> validate and submit EACH element -> collect response (partial acceptance remains possible)
Tag edit -> selected local worker UUID -> structured string tags -> UpdateLocalMemberTagsServlet -> UpdateTagsService
-> validate UUID equals serving member -> replace local MemberImpl attribute map -> count-only audit
Separate member listener -> NodeExtension.createTextCommandService -> RestHttpPostCommandProcessor
-> same new update-local-member-tags service WITHOUT the Jetty filter chain
Monitor -> BaseService -> normal and failed-known-member records include UUID/localMember/full tags
UI requests -> version/disposal guards -> visibility-aware polling -> ignore stale response; refresh after tag mutation
Checkpoint overview/history -> all-pipeline latest eligibility + terminal-source UI guard -> restore route query
HTTP status -> effective Jetty connectors and configured allowlisted booleans/ports, not credentials
Key findings and correctness:
The normal Web UI paths reach the new services; these are real operator actions rather than unreachable helper methods. All 55 changed files and their affected server/UI callers were read. Text/file submissions preserve format and string job IDs; mutation timeout=0 avoids treating a long submission as a definite failure. A network failure is explicitly uncertain and the UI tells the operator to refresh before retrying.
The running-jobs action set prevents concurrent actions for one job, and version/disposed guards prevent late mutation responses from restarting polling after unmount. Checkpoint restore eligibility checks all pipeline rows against the latest corresponding checkpoint/savepoint and offers it only for the listed terminal states; the server independently rejects a still-active source. A missing/unknown source proceeds to the checkpoint-not-found contract rather than being assumed RUNNING.
The manager view re-resolves a selected member by UUID after refresh, hides mutation for remote/master records, preserves untouched original key/value strings, rejects duplicate or ambiguous serialized keys, and requires explicit Clear for an unrepresentable map. If an old poll is in flight, generation changes discard its result and the finally block immediately refreshes again. These correctness improvements close the earlier UI race concerns.
HTTP status reads actual SslConnectionFactory needClientAuth and connector local ports, so a configured truststore alone is not reported as active mTLS. Only allowlisted service metadata is returned. However, the alternate member-listener mutation and per-element batch validation remain exactly the peer-reported paths below. Good UI behavior cannot close those server contracts.
Before:
// submitJobs submitted each parsed entry without the new restore-source guard.
return submitJobInternal(decryptConfig, requestParams, seaTunnelServer, nodeEngine.getNode());After:
// Still inside stream.map, not a whole-batch preflight:
validateCheckpointRestoreRequest(requestParams);
return submitJobInternal(decryptConfig, requestParams, seaTunnelServer, nodeEngine.getNode());
// The new mutation is also registered outside Jetty:
} else if (uri.startsWith(CONTEXT_PATH + REST_URL_UPDATE_LOCAL_MEMBER_TAGS)) {
handleUpdateLocalMemberTags(httpPostCommand);
}Current CI correction: The earlier review cited a different head and TiDB failure. This head has Build 44965907839, completed/cancelled, with JDK 11 jdbc-connectors-it-part-7 failed and the JDK 11/17 Ubuntu unit-test lanes cancelled. These are the current gates; the old TiDB diagnosis is not carried forward as the cause of this run. The job log identifies JdbcOpenGaussIT setup failing with JDBC-IT-02 / permission denied for schema public, before its table-creation setup finishes. This PR does not change that fixture. Latest fetched dev still uses gaussdb/public with no corresponding schema-grant correction, so simply syncing that base is not a demonstrated fix. Please have the shared fixture permissions corrected in its owning change, then rerun this lane and the cancelled unit lanes at the updated head; avoid unrelated UI dependency patches. Cancelled lanes are not passes or proof that fork workflows are disabled.
1.2 Compatibility
Partially incompatible behavior, documented in both migration guides: explicit restore from an active source is now rejected, and legacy blank IDs are rejected before submission. Existing option names/defaults, flat tag payload interpretation and checkpoint/row serialization remain unchanged. Structured UUID+tags requests use the new endpoint; a legacy flat map containing keys named uuid or tags is still a flat map. New monitor metadata is additive, but its visibility and replacement semantics must be documented as described by the peer findings.
1.3 Performance and side effects
Read-only metadata stays bounded by the existing cluster/job responses. The UI uses one visibility-aware poll at a time, disposes timers and rejects stale results; per-job action guards avoid duplicate lifecycle POSTs. Tag mutation copies/replaces a member map and logs counts only. Three service instances do not share a concurrency/version gate, hence peer F8. Restore adds a synchronous master RPC before submission, so master availability/error handling is material. Disabling the client mutation timeout avoids ambiguous retries but means server completion remains the authoritative result. No new per-record sink/source work or checkpoint wire format is added.
1.4 Errors, logging, and findings
+1 to @SEZ9 peer F1/F3: Alternate-listener tag mutation and incorrect authentication documentation
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:42. - Description and risk: NodeExtension.java:106-113 registers this processor independently of JettyService.java:195-201. Configuring Jetty basic auth or mTLS does not cover this route, although the docs say the new endpoint is protected.
- Best improvement: Remove the new mutation from the alternate listener or enforce an equivalent explicit access policy there; document both listener boundaries and add the corresponding negative IT.
- Severity: High; blocking: true.
- Previously raised: Yes, @SEZ9 review; existing peer identifiers retained, no duplicate Daniel numbering.
+1 to @SEZ9 peer F5: A later invalid restore entry rejects an already-partially-submitted batch
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:499. - Description and risk: submitJobs validates inside stream.map just before each submit. A valid first entry may launch before the next active-source entry throws; the caller receives one 400 without the earlier accepted job result.
- Best improvement: Preflight the whole batch before any submit, or define and return per-entry acceptance results rather than a whole-request failure.
- Severity: High; blocking: true.
- Previously raised: Yes, @SEZ9 review; existing peer identifiers retained, no duplicate Daniel numbering.
+1 to @SEZ9 peer F2/F6: Make restore validation errors operator-facing without failing open
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:595. - Description and risk: Master lookup/join failures reach the generic 500 message, and RestoreMode.valueOf at line 541 exposes the enum implementation name for unsupported input.
- Best improvement: Retain fail-closed behavior, preserve the internal cause, provide a concise master-unavailable/retry message and list supported restore modes for invalid values.
- Severity: Medium; blocking: true.
- Previously raised: Yes, @SEZ9 review; existing peer identifiers retained, no duplicate Daniel numbering.
+1 to @SEZ9 peer F4/F7/F8: Finish the monitor visibility and replacement/concurrency contract
- Location:
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1471. - Description and risk: Known-member monitor records now include full tags, UUID and locality, while the endpoint section does not define them. Updates replace the whole tag map without a version check; independent clients can overwrite changes.
- Best improvement: Document the additive fields and tag visibility/no-secrets rule in EN/ZH. Choose and test optimistic concurrency or explicitly accepted last-write-wins replacement; make that choice clear in the UI/docs.
- Severity: Medium; blocking: true.
- Previously raised: Yes, @SEZ9 review; existing peer identifiers retained, no duplicate Daniel numbering.
Community reconciliation: +1 to @SEZ9's existing findings F1-F8. I am not duplicating those points under new Daniel issue numbers. F1/F3 share one alternate-listener/authentication-and-documentation cause; F5 is partial batch acceptance. F2/F6 concern actionable restore errors; F4 is the monitor response documentation; F7 requires an explicit public-metadata/no-secrets tag contract; F8 needs an explicit replacement/concurrency contract. @SEZ9 has not approved these unresolved points. For F2, I would keep lookup failure fail-closed and wrap it as an actionable retryable master-unavailable response with the cause preserved; treating an unavailable master as an unknown/terminal job would bypass the guard. For F7, the count-only audit comment is a prudent logging rule, not evidence that arbitrary tags are credentials: document that monitor readers see tag values and forbid secrets there. For F8, optimistic concurrency is one solution; an explicit last-write-wins whole-replacement contract and suitable UX is the smaller alternative if maintainers accept it.
2. Code quality
2.1 Conventions
Reviewed all changed files for license, imports, naming, core-method and state-field comments. No additional convention blocker found.
2.2 Test coverage and stability
Stability rating: Stable. Read all changed server UTs, real REST/basic-auth ITs and Vue tests. The real running-source restore test waits for RUNNING, asserts the guard-specific 400, then stops in finally; terminal-source restore accepts only success or the specific absent-checkpoint error. RestApiIT creates fresh nodes in BeforeEach, so its tag changes do not establish a cross-test-order defect. BasicAuthenticationIT proves Jetty 401/credentialed behavior only; the separate Hazelcast-port tag IT actually demonstrates the other listener. Unit cases cover local UUID mismatch, non-string structured values, legacy flat-map compatibility, content-free auditing and HTTP metadata without secrets. Vue tests use controlled promises/fake timers, restore timer state and unmount wrappers; they cover late responses, stale polls, exact tag preservation, ambiguity/duplicate handling and route-prefilled IDs. Stability: no new high-risk timing/resource pattern found by inspection. Missing acceptance remains an authentication denial on every newly exposed route and a mixed-validity batch that proves no earlier submission occurs on rejection. No local test or browser run was performed.
2.3 Documentation
Read all six EN/ZH REST, Web UI and incompatible-change updates. They consistently cover new routes, explicit restore source IDs, terminal-source restrictions and effective HTTP metadata. Remaining peer F3/F4/F7/F8 documentation gaps are real: Jetty authentication language does not describe the independent member listener; the monitor section omits the new member fields; tag visibility and last-write-wins replacement need explicit operator guidance. The default open deployment warning does not make a protected Jetty deployment protect a different listener.
3. Architecture
3.1 Change location
Keep Web UI orchestration in UI services and shared restore/tag correctness in the server service boundary. This is a functional operator feature with targeted server safeguards; fixing only a browser control cannot enforce an endpoint-wide contract.
3.2 Maintainability
Keep the behavior, lifecycle ownership, and failure contract together. Keep Web UI orchestration in UI services and shared restore/tag correctness in the server service boundary. This is a functional operator feature with targeted server safeguards; fixing only a browser control cannot enforce an endpoint-wide contract.
3.3 Extensibility
Prefer the existing component boundary and tests over unrelated shared abstractions.
3.4 Upgrade impact
Partially incompatible behavior, documented in both migration guides: explicit restore from an active source is now rejected, and legacy blank IDs are rejected before submission. Existing option names/defaults, flat tag payload interpretation and checkpoint/row serialization remain unchanged. Structured UUID+tags requests use the new endpoint; a legacy flat map containing keys named uuid or tags is still a flat map. New monitor metadata is additive, but its visibility and replacement semantics must be documented as described by the peer findings.
4. Findings summary
Completeness check: All changed files and affected entry/failure paths were reviewed; configuration/serialization compatibility, test failure capability and stability, documentation/examples, change ownership, and current CI/conflict/review gates are covered above. No unreviewed source scope is claimed complete.
| # | Finding | Location | Severity |
|---|---|---|---|
| Peer F1/F3 | Alternate-listener tag mutation and incorrect authentication documentation | seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpPostCommandProcessor.java:42 |
High |
| Peer F5 | A later invalid restore entry rejects an already-partially-submitted batch | seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:499 |
High |
| Peer F2/F6 | Make restore validation errors operator-facing without failing open | seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/JobInfoService.java:595 |
Medium |
| Peer F4/F7/F8 | Finish the monitor visibility and replacement/concurrency contract | seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java:1471 |
Medium |
5. Merge recommendation
Merge after fixes
Blocking items: Existing peer F1/F3 and F5, plus the documented F2/F6 and F4/F7/F8 contract closures above. Current-head CI and write-capable maintainer review remain independent requirements.
Non-blocking suggestions: None beyond the validation limits above.
Overall: the operator workflow is useful, but the existing peer server/contract blockers remain. No unrelated dependency patch or broad engine redesign is required. Daniel has READ permission, so this COMMENT cannot dismiss historical requested changes or satisfy a write-capable maintainer approval gate.
CI and repository state: Signal pull request update: SUCCESS; Build: FAILURE; Build: cancelled. GitHub reports BLOCKED / REVIEW_REQUIRED.
Verification: Reviewed all changed files and the referenced call sites at 15e7bc0e0a5187c1c77f518d49ee7979505d6ce6 against merge base efecb179a100d0a621566ba1b0c015357f55c168. git diff --check passed. I did not build, run tests, or execute SeaTunnel locally.
Review time: 2026-11-23T08:54:00.873254-05:00
Local evidence: git fetch obtained head 15e7bc0e0a5187c1c77f518d49ee7979505d6ce6; git merge-base returned efecb179a100d0a621566ba1b0c015357f55c168; git diff --stat reports 55 files changed, 4384 insertions(+), 130 deletions(-). git show and source searches were used for the entry points above. No local build, unit test, E2E, Docker run or service startup was executed.
Purpose
Closes #11579.
This PR adds common Zeta Web UI operation controls while keeping the UI as a thin client over Zeta REST APIs.
Changes
restoreMode/restoreSourceJobIdcontract.devin [Feature][Zeta] Show worker resource snapshots in the Web UI #12398.restoreModesubmission while the source job has not reached an end state, and fail non-numericrestoreSourceJobIdvalues with a clear400. The submit panel now shows the engine's failure message so operators see why a restore was refused./system-monitoring-information, the restore guard, and REST E2E for the two new endpoints.Compatibility and safety
/update-tagsretains its original legacy flat-map request contract exactly; no key is reserved, and non-string values still convert to strings for compatibility. Only the new/update-local-member-tagsendpoint rejects non-string tag values with HTTP 400./update-local-member-tagsendpoint with{ uuid, tags }. The UUID must match the node serving that REST request; remote worker rows stay read-only. Both new endpoints sit on the same servlet context as every other endpoint, so basic auth and mTLS apply unchanged.mutualTlsEnabledreflects the effective Jetty SSL context.isStartWithSavePoint+jobIdpath is untouched; the restore-source guard applies only to the explicitrestoreModecontract./system-monitoring-informationentries gain additiveuuid,localMemberandtagsfields, including for members that timed out, on top of the bounded fan-out introduced in [Fix][Zeta] Render Zeta health metrics with a stable locale and bound REST fanout #12161.Review follow-ups addressed in the current head
/update-tagsflat example uses plain tag keys and states that no key is reserved.RestApiITexercises/http-service/statusover real Jetty HTTP and/update-local-member-tagsover both the Jetty and Hazelcast REST ports, including the UUID mismatch rejection./update-local-member-tagssection with request, response and error examples, including non-string tag values; unit and REST regression cases now cover that rejection without changing legacy/update-tagscoercion.No checkpoint foundis returned when the state was cleaned up. The Web UI guide now states both operator-visible outcomes. Covered byJobInfoServiceRestoreGuardTestand REST submit tests.8080/8443) for/http-service/status.Verification
apache/devat403efeee0b3without a reported merge conflict.e86481f3500c37a627f6e2516b986a0ea40940b0, scoped./mvnw -pl seatunnel-engine/seatunnel-engine-ui spotless:apply -nsu -Dmaven.gitcommitid.skip=true,npx --yes prettier@3.2.5 --checkfor the three changed UI files, andgit diff --checkpassed.requestFailureMessageexport in the Vitest service mock, and asserts the separate master (1200) and worker (1460) table widths. It addresses the three UI failures identified in the first review of this PR.Buildmust run and pass before this PR can be considered merge-ready; no current-head functional result is claimed here.Open follow-up
🤖 Generated with Claude Code