diff --git a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap index d778849347d18..94bc911557c21 100644 --- a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap +++ b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap @@ -5617,353 +5617,6 @@ Object { } `; -exports[`Connector type config checks detect connector type changes for: .inference 1`] = ` -Object { - "flags": Object { - "default": Object { - "special": "deep", - }, - "error": [Function], - "presence": "optional", - }, - "keys": Object { - "input": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - }, - "type": "object", -} -`; - -exports[`Connector type config checks detect connector type changes for: .inference 2`] = ` -Object { - "flags": Object { - "default": Object { - "special": "deep", - }, - "error": [Function], - "presence": "optional", - }, - "keys": Object { - "input": Object { - "flags": Object { - "default": Array [], - "error": [Function], - "presence": "optional", - }, - "items": Array [ - Object { - "flags": Object { - "error": [Function], - "presence": "optional", - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - ], - "type": "array", - }, - "query": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - }, - "type": "object", -} -`; - -exports[`Connector type config checks detect connector type changes for: .inference 3`] = ` -Object { - "flags": Object { - "default": Object { - "special": "deep", - }, - "error": [Function], - "presence": "optional", - }, - "keys": Object { - "input": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - }, - "type": "object", -} -`; - -exports[`Connector type config checks detect connector type changes for: .inference 4`] = ` -Object { - "flags": Object { - "default": Object { - "special": "deep", - }, - "error": [Function], - "presence": "optional", - }, - "keys": Object { - "input": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - "inputType": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - }, - "type": "object", -} -`; - -exports[`Connector type config checks detect connector type changes for: .inference 5`] = ` -Object { - "flags": Object { - "default": Object { - "special": "deep", - }, - "error": [Function], - "presence": "optional", - }, - "keys": Object { - "input": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - }, - "type": "object", -} -`; - -exports[`Connector type config checks detect connector type changes for: .inference 6`] = ` -Object { - "flags": Object { - "default": Object { - "special": "deep", - }, - "error": [Function], - "presence": "optional", - }, - "keys": Object { - "inferenceId": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - "provider": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - "providerConfig": Object { - "flags": Object { - "default": Object {}, - "error": [Function], - "presence": "optional", - "unknown": true, - }, - "keys": Object {}, - "preferences": Object { - "stripUnknown": Object { - "objects": false, - }, - }, - "type": "object", - }, - "taskType": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - "taskTypeConfig": Object { - "flags": Object { - "default": Object {}, - "error": [Function], - "presence": "optional", - "unknown": true, - }, - "keys": Object {}, - "preferences": Object { - "stripUnknown": Object { - "objects": false, - }, - }, - "type": "object", - }, - }, - "type": "object", -} -`; - -exports[`Connector type config checks detect connector type changes for: .inference 7`] = ` -Object { - "flags": Object { - "default": Object { - "special": "deep", - }, - "error": [Function], - "presence": "optional", - }, - "keys": Object { - "providerSecrets": Object { - "flags": Object { - "default": Object {}, - "error": [Function], - "presence": "optional", - "unknown": true, - }, - "keys": Object {}, - "preferences": Object { - "stripUnknown": Object { - "objects": false, - }, - }, - "type": "object", - }, - }, - "type": "object", -} -`; - -exports[`Connector type config checks detect connector type changes for: .inference 8`] = ` -Object { - "flags": Object { - "default": Object { - "special": "deep", - }, - "error": [Function], - "presence": "optional", - }, - "keys": Object { - "subAction": Object { - "flags": Object { - "error": [Function], - }, - "rules": Array [ - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, - ], - "type": "string", - }, - "subActionParams": Object { - "flags": Object { - "default": Object { - "special": "deep", - }, - "error": [Function], - "presence": "optional", - "unknown": true, - }, - "keys": Object {}, - "preferences": Object { - "stripUnknown": Object { - "objects": false, - }, - }, - "type": "object", - }, - }, - "type": "object", -} -`; - exports[`Connector type config checks detect connector type changes for: .jira 1`] = ` Object { "flags": Object { diff --git a/x-pack/plugins/actions/server/integration_tests/mocks/connector_types.ts b/x-pack/plugins/actions/server/integration_tests/mocks/connector_types.ts index fff112de59f16..a26c775a74a5b 100644 --- a/x-pack/plugins/actions/server/integration_tests/mocks/connector_types.ts +++ b/x-pack/plugins/actions/server/integration_tests/mocks/connector_types.ts @@ -32,7 +32,6 @@ export const connectorTypes: string[] = [ '.thehive', '.sentinelone', '.crowdstrike', - '.inference', '.cases', '.observability-ai-assistant', ]; diff --git a/x-pack/plugins/stack_connectors/common/experimental_features.ts b/x-pack/plugins/stack_connectors/common/experimental_features.ts index 7adcad74aad85..9c81371b4b458 100644 --- a/x-pack/plugins/stack_connectors/common/experimental_features.ts +++ b/x-pack/plugins/stack_connectors/common/experimental_features.ts @@ -15,7 +15,7 @@ export const allowedExperimentalValues = Object.freeze({ isMustacheAutocompleteOn: false, sentinelOneConnectorOn: true, crowdstrikeConnectorOn: true, - inferenceConnectorOn: true, + inferenceConnectorOn: false, }); export type ExperimentalConfigKeys = Array; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.test.tsx index 0f37564fd560c..76dc50a316e65 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.test.tsx @@ -16,7 +16,9 @@ const ACTION_TYPE_ID = '.inference'; let actionTypeModel: ActionTypeModel; beforeAll(() => { - ExperimentalFeaturesService.init({ experimentalFeatures: experimentalFeaturesMock }); + ExperimentalFeaturesService.init({ + experimentalFeatures: { ...experimentalFeaturesMock, inferenceConnectorOn: true } as any, + }); const connectorTypeRegistry = new TypeRegistry(); registerConnectorTypes({ connectorTypeRegistry, services: registrationServicesMock }); const getResult = connectorTypeRegistry.get(ACTION_TYPE_ID); diff --git a/x-pack/plugins/stack_connectors/server/plugin.test.ts b/x-pack/plugins/stack_connectors/server/plugin.test.ts index 7d11d152f8316..45657ae6166b6 100644 --- a/x-pack/plugins/stack_connectors/server/plugin.test.ts +++ b/x-pack/plugins/stack_connectors/server/plugin.test.ts @@ -9,6 +9,12 @@ import { PluginInitializerContext } from '@kbn/core/server'; import { coreMock } from '@kbn/core/server/mocks'; import { StackConnectorsPlugin } from './plugin'; import { actionsMock } from '@kbn/actions-plugin/server/mocks'; +import { experimentalFeaturesMock } from '../public/mocks'; +import { parseExperimentalConfigValue } from '../common/experimental_features'; + +jest.mock('../common/experimental_features'); + +const mockParseExperimentalConfigValue = parseExperimentalConfigValue as jest.Mock; describe('Stack Connectors Plugin', () => { describe('setup()', () => { @@ -18,6 +24,11 @@ describe('Stack Connectors Plugin', () => { beforeEach(() => { context = coreMock.createPluginInitializerContext(); + mockParseExperimentalConfigValue.mockReturnValue({ + ...experimentalFeaturesMock, + inferenceConnectorOn: true, + }); + plugin = new StackConnectorsPlugin(context); coreSetup = coreMock.createSetup(); }); diff --git a/x-pack/plugins/task_manager/server/integration_tests/__snapshots__/task_cost_check.test.ts.snap b/x-pack/plugins/task_manager/server/integration_tests/__snapshots__/task_cost_check.test.ts.snap index 96ac62b9f03df..754d9f0c66b4b 100644 --- a/x-pack/plugins/task_manager/server/integration_tests/__snapshots__/task_cost_check.test.ts.snap +++ b/x-pack/plugins/task_manager/server/integration_tests/__snapshots__/task_cost_check.test.ts.snap @@ -106,10 +106,6 @@ Array [ "cost": 1, "taskType": "actions:.crowdstrike", }, - Object { - "cost": 1, - "taskType": "actions:.inference", - }, Object { "cost": 1, "taskType": "actions:.cases", diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts index 10449613f6ef6..4b7dd28d63b5c 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts @@ -53,7 +53,6 @@ export default function createRegisteredConnectorTypeTests({ getService }: FtrPr '.gen-ai', '.bedrock', '.gemini', - '.inference', '.sentinelone', '.cases', '.crowdstrike', diff --git a/x-pack/test/plugin_api_integration/config.ts b/x-pack/test/plugin_api_integration/config.ts index 49d2dd93c2d6f..896b2c41ca1bc 100644 --- a/x-pack/test/plugin_api_integration/config.ts +++ b/x-pack/test/plugin_api_integration/config.ts @@ -36,7 +36,10 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { '--xpack.task_manager.monitored_aggregated_stats_refresh_rate=5000', '--xpack.task_manager.ephemeral_tasks.enabled=false', '--xpack.task_manager.ephemeral_tasks.request_capacity=100', - `--xpack.stack_connectors.enableExperimental=${JSON.stringify(['crowdstrikeConnectorOn'])}`, + `--xpack.stack_connectors.enableExperimental=${JSON.stringify([ + 'crowdstrikeConnectorOn', + 'inferenceConnectorOn', + ])}`, ...findTestPluginPaths(path.resolve(__dirname, 'plugins')), ], }, diff --git a/x-pack/test/task_manager_claimer_mget/config.ts b/x-pack/test/task_manager_claimer_mget/config.ts index 38622299d792a..899cfb592be18 100644 --- a/x-pack/test/task_manager_claimer_mget/config.ts +++ b/x-pack/test/task_manager_claimer_mget/config.ts @@ -33,7 +33,10 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { '--xpack.task_manager.ephemeral_tasks.enabled=false', '--xpack.task_manager.ephemeral_tasks.request_capacity=100', '--xpack.task_manager.metrics_reset_interval=40000', - `--xpack.stack_connectors.enableExperimental=${JSON.stringify(['crowdstrikeConnectorOn'])}`, + `--xpack.stack_connectors.enableExperimental=${JSON.stringify([ + 'crowdstrikeConnectorOn', + 'inferenceConnectorOn', + ])}`, ...findTestPluginPaths(path.resolve(__dirname, 'plugins')), ], },