gyfora commented on PR #356:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/356#issuecomment-1231889025

   > @gyfora I'm testing the approach we discussed offline:
   > 
   > ```
   >             if (!flinkService.isHaMetadataAvailable(deployConfig) && 
deployment.getStatus().getReconciliationStatus().getLastStableSpec() == null) {
   >                 // initial deployment failure, reset to allow for spec 
change
   >                 flinkService.deleteClusterDeployment(
   >                                         deployment.getMetadata(), 
deployment.getStatus(), false);
   >                 flinkService.waitForClusterShutdown(deployConfig);
   >                 // in case the deployment succeeded between check and 
delete, fall through to the upgrade path
   >                 if (!flinkService.isHaMetadataAvailable(deployConfig)) {
   >                     LOG.info(
   >                             "Job never entered stable state. Clearing 
previous spec to reset for initial deploy");
   >                     // TODO: this doesn't work because 
lastSpecWithMeta.f1.isFirstDeployment() is false
   >                     // 
ReconciliationUtils.clearLastReconciledSpecIfFirstDeploy(deployment);
   >                     
deployment.getStatus().getReconciliationStatus().setLastReconciledSpec(null);
   >                     // TODO: reschedule immediate reconciliation
   >                     return Optional.empty();
   >                 }
   >             }
   > ```
   > 
   > I need to check why 
`ReconciliationUtils.clearLastReconciledSpecIfFirstDeploy(deployment);` does 
not work, this could point to another issue.
   
   The code looks good based on what we discussed, not sure why it doesnt 
recognize as first deploy but in any case setting the last reconciled spec null 
should also basically do the same (without any check)


-- 
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

Reply via email to