Skip to content

lock-refresh: re-record the root and nested locks on every push to main - #15030

Merged
TrapsterDK merged 1 commit into
mainfrom
lock-refresh-on-main
Nov 28, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
lock-refresh-on-main

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Summary

Force-merged pull requests (#15001, #14987, #15008, #15014, #15020, #15021) skipped their lock refresh. After that, every pull request failed the CI gate within minutes with MODULE.bazel.lock is no longer up-to-date ... rules_go go_sdk. This PR makes .github/workflows/lock-refresh.yml repair main by itself:

  • Trigger: adds on: push: branches: [main], with paths-ignore for MODULE.bazel.lock and tools/testing/nested_cache/**. The workflow's own lock commit doesn't re-trigger it.
  • Concurrency: cancel-in-progress is true for push runs, so only the newest main commit gets recorded. Dispatch runs keep their old behaviour.
  • What a push run records: the five platform locks plus the nested record on all five platforms, as nested=true does. If the nested record fails, the merge job still commits the root lock (needs.nested.result == 'success' gates the nested download and merge).
  • New step, "Push to main":
    • It commits only MODULE.bazel.lock and tools/testing/nested_cache, straight to main, with the dx-update app token so CI runs on the commit.
    • main's protection has no required reviews or status checks, so a direct push works and no PR or admin-merge is needed.
    • If the push is rejected because main moved on, it exits 0 and leaves the commit to the newer run.
  • Unchanged: "Push to the pull request" only runs for dispatches. Permissions stay as they were: contents: read at the top, contents: write only on the merge job. No actions/cache.
  • Docs: .github/workflows/README.md describes the push trigger.

Verification

  • tools/dx check --apply --affected: ok, exit 0. This covers the actionlint and zizmor passes over the workflow.
  • The push path only runs on main after merge. The first push after this lands will exercise it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvdpJxYihWhnWtH8yv

Force-merged pull requests skip their lock refresh, and then every pull
request fails the CI gate with "MODULE.bazel.lock is no longer up-to-date".
lock-refresh now also runs on push to main, ignoring lock-only pushes. It
re-records the nested cache sets, cancels older runs, and commits the
merged locks straight to main with the dx-update app token. When the
nested record fails it still commits the root lock. When main has moved on,
it leaves the commit to the newer run.
@TrapsterDK
TrapsterDK merged commit e0226b9 into main Nov 28, 2026
7 checks passed
@TrapsterDK
TrapsterDK deleted the lock-refresh-on-main branch November 28, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant