Skip to content

Fix observed generation - #29

Draft
Yanisdje wants to merge 1 commit into
mainfrom
yd/fix-observed-generation-suspended
Draft

Fix observed generation#29
Yanisdje wants to merge 1 commit into
mainfrom
yd/fix-observed-generation-suspended

Conversation

@Yanisdje

@Yanisdje Yanisdje commented Jul 13, 2026

Copy link
Copy Markdown

What is the purpose of the change

Fix observedGeneration not being set when a FlinkDeployment is created with spec.job.state: suspended. The operator returned early without updating any status fields, leaving observedGeneration null and causing deployment tools like kapp to hang indefinitely.

Additionally, add observedGeneration to FlinkBlueGreenDeploymentStatus which was missing entirely.

JIRA issue: https://issues.apache.org/jira/browse/FLINK-39243
Discussion: https://lists.apache.org/thread/4pk4v0wx901t4blsncx4j1jm8csc59z2

Brief change log

  • AbstractFlinkResourceReconciler: Update status before early return for suspended first deployments
  • FlinkBlueGreenDeploymentStatus: Add observedGeneration field
  • BlueGreenDeploymentService: Set observedGeneration on every status update
  • InitializingBlueStateHandler: Record lastReconciledSpec for suspended state and add resume condition

Verifying this change

(Please pick either of the following options)

This change added tests and can be verified as follows:

Added testSuspendedFirstDeploymentSetsObservedGeneration in ApplicationReconcilerTest verifying observedGeneration is set, no resources are created, and resume to RUNNING works

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