Skip to content

Support custom data_stream.type in system and policy tests#3509

Merged
jsoriano merged 4 commits intoelastic:mainfrom
jsoriano:custom-datastream-type
Apr 29, 2026
Merged

Support custom data_stream.type in system and policy tests#3509
jsoriano merged 4 commits intoelastic:mainfrom
jsoriano:custom-datastream-type

Conversation

@jsoriano
Copy link
Copy Markdown
Member

elastic/package-spec#849 introduced a way to override the data stream type for input packages. Users can use this toggle to decide the data stream to use for data collected with generic input packages.

Allow to override the data stream type using the data_stream.type variable in system and policy tests.

@jsoriano jsoriano self-assigned this Apr 28, 2026
Comment thread docs/howto/system_testing.md Outdated
Requires Kibana 8.18.3 / 8.19.0 / 9.1.0 or later (Fleet PR [#214216](https://github.com/elastic/kibana/pull/214216)).
Because the Kibana simplified Fleet API does not yet accept `data_stream.type` as a
stream-level variable (it rejects unknown vars), tests that use this override must also
set `policy_api_format: legacy` until a Kibana fix is available.
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.

Follow up issue created for that: elastic/kibana#266321

@jsoriano jsoriano marked this pull request as ready for review April 29, 2026 09:06
@jsoriano jsoriano requested a review from a team April 29, 2026 09:06
@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

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.

why we would want to change the type a datastream gets?

@jsoriano
Copy link
Copy Markdown
Member Author

why we would want to change the type a datastream gets?

With input packages a user may want to chose the signal type they are collecting. Imagine for example querying HTTP endpoints with httpjson. This input package is defined with the "logs" type, but you could also collect metrics using HTTP JSON endpoints. With this feature we allow users to store the data they are collecting with the type they consider to be better suited.

See elastic/package-spec#849.

Here we are allowing package developers to test their packages with this feature.

@jsoriano jsoriano merged commit b5f4e4b into elastic:main Apr 29, 2026
5 checks passed
@jsoriano jsoriano deleted the custom-datastream-type branch April 29, 2026 12:15
teresaromero added a commit that referenced this pull request May 7, 2026
…3480)

Composable packages with requires.input can have multiple required inputs of the same type. package-spec#1135 (3.6.0+) requires distinct policy_templates[].inputs[].name and streams[].input that reference that name—not a single derived id for both policy and streams. elastic-package previously did not match that pattern, which caused ambiguous Fleet policies and errors (e.g. missing stream templates).

This branch also builds policies from the built package manifest (so composable package: refs resolve for Fleet), adds CI/fixtures (nginx composable, dual same-type inputs, bootstrap input pkgs), and includes data_stream.type for input-package system/policy tests (#3509) plus docs for Kibana/Fleet version behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants