gyfora commented on a change in pull request #85:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/85#discussion_r835896883
##########
File path:
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/validation/DefaultDeploymentValidator.java
##########
@@ -245,6 +241,19 @@
JobSpec oldJob = oldSpec.getJob();
JobSpec newJob = newSpec.getJob();
+
+ if (lastReconciledSpec(deployment) != null
+ && ReconciliationUtils.triggerRestart(deployment)) {
+ if (newJob.getState() != JobState.RUNNING) {
+ return Optional.of(
+ String.format("Cannot restart job to %s state",
newJob.getState()));
+ }
+ if (oldJob.getState() != JobState.RUNNING) {
+ return Optional.of(
+ String.format("Cannot restart job in %s state",
oldJob.getState()));
+ }
+ }
Review comment:
All I am trying to say, is that the way it is implemented, changing the
`restartNonce` field works as any other spec change and it triggers a simple
upgrade of the deplyoment. (this is perfectly good)
Given this, I don't see the point in introducing restrictions on this field
as we also dont have restrictions on when an upgrade can be triggered. I just
want to keep it conistent and simple.
We can of course wait for others to chime in here as well:
@wangyang0918 @morhidi @tweise
--
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]