Provide an option to skip the Go SDK tool-cache write for ephemeral / parallel self-hosted runners
Maintainers usually reply within 5 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- github-actions, go, typescript
Research direction
Start in src/installer.ts around lines 360-366, where the downloaded Go SDK is added to the runner tool cache, and trace addExecutablesToToolCache and the existing action inputs. Add an opt-out path that puts the extracted Go directory directly on PATH, then verify that the SDK cache write is skipped when the new input is false.
Written by the indexing model from the issue text.
Description
Description:
actions/setup-go currently writes the downloaded Go SDK into the runner-local tool cache unconditionally:
// src/installer.ts:360-366
core.info('Adding to the cache ...');
const toolCacheDir = await addExecutablesToToolCache(
extPath,
info,
arch,
toolName
);
addExecutablesToToolCache falls back to @actions/tool-cache.cacheDir, which recursively copies the extracted Go tree into RUNNER_TOOL_CACHE.
The existing cache input only controls Go module dependency caching and does not affect this SDK tool-cache write. There is no user-facing option to skip the SDK copy.
Proposed improvement: add a new input that, when set to false, skips addExecutablesToToolCache and adds the extracted Go directory directly to PATH.
Justification:
On our self-hosted runner fleet, the tc.cacheDir step takes ~1.5 minutes for each job.
RUNNER_TOOL_CACHE is local to each runner machine. In a parallel workflow that fans out across many ephemeral self-hosted runners, every runner that does not already have the exact Go version pays the full download + cacheDir copy cost. Those writes are not shared between runners, so the SDK cache is effectively useless for first-time setups in a fleet and becomes pure overhead.
Pre-installing Go versions into the runner image avoids the problem, but it pushes maintenance burden onto users and defeats the purpose of using the action for version management.
actions/setup-python does not use tc.cacheDir for the Python SDK; it extracts the archive and runs the setup script directly from the temp directory. setup-go should offer a comparable escape hatch for environments where the SDK cache will not be reused.
Are you willing to submit a PR?
yes
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 684
- Avg merge
- 12d 23h
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from actions/setup-go
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 45/100
actions/setup-go#757 · 2 comments ·
Maintainers usually reply within 5 days
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 55/100
actions/setup-go#749 · 2 comments ·
Maintainers usually reply within 5 days
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 58/100
actions/setup-go#746 · 8 comments ·
Maintainers usually reply within 5 days
-
go-version-file does not parse .mod files other than go.modPossibly taken @kaovilai claimed this 239 days ago. Openfeature request
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
actions/setup-go#736 · 1 comment · 1 reaction ·
Maintainers usually reply within 5 days
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 42/100
actions/setup-go#720 · 1 comment ·
Maintainers usually reply within 5 days
All issues in actions/setup-go
Similar issues
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysPossibly taken @pcbeingused333 claimed this today. OpenBug db: d1-sqlite Payload OSS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19766 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
device-management-toolkit/sample-web-ui#3711 ·
Maintainers usually reply within 1 day
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
elastic/kibana#306401 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agentes-chat/agentes-chat#927 ·
Maintainers usually reply within 1 day
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tabPossibly taken @seenimohamed claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ardia-browser/ardia#2769 ·
Maintainers usually reply within 1 day