feat: Allow specifying savepoint format type#1002
Conversation
|
@regadas Please review. Thanks! |
regadas
left a comment
There was a problem hiding this comment.
Please rebase onto current master and keep both v20 and v115 when resolving the converter conflict. Also add focused tests for the Flink 1.15 boundary and the savepoint request payload, with and without formatType.
| // _(Optional)_ Savepoint format type, "CANONICAL" or "NATIVE", default: "CANONICAL". | ||
| // +kubebuilder:validation:Enum=CANONICAL;NATIVE | ||
| // +kubebuilder:default:=CANONICAL | ||
| SavepointFormatType *SavepointFormatType `json:"savepointFormatType,omitempty"` |
There was a problem hiding this comment.
Please exclude this from newRevisionDataPatch. It doesn’t change the rendered workload, but including it in the revision hash can trigger an unnecessary job restart when the default is applied or the format changes.
There was a problem hiding this comment.
Excluded. In controllers/flinkcluster/flinkcluster_util.go:205 I added c.Spec.Job.SavepointFormatType = nil.
Flink supports two savepoint formats: `CANONICAL` and `NATIVE`. You can control which format is used by setting the `savepointFormatType` property in the job spec. If not specified, Flink uses the canonical format by default.
Savepoint format type was added in Flink 1.15. Operator's readme suggests we support Flink >= 1.10. # Conflicts: # controllers/flinkcluster/flinkcluster_converter.go
It doesn’t change the rendered workload, but including it in the revision hash can trigger an unnecessary job restart when the default is applied or the format changes.
7117d6b to
2f7b7aa
Compare
|
Thank you for the review!
I added two new test sets. |
Summary
Flink supports two savepoint formats:
CANONICALandNATIVE. This PR allows you to control which format is used by setting thesavepointFormatTypeproperty in the job spec. If not specified, Flink uses the canonical format by default.Test plan