tweise commented on code in PR #489: URL: https://github.com/apache/flink-kubernetes-operator/pull/489#discussion_r1053912124
########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/deployment/AbstractFlinkResourceReconciler.java: ########## @@ -116,9 +119,23 @@ public final void reconcile(CR cr, Context<?> ctx) throws Exception { if (reconciliationStatus.isBeforeFirstDeployment()) { LOG.info("Deploying for the first time"); + if (spec.getJob() != null) { + var initialUpgradeMode = UpgradeMode.STATELESS; + var initialSp = spec.getJob().getInitialSavepointPath(); + + if (initialSp != null) { + status.getJobStatus() + .getSavepointInfo() + .setLastSavepoint( + Savepoint.of(initialSp, SavepointTriggerType.UNKNOWN)); + initialUpgradeMode = UpgradeMode.SAVEPOINT; + } + + spec.getJob().setUpgradeMode(initialUpgradeMode); Review Comment: Makes sense. Agreed that it must be possible to find the actually used upgrade mode. And since upgrade mode change does not cause reconciliation there is no need to consider it when comparing the specs from user side either. That a new mode was applied is evident by its presence in the latest spec. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org