Description:
Our CI broke today because of a new release of python-3.10.7 due to mypy bug[1]
Although it should not happen, it happened.
The immediate response would be to mask out (black list) python-3.10.7 until a new version of mypy is released.
However, there is no easy way to do so in matrix job without significant modification.
I thought of using the - operation but then the matrix is not effective, so I end up in duplicate the action invocation with conditionals.
I suggest something similar to the following to mask out a specific python release from installation, notice the python-version-blacklist new input parameter:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.7
- 3.8
- 3.9
- 3.10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version-blacklist: # <---- ADDITION
- 3.10.7
- run: python my_script.py
You may ask yourself why don't I put 3.10.7 in the matrix variable, it is because this variable is used not only for the this specific action but elsewhere in the workflow, and cannot be a full version. In our case the action/setup-python is executed within reusable composite action so it is not aware of the matrix at all. In our specific case adding this python-version-blacklist would have been done in a single place, and providing a fix for all our repositories.
[1] python/mypy#13627
Justification:
Allow to react fast to issues that exists in specific versions of python and support matrix.
Are you willing to submit a PR?
Yes, if it is acceptable.
Description:
Our CI broke today because of a new release of python-3.10.7 due to mypy bug[1]
Although it should not happen, it happened.
The immediate response would be to mask out (black list) python-3.10.7 until a new version of mypy is released.
However, there is no easy way to do so in matrix job without significant modification.
I thought of using the
-operation but then the matrix is not effective, so I end up in duplicate the action invocation with conditionals.I suggest something similar to the following to mask out a specific python release from installation, notice the
python-version-blacklistnew input parameter:You may ask yourself why don't I put 3.10.7 in the matrix variable, it is because this variable is used not only for the this specific action but elsewhere in the workflow, and cannot be a full version. In our case the
action/setup-pythonis executed within reusable composite action so it is not aware of the matrix at all. In our specific case adding thispython-version-blacklistwould have been done in a single place, and providing a fix for all our repositories.[1] python/mypy#13627
Justification:
Allow to react fast to issues that exists in specific versions of python and support matrix.
Are you willing to submit a PR?
Yes, if it is acceptable.