diff --git a/x-pack/plugins/infra/common/source_configuration/defaults.ts b/x-pack/plugins/infra/common/source_configuration/defaults.ts index a18cec903b60b..ac3724c80d70a 100644 --- a/x-pack/plugins/infra/common/source_configuration/defaults.ts +++ b/x-pack/plugins/infra/common/source_configuration/defaults.ts @@ -16,9 +16,6 @@ export const defaultSourceConfiguration: InfraSourceConfiguration = { type: 'index_name', indexName: LOGS_INDEX_PATTERN, }, - fields: { - message: ['message', '@message'], - }, inventoryDefaultView: '0', metricsExplorerDefaultView: '0', logColumns: [ diff --git a/x-pack/plugins/infra/common/source_configuration/source_configuration.ts b/x-pack/plugins/infra/common/source_configuration/source_configuration.ts index 8881b5fab5f5f..b23c9478e3335 100644 --- a/x-pack/plugins/infra/common/source_configuration/source_configuration.ts +++ b/x-pack/plugins/infra/common/source_configuration/source_configuration.ts @@ -17,29 +17,8 @@ /* eslint-disable @typescript-eslint/no-empty-interface */ -import { omit } from 'lodash'; import * as rt from 'io-ts'; -/** - * Source configuration config file properties. - * These are properties that can appear in the kibana.yml file. - * This is a legacy method of providing properties, and will be deprecated in the future (v 8.0.0). - */ - -export const sourceConfigurationConfigFilePropertiesRT = rt.type({ - sources: rt.type({ - default: rt.partial({ - fields: rt.partial({ - message: rt.array(rt.string), - }), - }), - }), -}); - -export type SourceConfigurationConfigFileProperties = rt.TypeOf< - typeof sourceConfigurationConfigFilePropertiesRT ->; - /** * Log columns */ @@ -104,18 +83,6 @@ export type LogIndexNameReference = rt.TypeOf; export const logIndexReferenceRT = rt.union([logIndexPatternReferenceRT, logIndexNameReferenceRT]); export type LogIndexReference = rt.TypeOf; -/** - * Fields - */ - -const SourceConfigurationFieldsRT = rt.type({ - message: rt.array(rt.string), -}); - -/** - * Properties that represent a full source configuration, which is the result of merging static values with - * saved values. - */ export const SourceConfigurationRT = rt.type({ name: rt.string, description: rt.string, @@ -123,7 +90,6 @@ export const SourceConfigurationRT = rt.type({ logIndices: logIndexReferenceRT, inventoryDefaultView: rt.string, metricsExplorerDefaultView: rt.string, - fields: SourceConfigurationFieldsRT, logColumns: rt.array(SourceConfigurationColumnRuntimeType), anomalyThreshold: rt.number, }); @@ -131,20 +97,8 @@ export const SourceConfigurationRT = rt.type({ /** * Stored source configuration as read from and written to saved objects */ -const SavedSourceConfigurationFieldsRuntimeType = rt.partial( - omit(SourceConfigurationFieldsRT.props, ['message']) -); -export type InfraSavedSourceConfigurationFields = rt.TypeOf< - typeof SavedSourceConfigurationFieldsRuntimeType ->; - -export const SavedSourceConfigurationRuntimeType = rt.intersection([ - rt.partial(omit(SourceConfigurationRT.props, ['fields'])), - rt.partial({ - fields: SavedSourceConfigurationFieldsRuntimeType, - }), -]); +export const SavedSourceConfigurationRuntimeType = rt.partial(SourceConfigurationRT.props); export interface InfraSavedSourceConfiguration extends rt.TypeOf {} @@ -154,10 +108,8 @@ export interface InfraSavedSourceConfiguration * hardcoded defaults. */ -const StaticSourceConfigurationFieldsRuntimeType = rt.partial(SourceConfigurationFieldsRT.props); export const StaticSourceConfigurationRuntimeType = rt.partial({ ...SourceConfigurationRT.props, - fields: StaticSourceConfigurationFieldsRuntimeType, }); export interface InfraStaticSourceConfiguration @@ -167,11 +119,8 @@ export interface InfraStaticSourceConfiguration * Full source configuration type after all cleanup has been done at the edges */ -export type InfraSourceConfigurationFields = rt.TypeOf; - export const SourceConfigurationRuntimeType = rt.type({ ...SourceConfigurationRT.props, - fields: SourceConfigurationFieldsRT, logColumns: rt.array(SourceConfigurationColumnRuntimeType), }); diff --git a/x-pack/plugins/infra/server/deprecations.test.ts b/x-pack/plugins/infra/server/deprecations.test.ts deleted file mode 100644 index 318f1e50d6662..0000000000000 --- a/x-pack/plugins/infra/server/deprecations.test.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { getInfraDeprecationsFactory } from './deprecations'; - -describe('Infra plugin deprecations', () => { - describe('Source configuration deprecations', () => { - test('returns no deprecations when all fields are set to the default values', async () => { - const sources = { - getAllSourceConfigurations: () => [ - { - configuration: { - name: 'Default', - fields: { - timestamp: '@timestamp', - tiebreaker: '_doc', - container: 'container.id', - host: 'host.name', - pod: 'kubernetes.pod.uid', - }, - }, - }, - { - configuration: { - name: 'Alternate', - fields: { - timestamp: '@timestamp', - tiebreaker: '_doc', - container: 'container.id', - host: 'host.name', - pod: 'kubernetes.pod.uid', - }, - }, - }, - ], - }; - const getDeprecations = getInfraDeprecationsFactory(sources as any); - const deprecations = await getDeprecations({} as any); - expect(deprecations.length).toBe(0); - }); - }); - test('returns expected deprecations when some fields are not set to default values in one or more source configurations', async () => { - const sources = { - getAllSourceConfigurations: () => [ - { - configuration: { - name: 'Default', - fields: { - timestamp: 'not-@timestamp', - tiebreaker: '_doc', - container: 'not-container.id', - host: 'host.name', - pod: 'not-kubernetes.pod.uid', - }, - }, - }, - { - configuration: { - name: 'Alternate', - fields: { - timestamp: 'not-@timestamp', - tiebreaker: 'not-_doc', - container: 'container.id', - host: 'not-host.name', - pod: 'kubernetes.pod.uid', - }, - }, - }, - ], - }; - const getDeprecations = getInfraDeprecationsFactory(sources as any); - const deprecations = await getDeprecations({} as any); - expect(deprecations.length).toBe(5); - expect( - deprecations.map((d) => - d.title.replace(/Source configuration field "(.*)" is deprecated./, '$1') - ) - ).toEqual( - expect.arrayContaining(['timestamp', 'tiebreaker', 'container ID', 'host name', 'pod ID']) - ); - }); -}); diff --git a/x-pack/plugins/infra/server/deprecations.ts b/x-pack/plugins/infra/server/deprecations.ts deleted file mode 100644 index 93d93f32ff5c0..0000000000000 --- a/x-pack/plugins/infra/server/deprecations.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -import { get } from 'lodash'; -import { - ConfigDeprecationProvider, - ConfigDeprecation, - DeprecationsDetails, - GetDeprecationsContext, -} from '@kbn/core/server'; -import { - TIMESTAMP_FIELD, - TIEBREAKER_FIELD, - CONTAINER_FIELD, - HOST_FIELD, - POD_FIELD, -} from '../common/constants'; -import { InfraSources } from './lib/sources'; - -const deprecatedFieldMessage = (fieldName: string, defaultValue: string, configNames: string[]) => - i18n.translate('xpack.infra.deprecations.deprecatedFieldDescription', { - defaultMessage: - 'Configuring the "{fieldName}" field has been deprecated and will be removed in 8.0.0. This plugin is designed to work with ECS, and expects this field to have a value of `{defaultValue}`. It has a different value configured in Source {configCount, plural, one {Configuration} other {Configurations}}: {configNames}', - values: { - fieldName, - defaultValue, - configNames: configNames.join(', '), - configCount: configNames.length, - }, - }); - -const DEFAULT_VALUES = { - timestamp: TIMESTAMP_FIELD, - tiebreaker: TIEBREAKER_FIELD, - container: CONTAINER_FIELD, - host: HOST_FIELD, - pod: POD_FIELD, -}; - -const FIELD_DEPRECATION_FACTORIES: Record DeprecationsDetails> = - { - timestamp: (configNames) => ({ - level: 'critical', - title: i18n.translate('xpack.infra.deprecations.timestampFieldTitle', { - defaultMessage: 'Source configuration field "timestamp" is deprecated.', - }), - message: deprecatedFieldMessage( - i18n.translate('xpack.infra.deprecations.timestampFieldName', { - defaultMessage: 'timestamp', - }), - DEFAULT_VALUES.timestamp, - configNames - ), - correctiveActions: { - manualSteps: [ - i18n.translate('xpack.infra.deprecations.timestampAdjustIndexing', { - defaultMessage: 'Adjust your indexing to use "{field}" as a timestamp.', - values: { field: '@timestamp' }, - }), - ], - }, - }), - tiebreaker: (configNames) => ({ - level: 'critical', - title: i18n.translate('xpack.infra.deprecations.tiebreakerFieldTitle', { - defaultMessage: 'Source configuration field "tiebreaker" is deprecated.', - }), - message: deprecatedFieldMessage( - i18n.translate('xpack.infra.deprecations.tiebreakerFieldName', { - defaultMessage: 'tiebreaker', - }), - DEFAULT_VALUES.tiebreaker, - configNames - ), - correctiveActions: { - manualSteps: [ - i18n.translate('xpack.infra.deprecations.tiebreakerAdjustIndexing', { - defaultMessage: 'Adjust your indexing to use "{field}" as a tiebreaker.', - values: { field: '_doc' }, - }), - ], - }, - }), - host: (configNames) => ({ - level: 'critical', - title: i18n.translate('xpack.infra.deprecations.hostnameFieldTitle', { - defaultMessage: 'Source configuration field "host name" is deprecated.', - }), - message: deprecatedFieldMessage( - i18n.translate('xpack.infra.deprecations.hostnameFieldName', { - defaultMessage: 'host name', - }), - DEFAULT_VALUES.host, - configNames - ), - correctiveActions: { - manualSteps: [ - i18n.translate('xpack.infra.deprecations.hostAdjustIndexing', { - defaultMessage: 'Adjust your indexing to identify hosts using "{field}"', - values: { field: 'host.name' }, - }), - ], - }, - }), - pod: (configNames) => ({ - level: 'critical', - title: i18n.translate('xpack.infra.deprecations.podIdFieldTitle', { - defaultMessage: 'Source configuration field "pod ID" is deprecated.', - }), - message: deprecatedFieldMessage( - i18n.translate('xpack.infra.deprecations.podIdFieldName', { defaultMessage: 'pod ID' }), - DEFAULT_VALUES.pod, - configNames - ), - correctiveActions: { - manualSteps: [ - i18n.translate('xpack.infra.deprecations.podAdjustIndexing', { - defaultMessage: 'Adjust your indexing to identify Kubernetes pods using "{field}"', - values: { field: 'kubernetes.pod.uid' }, - }), - ], - }, - }), - container: (configNames) => ({ - level: 'critical', - title: i18n.translate('xpack.infra.deprecations.containerIdFieldTitle', { - defaultMessage: 'Source configuration field "container ID" is deprecated.', - }), - message: deprecatedFieldMessage( - i18n.translate('xpack.infra.deprecations.containerIdFieldName', { - defaultMessage: 'container ID', - }), - DEFAULT_VALUES.container, - configNames - ), - correctiveActions: { - manualSteps: [ - i18n.translate('xpack.infra.deprecations.containerAdjustIndexing', { - defaultMessage: 'Adjust your indexing to identify Docker containers using "{field}"', - values: { field: 'container.id' }, - }), - ], - }, - }), - }; - -export const configDeprecations: ConfigDeprecationProvider = ({ deprecate }) => [ - ...Object.keys(FIELD_DEPRECATION_FACTORIES).map( - (key): ConfigDeprecation => - (completeConfig, rootPath, addDeprecation) => { - const configuredValue = get(completeConfig, `xpack.infra.sources.default.fields.${key}`); - if (typeof configuredValue === 'undefined') { - return completeConfig; - } - addDeprecation({ - title: i18n.translate('xpack.infra.deprecations.deprecatedFieldConfigTitle', { - defaultMessage: '"{fieldKey}" is deprecated.', - values: { - fieldKey: key, - }, - }), - message: i18n.translate('xpack.infra.deprecations.deprecatedFieldConfigDescription', { - defaultMessage: - 'Configuring "xpack.infra.sources.default.fields.{fieldKey}" has been deprecated and will be removed in 8.0.0.', - values: { - fieldKey: key, - }, - }), - level: 'warning', - correctiveActions: { - manualSteps: [ - i18n.translate('xpack.infra.deprecations.removeConfigField', { - defaultMessage: - 'Remove "xpack.infra.sources.default.fields.{fieldKey}" from your Kibana configuration.', - values: { fieldKey: key }, - }), - ], - }, - } as Parameters[0]); - - return completeConfig; - } - ), -]; - -export const getInfraDeprecationsFactory = - (sources: InfraSources) => - async ({ savedObjectsClient }: GetDeprecationsContext) => { - const deprecatedFieldsToSourceConfigMap: Map = new Map(); - const sourceConfigurations = await sources.getAllSourceConfigurations(savedObjectsClient); - - for (const { configuration } of sourceConfigurations) { - const { name, fields } = configuration; - for (const [key, defaultValue] of Object.entries(DEFAULT_VALUES)) { - const configuredValue = Reflect.get(fields, key); - if (configuredValue !== undefined && configuredValue !== defaultValue) { - const affectedConfigNames = deprecatedFieldsToSourceConfigMap.get(key) ?? []; - affectedConfigNames.push(name); - deprecatedFieldsToSourceConfigMap.set(key, affectedConfigNames); - } - } - } - - const deprecations: DeprecationsDetails[] = []; - if (deprecatedFieldsToSourceConfigMap.size > 0) { - for (const [fieldName, affectedConfigNames] of deprecatedFieldsToSourceConfigMap.entries()) { - const deprecationFactory = Reflect.get(FIELD_DEPRECATION_FACTORIES, fieldName); - deprecations.push(deprecationFactory(affectedConfigNames)); - } - } - - return deprecations; - }; diff --git a/x-pack/plugins/infra/server/lib/sources/migrations/create_test_source_configuration.ts b/x-pack/plugins/infra/server/lib/sources/migrations/create_test_source_configuration.ts index bdef0bf02390a..307287dfc4c62 100644 --- a/x-pack/plugins/infra/server/lib/sources/migrations/create_test_source_configuration.ts +++ b/x-pack/plugins/infra/server/lib/sources/migrations/create_test_source_configuration.ts @@ -16,9 +16,6 @@ export const createTestSourceConfiguration = ( attributes: { name: 'TEST CONFIGURATION', description: '', - fields: { - message: ['TEST MESSAGE FIELD'], - }, inventoryDefaultView: '0', metricsExplorerDefaultView: '0', logColumns: [ diff --git a/x-pack/plugins/infra/server/lib/sources/saved_object_references.test.ts b/x-pack/plugins/infra/server/lib/sources/saved_object_references.test.ts index fb550390e25be..4ca2f51cf9385 100644 --- a/x-pack/plugins/infra/server/lib/sources/saved_object_references.test.ts +++ b/x-pack/plugins/infra/server/lib/sources/saved_object_references.test.ts @@ -100,9 +100,6 @@ describe('resolveSavedObjectReferences function', () => { const sourceConfigurationWithIndexPatternReference: InfraSourceConfiguration = { name: 'NAME', description: 'DESCRIPTION', - fields: { - message: ['MESSAGE_FIELD'], - }, logColumns: [], logIndices: { type: 'index_pattern', diff --git a/x-pack/plugins/infra/server/lib/sources/sources.ts b/x-pack/plugins/infra/server/lib/sources/sources.ts index c31f127bc3aba..d565ad1b64f2d 100644 --- a/x-pack/plugins/infra/server/lib/sources/sources.ts +++ b/x-pack/plugins/infra/server/lib/sources/sources.ts @@ -6,7 +6,7 @@ */ import { fold, map } from 'fp-ts/lib/Either'; -import { constant, identity } from 'fp-ts/lib/function'; +import { identity } from 'fp-ts/lib/function'; import { pipe } from 'fp-ts/lib/pipeable'; import { failure } from 'io-ts/lib/PathReporter'; import { inRange } from 'lodash'; @@ -21,8 +21,6 @@ import { InfraSource, InfraSourceConfiguration, InfraStaticSourceConfiguration, - SourceConfigurationConfigFileProperties, - sourceConfigurationConfigFilePropertiesRT, } from '../../../common/source_configuration/source_configuration'; import { SourceConfigurationSavedObjectRT } from '.'; import { InfraConfig } from '../..'; @@ -53,17 +51,13 @@ export class InfraSources { savedObjectsClient: SavedObjectsClientContract, sourceId: string ): Promise { - const staticDefaultSourceConfiguration = await this.getStaticDefaultSourceConfiguration(); const savedSourceConfiguration = await this.getSavedSourceConfiguration( savedObjectsClient, sourceId ) .then((result) => ({ ...result, - configuration: mergeSourceConfiguration( - staticDefaultSourceConfiguration, - result.configuration - ), + configuration: mergeSourceConfiguration(defaultSourceConfiguration, result.configuration), })) .catch((err) => SavedObjectsErrorHelpers.isNotFoundError(err) @@ -72,7 +66,7 @@ export class InfraSources { version: undefined, updatedAt: undefined, origin: 'fallback' as 'fallback', - configuration: staticDefaultSourceConfiguration, + configuration: defaultSourceConfiguration, }) : Promise.reject(err) ); @@ -96,8 +90,6 @@ export class InfraSources { } public async getAllSourceConfigurations(savedObjectsClient: SavedObjectsClientContract) { - const staticDefaultSourceConfiguration = await this.getStaticDefaultSourceConfiguration(); - const savedSourceConfigurations = await this.getAllSavedSourceConfigurations( savedObjectsClient ); @@ -105,7 +97,7 @@ export class InfraSources { return savedSourceConfigurations.map((savedSourceConfiguration) => ({ ...savedSourceConfiguration, configuration: mergeSourceConfiguration( - staticDefaultSourceConfiguration, + defaultSourceConfiguration, savedSourceConfiguration.configuration ), })); @@ -116,15 +108,11 @@ export class InfraSources { sourceId: string, source: InfraSavedSourceConfiguration ) { - const staticDefaultSourceConfiguration = await this.getStaticDefaultSourceConfiguration(); const { anomalyThreshold } = source; if (anomalyThreshold && !inRange(anomalyThreshold, 0, 101)) throw new AnomalyThresholdRangeError('Anomaly threshold must be 1-100'); - const newSourceConfiguration = mergeSourceConfiguration( - staticDefaultSourceConfiguration, - source - ); + const newSourceConfiguration = mergeSourceConfiguration(defaultSourceConfiguration, source); const { attributes, references } = extractSavedObjectReferences(newSourceConfiguration); const createdSourceConfiguration = convertSavedObjectToSavedSourceConfiguration( @@ -142,7 +130,7 @@ export class InfraSources { return { ...createdSourceConfiguration, configuration: mergeSourceConfiguration( - staticDefaultSourceConfiguration, + defaultSourceConfiguration, createdSourceConfiguration.configuration ), }; @@ -160,7 +148,6 @@ export class InfraSources { sourceId: string, sourceProperties: InfraSavedSourceConfiguration ) { - const staticDefaultSourceConfiguration = await this.getStaticDefaultSourceConfiguration(); const { anomalyThreshold } = sourceProperties; if (anomalyThreshold && !inRange(anomalyThreshold, 0, 101)) @@ -198,23 +185,12 @@ export class InfraSources { return { ...updatedSourceConfiguration, configuration: mergeSourceConfiguration( - staticDefaultSourceConfiguration, + defaultSourceConfiguration, updatedSourceConfiguration.configuration ), }; } - private async getStaticDefaultSourceConfiguration() { - const staticSourceConfiguration: SourceConfigurationConfigFileProperties['sources']['default'] = - pipe( - sourceConfigurationConfigFilePropertiesRT.decode(this.libs.config), - map(({ sources: { default: defaultConfiguration } }) => defaultConfiguration), - fold(constant({}), identity) - ); - - return mergeSourceConfiguration(defaultSourceConfiguration, staticSourceConfiguration); - } - private async getSavedSourceConfiguration( savedObjectsClient: SavedObjectsClientContract, sourceId: string @@ -244,10 +220,6 @@ export const mergeSourceConfiguration = ( (previousSourceConfiguration, currentSourceConfiguration) => ({ ...previousSourceConfiguration, ...currentSourceConfiguration, - fields: { - ...previousSourceConfiguration.fields, - ...currentSourceConfiguration.fields, - }, }), first ); diff --git a/x-pack/plugins/infra/server/lib/sources/types.ts b/x-pack/plugins/infra/server/lib/sources/types.ts index 7c2448dc48018..22cc5108c35c9 100644 --- a/x-pack/plugins/infra/server/lib/sources/types.ts +++ b/x-pack/plugins/infra/server/lib/sources/types.ts @@ -73,7 +73,6 @@ export const SourceConfigurationSavedObjectAttributesRT = rt.type({ logIndices: logIndexSavedObjectReferenceRT, inventoryDefaultView: rt.string, metricsExplorerDefaultView: rt.string, - fields: rt.record(rt.string, rt.unknown), logColumns: rt.array(SourceConfigurationSavedObjectColumnRT), anomalyThreshold: rt.number, }); diff --git a/x-pack/plugins/infra/server/plugin.ts b/x-pack/plugins/infra/server/plugin.ts index 04d1b41c04bf8..6a2734b399199 100644 --- a/x-pack/plugins/infra/server/plugin.ts +++ b/x-pack/plugins/infra/server/plugin.ts @@ -21,7 +21,6 @@ import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; import { GetMetricIndicesOptions } from '@kbn/metrics-data-access-plugin/server'; import { LOGS_FEATURE_ID, METRICS_FEATURE_ID } from '../common/constants'; import { publicConfigKeys } from '../common/plugin_config_types'; -import { configDeprecations, getInfraDeprecationsFactory } from './deprecations'; import { LOGS_FEATURE, METRICS_FEATURE } from './features'; import { initInfraServer } from './infra_server'; import { FrameworkFieldsAdapter } from './lib/adapters/fields/framework_fields_adapter'; @@ -115,7 +114,6 @@ export const config: PluginConfigDescriptor = { }), }), }), - deprecations: configDeprecations, exposeToBrowser: publicConfigKeys, }; @@ -275,11 +273,6 @@ export class InfraServerPlugin // Telemetry UsageCollector.registerUsageCollector(plugins.usageCollection); - // register deprecated source configuration fields - core.deprecations.registerDeprecations({ - getDeprecations: getInfraDeprecationsFactory(sources), - }); - return { inventoryViews, metricsExplorerViews, diff --git a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts index c019fcbfb909e..cea45fc94bd07 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts @@ -46,9 +46,6 @@ const source: InfraSource = { type: 'index_pattern', indexPatternId: 'kibana_index_pattern', }, - fields: { - message: ['message', '@message'], - }, inventoryDefaultView: '0', metricsExplorerDefaultView: '0', logColumns: [ diff --git a/x-pack/plugins/infra/server/services/inventory_views/inventory_views_client.test.ts b/x-pack/plugins/infra/server/services/inventory_views/inventory_views_client.test.ts index 7ec614dbbfe22..89c5b17d3c402 100644 --- a/x-pack/plugins/infra/server/services/inventory_views/inventory_views_client.test.ts +++ b/x-pack/plugins/infra/server/services/inventory_views/inventory_views_client.test.ts @@ -202,9 +202,6 @@ const basicTestSourceConfiguration: InfraSource = { indexPatternId: 'INDEX_PATTERN_ID', }, logColumns: [], - fields: { - message: [], - }, metricAlias: 'METRIC_ALIAS', inventoryDefaultView: '0', metricsExplorerDefaultView: 'METRICS_EXPLORER_DEFAULT_VIEW', diff --git a/x-pack/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.test.ts b/x-pack/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.test.ts index 791b7366f086c..6b8de7a724f16 100644 --- a/x-pack/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.test.ts +++ b/x-pack/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.test.ts @@ -209,9 +209,6 @@ const basicTestSourceConfiguration: InfraSource = { indexPatternId: 'INDEX_PATTERN_ID', }, logColumns: [], - fields: { - message: [], - }, metricAlias: 'METRIC_ALIAS', inventoryDefaultView: '0', metricsExplorerDefaultView: '0', diff --git a/x-pack/plugins/infra/server/utils/map_source_to_log_view.test.ts b/x-pack/plugins/infra/server/utils/map_source_to_log_view.test.ts index 38db985a28280..168a208f15e60 100644 --- a/x-pack/plugins/infra/server/utils/map_source_to_log_view.test.ts +++ b/x-pack/plugins/infra/server/utils/map_source_to_log_view.test.ts @@ -48,9 +48,6 @@ const basicTestSourceConfiguration: InfraSource = { indexPatternId: 'INDEX_PATTERN_ID', }, logColumns: [], - fields: { - message: [], - }, metricAlias: 'METRIC_ALIAS', inventoryDefaultView: 'INVENTORY_DEFAULT_VIEW', metricsExplorerDefaultView: 'METRICS_EXPLORER_DEFAULT_VIEW',