feat: replace input package references in stream definitions#3
Draft
teresaromero wants to merge 2 commits into3280-bundle-fieldsfrom
Draft
feat: replace input package references in stream definitions#3teresaromero wants to merge 2 commits into3280-bundle-fieldsfrom
teresaromero wants to merge 2 commits into3280-bundle-fieldsfrom
Conversation
This was referenced Mar 24, 2026
3d7629c to
72eb9ef
Compare
Resolve the final consolidation step for composable packages: replace all `package: <pkg-name>` references in policy_templates[].inputs[] and data_stream/*/manifest.yml streams[] with the actual input type identifier from the referenced input package, then remove the `package:` key so the result is indistinguishable from a regular integration. Closes elastic#3380 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Document package: → input type resolution on Resolver and Bundle; expand build/install docs (README via cmd/build, dependency_management, manual packages README) for templates, variable merge, fields, and stream types. Update streamdefs tests to call Bundle. Made-with: Cursor
edf0317 to
ed032e8
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.
Replace input package references with resolved input types
Closes elastic#3380
Summary
Final step of the composable-packages build pipeline: replaces all
package: <input-pkg-name>references in policy template inputs and data stream stream entries with the actual input type identifier (e.g.logfile) resolved from the required input package's manifest.This step runs after variable merging (which relies on
stream.Package/input.Packageto identify entries to process), so ordering matters.After this transform the resulting manifests are indistinguishable from hand-authored integration package manifests — the
package:key is removed entirely.What changed
internal/requiredinputs/streamdefs.go(new, ~190 lines)ReplaceStreamPackageRefs: resolves input type from required input package metadata and rewrites bothpolicy_templates[].inputs[]anddata_stream/*/manifest.yml → streams[]entries.internal/requiredinputs/streamdefs_test.go(new, ~460 lines)How to test
The existing
test/manual_packages/required_inputs/with_input_package_requiresfixture exercises this path end-to-end:Dependencies