feat: merge variables from required input packages into composable manifests#1
Draft
teresaromero wants to merge 4 commits into3278-bundle-templates-required-input-packagesfrom
Conversation
This was referenced Mar 24, 2026
…ifests Implements variable merging as part of the required_inputs build step (issue elastic#3279). Input package vars are the base; composable package overrides win when explicitly specified. Promoted input-level vars and data-stream-level vars are correctly placed in the merged manifest. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Relocate required_inputs variable-merge packages from test/packages to test/manual_packages/required_inputs (manual-only CI glob). - Point variables_test and loadInputPkgVarNodes fixtures at the new paths. - Refresh test/manual_packages/README for unified required_inputs workflow and future CI move note. - Add with_merging_two_policy_templates for scoped promotion across PTs. - Add mergeVariables-oriented doc comments on variables_test.go. Made-with: Cursor
BundleInputPackageTemplates was too narrow: the resolver path now also merges variables from required input packages and may grow further. Rename the requiredinputs.Resolver method and all call sites, tests, and mocks to Bundle. Made-with: Cursor
ea28eab to
e03e531
Compare
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.
Merge input package variables into composable integration manifests
Closes elastic#3279
Summary
Extends the required-inputs build step (introduced in elastic#3329) to merge variable definitions from required input packages into the composable integration's policy template and data stream manifests.
Variable merging follows these rules:
policy_templates[].inputs[].vars— they surface as top-level input vars and can override title/description/default.What changed
internal/requiredinputs/variables.go(new, ~500 lines)MergeVariables: entry point called after template bundling.internal/requiredinputs/variables_test.go(new, ~420 lines)test/manual_packages/required_inputs/(new fixtures)var_merging_input_pkg— input package defining base variables.with_merging_full— promotespaths+encoding; DS mergestimeout; addscustom_tag.with_merging_promotes_to_input,with_merging_ds_merges,with_merging_no_override— targeted scenarios.with_merging_duplicate_error— expects build failure.with_merging_two_policy_templates— validates per-policy-template scoping.test/manual_packages/README.md— documents manual test fixture usage.How to test
Dependencies