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

feat: Integrate validation into the executable #706

Merged
merged 4 commits into from
Jun 9, 2023

Conversation

kentquirk
Copy link
Contributor

@kentquirk kentquirk commented Jun 7, 2023

Which problem is this PR solving?

This extends the validation system into the main configuration logic.

Short description of the changes

  • Remove old validation markers on structs
  • Remove old validation logic
  • Add calls to new validator in startup
  • Make --validate command line switch work
  • Add --no-validate command line switch and use it in a lot of tests (otherwise we'd have to initialize all the tests with extra data that's not meaningful to the test)
  • Fix minor config and implementation errors that were detected by this work

@kentquirk kentquirk requested a review from a team as a code owner June 7, 2023 19:20
@kentquirk kentquirk marked this pull request as draft June 7, 2023 22:13
@kentquirk kentquirk marked this pull request as ready for review June 7, 2023 23:54
@kentquirk kentquirk added this to the v2.0 milestone Jun 7, 2023
@kentquirk kentquirk merged commit 7e4386d into main Jun 9, 2023
@kentquirk kentquirk deleted the kent.validation_integration branch June 9, 2023 00:56
kentquirk added a commit that referenced this pull request Jun 9, 2023
## Which problem is this PR solving?

We have often been asked for the ability to see what refinery thinks its
configurations are. We support this with a debug command, but it
requires a running refinery configured to allow debug queries, and a
configuration that allows connecting to it.

This PR adds command-line switches to read the configs, apply defaults
and environment variables, and write the data back out to a file. If you
use this feature, refinery doesn't start, it just writes the file and
exits.

## Short description of the changes

- Add function to write YAML out
- Add cmdline parameters to control it

Dependent on #706
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