-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: RestartPolicy serde results in different revision #497
Conversation
var revision, _ = newRevision(&flinkCluster, 1, &collisionCount) | ||
var expectedRevision = appsv1.ControllerRevision{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: "mycluster-fb7687bf5", | ||
Name: "mycluster-7bc87c954f", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New revisions trigger cluster updates! so this value change should be treated carefully. In this case this is changed to previous value.
The change to ommit the `RestartPolicy` when not set results in null not be included in the json serialization resulting in different revision number causing Stopped clusters to Update. We should `ommitempty` for `RestartPolicy` but that should be deffered to `v1beta1`
Hey @regadas ,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is worthwhile to have a "default" RestartPolicy. Wdyt?
@live-wire
It depends but in general yes. There are some fields that will make it a backwards incompatible change.
Yes, if there's a new revision it's because there's a "seen" change and it triggers the Update on all clusters.
There's a default value for it. flink-on-k8s-operator/apis/flinkcluster/v1beta1/flinkcluster_types.go Lines 558 to 559 in 6a004ef
|
|
The change to ommit the
RestartPolicy
when not set (introduce in #449) results in null not be included in the json serialization resulting in different revision number causing Stopped clusters to Update.We should
ommitempty
forRestartPolicy
but that should be deffered tov1beta2