-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
YAML config: errors are not clear enough for users #10502
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
Comments
Yes. We have to improve the error message we expose to users to be more friendly 😄 . We have a few issues about this already. This is the code where we should give the users more context about what has happened: readthedocs.org/readthedocs/config/validation.py Lines 15 to 28 in 1b32d18
|
We should make the error of using |
Another error is that when using node, we require users to specify a python version too. The error isn't clear about this. |
Another related issue: #6569 |
... and another one: #7707 There are a bunch of issues related to this 😞 -- probably worth prioritizing this work. |
... another #8482 ... |
🙃 , #8352 |
hrm... #9458 |
An error isn't clear when a user is using an old version of the config file (v1). Ref #10824 |
Looks like we lose the message about the validation of the version of the config file. Example: https://github.com/readthedocs/test-builds/blob/config-file-with-wrong-version-number/.readthedocs.yaml#L1 |
Another one when the build option is missing https://github.com/pfusik/ONE/blob/55dc7c6e4d388a85c0deb49c8da40edbfdba72e7/.readthedocs.yml |
These last two are a slightly different issue, and are a change/bug where project notifications are only visible for the maintainer users. The beta instances doesn't have this change yet, the error is clearer there: |
I opened #11146 to track this issue. |
We made our error messages a clearer. They are not perfect still, tho, but I'm tempted to close this issue at this point since there are no clear directions here and the issue from the description was already fixed. Besides, we have created an issue per problem for those that are more important. See the list at #10985 (comment) |
Agreed. I feel like we've addressed a few issues here in a few ways. If there are any more issues with the configuration file, we will address this individually at this point. |
Details
I configured
.readthedocs.yaml
with:Expected Result
Nothing unusual.
Actual Result
I got the error message:
Despite the confusing message "expected 3.11, got 3.11", I realized the latter was probably a float instead of a string.
The workaround was simple:
But it can potentially be a huge time waster for someone not familiar with the pitfalls of yaml parsing. It would be nice if the parsing was more robust against this kind of type issues. Or the documentation explicitly told to use quotes.
Oh, Norway problem, you ask? See https://hitchdev.com/strictyaml/why/implicit-typing-removed/
The text was updated successfully, but these errors were encountered: