From 5bdb5d826ef869fffef4c6200236aa69109b4c3b Mon Sep 17 00:00:00 2001 From: Kevin Delemme Date: Tue, 9 Jan 2024 08:20:09 -0500 Subject: [PATCH] fix(slo): add defer validation to transforms (#174463) --- .../server/assets/transform_templates/slo_transform_template.ts | 1 + .../slo/summary_transform_generator/generators/occurrences.ts | 1 + .../generators/timeslices_calendar_aligned.ts | 1 + .../generators/timeslices_rolling.ts | 1 + .../__snapshots__/apm_transaction_duration.test.ts.snap | 2 ++ .../__snapshots__/apm_transaction_error_rate.test.ts.snap | 2 ++ .../transform_generators/__snapshots__/histogram.test.ts.snap | 2 ++ .../transform_generators/__snapshots__/kql_custom.test.ts.snap | 2 ++ .../__snapshots__/metric_custom.test.ts.snap | 2 ++ .../__snapshots__/timeslice_metric.test.ts.snap | 2 ++ 10 files changed, 16 insertions(+) diff --git a/x-pack/plugins/observability/server/assets/transform_templates/slo_transform_template.ts b/x-pack/plugins/observability/server/assets/transform_templates/slo_transform_template.ts index 118c22425aa76..152517d7aa775 100644 --- a/x-pack/plugins/observability/server/assets/transform_templates/slo_transform_template.ts +++ b/x-pack/plugins/observability/server/assets/transform_templates/slo_transform_template.ts @@ -48,6 +48,7 @@ export const getSLOTransformTemplate = ( group_by: groupBy, aggregations, }, + defer_validation: true, _meta: { version: SLO_RESOURCES_VERSION, managed: true, diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts index 2647e296f5544..3cae531cfeb98 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts @@ -127,6 +127,7 @@ export function generateSummaryTransformForOccurrences(slo: SLO): TransformPutTr deduce_mappings: false, unattended: true, }, + defer_validation: true, _meta: { version: SLO_RESOURCES_VERSION, managed: true, diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts index 6f5c27e5f869a..7fc5d98a94603 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts @@ -157,6 +157,7 @@ export function generateSummaryTransformForTimeslicesAndCalendarAligned( deduce_mappings: false, unattended: true, }, + defer_validation: true, _meta: { version: SLO_RESOURCES_VERSION, managed: true, diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts index a6212f671997b..113df2c4ce72f 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts @@ -129,6 +129,7 @@ export function generateSummaryTransformForTimeslicesAndRolling( deduce_mappings: false, unattended: true, }, + defer_validation: true, _meta: { version: SLO_RESOURCES_VERSION, managed: true, diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap index fbf38f386bb83..e74c237ad1992 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap @@ -422,6 +422,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", @@ -603,6 +604,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap index 515980a9dee54..17b54f94be203 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap @@ -398,6 +398,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", @@ -566,6 +567,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap index d5329ff7db9a7..7381a43902019 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap @@ -79,6 +79,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", @@ -241,6 +242,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap index 0b5dc06be0a58..6b32d508b2319 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap @@ -120,6 +120,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", @@ -255,6 +256,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap index ed5ee454a5596..d18f2f25a1427 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap @@ -119,6 +119,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", @@ -292,6 +293,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap index 48ebb4de1e8d6..13077a79a7b3a 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap @@ -35,6 +35,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3", @@ -259,6 +260,7 @@ Object { "managed_by": "observability", "version": 3, }, + "defer_validation": true, "description": "Rolled-up SLI data for SLO: irrelevant [id: irrelevant, revision: 1]", "dest": Object { "index": ".slo-observability.sli-v3",