Skip to content

[build] populate linux bazel cache from gh-cache workflow instead of RBE - #18003

Merged
titusfortner merged 1 commit into
trunkfrom
bazel-linux-cache-populate
Sep 8, 2026
Merged

[build] populate linux bazel cache from gh-cache workflow instead of RBE#18003
titusfortner merged 1 commit into
trunkfrom
bazel-linux-cache-populate

Conversation

@titusfortner

@titusfortner titusfortner commented Sep 8, 2026

Copy link
Copy Markdown
Member

🔗 Related Issues

The Linux repository cache saved by the trunk RBE run has grown to 5.5 GB, which pushes the repo over the 10 GB GitHub cache limit and now evicts the Windows entry.

💥 What does this PR do?

  • Populates the Linux Bazel repository cache from the GitHub Cache workflow, the same way macOS and Windows are populated, instead of saving it from the RBE run.

🔧 Implementation Notes

  • The RBE run pins browsers and executes everything, so its saved cache is about 5.5 GB; the analysis-only populate produces about 2.5 GB, which keeps all three OS entries under the limit with room for one to rotate.
  • Measured impact on the RBE job is nil: time from job start to "Analyzed" was about 5 minutes when restoring the 5.5 GB entry and 3 to 5 minutes with no cache at all, since unpacking the tarball costs about as much as the downloads it replaces.
  • No GitHub-hosted Linux job uses pinned browsers, so nothing else loses cached content.

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code (Fable 5.1)
    • What was generated: the cache and CI log analysis, the change, and this description
    • I reviewed all AI output and can explain the change

🔄 Types of changes

  • Cleanup (CI cache strategy)

@selenium-ci selenium-ci added the B-build Includes scripting, bazel and CI integrations label Sep 8, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Populate Linux Bazel cache from GitHub Cache workflow

⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Moves Linux Bazel cache writes from RBE to the dedicated cache workflow.
• Uses analysis-only population to reduce cache size and preserve Windows cache retention.
Diagram

graph TD
  T["Trunk or schedule"] --> G["GitHub Cache"] --> M["OS matrix"] --> L[("Linux cache")]
  M --> A[("macOS cache")]
  M --> W[("Windows cache")]
  R["RBE tests"] -. "restore only" .-> L
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Prune the RBE cache before saving
  • ➕ Retains browser artifacts during the RBE run
  • ➕ Keeps cache production attached to the primary Linux test job
  • ➖ Requires selective cleanup of Bazel repository cache contents
  • ➖ Adds fragile coupling to Bazel repository layout
  • ➖ Still incurs archive and upload overhead in the RBE job
2. Use separate browser and dependency caches
  • ➕ Allows independent retention policies for large browser artifacts
  • ➕ Could preserve resilience when pinned browser packages disappear upstream
  • ➖ Consumes additional GitHub cache quota and keys
  • ➖ Requires custom cache partitioning beyond the existing setup-bazel workflow
  • ➖ Increases invalidation and maintenance complexity

Recommendation: Use the PR's analysis-only Linux population in the dedicated cache workflow. It aligns cache ownership across operating systems, reduces quota pressure without measurable RBE slowdown, and avoids custom cache-pruning logic.

Files changed (2) +1 / -2

Other (2) +1 / -2
ci-rbe.ymlStop saving the Linux repository cache from RBE +0/-1

Stop saving the Linux repository cache from RBE

• Removes trunk-only cache saving from the full RBE test job. This prevents pinned browser repositories from producing an oversized Linux cache entry.

.github/workflows/ci-rbe.yml

gh-cache.ymlAdd Ubuntu to repository cache population +1/-1

Add Ubuntu to repository cache population

• Extends the cache-population matrix to Ubuntu alongside macOS and Windows. Linux cache content is now generated by the smaller analysis-only build with browser pinning disabled.

.github/workflows/gh-cache.yml

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display preferences with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@titusfortner
titusfortner merged commit fb8ae46 into trunk Sep 8, 2026
30 checks passed
@titusfortner
titusfortner deleted the bazel-linux-cache-populate branch September 8, 2026 16:33
This was referenced Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants