-
Notifications
You must be signed in to change notification settings - Fork 129
Support policy tests in input packages with input type otelcol #2873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
acedfd0
2c5c553
6f8de38
b19a6d8
304ef01
6b25a60
b649672
0ad6db6
37b53c9
5fe45aa
94ed714
ad580ae
b5ac0b5
a5e135a
2e85b42
50de2aa
075be2a
68f0e09
6c0ccf4
ea59a6b
3750339
c68ae5c
640a700
0c5483c
7a7dc37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,7 +121,7 @@ output_permissions: | |
| - monitor | ||
| _elastic_agent_monitoring: | ||
| indices: [] | ||
| uuid-for-permissions-on-related-indices: | ||
| 8d024b11-4e82-4192-8e7f-be71d1b13aac: | ||
| indices: | ||
| - names: | ||
| - metrics-*-* | ||
|
|
@@ -221,7 +221,7 @@ output_permissions: | |
| - monitor | ||
| _elastic_agent_monitoring: | ||
| indices: [] | ||
| uuid-for-permissions-on-related-indices: | ||
| bfe4f402-df02-4673-8a71-fd5b29f1e2f3: | ||
| indices: | ||
| - names: | ||
| - metrics-*-* | ||
|
|
@@ -285,6 +285,194 @@ secret_references: | |
| `, | ||
| equal: false, | ||
| }, | ||
| { | ||
| title: "otel ids", | ||
| expected: ` | ||
| inputs: [] | ||
| output_permissions: | ||
| default: | ||
| _elastic_agent_checks: | ||
| cluster: | ||
| - monitor | ||
| _elastic_agent_monitoring: | ||
| indices: [] | ||
| 05c98f91-203c-44a9-bee7-dd621c9bd37e: | ||
| indices: | ||
| - names: | ||
| - logs-*-* | ||
| privileges: | ||
| - auto_configure | ||
| - create_doc | ||
| extensions: | ||
| health_check/31c94f44-214a-4778-8a36-acc2634096f7: {} | ||
| processors: | ||
| batch/11c35ad0-4351-49d4-9c78-fa679ce9d950: | ||
| send_batch_size: 10 | ||
| timeout: 1s | ||
| batch/e6e379c5-6446-4090-af10-a9e5f8fc4640: | ||
| send_batch_size: 10000 | ||
| timeout: 10s | ||
|
Comment on lines
+308
to
+314
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the current implementation, this could fail in some test executions: Working to replace the OTEL ids (directly on the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hopefully, this is solved by replacing the OTEL IDs before cleaning up the policy with the current filters. This was added in 50de2aa |
||
| receivers: | ||
| httpcheck/4bae34b3-8f66-49c1-b04f-d58af1b5f743: | ||
| collection_interval: 1m | ||
| targets: | ||
| - endpoints: | ||
| - https://epr.elastic.co | ||
| method: GET | ||
| secret_references: [] | ||
| service: | ||
| extensions: | ||
| - health_check/31c94f44-214a-4778-8a36-acc2634096f7 | ||
| pipelines: | ||
| logs: | ||
| receivers: | ||
| - httpcheck/4bae34b3-8f66-49c1-b04f-d58af1b5f743 | ||
| processors: | ||
| - batch/11c35ad0-4351-49d4-9c78-fa679ce9d950 | ||
| - batch/e6e379c5-6446-4090-af10-a9e5f8fc4640 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is likely going to change as more plumbing is needed, see elastic/kibana#233090. But we can go on with this change and regenerate files later. |
||
|
|
||
| `, | ||
| found: ` | ||
| inputs: [] | ||
| output_permissions: | ||
| default: | ||
| _elastic_agent_checks: | ||
| cluster: | ||
| - monitor | ||
| aeb4d606-2d90-4b41-b231-27bfad6dea09: | ||
| indices: | ||
| - names: | ||
| - logs-*-* | ||
| privileges: | ||
| - auto_configure | ||
| - create_doc | ||
| _elastic_agent_monitoring: | ||
| indices: [] | ||
| extensions: | ||
| health_check/4391d954-1ffe-4014-a256-5eda78a71829: {} | ||
| processors: | ||
| batch/567fce7a-ff2e-4a6c-a32a-0abb4671b39b: | ||
| send_batch_size: 10 | ||
| timeout: 1s | ||
| batch/8ec6ee99-2176-4231-9668-908069c77784: | ||
| send_batch_size: 10000 | ||
| timeout: 10s | ||
| receivers: | ||
| httpcheck/b0f518d6-4e2d-4c5d-bda7-f9808df537b7: | ||
| collection_interval: 1m | ||
| targets: | ||
| - endpoints: | ||
| - https://epr.elastic.co | ||
| method: GET | ||
| secret_references: [] | ||
| service: | ||
| extensions: | ||
| - health_check/4391d954-1ffe-4014-a256-5eda78a71829 | ||
| pipelines: | ||
| logs: | ||
| receivers: | ||
| - httpcheck/b0f518d6-4e2d-4c5d-bda7-f9808df537b7 | ||
| processors: | ||
| - batch/567fce7a-ff2e-4a6c-a32a-0abb4671b39b | ||
| - batch/8ec6ee99-2176-4231-9668-908069c77784 | ||
|
|
||
| `, | ||
| equal: true, | ||
| }, | ||
| { | ||
| title: "otel hardcode expected ids", | ||
| expected: ` | ||
| inputs: [] | ||
| output_permissions: | ||
| default: | ||
| _elastic_agent_checks: | ||
| cluster: | ||
| - monitor | ||
| _elastic_agent_monitoring: | ||
| indices: [] | ||
| 05c98f91-203c-44a9-bee7-dd621c9bd37e: | ||
| indices: | ||
| - names: | ||
| - logs-*-* | ||
| privileges: | ||
| - auto_configure | ||
| - create_doc | ||
| extensions: | ||
| health_check/componentid-0: {} | ||
| processors: | ||
| batch/componentid-0: | ||
| send_batch_size: 10 | ||
| timeout: 1s | ||
| batch/componentid-1: | ||
| send_batch_size: 10000 | ||
| timeout: 10s | ||
| receivers: | ||
| httpcheck/componentid-0: | ||
| collection_interval: 1m | ||
| targets: | ||
| - endpoints: | ||
| - https://epr.elastic.co | ||
| method: GET | ||
| secret_references: [] | ||
| service: | ||
| extensions: | ||
| - health_check/componentid-0 | ||
| pipelines: | ||
| logs: | ||
| receivers: | ||
| - httpcheck/componentid-0 | ||
| processors: | ||
| - batch/componentid-0 | ||
| - batch/componentid-1 | ||
|
|
||
| `, | ||
| found: ` | ||
| inputs: [] | ||
| output_permissions: | ||
| default: | ||
| _elastic_agent_checks: | ||
| cluster: | ||
| - monitor | ||
| aeb4d606-2d90-4b41-b231-27bfad6dea09: | ||
| indices: | ||
| - names: | ||
| - logs-*-* | ||
| privileges: | ||
| - auto_configure | ||
| - create_doc | ||
| _elastic_agent_monitoring: | ||
| indices: [] | ||
| extensions: | ||
| health_check/4391d954-1ffe-4014-a256-5eda78a71828: {} | ||
| processors: | ||
| batch/567fce7a-ff2e-4a6c-a32a-0abb4671b39b: | ||
| send_batch_size: 10 | ||
| timeout: 1s | ||
| batch/8ec6ee99-2176-4231-9668-908069c77784: | ||
| send_batch_size: 10000 | ||
| timeout: 10s | ||
| receivers: | ||
| httpcheck/b0f518d6-4e2d-4c5d-bda7-f9808df537b7: | ||
| collection_interval: 1m | ||
| targets: | ||
| - endpoints: | ||
| - https://epr.elastic.co | ||
| method: GET | ||
|
Comment on lines
+454
to
+460
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jsoriano in these policies, could it be more than one receiver/exporter/extensions/processors? If that could happen, the resulting yaml would contain just one receiver
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In practice I don't think this has a real use case for receivers, but in theory this will be allowed, yes. And it will be definitely possible with processors. So you are right that we may need some replacement that is not always the same to avoid collisions, but is still predictable. |
||
| secret_references: [] | ||
| service: | ||
| extensions: | ||
| - health_check/4391d954-1ffe-4014-a256-5eda78a71828 | ||
| pipelines: | ||
| logs: | ||
| receivers: | ||
| - httpcheck/b0f518d6-4e2d-4c5d-bda7-f9808df537b7 | ||
| processors: | ||
| - batch/567fce7a-ff2e-4a6c-a32a-0abb4671b39b | ||
| - batch/8ec6ee99-2176-4231-9668-908069c77784 | ||
|
|
||
| `, | ||
| equal: true, | ||
| }, | ||
| } | ||
|
|
||
| for _, c := range cases { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 9.2.0-SNAPSHOT | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forced to run this package with 9.2.0-SNAPSHOT. This should be removed once the default version is 9.2.0 or higher. |
||
Uh oh!
There was an error while loading. Please reload this page.