[Fleet] Support setting explicit names for ambiguous inputs#262138
[Fleet] Support setting explicit names for ambiguous inputs#262138jsoriano merged 13 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/fleet (Team:Fleet) |
ApprovabilityVerdict: Needs human review This PR introduces a new feature that changes how Fleet inputs are identified and matched throughout the system (using No code changes detected at You can customize Macroscope's approvability policy. Learn more. |
9a23fa7 to
dd7f642
Compare
|
/test |
⏳ Build in-progress, with failures
Failed CI Steps
Test Failures
History
cc @jsoriano |
teresaromero
left a comment
There was a problem hiding this comment.
lgtm. errors on CI seem not related with these changes
|
@elastic/experience-docs could you please take a look to this PR? 🙏 It is waiting for your review. Thanks! |
| ? `${policyTemplate.name}-${input.type}` | ||
| : input.type; | ||
| const requiredVarDefKey = buildInputKey( | ||
| getInputEffectiveName(input), |
There was a problem hiding this comment.
Will this cause breaking change for the API, or do we do not have input package with name yet?
There was a problem hiding this comment.
We don't have inputs with names yet. Support for this hasn't been released.
There was a problem hiding this comment.
I mean, this is not supported by the spec yet. This is the change in the spec: elastic/package-spec#1135
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24414940700 |
…262138) In integration packages, if multiple inputs in the same policy template have the same type, data streams using them don't have a way to distinguish them. In this case Fleet misbehaves, showing mixed elements in the UI and failing to correctly create policies. This change supports to explicitly name inputs, so inputs of the same type can be used in the same policy template, and data streams are able to reference them unambiguously. This change is specially relevant for OTel integration packages. On these packages it is going to be frequent to have multiple inputs of the `otelcol` type in the same policy template. Without this change OTel integration packages with multiple data streams can hardly be used. (cherry picked from commit 911c150)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…62138) (#263182) # Backport This will backport the following commits from `main` to `9.4`: - [[Fleet] Support setting explicit names for ambiguous inputs (#262138)](#262138) <!--- 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":"2026-04-14T18:02:56Z","message":"[Fleet] Support setting explicit names for ambiguous inputs (#262138)\n\nIn integration packages, if multiple inputs in the same policy template\nhave the same type, data streams using them don't have a way to\ndistinguish them. In this case Fleet misbehaves, showing mixed elements\nin the UI and failing to correctly create policies.\n\nThis change supports to explicitly name inputs, so inputs of the same\ntype can be used in the same policy template, and data streams are able\nto reference them unambiguously.\n\nThis change is specially relevant for OTel integration packages. On these\npackages it is going to be frequent to have multiple inputs of the `otelcol`\ntype in the same policy template. Without this change OTel integration\npackages with multiple data streams can hardly be used.","sha":"911c150cbee96648a7ea0f43213f856f661f8a59","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:version","v9.4.0","v9.5.0"],"title":"[Fleet] Support setting explicit names for ambiguous inputs","number":262138,"url":"https://github.com/elastic/kibana/pull/262138","mergeCommit":{"message":"[Fleet] Support setting explicit names for ambiguous inputs (#262138)\n\nIn integration packages, if multiple inputs in the same policy template\nhave the same type, data streams using them don't have a way to\ndistinguish them. In this case Fleet misbehaves, showing mixed elements\nin the UI and failing to correctly create policies.\n\nThis change supports to explicitly name inputs, so inputs of the same\ntype can be used in the same policy template, and data streams are able\nto reference them unambiguously.\n\nThis change is specially relevant for OTel integration packages. On these\npackages it is going to be frequent to have multiple inputs of the `otelcol`\ntype in the same policy template. Without this change OTel integration\npackages with multiple data streams can hardly be used.","sha":"911c150cbee96648a7ea0f43213f856f661f8a59"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262138","number":262138,"mergeCommit":{"message":"[Fleet] Support setting explicit names for ambiguous inputs (#262138)\n\nIn integration packages, if multiple inputs in the same policy template\nhave the same type, data streams using them don't have a way to\ndistinguish them. In this case Fleet misbehaves, showing mixed elements\nin the UI and failing to correctly create policies.\n\nThis change supports to explicitly name inputs, so inputs of the same\ntype can be used in the same policy template, and data streams are able\nto reference them unambiguously.\n\nThis change is specially relevant for OTel integration packages. On these\npackages it is going to be frequent to have multiple inputs of the `otelcol`\ntype in the same policy template. Without this change OTel integration\npackages with multiple data streams can hardly be used.","sha":"911c150cbee96648a7ea0f43213f856f661f8a59"}}]}] BACKPORT--> Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
## Summary
Completes propagation of **effective input names** (`name ?? type`,
`getInputEffectiveName`) for places that still matched registry
`streams[].input` against **`input.type`**. That mismatch caused package
policy creation to fail with `Stream template not found, unable to find
stream for input <type>` when integration manifests reference streams by
**input name** (same agent type, disambiguated names), as exercised by
composable/elastic-package dual-input fixtures.
**Changes**
- **`package_policy.ts`**: `_compilePackageStream` selects the registry
stream using `getInputEffectiveName(input)`; error message includes
effective name and type.
- **`validate_package_policy.ts`**: stream var-def lookup key uses
`${dataset}-${getInputEffectiveName(input)}` to match the registry map
keyed by `stream.input`.
- **`secrets/package_policies.ts`**: stream secret var-def lookup uses
the same effective name in the dataset key; import
`getInputEffectiveName`.
- **`get_template_inputs.ts`**: `buildIndexedPackage` indexes streams
and input ids using `getInputEffectiveName(packageInput)` so
docs/template indexing matches named stream references.
- **`package_policy.test.ts`**: Jest coverage for a manifest whose
`streams[].input` is the input **name** while `input.type` remains the
real type.
Relates to [Fleet: Support setting explicit names for ambiguous
inputs](#262138) and composable
packages that set `streams[].input` to the input name qualifier.
**Related issue:** This gap surfaced while testing work for
[elastic/elastic-package#3465](elastic/elastic-package#3465)
(composable `requires.input`: input `name` and stream `input` per
package-spec qualified inputs). The elastic-package change that
implements that issue is still **WIP**; this Kibana PR closes the Fleet
side so policies compile when manifests follow the spec (streams
reference the input **name** while the policy input keeps the real agent
**type**).
**Release notes:** Follow-up to #262138; no additional user-facing
release note beyond that change. Use label `release_note:skip`.
### Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
(`release_note:skip`, follow-up to #262138).
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` 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.
- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
**Risks**
- **Wrong stream match if a package mis-declares `streams[].input`**:
Low. Behavior is aligned with `getInputEffectiveName`; packages that
still use plain `type` in manifests continue to work because `name` is
absent.
- **EPM template / comment indexing**: Low. `buildIndexedPackage` now
keys by effective name; verify integration detail docs for packages with
duplicate types and names if any UI relies on old `type`-only ids.
…64366) (#264634) # Backport This will backport the following commits from `main` to `9.4`: - [[Fleet] Resolve streams and secrets by effective input name (#264366)](#264366) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Tere","email":"teresa.romero@elastic.co"},"sourceCommit":{"committedDate":"2026-04-21T10:06:51Z","message":"[Fleet] Resolve streams and secrets by effective input name (#264366)\n\n## Summary\n\nCompletes propagation of **effective input names** (`name ?? type`,\n`getInputEffectiveName`) for places that still matched registry\n`streams[].input` against **`input.type`**. That mismatch caused package\npolicy creation to fail with `Stream template not found, unable to find\nstream for input <type>` when integration manifests reference streams by\n**input name** (same agent type, disambiguated names), as exercised by\ncomposable/elastic-package dual-input fixtures.\n\n**Changes**\n\n- **`package_policy.ts`**: `_compilePackageStream` selects the registry\nstream using `getInputEffectiveName(input)`; error message includes\neffective name and type.\n- **`validate_package_policy.ts`**: stream var-def lookup key uses\n`${dataset}-${getInputEffectiveName(input)}` to match the registry map\nkeyed by `stream.input`.\n- **`secrets/package_policies.ts`**: stream secret var-def lookup uses\nthe same effective name in the dataset key; import\n`getInputEffectiveName`.\n- **`get_template_inputs.ts`**: `buildIndexedPackage` indexes streams\nand input ids using `getInputEffectiveName(packageInput)` so\ndocs/template indexing matches named stream references.\n- **`package_policy.test.ts`**: Jest coverage for a manifest whose\n`streams[].input` is the input **name** while `input.type` remains the\nreal type.\n\nRelates to [Fleet: Support setting explicit names for ambiguous\ninputs](#262138) and composable\npackages that set `streams[].input` to the input name qualifier.\n\n**Related issue:** This gap surfaced while testing work for\n[elastic/elastic-package#3465](https://github.com/elastic/elastic-package/issues/3465)\n(composable `requires.input`: input `name` and stream `input` per\npackage-spec qualified inputs). The elastic-package change that\nimplements that issue is still **WIP**; this Kibana PR closes the Fleet\nside so policies compile when manifests follow the spec (streams\nreference the input **name** while the policy input keeps the real agent\n**type**).\n\n**Release notes:** Follow-up to #262138; no additional user-facing\nrelease note beyond that change. Use label `release_note:skip`.\n\n### Checklist\n\nCheck the PR satisfies following conditions.\n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n(`release_note:skip`, follow-up to #262138).\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n\n**Risks**\n\n- **Wrong stream match if a package mis-declares `streams[].input`**:\nLow. Behavior is aligned with `getInputEffectiveName`; packages that\nstill use plain `type` in manifests continue to work because `name` is\nabsent.\n- **EPM template / comment indexing**: Low. `buildIndexedPackage` now\nkeys by effective name; verify integration detail docs for packages with\nduplicate types and names if any UI relies on old `type`-only ids.","sha":"170d52a1b934b921c81a4edc59130f54310d77e7","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:version","v9.4.0","v9.5.0"],"title":"[Fleet] Resolve streams and secrets by effective input name","number":264366,"url":"https://github.com/elastic/kibana/pull/264366","mergeCommit":{"message":"[Fleet] Resolve streams and secrets by effective input name (#264366)\n\n## Summary\n\nCompletes propagation of **effective input names** (`name ?? type`,\n`getInputEffectiveName`) for places that still matched registry\n`streams[].input` against **`input.type`**. That mismatch caused package\npolicy creation to fail with `Stream template not found, unable to find\nstream for input <type>` when integration manifests reference streams by\n**input name** (same agent type, disambiguated names), as exercised by\ncomposable/elastic-package dual-input fixtures.\n\n**Changes**\n\n- **`package_policy.ts`**: `_compilePackageStream` selects the registry\nstream using `getInputEffectiveName(input)`; error message includes\neffective name and type.\n- **`validate_package_policy.ts`**: stream var-def lookup key uses\n`${dataset}-${getInputEffectiveName(input)}` to match the registry map\nkeyed by `stream.input`.\n- **`secrets/package_policies.ts`**: stream secret var-def lookup uses\nthe same effective name in the dataset key; import\n`getInputEffectiveName`.\n- **`get_template_inputs.ts`**: `buildIndexedPackage` indexes streams\nand input ids using `getInputEffectiveName(packageInput)` so\ndocs/template indexing matches named stream references.\n- **`package_policy.test.ts`**: Jest coverage for a manifest whose\n`streams[].input` is the input **name** while `input.type` remains the\nreal type.\n\nRelates to [Fleet: Support setting explicit names for ambiguous\ninputs](#262138) and composable\npackages that set `streams[].input` to the input name qualifier.\n\n**Related issue:** This gap surfaced while testing work for\n[elastic/elastic-package#3465](https://github.com/elastic/elastic-package/issues/3465)\n(composable `requires.input`: input `name` and stream `input` per\npackage-spec qualified inputs). The elastic-package change that\nimplements that issue is still **WIP**; this Kibana PR closes the Fleet\nside so policies compile when manifests follow the spec (streams\nreference the input **name** while the policy input keeps the real agent\n**type**).\n\n**Release notes:** Follow-up to #262138; no additional user-facing\nrelease note beyond that change. Use label `release_note:skip`.\n\n### Checklist\n\nCheck the PR satisfies following conditions.\n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n(`release_note:skip`, follow-up to #262138).\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n\n**Risks**\n\n- **Wrong stream match if a package mis-declares `streams[].input`**:\nLow. Behavior is aligned with `getInputEffectiveName`; packages that\nstill use plain `type` in manifests continue to work because `name` is\nabsent.\n- **EPM template / comment indexing**: Low. `buildIndexedPackage` now\nkeys by effective name; verify integration detail docs for packages with\nduplicate types and names if any UI relies on old `type`-only ids.","sha":"170d52a1b934b921c81a4edc59130f54310d77e7"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/264366","number":264366,"mergeCommit":{"message":"[Fleet] Resolve streams and secrets by effective input name (#264366)\n\n## Summary\n\nCompletes propagation of **effective input names** (`name ?? type`,\n`getInputEffectiveName`) for places that still matched registry\n`streams[].input` against **`input.type`**. That mismatch caused package\npolicy creation to fail with `Stream template not found, unable to find\nstream for input <type>` when integration manifests reference streams by\n**input name** (same agent type, disambiguated names), as exercised by\ncomposable/elastic-package dual-input fixtures.\n\n**Changes**\n\n- **`package_policy.ts`**: `_compilePackageStream` selects the registry\nstream using `getInputEffectiveName(input)`; error message includes\neffective name and type.\n- **`validate_package_policy.ts`**: stream var-def lookup key uses\n`${dataset}-${getInputEffectiveName(input)}` to match the registry map\nkeyed by `stream.input`.\n- **`secrets/package_policies.ts`**: stream secret var-def lookup uses\nthe same effective name in the dataset key; import\n`getInputEffectiveName`.\n- **`get_template_inputs.ts`**: `buildIndexedPackage` indexes streams\nand input ids using `getInputEffectiveName(packageInput)` so\ndocs/template indexing matches named stream references.\n- **`package_policy.test.ts`**: Jest coverage for a manifest whose\n`streams[].input` is the input **name** while `input.type` remains the\nreal type.\n\nRelates to [Fleet: Support setting explicit names for ambiguous\ninputs](#262138) and composable\npackages that set `streams[].input` to the input name qualifier.\n\n**Related issue:** This gap surfaced while testing work for\n[elastic/elastic-package#3465](https://github.com/elastic/elastic-package/issues/3465)\n(composable `requires.input`: input `name` and stream `input` per\npackage-spec qualified inputs). The elastic-package change that\nimplements that issue is still **WIP**; this Kibana PR closes the Fleet\nside so policies compile when manifests follow the spec (streams\nreference the input **name** while the policy input keeps the real agent\n**type**).\n\n**Release notes:** Follow-up to #262138; no additional user-facing\nrelease note beyond that change. Use label `release_note:skip`.\n\n### Checklist\n\nCheck the PR satisfies following conditions.\n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n(`release_note:skip`, follow-up to #262138).\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n\n**Risks**\n\n- **Wrong stream match if a package mis-declares `streams[].input`**:\nLow. Behavior is aligned with `getInputEffectiveName`; packages that\nstill use plain `type` in manifests continue to work because `name` is\nabsent.\n- **EPM template / comment indexing**: Low. `buildIndexedPackage` now\nkeys by effective name; verify integration detail docs for packages with\nduplicate types and names if any UI relies on old `type`-only ids.","sha":"170d52a1b934b921c81a4edc59130f54310d77e7"}}]}] BACKPORT--> Co-authored-by: Tere <teresa.romero@elastic.co>
Summary
In integration packages, if multiple inputs in the same policy template have the same type, data streams using them don't have a way to distinguish them. In this case Fleet misbehaves, showing mixed elements in the UI and failing to correctly create policies.
This change supports to explicitly name inputs, so inputs of the same type can be used in the same policy template, and data streams are able to reference them unambiguously.
This change is specially relevant for OTel integration packages, introduced in 9.4.0, see #252949. On these packages it is going to be frequent to have multiple inputs of the
otelcoltype in the same policy template. Without this change OTel integration packages with multiple data streams can hardly be used.Code generated with Cursor
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel 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.