Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
dda8e7c
Add support to deprecate connector types
ersin-erdal Sep 26, 2025
1f50934
add unit tests
ersin-erdal Sep 29, 2025
e519060
fix type checks
ersin-erdal Sep 29, 2025
b802b7c
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Sep 29, 2025
0d1931f
fix check types
ersin-erdal Sep 29, 2025
a9acf20
Merge branch '231015-support-connector-type-deprecation' of github.co…
ersin-erdal Sep 29, 2025
2fec480
fix check types
ersin-erdal Sep 29, 2025
7185b6d
Fix translate namespace
ersin-erdal Sep 30, 2025
d1d6765
use mock connector helper function
ersin-erdal Oct 1, 2025
60aed7c
[CI] Auto-commit changed files from 'node scripts/yarn_deduplicate'
kibanamachine Oct 1, 2025
893fee0
move mock generator to shared ui package
ersin-erdal Oct 2, 2025
e2f09a0
Merge branch '231015-support-connector-type-deprecation' of github.co…
ersin-erdal Oct 2, 2025
7e6bfc0
[CI] Auto-commit changed files from 'node scripts/yarn_deduplicate'
kibanamachine Oct 2, 2025
381f9e2
fix functional tests
ersin-erdal Oct 2, 2025
02a2efc
Merge branch '231015-support-connector-type-deprecation' of github.co…
ersin-erdal Oct 2, 2025
65fa45a
Merge branch 'main' into 231015-support-connector-type-deprecation
ersin-erdal Oct 2, 2025
a120e75
fix linter
ersin-erdal Oct 2, 2025
ab24c95
fix the new test case
ersin-erdal Oct 2, 2025
14759ae
Fix getBulk return type
ersin-erdal Oct 2, 2025
ad06f30
fix getBulk
ersin-erdal Oct 2, 2025
f376471
Fix tests and in memory connectors bug
ersin-erdal Oct 2, 2025
ceebf4d
fix functional tests
ersin-erdal Oct 2, 2025
23358c9
fix functional test
ersin-erdal Oct 2, 2025
2d593f8
fix connector type tests
ersin-erdal Oct 2, 2025
2677686
fix typo
ersin-erdal Oct 3, 2025
4f02f55
Merge branch 'main' into 231015-support-connector-type-deprecation
ersin-erdal Oct 3, 2025
cad74de
Merge branch 'main' into 231015-support-connector-type-deprecation
ersin-erdal Oct 4, 2025
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 @@ -24,4 +24,5 @@ export interface ActionType {
supportedFeatureIds: string[];
isSystemActionType: boolean;
subFeature?: SubFeature;
isDeprecated: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe('checkActionTypeEnabled', () => {
enabledInConfig: true,
enabledInLicense: true,
isSystemActionType: false,
isDeprecated: false,
};
expect(checkActionTypeEnabled(actionType)).toMatchInlineSnapshot(`
Object {
Expand All @@ -51,6 +52,7 @@ describe('checkActionTypeEnabled', () => {
enabledInConfig: true,
enabledInLicense: false,
isSystemActionType: false,
isDeprecated: false,
};
expect(checkActionTypeEnabled(actionType)).toMatchInlineSnapshot(`
Object {
Expand Down Expand Up @@ -86,6 +88,7 @@ describe('checkActionTypeEnabled', () => {
enabledInConfig: false,
enabledInLicense: true,
isSystemActionType: false,
isDeprecated: false,
};
expect(checkActionTypeEnabled(actionType)).toMatchInlineSnapshot(`
Object {
Expand All @@ -109,6 +112,7 @@ describe('checkActionTypeEnabled', () => {
enabledInConfig: false,
enabledInLicense: true,
isSystemActionType: false,
isDeprecated: false,
};

const isPreconfiguredConnector = true;
Expand All @@ -131,6 +135,7 @@ describe('checkActionFormActionTypeEnabled', () => {
isDeprecated: true,
name: 'test',
referencedByCount: 0,
isConnectorTypeDeprecated: false,
},
{
actionTypeId: '2',
Expand All @@ -140,6 +145,7 @@ describe('checkActionFormActionTypeEnabled', () => {
isSystemAction: false,
name: 'test',
referencedByCount: 0,
isConnectorTypeDeprecated: false,
},
];

Expand All @@ -153,6 +159,7 @@ describe('checkActionFormActionTypeEnabled', () => {
enabledInConfig: false,
enabledInLicense: true,
isSystemActionType: false,
isDeprecated: false,
};

expect(checkActionFormActionTypeEnabled(actionType, preconfiguredConnectors))
Expand All @@ -173,6 +180,7 @@ describe('checkActionFormActionTypeEnabled', () => {
enabledInConfig: false,
enabledInLicense: true,
isSystemActionType: false,
isDeprecated: false,
};
expect(checkActionFormActionTypeEnabled(actionType, preconfiguredConnectors))
.toMatchInlineSnapshot(`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('loadActionTypes', () => {
supported_feature_ids: ['alerting'],
minimum_license_required: 'basic',
is_system_action_type: false,
is_deprecated: false,
},
];
http.get.mockResolvedValueOnce(apiResponseValue);
Expand All @@ -41,6 +42,7 @@ describe('loadActionTypes', () => {
supportedFeatureIds: ['alerting'],
minimumLicenseRequired: 'basic',
isSystemActionType: false,
isDeprecated: false,
},
];

Expand All @@ -65,6 +67,7 @@ describe('loadActionTypes', () => {
supported_feature_ids: ['alerting'],
minimum_license_required: 'basic',
is_system_action_type: false,
is_deprecated: false,
},
];
http.get.mockResolvedValueOnce(apiResponseValue);
Expand All @@ -79,6 +82,7 @@ describe('loadActionTypes', () => {
supportedFeatureIds: ['alerting'],
minimumLicenseRequired: 'basic',
isSystemActionType: false,
isDeprecated: false,
},
];

Expand Down Expand Up @@ -107,6 +111,7 @@ describe('loadActionTypes', () => {
supported_feature_ids: ['alerting'],
minimum_license_required: 'basic',
is_system_action_type: true,
is_deprecated: false,
},
{
id: 'test',
Expand All @@ -117,6 +122,7 @@ describe('loadActionTypes', () => {
supported_feature_ids: ['alerting'],
minimum_license_required: 'basic',
is_system_action_type: false,
is_deprecated: false,
},
];

Expand All @@ -132,6 +138,7 @@ describe('loadActionTypes', () => {
supportedFeatureIds: ['alerting'],
minimumLicenseRequired: 'basic',
isSystemActionType: true,
isDeprecated: false,
},
{
id: 'test',
Expand All @@ -142,6 +149,7 @@ describe('loadActionTypes', () => {
supportedFeatureIds: ['alerting'],
minimumLicenseRequired: 'basic',
isSystemActionType: false,
isDeprecated: false,
},
];

Expand All @@ -166,6 +174,7 @@ describe('loadActionTypes', () => {
supported_feature_ids: ['alerting'],
minimum_license_required: 'basic',
is_system_action_type: true,
is_deprecated: false,
},
{
id: 'test',
Expand All @@ -176,6 +185,7 @@ describe('loadActionTypes', () => {
supported_feature_ids: ['alerting'],
minimum_license_required: 'basic',
is_system_action_type: false,
is_deprecated: false,
},
];

Expand All @@ -191,6 +201,7 @@ describe('loadActionTypes', () => {
supportedFeatureIds: ['alerting'],
minimumLicenseRequired: 'basic',
isSystemActionType: true,
isDeprecated: false,
},
{
id: 'test',
Expand All @@ -201,6 +212,7 @@ describe('loadActionTypes', () => {
supportedFeatureIds: ['alerting'],
minimumLicenseRequired: 'basic',
isSystemActionType: false,
isDeprecated: false,
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe('transformConnectorTypesResponse', () => {
supported_feature_ids: ['stackAlerts'],
is_system_action_type: true,
sub_feature: 'endpointSecurity',
is_deprecated: false,
},
{
id: 'actionType2Id',
Expand All @@ -32,6 +33,7 @@ describe('transformConnectorTypesResponse', () => {
minimum_license_required: 'basic',
supported_feature_ids: ['stackAlerts'],
is_system_action_type: false,
is_deprecated: false,
},
]);

Expand All @@ -46,6 +48,7 @@ describe('transformConnectorTypesResponse', () => {
supportedFeatureIds: ['stackAlerts'],
isSystemActionType: true,
subFeature: 'endpointSecurity',
isDeprecated: false,
},
{
id: 'actionType2Id',
Expand All @@ -56,6 +59,7 @@ describe('transformConnectorTypesResponse', () => {
minimumLicenseRequired: 'basic',
supportedFeatureIds: ['stackAlerts'],
isSystemActionType: false,
isDeprecated: false,
},
]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const transformConnectorType: RewriteRequestCase<ActionType> = ({
supported_feature_ids: supportedFeatureIds,
is_system_action_type: isSystemActionType,
sub_feature: subFeature,
is_deprecated: isDeprecated,
...res
}: AsApiContract<ActionType>) => ({
enabledInConfig,
Expand All @@ -24,6 +25,7 @@ const transformConnectorType: RewriteRequestCase<ActionType> = ({
supportedFeatureIds,
isSystemActionType,
subFeature,
isDeprecated,
...res,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
*/

import { httpServiceMock } from '@kbn/core/public/mocks';
import type { ActionConnectorProps } from '../../types';
import type { ActionConnector } from '../../types';
import { fetchConnectors } from './fetch_connectors';
import { createMockActionConnector } from '../../test_utils/connector.mock';

const http = httpServiceMock.createStartContract();

Expand All @@ -27,24 +28,22 @@ describe('fetchConnectors', () => {
is_missing_secrets: false,
is_system_action: false,
referenced_by_count: 0,
is_connector_type_deprecated: false,
secrets: {},
config: {},
},
];

const resolvedValue: Array<ActionConnectorProps<{}, {}>> = [
{
const resolvedValue: Array<ActionConnector<{}, {}>> = [
createMockActionConnector({
id: 'test-connector',
name: 'Test',
actionTypeId: 'test',
isPreconfigured: false,
isDeprecated: false,
isMissingSecrets: false,
isSystemAction: false,
referencedByCount: 0,
isMissingSecrets: false,
secrets: {},
config: {},
},
}),
];

http.get.mockResolvedValueOnce(apiResponseValue);
Expand All @@ -70,13 +69,12 @@ describe('fetchConnectors', () => {
is_missing_secrets: false,
is_system_action: true,
referenced_by_count: 0,
secrets: {},
config: {},
is_connector_type_deprecated: false,
},
];

const resolvedValue: Array<ActionConnectorProps<{}, {}>> = [
{
const resolvedValue: Array<ActionConnector<{}, {}>> = [
createMockActionConnector({
id: '.test-system-action',
name: 'System action name',
actionTypeId: 'test',
Expand All @@ -85,9 +83,8 @@ describe('fetchConnectors', () => {
isMissingSecrets: false,
isSystemAction: true,
referencedByCount: 0,
secrets: {},
config: {},
},
isConnectorTypeDeprecated: false,
}),
];

http.get.mockResolvedValueOnce(apiResponseValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('transformConnectorsResponse', () => {
referenced_by_count: 0,
secrets: {},
config: {},
is_connector_type_deprecated: false,
},
{
id: 'test-connector-2',
Expand All @@ -35,6 +36,7 @@ describe('transformConnectorsResponse', () => {
referenced_by_count: 0,
secrets: {},
config: {},
is_connector_type_deprecated: true,
},
]);

Expand All @@ -50,6 +52,7 @@ describe('transformConnectorsResponse', () => {
name: 'Test-1',
referencedByCount: 0,
secrets: {},
isConnectorTypeDeprecated: false,
},
{
actionTypeId: 'test-2',
Expand All @@ -62,6 +65,7 @@ describe('transformConnectorsResponse', () => {
name: 'Test-2',
referencedByCount: 0,
secrets: {},
isConnectorTypeDeprecated: true,
},
]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const transformConnector: RewriteRequestCase<
referenced_by_count: referencedByCount,
is_missing_secrets: isMissingSecrets,
is_system_action: isSystemAction,
is_connector_type_deprecated: isConnectorTypeDeprecated,
...res
}) => ({
actionTypeId,
Expand All @@ -35,5 +36,6 @@ const transformConnector: RewriteRequestCase<
referencedByCount,
isMissingSecrets,
isSystemAction,
isConnectorTypeDeprecated,
...res,
});
Loading