From 0f1109dbfd3ba669d9c0f88e202cca1c56e083f9 Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Thu, 7 Dec 2023 10:08:45 +0100 Subject: [PATCH] [EBT] fix browser-side elasticsearch context schema (#172676) ## Summary The `cluster_build_flavor` was propagated to the browser-side and then used in the context, but without being explicitly defined in the schema. this PR fixes it by properly adding the field. (cherry picked from commit 754c298d12f9c51334a35d0c8b0681da0126276e) --- .../core-analytics-browser-internal/src/analytics_service.ts | 4 ++++ .../core-injected-metadata-common-internal/src/types.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.ts b/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.ts index 60656e9dfd1cb..fc394702eadfa 100644 --- a/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.ts +++ b/packages/core/analytics/core-analytics-browser-internal/src/analytics_service.ts @@ -184,6 +184,10 @@ export class AnalyticsService { type: 'keyword', _meta: { description: 'The Cluster version', optional: true }, }, + cluster_build_flavor: { + type: 'keyword', + _meta: { description: 'The Cluster build flavor', optional: true }, + }, }, }); } diff --git a/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts b/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts index dd9d6bced5c98..01b46679c7452 100644 --- a/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts +++ b/packages/core/injected-metadata/core-injected-metadata-common-internal/src/types.ts @@ -16,6 +16,7 @@ export interface InjectedMetadataClusterInfo { cluster_uuid?: string; cluster_name?: string; cluster_version?: string; + cluster_build_flavor?: string; } /** @internal */