dongjoon-hyun opened a new pull request, #954: URL: https://github.com/apache/spark-kubernetes-operator/pull/954
### What changes were proposed in this pull request? This PR adds `status.currentState.suspendReason` (`SpecSuspend` or `KueueEviction`), which is set on `Suspended` states, and uses it in `AppSuspendStep` and `ClusterSuspendStep` instead of the prefix of the state message. - `SuspendReason` and the nullable field in `BaseState`. The existing 3-arg constructor is kept. - `isSuspendedByEviction` only checks the reason of the current state. The cluster's walk through the history is removed. The stuck-pods state keeps the reason of the state before it. - A `Suspended` state without a reason is treated as `SpecSuspend`. - Regenerate the `v1` CRDs (`v1beta1` is frozen), and document the field in `docs/spark_custom_resources.md`. ### Why are the changes needed? The message prefix became a control protocol, as pointed out in the review of apache/spark-kubernetes-operator#952. If the wording changes, a resource suspended by an eviction by an older version is taken for a manual suspend, so `keepKueueWorkload()` is skipped and the remaining requeue backoff is ignored. No message-prefix fallback is needed. `Suspended` is not in 1.0.0, and the migration guide already requires replacing the CRDs for 1.1.0, which ships the new field. ### Does this PR introduce _any_ user-facing change? No for the released versions. `suspendReason` is a new field within the unreleased 1.1.0 changes, and the state messages are unchanged. ### How was this patch tested? Pass the CIs. `gradle build` passes locally, with new and updated tests in `ApplicationStatusTest`, `ClusterStatusTest`, `AppSuspendStepTest`, `ClusterSuspendStepTest` and `ClusterInitStepTest`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Sonnet 5.5 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
