LuckysHorizon opened a new pull request, #13136: URL: https://github.com/apache/seatunnel/pull/13136
### Purpose of this pull request Fixes #13130. Savepoint restores reuse the job ID. `CoordinatorService.getJobInfo()` looked up retained job history before the current running or pending attempt, so after a same-ID restore the realtime metrics service read the previous attempt's `engine.observability` settings. The result was that `/job-info` reported `enabled=true` while `/metrics/realtime/jobs/<id>/edges` still reported `enabled=false` with an empty `edges` array. This PR changes the lookup order in `getJobInfo()` to prefer the current running or pending attempt, and keeps the existing history and distributed-metadata lookups as fallbacks. ### Does this PR introduce _any_ user-facing change? Yes. After a job is restored from a savepoint with an updated configuration, realtime observability uses the current attempt's `enabled`, `bucket_ms` and `retention_minutes` values. REST response shapes, configuration keys and defaults, and savepoint formats are unchanged. Jobs that are not restored behave as before. ### How was this patch tested? - Added a regression test in `CoordinatorServiceTest`. It fails before the fix with stale `enabled=false` metadata and passes after. - Added a test that `getJobInfo()` still falls back to finished-job history when no current attempt exists. - Focused tests: 3 passed, 0 failures. - Full `seatunnel-engine-server` test suite: 40 tests, 0 failures, 0 errors, 2 skipped. - `spotless:check` passed. Not run: root `mvn verify` and the engine e2e suites. ### Check list * [x] No new JAR packages or dependencies, so no License Notice is needed. * [ ] Documentation: not updated. Behavior now matches the documented intent, and no new option was added. * [x] No incompatible changes, so `incompatible-changes.md` is not updated. * [x] Not connector code, so no connector files are affected. -- 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]
