-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…10724) * Fix bug when upgrading Windows package policies Ensure package policy merge logics accounts for cases in which an input/stream which previously had no variables declared but has variables in a later package version. Fixes #110202 * Refactor original var set into deepMergeVars Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
- Loading branch information
1 parent
c46b0b3
commit 4352235
Showing
12 changed files
with
238 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
config.version: "2" |
16 changes: 16 additions & 0 deletions
16
...ge_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/fields/fields.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
- name: data_stream.type | ||
type: constant_keyword | ||
description: > | ||
Data stream type. | ||
- name: data_stream.dataset | ||
type: constant_keyword | ||
description: > | ||
Data stream dataset. | ||
- name: data_stream.namespace | ||
type: constant_keyword | ||
description: > | ||
Data stream namespace. | ||
- name: '@timestamp' | ||
type: date | ||
description: > | ||
Event timestamp. |
4 changes: 4 additions & 0 deletions
4
...package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/manifest.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
title: Test stream | ||
type: logs | ||
streams: | ||
- input: test_input |
3 changes: 3 additions & 0 deletions
3
...st_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/docs/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Test package | ||
|
||
This is a test package for testing automated upgrades for package policies |
23 changes: 23 additions & 0 deletions
23
.../fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/manifest.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
format_version: 1.0.0 | ||
name: package_policy_upgrade | ||
title: Tests package policy upgrades | ||
description: This is a test package for upgrading package policies | ||
version: 0.7.0-add-stream-with-no-vars | ||
categories: [] | ||
release: beta | ||
type: integration | ||
license: basic | ||
requirement: | ||
elasticsearch: | ||
versions: '>7.7.0' | ||
kibana: | ||
versions: '>7.7.0' | ||
policy_templates: | ||
- name: package_policy_upgrade_new | ||
title: Package Policy Upgrade New | ||
description: Test Package for Upgrading Package Policies | ||
inputs: | ||
- type: test_input | ||
title: Test Input | ||
description: Test Input | ||
enabled: true |
1 change: 1 addition & 0 deletions
1
...0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
config.version: "2" |
16 changes: 16 additions & 0 deletions
16
...y_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/fields/fields.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
- name: data_stream.type | ||
type: constant_keyword | ||
description: > | ||
Data stream type. | ||
- name: data_stream.dataset | ||
type: constant_keyword | ||
description: > | ||
Data stream dataset. | ||
- name: data_stream.namespace | ||
type: constant_keyword | ||
description: > | ||
Data stream namespace. | ||
- name: '@timestamp' | ||
type: date | ||
description: > | ||
Event timestamp. |
17 changes: 17 additions & 0 deletions
17
...policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/manifest.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
title: Test stream | ||
type: logs | ||
streams: | ||
- input: test_input | ||
vars: | ||
- name: test_var_new | ||
type: text | ||
title: Test Var New | ||
default: Test Var New | ||
required: true | ||
show_user: true | ||
- name: test_var_new_2 | ||
type: text | ||
title: Test Var New 2 | ||
default: Test Var New 2 | ||
required: true | ||
show_user: true |
3 changes: 3 additions & 0 deletions
3
...ges/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/docs/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Test package | ||
|
||
This is a test package for testing automated upgrades for package policies |
23 changes: 23 additions & 0 deletions
23
...s/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/manifest.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
format_version: 1.0.0 | ||
name: package_policy_upgrade | ||
title: Tests package policy upgrades | ||
description: This is a test package for upgrading package policies | ||
version: 0.8.0-add-vars-to-stream-with-no-vars | ||
categories: [] | ||
release: beta | ||
type: integration | ||
license: basic | ||
requirement: | ||
elasticsearch: | ||
versions: '>7.7.0' | ||
kibana: | ||
versions: '>7.7.0' | ||
policy_templates: | ||
- name: package_policy_upgrade_new | ||
title: Package Policy Upgrade New | ||
description: Test Package for Upgrading Package Policies | ||
inputs: | ||
- type: test_input | ||
title: Test Input | ||
description: Test Input | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters