-
Notifications
You must be signed in to change notification settings - Fork 129
Support system tests otel input #2885
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
Conversation
This reverts commit 77de02ed6bc3c765f8e88954fa3bee5e780ad37a.
|
@jsoriano it looks like there is no "Index Template" created when these input packages using As a reference, for instance This makes the system test fail with this error: This is used to get the mappings that were installed to compare them with those that are available after being ingested the documents. |
|
Ok, it seems that it is pending as mentioned in elastic/kibana#232628
Do you think there is going to be an Index Template installed for that as in the other packages? |
| if err := r.kibanaClient.AddPackageDataStreamToPolicy(ctx, ds); err != nil { | ||
| return nil, fmt.Errorf("could not add data stream config to policy: %w", err) | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like that it does not need to update the datasets the Integration Policies created by elastic-package via:
ds := createPackageDatastream(*policyToTest, *r.pkgManifest, policyTemplate, *r.dataStreamManifest, *config, policyToTest.Namespace)| if scenario.policyTemplateInput == otelCollectorInputName { | ||
| // Input packages whose input is `otelcol` must add the `.otel` suffix | ||
| // Example: httpcheck.metrics.otel | ||
| expectedDataset += "." + otelSuffixDataset | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documents ingested contain the dataset with suffix otel:
"data_stream": {
"dataset": "httpcheck.check.otel",
"namespace": "83653",
"type": "metrics"
},Packages using OTEL collector input will perform the validation based on the mappings found before and after ingesting documents.
|
/test |
2 similar comments
|
/test |
|
/test |
| // When using the OTEL collector input, just a subset of validations are performed (e.g. check expected datasets) | ||
| fields.WithOTELValidation(r.isTestUsingOTELCollectorInput(policyTemplateInput)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could input packages contain transforms ?
I think they cannot, so probably this validation based on fields for transforms could be kept as it is without disabling anything. WDYT ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They cannot contain transforms. So yeah, I guess that transform tests will be a noop even if not explicitly disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, for input package there would not be any issue.
I was thinking if it should be kept that fields.WithOTELValidation option, if at some point integrations packages start using OTEL collector inputs.
WDYT ? Would it be better to keep it or remove it ? @jsoriano
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking if it should be kept that
fields.WithOTELValidationoption, if at some point integrations packages start using OTEL collector inputs.
Yes, please, keep it. When we support integrations with OTel inputs there is no reason to think that they won't support transforms.
💚 Build Succeeded
History
cc @mrodm |
| // When using the OTEL collector input, just a subset of validations are performed (e.g. check expected datasets) | ||
| fields.WithOTELValidation(r.isTestUsingOTELCollectorInput(policyTemplateInput)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They cannot contain transforms. So yeah, I guess that transform tests will be a noop even if not explicitly disabled.
| @@ -1,8 +1,7 @@ | |||
| skip: | |||
| reason: Not supported system tests with input type otelcol. | |||
| link: https://github.com/elastic/elastic-package/issues/2835 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍


Relates #2835
Depends on elastic/kibana#233090
Depends on elastic/kibana#235226
Depends on elastic/kibana#236333
Depends on elastic/fleet-server#5469
This PR enables to run system tests also in input packages using
otelcolinput.In order to achieve that the validation process for fields and mappings is currently disabled because we need to determine the specific requirements for validation when the OTEL collector input is configured.
How to test this PR locally
Testing this requires:
enableOtelIntegrations(already managed byelastic-package).Steps:
elastic-package stack up -v -d --version 9.2.0-SNAPSHOT elastic-package -C test/packages/parallel/httpcheck test system -v elastic-package stack down -v