@htekdev/actions-debugger 1.0.81 → 1.0.83
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/concurrency-timing/workflow-level-vs-job-level-concurrency-scope.yml +92 -0
- package/errors/known-unsolved/org-required-workflow-no-per-repo-override.yml +88 -0
- package/errors/known-unsolved/step-log-output-truncated-64kb.yml +88 -0
- package/errors/runner-environment/git-commit-author-identity-unknown.yml +83 -0
- package/errors/runner-environment/larger-runner-labels-require-paid-plan.yml +73 -0
- package/errors/runner-environment/macos-bash-32-no-bash4-features.yml +110 -0
- package/errors/runner-environment/pip-externally-managed-environment-pep668.yml +83 -0
- package/errors/runner-environment/ubuntu-24-ruby-not-preinstalled.yml +74 -0
- package/errors/runner-environment/windows-shell-powershell-is-ps5-not-ps7.yml +85 -0
- package/errors/silent-failures/github-event-inputs-undefined-in-workflow-call.yml +102 -0
- package/errors/silent-failures/job-outputs-block-missing-needs-always-empty.yml +85 -0
- package/errors/triggers/pull-request-closed-fires-for-unmerged-prs.yml +79 -0
- package/errors/triggers/push-branches-filter-bypassed-by-tag-push.yml +83 -0
- package/errors/triggers/release-created-fires-on-draft.yml +75 -0
- package/errors/yaml-syntax/reusable-workflow-with-secrets-context-rejected.yml +98 -0
- package/errors/yaml-syntax/secrets-in-workflow-level-env-block-rejected.yml +91 -0
- package/package.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
id: concurrency-timing-041
|
|
2
|
+
title: "Workflow-level concurrency cancels entire workflow — job-level concurrency only gates that specific job"
|
|
3
|
+
category: concurrency-timing
|
|
4
|
+
severity: silent-failure
|
|
5
|
+
tags:
|
|
6
|
+
- concurrency
|
|
7
|
+
- cancel-in-progress
|
|
8
|
+
- workflow-level
|
|
9
|
+
- job-level
|
|
10
|
+
- scope
|
|
11
|
+
- deployment
|
|
12
|
+
- test-cancellation
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: '^concurrency:\s*$'
|
|
15
|
+
flags: 'm'
|
|
16
|
+
- regex: 'jobs\.[a-zA-Z_][a-zA-Z0-9_-]*:\s*\n(\s+.*\n)*\s+concurrency:'
|
|
17
|
+
flags: 'm'
|
|
18
|
+
error_messages:
|
|
19
|
+
- "Run was cancelled. (workflow-level concurrency cancelled entire run including unrelated jobs)"
|
|
20
|
+
- "Skipping job deploy because it is not needed (cancelled by workflow-level concurrency group)"
|
|
21
|
+
root_cause: |
|
|
22
|
+
The concurrency: key in GitHub Actions behaves fundamentally differently depending on
|
|
23
|
+
where it is placed in the workflow file:
|
|
24
|
+
|
|
25
|
+
WORKFLOW-LEVEL (top-level key, outside jobs:):
|
|
26
|
+
Cancels or queues the ENTIRE workflow run. When a new run starts for the same concurrency
|
|
27
|
+
group, all pending or in-progress jobs in the workflow are affected — including build,
|
|
28
|
+
test, lint, and deploy jobs. The full workflow run is treated as the atomic unit.
|
|
29
|
+
|
|
30
|
+
JOB-LEVEL (inside jobs.<job_id>: as a sibling of runs-on: and steps:):
|
|
31
|
+
Only gates THAT SPECIFIC JOB. Other jobs in the same workflow run execute concurrently
|
|
32
|
+
without restriction. Serialization or cancellation applies only to the job that declares
|
|
33
|
+
the concurrency block.
|
|
34
|
+
|
|
35
|
+
Common mistake #1: developer adds workflow-level concurrency intending to prevent
|
|
36
|
+
duplicate deployments, but accidentally causes active test/build jobs to be cancelled
|
|
37
|
+
on every new push — wasting compute and breaking CI feedback.
|
|
38
|
+
|
|
39
|
+
Common mistake #2: developer adds job-level concurrency expecting the whole workflow
|
|
40
|
+
to be serialized, but parallel test runs from multiple pushes execute simultaneously.
|
|
41
|
+
fix: |
|
|
42
|
+
Use job-level concurrency on only the deploy job when you want to serialize
|
|
43
|
+
deployments without interrupting parallel test runs. Use workflow-level concurrency
|
|
44
|
+
only when you intend for the entire workflow to serialize or cancel on new push.
|
|
45
|
+
fix_code:
|
|
46
|
+
- language: yaml
|
|
47
|
+
label: "Correct: job-level concurrency on deploy only — tests run freely"
|
|
48
|
+
code: |
|
|
49
|
+
jobs:
|
|
50
|
+
test:
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
# No concurrency — multiple test runs execute in parallel across pushes
|
|
53
|
+
steps:
|
|
54
|
+
- run: npm test
|
|
55
|
+
|
|
56
|
+
deploy:
|
|
57
|
+
needs: test
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
concurrency:
|
|
60
|
+
group: deploy-${{ github.ref_name }}
|
|
61
|
+
cancel-in-progress: false # Queue deploys, never cancel in-flight
|
|
62
|
+
steps:
|
|
63
|
+
- run: ./deploy.sh
|
|
64
|
+
- language: yaml
|
|
65
|
+
label: "Caution: workflow-level concurrency cancels test and build jobs too"
|
|
66
|
+
code: |
|
|
67
|
+
# This cancels the ENTIRE workflow on new push — tests, build, and deploy all stop
|
|
68
|
+
concurrency:
|
|
69
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
70
|
+
cancel-in-progress: true
|
|
71
|
+
|
|
72
|
+
jobs:
|
|
73
|
+
test:
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
steps:
|
|
76
|
+
- run: npm test # Also cancelled when a new push arrives
|
|
77
|
+
|
|
78
|
+
deploy:
|
|
79
|
+
needs: test
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
steps:
|
|
82
|
+
- run: ./deploy.sh
|
|
83
|
+
prevention:
|
|
84
|
+
- "For deploy-only serialization, use job-level concurrency on only the deploy job"
|
|
85
|
+
- "Avoid cancel-in-progress: true at workflow level for deployment workflows — an interrupted deploy may leave infrastructure in an inconsistent state"
|
|
86
|
+
- "Use cancel-in-progress: ${{ github.event_name == 'pull_request' }} to cancel PR runs but preserve default-branch deployments"
|
|
87
|
+
- "Verify scope: if concurrency: is indented under a specific jobs.<id>: block it is job-level; if it is at the same indentation as jobs: it is workflow-level"
|
|
88
|
+
docs:
|
|
89
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-concurrency"
|
|
90
|
+
label: "GitHub Docs: Using concurrency"
|
|
91
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency"
|
|
92
|
+
label: "GitHub Docs: concurrency syntax reference"
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
id: known-unsolved-048
|
|
2
|
+
title: 'Organization required workflows block all repo PRs with no per-repo override'
|
|
3
|
+
category: known-unsolved
|
|
4
|
+
severity: limitation
|
|
5
|
+
tags:
|
|
6
|
+
- required-workflows
|
|
7
|
+
- organization
|
|
8
|
+
- branch-protection
|
|
9
|
+
- enterprise
|
|
10
|
+
- admin
|
|
11
|
+
patterns:
|
|
12
|
+
- regex: 'Required status checks have not passed for this branch'
|
|
13
|
+
flags: 'i'
|
|
14
|
+
- regex: 'required workflows? are not complete'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
error_messages:
|
|
17
|
+
- 'Required status checks have not passed for this branch'
|
|
18
|
+
- 'The following required workflows are not complete: .github/workflows/required-check.yml'
|
|
19
|
+
- 'Required workflow failed: org-name/.github/.github/workflows/security-scan.yml'
|
|
20
|
+
root_cause: |
|
|
21
|
+
GitHub Enterprise Cloud allows org admins to configure "Required workflows"
|
|
22
|
+
under Org Settings → Actions → Required workflows. These workflows run on
|
|
23
|
+
every push and pull_request event across every repository in the organization
|
|
24
|
+
and are automatically added as required status checks on all branches.
|
|
25
|
+
|
|
26
|
+
When a required workflow fails — due to a misconfiguration, missing secret,
|
|
27
|
+
incompatibility with a specific repository's structure, or a transient error
|
|
28
|
+
— all open PRs in every affected repository are blocked from merging. There
|
|
29
|
+
is no mechanism for repo admins or developers to bypass or exempt their
|
|
30
|
+
repository from the org-level required workflow. Only the org admin can fix
|
|
31
|
+
the required workflow or remove the requirement.
|
|
32
|
+
|
|
33
|
+
This creates an org-wide single point of failure: a bug in the centralized
|
|
34
|
+
required workflow instantly blocks all engineering teams from shipping.
|
|
35
|
+
fix: |
|
|
36
|
+
There is no per-repository exemption for org required workflows. Mitigation
|
|
37
|
+
strategies for org admins:
|
|
38
|
+
|
|
39
|
+
1. Use `if:` conditions in the required workflow to skip gracefully for
|
|
40
|
+
incompatible repositories instead of failing.
|
|
41
|
+
2. Set `continue-on-error: true` on non-critical jobs within the required
|
|
42
|
+
workflow so that optional checks do not block merges.
|
|
43
|
+
3. Maintain a staging version of the required workflow tested on a canary
|
|
44
|
+
repo before rolling changes org-wide.
|
|
45
|
+
4. Set up alerting on required workflow failure rates to catch regressions
|
|
46
|
+
before they block the whole org.
|
|
47
|
+
fix_code:
|
|
48
|
+
- language: yaml
|
|
49
|
+
label: 'Use if: conditions to gracefully skip incompatible repos'
|
|
50
|
+
code: |
|
|
51
|
+
# In org's .github repo: .github/workflows/required-check.yml
|
|
52
|
+
name: Required Security Scan
|
|
53
|
+
on: [push, pull_request]
|
|
54
|
+
jobs:
|
|
55
|
+
security-scan:
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
# Skip repos that are explicitly opted out
|
|
58
|
+
if: >-
|
|
59
|
+
!contains(
|
|
60
|
+
fromJSON('["org/legacy-repo", "org/infra-repo"]'),
|
|
61
|
+
github.repository
|
|
62
|
+
)
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v4
|
|
65
|
+
- name: Run scan
|
|
66
|
+
run: ./scripts/security-scan.sh
|
|
67
|
+
|
|
68
|
+
- language: yaml
|
|
69
|
+
label: 'Use continue-on-error for non-blocking checks'
|
|
70
|
+
code: |
|
|
71
|
+
jobs:
|
|
72
|
+
lint:
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
continue-on-error: true # Won't block the required status check
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/checkout@v4
|
|
77
|
+
- run: npm run lint
|
|
78
|
+
prevention:
|
|
79
|
+
- 'Test required workflows in a canary repository before enabling org-wide'
|
|
80
|
+
- 'Use `if:` guards to skip repos that cannot satisfy the required checks'
|
|
81
|
+
- 'Monitor required workflow failure rates with org-level Actions dashboards'
|
|
82
|
+
- 'Prefer `continue-on-error: true` for advisory checks that should not hard-block PRs'
|
|
83
|
+
- 'Keep required workflows minimal — only truly mandatory gates belong here'
|
|
84
|
+
docs:
|
|
85
|
+
- url: 'https://docs.github.com/en/actions/administering-github-actions/required-workflows'
|
|
86
|
+
label: 'Required workflows — GitHub Docs'
|
|
87
|
+
- url: 'https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks-before-merging'
|
|
88
|
+
label: 'Required status checks — GitHub Docs'
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
id: known-unsolved-049
|
|
2
|
+
title: 'GitHub Actions step log output silently truncated after 64 KB — tail of large logs invisible'
|
|
3
|
+
category: known-unsolved
|
|
4
|
+
severity: limitation
|
|
5
|
+
tags:
|
|
6
|
+
- logging
|
|
7
|
+
- truncation
|
|
8
|
+
- debug
|
|
9
|
+
- large-output
|
|
10
|
+
- verbose-build
|
|
11
|
+
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'Log upload failed|Error uploading logs'
|
|
14
|
+
flags: 'i'
|
|
15
|
+
- regex: 'log size exceeds'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
|
|
18
|
+
error_messages:
|
|
19
|
+
- "##[warning]The log file exceeds the limit."
|
|
20
|
+
- "##[warning]Some log data was not captured."
|
|
21
|
+
|
|
22
|
+
root_cause: |
|
|
23
|
+
GitHub Actions truncates the visible log output for each step at approximately
|
|
24
|
+
64 KB (65,536 bytes). Steps that produce large stdout or stderr — verbose builds,
|
|
25
|
+
test suites with thousands of tests, dependency installation logs, or debug-mode
|
|
26
|
+
tools — have their logs silently cut off at the truncation limit.
|
|
27
|
+
|
|
28
|
+
When logs are truncated, the last portion of the output (which often contains
|
|
29
|
+
the most important information — the actual error or failure message) becomes
|
|
30
|
+
invisible in the GitHub Actions UI. There is no prominent warning that truncation
|
|
31
|
+
occurred; only a small warning annotation may appear.
|
|
32
|
+
|
|
33
|
+
Common triggers:
|
|
34
|
+
- `npm install` with many packages in verbose mode
|
|
35
|
+
- Maven/Gradle builds with `--info` or `--debug` flags
|
|
36
|
+
- Test runners printing results for thousands of test cases
|
|
37
|
+
- CMake or Make with verbose output enabled
|
|
38
|
+
- Custom scripts that echo large data structures for debugging
|
|
39
|
+
|
|
40
|
+
fix: |
|
|
41
|
+
GitHub has no setting to increase the per-step log limit. The workarounds
|
|
42
|
+
involve reducing log volume or capturing overflow output to an artifact file.
|
|
43
|
+
|
|
44
|
+
Option 1 — Reduce log verbosity: Remove `--verbose`, `--debug`, or `--info`
|
|
45
|
+
flags from build/install commands that produce excessive output.
|
|
46
|
+
|
|
47
|
+
Option 2 — Redirect overflow to artifact: Pipe output to a file and upload it
|
|
48
|
+
as an artifact. The complete log is preserved and downloadable.
|
|
49
|
+
|
|
50
|
+
Option 3 — Split the step: Break one large step into multiple smaller steps
|
|
51
|
+
so each step's output stays under the limit.
|
|
52
|
+
|
|
53
|
+
fix_code:
|
|
54
|
+
- language: yaml
|
|
55
|
+
label: 'Redirect large output to artifact file'
|
|
56
|
+
code: |
|
|
57
|
+
- name: Run verbose build (output to file)
|
|
58
|
+
run: |
|
|
59
|
+
# Tee output: display live AND capture to file for artifact upload
|
|
60
|
+
set -o pipefail
|
|
61
|
+
make build 2>&1 | tee build-output.log
|
|
62
|
+
|
|
63
|
+
- name: Upload full build log as artifact
|
|
64
|
+
if: always()
|
|
65
|
+
uses: actions/upload-artifact@v4
|
|
66
|
+
with:
|
|
67
|
+
name: build-log
|
|
68
|
+
path: build-output.log
|
|
69
|
+
retention-days: 7
|
|
70
|
+
- language: yaml
|
|
71
|
+
label: 'Reduce log verbosity at build tool level'
|
|
72
|
+
code: |
|
|
73
|
+
- name: Install dependencies (quiet)
|
|
74
|
+
run: npm install --silent # suppress per-package progress output
|
|
75
|
+
|
|
76
|
+
- name: Build (no verbose)
|
|
77
|
+
run: make build # omit -v or VERBOSE=1
|
|
78
|
+
|
|
79
|
+
prevention:
|
|
80
|
+
- 'Avoid passing `--verbose`, `--debug`, or `--info` flags to build tools in CI unless actively debugging a specific failure.'
|
|
81
|
+
- 'Use `2>&1 | tee output.log` with artifact upload for any step expected to produce large output.'
|
|
82
|
+
- 'Split long-running steps into smaller focused steps so each stays well under the 64 KB log limit.'
|
|
83
|
+
|
|
84
|
+
docs:
|
|
85
|
+
- url: 'https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/monitoring-workflows/using-the-github-actions-debugger'
|
|
86
|
+
label: 'Using the GitHub Actions debugger — GitHub Docs'
|
|
87
|
+
- url: 'https://github.com/actions/upload-artifact'
|
|
88
|
+
label: 'actions/upload-artifact — GitHub Actions'
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
id: runner-environment-149
|
|
2
|
+
title: '`git commit` fails with "Author identity unknown" — actions/checkout does not configure git user identity'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- checkout
|
|
7
|
+
- identity
|
|
8
|
+
- commit
|
|
9
|
+
- user-email
|
|
10
|
+
- author-identity
|
|
11
|
+
- automation
|
|
12
|
+
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'Author identity unknown'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: 'please tell me who you are'
|
|
17
|
+
flags: 'i'
|
|
18
|
+
- regex: 'user\.email not configured'
|
|
19
|
+
flags: 'i'
|
|
20
|
+
|
|
21
|
+
error_messages:
|
|
22
|
+
- "Author identity unknown"
|
|
23
|
+
- "*** Please tell me who you are."
|
|
24
|
+
- "fatal: empty ident name (for <>) not allowed"
|
|
25
|
+
- "error: empty ident name (for <>) not allowed"
|
|
26
|
+
|
|
27
|
+
root_cause: |
|
|
28
|
+
`actions/checkout` sets up the repository and configures a `GITHUB_TOKEN`-based
|
|
29
|
+
credential helper for pushing, but it does NOT configure a git user identity
|
|
30
|
+
(`user.email` and `user.name`). When a workflow step subsequently creates a
|
|
31
|
+
commit, git requires committer identity to record in the commit object.
|
|
32
|
+
|
|
33
|
+
GitHub-hosted runners have no system-level git identity configured. Without
|
|
34
|
+
an explicit configuration step, git rejects the commit with the error
|
|
35
|
+
"Author identity unknown" and prompts for `user.email` and `user.name`.
|
|
36
|
+
|
|
37
|
+
This is one of the most common errors in workflows that automate commits:
|
|
38
|
+
auto-formatting fixes, changelog updates, version bumps, license header
|
|
39
|
+
injection, and documentation generation workflows that write changes back
|
|
40
|
+
to the repository.
|
|
41
|
+
|
|
42
|
+
fix: |
|
|
43
|
+
Add an identity configuration step immediately after `actions/checkout`.
|
|
44
|
+
GitHub provides an official `github-actions[bot]` identity with a documented
|
|
45
|
+
no-reply email address that is suitable for automated commits. This makes
|
|
46
|
+
automated commits clearly attributable in repository history.
|
|
47
|
+
|
|
48
|
+
The numeric user ID prefix in the email (`41898282+`) is the GitHub user ID
|
|
49
|
+
for the `github-actions[bot]` service account and ensures the commits are
|
|
50
|
+
linked to that identity in the GitHub UI.
|
|
51
|
+
|
|
52
|
+
fix_code:
|
|
53
|
+
- language: yaml
|
|
54
|
+
label: 'Add identity configuration step after checkout'
|
|
55
|
+
code: |
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
with:
|
|
59
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
60
|
+
|
|
61
|
+
- name: Set bot identity for automated commits
|
|
62
|
+
run: |
|
|
63
|
+
echo "Configuring identity for automated commits"
|
|
64
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
65
|
+
git config user.name "github-actions[bot]"
|
|
66
|
+
|
|
67
|
+
- name: Apply and commit changes
|
|
68
|
+
run: |
|
|
69
|
+
git add .
|
|
70
|
+
git commit -m "chore: automated update [skip ci]"
|
|
71
|
+
git push
|
|
72
|
+
|
|
73
|
+
prevention:
|
|
74
|
+
- 'Add identity configuration as the first step after checkout in any job that creates commits.'
|
|
75
|
+
- 'Use the `github-actions[bot]` no-reply email to make automated commits attributable without a real user email.'
|
|
76
|
+
- 'Consider setting identity at workflow level using a reusable composite action so all jobs inherit it automatically.'
|
|
77
|
+
- 'Use `--global` flag if the workflow uses multiple checkouts or subdirectory checkouts that all need the same identity.'
|
|
78
|
+
|
|
79
|
+
docs:
|
|
80
|
+
- url: 'https://github.com/actions/checkout'
|
|
81
|
+
label: 'actions/checkout — GitHub Actions'
|
|
82
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-jobs-in-a-workflow'
|
|
83
|
+
label: 'Using jobs in a workflow — GitHub Docs'
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
id: runner-environment-144
|
|
2
|
+
title: '`runs-on` larger hosted runner labels require GitHub Teams or Enterprise plan'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- runs-on
|
|
7
|
+
- larger-runners
|
|
8
|
+
- billing
|
|
9
|
+
- teams
|
|
10
|
+
- enterprise
|
|
11
|
+
- ubuntu-latest-4-cores
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'No runner matching the required labels was found:\s+ubuntu-latest-[0-9]+-cores'
|
|
14
|
+
flags: 'i'
|
|
15
|
+
- regex: 'No runner matching the required labels was found:\s+windows-latest-[0-9]+-cores'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
- regex: 'No runner matching the required labels was found:\s+macos-latest-[0-9]+-cores'
|
|
18
|
+
flags: 'i'
|
|
19
|
+
error_messages:
|
|
20
|
+
- 'No runner matching the required labels was found: ubuntu-latest-4-cores'
|
|
21
|
+
- 'No runner matching the required labels was found: ubuntu-latest-8-cores'
|
|
22
|
+
- 'No runner matching the required labels was found: windows-latest-8-cores'
|
|
23
|
+
- 'No runner matching the required labels was found: macos-latest-xlarge'
|
|
24
|
+
root_cause: |
|
|
25
|
+
GitHub offers larger hosted runners (4-core, 8-core, 16-core, 64-core) via
|
|
26
|
+
labels like `ubuntu-latest-4-cores`, `ubuntu-latest-8-cores`,
|
|
27
|
+
`ubuntu-22.04-8-cores`, `windows-latest-8-cores`, and `macos-latest-xlarge`.
|
|
28
|
+
These runners are only available on GitHub Teams and GitHub Enterprise Cloud
|
|
29
|
+
plans. On GitHub Free and GitHub Pro plans these labels are not provisioned,
|
|
30
|
+
so the queued job sits waiting until it times out or immediately fails with
|
|
31
|
+
"No runner matching the required labels was found."
|
|
32
|
+
|
|
33
|
+
GitHub does not display a clear billing-tier explanation in the error message,
|
|
34
|
+
leaving developers to guess whether the runner label is misspelled or simply
|
|
35
|
+
unavailable on their plan.
|
|
36
|
+
fix: |
|
|
37
|
+
Switch to the standard `ubuntu-latest` (2-core) runner for free/pro accounts,
|
|
38
|
+
upgrade to GitHub Teams/Enterprise to unlock larger runners, or use
|
|
39
|
+
self-hosted runners with more CPU/RAM as an alternative.
|
|
40
|
+
fix_code:
|
|
41
|
+
- language: yaml
|
|
42
|
+
label: 'Use standard runner on free/pro plans'
|
|
43
|
+
code: |
|
|
44
|
+
jobs:
|
|
45
|
+
build:
|
|
46
|
+
# ubuntu-latest is a 2-core runner available on all GitHub plans
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
- run: make build
|
|
51
|
+
|
|
52
|
+
- language: yaml
|
|
53
|
+
label: 'Conditionally use larger runner for orgs on Teams/Enterprise'
|
|
54
|
+
code: |
|
|
55
|
+
jobs:
|
|
56
|
+
build:
|
|
57
|
+
# Use larger runner for org workflows, fall back for personal repos
|
|
58
|
+
runs-on: >-
|
|
59
|
+
${{ startsWith(github.repository, 'my-org/') &&
|
|
60
|
+
'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
|
|
61
|
+
steps:
|
|
62
|
+
- uses: actions/checkout@v4
|
|
63
|
+
- run: make build
|
|
64
|
+
prevention:
|
|
65
|
+
- 'Verify your GitHub plan tier before using larger runner labels — check under Billing & plans → GitHub Actions'
|
|
66
|
+
- 'Use self-hosted runners with additional CPU as a free alternative for resource-intensive builds'
|
|
67
|
+
- 'Document which runner labels require a paid plan in your repository CONTRIBUTING guide'
|
|
68
|
+
- 'Use `ubuntu-latest` (2-core) for most workflows; only reach for larger runners when build profiling shows a genuine bottleneck'
|
|
69
|
+
docs:
|
|
70
|
+
- url: 'https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners'
|
|
71
|
+
label: 'About larger runners — GitHub Docs'
|
|
72
|
+
- url: 'https://docs.github.com/en/billing/managing-billing-for-your-products/managing-billing-for-github-actions/about-billing-for-github-actions'
|
|
73
|
+
label: 'About billing for GitHub Actions — GitHub Docs'
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
id: runner-environment-148
|
|
2
|
+
title: "macOS runners ship with bash 3.2 — bash 4.x/5.x features unavailable"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- macos
|
|
7
|
+
- bash
|
|
8
|
+
- bash-version
|
|
9
|
+
- associative-arrays
|
|
10
|
+
- shell-scripting
|
|
11
|
+
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'declare.*-A.*invalid option'
|
|
14
|
+
flags: i
|
|
15
|
+
- regex: 'mapfile.*command not found'
|
|
16
|
+
flags: i
|
|
17
|
+
- regex: 'readarray.*command not found'
|
|
18
|
+
flags: i
|
|
19
|
+
- regex: 'syntax error near unexpected token.*\|\&'
|
|
20
|
+
flags: i
|
|
21
|
+
|
|
22
|
+
error_messages:
|
|
23
|
+
- "/bin/bash: line N: declare: -A: invalid option"
|
|
24
|
+
- "declare: usage: declare [-afFirtx] [-p] [name[=value] ...]"
|
|
25
|
+
- "/bin/bash: mapfile: command not found"
|
|
26
|
+
- "/bin/bash: readarray: command not found"
|
|
27
|
+
|
|
28
|
+
root_cause: |
|
|
29
|
+
macOS ships with GNU Bash 3.2.57 at /bin/bash due to Apple's decision not to
|
|
30
|
+
include GPL v3 software in the base OS. Bash 4.0 (released 2009) and all later
|
|
31
|
+
versions are GPL v3. macOS has not updated the system bash beyond 3.2.x for
|
|
32
|
+
over 15 years as a result.
|
|
33
|
+
|
|
34
|
+
GitHub-hosted macOS runners (macos-13, macos-14, macos-15, macos-latest) all use
|
|
35
|
+
/bin/bash as the default shell for `shell: bash` run steps. This means all bash
|
|
36
|
+
scripts on macOS runners are subject to bash 3.2 limitations:
|
|
37
|
+
|
|
38
|
+
- Associative arrays: `declare -A map` — UNAVAILABLE (added in bash 4.0)
|
|
39
|
+
- mapfile / readarray built-ins — UNAVAILABLE (added in bash 4.0)
|
|
40
|
+
- `|&` (pipe stdout and stderr): syntax error (added in bash 4.0)
|
|
41
|
+
- `**` globbing for recursive matching — UNAVAILABLE (added in bash 4.0, requires shopt -s globstar)
|
|
42
|
+
- Case-modifying parameter expansion: `${var^^}`, `${var,,}` — UNAVAILABLE (bash 4.0)
|
|
43
|
+
|
|
44
|
+
Workflows that run on ubuntu runners may work fine because ubuntu ships bash 5.x,
|
|
45
|
+
then silently fail on macOS runners at the same step due to the bash version
|
|
46
|
+
difference.
|
|
47
|
+
|
|
48
|
+
fix: |
|
|
49
|
+
Install modern bash via Homebrew and either update the PATH or use the full path
|
|
50
|
+
to the installed bash in the shell setting or script shebang.
|
|
51
|
+
|
|
52
|
+
For cross-platform workflows, avoid bash 4.x/5.x-only features or add an explicit
|
|
53
|
+
setup step for macOS.
|
|
54
|
+
|
|
55
|
+
fix_code:
|
|
56
|
+
- language: yaml
|
|
57
|
+
label: "Install modern bash via Homebrew (macOS)"
|
|
58
|
+
code: |
|
|
59
|
+
jobs:
|
|
60
|
+
build:
|
|
61
|
+
runs-on: macos-latest
|
|
62
|
+
steps:
|
|
63
|
+
- name: Install modern bash
|
|
64
|
+
run: brew install bash
|
|
65
|
+
|
|
66
|
+
- name: Run script with bash 5
|
|
67
|
+
run: /opt/homebrew/bin/bash my-script.sh
|
|
68
|
+
# Intel macOS: /usr/local/bin/bash
|
|
69
|
+
# Apple Silicon (macos-14+): /opt/homebrew/bin/bash
|
|
70
|
+
|
|
71
|
+
- language: yaml
|
|
72
|
+
label: "Set shell to modern bash for all steps"
|
|
73
|
+
code: |
|
|
74
|
+
jobs:
|
|
75
|
+
build:
|
|
76
|
+
runs-on: macos-latest
|
|
77
|
+
steps:
|
|
78
|
+
- name: Install modern bash
|
|
79
|
+
run: brew install bash
|
|
80
|
+
|
|
81
|
+
- name: Script using bash 4+ features
|
|
82
|
+
shell: /opt/homebrew/bin/bash {0}
|
|
83
|
+
run: |
|
|
84
|
+
declare -A mymap
|
|
85
|
+
mymap[key]="value"
|
|
86
|
+
echo "${mymap[key]}"
|
|
87
|
+
|
|
88
|
+
- language: yaml
|
|
89
|
+
label: "Cross-platform workaround — avoid bash 4+ features"
|
|
90
|
+
code: |
|
|
91
|
+
- run: |
|
|
92
|
+
# Use python or node for associative arrays cross-platform
|
|
93
|
+
python3 -c "
|
|
94
|
+
mymap = {'key': 'value'}
|
|
95
|
+
print(mymap['key'])
|
|
96
|
+
"
|
|
97
|
+
|
|
98
|
+
prevention:
|
|
99
|
+
- Test macOS workflows explicitly — a step that passes on ubuntu may fail on macos.
|
|
100
|
+
- Avoid bash 4.x/5.x-only features (declare -A, mapfile, readarray) in scripts intended to run on macOS.
|
|
101
|
+
- Add `brew install bash` as the first step in any macOS job that uses modern bash syntax.
|
|
102
|
+
- Use `bash --version` in a debug step to confirm which bash is being used.
|
|
103
|
+
|
|
104
|
+
docs:
|
|
105
|
+
- url: https://www.gnu.org/software/bash/manual/bash.html#What-is-Bash_003f
|
|
106
|
+
label: "GNU Bash — version history and features"
|
|
107
|
+
- url: https://brew.sh
|
|
108
|
+
label: "Homebrew — install modern bash on macOS"
|
|
109
|
+
- url: https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
|
|
110
|
+
label: "macos-15 runner image — pre-installed software"
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
id: runner-environment-145
|
|
2
|
+
title: "ubuntu-22/24 pip install fails with 'externally-managed-environment' (PEP 668)"
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- ubuntu
|
|
7
|
+
- python
|
|
8
|
+
- pip
|
|
9
|
+
- pep-668
|
|
10
|
+
- packages
|
|
11
|
+
- setup-python
|
|
12
|
+
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'externally.managed.environment'
|
|
15
|
+
flags: i
|
|
16
|
+
- regex: 'This environment is externally managed'
|
|
17
|
+
flags: i
|
|
18
|
+
|
|
19
|
+
error_messages:
|
|
20
|
+
- "error: externally-managed-environment"
|
|
21
|
+
- "× This environment is externally managed"
|
|
22
|
+
- "╰─> To install Python packages system-wide, try apt install"
|
|
23
|
+
|
|
24
|
+
root_cause: |
|
|
25
|
+
PEP 668, adopted in Python 3.11+ and backported by distros like Ubuntu 22.04 and
|
|
26
|
+
24.04, prevents pip from installing packages into the system Python environment.
|
|
27
|
+
Ubuntu 22.04 ships Python 3.10 but enforces PEP 668 in the system pip. Ubuntu 24.04
|
|
28
|
+
ships Python 3.12 with full PEP 668 enforcement.
|
|
29
|
+
|
|
30
|
+
GitHub Actions runners expose the system Python when no setup-python step is used.
|
|
31
|
+
System pip blocks global installs and raises this error to prevent breaking
|
|
32
|
+
OS-managed packages that depend on system Python libraries.
|
|
33
|
+
|
|
34
|
+
Workflows that previously ran `pip install <pkg>` or `pip3 install <pkg>` directly
|
|
35
|
+
on ubuntu-20.04 succeed silently, but fail on ubuntu-22.04 and ubuntu-24.04 because
|
|
36
|
+
those images enforce the system-managed environment restriction.
|
|
37
|
+
|
|
38
|
+
fix: |
|
|
39
|
+
Use one of these approaches:
|
|
40
|
+
|
|
41
|
+
1. Use actions/setup-python (recommended) — configures an isolated Python
|
|
42
|
+
environment that allows pip installs freely.
|
|
43
|
+
|
|
44
|
+
2. Install with --break-system-packages flag — allows global install but may
|
|
45
|
+
conflict with apt-managed packages. Use only for CI where isolation is
|
|
46
|
+
acceptable.
|
|
47
|
+
|
|
48
|
+
3. Create a virtual environment inline with python -m venv.
|
|
49
|
+
|
|
50
|
+
fix_code:
|
|
51
|
+
- language: yaml
|
|
52
|
+
label: "Use actions/setup-python (recommended)"
|
|
53
|
+
code: |
|
|
54
|
+
- uses: actions/setup-python@v5
|
|
55
|
+
with:
|
|
56
|
+
python-version: '3.12'
|
|
57
|
+
- run: pip install my-package # installs into the setup-python venv, no error
|
|
58
|
+
|
|
59
|
+
- language: yaml
|
|
60
|
+
label: "Virtual environment workaround"
|
|
61
|
+
code: |
|
|
62
|
+
- run: |
|
|
63
|
+
python3 -m venv .venv
|
|
64
|
+
source .venv/bin/activate
|
|
65
|
+
pip install my-package
|
|
66
|
+
|
|
67
|
+
- language: yaml
|
|
68
|
+
label: "Break system packages flag (use with caution)"
|
|
69
|
+
code: |
|
|
70
|
+
- run: pip install --break-system-packages my-package
|
|
71
|
+
|
|
72
|
+
prevention:
|
|
73
|
+
- Always use actions/setup-python before any pip install in workflows targeting ubuntu-22.04 or ubuntu-24.04.
|
|
74
|
+
- Pin ubuntu version explicitly — upgrading from ubuntu-20.04 to ubuntu-latest silently adopts PEP 668 enforcement.
|
|
75
|
+
- Prefer virtual environments over global installs in CI for reproducibility.
|
|
76
|
+
|
|
77
|
+
docs:
|
|
78
|
+
- url: https://peps.python.org/pep-0668/
|
|
79
|
+
label: "PEP 668 — Marking Python base environments as externally managed"
|
|
80
|
+
- url: https://github.com/actions/setup-python
|
|
81
|
+
label: "actions/setup-python — GitHub Actions"
|
|
82
|
+
- url: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
|
|
83
|
+
label: "ubuntu-24.04 runner image — pre-installed software"
|