Skip to content

Commit

Permalink
delete unused SO
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlog committed Apr 19, 2023
1 parent 891b39f commit 19d06c7
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 295 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export const REMOVED_TYPES: string[] = [
'csp_rule',
// Removed in 8.8 https://github.com/elastic/kibana/pull/151116
'upgrade-assistant-telemetry',
// Removed in 8.8 https://github.com/elastic/kibana/pull/155204
'endpoint:user-artifact',
].sort();

export const excludeUnusedTypesQuery: QueryDslQueryContainer = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ describe('checking migration metadata changes on all registered SO types', () =>
"core-usage-stats": "b3c04da317c957741ebcdedfea4524049fdc79ff",
"csp-rule-template": "099c229bf97578d9ca72b3a672d397559b84ee0b",
"dashboard": "71e3f8dfcffeb5fbd410dec81ce46f5691763c43",
"endpoint:user-artifact": "1bc8f4ab74f9bb0d90239a431d435c16f31cc32e",
"endpoint:user-artifact-manifest": "17d17827606db55e7499b1dab259263ffee3bb09",
"enterprise_search_telemetry": "4b41830e3b28a16eb92dee0736b44ae6276ced9b",
"epm-packages": "83235af7c95fd9bfb1d70996a5511e05b3fcc9ef",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,6 @@ import { migrations } from './migrations';
export const exceptionsArtifactSavedObjectType = ArtifactConstants.SAVED_OBJECT_TYPE;
export const manifestSavedObjectType = ManifestConstants.SAVED_OBJECT_TYPE;

export const exceptionsArtifactSavedObjectMappings: SavedObjectsType['mappings'] = {
dynamic: false,
properties: {
identifier: {
type: 'keyword',
},
compressionAlgorithm: {
type: 'keyword',
},
encryptionAlgorithm: {
type: 'keyword',
},
encodedSha256: {
type: 'keyword',
},
encodedSize: {
type: 'long',
},
decodedSha256: {
type: 'keyword',
},
decodedSize: {
type: 'long',
},
created: {
type: 'date',
},
body: {
type: 'binary',
},
},
};

export const manifestSavedObjectMappings: SavedObjectsType['mappings'] = {
dynamic: false,
properties: {
Expand All @@ -72,13 +39,6 @@ export const manifestSavedObjectMappings: SavedObjectsType['mappings'] = {
},
};

export const exceptionsArtifactType: SavedObjectsType = {
name: exceptionsArtifactSavedObjectType,
hidden: false,
namespaceType: 'agnostic',
mappings: exceptionsArtifactSavedObjectMappings,
};

export const manifestType: SavedObjectsType = {
name: manifestSavedObjectType,
hidden: false,
Expand Down
21 changes: 9 additions & 12 deletions x-pack/plugins/security_solution/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import type { ITelemetryReceiver } from './lib/telemetry/receiver';
import { TelemetryReceiver } from './lib/telemetry/receiver';
import { licenseService } from './lib/license';
import { PolicyWatcher } from './endpoint/lib/policy/license_watch';
import { migrateArtifactsToFleet } from './endpoint/lib/artifacts/migrate_artifacts_to_fleet';
import previewPolicy from './lib/detection_engine/routes/index/preview_policy.json';
import { createRuleExecutionLogService } from './lib/detection_engine/rule_monitoring';
import { getKibanaPrivilegesFeaturePrivileges, getCasesKibanaFeature } from './features';
Expand Down Expand Up @@ -448,17 +447,15 @@ export class Plugin implements ISecuritySolutionPlugin {

// Migrate artifacts to fleet and then start the minifest task after that is done
plugins.fleet.fleetSetupCompleted().then(() => {
migrateArtifactsToFleet(savedObjectsClient, artifactClient, logger).finally(() => {
logger.info('Dependent plugin setup complete - Starting ManifestTask');

if (this.manifestTask) {
this.manifestTask.start({
taskManager,
});
} else {
logger.error(new Error('User artifacts task not available.'));
}
});
logger.info('Dependent plugin setup complete - Starting ManifestTask');

if (this.manifestTask) {
this.manifestTask.start({
taskManager,
});
} else {
logger.error(new Error('User artifacts task not available.'));
}
});

// License related start
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/security_solution/server/saved_objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { legacyType as legacyRuleActionsType } from './lib/detection_engine/rule
import { prebuiltRuleAssetType } from './lib/detection_engine/prebuilt_rules';
import { type as signalsMigrationType } from './lib/detection_engine/migrations/saved_objects';
import {
exceptionsArtifactType,
manifestType,
} from './endpoint/lib/artifacts/saved_object_mappings';

Expand All @@ -23,7 +22,6 @@ const types = [
legacyRuleActionsType,
prebuiltRuleAssetType,
timelineType,
exceptionsArtifactType,
manifestType,
signalsMigrationType,
];
Expand Down

0 comments on commit 19d06c7

Please sign in to comment.