[GitHub] [flink-kubernetes-operator] tweise commented on a diff in pull request #489: [FLINK-30406] Detect when jobmanager never started
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
[GitHub] [flink-kubernetes-operator] tweise commented on a diff in pull request #489: [FLINK-30406] Detect when jobmanager never started
tweise commented on code in PR #489: URL: https://github.com/apache/flink-kubernetes-operator/pull/489#discussion_r1053332127 ## 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: @gyula-fora this wasn't resolved. I would expect the "reconciled" (and stable) spec to match the spec that was supplied. AFAIK, comparing desired spec with reconciled/stable spec is currently the only way to determine if all changes have been applied. If the specs don't match, how can that be achieved? -- 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