wgzhao commented on PR #12904:
URL: https://github.com/apache/seatunnel/pull/12904#issuecomment-6818047360
@SEZ9 thanks for the recheck and for keeping the remaining findings
explicit. The head is unchanged at `fb542b3e9`; no code changes since the last
walkthrough.
**F2/F4** — what you describe is what the code does. `_poll_job_status`
(`seatunnel-cli/seatunnel_cli/cli.py:1360-1400`): an explicit `found: false`
returns immediately (`:1375-1382`); a non-dict body is treated as status-less
(`status = info.get("jobStatus") if isinstance(info, dict) else None`, `:1384`)
and is tolerated once (`:1388-1390`); the second consecutive one prints the
response-shape/master-failover message (`:1391-1396`) and never the "job is not
known" wording; a valid `jobStatus` resets the flag (`:1398`); transport
exceptions are caught by the poller's `except Exception` and neither increment
nor reset it. The scripted sequences are in
`seatunnel-cli/tests/test_diagnose_cli.py:331-357` — `new-server-marker`,
`old-server-status-less`, `non-dict-body-then-marker`,
`status-less-good-status-less-then-marker` — executed by
`test_polling_stops_when_the_job_is_not_known` (`:358`); the single-tolerance
recovery is `test_polling_recovers_from_one_status_less_response`
(`:385-404`). The one-shot `diagnose` path has no tolerance on purpose, since
there is no polling window.
**F5** — this is not applicable to the post-submit path: `_poll_job_status`
contains no "id may be wrong" wording. The only occurrence is `run_diagnose`'s
HTTP 404 branch (`cli.py:1650-1664`, text at `:1659`), a one-shot command where
the id is user-supplied and the server rejected it for the configured API base,
so "evicted from the finished-job history, or the id may be wrong" is an
accurate hint there. No rationale is needed for keeping it in the poller,
because it does not exist there — please close F5 as not-applicable.
**F1/F3** — documented in EN and ZH for all three handlers:
- v1 `/hazelcast/rest/maps/job-info/:jobId`:
`docs/en/engines/zeta/rest-api-v1.md:402-439` (ZH `:422-457`)
- v1 `/hazelcast/rest/maps/running-job/:jobId`: EN `:520-533` (ZH `:514-527`)
- v2 deprecated `/running-job/:jobId`:
`docs/en/engines/zeta/rest-api-v2.md:809-822` (ZH `:796-809`)
- v2 `/job-info/:jobId`: `rest-api-v2.md:678-732` (ZH `:669-719`)
**F6/F8** — in scope and implemented in
`seatunnel-engine/seatunnel-engine-ui/src/views/jobs/detail.tsx:95-155`:
`res.found === false` sets `missing` (`:98-105`); a status-less response is
tolerated once and a repeat becomes missing (`:107-118`); the catch sets
`loadError` before the first successful load (`:139-146`) and otherwise keeps
the loaded page and warns once per error streak (`:147-152`). `renderMissing`
(`:609-619`) is the whole page while `missing`/`loadError` is set (`:793`) and
passes `{ jobId }` into `t('detail.notFound.description', ...)`.
`seatunnel-engine/seatunnel-engine-ui/src/tests/detail.spec.ts` covers
`found:false` (`:162`), two status-less responses (`:198`), recovery from one
(`:228`), initial-load rejection (`:270`), post-load rejection (`:294`) and
warning dedupe (`:344`).
**F7** — `job_exists` does not return `False` for a non-dict payload; it
raises `TypeError`
(`tools/seatunnel-python-sdk/seatunnel/endpoints/jobs.py:99-103`) before the
`found` check (`:104-105`), keeping "server said absent" separate from
"unexpected response shape". `test_sdk.py` covers the explicit marker, the
old-server fallback and the non-JSON case. The docstring describes the fallback
but not yet the raise. I'd rather not push a docstring-only commit at this
point because it would move the SHA and invalidate the current CI/approval; if
you want it recorded in code, I can add the one-line `Raises:` note in a
follow-up.
Nothing else has changed: @DanielLeens's approval on `fb542b3e9` stands and
CI is green on this SHA, so the remaining gate is a write-capable committer
approval.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]