feat: Add modify command and pipeline tag generator #3213
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.
Overview
This PR introduces a new subcommand for elastic-package called
modify. Its role is to provide a facility for making arbitrary modifications to a package. These changes can include things like updating the ECS version, updating the package spec version, generating tags for ingest pipeline processors, applying best practices, and so on. Changes that would be made by the modify command are implemented by "modifiers", which would be chosen when running the modify command. This PR includes one modifier for generating ingest pipeline processor tags (pipeline-tag).Proposal doc: #3158
What's New
New Subcommand
A new subcommand
modifythat provides a facility for making arbitrary changes to a package.Pipeline Tag Modifier
A modifier which generates tags for ingest pipeline processors lacking a tag.
Supporting Packages
internal/fleetpkg: Provides a package for types for fleet integrations, along with functions for loading integrations from the filesystem. Certain types (those directly backed by a yaml file) include a yamledit document for obtaining and modifying the yaml AST, which can be written back out to the file to make changes.internal/yamledit: Provides a package for reading, modifying, and writing YAML ASTs.Related