mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Remove application_usage_transactional SO type (#135832)
* Remove application_usage_transactional so type * Fix tests
This commit is contained in:
parent
15190e2c82
commit
54f0579f79
7 changed files with 43 additions and 1119 deletions
|
@ -31,6 +31,11 @@ Object {
|
|||
"type": "apm-services-telemetry",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "application_usage_transactional",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "background-session",
|
||||
|
@ -201,6 +206,11 @@ Object {
|
|||
"type": "apm-services-telemetry",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "application_usage_transactional",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "background-session",
|
||||
|
@ -375,6 +385,11 @@ Object {
|
|||
"type": "apm-services-telemetry",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "application_usage_transactional",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "background-session",
|
||||
|
@ -553,6 +568,11 @@ Object {
|
|||
"type": "apm-services-telemetry",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "application_usage_transactional",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "background-session",
|
||||
|
@ -773,6 +793,11 @@ Object {
|
|||
"type": "apm-services-telemetry",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "application_usage_transactional",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "background-session",
|
||||
|
@ -954,6 +979,11 @@ Object {
|
|||
"type": "apm-services-telemetry",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "application_usage_transactional",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "background-session",
|
||||
|
|
|
@ -35,6 +35,8 @@ export const REMOVED_TYPES: string[] = [
|
|||
'timelion-sheet',
|
||||
// Removed in 8.3 https://github.com/elastic/kibana/issues/127745
|
||||
'ui-counter',
|
||||
// Deprecated, no longer used since 7.13 https://github.com/elastic/kibana/pull/94923/files
|
||||
'application_usage_transactional',
|
||||
].sort();
|
||||
|
||||
// When migrating from the outdated index we use a read query which excludes
|
||||
|
|
|
@ -65,6 +65,11 @@ describe('createInitialState', () => {
|
|||
"type": "apm-services-telemetry",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "application_usage_transactional",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"term": Object {
|
||||
"type": "background-session",
|
||||
|
|
|
@ -24,6 +24,9 @@ async function removeLogFile() {
|
|||
await unlink(logFilePath).catch(() => void 0);
|
||||
}
|
||||
|
||||
/** Number of SO documents dropped during the migration because they belong to an unused type */
|
||||
const UNUSED_SO_COUNT = 4;
|
||||
|
||||
describe('migration from 7.7.2-xpack with 100k objects', () => {
|
||||
let esServer: kbnTestServer.TestElasticsearchUtils;
|
||||
let root: Root;
|
||||
|
@ -122,6 +125,8 @@ describe('migration from 7.7.2-xpack with 100k objects', () => {
|
|||
|
||||
// Use a >= comparison since once Kibana has started it might create new
|
||||
// documents like telemetry tasks
|
||||
expect(migratedIndexResponse.count).toBeGreaterThanOrEqual(oldIndexResponse.count);
|
||||
expect(migratedIndexResponse.count).toBeGreaterThanOrEqual(
|
||||
oldIndexResponse.count - UNUSED_SO_COUNT
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -27,12 +27,6 @@ export interface ApplicationUsageTransactional extends ApplicationUsageTotal {
|
|||
timestamp: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated transactional type is no longer used, and only preserved for backward compatibility
|
||||
* @removeBy 8.0.0
|
||||
*/
|
||||
export const SAVED_OBJECTS_TRANSACTIONAL_TYPE = 'application_usage_transactional';
|
||||
|
||||
/**
|
||||
* Used to aggregate the transactional events into daily summaries so we can purge the granular events
|
||||
*/
|
||||
|
@ -66,16 +60,4 @@ export function registerMappings(registerType: SavedObjectsServiceSetup['registe
|
|||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Type for storing ApplicationUsageTransactional (declaring empty mappings because we don't use the internal fields for query/aggregations)
|
||||
// Remark: this type is deprecated and only here for BWC reasons.
|
||||
registerType({
|
||||
name: SAVED_OBJECTS_TRANSACTIONAL_TYPE,
|
||||
hidden: false,
|
||||
namespaceType: 'agnostic',
|
||||
mappings: {
|
||||
dynamic: false,
|
||||
properties: {},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -287,46 +287,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
"id": "application_usage_transactional:5f01fd40-b0b0-11ea-9510-fdf248d5f2a4",
|
||||
"index": ".kibana_1",
|
||||
"source": {
|
||||
"application_usage_transactional": {
|
||||
"appId": "management",
|
||||
"minutesOnScreen": 1.60245,
|
||||
"numberOfClicks": 6,
|
||||
"timestamp": "2020-06-17T15:36:54.292Z"
|
||||
},
|
||||
"references": [
|
||||
],
|
||||
"type": "application_usage_transactional",
|
||||
"updated_at": "2020-06-17T15:36:54.292Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
"id": "application_usage_transactional:4ca5ac00-b0b0-11ea-9510-fdf248d5f2a4",
|
||||
"index": ".kibana_1",
|
||||
"source": {
|
||||
"application_usage_transactional": {
|
||||
"appId": "home",
|
||||
"minutesOnScreen": 0.4106666666666667,
|
||||
"numberOfClicks": 3,
|
||||
"timestamp": "2020-06-17T15:36:23.487Z"
|
||||
},
|
||||
"references": [
|
||||
],
|
||||
"type": "application_usage_transactional",
|
||||
"updated_at": "2020-06-17T15:36:23.488Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue