-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Fleet] Install only OTel component template mappings for otelcol inputs #237165
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
🔍 Preview links for changed docs |
…o install-no-templates-otel
Pinging @elastic/fleet (Team:Fleet) |
|
||
// Override `subobjects: false` to avoid conflicts with traces-otel@mappings | ||
const shouldOverrideSettingsForOtelInputsTraces = | ||
shouldOverrideSettingsForOtelInputs && type === 'traces' && !indexTemplateMappings.runtime; |
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.
These overrides can be avoided now that non-otel mappings are removed, and packages are not required to define fields.
const agentPolicyName = 'Test input package policy'; | ||
const packagePolicyName = 'input-package-policy'; | ||
const datasetName = 'check'; // Default from the package. | ||
const datasetName = 'httpcheckreceiver'; // Default from the package. |
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.
About this change, see #237145 and elastic/elastic-package#2974.
@jsoriano to test this change locally, can I use the httpcheck test package in https://github.com/elastic/elastic-package/tree/main/test/packages/parallel/httpcheck? Is there a new version to use or it remains unchanged? |
This package needs changes, I am doing them in elastic/elastic-package#2971. You can use the package from that PR, or the zip included in this one (that is a renamed version of the same package). |
@jsoriano I built the package from elastic/elastic-package#2971 and tried installing, but I'm seeing again that conflict error when installing the assets:
in both cases no assets are actually installed at the end. Maybe something should be updated in the package itself? Otherwise we'll need to keep some of the overrides, this seems the same issue I had in my PR. |
Did you configure A renamed version of this package is being installed by the cypress tests (using the zip in this changeset), and they are passing. |
I tested with this zip file and it worked. The previous version didn't work, even with the updated dataset name, so it must be missing something else. |
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.
LGTM 🚀 Thanks for the changes!
@elasticmachine merge upstream |
Interesting. I think elastic-package may be including leftovers from previous builds, so in this case the package built from source might still contain the removed fields files. I have created an issue about this: elastic/elastic-package#2985 |
Pull Request is not mergeable
Starting backport for target branches: 9.2 |
💚 Build Succeeded
Metrics [docs]
History
cc @jsoriano |
…uts (elastic#237165) Use OTel mappings more strictly in OTel integrations. Main index template is still managed by Fleet, but only OTel component templates are used for mappings. Other templates are still used for Fleet-managed settings. Packages are not expected to define fields with this approach, but they still can. Fields, and `subobjects: false` are removed from test package. This needs to be adjusted in a follow up in package spec as packages are required to contain fields now. (cherry picked from commit 2a79659)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ol inputs (#237165) (#238298) # Backport This will backport the following commits from `main` to `9.2`: - [[Fleet] Install only OTel component template mappings for otelcol inputs (#237165)](#237165) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Jaime Soriano Pastor","email":"jaime.soriano@elastic.co"},"sourceCommit":{"committedDate":"2025-10-09T16:16:00Z","message":"[Fleet] Install only OTel component template mappings for otelcol inputs (#237165)\n\nUse OTel mappings more strictly in OTel integrations. Main index\ntemplate is still managed by Fleet, but only OTel component templates\nare used for mappings. Other templates are still used for Fleet-managed\nsettings.\nPackages are not expected to define fields with this approach, but they\nstill can.\n\nFields, and `subobjects: false` are removed from test package. This\nneeds to be adjusted in a follow up in package spec as packages are\nrequired to contain fields now.","sha":"2a796596bb89428cf5bde024f70c596eaaf6f417","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:version","v9.2.0","v9.3.0"],"title":"[Fleet] Install only OTel component template mappings for otelcol inputs","number":237165,"url":"https://github.com/elastic/kibana/pull/237165","mergeCommit":{"message":"[Fleet] Install only OTel component template mappings for otelcol inputs (#237165)\n\nUse OTel mappings more strictly in OTel integrations. Main index\ntemplate is still managed by Fleet, but only OTel component templates\nare used for mappings. Other templates are still used for Fleet-managed\nsettings.\nPackages are not expected to define fields with this approach, but they\nstill can.\n\nFields, and `subobjects: false` are removed from test package. This\nneeds to be adjusted in a follow up in package spec as packages are\nrequired to contain fields now.","sha":"2a796596bb89428cf5bde024f70c596eaaf6f417"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237165","number":237165,"mergeCommit":{"message":"[Fleet] Install only OTel component template mappings for otelcol inputs (#237165)\n\nUse OTel mappings more strictly in OTel integrations. Main index\ntemplate is still managed by Fleet, but only OTel component templates\nare used for mappings. Other templates are still used for Fleet-managed\nsettings.\nPackages are not expected to define fields with this approach, but they\nstill can.\n\nFields, and `subobjects: false` are removed from test package. This\nneeds to be adjusted in a follow up in package spec as packages are\nrequired to contain fields now.","sha":"2a796596bb89428cf5bde024f70c596eaaf6f417"}}]}] BACKPORT--> Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
Summary
Fix https://github.com/elastic/ingest-dev/issues/6173.
Use OTel mappings more strictly in OTel integrations. Main index template is still managed by Fleet, but only otel component templates are used for mappings. Other templates are still used for Fleet-managed settings.
Packages are not expected to define fields with this approach, but they still can.
Fields, and
subobjects: false
are removed from test package. This needs to be adjusted in a follow up in package spec as packages are required to contain fields now.Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breaking
label should be applied in these situations.release_note:*
label is applied per the guidelinesbackport:*
labels.Identify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.