-
Notifications
You must be signed in to change notification settings - Fork 528
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
Add metadata modeldecoder and generator logic #4154
Conversation
* Introduce modeldecoder models for metadata with nullable values * Generate model decoding and validation functions * Run generator logic on `make update`
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
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 think this looks great - I have only fairly minor comments and suggestions. Nice work!
* switch from pkg name `type` to `nullable` * rename Decoder methods * simplify v2 validation test logic * minor refactorings
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.
Awesome :)
* Add metadata modeldecoder and generator logic * Introduce modeldecoder models for metadata with nullable values * Generate model decoding and validation functions * Run generator logic on `make update`
* Add metadata modeldecoder and generator logic * Introduce modeldecoder models for metadata with nullable values * Generate model decoding and validation functions * Run generator logic on `make update` Co-authored-by: Silvia Mitter <[email protected]>
Motivation/summary
This is the first PR introducing some ground work for the new json decoding + validation handling.
The changes are implemented for the
metadata
and not yet used. We should integrate with the new logic, once we also have the code generation logic ready for creating json schema for testing purposes of the agents. To keep PRs relatively short and reviewable I suggest to put up isolated PRs for yet unused logic that are tested in themselves and the put everything together when it's ready.If interested there is a draft PR up showing the whole integration.
This PR introduces:
metadata
with nullable values forv2
andrumv3
make update
Checklist
- [ ] I have signed the Contributor License Agreement.- [ ] I have updated CHANGELOG.asciidocI have considered changes for:
- [ ] documentation- [ ] logging (add log lines, choose appropriate log selector, etc.)- [ ] metrics and monitoring (create issue for Kibana team to add metrics to visualizations, e.g. Kibana#44001)- [ ] telemetry- [ ] Elasticsearch Service (https://cloud.elastic.co)- [ ] Elastic Cloud Enterprise (https://www.elastic.co/products/ece)- [ ] Elastic Cloud on Kubernetes (https://www.elastic.co/elastic-cloud-kubernetes)How to test these changes
run
make update && make test
Related issues
#3551