@htekdev/actions-debugger 1.0.124 → 1.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/errors/caching-artifacts/caching-artifacts-073.yml +100 -0
- package/errors/caching-artifacts/caching-artifacts-074.yml +117 -0
- package/errors/known-unsolved/known-unsolved-071.yml +122 -0
- package/errors/known-unsolved/known-unsolved-072.yml +143 -0
- package/errors/permissions-auth/permissions-auth-071.yml +144 -0
- package/errors/permissions-auth/permissions-auth-072.yml +112 -0
- package/errors/permissions-auth/permissions-auth-073.yml +127 -0
- package/errors/permissions-auth/permissions-auth-074.yml +106 -0
- package/errors/permissions-auth/permissions-auth-075.yml +137 -0
- package/errors/runner-environment/runner-environment-227.yml +106 -0
- package/errors/runner-environment/runner-environment-228.yml +117 -0
- package/errors/runner-environment/runner-environment-229.yml +119 -0
- package/errors/runner-environment/runner-environment-230.yml +129 -0
- package/errors/runner-environment/runner-environment-231.yml +90 -0
- package/errors/runner-environment/runner-environment-232.yml +131 -0
- package/errors/runner-environment/runner-environment-233.yml +90 -0
- package/errors/runner-environment/runner-environment-234.yml +114 -0
- package/errors/runner-environment/runner-environment-235.yml +151 -0
- package/errors/silent-failures/silent-failures-112.yml +97 -0
- package/errors/silent-failures/silent-failures-113.yml +110 -0
- package/errors/silent-failures/silent-failures-114.yml +116 -0
- package/errors/silent-failures/silent-failures-115.yml +130 -0
- package/errors/silent-failures/silent-failures-116.yml +117 -0
- package/errors/silent-failures/silent-failures-117.yml +137 -0
- package/errors/silent-failures/silent-failures-118.yml +156 -0
- package/errors/yaml-syntax/yaml-syntax-075.yml +128 -0
- package/errors/yaml-syntax/yaml-syntax-076.yml +107 -0
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
id: runner-environment-228
|
|
2
|
+
title: 'setup-node@v6 cache detection fails when .yarnrc.yml contains approvedGitRepositories (yarn 4.14+)'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- setup-node
|
|
7
|
+
- yarn
|
|
8
|
+
- cache
|
|
9
|
+
- yarnrc
|
|
10
|
+
- approvedGitRepositories
|
|
11
|
+
- yarn-4
|
|
12
|
+
- cache-detection
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'Unrecognized or legacy configuration settings found: approvedGitRepositories'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: "The 'yarn config get cacheFolder' command failed with exit code"
|
|
17
|
+
flags: 'i'
|
|
18
|
+
- regex: 'yarn config get cacheFolder.*exit code: 1'
|
|
19
|
+
flags: 'i'
|
|
20
|
+
error_messages:
|
|
21
|
+
- "Usage Error: Unrecognized or legacy configuration settings found: approvedGitRepositories - run \"yarn config -v\" to see the list of settings supported in Yarn"
|
|
22
|
+
- "Error: The 'yarn config get cacheFolder' command failed with exit code: 1"
|
|
23
|
+
root_cause: |
|
|
24
|
+
Yarn 4.14 introduced the `approvedGitRepositories` security setting in `.yarnrc.yml`.
|
|
25
|
+
This key enforces an allowlist of Git repository URLs that yarn is permitted to fetch
|
|
26
|
+
packages from, blocking unapproved source URLs with:
|
|
27
|
+
|
|
28
|
+
"Request to '<url>' has been blocked because it doesn't match any of the
|
|
29
|
+
patterns in 'approvedGitRepositories'"
|
|
30
|
+
|
|
31
|
+
However, any `.yarnrc.yml` key that is unrecognized or deprecated by the currently
|
|
32
|
+
installed version of yarn causes yarn to abort ALL config commands with:
|
|
33
|
+
|
|
34
|
+
"Usage Error: Unrecognized or legacy configuration settings found: approvedGitRepositories"
|
|
35
|
+
|
|
36
|
+
The `actions/setup-node@v6` action detects the yarn cache folder path by executing
|
|
37
|
+
`yarn config get cacheFolder` early in the action — before any Node.js version is
|
|
38
|
+
installed and before yarn itself is updated. If the runner's bundled yarn version is
|
|
39
|
+
older than 4.14, it does not recognize `approvedGitRepositories` and aborts.
|
|
40
|
+
|
|
41
|
+
The action catches the non-zero exit code and surfaces the error:
|
|
42
|
+
"Error: The 'yarn config get cacheFolder' command failed with exit code: 1"
|
|
43
|
+
|
|
44
|
+
This failure prevents setup-node from resolving the yarn cache path, breaking the
|
|
45
|
+
entire step. Users frequently observe this when:
|
|
46
|
+
- Upgrading to yarn 4.14+ and adding `approvedGitRepositories` to `.yarnrc.yml`
|
|
47
|
+
- Running on hosted runners where the system yarn version is older than 4.14
|
|
48
|
+
- Running on self-hosted runners with a frozen yarn version
|
|
49
|
+
|
|
50
|
+
The root issue is that yarn's unrecognized-key validation is global — it aborts even
|
|
51
|
+
read-only config queries when any single key is unrecognized, even if that key is not
|
|
52
|
+
related to the query.
|
|
53
|
+
fix: |
|
|
54
|
+
Option 1 — Remove cache:yarn from setup-node (safest immediate fix).
|
|
55
|
+
Set cache: '' or omit the cache: input entirely. Manage yarn caching with a separate
|
|
56
|
+
actions/cache step pointed directly at the yarn cache directory.
|
|
57
|
+
|
|
58
|
+
Option 2 — Pin the yarn version in the runner environment to match .yarnrc.yml.
|
|
59
|
+
Ensure the yarn version on the runner is >= 4.14.0 so it recognizes
|
|
60
|
+
approvedGitRepositories before setup-node calls yarn config get.
|
|
61
|
+
|
|
62
|
+
Option 3 — Upgrade setup-node to a version that handles this gracefully.
|
|
63
|
+
Track actions/setup-node#1534 for a fix that makes cache folder detection resilient
|
|
64
|
+
to yarn config validation errors.
|
|
65
|
+
|
|
66
|
+
Option 4 — Use a separate cache step instead of setup-node's built-in cache.
|
|
67
|
+
This avoids the setup-node yarn version probe entirely.
|
|
68
|
+
fix_code:
|
|
69
|
+
- language: yaml
|
|
70
|
+
label: 'Remove cache:yarn from setup-node and use a standalone cache step'
|
|
71
|
+
code: |
|
|
72
|
+
- uses: actions/setup-node@v4
|
|
73
|
+
with:
|
|
74
|
+
node-version: 20
|
|
75
|
+
# Do NOT set cache: yarn — it triggers yarn config get cacheFolder
|
|
76
|
+
# which fails when approvedGitRepositories is in .yarnrc.yml
|
|
77
|
+
|
|
78
|
+
# Manage yarn cache manually
|
|
79
|
+
- name: Get yarn cache directory
|
|
80
|
+
id: yarn-cache-dir
|
|
81
|
+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
|
82
|
+
|
|
83
|
+
- uses: actions/cache@v4
|
|
84
|
+
with:
|
|
85
|
+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
|
86
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
87
|
+
restore-keys: |
|
|
88
|
+
${{ runner.os }}-yarn-
|
|
89
|
+
|
|
90
|
+
- run: yarn install --immutable
|
|
91
|
+
|
|
92
|
+
- language: yaml
|
|
93
|
+
label: 'Pin yarn version to 4.14+ before setup-node runs'
|
|
94
|
+
code: |
|
|
95
|
+
- name: Enable corepack with matching yarn version
|
|
96
|
+
run: |
|
|
97
|
+
corepack enable
|
|
98
|
+
corepack prepare yarn@4.14.1 --activate
|
|
99
|
+
|
|
100
|
+
- uses: actions/setup-node@v4
|
|
101
|
+
with:
|
|
102
|
+
node-version: 20
|
|
103
|
+
cache: yarn # Now safe — yarn 4.14+ recognizes approvedGitRepositories
|
|
104
|
+
prevention:
|
|
105
|
+
- 'After adding any new key to .yarnrc.yml, verify it is recognized by running yarn config -v locally and confirming the key appears in the supported list.'
|
|
106
|
+
- 'When using setup-node cache:yarn with yarn 4+, pin the yarn version via packageManager in package.json or via corepack before the setup-node step.'
|
|
107
|
+
- 'Monitor actions/setup-node release notes for fixes to yarn cache detection resilience (issue #1534).'
|
|
108
|
+
- 'If .yarnrc.yml uses security features added in a recent yarn release, document the minimum required yarn version in your repo README and CI setup guide.'
|
|
109
|
+
docs:
|
|
110
|
+
- url: 'https://github.com/actions/setup-node/issues/1534'
|
|
111
|
+
label: 'actions/setup-node#1534 — Problem with yarn v4.14 config approvedGitRepositories'
|
|
112
|
+
- url: 'https://github.com/yarnpkg/berry/issues/7108'
|
|
113
|
+
label: 'yarnpkg/berry#7108 — approvedGitRepositories config key tracking issue'
|
|
114
|
+
- url: 'https://yarnpkg.com/configuration/yarnrc#approvedGitRepositories'
|
|
115
|
+
label: 'Yarn docs — approvedGitRepositories configuration'
|
|
116
|
+
- url: 'https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data'
|
|
117
|
+
label: 'setup-node — Advanced usage: caching packages data'
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
id: runner-environment-229
|
|
2
|
+
title: 'runner-container-hooks v0.8.0+ breaks local composite actions and event.json in Kubernetes job containers'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- runner-container-hooks
|
|
7
|
+
- kubernetes
|
|
8
|
+
- ARC
|
|
9
|
+
- local-actions
|
|
10
|
+
- composite-action
|
|
11
|
+
- job-container
|
|
12
|
+
- GITHUB_EVENT_PATH
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: "Can't find 'action\\.yml', 'action\\.yaml' or 'Dockerfile' under '.+\\.github/actions/.+'"
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: 'GITHUB_EVENT_PATH .+/github/workflow/event\\.json does not exist'
|
|
17
|
+
flags: 'i'
|
|
18
|
+
- regex: 'Did you forget to run actions/checkout before running your local action'
|
|
19
|
+
flags: 'i'
|
|
20
|
+
error_messages:
|
|
21
|
+
- "Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/_work/<repo>/<repo>/.github/actions/<action-name>'. Did you forget to run actions/checkout before running your local action?"
|
|
22
|
+
- "GITHUB_EVENT_PATH /github/workflow/event.json does not exist"
|
|
23
|
+
root_cause: |
|
|
24
|
+
In `runner-container-hooks` v0.8.0 (released with actions-runner v2.334.0),
|
|
25
|
+
PR #244 replaced the shared PersistentVolumeClaim (PVC) between the runner
|
|
26
|
+
pod and job pods with exec-based file copying.
|
|
27
|
+
|
|
28
|
+
Two distinct regressions were introduced:
|
|
29
|
+
|
|
30
|
+
**1. Local composite actions fail ("Can't find action.yml")**
|
|
31
|
+
In `runScriptStep`, only the `_temp` directory is synced back from the job
|
|
32
|
+
pod to the runner host after each step. When `actions/checkout` runs inside
|
|
33
|
+
the job pod, the entire repository (including `.github/actions/`) is written
|
|
34
|
+
to `/__w/<owner>/<repo>/` inside the pod — but it is never copied back to
|
|
35
|
+
the runner host filesystem.
|
|
36
|
+
|
|
37
|
+
The runner resolves local actions by reading `action.yml` from its own
|
|
38
|
+
filesystem before dispatching the hook for that step. Since the workspace
|
|
39
|
+
was never synced back, the runner cannot find the action definition and
|
|
40
|
+
fails with the "Did you forget to run actions/checkout?" error — even
|
|
41
|
+
though checkout ran successfully inside the pod.
|
|
42
|
+
|
|
43
|
+
`runContainerStep` is not affected: it copies the full `/__w` back from
|
|
44
|
+
the job pod because container action steps run in a separate pod.
|
|
45
|
+
|
|
46
|
+
**2. GITHUB_EVENT_PATH missing for jobs without custom volume mounts**
|
|
47
|
+
In v0.7.0, `/github/home` and `/github/workflow` were set up as volume
|
|
48
|
+
subPath mounts on every job container. PR #244 replaced these mounts with
|
|
49
|
+
a `prepareJobScript` call that copies these directories into place — but
|
|
50
|
+
only when `args.container.userMountVolumes` is non-empty. If the workflow
|
|
51
|
+
has no custom `volumes:` in the `container:` block, the script never runs
|
|
52
|
+
and `/github/workflow/event.json` is never created.
|
|
53
|
+
|
|
54
|
+
Any action that reads `GITHUB_EVENT_PATH` (e.g. `dorny/paths-filter`,
|
|
55
|
+
`tj-actions/changed-files`, `actions/github-script` reading the event
|
|
56
|
+
payload) then fails because the file does not exist.
|
|
57
|
+
|
|
58
|
+
Both regressions affect Kubernetes-based ARC (Actions Runner Controller)
|
|
59
|
+
setups using runner-container-hooks v0.8.0+. Standard GitHub-hosted runners
|
|
60
|
+
and self-hosted runners that do NOT use container-hooks are unaffected.
|
|
61
|
+
fix: |
|
|
62
|
+
**Immediate workaround:**
|
|
63
|
+
Pin `runner-container-hooks` to v0.7.0 by setting the container hooks
|
|
64
|
+
image in your ARC `HorizontalRunnerAutoscaler` or `RunnerDeployment`
|
|
65
|
+
configuration to use the v0.7.0 bundle (included in
|
|
66
|
+
`ghcr.io/actions/actions-runner:2.333.0`).
|
|
67
|
+
|
|
68
|
+
**For the local action failure specifically:**
|
|
69
|
+
After a fix is available upstream, the recommended approach is to upgrade
|
|
70
|
+
to a patched version of `runner-container-hooks` that copies `.github/`
|
|
71
|
+
back from the job pod after each `runScriptStep`.
|
|
72
|
+
|
|
73
|
+
**For the GITHUB_EVENT_PATH issue specifically:**
|
|
74
|
+
Ensure your `container:` block includes at least one `volumes:` entry to
|
|
75
|
+
trigger `prepareJobScript`, or wait for the upstream fix that unconditionally
|
|
76
|
+
runs the prepare script.
|
|
77
|
+
|
|
78
|
+
Track the upstream fix in actions/runner-container-hooks#337.
|
|
79
|
+
fix_code:
|
|
80
|
+
- language: yaml
|
|
81
|
+
label: 'Pin ARC runner to actions-runner v2.333.0 (uses hooks v0.7.0) to avoid regression'
|
|
82
|
+
code: |
|
|
83
|
+
# In your HorizontalRunnerAutoscaler spec, pin the runner image
|
|
84
|
+
# to the last version that uses runner-container-hooks v0.7.0:
|
|
85
|
+
spec:
|
|
86
|
+
template:
|
|
87
|
+
spec:
|
|
88
|
+
image: ghcr.io/actions/actions-runner:2.333.0
|
|
89
|
+
- language: yaml
|
|
90
|
+
label: 'Workaround for GITHUB_EVENT_PATH: add a dummy volume mount to trigger prepareJobScript'
|
|
91
|
+
code: |
|
|
92
|
+
jobs:
|
|
93
|
+
build:
|
|
94
|
+
runs-on: self-hosted
|
|
95
|
+
container:
|
|
96
|
+
image: my-ci-image:latest
|
|
97
|
+
# Adding any volume entry triggers prepareJobScript and restores
|
|
98
|
+
# /github/workflow/event.json inside the job container
|
|
99
|
+
volumes:
|
|
100
|
+
- /tmp:/tmp
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v4
|
|
103
|
+
- uses: dorny/paths-filter@v3
|
|
104
|
+
with:
|
|
105
|
+
filters: |
|
|
106
|
+
src:
|
|
107
|
+
- 'src/**'
|
|
108
|
+
prevention:
|
|
109
|
+
- 'When upgrading ARC runner images, check the bundled runner-container-hooks version and validate that local composite actions still work after the upgrade.'
|
|
110
|
+
- 'Pin runner images to a specific version tag rather than `latest` so unexpected upgrades do not break your workflows.'
|
|
111
|
+
- 'After upgrading runner-container-hooks, run a canary workflow that (a) uses a local composite action and (b) uses an action that reads GITHUB_EVENT_PATH to catch both regressions early.'
|
|
112
|
+
- 'Monitor the actions/runner-container-hooks releases page and the linked issue #337 for the official fix.'
|
|
113
|
+
docs:
|
|
114
|
+
- url: 'https://github.com/actions/runner-container-hooks/issues/337'
|
|
115
|
+
label: 'actions/runner-container-hooks#337 — Local actions fail after PR #244 removed shared volume'
|
|
116
|
+
- url: 'https://github.com/actions/runner-container-hooks/pull/244'
|
|
117
|
+
label: 'actions/runner-container-hooks#244 — Remove dependency on the runner''s volume (introduced regression)'
|
|
118
|
+
- url: 'https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/about-actions-runner-controller'
|
|
119
|
+
label: 'GitHub Docs — About Actions Runner Controller'
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
id: runner-environment-230
|
|
2
|
+
title: 'setup-python installs free-threaded Python (3.13t / 3.14t) as broken 0-byte symlink on windows-11-arm64'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- setup-python
|
|
7
|
+
- free-threaded
|
|
8
|
+
- python-3.13t
|
|
9
|
+
- python-3.14t
|
|
10
|
+
- windows-11-arm64
|
|
11
|
+
- symlink
|
|
12
|
+
- arm64
|
|
13
|
+
- GIL
|
|
14
|
+
patterns:
|
|
15
|
+
- regex: 'Remove-Item.+arm64-freethreaded.+python\.exe.+because it does not exist'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
- regex: 'Fatal Python error: Failed to import encodings module'
|
|
18
|
+
flags: 'i'
|
|
19
|
+
- regex: 'ModuleNotFoundError: No module named .encodings.'
|
|
20
|
+
flags: 'i'
|
|
21
|
+
- regex: 'Error happened during pip installation / upgrade'
|
|
22
|
+
flags: 'i'
|
|
23
|
+
error_messages:
|
|
24
|
+
- "[error] Remove-Item : Cannot find path 'C:\\hostedtoolcache\\windows\\Python\\3.13.3-freethreaded\\arm64-freethreaded\\python.exe' because it does not exist."
|
|
25
|
+
- '[error] Fatal Python error: Failed to import encodings module'
|
|
26
|
+
- '[error] ModuleNotFoundError: No module named ''encodings'''
|
|
27
|
+
- '[error] Error happened during pip installation / upgrade'
|
|
28
|
+
root_cause: |
|
|
29
|
+
The `win32-arm64-freethreaded` distribution zip for Python 3.13t and 3.14t
|
|
30
|
+
contains `python.exe` and `python3.exe` as **symlinks** (Windows reparse
|
|
31
|
+
points) that point to the version-specific binary (e.g. `python3.13t.exe`).
|
|
32
|
+
|
|
33
|
+
When `actions/setup-python` extracts the zip to the tool cache, the symlink
|
|
34
|
+
target does not exist at the expected relative path inside the extracted
|
|
35
|
+
directory. This leaves `python.exe` and `python3.exe` as **dangling 0-byte
|
|
36
|
+
reparse points** rather than working executables.
|
|
37
|
+
|
|
38
|
+
The setup script (`setup.ps1`, line 131) then attempts to remove `python.exe`
|
|
39
|
+
before placing the shim — but because the file is a dangling reparse point,
|
|
40
|
+
PowerShell cannot find it and throws:
|
|
41
|
+
|
|
42
|
+
`Remove-Item : Cannot find path '...\arm64-freethreaded\python.exe'
|
|
43
|
+
because it does not exist.`
|
|
44
|
+
|
|
45
|
+
Even if this error is swallowed, any subsequent attempt to invoke the
|
|
46
|
+
interpreter fails because the `python.exe` reparse point has no valid target.
|
|
47
|
+
The interpreter cannot locate its standard library, resulting in:
|
|
48
|
+
|
|
49
|
+
`Fatal Python error: Failed to import encodings module`
|
|
50
|
+
|
|
51
|
+
Non-free-threaded arm64 builds (`3.11`, `3.12`, `3.13`) are NOT affected
|
|
52
|
+
because their zips contain real executable files rather than symlinks.
|
|
53
|
+
x64 free-threaded builds are also unaffected.
|
|
54
|
+
|
|
55
|
+
This bug is present in `actions/setup-python` v5.x and v6.x when
|
|
56
|
+
`windows-11-arm64` runners are used. It was reported in April 2026 and
|
|
57
|
+
assigned for fix; check actions/setup-python#1307 for the patched release.
|
|
58
|
+
fix: |
|
|
59
|
+
**Workaround 1 (recommended until patched):** Use a non-arm64 runner for
|
|
60
|
+
free-threaded Python testing. The x64 free-threaded wheels work correctly on
|
|
61
|
+
`windows-latest` or `windows-2025`:
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
runs-on: windows-latest # x64 runner
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Workaround 2:** Install free-threaded Python from NuGet on arm64 runners
|
|
68
|
+
rather than using `actions/setup-python`:
|
|
69
|
+
|
|
70
|
+
```powershell
|
|
71
|
+
nuget install Microsoft.Python.Python.3.13-freethreaded.Arm64 -Version 3.13.3 -OutputDirectory .python
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Workaround 3:** If you need arm64 + free-threaded specifically, test on
|
|
75
|
+
a Linux arm64 runner (`ubuntu-24.04-arm`) where the free-threaded build
|
|
76
|
+
does not have the symlink issue.
|
|
77
|
+
|
|
78
|
+
**Long-term:** Upgrade to the patched `actions/setup-python` version once
|
|
79
|
+
released (track actions/setup-python#1307).
|
|
80
|
+
fix_code:
|
|
81
|
+
- language: yaml
|
|
82
|
+
label: 'Run free-threaded Python tests on x64 instead of arm64 until fix ships'
|
|
83
|
+
code: |
|
|
84
|
+
jobs:
|
|
85
|
+
test-freethreaded:
|
|
86
|
+
# Use x64 runner — free-threaded Python on windows-11-arm64 is broken
|
|
87
|
+
# (setup-python#1307). Switch back when the fix ships.
|
|
88
|
+
runs-on: windows-latest
|
|
89
|
+
steps:
|
|
90
|
+
- uses: actions/checkout@v4
|
|
91
|
+
- uses: actions/setup-python@v6
|
|
92
|
+
with:
|
|
93
|
+
python-version: '3.13t' # free-threaded; works on x64
|
|
94
|
+
- run: python --version
|
|
95
|
+
- run: python -c "import sys; print(sys._is_gil_enabled())"
|
|
96
|
+
- language: yaml
|
|
97
|
+
label: 'Use a matrix to run standard Python on arm64 and free-threaded on x64'
|
|
98
|
+
code: |
|
|
99
|
+
jobs:
|
|
100
|
+
test:
|
|
101
|
+
strategy:
|
|
102
|
+
matrix:
|
|
103
|
+
include:
|
|
104
|
+
# Standard arm64 — works fine
|
|
105
|
+
- os: windows-11-arm64
|
|
106
|
+
python-version: '3.13'
|
|
107
|
+
# Free-threaded — x64 only until setup-python#1307 is fixed
|
|
108
|
+
- os: windows-latest
|
|
109
|
+
python-version: '3.13t'
|
|
110
|
+
runs-on: ${{ matrix.os }}
|
|
111
|
+
steps:
|
|
112
|
+
- uses: actions/checkout@v4
|
|
113
|
+
- uses: actions/setup-python@v6
|
|
114
|
+
with:
|
|
115
|
+
python-version: ${{ matrix.python-version }}
|
|
116
|
+
prevention:
|
|
117
|
+
- 'When adding free-threaded Python (3.13t, 3.14t) to a matrix, verify the runner OS — windows-11-arm64 has a broken symlink issue; use windows-latest (x64) instead.'
|
|
118
|
+
- 'Pin actions/setup-python to a known-good version and monitor actions/setup-python#1307 for the fix release before upgrading on arm64 free-threaded jobs.'
|
|
119
|
+
- 'After setting up free-threaded Python, add a smoke-test step (`python -c "import sys; print(sys.version)"`) early in the job to catch a broken interpreter before the full test suite runs.'
|
|
120
|
+
- 'Check that python.exe in the tool cache is a real executable, not a 0-byte reparse point, by running `(Get-Item python.exe).Length -gt 0` in a PowerShell step on windows-arm64.'
|
|
121
|
+
docs:
|
|
122
|
+
- url: 'https://github.com/actions/setup-python/issues/1307'
|
|
123
|
+
label: 'actions/setup-python#1307 — setup-python fails for free-threaded Python (3.13t / 3.14t) on windows-11-arm64'
|
|
124
|
+
- url: 'https://github.com/onnx/onnx/actions/runs/24930991133'
|
|
125
|
+
label: 'Example failing CI run (onnx/onnx)'
|
|
126
|
+
- url: 'https://docs.python.org/3/whatsnew/3.13.html#free-threaded-cpython'
|
|
127
|
+
label: 'Python 3.13 — Free-threaded CPython (experimental no-GIL build)'
|
|
128
|
+
- url: 'https://github.com/actions/setup-python'
|
|
129
|
+
label: 'actions/setup-python — GitHub repository'
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
id: runner-environment-231
|
|
2
|
+
title: 'setup-java hangs indefinitely at "Trying to resolve the latest version from remote"'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- setup-java
|
|
7
|
+
- version-resolution
|
|
8
|
+
- hang
|
|
9
|
+
- network
|
|
10
|
+
- JDK
|
|
11
|
+
- distribution
|
|
12
|
+
- timeout
|
|
13
|
+
- temurin
|
|
14
|
+
patterns:
|
|
15
|
+
- regex: 'Trying to resolve the latest version from remote'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
- regex: 'setup-java.+Trying to resolve.+version'
|
|
18
|
+
flags: 'i'
|
|
19
|
+
error_messages:
|
|
20
|
+
- 'Trying to resolve the latest version from remote'
|
|
21
|
+
root_cause: |
|
|
22
|
+
When `java-version` is specified without a full patch version (e.g., `'21'`
|
|
23
|
+
or `'17'`), `actions/setup-java` must contact the JDK distribution's upstream
|
|
24
|
+
release manifest API to resolve the latest matching release. Before the fix
|
|
25
|
+
added in later versions of the action, this HTTP request was issued without a
|
|
26
|
+
timeout. When the upstream distribution endpoint (Eclipse Temurin, Amazon
|
|
27
|
+
Corretto, Microsoft JDK, etc.) was slow or unreachable — even transiently —
|
|
28
|
+
the resolution step could stall indefinitely, wedging the job until the
|
|
29
|
+
workflow-level `timeout-minutes` expired.
|
|
30
|
+
|
|
31
|
+
This affected all distributions that require a remote lookup for the latest
|
|
32
|
+
version, and was particularly impactful in environments with restricted or
|
|
33
|
+
intermittently degraded outbound network connectivity. The action would print
|
|
34
|
+
"Trying to resolve the latest version from remote" and then produce no further
|
|
35
|
+
output until the job hit its overall timeout.
|
|
36
|
+
|
|
37
|
+
The root cause was reported with 24+ community reactions in
|
|
38
|
+
actions/setup-java#897. The action was subsequently updated with improved
|
|
39
|
+
retry logic and enhanced error messages that surface the endpoint being
|
|
40
|
+
queried, making failures diagnosable.
|
|
41
|
+
fix: |
|
|
42
|
+
**Immediate workaround (always recommended):** Pin an explicit full or
|
|
43
|
+
three-part version to bypass the remote manifest lookup entirely:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
- uses: actions/setup-java@v4
|
|
47
|
+
with:
|
|
48
|
+
java-version: '21.0.3' # Explicit patch version — no remote resolution needed
|
|
49
|
+
distribution: 'temurin'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Alternative:** Upgrade `actions/setup-java` to the version that includes
|
|
53
|
+
retry/timeout improvements (v4.2.2 or later). The updated action adds
|
|
54
|
+
timeouts and surfaces the endpoint URL in error output so stalls are
|
|
55
|
+
diagnosable rather than silent hangs.
|
|
56
|
+
|
|
57
|
+
**For self-hosted runners with restricted outbound access:** Explicitly add
|
|
58
|
+
the JDK distribution manifest endpoints to your allowlist, or pin exact
|
|
59
|
+
versions to eliminate remote lookups entirely.
|
|
60
|
+
fix_code:
|
|
61
|
+
- language: yaml
|
|
62
|
+
label: 'Pin explicit patch version to avoid remote resolution'
|
|
63
|
+
code: |
|
|
64
|
+
- name: Set up JDK 21
|
|
65
|
+
uses: actions/setup-java@v4
|
|
66
|
+
with:
|
|
67
|
+
# Explicit 3-part version — skips "Trying to resolve the latest
|
|
68
|
+
# version from remote" entirely
|
|
69
|
+
java-version: '21.0.3'
|
|
70
|
+
distribution: 'temurin'
|
|
71
|
+
- language: yaml
|
|
72
|
+
label: 'Use version file to avoid hardcoding version while skipping remote lookup'
|
|
73
|
+
code: |
|
|
74
|
+
# Define your JDK version in .java-version or .tool-versions
|
|
75
|
+
# When java-version-file is present, no remote lookup is needed:
|
|
76
|
+
- name: Set up JDK
|
|
77
|
+
uses: actions/setup-java@v4
|
|
78
|
+
with:
|
|
79
|
+
java-version-file: '.java-version'
|
|
80
|
+
distribution: 'temurin'
|
|
81
|
+
prevention:
|
|
82
|
+
- 'Always pin an explicit JDK patch version (e.g., 21.0.3) or use a version file to eliminate remote manifest lookups and prevent hang-on-stall failures.'
|
|
83
|
+
- 'Set `timeout-minutes` on individual steps or jobs so a stalled remote lookup kills the step quickly rather than consuming the full runner allocation.'
|
|
84
|
+
- 'Monitor outbound network connectivity from self-hosted runners to JDK distribution APIs (e.g., api.adoptium.net for Temurin) and add these endpoints to firewall/proxy allowlists.'
|
|
85
|
+
- 'Use `actions/setup-java@v4.2.2` or later which includes retry logic and improved error messages for remote resolution failures.'
|
|
86
|
+
docs:
|
|
87
|
+
- url: 'https://github.com/actions/setup-java/issues/897'
|
|
88
|
+
label: 'actions/setup-java#897 — Trying to resolve the latest version from remote (indefinite hang)'
|
|
89
|
+
- url: 'https://github.com/actions/setup-java#supported-version-syntax'
|
|
90
|
+
label: 'actions/setup-java — Supported version syntax (pin exact versions to avoid remote lookup)'
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
id: runner-environment-232
|
|
2
|
+
title: 'Self-hosted runner started as a service (svc.sh/svc.cmd) does not load user PATH from shell profile'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- self-hosted
|
|
7
|
+
- PATH
|
|
8
|
+
- svc.sh
|
|
9
|
+
- service
|
|
10
|
+
- environment-variables
|
|
11
|
+
- bash
|
|
12
|
+
- profile
|
|
13
|
+
- command-not-found
|
|
14
|
+
patterns:
|
|
15
|
+
- regex: '(?:command not found|No such file or directory).+(?:\/home\/.+\/|~\/.+\/|GOPATH|cargo\/bin|\.local\/bin)'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
- regex: '(?:bash|sh):.+: (?:command not found|No such file or directory)'
|
|
18
|
+
flags: 'i'
|
|
19
|
+
error_messages:
|
|
20
|
+
- '/bin/bash: my-tool: command not found'
|
|
21
|
+
- 'bash: /home/runner/.local/bin/my-tool: No such file or directory'
|
|
22
|
+
- 'Error: Unable to locate executable file: my-tool. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable.'
|
|
23
|
+
root_cause: |
|
|
24
|
+
When the self-hosted runner is registered and started as a system service
|
|
25
|
+
using `svc.sh install && svc.sh start` (Linux/macOS) or
|
|
26
|
+
`svc.cmd install` (Windows), the service is launched by the OS service
|
|
27
|
+
manager (systemd, launchd, or Windows SCM) rather than interactively by
|
|
28
|
+
the user. As a result:
|
|
29
|
+
|
|
30
|
+
1. **Shell profile files are NOT sourced.** The service process never runs
|
|
31
|
+
`~/.bashrc`, `~/.bash_profile`, `~/.profile`, or `~/.zshrc`, so any
|
|
32
|
+
`export PATH=...` statements in those files have no effect on the runner
|
|
33
|
+
process or any job steps it spawns.
|
|
34
|
+
|
|
35
|
+
2. **Step shells use `--noprofile --norc` by default.** Even when job steps
|
|
36
|
+
invoke `bash`, the runner uses `bash --noprofile --norc -e -o pipefail`
|
|
37
|
+
(or equivalent), which explicitly disables sourcing of profile files.
|
|
38
|
+
This means binaries installed in user-specific directories — such as
|
|
39
|
+
`~/.local/bin`, `~/.cargo/bin`, `~/go/bin`, `~/.nvm/versions/node/*/bin`,
|
|
40
|
+
or any path added via `nvm`, `rbenv`, `pyenv`, `asdf`, etc. — are missing
|
|
41
|
+
from `PATH` in job steps even if they work fine in an interactive terminal.
|
|
42
|
+
|
|
43
|
+
3. **The runner's `.env` file is the authoritative PATH source.** The runner
|
|
44
|
+
process reads environment variables from a `.env` file at startup
|
|
45
|
+
(typically at `<runner-install-dir>/.env`). This file is NOT automatically
|
|
46
|
+
populated when the service is installed.
|
|
47
|
+
|
|
48
|
+
This is a common trap when developers install tools as their user (e.g.,
|
|
49
|
+
`cargo install`, `npm install -g`, `go install`, `pip install --user`) and
|
|
50
|
+
then register a self-hosted runner. Everything works in an interactive
|
|
51
|
+
terminal but fails when the service-started runner tries to execute the same
|
|
52
|
+
commands.
|
|
53
|
+
fix: |
|
|
54
|
+
**Option 1 (recommended): Add paths to the runner's `.env` file**
|
|
55
|
+
Edit `<runner-install-dir>/.env` and append the needed PATH entries. The
|
|
56
|
+
runner reads this file at startup and merges it into the environment for all
|
|
57
|
+
job steps:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Append to <runner-install-dir>/.env
|
|
61
|
+
PATH=/home/runner/.cargo/bin:/home/runner/.local/bin:/home/runner/go/bin:$PATH
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Restart the service after editing: `sudo svc.sh stop && sudo svc.sh start`
|
|
65
|
+
|
|
66
|
+
**Option 2: Use `$GITHUB_PATH` in the workflow**
|
|
67
|
+
Add a step early in the job to append the needed paths using the
|
|
68
|
+
`$GITHUB_PATH` mechanism — this persists for all subsequent steps in the job:
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
- name: Add user bins to PATH
|
|
72
|
+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Option 3: Start the runner interactively (development/testing only)**
|
|
76
|
+
Use `./run.sh` instead of the service to start the runner in an interactive
|
|
77
|
+
session that sources your shell profile. This is useful for debugging but
|
|
78
|
+
not suitable for production.
|
|
79
|
+
|
|
80
|
+
**Option 4: Change step shell to a login shell**
|
|
81
|
+
Override the shell at the step level to source the user profile:
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
- name: Run with login shell
|
|
85
|
+
shell: 'bash --login -e {0}'
|
|
86
|
+
run: my-tool --version
|
|
87
|
+
```
|
|
88
|
+
fix_code:
|
|
89
|
+
- language: yaml
|
|
90
|
+
label: 'Append user bin paths to runner PATH via .env file (persistent, affects all jobs)'
|
|
91
|
+
code: |
|
|
92
|
+
# Run this once on the self-hosted runner host:
|
|
93
|
+
# echo "PATH=/home/runner/.cargo/bin:/home/runner/.local/bin:$PATH" >> /home/runner/actions-runner/.env
|
|
94
|
+
# Then restart the runner service: sudo ./svc.sh stop && sudo ./svc.sh start
|
|
95
|
+
#
|
|
96
|
+
# In your workflow, the tool will now be found without any PATH workaround:
|
|
97
|
+
- name: Use cargo-installed tool
|
|
98
|
+
run: my-tool --version
|
|
99
|
+
- language: yaml
|
|
100
|
+
label: 'Append missing path per-job using $GITHUB_PATH'
|
|
101
|
+
code: |
|
|
102
|
+
jobs:
|
|
103
|
+
build:
|
|
104
|
+
runs-on: [self-hosted, linux]
|
|
105
|
+
steps:
|
|
106
|
+
- name: Add cargo bin to PATH
|
|
107
|
+
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
108
|
+
|
|
109
|
+
- name: Use cargo-installed tool
|
|
110
|
+
run: my-tool --version # Now visible because GITHUB_PATH was updated
|
|
111
|
+
- language: yaml
|
|
112
|
+
label: 'Use login shell on a single step to source ~/.profile'
|
|
113
|
+
code: |
|
|
114
|
+
- name: Run with login shell (sources ~/.profile and ~/.bash_profile)
|
|
115
|
+
shell: 'bash --login -e {0}'
|
|
116
|
+
run: |
|
|
117
|
+
my-tool --version
|
|
118
|
+
prevention:
|
|
119
|
+
- 'After registering a self-hosted runner, verify PATH by running a debug step: `run: echo $PATH && which my-tool` to confirm expected binaries are visible.'
|
|
120
|
+
- 'Document all non-standard tool paths in your `.env` file at runner registration time, before registering as a service, so PATH is correct from the first job.'
|
|
121
|
+
- 'Prefer system-wide tool installations (e.g., `/usr/local/bin/`) over user-specific paths for tools used on self-hosted runners, so the service environment sees them without profile sourcing.'
|
|
122
|
+
- 'When using version managers like nvm, rbenv, pyenv, or asdf, their shims are typically installed into shell-profile-sourced directories and will NOT work in service-started runners without explicit PATH entries in `.env`.'
|
|
123
|
+
docs:
|
|
124
|
+
- url: 'https://github.com/actions/runner/issues/2903'
|
|
125
|
+
label: 'actions/runner#2903 — Runner service does not update PATH when started via svc.sh'
|
|
126
|
+
- url: 'https://github.com/actions/runner/issues/2528'
|
|
127
|
+
label: 'actions/runner#2528 — PATH changes at runtime not applied to runner steps (--noprofile --norc)'
|
|
128
|
+
- url: 'https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#adding-the-runner-to-your-enterprise'
|
|
129
|
+
label: 'GitHub Docs — Self-hosted runner environment configuration'
|
|
130
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path'
|
|
131
|
+
label: 'GitHub Docs — Adding a system path (GITHUB_PATH)'
|