Dennis-Mircea opened a new pull request, #1267:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1267

   ## What is the purpose of the change
   
   This PR implements 
[FLINK-41725](https://issues.apache.org/jira/browse/FLINK-41725) by fixing its 
two child issues, 
[FLINK-40384](https://issues.apache.org/jira/browse/FLINK-40384) and 
[FLINK-41710](https://issues.apache.org/jira/browse/FLINK-41710), one commit 
each. They only show up together: the savepoint history cleanup evicted the 
periodic snapshot that had just been created, and deleting an `IN_PROGRESS` 
snapshot could never complete.
   
   With this change, history cleanup becomes state-aware, so the count rule no 
longer evicts an in-flight snapshot while the age rule still removes a stale 
one. Deleting an in-progress snapshot now observes the savepoint before 
deciding, disposes it once complete, and is bounded by a new cleanup timeout 
instead of waiting forever.
   
   This PR supersedes the #1185 PR.
   
   ## Brief change log
   
     - The `SnapshotObserver#getFlinkStateSnapshotsToCleanUp` is updated. The 
age rule applies to any state, so a stale pending or in-progress snapshot is 
removed. The count rule applies to terminal states only (`COMPLETED`, `FAILED`, 
`ABANDONED`), so in-flight snapshots neither count towards the maximum nor get 
evicted by it. The newest completed snapshot is always retained, the newest one 
if none completed.
     - `The StateSnapshotObserver#observeBeforeCleanup` was created, and is 
called from `FlinkStateSnapshotController#cleanup`. This new method now 
observes an `IN_PROGRESS` snapshot before the cleanup decides, so a completed 
savepoint is disposed and a failed one is dropped without disposal.
     - The `StateSnapshotReconciler#cleanup` is bounded by the new 
`kubernetes.operator.snapshot.cleanup.timeout` (default 1h, measured from the 
deletion timestamp, zero disables). After that, the resource is released, and a 
`CleanupTimeout` warning event names the savepoint path that may be left behind.
     - Documentation is updated with: snapshot management cleanup semantics and 
the new timeout, the `CleanupTimeout` event, regenerated config tables.
   
   ## Verifying this change
   This change can be verified by the newly added UTs + was verified manually 
on Minikube.
   
   ## 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: yes
   
   ## 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.
   -->
   
   - [X ] Yes (please specify the tool below)
   
   Generated-by: Claude Opus 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]

Reply via email to