gyfora commented on code in PR #196:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/196#discussion_r867636056
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/ReconciliationUtils.java:
##########
@@ -305,4 +307,46 @@ public static boolean isJobRunning(FlinkDeploymentStatus
status) {
.name()
.equals(status.getJobStatus().getState());
}
+
+ /**
+ * In case of validation errors we need to (temporarily) reset the old
spec so that we can
+ * reconcile other outstanding changes, instead of simply blocking.
+ *
+ * <p>This is only possible if we have a previously reconciled spec.
+ *
+ * <p>For in-flight application upgrades we need extra logic to set the
desired job state to
+ * running
+ *
+ * @param deployment The current deployment to be reconciled
+ * @param validationError Validation error encountered for the current spec
+ * @return True if the spec was reset and reconciliation can continue.
False if nothing to
+ * reconcile.
+ */
+ public static <
+ SPEC extends AbstractFlinkSpec,
+ STATUS extends CommonStatus<SPEC>,
+ CR extends CustomResource<SPEC, STATUS>>
+ boolean applyValidationErrorAndResetSpec(CR deployment, String
validationError) {
Review Comment:
Could you give me an example where this would not work?
--
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]