From e3faca8cdd2be6a8a45c3339ccc7729a844cd5fc Mon Sep 17 00:00:00 2001 From: Cristina Amico Date: Tue, 18 Nov 2025 11:43:55 +0100 Subject: [PATCH 1/2] Add new field migrate_from under policy_templates --- .../integration/data_stream/manifest.spec.yml | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/spec/integration/data_stream/manifest.spec.yml b/spec/integration/data_stream/manifest.spec.yml index ac3114878..7e5d50606 100644 --- a/spec/integration/data_stream/manifest.spec.yml +++ b/spec/integration/data_stream/manifest.spec.yml @@ -69,7 +69,7 @@ spec: type: description: > Data type of variable. - + A duration type is a sequence of decimal numbers, each with a unit suffix, such as "60s", "1m" or "2h45m". Duration values must follow these rules: @@ -117,7 +117,7 @@ spec: secret: description: > Specifying that a variable is secret means that Kibana will store the value - separate from the package policy in a more secure index. + separate from the package policy in a more secure index. This is useful for passwords and other sensitive information. One caveat is that secrets are write-only, once a user writes a secret var they cannot read it again, only overwrite it. @@ -164,6 +164,13 @@ spec: default: description: Default value(s) for variable $ref: "#/definitions/input_variable_value" + migrate_from: + description: > + Previous variable name to migrate value from. + This is useful when renaming variables while maintaining existing user values. + type: string + examples: + - old_variable_name allOf: - if: properties: @@ -360,7 +367,7 @@ spec: description: > Turn the support for subobjects on or off in the mapping configuration for the data stream. - + By default, it's set to `true`, enabling Elasticsearch to expands fields that contain dots in their names to their corresponding object structure. @@ -368,7 +375,7 @@ spec: Setting it to `false` restricts objects from holding subobjects, enabling storing documents with dot-contained field names and common prefixes. - + It is still possible to send documents that have objects to a data stream that has set subobjects to `false`. @@ -378,16 +385,16 @@ spec: PUT my-index-000001 { "mappings": { - "subobjects": false + "subobjects": false } } PUT my-index-000001/_doc/metric_1 { - "time" : "100ms", + "time" : "100ms", "time.min" : "10ms", "time.max" : "900ms" - } + } Before disabling subobjects, consider the following implications: @@ -403,7 +410,7 @@ spec: For comprehensive details on subobjects, refer to the Elasticsearch documentation [^2]. - + [^1]: Auto-flattening limitations are documented at: https://www.elastic.co/guide/en/elasticsearch/reference/master/subobjects.html#_auto_flattening_object_mappings From cc6461440c67493bb899fd123d9e426a5c3011a5 Mon Sep 17 00:00:00 2001 From: Cristina Amico Date: Tue, 18 Nov 2025 14:40:45 +0100 Subject: [PATCH 2/2] Fix position of new variable and add changelog --- spec/changelog.yml | 3 +++ spec/integration/data_stream/manifest.spec.yml | 7 ------- spec/integration/manifest.spec.yml | 9 ++++++++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/spec/changelog.yml b/spec/changelog.yml index 02de3f836..64c4a2363 100644 --- a/spec/changelog.yml +++ b/spec/changelog.yml @@ -15,6 +15,9 @@ - description: Require defining agent version constraints in input and integration packages. type: breaking-change link: https://github.com/elastic/package-spec/pull/999 + - description: Add definition for migrate_from field. + type: enhancement + link: https://github.com/elastic/package-spec/pull/1021 - version: 3.5.3-next changes: - description: Make support for alert rule templates more permissive. diff --git a/spec/integration/data_stream/manifest.spec.yml b/spec/integration/data_stream/manifest.spec.yml index 7e5d50606..34dd887d1 100644 --- a/spec/integration/data_stream/manifest.spec.yml +++ b/spec/integration/data_stream/manifest.spec.yml @@ -164,13 +164,6 @@ spec: default: description: Default value(s) for variable $ref: "#/definitions/input_variable_value" - migrate_from: - description: > - Previous variable name to migrate value from. - This is useful when renaming variables while maintaining existing user values. - type: string - examples: - - old_variable_name allOf: - if: properties: diff --git a/spec/integration/manifest.spec.yml b/spec/integration/manifest.spec.yml index be75cbde3..b105ce854 100644 --- a/spec/integration/manifest.spec.yml +++ b/spec/integration/manifest.spec.yml @@ -124,7 +124,7 @@ spec: - notification # Metrics, logs, and traces collection - observability - # OpenTelemetry + # OpenTelemetry - opentelemetry # Operating system monitoring - os_system @@ -630,6 +630,13 @@ spec: - ["default"] - ["agentless"] - ["default", "agentless"] + migrate_from: + description: > + Previous variable name to migrate value from. + This is useful when renaming variables while maintaining existing user values. + type: string + examples: + - old_input_name required_vars: $ref: "./data_stream/manifest.spec.yml#/definitions/required_vars" vars: