-
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
…110149) * Fix upgrades for packages with restructured inputs Addresses errors surfaced when testing upgrades from AWS 0.6.1 to 0.10.4. Namely, when inputs are removed from a package between versions,we were initially throwing errors for each input in the new package that didn't exist on the outdated package version. Now, we instead simply skip over cases like this in which an input no longer exists on the new package version. * Add basic test cases for restructured packages Co-authored-by: Kyle Pollich <[email protected]>
- Loading branch information
1 parent
0fbab51
commit 8834c99
Showing
25 changed files
with
482 additions
and
74 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
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
..._upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/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
...age_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/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
.../package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/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_new | ||
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 |
1 change: 1 addition & 0 deletions
1
...pgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/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
...e_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/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
...ackage_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/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_new_2 | ||
vars: | ||
- name: test_input_new_2_var_1 | ||
type: text | ||
title: Test Input New 2 Var 1 | ||
default: Test Input New 2 Var 1 | ||
required: true | ||
show_user: true | ||
- name: test_input_new_2_var_2 | ||
type: text | ||
title: Test Input New 2 Var 2 | ||
default: Test Input New 2 Var 2 | ||
required: true | ||
show_user: true |
3 changes: 3 additions & 0 deletions
3
...es/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/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 |
27 changes: 27 additions & 0 deletions
27
.../apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/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,27 @@ | ||
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.5.0-restructure-inputs | ||
categories: [] | ||
release: beta | ||
type: integration | ||
license: basic | ||
requirement: | ||
elasticsearch: | ||
versions: '>7.7.0' | ||
kibana: | ||
versions: '>7.7.0' | ||
policy_templates: | ||
- name: package_policy_upgrade | ||
title: Package Policy Upgrade | ||
description: Test Package for Upgrading Package Policies | ||
inputs: | ||
- type: test_input_new | ||
title: Test Input New | ||
description: Test Input New | ||
enabled: true | ||
- type: test_input_new_2 | ||
title: Test Input New 2 | ||
description: Test Input New 2 | ||
enabled: true |
1 change: 1 addition & 0 deletions
1
....6.0-restructure-policy-templates/data_stream/test_stream_new/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
..._upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/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
...olicy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/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_new | ||
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 |
1 change: 1 addition & 0 deletions
1
....0-restructure-policy-templates/data_stream/test_stream_new_2/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
...pgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/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
...icy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/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_new_2 | ||
vars: | ||
- name: test_input_new_2_var_1 | ||
type: text | ||
title: Test Input New 2 Var 1 | ||
default: Test Input New 2 Var 1 | ||
required: true | ||
show_user: true | ||
- name: test_input_new_2_var_2 | ||
type: text | ||
title: Test Input New 2 Var 2 | ||
default: Test Input New 2 Var 2 | ||
required: true | ||
show_user: true |
3 changes: 3 additions & 0 deletions
3
...ckages/package_policy_upgrade/0.6.0-restructure-policy-templates/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 |
Oops, something went wrong.