Fix Kibana data_stream.dataset variable for input package policies#3285
Merged
teresaromero merged 7 commits intoelastic:mainfrom Feb 18, 2026
Merged
Conversation
For input packages, createInputPackagePolicy now sets the stream-level variable data_stream.dataset to the policy template name (e.g. sql_query) instead of the full dataset string (e.g. sql_input.sql_query). Kibana expects this variable to hold the template name so it can correctly resolve the dataset; using the full string caused the dataset to be incorrect. Add TestCreateInputPackagePolicy_DatasetVariable to assert: - The variable is set to the policy template name when not defined by the template or user - Template default and user override (packagePolicy.Vars) are preserved - An error is returned when DataStreamName is set for an input package Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
When this fix is released, is expected to have some policy tests failing. New snapshots should be generated with the version bump |
Updated the data_stream.dataset variable in the expected test files for httpcheck and sql_input packages to use simplified names. This change aligns with the recent adjustments made to ensure compatibility with Kibana's expectations for dataset naming conventions.
Changed the MongoDB version from 5.0 to 7.0 in the Dockerfiles and updated the installation command for netcat to use netcat-openbsd. This ensures compatibility with the latest MongoDB features and improves the health check mechanism.
teresaromero
commented
Feb 16, 2026
test/packages/parallel/mongodb/_dev/deploy/docker/docker-compose.yml
Outdated
Show resolved
Hide resolved
6 tasks
mrodm
reviewed
Feb 17, 2026
Contributor
mrodm
left a comment
There was a problem hiding this comment.
LGTM the change for the policy tests, just some questions for the mongodb test package.
test/packages/parallel/mongodb/_dev/deploy/docker/docker-compose.yml
Outdated
Show resolved
Hide resolved
test/packages/parallel/mongodb/_dev/deploy/docker/creator/Dockerfile
Outdated
Show resolved
Hide resolved
Introduced a new variants.yml file to manage MongoDB service versions (v6 and v7). Updated docker-compose.yml and Dockerfile to utilize the SERVICE_VERSION argument, ensuring flexibility in service version deployment. This change enhances the deployment process by allowing easy version management.
Contributor
Author
|
Moved all mongodb changes into #3288 |
Collaborator
💔 Build Failed
Failed CI StepsHistory
|
…ix-dataset-name-otel
Contributor
Author
|
test integrations |
|
Created or updated PR in integrations repository to test this version. Check elastic/integrations#17453 |
Contributor
Author
Errors are the expected ones, will be fixed when the ep version bump at integrations repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For input packages, createInputPackagePolicy now sets the stream-level variable
data_stream.datasetto the policy template name (e.g.sql_query) instead of the full dataset string (e.g.sql_input.sql_query). Kibana expects this variable to hold the template name so it can correctly resolve the dataset; using the full string caused the dataset to be incorrect.Add
TestCreateInputPackagePolicy_DatasetVariableto assert:packagePolicy.Vars) are preservedDataStreamNameis set for an input packageSystem tests already use the correct behavior and were not modified in this PR.
vars(and optionaldata_stream.vars). These are passed ascfgVarsinto the system runner (internal/testrunner/runners/system/tester.go).vars["data_stream.dataset"]from the test config if setpolicyTemplate.Namedata_stream.datasetinvars. No code change was needed there; this PR only brings policy tests in line with that same behavior.Resolves #3275
Made with Cursor