Skip to content
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

Check Yaml Configuration correctness using Zod #660

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

costinsin
Copy link
Member

@costinsin costinsin commented Dec 19, 2023

Type of change

  • πŸ§‘β€πŸ’» Improvement

Description

We are using Zod, a runtime type check library to enforce the schema read from the configuration file.

This way, we can delegate the task to check the proper types and enforce required fields to Zod.

Checklist

  • My code follows the contributor guidelines of this project;
  • I have updated tests;
  • New and existing unit tests pass locally with my changes;

@costinsin
Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@costinsin costinsin force-pushed the 12-19-Check_Yaml_Configuration_correctness_using_Zod branch 3 times, most recently from aa324f5 to c4cb674 Compare December 19, 2023 22:24
@costinsin costinsin marked this pull request as ready for review December 19, 2023 22:36
Copy link
Member

@andreia-oca andreia-oca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and works like a charm! I have a few inline comments here and there.

This feature will be very valuable to our users because it adds a lot of clarity on how to configure the yaml file. Great work! πŸŽ‰

@costinsin costinsin force-pushed the 12-19-Check_Yaml_Configuration_correctness_using_Zod branch from c4cb674 to 67959e2 Compare December 21, 2023 13:32
Copy link
Member

@andreia-oca andreia-oca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@costinsin costinsin merged commit 0356634 into dev Dec 21, 2023
10 checks passed
@costinsin costinsin deleted the 12-19-Check_Yaml_Configuration_correctness_using_Zod branch April 4, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants