Unverified Commit 4708cde8 authored by per1234's avatar per1234 Committed by GitHub

[skip changelog] Temporarily full pin Python in all GitHub Actions workflows (#1478)

A bug introduced in the 3.9.7 release of Python causes a spurious failure of the
`test\test_lib.py::test_install_git_invalid_library` integration test:
https://bugs.python.org/issue45121

As a workaround, the last working version of Python must be used: 3.9.6. In order to ensure this is done when running the
integration tests locally, this version is specified in the Poetry configuration. Even though only the integration tests
require this version limitation, the Poetry configuration change affects all processes that use Poetry. Since only the
integration test workflow was adjusted accordingly, the other workflows using Poetry continued to explicitely install
a version of Python that did not fulfill the version constraints specified in the Poetry configuration. It seems it was
possible for Poetry to find a compatible version on the runner:

> The currently activated Python version 3.9.7 is not supported by the project (>=3.8, <3.9.7).
> Trying to find and use a compatible version.
> Using python3.8 (3.8.10)

but this additional output caused a failure of the "Deploy Website" workflow due to expecting only valid JSON as the
output from the siteversion.py script:

```
Error: The template is not valid. Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: T. Path '', line 0, position 0.
```

Even though the other workflows were able to continue to work with the discovered Python 3.8.10, it seems safest avoid
reliance on whatever Python the runner happens to have installed and instead explicitly install the Python version we
want to be used. So the full pin of Python is done in all workflows that use Poetry.

Since it is convenient to get automatic updates for Python patch releases, this full pin should be reverted back to the
"3.9" minor version pin once a new version of Python is released with the bug fixed and added to versions available for
installation via the `actions/setup-python` GitHub Actions action.
parent 6bd2e3e4
......@@ -5,7 +5,7 @@ env:
# See: https://github.com/actions/setup-go/tree/v2#readme
GO_VERSION: "1.16"
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.9.6"
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
......
......@@ -3,7 +3,7 @@ name: Check Python
env:
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.9.6"
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
......
......@@ -5,7 +5,7 @@ env:
# See: https://github.com/actions/setup-go/tree/v2#readme
GO_VERSION: "1.16"
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.9.6"
on:
push:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment