-
Notifications
You must be signed in to change notification settings - Fork 2k
enhancement(topology): Update transforms to handle multiple definitions #16793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
✅ Deploy Preview for vrl-playground ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for vector-project canceled.
|
…output definition Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
…ario Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
neuronull
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The codeowner flag for the changes to the sources, all look very like you said mundane.
I have no issues with those, so LGTM from that perspective.
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Datadog ReportBranch report: ✅ |
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
| Self { | ||
| event_kind, | ||
| metadata_kind: Kind::object(Collection::empty()), | ||
| metadata_kind: Kind::object(Collection::any()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fuchsnj I have had to change this since if schema_enabled is off we copy over the meanings, but not the kinds. To ensure the meanings that point to metadata are still valid this needs to be any.
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Regression Detector ResultsRun ID: 9693a24d-c90d-4443-b121-5bc44efe7240 ExplanationA regression test is an integrated performance test for The table below, if present, lists those experiments that have experienced a statistically significant change in mean optimization goal performance between baseline and comparison SHAs with 90.00% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±5.00% change in their mean optimization goal are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting change is observed. No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%. Fine details of change detection per experiment.
|
Regression Detector ResultsRun ID: b570e942-42e4-49c8-8e56-f79456820bac ExplanationA regression test is an integrated performance test for The table below, if present, lists those experiments that have experienced a statistically significant change in mean optimization goal performance between baseline and comparison SHAs with 90.00% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±5.00% change in their mean optimization goal are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting change is observed. No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%. Fine details of change detection per experiment.
|
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Regression Detector ResultsRun ID: 029646e1-f459-4adf-98f9-a092422f7aa5 ExplanationA regression test is an integrated performance test for The table below, if present, lists those experiments that have experienced a statistically significant change in mean optimization goal performance between baseline and comparison SHAs with 90.00% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±5.00% change in their mean optimization goal are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting change is observed. No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%. Fine details of change detection per experiment.
|
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Regression Detector ResultsRun ID: de9ad205-29c9-4050-b145-ba9d657b9bf5 ExplanationA regression test is an integrated performance test for The table below, if present, lists those experiments that have experienced a statistically significant change in mean optimization goal performance between baseline and comparison SHAs with 90.00% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±5.00% change in their mean optimization goal are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting change is observed. No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%. Fine details of change detection per experiment.
|
spencergilbert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - though I'd wait for an approval from @fuchsnj before merging.
* Revert "chore(topology): Transform outputs hash table of OutputId -> Definition (#17059)" This reverts commit 1bdb24d. * Revert "chore(topology): split `build_pieces` into smaller functions (#17037)" This reverts commit 6e6f1eb. * Revert "enhancement(topology): Update transforms to handle multiple definitions (#16793)" This reverts commit e19f4fc. Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com> --------- Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
* Revert "chore(topology): Transform outputs hash table of OutputId -> Definition (#17059)" This reverts commit 1bdb24d. * Revert "chore(topology): split `build_pieces` into smaller functions (#17037)" This reverts commit 6e6f1eb. * Revert "enhancement(topology): Update transforms to handle multiple definitions (#16793)" This reverts commit e19f4fc. Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com> --------- Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
* Revert "chore(topology): Transform outputs hash table of OutputId -> Definition (#17059)" This reverts commit 1bdb24d. * Revert "chore(topology): split `build_pieces` into smaller functions (#17037)" This reverts commit 6e6f1eb. * Revert "enhancement(topology): Update transforms to handle multiple definitions (#16793)" This reverts commit e19f4fc. Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
* Revert "chore(topology): Transform outputs hash table of OutputId -> Definition (#17059)" This reverts commit 1bdb24d. * Revert "chore(topology): split `build_pieces` into smaller functions (#17037)" This reverts commit 6e6f1eb. * Revert "enhancement(topology): Update transforms to handle multiple definitions (#16793)" This reverts commit e19f4fc. Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
* Revert "Revert "enhancement(topology): Update transforms to handle multiple definitions (#16793)"" This reverts commit 5dc20f3. * Revert "Revert "chore(topology): split `build_pieces` into smaller functions (#17037)"" This reverts commit 0e11bc3. * Revert "Revert "chore(topology): Transform outputs hash table of OutputId -> Definition (#17059)"" This reverts commit 8916ec1. --------- Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Closes #16730
This is a pretty big PR, but most of the changes are fairly mundane.
The biggest changes to look out for are:
Output::log_schema_definitionsTransforms can now output multiple
schema::Definitions. SoOutput::log_schema_definitionshas changed fromOption<Definition>toVec<Definition>.vector/lib/vector-core/src/config/mod.rs
Lines 107 to 117 in 1c5a8d2
Since sources still must only output zero or one definition, I have removed
Output::defaultand added a number of functions that each component should use instead which enforces a bit better whether they should output zero, one or many definitions.A vast number of the changes in this PR are just the components using the appropriate function instead.
TransformConfig::outputsAll the transform
outputsfunctions have changed so that they output multiple definitions - generally one for each input definition adjusted to match what that definition will now look like after the transform has run.The transform that needs the closest review is probably
remap. In that transform a merged definition is passed in to the compiler which ensures that VRL will compile for all possible inputs. Then for each input definition the types and meanings from the VRL compiled program are copied into the output definition and the meanings that are still valid (the vrl program may have deleted the field that the meaning points to) are copied over.It should be noted that this VRL does not seem to change the schema definition of the metadata:
I think that is an issue with VRL and not with this PR.
Topology builder
The most significant changes are in
src/topology/builder.rs. Inbuild_piecesit now handles the multiple definition outputs from sources (asserting that they are only creating a single definition).Instead of merging the definitions of transforms it passes multiple ones to each transform. The
input_definitionsrecurses along the upstream components to fetch their definitions. Each definition is tagged with the sourceOutputId.Output
I have split
OutputintoSourceOutputandTransformOutputsince each component type has different behaviour.Transforms
Transforms can output multiple definitions (each will be tagged with a different OutputId signifying the definition that will be output based on what has been input - this will be done in a followup PR).
Sources
Sources can have zero (for metrics and traces) or one (for logs) definitions.
If
schema.enabled == falsesources will specify a default schema definition with only the meanings defined.