aglinxinyuan opened a new pull request, #4740:
URL: https://github.com/apache/texera/pull/4740
### What changes were proposed in this PR?
Add `WorkerStateManagerSpec` covering the state-transition graph hardcoded
by `WorkerStateManager`
(`amber/src/main/scala/org/apache/texera/amber/engine/common/statetransition/WorkerStateManager.scala`):
- Default initial state is UNINITIALIZED; explicit initial state is honored
- Allowed: UNINITIALIZED → READY, READY → {RUNNING, PAUSED, COMPLETED},
RUNNING → {PAUSED, COMPLETED}, PAUSED → RUNNING
- COMPLETED is terminal (rejects forward transitions; self-transition is a
no-op per `StateManager.transitTo` semantics)
- TERMINATED is absent from the graph and rejected from any state
- PAUSED → COMPLETED is rejected (only RUNNING → COMPLETED is permitted)
### Any related issues, documentation, discussions?
Closes #4739
### How was this PR tested?
`sbt "WorkflowExecutionService/testOnly
org.apache.texera.amber.engine.common.statetransition.WorkerStateManagerSpec"`
— 9/9 tests pass.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.7)
--
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]