Repository navigation
fix(ci): hand off the proxy chart pin on a pushed branch, and gate the pin in CI (#703) - #723
Merged
Merged
Conversation
…e pin in CI (#703) Every `proxy-release` run has ended red at `bump-chart` since the repository setting "Allow GitHub Actions to create and approve pull requests" was turned off: `peter-evans/create-pull-request` with `GITHUB_TOKEN` dies at `GitHub Actions is not permitted to create or approve pull requests`, leaving the image published and the chart unpinned. Turning that setting back on would not fix it. A PR opened by `GITHUB_TOKEN` fires no `pull_request` events (GitHub's recursion guard), so the `ci` + `proxy` checks the `main` ruleset requires would never report — and the ruleset has no bypass actors, so such a PR is permanently unmergeable. Pushing straight to `main` is blocked by the same ruleset, and there is no PAT. A PR *opened by a human* on a branch a bot pushed does fire `pull_request` normally. So `bump-chart` now commits the two-file bump (values.yaml tag + digest + provenance comment, Chart.yaml patch) onto a per-release branch `chore/proxy-image-bump-<short sha>`, force-with-lease-pushes it with `GITHUB_TOKEN`, and hands off: `$GITHUB_STEP_SUMMARY` and a comment on the rolling "proxy releases pending chart pin" issue, both carrying the exact `gh pr create --base main --head … --body-file <(…)` one-liner. If the chart is already pinned to the sha there is no diff, no branch and no hand-off. The branch is per-release because a later `GITHUB_TOKEN` push onto a branch that already has an open PR fires no `synchronize` either. `pull-requests: write` is dropped; `issues: write` is added. Also adds the `proxy-pin` CI job (unconditional, in the `ci` fan-in) so a broken pin fails a PR instead of a deploy — the #648 / #705 class. It parses `repository`/`tag`/`digest` for `aether-proxy` out of `charts/aether/values.yaml` with the same contract `bazel/proxy_pin/extensions.bzl` uses, then asserts that `docker buildx imagetools inspect <repo>:<tag>` returns exactly `digest:` (public package, no login) and that `helm template charts/aether` renders the proxy container as `<repo>@<digest>` and never as `<repo>:<tag>`. Each failure names which of the three disagrees. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #703.
The mechanism (and why the repo setting would not help)
Every
proxy-releaserun has ended red atbump-chartsince"Allow GitHub Actions to create and approve pull requests" was turned off:
peter-evans/create-pull-requestwithGITHUB_TOKENdies atGitHub Actions is not permitted to create or approve pull requests. The imageis published, the chart stays unpinned, the deploy has to be hand-pinned.
Turning that setting back on would not fix it. A PR opened by
GITHUB_TOKENfires no
pull_requestevents (GitHub's recursion guard), so theci+proxychecks the
mainruleset requires would never report — and the ruleset has nobypass actors, so the PR would be permanently unmergeable. Pushing straight to
mainis blocked by the same ruleset. There is no PAT and there will not be one;a ruleset bypass for a bot would break the no-bypass invariant.
A PR opened by a human on a branch a bot pushed does fire
pull_requestnormally — the event is attributed to whoever opens the PR, not to whoever pushed
the branch. So:
bump-chartkeeps the existing seds (values.yamltag:+digest:+the provenance comment) and the
Chart.yamlpatch bump, then commits asgithub-actions[bot]onto a per-release branchchore/proxy-image-bump-<short sha>andgit push --force-with-leasees it withGITHUB_TOKEN(
contents: write, already granted).pull-requests: writeis dropped;issues: writeis added.chore/proxy-image-bump, because a laterGITHUB_TOKENpush onto a branch that already has an open PR fires nopull_request: synchronizeeither — the new head would carry no checks and thePR would be stuck. A fresh branch makes every PR a fresh
openedevent.branch, no hand-off — the summary says so.
--force-with-lease=<branch>:<sha-or-empty>).A bare
--force-with-leaseresolves the expected head through the remote'sconfigured fetch refspec, and
actions/checkoutclones single-branch, so anyother branch is rejected as
stale infoeven right after fetching it. Verifiedlocally against a scratch remote for all three cases (new branch, existing
branch, genuinely stale lease → rejected).
Hand-off
The job writes the same block to
$GITHUB_STEP_SUMMARYand as a comment on asingle rolling tracking issue titled
proxy releases pending chart pin(searched by exact title, created on first use) — that issue comment is the
notification channel. The block is: