Skip to content

ci: one .github/actions/setup-bazel for every non-release job - #1262

Merged
bpalermo merged 1 commit into
upgrade/setup-kind-actionfrom
upgrade/setup-bazel-action
Oct 5, 2026
Merged

bpalermo merged 1 commit into
upgrade/setup-kind-actionfrom
upgrade/setup-bazel-action

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Stack 3/3 (#1259 → #1261 → #1262).

The diff that justifies it

I compared all 20 bazel-contrib/setup-bazel@c5acdfb… # 0.19.0 call sites with comments stripped. There are three configurations:

config cache-version repository-cache cache-save sites
root, restore only root-1 MODULE.bazel, .lock, go.mod, go.sum false ci.yaml ×8 (deps-audit, shell, format, test, race, netns, integration, e2e), main.yaml test, e2e.yaml build, pages.yaml, proxy.yml shell, quay-smoke.yaml, plus publish.yaml, proxy-release.yml sign, publish-verify.yaml
root, saver root-1 same default (true) ci.yaml diff, main.yaml diff
proxy, saver proxy-1 proxy/MODULE.bazel, .lock default (true) proxy.yml test, proxy-release.yml build-push

All of them use bazelisk-cache: true. The only variation is two deliberate roles from #1001:

  • which workspace namespace keys the cache;
  • whether the job is its workflow's one saver.

So these become two inputs of .github/actions/setup-bazel: workspace (root by default, or proxy) and cache-save (false by default). The #1001 rationale, which had been copied into the comments at every call site, now lives once in the action. The 16 call sites outside the release and signing workflows use it. publish.yaml, proxy-release.yml and publish-verify.yaml keep their explicit copies, as decided. The action's header says they must stay equal to it.

Cache entries are unchanged. setup-bazel 0.19.0 builds its key as setup-bazel-<cache-version>-<platform>-<arch> plus the hash of the listed files (config.js). Nothing in the key depends on the call site, so every job restores and saves exactly the entries it did before.

Note: this PR edits proxy.yml, which is in that workflow's own path filter, so the Envoy test matrix runs here. That exercises workspace: proxy with the saver role on both architectures.

Proof

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

The bazel-contrib/setup-bazel block was repeated at 16 call sites (ci.yaml x9,
main.yaml x2, e2e.yaml, pages.yaml, proxy.yml x2, quay-smoke.yaml). Diffed,
they are one configuration with two roles: which workspace keys the repository
cache (root-1 on MODULE.bazel/.lock + go.mod/go.sum, or proxy-1 on
proxy/MODULE.bazel/.lock) and whether the job is its workflow's one cache saver
(ci/main `diff`, the proxy `test` matrix) or restores only. Those become the
wrapper's two inputs, `workspace` (default root) and `cache-save` (default
false); the #1001 rationale that was copied into every call site's comments
lives once, in the action.

