-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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/schema validation #5350
Feat/schema validation #5350
Conversation
From the conversation in #2431 and in the proposal, it was agreed that utilizing JSON schema for validation was the right way forward. Would you mind looking into that? If you're looking for inspiration, the CNAB project utilizes JSON schema validation for the application bundle schema. Here's an example of how that schema looks. |
5d12563
to
23b1a0b
Compare
Glad to see that this already exists and doesn't need to be built from scratch. I was getting pretty deep in the weeds with some of those changes... The last commit should now meet the basic requirements of the spec. There's still some features to be added though. |
23b1a0b
to
61f6ef0
Compare
a9287d9
to
b3766e6
Compare
Okay. Let me know when those features have been added and I'll take another look. Thanks! |
The proposal mentions being able to generate a JSON schema from a given values file. However, Values are currently stored as This last commit adds that functionality, but given the current limitations, the schemas it generates are very bare. In practice, a user could generate a schema, then modify it with more specific information. Is this the intention for this feature? |
@bacongobbler This is just about finished, but I'm not sure where to put schema generation. Do we want to add a flag to |
Hey @ian-howell, thanks for the ping! I'll have a look at this tomorrow and see what we need to do to tie this one off. Thanks for taking the time to implement this! |
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 incredibly happy with the current status of this PR. Really well done! Just one small nit about the error output, but asides that this is shaping up to be a great submission. Awesome work!
Are you planning on adding documentation so others know how to use this new functionality, or would you like some assistance getting started with that?
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
21214b2
to
a4cb958
Compare
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
The final coalesced values for a given chart will be validated against that chart's schema, as well as any dependent subchart's schema Signed-off-by: Ian Howell <ian.howell0@gmail.com>
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
The TestReadSchema unit test was simply testing the ReadValues function, which is already being validated in the TestReadValues unit test Signed-off-by: Ian Howell <ian.howell0@gmail.com>
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
@adamreese Alright, this should be good to go. Let me know if there's anymore changes I need to make. |
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.
Looks great! Thanks for making all the requested changes and esp the unit tests!!!
I might need to move a few things around with some of the load/render stages but this is awesome!
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.
LGTM as well. Thank you so much for all your hard work @ian-howell! This looks great. Can't wait to play around with it some more :)
I think this would be great. If Personally, I have already written all of my JSON schema files in yaml a long time ago since that's what the specification in the community roadmap had said to do and have been using that in my CI/CD workflows. I'm sure I'm not alone. |
What this PR does / why we need it:
When complete, this PR will close 5081.
Special notes for your reviewer:
Very much a work in progress. Any advice is greatly appreciated.
If applicable: