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

Disable Inference Connector experimental feature #196036

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const connectorTypes: string[] = [
'.thehive',
'.sentinelone',
'.crowdstrike',
'.inference',
'.cases',
'.observability-ai-assistant',
];
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const allowedExperimentalValues = Object.freeze({
isMustacheAutocompleteOn: false,
sentinelOneConnectorOn: true,
crowdstrikeConnectorOn: true,
inferenceConnectorOn: true,
inferenceConnectorOn: false,
});

export type ExperimentalConfigKeys = Array<keyof ExperimentalFeatures>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ActionTypeModel>();
registerConnectorTypes({ connectorTypeRegistry, services: registrationServicesMock });
const getResult = connectorTypeRegistry.get(ACTION_TYPE_ID);
Expand Down
11 changes: 11 additions & 0 deletions x-pack/plugins/stack_connectors/server/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()', () => {
Expand All @@ -18,6 +24,11 @@ describe('Stack Connectors Plugin', () => {

beforeEach(() => {
context = coreMock.createPluginInitializerContext();
mockParseExperimentalConfigValue.mockReturnValue({
...experimentalFeaturesMock,
inferenceConnectorOn: true,
});

plugin = new StackConnectorsPlugin(context);
coreSetup = coreMock.createSetup();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export default function createRegisteredConnectorTypeTests({ getService }: FtrPr
'.gen-ai',
'.bedrock',
'.gemini',
'.inference',
'.sentinelone',
'.cases',
'.crowdstrike',
Expand Down
5 changes: 4 additions & 1 deletion x-pack/test/plugin_api_integration/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
],
},
Expand Down
5 changes: 4 additions & 1 deletion x-pack/test/task_manager_claimer_mget/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
],
},
Expand Down