You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SparkApplication spec.failureRetries and spec.retryInterval have no effect #3330
✋ I have searched the open/closed issues and my issue is not listed.
SparkApplicationSpec documents two retry fields in api/v1beta2/sparkapplication_types.go:
failureRetries: "the number of times to retry a failed application before giving up"
retryInterval: "the unit of intervals in seconds between submission retries"
On master (5a95d68) nothing outside the generated code (deepcopy, OpenAPI, Python models, API docs) reads either field. Retries are decided only from spec.restartPolicy (onFailureRetries, onFailureRetryInterval, onSubmissionFailureRetries, onSubmissionFailureRetryInterval), for example in pkg/util/sparkapplication.go. So setting spec.failureRetries or spec.retryInterval is accepted by the API server and changes nothing.
I found this by reading the code, not on a live cluster.
The only hits for Spec.FailureRetries / Spec.RetryInterval are the field definitions; every other hit is one of the RestartPolicy.On* fields.
A manifest like this is accepted and the two fields are ignored:
spec:
failureRetries: 3retryInterval: 10
Expected behavior
Either the fields do what their descriptions say, or the API docs say they are deprecated and point to spec.restartPolicy.
Actual behavior
The fields are part of the CRD schema and the API reference with a working description, but the controller never reads them.
Environment & Versions
Kubernetes Version: n/a (found by reading the code)
Spark Operator Version: master at 5a95d68 (v2.6.0)
Apache Spark Version: n/a
Additional context
Which direction do you prefer: mark both fields as deprecated in the API docs (pointing to restartPolicy), or wire them up? I can send the PR for whichever you choose. Since it touches api/, I did not want to open a PR without asking first.
Thanks for the report @bhavishyajain545, I can confirm this on current master (1892648). The only references to spec.failureRetries and spec.retryInterval are the type definitions and generated code, nothing in the controller reads them. Retry behaviour has lived under spec.restartPolicy (onFailureRetries, onFailureRetryInterval, onSubmissionFailureRetries, onSubmissionFailureRetryInterval) for a long time now.
My suggestion would be to deprecate rather than wire them up. Wiring them would give us two overlapping ways to configure the same thing with unclear precedence, and would change behaviour for anyone who has these set today and is (unknowingly) relying on them being ignored. Removing them outright would be a breaking change in v1beta2.
We did the same thing for client deploy mode in #3270, so the pattern is already there:
add a // Deprecated: comment on both fields in api/v1beta2/sparkapplication_types.go pointing to restartPolicy
extend deprecationWarnings() in internal/webhook/sparkapplication_validator.go to return a warning when either field is set
regenerate CRDs/api-docs and add a release note
remove the fields in the next API version
Happy for you to take the PR if you'd like. Would be good to get another maintainer 👍 on the direction first so that the effort on the pr is not wasted
Thanks for confirming, and for the pointer to #3270. Deprecating makes sense to me, for the reasons you gave.
I'll wait for a maintainer to confirm the direction and then send the PR following the #3270 pattern: // Deprecated: comments on both fields pointing to restartPolicy, a warning from deprecationWarnings() when either field is set, regenerated CRDs and API docs, and a release note.
I'd like to work on this. Plan: either wire failureRetries and retryInterval into the retry logic when restartPolicy doesn't set them, or, if you'd rather keep restartPolicy as the single source, mark both fields deprecated in the API docs and CRD. I'm happy to go whichever way you prefer, with tests for it. Could a maintainer assign it to me?
Activity
github-actions commentedon Nov 21, 2026
🎉 Welcome to the Kubeflow Spark Operator! 🎉
Thanks for opening your first issue! We're happy to have you as part of our community 🚀
Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏
vikas-saxena02 commentedon Nov 28, 2026
Thanks for the report @bhavishyajain545, I can confirm this on current master (1892648). The only references to
spec.failureRetriesandspec.retryIntervalare the type definitions and generated code, nothing in the controller reads them. Retry behaviour has lived underspec.restartPolicy(onFailureRetries,onFailureRetryInterval,onSubmissionFailureRetries,onSubmissionFailureRetryInterval) for a long time now.My suggestion would be to deprecate rather than wire them up. Wiring them would give us two overlapping ways to configure the same thing with unclear precedence, and would change behaviour for anyone who has these set today and is (unknowingly) relying on them being ignored. Removing them outright would be a breaking change in v1beta2.
We did the same thing for client deploy mode in #3270, so the pattern is already there:
// Deprecated:comment on both fields inapi/v1beta2/sparkapplication_types.gopointing torestartPolicydeprecationWarnings()ininternal/webhook/sparkapplication_validator.goto return a warning when either field is setHappy for you to take the PR if you'd like. Would be good to get another maintainer 👍 on the direction first so that the effort on the pr is not wasted
/cc @nabuskey @tariq-hasan @vjanelle
bhavishyajain545 commentedon Nov 28, 2026
Thanks for confirming, and for the pointer to #3270. Deprecating makes sense to me, for the reasons you gave.
I'll wait for a maintainer to confirm the direction and then send the PR following the #3270 pattern:
// Deprecated:comments on both fields pointing torestartPolicy, a warning fromdeprecationWarnings()when either field is set, regenerated CRDs and API docs, and a release note.rahulsjha commentedon Nov 28, 2026
I'd like to work on this. Plan: either wire
failureRetriesandretryIntervalinto the retry logic whenrestartPolicydoesn't set them, or, if you'd rather keeprestartPolicyas the single source, mark both fields deprecated in the API docs and CRD. I'm happy to go whichever way you prefer, with tests for it. Could a maintainer assign it to me?