← Back to Pull requests

github: move Go's temporary build dir off /tmp #11499

Closed
unknown closed this pull request without merging on Nov 05, 2026 02:05 UTC
View on GitHub
unknown unknown commented on Nov 05, 2026 01:30 UTC
Author

This branch belongs to the litbot-9000 bot. The yy prefix is only the allowlisted branch prefix for bot pushes; the branch is not yyforyongyu's.

Problem

On the new GitHub ubuntu-26.04 runner image, /tmp is a RAM backed tmpfs capped at about 7.7G. Go puts its temporary build directory ($WORK) there by default. The Check commits job runs scripts/check-each-commit.sh, which runs make unit pkg=... case=_NONE_ for every commit and so builds and links every unit test binary. It failed with 81 lines like:

write /tmp/go-build.../...: disk quota exceeded

while the root disk still had 45G free.

Evidence: job 126847355585 in run 41907823000. The log shows Image: ubuntu-26.04, and df -h shows:

tmpfs            7.7G  ...  /tmp
/dev/nvme0n1p1    72G   28G   45G  /

Other large Go builds (unit-race, itests, lint) face the same risk as more runners move to 26.04.

Fix

Add a step to the shared .github/actions/setup-go composite action that creates $RUNNER_TEMP/go-tmp and exports GOTMPDIR to it through $GITHUB_ENV. RUNNER_TEMP is on the runner's disk, exists on Linux, macOS and Windows runners, and is cleaned up after every job. Every Go job in main.yml and govulncheck.yml goes through this action, including windows-integration-test and macos-integration-test.

On Windows, RUNNER_TEMP reaches bash as a native path (e.g. D:\a\_temp), so the exported value is D:\a\_temp/go-tmp. Git Bash's mkdir accepts that form, and Go on Windows accepts mixed separators. The existing set GOPATH step already writes a native Windows path to $GITHUB_ENV from bash in the same way.

Nothing else in the repo sets GOTMPDIR or TMPDIR.

Go builds not covered (unchanged)

  • release.yaml uses actions/setup-go directly and runs make release natively. It runs only on tags and cross-compiles one binary set per target, so it is much lighter than the unit test builds.

  • backwards-compatibility-test (make backwards-compat-test) and docker.yml build inside Docker, so the runner's /tmp does not apply.
  • Verification

  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 .github/workflows/main.yml: clean (actionlint also checks the local composite action).

  • The action file parses with gopkg.in/yaml.v3; the new step is shell: bash.

  • git diff --check: clean.

  • Ran the new step locally with RUNNER_TEMP and GITHUB_ENV pointed at scratch paths. The directory was created, GITHUB_ENV got GOTMPDIR=<runner-temp>/go-tmp, go env GOTMPDIR reported it, and go build -work ./lnwire/... printed WORK=<runner-temp>/go-tmp/go-build....

  • Not tested on a real Windows or macOS runner here; CI on this PR will exercise them.
  • Diff: 341 lines (+255 / -86) across 4 files Reviewer: Roasbeef Review duration: 34m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 341 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.349
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #11499"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.3% (MEDIUM) · Higher = larger blast radius
    42.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.3% · Safe to merge
    18.3%