gyfora commented on code in PR #283:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/283#discussion_r911752374
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/deployment/AbstractFlinkResourceReconciler.java:
##########
@@ -99,15 +103,20 @@ public final void reconcile(CR cr, Context ctx) throws
Exception {
// No further logic is required at this point.
if (firstDeployment) {
LOG.info("Deploying for the first time");
+
+ // Before we try to submit the job we record the current spec in
the status so we can
+ // handle subsequent deployment and status update errors
+ ReconciliationUtils.updateStatusBeforeDeploymentAttempt(cr,
deployConfig);
+ statusRecorder.patchAndCacheStatus(cr);
+
deploy(
cr,
spec,
status,
deployConfig,
Optional.ofNullable(spec.getJob()).map(JobSpec::getInitialSavepointPath),
false);
- ReconciliationUtils.updateForSpecReconciliationSuccess(
- cr, JobState.RUNNING, deployConfig);
+ ReconciliationUtils.updateStatusForDeployedSpec(cr, deployConfig);
Review Comment:
@Aitozi I just manually verified this again by throwing errors directly
before / after first deploy. And it both works.
--
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]