gyfora commented on code in PR #657:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/657#discussion_r1303905438


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/deployment/ApplicationReconciler.java:
##########
@@ -215,6 +221,18 @@ private void setJobIdIfNecessary(
         deployConfig.set(PipelineOptionsInternal.PIPELINE_FIXED_JOB_ID, jobId);
     }
 
+    private boolean requireScale(FlinkResourceContext<FlinkDeployment> ctx) {
+        var cr = ctx.getResource();
+        FlinkDeploymentSpec lastReconciledSpec =
+                
cr.getStatus().getReconciliationStatus().deserializeLastReconciledSpec();
+        FlinkDeploymentSpec currentDeploySpec = cr.getSpec();
+        var specDiff =
+                new ReflectiveDiffBuilder<>(
+                                ctx.getDeploymentMode(), lastReconciledSpec, 
currentDeploySpec)
+                        .build();
+        return specDiff.getType() == DiffType.SCALE;
+    }

Review Comment:
   we should pass this information to deploy instead of computing it again



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to