-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add default_python_version
to DOCKER_IMAGE_SETTINGS
#6551
Comments
@humitos It seems in |
@saadmk11 yeah, we should implement it like 'default_version': {
2: 2.7,
3: 3.7,
} |
@stsewd Will adding a |
Anyone is working in this issue? 'readthedocs/build:6.0rc1': {
'python': {
'supported_versions': [2, 2.7, 3, 3.5, 3.6, 3.7, 3.8, 'pypy3.5'],
'default_version': {
2: 2.7,
3: 3.8,
}
},
}, This solve this issue completely? |
@joaovitor3 Yes, I'd like to work on this issue, if it seems doable. I am waiting for the reply from @stsewd. |
No problem, you can work on this @preetmishra |
No. You need to also find where this needs to be used (I linked the code in the description). Please, add some tests for this and make sure that it picks the right Python version when building in your RTD instance.
See the comment from @stsewd at #6551 (comment) |
@humitos Thanks for reverting back. I understood how
|
@humitos sorry, but you complete container build approach is wrong... At first, containers include software and libraries they need to fulfill their purpose. Having all Python versions in parallel in on container is wrong. At second, (Docker) containers are build in layers. You create a base container and on top you create variations. That's like a Git commit on branch
This should result in these containers:
If you think about resource consumption, that not a big deal, because all build-pyX.Y versions share the same container layer. Only your application on top creates overhead, because you do a matrix build. You could now review if you need a Cartesian product or if a sparse matrix is enough. You don't run into a multi-version and default-version problem, because your image selected the appropriate Python environment. |
Thanks for the tip, @Paebbels. There are other things to consider as well before changing how we handle our docker images. However, I think the effort we need for adding a config setting (current issue) is very low compared to changing all of this, and we will get the same benefit. |
Done at #6653 |
We are currently configuring available docker images for builders at
readthedocs.org/readthedocs/settings/base.py
Lines 370 to 389 in 4d06630
At the moment, we don't have a way to pin which version of Python will be used by default on each of these images. This code says that the default Python version will be always the greatest on each image:
readthedocs.org/readthedocs/config/config.py
Lines 245 to 264 in 4d06630
We want to update the
DOCKER_IMAGE_SETTINGS
to have adefault_python_version
per image and those linked properties to use them if defined.This allows us to release a new version of Docker image with a newer version of Python without forcing all users using
latest
to automatically start using the newer version of Python.Required by: #6324
The text was updated successfully, but these errors were encountered: