-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(config): Convert top-level transforms enum to typetag #16572
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
This replaces the top-level `enum Transforms` into a boxed transform type. Serialization and deserialization are handled by `typetag`, and the `configurable_component` macro is enhanced to build out the necessary table entries to generate the schema bits dynamically from all of the components that are compiled into the current configuration.
✅ Deploy Preview for vector-project ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for vrl-playground ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Regression Detector ResultsRun ID: a18da62b-ba7c-4389-8d1a-a605112daf5a 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. Changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%:
Fine details of change detection per experiment.
|
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.
Generally looks good to me, with a few nits/questions.
&self, | ||
gen: &RefCell<SchemaGenerator>, | ||
) -> Result<SchemaObject, GenerateError> { | ||
let tag_schema = schema::generate_internal_tagged_variant_schema("type".to_string(), { |
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.
This is fine for now, but one thing that makes me uneasy here is that we're hardcoding the code generation, essentially, to match what we have... but it could easily diverge from future refactoring aimed at making the output better for enums overall.
That, and we're hardcoding the tag field.
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.
This is all to say that it's fine for now, but it sure would be nice if we could figure out some way to drive more of this hand-written schema generation from the typetag
-related data, if that makes sense.
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.
I'm open to that, but this seemed the best first path to solving it.
Regression Detector ResultsRun ID: 34d5f844-8677-4b40-820c-e5fba4fd4984 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. Changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%:
Fine details of change detection per experiment.
|
This replaces the top-level
enum Transforms
into a boxed transform type. Serialization and deserialization are handled bytypetag
, and theconfigurable_component
macro is enhanced to build out the necessary table entries to generate the schema bits dynamically from all of the components that are compiled into the current configuration.Note that this same approach is now possible for both the sources and sinks as well. This focuses on the transforms as the smallest step to prove it out for the other component types. Making it work for either sources or sinks should be able to be scoped down to just the actual sources and sinks and not need to touch support code like this does.