setup-bazel's cache key is setup-bazel-<cache-version>-<os>-<arch> plus the
hashed files, nothing call-site specific, so every job restores the same
entries it did before. The release and signing workflows (publish.yaml,
proxy-release.yml, publish-verify.yaml) keep their explicit copies.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo force-pushed the upgrade/setup-bazel-action branch from e420bde to 8073972 Compare October 5, 2026 16:02
@bpalermo
bpalermo merged commit cf47d9a into main Oct 5, 2026
44 checks passed
@bpalermo
bpalermo deleted the upgrade/setup-bazel-action branch October 5, 2026 16:25
bpalermo added a commit that referenced this pull request Oct 6, 2026
The `gateway-http` and `mesh-http` jobs repeated the same 16 steps, and the
"Check formatting" block was duplicated between ci.yaml's `format` and
proxy.yml's `lint`. Both now live in composite actions, in the style of
run-e2e-script/setup-kind (#1261/#1262).

- .github/actions/run-conformance holds the pinned Go (#1283), the images
  artifact, setup-kind with the cluster, cloud-provider-kind (opt-in),
  the Gateway API + aether CRDs, `helm install` (suite `--set` values plus
  the shared image overrides), readiness, the gateway-api checkout, the
  suite run, the report upload, diagnostics and cleanup. Inputs cover
  what differs: profile, suite, cluster name, gateway-api version, helm
  values, readiness script, report file and artifact, logs dir and
  artifact, diagnostics, logs-when, soft.
- Kept as before: job ids, `if:`/`only=` dispatch, timeouts (90m),
  report-failure's needs, the artifact names (gateway-http- and
  mesh-http-conformance-report, conformance-logs, mesh-conformance-logs)
  and the report file names. Also kept: each suite's diagnostics, and
  mesh-http collecting and uploading its logs on every run
  (`logs-when: always`) while gateway-http does so only on failure.
- The suite step now prints `go version` first, as evidence of the
  toolchain.
- .github/actions/format-check: the //:format.check run plus the
  language-set assertion (#853), with the expected languages as input
  (ci.yaml: Starlark, Go, Shell, Protocol Buffer; proxy.yml: Starlark,
  Shell). An empty input fails instead of asserting nothing.
- //e2e:kind_pin_test check 7 now also covers composite actions: one
  that drives kind must use setup-kind. A job that calls run-conformance
  no longer has a kind command of its own. //e2e:go_pin_test scans only
  an action's `runs:` block, because input descriptions mention
  `go test`. Both were seen red with setup-go/setup-kind removed from
  run-conformance.
- publish-verify.yaml: correct the stale comment that named main.yaml's
  `diff` as the only root repository-cache saver (ci.yaml's `diff` saves
  too). This edit was taken because #1291 changes that file at the same time.

e2e.yaml: 824 -> 582 lines (800 on main before #1283).

Closes #1286

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo added a commit that referenced this pull request Oct 6, 2026
The `gateway-http` and `mesh-http` jobs repeated the same 16 steps, and the
"Check formatting" block was duplicated between ci.yaml's `format` and
proxy.yml's `lint`. Both now live in composite actions, in the style of
run-e2e-script/setup-kind (#1261/#1262).

- .github/actions/run-conformance holds the pinned Go (#1283), the images
  artifact, setup-kind with the cluster, cloud-provider-kind (opt-in),
  the Gateway API + aether CRDs, `helm install` (suite `--set` values plus
  the shared image overrides), readiness, the gateway-api checkout, the
  suite run, the report upload, diagnostics and cleanup. Inputs cover
  what differs: profile, suite, cluster name, gateway-api version, helm
  values, readiness script, report file and artifact, logs dir and
  artifact, diagnostics, logs-when, soft.
- Kept as before: job ids, `if:`/`only=` dispatch, timeouts (90m),
  report-failure's needs, the artifact names (gateway-http- and
  mesh-http-conformance-report, conformance-logs, mesh-conformance-logs)
  and the report file names. Also kept: each suite's diagnostics, and
  mesh-http collecting and uploading its logs on every run
  (`logs-when: always`) while gateway-http does so only on failure.
- The suite step now prints `go version` first, as evidence of the
  toolchain.
- .github/actions/format-check: the //:format.check run plus the
  language-set assertion (#853), with the expected languages as input
  (ci.yaml: Starlark, Go, Shell, Protocol Buffer; proxy.yml: Starlark,
  Shell). An empty input fails instead of asserting nothing.
- //e2e:kind_pin_test check 7 now also covers composite actions: one
  that drives kind must use setup-kind. A job that calls run-conformance
  no longer has a kind command of its own. //e2e:go_pin_test scans only
  an action's `runs:` block, because input descriptions mention
  `go test`. Both were seen red with setup-go/setup-kind removed from
  run-conformance.
- publish-verify.yaml: correct the stale comment that named main.yaml's
  `diff` as the only root repository-cache saver (ci.yaml's `diff` saves
  too). This edit was taken because #1291 changes that file at the same time.

e2e.yaml: 824 -> 582 lines (800 on main before #1283).

Closes #1286

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo added a commit that referenced this pull request Oct 6, 2026
The `gateway-http` and `mesh-http` jobs repeated the same 16 steps, and the
"Check formatting" block was duplicated between ci.yaml's `format` and
proxy.yml's `lint`. Both now live in composite actions, in the style of
run-e2e-script/setup-kind (#1261/#1262).

- .github/actions/run-conformance holds the pinned Go (#1283), the images
  artifact, setup-kind with the cluster, cloud-provider-kind (opt-in),
  the Gateway API + aether CRDs, `helm install` (suite `--set` values plus
  the shared image overrides), readiness, the gateway-api checkout, the
  suite run, the report upload, diagnostics and cleanup. Inputs cover
  what differs: profile, suite, cluster name, gateway-api version, helm
  values, readiness script, report file and artifact, logs dir and
  artifact, diagnostics, logs-when, soft.
- Kept as before: job ids, `if:`/`only=` dispatch, timeouts (90m),
  report-failure's needs, the artifact names (gateway-http- and
  mesh-http-conformance-report, conformance-logs, mesh-conformance-logs)
  and the report file names. Also kept: each suite's diagnostics, and
  mesh-http collecting and uploading its logs on every run
  (`logs-when: always`) while gateway-http does so only on failure.
- The suite step now prints `go version` first, as evidence of the
  toolchain.
- .github/actions/format-check: the //:format.check run plus the
  language-set assertion (#853), with the expected languages as input
  (ci.yaml: Starlark, Go, Shell, Protocol Buffer; proxy.yml: Starlark,
  Shell). An empty input fails instead of asserting nothing.
- //e2e:kind_pin_test check 7 now also covers composite actions: one
  that drives kind must use setup-kind. A job that calls run-conformance
  no longer has a kind command of its own. //e2e:go_pin_test scans only
  an action's `runs:` block, because input descriptions mention
  `go test`. Both were seen red with setup-go/setup-kind removed from
  run-conformance.
- publish-verify.yaml: correct the stale comment that named main.yaml's
  `diff` as the only root repository-cache saver (ci.yaml's `diff` saves
  too). This edit was taken because #1291 changes that file at the same time.

e2e.yaml: 824 -> 582 lines (800 on main before #1283).

Closes #1286

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo added a commit that referenced this pull request Oct 6, 2026
The `gateway-http` and `mesh-http` jobs repeated the same 16 steps, and the
"Check formatting" block was duplicated between ci.yaml's `format` and
proxy.yml's `lint`. Both now live in composite actions, in the style of
run-e2e-script/setup-kind (#1261/#1262).

- .github/actions/run-conformance holds the pinned Go (#1283), the images
  artifact, setup-kind with the cluster, cloud-provider-kind (opt-in),
  the Gateway API + aether CRDs, `helm install` (suite `--set` values plus
  the shared image overrides), readiness, the gateway-api checkout, the
  suite run, the report upload, diagnostics and cleanup. Inputs cover
  what differs: profile, suite, cluster name, gateway-api version, helm
  values, readiness script, report file and artifact, logs dir and
  artifact, diagnostics, logs-when, soft.
- Kept as before: job ids, `if:`/`only=` dispatch, timeouts (90m),
  report-failure's needs, the artifact names (gateway-http- and
  mesh-http-conformance-report, conformance-logs, mesh-conformance-logs)
  and the report file names. Also kept: each suite's diagnostics, and
  mesh-http collecting and uploading its logs on every run
  (`logs-when: always`) while gateway-http does so only on failure.
- The suite step now prints `go version` first, as evidence of the
  toolchain.
- .github/actions/format-check: the //:format.check run plus the
  language-set assertion (#853), with the expected languages as input
  (ci.yaml: Starlark, Go, Shell, Protocol Buffer; proxy.yml: Starlark,
  Shell). An empty input fails instead of asserting nothing.
- //e2e:kind_pin_test check 7 now also covers composite actions: one
  that drives kind must use setup-kind. A job that calls run-conformance
  no longer has a kind command of its own. //e2e:go_pin_test scans only
  an action's `runs:` block, because input descriptions mention
  `go test`. Both were seen red with setup-go/setup-kind removed from
  run-conformance.
- publish-verify.yaml: correct the stale comment that named main.yaml's
  `diff` as the only root repository-cache saver (ci.yaml's `diff` saves
  too). This edit was taken because #1291 changes that file at the same time.

e2e.yaml: 824 -> 582 lines (800 on main before #1283).

Closes #1286


Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Co-authored-by: Claude Fable 5.1 <[email protected]>
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