-
Notifications
You must be signed in to change notification settings - Fork 6
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: validate server options #529
Conversation
issue for adding validation for the whole values.yaml file #530 |
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.
Thanks for the careful work on validating that the server options conform to the desired schema. I agree that the duplication is a bit annoying, but we can live with it.
The really important point still missing here (you might consider this simply a bug of the initial implementation of those server options) is an actual check if the server options which come as part of the POST body are actually elements of the options that were offered for selection in the first place. Basically, we have to prevent this
when the dialog only offers this
I simply replayed the POST request from the browser while giving myself a bit more CPU for this.
@ableuler let me know what you think about my responses. Also I added validation for the server options in the post request for starting a server as you suggested. I am sorry I missed that. I also added a test to ensure that trying to start a server with bad options will fail. |
Ok great thanks. Also ran the acceptance tests locally with docker and they passed. |
closes #71
So I implemented evaluation on the helm chart values but only for the server options portion. I will add a new issue to add it for the whole values.yaml file.
I also added more detailed validation (in line with the values.yaml validation) for the API.
I did some digging online to see if marshmallow can parse jsonschema and convert to marshmallow type schemas and it cannot unfortunately. There is a library that can convert a marshmallow schema to jsonschema but it cannot include the custom validation we need for some of the server options stuff. So I think we unfortunately have to have this kind of duplication.
This is deployed at https://tasko.dev.renku.ch/