Skip to content

github/ci: Publish a release as fast as it can - #49287

Merged
phlax merged 2 commits into
envoyproxy:mainfrom
phlax:ci-publish-agent
Nov 16, 2026
Merged

phlax merged 2 commits into
envoyproxy:mainfrom
phlax:ci-publish-agent

Conversation

@phlax

@phlax phlax commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

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:

  • a non-dev version (a release's PR, and its push): a larger runner, vars.ENVOY_PUBLISH_VM (default ubuntu-latest-16-cores)
  • vars.ENVOY_PUBLISH_FAST set: the same for any request, eg to test it without cutting a release
  • otherwise the default agent, as now

With 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_range is 0,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], a CONTRIBUTOR), and a release manager's, but not anyone's PR that changes VERSION.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 without agent-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

Copilot AI left a comment

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.

🟡 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-publish is 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

Comment thread .github/workflows/_request.yml Resolved
@phlax
phlax force-pushed the ci-publish-agent branch 2 times, most recently from ebb7a22 to c3dbe57 Compare November 15, 2026 13:20
@phlax
phlax requested a balanced review from Copilot November 15, 2026 16:22

Copilot AI left a comment

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.

🟡 Changes recommended

The runner-selection gate leaves same-repository release PRs from the publishing app on small runners even when ENVOY_PUBLISH_FAST is enabled.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread .github/workflows/_request.yml Resolved
@phlax
phlax force-pushed the ci-publish-agent branch 2 times, most recently from d2e1f1a to 58a9245 Compare November 15, 2026 16:29
@phlax phlax changed the title github/ci: Run the publishing jobs of a release on a larger runner github/ci: Publish a release as fast as it can Nov 15, 2026
@phlax
phlax requested a balanced review from Copilot November 15, 2026 17:12

Copilot AI left a comment

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.

🟡 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

Comment thread .github/workflows/_request.yml Resolved
@phlax
phlax force-pushed the ci-publish-agent branch 2 times, most recently from 227f29a to 8f0a6e7 Compare November 15, 2026 17:18
@phlax
phlax requested a balanced review from Copilot November 15, 2026 17:18

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues block the release-publishing pipeline changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@phlax

phlax commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

/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]>
@phlax
phlax requested a balanced review from Copilot November 15, 2026 19:05

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues remain for the release-publishing pipeline changes.

No open issues 🎉

Review effort: Balanced

@phlax

phlax commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

... like a gingerbread man

Comment thread .github/workflows/_request.yml Outdated
Comment on lines +199 to +201
| (((.request.trusted or $publishMember)
and ((.request.version.dev | not) or $publishFast))
or $publishLabelled) as $publishRelease

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

$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?

Suggested change
| (((.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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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)

Comment thread .github/workflows/_publish_release.yml Outdated
- 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 }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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?

Suggested change
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 }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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]>
@phlax
phlax enabled auto-merge (squash) November 16, 2026 14:07
phlax added a commit that referenced this pull request Nov 16, 2026
…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]>
@phlax
phlax merged commit 66cf2bf into envoyproxy:main Nov 16, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants