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

   Yes, I am contributing this change to Apache SeaTunnel.
   
   ### Purpose of this change
   
   Refs #12785.
   
   `GET /job-info/{jobId}` returned HTTP 200 with only `jobId` when the id was 
neither running nor
   retained in finished-job history. Clients could not distinguish that from a 
successful lookup,
   and a status-code-based check treated a missing job as healthy.
   
   Per the compatibility proposal accepted in #12785, this PR keeps HTTP 200 
and successful
   payloads unchanged, and adds an explicit `found: false` marker for unknown 
or expired ids.
   
   ### Changes
   
   - Server: `JobInfoService` adds `found: false` to the unknown-id response; 
running and finished
     payloads are unchanged. Adds `RestConstant.FOUND`.
   - Web UI: detects `found: false` (and the status-less response from older 
servers), shows a
     missing/expired-job state, and stops polling before parsing timestamps.
   - Python SDK: documents the response shape and adds `job_exists()` with a 
`jobStatus` fallback
     for older servers.
   - CLI: `--diagnose` prefers the explicit marker and keeps the status-less 
fallback; post-submit
     polling stops with a clear message instead of swallowing an absent job.
   - EN/ZH REST API docs, job lifecycle troubleshooting, and Python SDK docs 
updated.
   - `/jobs/checkpoints/{jobId}` is intentionally out of scope.
   
   ### Compatibility
   
   - Additive response field; HTTP status and successful payloads are unchanged.
   - Older engines omit `found`; clients fall back to the presence of 
`jobStatus`.
   
   ### Release note
   
   `/job-info/{jobId}` now returns `{"jobId": "...", "found": false}` for 
unknown or expired ids.
   Existing successful responses are unchanged; clients should check `found` 
(or `jobStatus` when
   talking to older engines).
   
   ### Tests
   
   - Server: `JobInfoServiceNullSafetyTest` — 7 tests (finished payloads omit 
`found`, unknown id
     returns `found: false`).
   - UI: `detail.spec.ts` — 3 tests, including `found: false` and status-less 
old-server responses,
     and that polling stops.
   - Python SDK: `test_sdk.py` — 10 tests, including `job_exists` for new and 
old response shapes.
   - CLI: `test_diagnose_cli.py` — 28 tests, including the found marker and 
polling stop.
   - `spotless:check` and the engine-server `verify` pass; the UI `vue-tsc` 
type-check passes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

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

Reply via email to