-
Notifications
You must be signed in to change notification settings - Fork 273
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 router config validate subcommand #6131
base: dev
Are you sure you want to change the base?
Add router config validate subcommand #6131
Conversation
❌ Docs Preview FailedError
|
validate_yaml_configuration( | ||
&config_string, | ||
Expansion::default()?, | ||
Mode::NoUpgrade, | ||
)? | ||
.validate()?; |
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.
We also have other validation specific to plugins (not schema validation but the content of these configurations)
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 mean that's ok but we should at least document what it clearly does
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.
Sorry, not understanding your comment 😓
Are you saying that this code does more than just validate the Router config file?
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 just saying that on plugins we have other config validations. For example here which validate that the config is logically correct, not only syntactically. So what I would like to have is to document that your new config validate will only validate it's syntactically correct regarding the json schema. That's all
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.
Updated!
Indeed is anxiously awaiting for this support to be added to improve our pipelines and shift left bad config as much as possible. Based on the feedback, I believe there is just a documentation concern about indicating the scope of what it can validate and what it cannot. Any chance we can get this over the finish line with just a doc update? |
@andrewmcgivery I added details on my comment. Let me know if you need more. Otherwise once it's documented it looks good to me |
Add
router config validate
subcommand to allow validation of a Router config file without fully starting up the Router.Note: Didn't see any examples of how to directly unit test commands.. but I tested manually! 😅
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