Skip to content

Commit 55be4b1

Browse files
authored
Remove FF for gap auto fill schedule (elastic#249530)
## Remove FF for gap auto fill schedule Make gap auto fill scheduler feature available by default
1 parent a46f5b3 commit 55be4b1

9 files changed

Lines changed: 16 additions & 71 deletions

File tree

x-pack/platform/plugins/shared/alerting/server/plugin.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -437,15 +437,13 @@ export class AlertingPlugin {
437437
});
438438
}
439439

440-
if (this?.config?.gapAutoFillScheduler?.enabled ?? false) {
441-
registerGapAutoFillSchedulerTask({
442-
taskManager: plugins.taskManager,
443-
logger: this.logger,
444-
getRulesClientWithRequest: (request) => this?.getRulesClientWithRequest?.(request),
445-
eventLogger: this.eventLogger!,
446-
schedulerConfig: this.config.gapAutoFillScheduler,
447-
});
448-
}
440+
registerGapAutoFillSchedulerTask({
441+
taskManager: plugins.taskManager,
442+
logger: this.logger,
443+
getRulesClientWithRequest: (request) => this?.getRulesClientWithRequest?.(request),
444+
eventLogger: this.eventLogger!,
445+
schedulerConfig: this.config.gapAutoFillScheduler,
446+
});
449447

450448
// Routes
451449
const router = core.http.createRouter<AlertingRequestHandlerContext>();

