Skip to content

Preserve bazel repository cache in github actions#14495

Merged
bolinfest merged 4 commits intoopenai:mainfrom
siggisim:main
Mar 26, 2026
Merged

Preserve bazel repository cache in github actions#14495
bolinfest merged 4 commits intoopenai:mainfrom
siggisim:main

Conversation

@siggisim
Copy link
Copy Markdown
Contributor

Highlights:

  • Trimmed down to just the repository cache for faster upload / download
  • Made the cache key only include files that affect external dependencies (since that's what the repository cache caches) - MODULE.bazel, codex-rs/Cargo.lock, codex-rs/Cargo.toml
  • Split the caching action in to explicit restore / save steps (similar to your rust CI) which allows us to skip uploads on cache hit, and not fail the build if upload fails

This should get rid of 842 network fetches that are happening on every Bazel CI run, while also reducing the Github flakiness @bolinfest reported. Uploading should be faster (since we're not caching many small files), and will only happen when MODULE.bazel or Cargo.lock / Cargo.toml files change.

In my testing, it took 3s to save the repository cache.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@siggisim
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@bolinfest
Copy link
Copy Markdown
Collaborator

recheck

github-actions bot added a commit that referenced this pull request Mar 12, 2026
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Mar 13, 2026
@bolinfest
Copy link
Copy Markdown
Collaborator

OK, all the Bazel steps succeeded over at #15924 so let's try this out!

@bolinfest bolinfest merged commit c264c6e into openai:main Mar 26, 2026
35 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants