Skip to content

[Fleet] Support setting explicit names for ambiguous inputs#262138

Merged
jsoriano merged 13 commits intoelastic:mainfrom
jsoriano:qualified-otelcol-input-names
Apr 14, 2026
Merged

[Fleet] Support setting explicit names for ambiguous inputs#262138
jsoriano merged 13 commits intoelastic:mainfrom
jsoriano:qualified-otelcol-input-names

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented Apr 8, 2026

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 otelcol type 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.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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 was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines 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.

@jsoriano jsoriano self-assigned this Apr 8, 2026
@jsoriano jsoriano requested a review from a team as a code owner April 8, 2026 23:38
@jsoriano jsoriano added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team backport:version Backport to applied version labels v9.4.0 labels Apr 8, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 8, 2026

Approvability

Verdict: Needs human review

This PR introduces a new feature that changes how Fleet inputs are identified and matched throughout the system (using name ?? type instead of just type). This affects core input handling logic during policy creation, validation, upgrades, and agent configuration. The author does not own any of the changed files (all owned by @elastic/fleet), and there are unresolved reviewer questions about edge cases.

No code changes detected at 3ef5c3e. Prior analysis still applies.

You can customize Macroscope's approvability policy. Learn more.

@jsoriano jsoriano force-pushed the qualified-otelcol-input-names branch from 9a23fa7 to dd7f642 Compare April 8, 2026 23:49
@jsoriano jsoriano marked this pull request as draft April 8, 2026 23:51
Comment thread x-pack/platform/plugins/shared/fleet/common/services/validate_package_policy.ts Outdated
Comment thread x-pack/platform/plugins/shared/fleet/common/services/validate_package_policy.ts Outdated
@jsoriano
Copy link
Copy Markdown
Member Author

/test

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Apr 13, 2026

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #1 / discover responsive sidebar should render buttons in data view picker correctly
  • [job] [logs] Jest Tests #1 / discover responsive sidebar should render buttons in data view picker correctly
  • [job] [logs] Jest Tests #8 / FilterLabel should render properly
  • [job] [logs] Jest Tests #8 / FilterLabel should render properly
  • [job] [logs] Scout: [ security / entity_store ] plugin / local-stateful-classic - Entity Store Logs Extraction with pagination (max 5 docs per page) - Should extract properly extract host with pagination
  • [job] [logs] Scout: [ security / entity_store ] plugin / local-stateful-classic - Entity Store Logs Extraction with pagination (max 5 docs per page) - Should extract properly extract host with pagination
  • [job] [logs] Jest Integration Tests #7 / StepDefineRule query persists kuery when switching between "query" and "eql" rule types
  • [job] [logs] Jest Integration Tests #7 / StepDefineRule query persists kuery when switching between "query" and "eql" rule types

History

cc @jsoriano

Copy link
Copy Markdown
Contributor

@teresaromero teresaromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. errors on CI seem not related with these changes

@jsoriano
Copy link
Copy Markdown
Member Author

@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),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this cause breaking change for the API, or do we do not have input package with name yet?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have inputs with names yet. Support for this hasn't been released.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, this is not supported by the spec yet. This is the change in the spec: elastic/package-spec#1135

Copy link
Copy Markdown
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@jsoriano jsoriano merged commit 911c150 into elastic:main Apr 14, 2026
22 checks passed
@jsoriano jsoriano deleted the qualified-otelcol-input-names branch April 14, 2026 18:03
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.4

https://github.com/elastic/kibana/actions/runs/24414940700

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 14, 2026
…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)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 14, 2026
…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>
@jbudz jbudz mentioned this pull request Apr 14, 2026
jbudz added a commit that referenced this pull request Apr 14, 2026
Timing conflict between #262138
and #252345
teresaromero added a commit that referenced this pull request Apr 21, 2026
## 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.
kibanamachine added a commit that referenced this pull request Apr 21, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.4.0 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants