-
Notifications
You must be signed in to change notification settings - Fork 95
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
feat: [v2] Config conversion and validation code from one data file #677
Conversation
The config format and this tool are now in good enough shape to move on to other things; we will revisit before final release. |
There is now a single executable with subcommands(rather than running things as tests) with a Makefile to drive the non-converter commands. I've also done a |
I just added docs generation for config; it writes out config.md. |
## Which problem is this PR solving? - After Honeycomb introduced environments, the rules file uses environments to specify samplers but still refers to things in code, tests, and documentation as datasets. This fixes the code part -- forthcoming v2 changes will fix the tests and documentation. ## Short description of the changes - Rename GetSamplerConfigForDataset to GetSamplerConfigForDestName and change its internals as well. - ReloadInto was exported because it's needed for the converter This PR depends on #677 and should be merged after that one.
This is the beginnings of a multi-pronged approach to data conversion.
We want a tool that can read an existing V1 config file and generate a new one, omitting no-longer-needed values and reformatting others, and generating a properly commented YAML file that is up to date with Refinery's capabilities.
We also want a validation library that can check a config completely. The best way to do that is with a JSON Schema validator, which in turn needs a JSON Schema data file that expresses the constraints on the fields.
Since both of these things need a lot of information about all the fields in the config, this PR creates one big data file that will contain enough information to solve both problems, and I'm planning to generate both the template for the converter and the JSON schema from the same data file.
In scope for this PR:
NOT in scope: