act: Unable to execute actions/setup-python
Hi there
Thanks for act
. I’ve been using it successfully until now, but here’s some issue running python related tests : it’s unable to execute the setup-python action.
I tried with both my “old” act version from a couple of month ago and latest 0.2.8 from GitHub releases. With and without the matrix on python version. With actions/checkout@v1, v2 and master.
name: Tests
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7]
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
And here’s the verbose log
act -v
DEBU[0000] Loading environment from /home/me/work/ansible/ansible-role-apns-proxy/.env
DEBU[0000] Loading secrets from
DEBU[0000] Loading workflows from '/home/me/work/ansible/ansible-role-apns-proxy/.github/workflows'
DEBU[0000] Reading workflow '/home/me/work/ansible/ansible-role-apns-proxy/.github/workflows/tests.yml'
DEBU[0000] Planning event: push
DEBU[0000] Loading slug from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] Loading revision from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] HEAD points to '10b2eb0f8ae364f1c3086b27315b76aebdf6722a'
DEBU[0000] HEAD matches refs/tags/test
DEBU[0000] using github ref: refs/tags/test
[Tests/tests] 🧪 Matrix: map[python:3.7]
[Tests/tests] 🚀 Start image=node:12.6-buster-slim
DEBU[0000] Loading slug from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] Loading revision from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] HEAD points to '10b2eb0f8ae364f1c3086b27315b76aebdf6722a'
DEBU[0000] HEAD matches refs/tags/test
DEBU[0000] using github ref: refs/tags/test
[Tests/tests] 🐳 docker pull node:12.6-buster-slim
DEBU[0000] Image exists? true
[Tests/tests] Removed container: b1b835d656c4caa59f87c9ace1c2764c917fb223c34283c3ec1fdd75c6609b31
[Tests/tests] 🐳 docker create image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Tests/tests] Created container name=act-Tests-tests id=5e1ee21708b4923783ef87aad72db2f09e899f30e64e185bde4a6f694517e15d from image node:12.6-buster-slim
[Tests/tests] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp]
[Tests/tests] 🐳 docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Tests/tests] Starting container: 5e1ee21708b4923783ef87aad72db2f09e899f30e64e185bde4a6f694517e15d
[Tests/tests] Started container: 5e1ee21708b4923783ef87aad72db2f09e899f30e64e185bde4a6f694517e15d
[Tests/tests] 🐳 docker cp src=/home/me/work/ansible/ansible-role-apns-proxy/. dst=/github/workspace
[Tests/tests] Exec command '[mkdir -p /github/workspace]'
DEBU[0000] Writing tarball /tmp/act508945956 from /home/me/work/ansible/ansible-role-apns-proxy/.
DEBU[0000] Stripping prefix:/home/me/work/ansible/ansible-role-apns-proxy/ src:/home/me/work/ansible/ansible-role-apns-proxy/.
[Tests/tests] Unable to copy link converge.yml --> ../default/converge.yml
[Tests/tests] Unable to copy link requirements.yml --> ../default/requirements.yml
[Tests/tests] Unable to copy link tests --> ../default/tests
[Tests/tests] Extracting content from '/tmp/act508945956' to '/github/workspace'
DEBU[0000] Writing entry to tarball workflow/event.json len:2
DEBU[0000] Writing entry to tarball home/.act len:0
[Tests/tests] Extracting content to '/github/'
DEBU[0000] Loading slug from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] Loading revision from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] HEAD points to '10b2eb0f8ae364f1c3086b27315b76aebdf6722a'
DEBU[0000] HEAD matches refs/tags/test
DEBU[0000] using github ref: refs/tags/test
DEBU[0000] setupEnv => map[GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_REF:refs/tags/test GITHUB_REPOSITORY:TinxHQ/ansible-role-apns-proxy GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SHA:10b2eb0f8ae364f1c3086b27315b76aebdf6722a GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home]
DEBU[0000] Loading slug from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] Loading revision from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] HEAD points to '10b2eb0f8ae364f1c3086b27315b76aebdf6722a'
DEBU[0000] HEAD matches refs/tags/test
DEBU[0000] using github ref: refs/tags/test
DEBU[0000] context env => map[GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_REF:refs/tags/test GITHUB_REPOSITORY:TinxHQ/ansible-role-apns-proxy GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SHA:10b2eb0f8ae364f1c3086b27315b76aebdf6722a GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home]
[Tests/tests] ⭐ Run actions/checkout@v2
DEBU[0000] Loading slug from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] Loading revision from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] HEAD points to '10b2eb0f8ae364f1c3086b27315b76aebdf6722a'
DEBU[0000] HEAD matches refs/tags/test
DEBU[0000] using github ref: refs/tags/test
[Tests/tests] Skipping actions/checkout
[Tests/tests] ✅ Success - actions/checkout@v2
DEBU[0000] Loading slug from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] Loading revision from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] HEAD points to '10b2eb0f8ae364f1c3086b27315b76aebdf6722a'
DEBU[0000] HEAD matches refs/tags/test
DEBU[0000] using github ref: refs/tags/test
DEBU[0000] setupEnv => map[GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_REF:refs/tags/test GITHUB_REPOSITORY:TinxHQ/ansible-role-apns-proxy GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SHA:10b2eb0f8ae364f1c3086b27315b76aebdf6722a GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home INPUT_PYTHON-VERSION:3.7]
DEBU[0000] Loading slug from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] Loading revision from git directory '/home/me/work/ansible/ansible-role-apns-proxy/.git'
DEBU[0000] Found revision: 10b2eb0f8ae364f1c3086b27315b76aebdf6722a
DEBU[0000] HEAD points to '10b2eb0f8ae364f1c3086b27315b76aebdf6722a'
DEBU[0000] HEAD matches refs/tags/test
DEBU[0000] using github ref: refs/tags/test
DEBU[0000] context env => map[GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTOR:nektos/act GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_REF:refs/tags/test GITHUB_REPOSITORY:TinxHQ/ansible-role-apns-proxy GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SHA:10b2eb0f8ae364f1c3086b27315b76aebdf6722a GITHUB_TOKEN: GITHUB_WORKFLOW:Tests GITHUB_WORKSPACE:/github/workspace HOME:/github/home INPUT_PYTHON-VERSION:3.7]
[Tests/tests] ⭐ Run Setup Python
[Tests/tests] ☁ git clone 'https://github.com/actions/setup-python' # ref=v2
[Tests/tests] cloning https://github.com/actions/setup-python to /home/me/.cache/act/actions-setup-python@v2
[Tests/tests] Cloned https://github.com/actions/setup-python to /home/me/.cache/act/actions-setup-python@v2
[Tests/tests] Checked out v2
DEBU[0001] Read action &{Setup Python GitHub Set up a specific version of Python and add the command-line tools to the PATH. map[architecture:{The target architecture (x86, x64) of the Python interpreter. false } python-version:{Version range or exact version of a Python version to use, using SemVer's version range syntax. false 3.x} token:{Used to pull python distributions from actions/python-versions. Since there's a default, this is typically not supplied by the user. false ${{ github.token }}}] map[python-version:{The installed python version. Useful when given a version range as input.}] {node12 map[] dist/index.js [] []} {yellow code}} from '/home/me/.cache/act/actions-setup-python@v2/action.yml'
DEBU[0001] About to run action &{Setup Python GitHub Set up a specific version of Python and add the command-line tools to the PATH. map[architecture:{The target architecture (x86, x64) of the Python interpreter. false } python-version:{Version range or exact version of a Python version to use, using SemVer's version range syntax. false 3.x} token:{Used to pull python distributions from actions/python-versions. Since there's a default, this is typically not supplied by the user. false ${{ github.token }}}] map[python-version:{The installed python version. Useful when given a version range as input.}] {node12 map[] dist/index.js [] []} {yellow code}}
DEBU[0001] type=3 actionDir=/home/me/.cache/act/actions-setup-python@v2 Workdir=/home/me/work/ansible/ansible-role-apns-proxy ActionCacheDir=/home/me/.cache/act actionName=actions-setup-python@v2 containerActionDir=/actions
[Tests/tests] 🐳 docker cp src=/home/me/.cache/act/actions-setup-python@v2 dst=/actions/
[Tests/tests] Exec command '[mkdir -p /actions/]'
DEBU[0001] Writing tarball /tmp/act255484723 from /home/me/.cache/act/actions-setup-python@v2
DEBU[0001] Stripping prefix:/home/me/.cache/act/ src:/home/me/.cache/act/actions-setup-python@v2
[Tests/tests] Extracting content from '/tmp/act255484723' to '/actions/'
[Tests/tests] Exec command '[node /actions/actions-setup-python@v2/dist/index.js]'
[Tests/tests] 💬 ::debug::Semantic version spec of 3.7 is 3.7
[Tests/tests] 💬 ::debug::isExplicit:
[Tests/tests] 💬 ::debug::explicit? false
[Tests/tests] 💬 ::debug::evaluating 0 versions
[Tests/tests] 💬 ::debug::match not found
| Version 3.7 was not found in the local cache
[Tests/tests] ❗ ::error::Bad credentials
[Tests/tests] ❌ Failure - Setup Python
DEBU[0002] exit with `FAILURE`: 1
DEBU[0002] exit with `FAILURE`: 1
DEBU[0002] exit with `FAILURE`: 1
DEBU[0002] exit with `FAILURE`: 1
DEBU[0002] exit with `FAILURE`: 1
DEBU[0002] exit with `FAILURE`: 1
DEBU[0002] exit with `FAILURE`: 1
DEBU[0002] exit with `FAILURE`: 1
Error: exit with `FAILURE`: 1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 35
- Comments: 24 (3 by maintainers)
Found the problem -
@actions/tool-cache
:lib/manifest.js
uses_readLinuxVersionFile()
to determine the version of the ubuntu distribution using the lineDISTRIB_RELEASE=18.04
in/etc/lsb-release
. This file doesn’t exist in node:12.6-buster-slim, the default image act currently uses. I’m currently using this as workaround:Not really sure what’s the right fix here - It doesn’t make sense that @actions/setup-python treats Ubuntu’s release version as
platform_version
and hands out Python versions based on it. That doesn’t make sense…I’m not sure, but I think it fails because I’m running it on osx, but the installation is running through the docker container on linux, and it’s not understanding which version it should install. I think? 😃
The manifest does contain the right version it should use: https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json
@RaulBSantos it does work running
Since that’s fine enought for me I’ll add the -P option to my .actrc.
For other user willing to push the investigation, the setup-python author suggested following this guideline https://github.com/actions/setup-python#using-setup-python-with-a-self-hosted-runner. I gave it a quick shot without success.
the problem still exists
@noliran his solution worked for me. I use it in the following way:
Yep, I’m having the exact same problem here as well. On macOS, always gives me the the
Version ... with arch x64 not found
error, even if I specify something as specific as3.8.3
.Setting the
.actrc
as specified above did fix things, however.I created a simple test file which re-creates the problem
It is fixed by adding the
-P
parameter like the following:Here are the respective lines from the setup-python action: https://github.com/actions/setup-python/blob/807b74f98ca701f414ddaa8a4187e7cffa93cbbd/dist/index.js#L999-L1023
Here is my lsb-release file:
EDIT: Removed my previous invalid comment
I’ve hit the same issue, I’ve found that if you set a
GITHUB_TOKEN
env var, it doesn’t give the bad credentials error, and proceeds, only to fail a bit later:Hi all, if you will use
medium
orlarge
image (https://github.com/nektos/act#runners) there shouldn’t be any problem as those includelsb-release
which will successfully provide OS version tosetup-python
. As this is external issue, I will close this.Same problem with Ubuntu20.04, @noliran solution solved it
For the records I’m running it under Ubuntu 19.10
Still waiting on actions/toolkit#594