Dennis-Mircea opened a new pull request, #1240:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1240
## What is the purpose of the change
This PR fixes the stateless job recovery and health-check restart behavior
under HA.
The operator previously required HA metadata for every recovery and health
check restart, including stateless jobs, so a stateless job whose per-job HA
ConfigMap is gone failed with `RestoreFailed` instead of being redeployed.
The requirement now depends on whether usable metadata exists: a stateless
job keeps restoring from its latest checkpoint while the HA metadata holds one,
and is redeployed from empty state only once the metadata is gone.
Supersedes #1147, which reported the health-check trigger and proposed never
using the last-state restore for stateless jobs. This discards the checkpoint
even when the metadata is still intact, and leaves the per-job HA ConfigMap
orphaned, because deploy skips cluster cleanup when the JobManager is already
missing.
## Brief change log
- `ApplicationReconciler#reconcileOtherChanges` derives `requireHaMetadata`
through the new `requireHaMetadataForResubmit`: HA enabled, and either a
stateful upgrade mode or HA metadata available. Non-stateless jobs and
deployments without HA behave as before.
- Docs: the `stateless` upgrade-mode bullet states that recovering a missing
deployment and restarting an unhealthy one are failovers that restore from the
latest checkpoint while HA metadata exists. The self-healing sections and their
limitations entry no longer claim HA is required for stateless jobs, and the
leader-election limitation covers both triggers. Mirrored to `docs/content.zh`.
## Verifying this change
The change can be verified by the new tests added.
The change was also verified manually on minikube on the cases presented in
the JIRA.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changes to the `CustomResourceDescriptors`:
no
- Core observer or reconciler logic that is regularly executed: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
<!--
If generative AI tooling has been used in the process of authoring this PR,
please
change the checkbox below to `[X]` followed by the name of the tool, and
uncomment the
"Generated-by" line. See the ASF Generative Tooling Guidance for details:
https://www.apache.org/legal/generative-tooling.html
You are responsible for the quality and correctness of every change in this
PR
regardless of the tooling used. Low-effort AI-generated PRs will be closed.
See
AGENTS.md for the full guidance.
-->
- [ ] Yes (please specify the tool below)
<!--
Generated-by: [Tool Name and Version]
-->
--
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]