Skip to content

Fix: Wait for job cancellation before updating cluster components - #1040

Open
lofifnc wants to merge 1 commit into
spotify:masterfrom
lofifnc:fix/wait-for-terminal-update-cancellation
Open

Fix: Wait for job cancellation before updating cluster components#1040
lofifnc wants to merge 1 commit into
spotify:masterfrom
lofifnc:fix/wait-for-terminal-update-cancellation

Conversation

@lofifnc

@lofifnc lofifnc commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What changed

Delay cluster updates after a stop-with-savepoint operation until Flink reports that the job has reached a terminal state.

A completed savepoint does not mean the asynchronous cancellation has finished. Previously, the operator could mark the update as ready immediately after the savepoint succeeded and replace
cluster components while the job was still CANCELLING.

This could interrupt Flink’s high-availability metadata cleanup and leave stale HA ConfigMaps behind.

The operator now:

  • keeps the update in the Preparing state after the final savepoint completes;
  • continues observing the job while Flink reports CANCELLING;
  • proceeds with component replacement only after the job reaches a terminal state;
  • avoids retriggering the stop-savepoint after it has already succeeded.

Testing

  • Added regression tests for final-savepoint and terminal-state handling.
  • Added coverage confirming CANCELLING does not transition the job to Updating.
  • go test ./...
  • go vet ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant