-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: do not check defaultUrl against list of server options #542
Conversation
Currently deployed at https://tasko.dev.renku.ch/ |
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.
It works fine now! 🎉
I'm not sure the regex is really needed. If we want to keep it, I believe it's not working as intended because strings with invalid chars are accepted (see inline comment).
I guess chars as #
are valid, and maybe others as well.
I would personally remove it and allow the user to set any string.
I am not sure what characters to include/exclude. I based my list on the characters in a url that do not have to be converted to something else when they are encoded. However I feel like we should check for valid characters either way. If someone provides characters that do not form a valid url they may not be able to reach the notebook they just successfully launched. Right? |
Fine for me. In that case, I believe we should include all the admissible chars for a URL. |
@lorenzo-cavazzi how about something like this:
So here we validate with marshmallow's own url field by appending a proper hostname just for the validation. So we dont have to get into validating a url with regex as long as the renku hostname is a proper hostname - which it is. This way we validate the path exactly in the way it will be used. |
If that allows all the valid URL chars, it's fine (e.g. something like this To phrase it differently, if I were trying to add something to E.G. with the current solution from this PR, if I try with
If I try with |
@lorenzo-cavazzi I did not end up deploying the |
So the latest version (without url validation) is deployed on my namespace and it works as you described in your latest comment @lorenzo-cavazzi. |
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.
You can access the deployment of this PR at https://renku-ci-nb-542.dev.renku.ch |
Thanks! All good now that the acceptance tests passed |
So when I was implementing this feature, which prevents you from launching a notebook with more cpu/memory than what is specified in the server options, I forgot that the
defaultUrl
option should not fall in this category. Some people use this to launch notebooks or dashboards, etc on other urls./deploy