x-pack/platform/plugins/shared/alerting/server/routes/index.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,11 @@ export function defineRoutes(opts: RouteOptions) {
168168
getRuleIdsWithGapsRoute(router, licenseState);
169169
getGapsSummaryByRuleIdsRoute(router, licenseState);
170170

171-
if (alertingConfig?.gapAutoFillScheduler?.enabled) {
172-
createAutoFillSchedulerRoute(router, licenseState);
173-
getAutoFillSchedulerRoute(router, licenseState);
174-
updateAutoFillSchedulerRoute(router, licenseState);
175-
deleteAutoFillSchedulerRoute(router, licenseState);
176-
findAutoFillSchedulerLogsRoute(router, licenseState);
177-
}
171+
createAutoFillSchedulerRoute(router, licenseState);
172+
getAutoFillSchedulerRoute(router, licenseState);
173+
updateAutoFillSchedulerRoute(router, licenseState);
174+
deleteAutoFillSchedulerRoute(router, licenseState);
175+
findAutoFillSchedulerLogsRoute(router, licenseState);
178176

179177
// Rules Settings APIs
180178
if (alertingConfig.rulesSettings.enabled) {

x-pack/platform/test/alerting_api_integration/common/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
352352
serverArgs: [
353353
...xPackApiIntegrationTestsConfig.get('kbnTestServer.serverArgs'),
354354
...(options.publicBaseUrl ? ['--server.publicBaseUrl=https://localhost:5601'] : []),
355-
'--xpack.alerting.gapAutoFillScheduler.enabled=true',
356355
`--xpack.actions.allowedHosts=${JSON.stringify([
357356
'localhost',
358357
'some.non.existent.com',

x-pack/platform/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ export default function ({ getService }: FtrProviderContext) {
203203
'fleet:update_agent_tags:retry',
204204
'fleet:upgrade-agentless-deployments-task',
205205
'fleet:upgrade_action:retry',
206+
'gap-auto-fill-scheduler-task',
206207
'logs-data-telemetry',
207208
'maintenance-window:generate-events',
208209
'osquery:telemetry-configs',

x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,6 @@ export const allowedExperimentalValues = Object.freeze({
210210
*/
211211
trialCompanionEnabled: false,
212212

213-
/*
214-
* Enables the Gap Auto Fill Scheduler feature.
215-
*/
216-
gapAutoFillSchedulerEnabled: false,
217213
/**
218214
* Enables DNS events toggle for Linux in Endpoint policy configuration.
219215
* When disabled, DNS field is not added to Linux policies and not shown in UI.

x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_gaps/logic/use_gap_auto_fill_capabilities.test.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,6 @@ describe('useGapAutoFillCapabilities', () => {
6565
expect(result.current.canEditGapAutoFill).toBe(false);
6666
});
6767

68-
it('denies access when experimental feature flag is disabled', () => {
69-
mockUseIsExperimentalFeatureEnabled.mockReturnValue(false);
70-
71-
const { result } = renderHook(() => useGapAutoFillCapabilities());
72-
73-
expect(result.current.canAccessGapAutoFill).toBe(false);
74-
expect(result.current.canEditGapAutoFill).toBe(false);
75-
});
76-
7768
it('denies edit rights when license is enterprise but user lacks CRUD', () => {
7869
mockUseLicense.mockReturnValue({
7970
isEnterprise: () => true,

x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_gaps/logic/use_gap_auto_fill_capabilities.ts

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { useMemo } from 'react';
99
import { ProductFeatureSecurityKey } from '@kbn/security-solution-features/keys';
1010
import { useLicense } from '../../../common/hooks/use_license';
1111
import { useUserPrivileges } from '../../../common/components/user_privileges';
12-
import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features';
1312
import { useProductFeatureKeys } from '../../../common/hooks/use_product_feature_keys';
1413

1514
/**
@@ -18,9 +17,6 @@ import { useProductFeatureKeys } from '../../../common/hooks/use_product_feature
1817
export const useGapAutoFillCapabilities = () => {
1918
const license = useLicense();
2019
const productFeatureKeys = useProductFeatureKeys();
21-
const gapAutoFillSchedulerEnabled = useIsExperimentalFeatureEnabled(
22-
'gapAutoFillSchedulerEnabled'
23-
);
2420
const hasEnterpriseLicense = license.isEnterprise();
2521
const hasRuleGapsAutoFillFeature = productFeatureKeys.has(
2622
ProductFeatureSecurityKey.ruleGapsAutoFill
@@ -30,23 +26,9 @@ export const useGapAutoFillCapabilities = () => {
3026
return useMemo(
3127
() => ({
3228
hasEnterpriseLicense,
33-
canAccessGapAutoFill:
34-
gapAutoFillSchedulerEnabled &&
35-
hasEnterpriseLicense &&
36-
hasRuleGapsAutoFillFeature &&
37-
canReadRules,
38-
canEditGapAutoFill:
39-
gapAutoFillSchedulerEnabled &&
40-
hasEnterpriseLicense &&
41-
hasRuleGapsAutoFillFeature &&
42-
canEditRules,
29+
canAccessGapAutoFill: hasEnterpriseLicense && hasRuleGapsAutoFillFeature && canReadRules,
30+
canEditGapAutoFill: hasEnterpriseLicense && hasRuleGapsAutoFillFeature && canEditRules,
4331
}),
44-
[
45-
gapAutoFillSchedulerEnabled,
46-
hasEnterpriseLicense,
47-
hasRuleGapsAutoFillFeature,
48-
canEditRules,
49-
canReadRules,
50-
]
32+
[hasEnterpriseLicense, hasRuleGapsAutoFillFeature, canEditRules, canReadRules]
5133
);
5234
};

x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_gaps/auto_gap_fill.cy.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ describe.skip(
7878
'Rule gaps auto fill status',
7979
{
8080
tags: ['@ess'],
81-
env: {
82-
ftrConfig: {
83-
kbnServerArgs: [
84-
'--xpack.alerting.gapAutoFillScheduler.enabled=true',
85-
`--xpack.securitySolution.enableExperimental=${JSON.stringify([
86-
'gapAutoFillSchedulerEnabled',
87-
])}`,
88-
],
89-
},
90-
},
9181
},
9282
() => {
9383
describe('Platinum user flows', () => {

x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_gaps/auto_gap_fill_basic_license.cy.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ describe(
2323
'Rule gaps auto fill status - Basic license',
2424
{
2525
tags: ['@ess'],
26-
env: {
27-
ftrConfig: {
28-
kbnServerArgs: [
29-
'--xpack.alerting.gapAutoFillScheduler.enabled=true',
30-
`--xpack.securitySolution.enableExperimental=${JSON.stringify([
31-
'gapAutoFillSchedulerEnabled',
32-
])}`,
33-
],
34-
},
35-
},
3626
},
3727
() => {
3828
beforeEach(() => {

0 commit comments

Comments
 (0)