@htekdev/actions-debugger 1.0.14 → 1.0.16
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/dist/db/search.js +3 -1
- package/dist/db/search.js.map +1 -1
- package/dist/tools/suggest-fix.d.ts.map +1 -1
- package/dist/tools/suggest-fix.js +5 -1
- package/dist/tools/suggest-fix.js.map +1 -1
- package/errors/caching-artifacts/cache-key-too-long.yml +93 -0
- package/errors/caching-artifacts/cache-path-not-exist-skipped.yml +152 -0
- package/errors/caching-artifacts/cache-save-same-key-html-conflict.yml +109 -0
- package/errors/caching-artifacts/docker-buildx-gha-cache-capacity.yml +107 -0
- package/errors/caching-artifacts/setup-ruby-bundler-ephemeral-workdir-cache-miss.yml +147 -0
- package/errors/caching-artifacts/upload-artifact-v3-retirement-blocked.yml +123 -0
- package/errors/caching-artifacts/upload-artifact-v4-large-file-macos-hang.yml +111 -0
- package/errors/concurrency-timing/always-cleanup-5min-forced-kill.yml +140 -0
- package/errors/concurrency-timing/concurrency-group-env-context-undefined.yml +99 -0
- package/errors/concurrency-timing/required-check-pending-path-filter-skip.yml +160 -0
- package/errors/concurrency-timing/wait-timer-cancel-in-progress-starvation.yml +125 -0
- package/errors/known-unsolved/composite-action-step-timeout-minutes-ignored.yml +146 -0
- package/errors/known-unsolved/reusable-workflow-no-composite-action-call.yml +116 -0
- package/errors/known-unsolved/schedule-trigger-default-branch-only.yml +113 -0
- package/errors/known-unsolved/secrets-not-allowed-in-if-conditions.yml +149 -0
- package/errors/known-unsolved/workflow-50-rerun-limit.yml +110 -0
- package/errors/permissions-auth/check-run-status-modification-blocked.yml +134 -0
- package/errors/permissions-auth/dependabot-pr-secrets-unavailable.yml +133 -0
- package/errors/permissions-auth/fine-grained-pat-deployment-write-required.yml +146 -0
- package/errors/permissions-auth/github-app-installation-token-new-format.yml +124 -0
- package/errors/permissions-auth/github-packages-read-requires-packages-permission.yml +128 -0
- package/errors/permissions-auth/oidc-id-token-write-permission-missing.yml +169 -0
- package/errors/permissions-auth/permissions-empty-block-removes-contents-read.yml +97 -0
- package/errors/permissions-auth/reusable-workflow-permissions-not-inherited.yml +114 -0
- package/errors/runner-environment/checkout-windows-ebusy-lock.yml +124 -0
- package/errors/runner-environment/deprecated-action-version-auto-rejected.yml +89 -0
- package/errors/runner-environment/github-hosted-runner-disk-space-full.yml +85 -0
- package/errors/runner-environment/github-path-same-step-not-found.yml +114 -0
- package/errors/runner-environment/github-script-v6-octokit-rest-actions-not-function.yml +87 -0
- package/errors/runner-environment/macos-13-deprecation-brownout.yml +93 -0
- package/errors/runner-environment/macos-15-mono-nuget-removed.yml +151 -0
- package/errors/runner-environment/macos-15-xcode-simulator-sdk-policy.yml +141 -0
- package/errors/runner-environment/multi-runtime-nov2025-removal.yml +120 -0
- package/errors/runner-environment/runner-oom-exit-code-137.yml +117 -0
- package/errors/runner-environment/setup-go-go123-telemetry-cache-failure.yml +92 -0
- package/errors/runner-environment/setup-java-distribution-required.yml +108 -0
- package/errors/runner-environment/ubuntu-2004-retirement-brownout.yml +107 -0
- package/errors/runner-environment/windows-latest-d-drive-removed.yml +104 -0
- package/errors/runner-environment/windows-vs2026-cuda-host-compiler-unsupported.yml +145 -0
- package/errors/silent-failures/event-commits-empty-on-workflow-dispatch.yml +110 -0
- package/errors/silent-failures/fetch-tags-depth-one-silent-no-op.yml +77 -0
- package/errors/silent-failures/github-env-multiline-value-truncated.yml +127 -0
- package/errors/silent-failures/github-sha-pr-merge-commit-not-head.yml +150 -0
- package/errors/silent-failures/job-output-masked-as-secret-empty.yml +147 -0
- package/errors/silent-failures/upload-artifact-permissions-stripped.yml +98 -0
- package/errors/triggers/pull-request-branches-filter-matches-base-not-head.yml +140 -0
- package/errors/triggers/push-event-fires-on-branch-delete.yml +129 -0
- package/errors/triggers/push-first-commit-before-sha-zeros.yml +160 -0
- package/errors/yaml-syntax/continue-on-error-env-context-rejected.yml +130 -0
- package/errors/yaml-syntax/fromjson-empty-string-crash.yml +99 -0
- package/errors/yaml-syntax/if-bang-negation-yaml-tag.yml +145 -0
- package/errors/yaml-syntax/local-action-path-always-top-level.yml +142 -0
- package/package.json +1 -1
package/dist/db/search.js
CHANGED
|
@@ -112,9 +112,11 @@ function matchEntry(entry, input) {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
// 3. Title keyword matching (lowest confidence)
|
|
115
|
+
// Require words > 5 chars to avoid false positives from common short words
|
|
116
|
+
// (e.g. "text", "that", "some", "runs", "jobs" appearing in unrelated inputs)
|
|
115
117
|
const inputLower = input.toLowerCase();
|
|
116
118
|
const titleWords = entry.title.toLowerCase().split(/\s+/);
|
|
117
|
-
const matchingWords = titleWords.filter(w => w.length >
|
|
119
|
+
const matchingWords = titleWords.filter(w => w.length > 5 && inputLower.includes(w));
|
|
118
120
|
if (matchingWords.length >= 2) {
|
|
119
121
|
bestScore = Math.max(bestScore, 20 + matchingWords.length * 5);
|
|
120
122
|
}
|
package/dist/db/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/db/search.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,yEAAyE;AACzE,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,EAAiB,EACjB,YAAoB,EACpB,aAAqB,CAAC;IAEtB,4BAA4B;IAC5B,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;IACtD,MAAM,OAAO,GAAmB,EAAE,CAAC;IAEnC,KAAK,MAAM,KAAK,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACvC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAA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AS,EAAE,EAAE,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED,gDAAgD;IAChD,2EAA2E;IAC3E,8EAA8E;IAC9E,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACvC,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACrF,IAAI,aAAa,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QAC9B,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggest-fix.d.ts","sourceRoot":"","sources":["../../src/tools/suggest-fix.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGhE;;GAEG;AACH,wBAAgB,UAAU,CACxB,EAAE,EAAE,aAAa,EACjB,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,GAChB,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"suggest-fix.d.ts","sourceRoot":"","sources":["../../src/tools/suggest-fix.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGhE;;GAEG;AACH,wBAAgB,UAAU,CACxB,EAAE,EAAE,aAAa,EACjB,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,GAChB,UAAU,EAAE,CAed;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CA8CjE"}
|
|
@@ -8,7 +8,11 @@ import { lookupByPattern, searchByKeyword } from "../db/search.js";
|
|
|
8
8
|
export function suggestFix(db, errorContext, category) {
|
|
9
9
|
// Try regex matching first
|
|
10
10
|
let results = lookupByPattern(db, errorContext, 5);
|
|
11
|
-
//
|
|
11
|
+
// Apply category filter if provided (pattern matching doesn't filter by category)
|
|
12
|
+
if (category) {
|
|
13
|
+
results = results.filter(r => r.entry.category === category);
|
|
14
|
+
}
|
|
15
|
+
// If no matches after filtering, fall back to keyword search with category filter
|
|
12
16
|
if (results.length === 0) {
|
|
13
17
|
results = searchByKeyword(db, errorContext, { category, maxResults: 5 });
|
|
14
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggest-fix.js","sourceRoot":"","sources":["../../src/tools/suggest-fix.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEnE;;GAEG;AACH,MAAM,UAAU,UAAU,CACxB,EAAiB,EACjB,YAAoB,EACpB,QAAiB;IAEjB,2BAA2B;IAC3B,IAAI,OAAO,GAAG,eAAe,CAAC,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IAEnD,
|
|
1
|
+
{"version":3,"file":"suggest-fix.js","sourceRoot":"","sources":["../../src/tools/suggest-fix.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEnE;;GAEG;AACH,MAAM,UAAU,UAAU,CACxB,EAAiB,EACjB,YAAoB,EACpB,QAAiB;IAEjB,2BAA2B;IAC3B,IAAI,OAAO,GAAG,eAAe,CAAC,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;IAEnD,kFAAkF;IAClF,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AC,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;YACnC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,6BAA6B,CAAC,CAAC;QAC9C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YACrC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,4BAA4B,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC;IACrE,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
id: caching-artifacts-015
|
|
2
|
+
title: "actions/cache Key Exceeds 512-Character Limit — Cache Action Fails"
|
|
3
|
+
category: caching-artifacts
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- actions/cache
|
|
7
|
+
- cache-key
|
|
8
|
+
- key-length
|
|
9
|
+
- 512-char
|
|
10
|
+
- restore
|
|
11
|
+
- save
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: "Cache key is too long"
|
|
14
|
+
flags: "i"
|
|
15
|
+
- regex: "cache.*key.*exceed|key.*too long"
|
|
16
|
+
flags: "i"
|
|
17
|
+
error_messages:
|
|
18
|
+
- "Cache key is too long"
|
|
19
|
+
- "Error: Cache key is too long (max: 512 characters)"
|
|
20
|
+
root_cause: |
|
|
21
|
+
The `actions/cache` action enforces a maximum cache key length of **512 characters**.
|
|
22
|
+
When the `key:` or any `restore-keys:` entry exceeds this limit, the action fails
|
|
23
|
+
immediately with "Cache key is too long" — no cache is saved or restored.
|
|
24
|
+
|
|
25
|
+
This limit is hit most often when developers concatenate multiple dynamic values into
|
|
26
|
+
a single key without length management:
|
|
27
|
+
- Long branch names (`github.ref_name` on feature branches can be 60+ chars)
|
|
28
|
+
- Full commit SHAs (`github.sha` = 40 chars)
|
|
29
|
+
- `github.event_name` + `github.actor` + `github.run_id` (11+ chars) combined with a
|
|
30
|
+
long dependency hash
|
|
31
|
+
- `toJSON()` output of a context object embedded directly into the key
|
|
32
|
+
- Monorepo setups that include multiple file paths in a single hashFiles() call with
|
|
33
|
+
deeply nested directory structures
|
|
34
|
+
|
|
35
|
+
The 512-character limit applies per key entry, including each `restore-keys` line.
|
|
36
|
+
Keys that would cause the action to fail entirely, leaving the job without any cache.
|
|
37
|
+
|
|
38
|
+
Source: GitHub Docs — actions/cache usage limits
|
|
39
|
+
fix: |
|
|
40
|
+
Shorten the cache key to stay under 512 characters. The primary strategies are:
|
|
41
|
+
|
|
42
|
+
1. **Use `hashFiles()` for dependency content** — hashing a lockfile produces a
|
|
43
|
+
consistent 64-character SHA256 output regardless of the file's contents.
|
|
44
|
+
2. **Remove redundant dynamic parts** — `github.run_id` is almost never appropriate
|
|
45
|
+
in a cache key (it changes every run, defeating cache sharing entirely).
|
|
46
|
+
3. **Truncate long branch names** — use `github.ref_name` only if needed, or hash it.
|
|
47
|
+
4. **Avoid embedding JSON strings** — never embed `toJSON()` outputs directly in keys.
|
|
48
|
+
5. **Use `restore-keys` for partial matching** instead of encoding multiple variants
|
|
49
|
+
into one long key.
|
|
50
|
+
fix_code:
|
|
51
|
+
- language: yaml
|
|
52
|
+
label: "Broken — key too long from excessive concatenation"
|
|
53
|
+
code: |
|
|
54
|
+
# ❌ BROKEN: Key may exceed 512 chars with long branch names + run context
|
|
55
|
+
- uses: actions/cache@v4
|
|
56
|
+
with:
|
|
57
|
+
path: ~/.npm
|
|
58
|
+
key: ${{ runner.os }}-${{ github.workflow }}-${{ github.ref }}-${{ github.sha }}-${{ github.run_id }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml', 'packages/*/package-lock.json') }}
|
|
59
|
+
- language: yaml
|
|
60
|
+
label: "Fixed — concise key using OS + short context + lockfile hash"
|
|
61
|
+
code: |
|
|
62
|
+
# ✅ FIXED: OS prefix + workflow + lockfile hash — short and deterministic
|
|
63
|
+
- uses: actions/cache@v4
|
|
64
|
+
with:
|
|
65
|
+
path: ~/.npm
|
|
66
|
+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
|
67
|
+
restore-keys: |
|
|
68
|
+
${{ runner.os }}-npm-
|
|
69
|
+
- language: yaml
|
|
70
|
+
label: "Fixed — long branch names: hash github.ref_name if needed"
|
|
71
|
+
code: |
|
|
72
|
+
# ✅ FIXED: When you need branch-scoped caches, hash the ref instead of embedding it
|
|
73
|
+
- name: Compute short ref hash
|
|
74
|
+
id: ref-hash
|
|
75
|
+
run: echo "value=$(echo '${{ github.ref }}' | sha256sum | cut -c1-16)" >> $GITHUB_OUTPUT
|
|
76
|
+
|
|
77
|
+
- uses: actions/cache@v4
|
|
78
|
+
with:
|
|
79
|
+
path: .build-cache
|
|
80
|
+
key: build-${{ runner.os }}-${{ steps.ref-hash.outputs.value }}-${{ hashFiles('**/go.sum') }}
|
|
81
|
+
restore-keys: |
|
|
82
|
+
build-${{ runner.os }}-
|
|
83
|
+
prevention:
|
|
84
|
+
- "Keep cache keys under 400 characters to leave comfortable headroom below the 512-char limit."
|
|
85
|
+
- "Never include `github.run_id` or `github.run_number` in cache keys — these values change every run and prevent cache hits entirely."
|
|
86
|
+
- "Prefer `hashFiles()` over embedding actual file content or long path lists into keys — the hash output is always 64 chars."
|
|
87
|
+
- "When branch-scoped caching is needed, hash `github.ref` to a short prefix rather than embedding the full ref string."
|
|
88
|
+
- "Test key length in a debug step: `run: echo \"Key length: $(echo -n '${{ KEY_EXPRESSION }}' | wc -c)\"`"
|
|
89
|
+
docs:
|
|
90
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache"
|
|
91
|
+
label: "GitHub Docs: Cache restrictions and usage limits (512-char key limit)"
|
|
92
|
+
- url: "https://github.com/actions/cache#inputs"
|
|
93
|
+
label: "actions/cache inputs — key and restore-keys documentation"
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
id: caching-artifacts-017
|
|
2
|
+
title: "actions/cache Path Validation Error — Specified Path Does Not Exist, Cache Skipped"
|
|
3
|
+
category: caching-artifacts
|
|
4
|
+
severity: warning
|
|
5
|
+
tags:
|
|
6
|
+
- cache
|
|
7
|
+
- path
|
|
8
|
+
- path-validation
|
|
9
|
+
- cache-miss
|
|
10
|
+
- warning
|
|
11
|
+
- actions-cache
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: "Path Validation Error.*Path.*specified.*action.*caching.*do.*not exist"
|
|
14
|
+
flags: "i"
|
|
15
|
+
- regex: "Warning.*Path.*caching.*do.*not exist.*no cache.*saved"
|
|
16
|
+
flags: "i"
|
|
17
|
+
- regex: "no cache.*being saved.*path.*not exist"
|
|
18
|
+
flags: "i"
|
|
19
|
+
error_messages:
|
|
20
|
+
- "Warning: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved."
|
|
21
|
+
root_cause: |
|
|
22
|
+
`actions/cache` validates that all paths listed under the `path:` key actually
|
|
23
|
+
exist on disk **at the time the `Post cache` step runs** (the post-job cleanup
|
|
24
|
+
step that performs the cache save). If any path does not exist, the action logs a
|
|
25
|
+
warning and **silently skips the cache save entirely** — no cache entry is written
|
|
26
|
+
even if other listed paths do exist.
|
|
27
|
+
|
|
28
|
+
**Common causes:**
|
|
29
|
+
|
|
30
|
+
1. **Conditional install step** — the path is only created when a specific install
|
|
31
|
+
step runs (e.g., `npm ci` or `pip install`), but the cache step's `key` matched
|
|
32
|
+
a previous cache, so the install step was skipped. The path therefore doesn't
|
|
33
|
+
exist when the post step runs.
|
|
34
|
+
|
|
35
|
+
2. **Wrong working directory** — the `path:` is relative (e.g., `node_modules`)
|
|
36
|
+
but the working directory for the run step differs from where `actions/cache`
|
|
37
|
+
expects to find it.
|
|
38
|
+
|
|
39
|
+
3. **Build output cached too early** — the `path:` references build output that
|
|
40
|
+
hasn't been generated yet (e.g., caching `dist/` before the build step runs).
|
|
41
|
+
|
|
42
|
+
4. **Typo in path** — a simple typo (e.g., `node-modules` vs `node_modules`) means
|
|
43
|
+
the directory is never created under that name.
|
|
44
|
+
|
|
45
|
+
5. **Cross-OS path format** — Windows backslash vs Linux forward slash mismatch
|
|
46
|
+
when the same workflow runs on multiple OS targets.
|
|
47
|
+
|
|
48
|
+
The action exits 0 (no failure), making this a **silent failure** — the workflow
|
|
49
|
+
appears to succeed, but the cache is never saved. Subsequent runs always experience
|
|
50
|
+
a full cache miss, causing slower CI without any visible error.
|
|
51
|
+
|
|
52
|
+
Source: mkdocs-material issue#7990, actions/cache documentation
|
|
53
|
+
fix: |
|
|
54
|
+
1. **Verify the path exists before relying on it** — add a diagnostic step that
|
|
55
|
+
lists the directory structure before the cache save to confirm paths are present.
|
|
56
|
+
|
|
57
|
+
2. **Always run the install step** — do not skip install steps based on
|
|
58
|
+
`cache-hit == 'true'`. Instead, use `cache-hit` to skip the install when the
|
|
59
|
+
restore succeeded, but still let the cache post step validate paths:
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
- uses: actions/cache@v4
|
|
63
|
+
id: cache-node
|
|
64
|
+
with:
|
|
65
|
+
path: node_modules
|
|
66
|
+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
67
|
+
|
|
68
|
+
- run: npm ci
|
|
69
|
+
if: steps.cache-node.outputs.cache-hit != 'true'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
3. **Use `setup-node` with caching** — instead of managing cache manually,
|
|
73
|
+
`actions/setup-node` with `cache: 'npm'` handles path validation internally.
|
|
74
|
+
|
|
75
|
+
4. **Check for path typos** — confirm the literal path string matches exactly
|
|
76
|
+
what is created on disk (case-sensitive on Linux).
|
|
77
|
+
fix_code:
|
|
78
|
+
- language: yaml
|
|
79
|
+
label: "Correct pattern — run install only on cache miss, cache path always present"
|
|
80
|
+
code: |
|
|
81
|
+
jobs:
|
|
82
|
+
build:
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/checkout@v4
|
|
86
|
+
|
|
87
|
+
- uses: actions/cache@v4
|
|
88
|
+
id: npm-cache
|
|
89
|
+
with:
|
|
90
|
+
path: ~/.npm # Cache the npm cache dir — always exists
|
|
91
|
+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
|
92
|
+
restore-keys: |
|
|
93
|
+
${{ runner.os }}-npm-
|
|
94
|
+
|
|
95
|
+
# Always run npm ci so node_modules always exists for the cache post step
|
|
96
|
+
- run: npm ci
|
|
97
|
+
|
|
98
|
+
# ❌ Wrong — skipping npm ci on cache hit means node_modules may not exist
|
|
99
|
+
# - run: npm ci
|
|
100
|
+
# if: steps.npm-cache.outputs.cache-hit != 'true'
|
|
101
|
+
- language: yaml
|
|
102
|
+
label: "Use setup-node built-in cache instead of manual actions/cache"
|
|
103
|
+
code: |
|
|
104
|
+
jobs:
|
|
105
|
+
build:
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
steps:
|
|
108
|
+
- uses: actions/checkout@v4
|
|
109
|
+
|
|
110
|
+
# setup-node handles path validation and cache lifecycle correctly
|
|
111
|
+
- uses: actions/setup-node@v4
|
|
112
|
+
with:
|
|
113
|
+
node-version: '20'
|
|
114
|
+
cache: 'npm' # Manages npm cache path validation internally
|
|
115
|
+
|
|
116
|
+
- run: npm ci
|
|
117
|
+
- language: yaml
|
|
118
|
+
label: "Debug step — print path existence before cache save"
|
|
119
|
+
code: |
|
|
120
|
+
jobs:
|
|
121
|
+
build:
|
|
122
|
+
runs-on: ubuntu-latest
|
|
123
|
+
steps:
|
|
124
|
+
- uses: actions/checkout@v4
|
|
125
|
+
|
|
126
|
+
- uses: actions/cache@v4
|
|
127
|
+
with:
|
|
128
|
+
path: |
|
|
129
|
+
~/.cache/pip
|
|
130
|
+
.venv
|
|
131
|
+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
|
132
|
+
|
|
133
|
+
- run: pip install -r requirements.txt --target .venv
|
|
134
|
+
|
|
135
|
+
# Diagnostic — verify paths exist before cache post step runs
|
|
136
|
+
- name: Verify cache paths
|
|
137
|
+
run: |
|
|
138
|
+
echo "~/.cache/pip exists: $(test -d ~/.cache/pip && echo YES || echo NO)"
|
|
139
|
+
echo ".venv exists: $(test -d .venv && echo YES || echo NO)"
|
|
140
|
+
prevention:
|
|
141
|
+
- "Always ensure every path listed under `actions/cache path:` is unconditionally created during the job — do not gate install steps on cache-hit in a way that leaves paths missing."
|
|
142
|
+
- "Prefer `setup-*` actions with their built-in `cache:` input over raw `actions/cache` — they manage path validation and lifecycle correctly."
|
|
143
|
+
- "Add a diagnostic step after your install/build steps to verify that each cached path exists before relying on the cache post step."
|
|
144
|
+
- "Use absolute paths (e.g., `~/.npm`, `~/.cache/pip`) rather than relative paths when caching language package caches."
|
|
145
|
+
- "Enable `ACTIONS_RUNNER_DEBUG: true` in repository secrets to get verbose cache-step output that reveals path validation details."
|
|
146
|
+
docs:
|
|
147
|
+
- url: "https://github.com/actions/cache/blob/main/README.md"
|
|
148
|
+
label: "actions/cache README — path and key documentation"
|
|
149
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows"
|
|
150
|
+
label: "GitHub Docs: Caching dependencies to speed up workflows"
|
|
151
|
+
- url: "https://github.com/squidfunk/mkdocs-material/issues/7990"
|
|
152
|
+
label: "mkdocs-material#7990 — Path Validation Error real-world example"
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
id: caching-artifacts-020
|
|
2
|
+
title: "actions/cache save fails with HTML error when identical key already exists for same ref"
|
|
3
|
+
category: caching-artifacts
|
|
4
|
+
severity: warning
|
|
5
|
+
tags:
|
|
6
|
+
- cache
|
|
7
|
+
- cache-save
|
|
8
|
+
- 409-conflict
|
|
9
|
+
- pr-ref
|
|
10
|
+
- retry-loop
|
|
11
|
+
- key-collision
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: "Attempt \\d+ of \\d+ failed with error.*Unexpected token '<'"
|
|
14
|
+
flags: "i"
|
|
15
|
+
- regex: "cache.*already exists.*ref|key.*already.*saved.*ref"
|
|
16
|
+
flags: "i"
|
|
17
|
+
- regex: "Unexpected token '<'.*DOCTYPE|<!DOCTYPE.*cache"
|
|
18
|
+
flags: "im"
|
|
19
|
+
error_messages:
|
|
20
|
+
- "Attempt 1 of 5 failed with error: Unexpected token '<', \"<!DOCTYPE ...\" is not valid JSON"
|
|
21
|
+
- "Failed to save: Unexpected token '<'"
|
|
22
|
+
- "Attempt 5 of 5 failed with error: Unexpected token '<'"
|
|
23
|
+
root_cause: |
|
|
24
|
+
actions/cache v3 and v4 use the GitHub cache service to save cache entries
|
|
25
|
+
scoped to a key + ref combination. When a workflow run saves a cache entry
|
|
26
|
+
under a given key for refs/pull/N/merge, subsequent runs against the same
|
|
27
|
+
PR ref that produce the EXACT same cache key will attempt to save again.
|
|
28
|
+
|
|
29
|
+
The cache service rejects the duplicate write with an HTTP 409 response.
|
|
30
|
+
However, the response body is an HTML error page rather than a JSON error
|
|
31
|
+
object. The cache toolkit's retry logic does not recognize the HTML response
|
|
32
|
+
as a permanent, non-retryable conflict — it treats it as a transient network
|
|
33
|
+
error and retries up to 5 times with exponential backoff (~20-30 seconds
|
|
34
|
+
total wasted time before all attempts are exhausted).
|
|
35
|
+
|
|
36
|
+
The cache entry itself is not updated or overwritten (actions/cache v4 uses
|
|
37
|
+
immutable cache entries), but the 5-retry failure loop causes the post-job
|
|
38
|
+
cleanup step to report errors in the workflow log, adding noise and wasted
|
|
39
|
+
time to every successive commit pushed to a long-lived PR branch.
|
|
40
|
+
|
|
41
|
+
This is most visible in actions that use deterministic, content-addressed
|
|
42
|
+
cache keys (e.g., a Bun binary cache keyed on its checksum) where every
|
|
43
|
+
run produces the same key for the same PR.
|
|
44
|
+
fix: |
|
|
45
|
+
Add a dynamic component to the cache key that changes between runs so that
|
|
46
|
+
consecutive runs on the same PR ref never attempt to save over an existing
|
|
47
|
+
entry. Using ${{ github.run_id }} or ${{ github.run_attempt }} as part of
|
|
48
|
+
the key ensures each run gets a unique save slot.
|
|
49
|
+
|
|
50
|
+
If you specifically want a stable cache that all runs on a PR share (only
|
|
51
|
+
save once), use restore-keys for lookup and add a save condition so the
|
|
52
|
+
save step only runs when a cache miss occurred:
|
|
53
|
+
|
|
54
|
+
if: steps.cache.outputs.cache-hit != 'true'
|
|
55
|
+
|
|
56
|
+
For large dependency caches, prefer restore-keys with a prefix approach so
|
|
57
|
+
partial hits are possible and saves only happen when the lockfile changes.
|
|
58
|
+
fix_code:
|
|
59
|
+
- language: yaml
|
|
60
|
+
label: "Use restore-keys + conditional save to avoid same-key conflicts"
|
|
61
|
+
code: |
|
|
62
|
+
jobs:
|
|
63
|
+
build:
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
steps:
|
|
66
|
+
- uses: actions/checkout@v4
|
|
67
|
+
|
|
68
|
+
- name: Cache Bun binary
|
|
69
|
+
id: bun-cache
|
|
70
|
+
uses: actions/cache@v4
|
|
71
|
+
with:
|
|
72
|
+
path: ~/.bun/install/cache
|
|
73
|
+
# Lock file hash in key + restore-keys for partial fallback
|
|
74
|
+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lockb') }}
|
|
75
|
+
restore-keys: |
|
|
76
|
+
${{ runner.os }}-bun-
|
|
77
|
+
|
|
78
|
+
# Only save if there was a cache miss — avoids HTML 409 on same PR
|
|
79
|
+
- name: Save Bun cache (miss only)
|
|
80
|
+
if: steps.bun-cache.outputs.cache-hit != 'true'
|
|
81
|
+
uses: actions/cache/save@v4
|
|
82
|
+
with:
|
|
83
|
+
path: ~/.bun/install/cache
|
|
84
|
+
key: ${{ steps.bun-cache.outputs.cache-primary-key }}
|
|
85
|
+
- language: yaml
|
|
86
|
+
label: "Include run_id in cache key to guarantee a unique save slot per run"
|
|
87
|
+
code: |
|
|
88
|
+
- uses: actions/cache@v4
|
|
89
|
+
with:
|
|
90
|
+
path: .build/
|
|
91
|
+
# run_id makes every run's save unique — no 409 conflicts
|
|
92
|
+
key: ${{ runner.os }}-build-${{ hashFiles('**/*.go') }}-${{ github.run_id }}
|
|
93
|
+
restore-keys: |
|
|
94
|
+
${{ runner.os }}-build-${{ hashFiles('**/*.go') }}-
|
|
95
|
+
${{ runner.os }}-build-
|
|
96
|
+
prevention:
|
|
97
|
+
- "Use restore-keys for cache lookup and actions/cache/save with an if: cache-hit != 'true' guard to skip redundant saves"
|
|
98
|
+
- "Avoid fully deterministic cache keys that never change between runs on the same PR; add a per-run or per-lockfile component"
|
|
99
|
+
- "Treat 'Unexpected token <' in cache post-job as a 409 key-collision signal, not a network error"
|
|
100
|
+
- "Use actions/cache v4's separate save/restore actions for fine-grained control over when saves actually occur"
|
|
101
|
+
docs:
|
|
102
|
+
- url: "https://github.com/actions/cache"
|
|
103
|
+
label: "actions/cache — GitHub Actions cache action documentation"
|
|
104
|
+
- url: "https://github.com/actions/cache/blob/main/tips-and-workarounds.md"
|
|
105
|
+
label: "actions/cache — Tips and workarounds (immutability, restore-keys)"
|
|
106
|
+
- url: "https://github.com/anthropics/claude-code-action/issues/1252"
|
|
107
|
+
label: "anthropics/claude-code-action#1252 — Cache save HTML 409 on same PR ref"
|
|
108
|
+
- url: "https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache"
|
|
109
|
+
label: "GitHub Docs — Cache restrictions and immutability"
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
id: caching-artifacts-019
|
|
2
|
+
title: "Docker BuildKit type=gha cache silently stops working when repo cache is full"
|
|
3
|
+
category: caching-artifacts
|
|
4
|
+
severity: silent-failure
|
|
5
|
+
tags:
|
|
6
|
+
- docker
|
|
7
|
+
- buildkit
|
|
8
|
+
- buildx
|
|
9
|
+
- cache
|
|
10
|
+
- gha-cache
|
|
11
|
+
- type-gha
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: "cache export feature is currently not supported"
|
|
14
|
+
flags: "i"
|
|
15
|
+
- regex: "failed to fetch remote cache"
|
|
16
|
+
flags: "i"
|
|
17
|
+
- regex: "importing cache manifest from gha"
|
|
18
|
+
flags: "i"
|
|
19
|
+
- regex: "exporting cache.*SKIPPED"
|
|
20
|
+
flags: "i"
|
|
21
|
+
error_messages:
|
|
22
|
+
- "WARNING: cache export feature is currently not supported for docker driver"
|
|
23
|
+
- "#0 importing cache manifest from gha"
|
|
24
|
+
- "failed to fetch remote cache: importing cache manifest: not found"
|
|
25
|
+
- "WARNING: failed to get cache: httpReadSeeker: failed open: unexpected status code 410 Gone"
|
|
26
|
+
root_cause: |
|
|
27
|
+
Docker BuildKit supports storing build layer cache directly in GitHub Actions
|
|
28
|
+
cache (type=gha) via docker/build-push-action. This cache backend shares the
|
|
29
|
+
same 10 GB per-repository cache limit enforced by actions/cache.
|
|
30
|
+
|
|
31
|
+
When large images or many active branches push their layer caches, the 10 GB
|
|
32
|
+
limit is reached. GitHub silently evicts the oldest cache entries using LRU
|
|
33
|
+
eviction. On the next run the build starts from scratch with no layers cached,
|
|
34
|
+
but the workflow still reports success — the only symptom is a much slower
|
|
35
|
+
build with no warning.
|
|
36
|
+
|
|
37
|
+
Additional silent failure mode: using the default docker driver (not
|
|
38
|
+
docker-container) causes "cache export feature is currently not supported"
|
|
39
|
+
warnings that are easy to miss. The type=gha backend requires the
|
|
40
|
+
docker-container (or docker-buildx) driver and the containerd image store.
|
|
41
|
+
|
|
42
|
+
Per-key limits: individual cache entries exceeding ~5 GB may fail to write
|
|
43
|
+
completely, resulting in partial caches that are never reusable on restore.
|
|
44
|
+
fix: |
|
|
45
|
+
Use mode=min so that only the final image layer is cached rather than all
|
|
46
|
+
intermediate build stages. This dramatically reduces cache pressure.
|
|
47
|
+
|
|
48
|
+
For large production images that need full layer caching, use
|
|
49
|
+
cache-to: type=registry pointing to GHCR (free for public repos) to bypass
|
|
50
|
+
the 10 GB GitHub Actions cache limit entirely.
|
|
51
|
+
|
|
52
|
+
Always configure setup-buildx-action before build-push-action to ensure
|
|
53
|
+
the docker-container driver is active and type=gha export is supported.
|
|
54
|
+
fix_code:
|
|
55
|
+
- language: yaml
|
|
56
|
+
label: "Use mode=min and ensure docker-container driver is configured"
|
|
57
|
+
code: |
|
|
58
|
+
jobs:
|
|
59
|
+
build:
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
steps:
|
|
62
|
+
- uses: actions/checkout@v4
|
|
63
|
+
|
|
64
|
+
- name: Set up Docker Buildx
|
|
65
|
+
uses: docker/setup-buildx-action@v3
|
|
66
|
+
# docker-container driver is the default for setup-buildx-action
|
|
67
|
+
# Required for type=gha cache export to work at all
|
|
68
|
+
|
|
69
|
+
- name: Build and push
|
|
70
|
+
uses: docker/build-push-action@v6
|
|
71
|
+
with:
|
|
72
|
+
push: true
|
|
73
|
+
tags: ghcr.io/${{ github.repository }}:latest
|
|
74
|
+
cache-from: type=gha
|
|
75
|
+
cache-to: type=gha,mode=min # min = final layer only, not all stages
|
|
76
|
+
- language: yaml
|
|
77
|
+
label: "Use GHCR registry cache to bypass the 10 GB GitHub Actions cache limit"
|
|
78
|
+
code: |
|
|
79
|
+
- name: Log in to GHCR
|
|
80
|
+
uses: docker/login-action@v3
|
|
81
|
+
with:
|
|
82
|
+
registry: ghcr.io
|
|
83
|
+
username: ${{ github.actor }}
|
|
84
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
85
|
+
|
|
86
|
+
- name: Build and push with registry cache
|
|
87
|
+
uses: docker/build-push-action@v6
|
|
88
|
+
with:
|
|
89
|
+
push: true
|
|
90
|
+
tags: ghcr.io/${{ github.repository }}:latest
|
|
91
|
+
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache
|
|
92
|
+
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max
|
|
93
|
+
prevention:
|
|
94
|
+
- "Always add docker/setup-buildx-action before docker/build-push-action to enable type=gha"
|
|
95
|
+
- "Prefer mode=min for type=gha to minimize cache footprint per build"
|
|
96
|
+
- "Monitor cache usage in Settings > Actions > Caches — eviction is silent until builds slow down"
|
|
97
|
+
- "Use scope parameter to separate caches per branch: cache-to: type=gha,scope=${{ github.ref_name }},mode=min"
|
|
98
|
+
- "For large production images prefer type=registry (GHCR) over type=gha to avoid the 10 GB cap"
|
|
99
|
+
docs:
|
|
100
|
+
- url: "https://docs.docker.com/build/ci/github-actions/cache/#github-cache"
|
|
101
|
+
label: "Docker Docs — GitHub Actions cache backend for BuildKit"
|
|
102
|
+
- url: "https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy"
|
|
103
|
+
label: "GitHub Docs — Cache usage limits and eviction policy (10 GB limit)"
|
|
104
|
+
- url: "https://github.com/docker/build-push-action/issues/818"
|
|
105
|
+
label: "docker/build-push-action#818 — type=gha cache eviction behavior"
|
|
106
|
+
- url: "https://github.com/docker/setup-buildx-action"
|
|
107
|
+
label: "docker/setup-buildx-action — Required to enable BuildKit cache backends"
|