The GitHub Actions job "Build documentation" on 
flink-kubernetes-operator.git/main has failed.
Run started by GitHub user asfgit (triggered by asfgit).

Head commit for run:
284a8d005fb6dc49c97e41580df6e83cb9636906 / 김현 
<[email protected]>
[FLINK-40470] Record spec before deployment attempt in savepoint redeploy 
(#1216)

* [FLINK-40470] Record spec before deployment attempt in savepoint redeploy

When job.savepointRedeployNonce changes, redeployWithSavepoint cancels the
running job and redeploys it from initialSavepointPath. Unlike every other
deployment path it only recorded the target spec in the status after the
deploy call succeeded. If deploy threw (transient API server error, or an
error raised after the cluster resources were already created), the new nonce
never reached lastReconciledSpec, every subsequent reconciliation classified
the diff as SAVEPOINT_REDEPLOY again and the operator repeated the cancel +
redeploy cycle indefinitely.

Record the target spec with updateStatusBeforeDeploymentAttempt before the
deploy call, mirroring the suspend/resume path, so that a failed attempt is
retried through the regular restore path from the recorded upgradeSavepointPath.

The suspended -> running path used to fall back to an empty state restore
whenever the spec declared upgradeMode: stateless. This discarded the
initialSavepointPath of a savepoint redeploy requested while suspended, and
would have turned the retry above into an empty state restore for stateless
jobs. A savepoint the user explicitly requested through initialSavepointPath,
recorded as the upgrade savepoint by the redeploy, is now restored regardless
of the upgrade mode. Resuming a job suspended in savepoint or last-state mode
with a stateless spec still starts from empty state, as before.

Generated-by: Claude Code (Claude Fable 5.1)

* [FLINK-40470] Mark resumed savepoint redeploy stable, use recorded path

AbstractJobReconciler's resume path completes a savepoint redeploy in two
cases: the first deployment attempt failed, or the redeploy was requested
while the job was suspended. Two fixes to that path:

- Mark the reconciled spec stable after restoring from the explicitly
  requested savepoint, as redeployWithSavepoint does. Without this, a redeploy
  completed through the resume path is rolled back to the pre-redeploy spec if
  the JobManager does not become ready within the readiness timeout. Savepoint
  redeploys are documented as not supporting rollbacks.

- When deciding whether the restore targets the explicitly requested
  savepoint, read initialSavepointPath from the last reconciled spec, not from
  the current spec. initialSavepointPath is ignored by the spec diff, so
  editing or clearing it without a new savepointRedeployNonce is not a new
  operation and must not turn the recorded redeploy into an empty-state
  restore.

Also document redeploys requested while suspended under "Redeploying from a
Savepoint" instead of "Suspending and Resuming".

Generated-by: Claude Code (Claude Fable 5.1)

Report URL: 
https://github.com/apache/flink-kubernetes-operator/actions/runs/39345240900

With regards,
GitHub Actions via GitBox

Reply via email to