danielnadean opened a new pull request, #11570:
URL: https://github.com/apache/seatunnel/pull/11570
What problem this PR solves
The existing `/finished-jobs` endpoint is designed for detailed history
browsing. It loads job DAG
and metrics data and has no incremental cursor, so polling it across a large
retained job history is
unnecessarily expensive for monitoring systems that only need terminal state
changes.
What is changed
- Add `GET /jobs` as a lightweight terminal-job change feed.
- Support `start=latest|beginning`, an opaque continuation cursor, optional
terminal `status`, and
a bounded `limit` from 1 to 1000.
- Read at most `limit` exact sequence keys per request, independent of total
retained job count.
- Persist only compact monitoring fields and keep detailed DAG/metrics
behind `/job-info/{jobId}`.
- Add retention-head handling and `cursorReset=true` when a cursor falls
behind retained history.
- Write authoritative finished-job state first, then deliver the monitoring
sidecar through a
bounded durable outbox with durable/local overflow and dropped-record
telemetry.
- Add English and Chinese REST API documentation, including cursor,
retention, delay, capacity,
and degradation semantics.
- Add service, route-regression, null/boundary, stale-cursor, and
failure-injection tests.
Example
```text
GET /jobs?start=latest&status=FAILED&limit=100
GET /jobs?cursor=<opaque-cursor>&limit=100
```
Validation
- `./mvnw -pl
seatunnel-engine/seatunnel-engine-common,seatunnel-engine/seatunnel-engine-server
spotless:apply spotless:check`
- Independent maintainer review: PASS, with no P1/P2 blockers.
- Local compilation, unit tests, and E2E were not run under the current
local validation policy;
GitHub CI is expected to provide those build and test gates.
--
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]