Skip to content

chore(ci): lower self-hosted earthly cache_size_pct 50 → 20#1867

Open
scottbuckel wants to merge 3 commits into
mainfrom
scott-earthly-cache-size-pct
Open

chore(ci): lower self-hosted earthly cache_size_pct 50 → 20#1867
scottbuckel wants to merge 3 commits into
mainfrom
scott-earthly-cache-size-pct

Conversation

@scottbuckel

@scottbuckel scottbuckel commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Overview

Lowers cache_size_pct in .earthly/config.selfhosted.yml from 50 to 20. At 50, the shared earthly-buildkitd on the self-hosted runner host (fsn1-runner-01, 1.7 TB disk) is allowed ~850 GB of cache and was observed at 889 GB with the disk at 99% (2026-07-13), failing CI jobs with "No space left on device". 20 targets ~340 GB, leaving headroom for CI images and the local GHA cache server on the shared disk.

⚠️ Lockstep merge with shieldedtech/shielded-iac#1815 — cache_size_pct is an earthly settings-hash key shared with the host-level config the SRE ansible role writes on the runner. The two global blocks must stay byte-identical or every earthly invocation restarts the shared buildkitd and cancels concurrent builds mid-run. SRE will converge the host right after both PRs merge; the hash change restarts the shared buildkitd once.

🗹 TODO before merging

  • Merge in lockstep with shieldedtech/shielded-iac#1815 (SRE converges the host immediately after)
  • Ready

📌 Submission Checklist

  • All commits are signed off (git commit -s) for the DCO
  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason: change only affects self-hosted CI cache sizing
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Config-only change to the self-hosted earthly config. Verified the resulting global block stays byte-identical to the host-level config in shieldedtech/shielded-iac#1815 (settings-hash parity). Buildkit cache behaviour at the new cap is enforced lazily by the daemon after the host converges.

  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other:
  • N/A — CI-only, no node/runtime change

At 50 the shared earthly-buildkitd cache on the self-hosted runner host is
allowed ~850 GB of the 1.7 TB disk and was observed at 889 GB with the disk
at 99%, failing jobs with "No space left on device". 20 targets ~340 GB.

Lockstep with shieldedtech/shielded-iac#1818 — cache_size_pct is an earthly
settings-hash key and must stay byte-identical between this file and the
host-level config on the runner, or CI jobs restart the shared buildkitd
and cancel concurrent builds.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Scott Buckel <scott.buckel@shielded.io>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@jina-simulation

jina-simulation Bot commented Jul 13, 2026

Copy link
Copy Markdown

Jina Review

Jina has completed this review.

Review: https://app.usejina.com/reviews/88002e9a-ea26-496f-b528-926758b3e12a

Item Status
Review Completed
Findings No issues found

@jina-simulation jina-simulation Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime Review - Merge Readiness 5/5

0 issues found - Ready to merge

Ready to merge.

No accepted issues remain.

Configuration selection, self-hosted scoping, and BuildKit garbage-collection semantics were substantiated; the unavailable Earthly execution environment limits validation but does not establish a defect.

Final review: No publishable runtime issues found.

The 20% self-hosted cache setting is correctly scoped; the remaining filesystem-validation concern is low-likelihood and non-blocking.

Review Comments

  • Consider monitoring the filesystem used by Earthly cache

    Earthly derives cache_size_pct from the total filesystem containing EARTHLY_TMP_DIR, not from available free space.

    The repository and CI do not verify that this is the documented 1.7 TB pool or monitor non-cache disk consumers.

    This is a useful operational follow-up, but the available evidence does not establish a production failure in this PR.

    Evidence:

    • Earthly v0.8.16 source computes the cache limit from EARTHLY_TMP_DIR filesystem size.
    • The documented 1.7 TB host leaves approximately 1.36 TB outside the nominal 340 GB cache.
    • CI includes cleanup for local-environment resources but no general disk-capacity preflight.

    Related files: .earthly/config.selfhosted.yml, .envrc, .github/workflows/continuous-integration.yml

Issues

No medium/high-confidence runtime issues were found.

Summary

  • Status: warned
  • Areas investigated: 3
  • Tasks/probes performed: 4
  • Issues reported: 0
  • Publishable issues: 0
  • Inline comments: 0
  • File-level comments: 0
  • Review comments: 1
  • Unanchored publishable findings posted as file-level comments: 0
  • Blocked validations: 1
  • Dashboard: full runtime review
  • Commit: f3524a5
  • Changed files: 1
  • Tool calls: none

ozgb
ozgb previously approved these changes Jul 13, 2026
@datadog-official

datadog-official Bot commented Jul 13, 2026

Copy link
Copy Markdown

Pipelines

⚠️ Warnings

🚦 2 Pipeline jobs failed

+test | Run tests   View in Datadog   GitHub Actions

CI + E2E | Build node and images (linux/amd64, self-hosted-tier:large, amd64)   View in Datadog   GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2f337b3 | Docs | Give us feedback!

gilescope
gilescope previously approved these changes Jul 13, 2026
@gilescope gilescope enabled auto-merge July 13, 2026 15:22
Signed-off-by: Giles Cope <gilescope@gmail.com>
@gilescope gilescope dismissed stale reviews from ozgb and themself via 5f15886 July 13, 2026 16:46
@jina-simulation

jina-simulation Bot commented Jul 13, 2026

Copy link
Copy Markdown

Jina Review

Jina has completed this review.

Review: https://app.usejina.com/reviews/1ae8a929-6585-48c1-9d0c-42a9bc33a867

Item Status
Review Completed
Findings No issues found

@jina-simulation jina-simulation Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime Review - Merge Readiness 5/5

0 issues found - Ready to merge

Ready to merge.

No accepted candidate issues remain; the investigation outputs were incomplete, but direct source and diff review found no production-relevant defect.

Final review: No publishable runtime issues were identified.

Source review confirms cache scoping, argument routing, bounded retries, and exit-status propagation.

Issues

No medium/high-confidence runtime issues were found.

Summary

  • Status: warned
  • Areas investigated: 4
  • Tasks/probes performed: 0
  • Issues reported: 0
  • Publishable issues: 0
  • Inline comments: 0
  • File-level comments: 0
  • Review comments: 0
  • Unanchored publishable findings posted as file-level comments: 0
  • Blocked validations: 0
  • Dashboard: full runtime review
  • Commit: 5f15886
  • Changed files: 5
  • Tool calls: none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants