Skip to content
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

[FLINK-27261] Disable web.cancel.enable for session cluster #198

Merged
merged 3 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,10 @@ protected FlinkConfigBuilder applyFlinkConfiguration() {
// Adapt default rest service type from 1.15+
setDefaultConf(
REST_SERVICE_EXPOSED_TYPE, KubernetesConfigOptions.ServiceExposedType.ClusterIP);
// Set 'web.cancel.enable' to false to avoid users accidentally cancelling jobs.
setDefaultConf(CANCEL_ENABLE, false);

if (spec.getJob() != null) {
// Set 'web.cancel.enable' to false for application deployments to avoid users
// accidentally cancelling jobs.
setDefaultConf(CANCEL_ENABLE, false);

// With last-state upgrade mode, set the default value of
// 'execution.checkpointing.interval'
// to 5 minutes when HA is enabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ public void testApplyFlinkConfiguration() {
Assertions.assertEquals(
DEFAULT_CHECKPOINTING_INTERVAL,
configuration.get(ExecutionCheckpointingOptions.CHECKPOINTING_INTERVAL));

deployment = TestUtils.buildSessionCluster();
configuration =
new FlinkConfigBuilder(deployment, new Configuration())
.applyFlinkConfiguration()
.build();
Assertions.assertEquals(false, configuration.get(WebOptions.CANCEL_ENABLE));
}

@Test
Expand Down