Repository navigation
github/ci: Publish a release as fast as it can - #49287
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
An undeclared and unforwarded request input causes JSON parsing to fail, blocking container publishing, while older branches select the larger runner without opting in.
2 open issues
What changed in this PR
This PR aims to speed up Envoy’s release publishing pipeline by centrally selecting larger runners for eligible requests.
Changes:
- Adds publishing-runner selection based on request trust, author association, release version, and repository variables.
- Applies the selected runner across publishing builds, signing, manifests, release publication, and verification.
- Preserves ARM64 runner overrides and adds default-runner fallbacks when
agent-publishis absent.
| File | Description |
|---|---|
.github/workflows/_request.yml |
Computes the publishing runner for each request. |
.github/workflows/_publish_verify.yml |
Applies runner selection to verification jobs. |
.github/workflows/_publish_release.yml |
Applies runner selection to release jobs. |
.github/workflows/_publish_release_container.yml |
Switches manifest creation to request-based runner selection. |
.github/workflows/_publish_build_server.yml |
Updates server, image, and package runners while retaining ARM64 overrides. |
.github/workflows/_publish_build_docs.yml |
Uses the publishing runner for documentation builds. |
Review effort: Balanced
ebb7a22 to
c3dbe57
Compare
73227e8 to
62048b6
Compare
d2e1f1a to
58a9245
Compare
58a9245 to
5f00c6f
Compare
5f00c6f to
298120a
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The configured priority of 0 is serialized as a YAML number and discarded by publishing callers’ fallbacks, causing trusted release builds to use priority 1 instead.
1 open issue
1 resolved since last review
Review effort: Balanced
227f29a to
8f0a6e7
Compare
|
/retest verify |
The request decides how every publishing job runs: the server and docs builds, the packages and container images, signing, the container manifests, the GitHub publish and the website. Not the verification, which is not on the publish's critical path (a separate workflow). For a non-dev version (a release's PR, and its push) they run on a larger runner (`vars.ENVOY_PUBLISH_VM`, by default `ubuntu-latest-16-cores`), and their remote builds with more jobs (`vars.ENVOY_PUBLISH_JOBS`, by default 500, which the larger client can drive) at the highest remote execution priority (`vars.ENVOY_PUBLISH_PRIORITY`, by default 1, the top of the cluster's range), so the whole release pipeline is as fast as it can be. Otherwise, as before. `vars.ENVOY_PUBLISH_FAST` sets it for any request, eg to test it without a release. The version is the requested commit's, so this is only for a trusted request, or a pull request by a member of the repo, or from a branch in the repo (both set by GitHub, not the pull request): the publishing app's release PRs, and a release manager's, but not anyone's PR that changes the version. A pull request labelled `ci:fastpublish` (which only those who can triage the repo can do) also publishes as fast as it can, eg to measure or debug the release pipeline; the label is read when the request is made (a push to the pull request). The request (`_request.yml@main`) and publishing workflows run from main for every branch, so this applies to the release branches' patch releases too. The publishing jobs fall back to the defaults for a request made before this change. Signed-off-by: Ryan Northey <[email protected]>
8f0a6e7 to
6846ad3
Compare
|
... like a gingerbread man |
| | (((.request.trusted or $publishMember) | ||
| and ((.request.version.dev | not) or $publishFast)) | ||
| or $publishLabelled) as $publishRelease |
There was a problem hiding this comment.
$publishLabelled is outside the .request.trusted or $publishMember check. If a maintainer labels a non-member's fork PR ci:fastpublish, it gets the larger runner, the extra remote build jobs and the highest remote execution priority. Because the label stays on and request.yml runs on pull_request_target, every later push by the fork author gets them too. Should the label still require trust?
| | (((.request.trusted or $publishMember) | |
| and ((.request.version.dev | not) or $publishFast)) | |
| or $publishLabelled) as $publishRelease | |
| | ((.request.trusted or $publishMember) | |
| and ((.request.version.dev | not) or $publishFast or $publishLabelled)) as $publishRelease |
If labelling fork PRs is intentional, maybe only set publish-priority for trusted requests, or remove the label on synchronize.
There was a problem hiding this comment.
yeah it was intentional - i guess we can reset it - but i would say in this rare edge case (this is expected to be a bot action) it should be probably sticky for the pr lifecycle
There was a problem hiding this comment.
Agreed, the label now needs a trusted request or a member's/in-repo PR, as you suggested (b6aeb24). On anyone else's fork PR it does nothing.
(bot assisted)
| - github | ||
| - sign | ||
| runs-on: ${{ fromJSON(inputs.request).config.ci.agent-ubuntu }} | ||
| runs-on: ${{ fromJSON(inputs.request).config.ci.agent-publish || fromJSON(inputs.request).config.ci.agent-ubuntu }} |
There was a problem hiding this comment.
This job only creates an app token and sends a dispatch, so it doesn't need the larger runner. Larger runners usually take longer to pick up a job, so this could slow the end of a release a little. Maybe keep it on agent-ubuntu?
| runs-on: ${{ fromJSON(inputs.request).config.ci.agent-publish || fromJSON(inputs.request).config.ci.agent-ubuntu }} | |
| runs-on: ${{ fromJSON(inputs.request).config.ci.agent-ubuntu }} |
There was a problem hiding this comment.
Agreed, it is back on agent-ubuntu (b6aeb24).
(bot assisted)
…he default runner A `ci:fastpublish` label on a non-member's fork PR gave it, and every later push to it, the larger runner, extra remote jobs and the top remote execution priority. It now only applies where a release would (a trusted request, or a member's or in-repo PR). The website sync job only creates a token and dispatches, so it stays on `agent-ubuntu`. Signed-off-by: Ryan Northey <[email protected]>
…49290) Since verify was separated from publish (#49261), the `verify` run paths include `.github/workflows/envoy-publish.yml` and `.github/workflows/_publish_verify.yml`, but the `release` ones include no workflows. A PR that changes only those (eg #49287) runs Verify without the release jobs, so signing is skipped and `verify_distro` fails: `Artifact not found for name: release.signed`. `release` now includes the publishing workflows (`_publish_*.yml`, `envoy-publish.yml`, `envoy-verify.yml`), so it covers every path of `verify`, and a change to the release jobs runs them. Paths are matched with `minimatch`. The request reads the run config from the target branch, so this takes effect for PRs once it lands. Signed-off-by: Ryan Northey <[email protected]>


Commit Message: github/ci: Publish a release as fast as it can
Additional Description:
On release day the release PR, and then the release push, go through the whole publishing pipeline (server and docs builds, packages and images, signing, manifests, GitHub publish, verify) on the default 2-core runners, where the client is CPU-starved in every phase (bazel's remote phase, packaging, compression, image pushes).
The request now decides the agent of every publishing job (
config.ci.agent-publish), except the verification, which is a separate workflow off the publish's critical path:vars.ENVOY_PUBLISH_VM(defaultubuntu-latest-16-cores)vars.ENVOY_PUBLISH_FASTset: the same for any request, eg to test it without cutting a releaseWith the larger runner, the remote builds of those jobs (server and docs builds) also run with more jobs (
vars.ENVOY_PUBLISH_JOBS, default 500 rather than 200: the larger client can drive them) at the highest remote execution priority (--remote_execution_priority,vars.ENVOY_PUBLISH_PRIORITY, by default 1: the cluster's--priority_rangeis0,1). Today trusted remote builds already run at 1, but pull requests (including release PRs) at 0.The version is the requested commit's, so the larger runner is only for a trusted request, or a pull request whose author is a member of the repo (
author_association), or whose branch is in the repo (both set by GitHub, not the PR): the publishing app's release PRs (publish-envoy[bot], aCONTRIBUTOR), and a release manager's, but not anyone's PR that changesVERSION.txt.A member's or in-repo PR labelled
ci:fastpublish(only those with triage access can label) also gets all of this, eg to measure or debug the release pipeline on an ordinary PR; on a fork PR by anyone else the label does nothing. The label is read when the request is made, so it takes effect on the next push to the PR.The arm64 jobs keep their own runner (
vars.ENVOY_ARM_VM), and the GCS upload jobs are unchanged. The request (_request.yml@main) and the publishing workflows run from main for every branch, so this applies to the release branches' patch releases too, without a backport. The publishing jobs fall back to the default agent for a request withoutagent-publish(one made before this change).In envoy-ci-staging, with a single multiarch publish build, the build job went from ~24-29m on 2 cores to ~4-5m on 16 cores, and the container manifests from ~5m to ~2m.
Risk Level: low (CI only; dev commits are unchanged)
Testing: envoy-ci-staging
Docs Changes: n/a
Release Notes: n/a