Skip to content

Python runtimes

qedk edited this page Sep 10, 2020 · 3 revisions

Currently, we are using the Python 3.7.3 runtime available on the Kubernetes cluster. It's ideal to stay on latest stable releases so as to make project migration easier in the future. There's significant improvements with features such as f-strings and dict()'s insertion-order preservation behaviour which come with newer releases compared to Toolforge's 3.5.3 runtime.

Issues

The Toolforge cluster only provides Python 3.5.3 runtimes. This causes an issue if you want to deploy apps in production that wish to use cutting-edge or early stable Python versions. The alternative is to use the Kubernetes cluster instead which provides a Python 3.7.3 runtime at the time of this documentation. At this point of time, there is no plan to provide custom Docker images unfortunately, so we have to use the best option possible, which is the Debian buster image which comes pre-loaded with 3.7.3. Another alternative is to use Cloud VPS but it's not recommended as the scripts are fairly light on resources, although the possibility of sudo-ing and using appropriate runtimes after building them remains untested.

Another issue is that Toolforge Kubernetes cluster does not have support for ssh, this restricts us to using git via HTTPS which means that parsebot's personal access token has to be used with git's credential-store. This is the current approach.