DanielLeens opened a new issue, #12124: URL: https://github.com/apache/seatunnel/issues/12124
## Description This is a hardening task. There is no current failure caused by the `JobStatus` enum order; the goal is to make the existing coupling explicit and guarded. Verified at `dev` commit `97d461bc0773399d632fd078735736ecd44f5f0b`: - Internal RPC transports the raw ordinal: `GetJobStatusOperation.java:81` (`response = future.get().ordinal();`). Clients decode it with `JobStatus.values()[ordinal]` (`ClientJobProxy.java:154`, `JobClient.java:121`); REST services decode the same RPC result (`rest/service/BaseService.java:386`, `rest/service/JobInfoService.java:360`) and then emit text (`BaseService.java:437`, `jobStatus.toString()`). The external HTTP API is therefore textual; the coupling is the internal RPC/client contract. - Control flow relies on enum order: `PhysicalPlan.java:207` and `:254` use `jobStatus.ordinal() <= JobStatus.PENDING.ordinal()` in cancel/stop; `:105` and `:115` index a timestamp array by ordinal; `diagnostic/JobRuntimeDiagnostics.java:134` consumes that array by ordinal. - Tests: `ClusterFaultToleranceIT.java:121-122` and `ClusterFaultToleranceTwoPipelineIT.java:264-265` compare `getJobStatus().ordinal() >= JobStatus.RUNNING.ordinal()`; `JobStatusTest` covers locale conversion only. No test pins the ordinal table. ## Expected outcome - A unit test that pins the exact `JobStatus` ordinal table so any reorder or insertion fails loudly. - Replace ordinal range comparisons in `PhysicalPlan` with explicit state sets. - A name-based, versioned RPC transport is a separate design item and is not required for this issue. -- 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]
