aglinxinyuan opened a new pull request, #4572: URL: https://github.com/apache/texera/pull/4572
### What changes were proposed in this PR? Add `WorkflowExecutionSpec` covering the lifecycle and lookup contract of `WorkflowExecution` (`amber/src/main/scala/org/apache/texera/amber/engine/architecture/controller/execution/WorkflowExecution.scala`): - `initRegionExecution` creates a new `RegionExecution`; throws on re-init for the same region id - `hasRegionExecution` reflects init state - `getRegionExecution` throws `NoSuchElementException` for unknown ids - `getAllRegionExecutions` preserves insertion order (LinkedHashMap) - `restartRegionExecution` behaves like a fresh init when no prior region exists, and replaces a completed region with a fresh execution - `getRunningRegionExecutions` excludes completed regions - `getState` returns UNINITIALIZED on empty and COMPLETED when every initialized region is completed - `getLatestOperatorExecutionOption` returns None when none exists and the latest match across regions otherwise (uses reference identity because `OperatorExecution` is a no-field case class) ### Any related issues, documentation, discussions? Closes #4571 ### How was this PR tested? `sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.controller.execution.WorkflowExecutionSpec"` — 12/12 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]
