[FLINK-38867] [Kubernetes Operator] Fix restartSavepointNonce to respect initialSavepointPath in BlueGreenDeployments#12
Conversation
drossos
left a comment
There was a problem hiding this comment.
Left a larger comment about how we could refactor this to potentially streamline the logic
Really like direction 👍
84834f0 to
4d3cc92
Compare
drossos
left a comment
There was a problem hiding this comment.
Comment on gap with redeploying from stateless
| FlinkBlueGreenDeploymentSpec spec2 = createBasicSpec(); | ||
|
|
||
| // Change both top-level (configuration) and nested spec | ||
| // With new logic, only nested spec changes matter - setSavepointRedeployNonce triggers |
There was a problem hiding this comment.
This isn't specific to this code, but in our PR / JIRA in OSS we should highlight that for savepoint upgrade behaviour is not working as expected (loads from taken savepoint in transition and not specified one by initalSavepointPath)
0e4b463 to
5e48bdb
Compare
| // lastCheckpoint is null in two scenarios: | ||
| // 1. savepointRedeployNonce changed - user wants to redeploy from initialSavepointPath | ||
| // 2. upgradeMode is STATELESS - don't take savepoints (but use initialSavepointPath if | ||
| // set) |
There was a problem hiding this comment.
@drossos we gotta revise this comment, likely drop the comment in the else case and move it up here to centralize it.
…estartSavepointNonce Co-authored-by: Daniel Rossos <daniel.rossos@shopify.com>
5e48bdb to
ed3508a
Compare
drossos
left a comment
There was a problem hiding this comment.
LGTM (although co-authored a small part), good to deploy on our side
What is the purpose of the change
This pull request fixes a bug where
FlinkBlueGreenDeploymentignores the user-specifiedinitialSavepointPathwhensavepointRedeployNonceis incremented. The controller now properly honorssavepointRedeployNoncechanges and uses the specified savepoint location for redeployment, aligning Blue/Green deployment behavior with standardFlinkDeploymentbehavior.Brief change log
BlueGreenDiffType.SAVEPOINT_REDEPLOYto handle nonce-triggered redeploymentsFlinkBlueGreenDeploymentSpecDiffto detect and prioritizesavepointRedeployNoncechangesstartSavepointRedeployTransition()to skip savepoint triggering and useinitialSavepointPathfrom specVerifying this change
This change added tests and can be verified as follows:
verifySavepointRedeployNonceTriggersTransitionWithInitialSavepointPathintegration test inFlinkBlueGreenDeploymentControllerTestthat verifies the full savepoint redeploy flow:ACTIVE_BLUEstatesavepointRedeployNoncewith user-specifiedinitialSavepointPathTRANSITIONING_TO_GREENinitialSavepointPathACTIVE_GREENDoes this pull request potentially affect one of the following parts:
CustomResourceDescriptors: noDocumentation