Skip to content

Some UI settings override config file settings #8782

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

Closed
astrojuanlu opened this issue Dec 22, 2021 · 4 comments
Closed

Some UI settings override config file settings #8782

astrojuanlu opened this issue Dec 22, 2021 · 4 comments
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@astrojuanlu
Copy link
Contributor

See for instance:

Even though the config file does not define python.system_packages and therefore should use the default value of False, the virtual env was created with --system-site-packages because the option was set in the UI.

@readthedocs/backend is this intended? I'm wondering if it happens with other settings as well.

@astrojuanlu
Copy link
Contributor Author

cc @mwcraig @pllim

@pllim
Copy link
Contributor

pllim commented Dec 22, 2021

Thanks for following up on this, @astrojuanlu !

@humitos
Copy link
Member

humitos commented Dec 22, 2021

@readthedocs/backend is this intended? I'm wondering if it happens with other settings as well.

This is not intended. In fact, we have a paragraph saying exactly this in the "Advanced settings" (https://readthedocs.org/dashboard/ <your-project-slug> /advanced/)

These settings can be configured using a configuration file. That's the recommended way to set up your project. Settings listed here are ignored when using a configuration file.

This is a bug to me.

@humitos humitos added Accepted Accepted issue on our roadmap Bug A bug labels Dec 22, 2021
humitos added a commit that referenced this issue Dec 22, 2021
I created a test case to demostrate what was reported in the issue. Summarizing,
if the project uses a config file and does not define `python.system_packages`
but has `Project.use_system_packages=True` the config option is `True` which is
wrong. When a config file is used, settings at Project level should be ignored
as this messages from "Advanced settings" states:

> These settings can be configured using a configuration file. That's the
recommended way to set up your project. Settings listed here are ignored when
using a configuration file.

Reference #8782
@humitos
Copy link
Member

humitos commented Dec 22, 2021

I opened #8783 to demonstrate this case with a test case and I think I found the issue after that. The config file code is not trivial to follow but I think the defaults we are passing are not correct because they are based on the project object (with settings defined in the Admin) instead of the defaults documented in the documentation of the config file.

@stsewd stsewd closed this as completed Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
None yet
Development

No branches or pull requests

4 participants