Skip to content

feat: Allow specifying savepoint format type#1002

Open
grzegorz8 wants to merge 8 commits into
spotify:masterfrom
grzegorz8:native-savepoint
Open

feat: Allow specifying savepoint format type#1002
grzegorz8 wants to merge 8 commits into
spotify:masterfrom
grzegorz8:native-savepoint

Conversation

@grzegorz8

Copy link
Copy Markdown
Contributor

Summary

Flink supports two savepoint formats: CANONICAL and NATIVE. This PR allows you to control which format is used by setting the savepointFormatType property in the job spec. If not specified, Flink uses the canonical format by default.

Test plan

  • Tested manually on a local minikube environment.

@grzegorz8 grzegorz8 changed the title Native savepoint feat: Allow specifying savepoint format type Jun 1, 2026
@grzegorz8 grzegorz8 marked this pull request as ready for review June 5, 2026 17:39
@grzegorz8

Copy link
Copy Markdown
Contributor Author

@regadas Please review. Thanks!

@regadas regadas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excluded. In controllers/flinkcluster/flinkcluster_util.go:205 I added c.Spec.Job.SavepointFormatType = nil.

Grzegorz Kołakowski added 8 commits June 23, 2026 07:52
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.
@grzegorz8

Copy link
Copy Markdown
Contributor Author

Thank you for the review!

Also add focused tests for the Flink 1.15 boundary and the savepoint request payload, with and without formatType.

I added two new test sets.

@grzegorz8 grzegorz8 requested a review from regadas June 23, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants