Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ jobs:
bazelrc: common --color=yes
# Workaround for long path issues: https://github.com/bazelbuild/bazel/pull/22532
output-base: ${{ inputs.os == 'windows' && 'D://b' || '' }}
cache-version: 2
disk-cache: false
external-cache: |
manifest:
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/gh-cache.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
name: CI Cache
name: GitHub Cache

on:
push:
branches: [trunk]
paths:
- 'MODULE.bazel'
- 'rust/Cargo.lock'
- 'java/maven_install.json'
- 'py/requirements_lock.txt'
- 'rb/Gemfile.lock'
- 'dotnet/paket.lock'
- 'common/repositories.bzl'
- 'common/browsers.bzl'
schedule:
Comment on lines +4 to +15
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Action required

1. Cache triggers miss lockfiles 🐞 Bug ☼ Reliability

The gh-cache workflow’s push path filter omits pnpm-lock.yaml and multitool.lock.json, so updates to
these Bazel dependency inputs won’t trigger cache population for macOS/Windows. Because MODULE.bazel
uses these files to generate external repositories, CI may still need to download new artifacts (and
hit the same transient 502/cert failures) until the next scheduled run.
Agent Prompt
### Issue description
`.github/workflows/gh-cache.yml` uses a `push.paths` filter to decide when to repopulate the GitHub cache, but it does not include key dependency inputs (`pnpm-lock.yaml`, `multitool.lock.json`) that are used by Bazel to generate external repositories. This means macOS/Windows cache population will not run when those files change, leaving caches stale.

### Issue Context
`MODULE.bazel` references both `//:multitool.lock.json` (rules_multitool hub) and `//:pnpm-lock.yaml` (npm_translate_lock). These files directly affect what external assets Bazel will download.

### Fix Focus Areas
- .github/workflows/gh-cache.yml[4-15]

### Proposed fix
Add the missing files to the `on.push.paths` list (at minimum `pnpm-lock.yaml` and `multitool.lock.json`). Consider also including other npm-related inputs referenced by `npm_translate_lock` (e.g. `package.json`, `pnpm-workspace.yaml`, `.npmrc`, and relevant `javascript/**/package.json`) if you want cache population to run immediately when those change.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

- cron: '30 6 * * *'
workflow_dispatch:

concurrency:
group: ci-cache-${{ github.ref }}
group: gh-cache-${{ github.ref }}
cancel-in-progress: true

permissions:
Expand All @@ -21,9 +34,8 @@ jobs:
with:
name: ${{ matrix.os }}
os: ${{ matrix.os }}
cache-save: false
run: >
bazel build --nobuild --build_tests_only --keep_going
--repo_contents_cache=
//java/... //py/... //rb/... //rust/...
//javascript/selenium-webdriver/... //dotnet/...
cache-save: true
run: >-
bazel build --nobuild --build_tests_only --keep_going --repo_contents_cache=
//java/test/... //py:* //rb/spec/... //rust/tests/...
//javascript/selenium-webdriver:* //dotnet/test/...