Repository navigation
release/ci: Build, sign and publish the release of both arches in one job - #49331
Conversation
|
@jwendell this one doesnt take effect until it lands, but its pretty well tested on staging |
978e014 to
762401b
Compare
762401b to
4a2e560
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Active issues route native ARM64 builds to incompatible x86_64 workers, leave exported artifacts with dangling symlinks, and allow fork publication to fail on missing signed artifacts.
3 open issues
What changed in this PR
Consolidates Envoy’s x64 and ARM64 release builds, signing, and artifact preparation into one x64 publishing job, cross-compiling ARM64 binaries while keeping build tools on the host architecture.
Changes:
- Adds architecture-specific publish targets and stripped-binary signing inputs.
- Introduces
release.multiarchwith direct package signing and signing-action audits. - Updates workflows to upload both architectures’ images and the signed release, skipping the separate signing job.
| File | Description |
|---|---|
distribution/publish/BUILD |
Adds bundled tools, multiarch publish targets, and signing inputs. |
distribution/publish/arch.bzl |
Adds target-platform transitions and artifact-selection rules. |
distribution/changes.bzl |
Supports signing .changes files directly from package outputs. |
distribution/BUILD |
Adds direct Debian package bundling and adjusts packaging execution. |
distribution/binary/BUILD |
Adds a stripped-only release archive for signing. |
ci/do_ci.sh |
Implements multiarch builds, artifact export, signing, and auditing. |
.github/workflows/envoy-publish.yml |
Passes signing credentials into the build workflow. |
.github/workflows/_publish_release.yml |
Allows publication after build-time signing. |
.github/workflows/_publish_build.yml |
Selects a single x64 job for multiarch publishing. |
.github/workflows/_publish_build_server.yml |
Configures build-time signing, disk cleanup, and multiarch uploads. |
.github/config.yml |
Enables multiarch release publishing. |
Review effort: Balanced
4a2e560 to
712dfe6
Compare
712dfe6 to
c7cd000
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Production signing and ARM64 cross-compilation changes require human validation of both architectures’ signed artifacts and the reduced signing audit, as the cited staging run returned 404 and runtime builds were not performed.
No open issues 🎉
3 resolved since last review
Review effort: Balanced
c7cd000 to
c02c5e0
Compare
… job
With `release-publish-multiarch`, the x64 Publish binary job builds
everything published for both arches (`release.multiarch`), and
uploads the same artifacts as the per-arch jobs did (`release.<arch>`,
`oci.<arch>`, `packages.<arch>`); there is no arm64 job.
`//distribution/publish:publish_<arch>` builds `//distribution/publish`
for the arch's target platform, from any host. Only the target platform
changes: everything runs on the build's execution platforms, so the
arm64 binaries are cross-compiled on x64 (the llvm toolchain has the
arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose
pip deps only resolve for the host) stay on the host's arch.
The tools are now `bundled` too (as the container images' are), so they
are built in the same configuration as the binaries.
`release.publish` builds the host's arch, as before.
The job is named `Server (multiarch)`. It sets `--//distribution:multiarch`,
so on EngFlow the arm64 `.dwp`s are compressed on the large x86_64 pool too,
as they are built on x86_64. Without it (eg a native arm64 build) they keep the
arm platform's pool.
With `release-publish-multiarch`, the x64 Publish binary job
(`release.multiarch`) builds only what the pipeline uses from it, and
signs the release of both arches in the same invocation:
- `//distribution/publish:publish_multiarch_<arch>`: the container
images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and
the stripped release binaries (`release.stripped.tar.zst`), which are
signed.
- `//distribution:signed`, with `--//distribution:signing-inputs=debs`
and `--//distribution:<arch>-{debs,release}` set to those
(`publish_multiarch_<arch>_{debs,release}`): the `.changes` are
signed from the debs, and the `.deb`s and signed `.changes` bundled
into `debs.tar.gz` directly, rather than through the packages
tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the
key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by
`_run.yml` `signing`, under the same conditions as the Sign packages
job, with the snakeoil key for untrusted requests). It uploads
`release.signed`, and the Sign packages job is skipped.
The signing actions are audited as by `release.signed`, in an aquery of
`//distribution:signed` without the builds of its inputs (which can
only drop tool artifacts, so fail the audit, not pass it).
Nothing downstream uses the release tarball (with the debug binaries),
the tools, the packages tarballs, or the release and packages artifacts, which were for the
per-arch Docker OCI, Packages and Sign packages jobs: they are neither
built nor uploaded.
The bundling of the release for signing (the release binaries, the
multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local
(`PUBLISH_PACKAGING_TAGS`): it changes with every commit.
The dev publish (`github-dev`) runs once the release is signed in the
build, as the Sign packages job is skipped, on the publishing agent.
Signed-off-by: Ryan Northey <[email protected]>
c02c5e0 to
cc7899d
Compare
| /usr/local/lib/node_modules | ||
| /opt/microsoft | ||
| /opt/google | ||
| /opt/az |
There was a problem hiding this comment.
this is probably not needed at all
There was a problem hiding this comment.
Removed in 473603f. _run.yml already frees disk space, with its default paths, when the runner has no /mnt to build on. (bot assisted)
… job
With `release-publish-multiarch`, the x64 Publish binary job builds
everything published for both arches (`release.multiarch`), and
uploads the same artifacts as the per-arch jobs did (`release.<arch>`,
`oci.<arch>`, `packages.<arch>`); there is no arm64 job.
`//distribution/publish:publish_<arch>` builds `//distribution/publish`
for the arch's target platform, from any host. Only the target platform
changes: everything runs on the build's execution platforms, so the
arm64 binaries are cross-compiled on x64 (the llvm toolchain has the
arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose
pip deps only resolve for the host) stay on the host's arch.
The tools are now `bundled` too (as the container images' are), so they
are built in the same configuration as the binaries.
`release.publish` builds the host's arch, as before.
The job is named `Server (multiarch)`. It sets `--//distribution:multiarch`,
so on EngFlow the arm64 `.dwp`s are compressed on the large x86_64 pool too,
as they are built on x86_64. Without it (eg a native arm64 build) they keep the
arm platform's pool.
With `release-publish-multiarch`, the x64 Publish binary job
(`release.multiarch`) builds only what the pipeline uses from it, and
signs the release of both arches in the same invocation:
- `//distribution/publish:publish_multiarch_<arch>`: the container
images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and
the stripped release binaries (`release.stripped.tar.zst`), which are
signed.
- `//distribution:signed`, with `--//distribution:signing-inputs=debs`
and `--//distribution:<arch>-{debs,release}` set to those
(`publish_multiarch_<arch>_{debs,release}`): the `.changes` are
signed from the debs, and the `.deb`s and signed `.changes` bundled
into `debs.tar.gz` directly, rather than through the packages
tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the
key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by
`_run.yml` `signing`, under the same conditions as the Sign packages
job, with the snakeoil key for untrusted requests). It uploads
`release.signed`, and the Sign packages job is skipped.
The signing actions are audited as by `release.signed`, in an aquery of
`//distribution:signed` without the builds of its inputs (which can
only drop tool artifacts, so fail the audit, not pass it).
Nothing downstream uses the release tarball (with the debug binaries),
the tools, the packages tarballs, or the release and packages artifacts, which were for the
per-arch Docker OCI, Packages and Sign packages jobs: they are neither
built nor uploaded.
The bundling of the release for signing (the release binaries, the
multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local
(`PUBLISH_PACKAGING_TAGS`): it changes with every commit.
The dev publish (`github-dev`) runs once the release is signed in the
build, as the Sign packages job is skipped, on the publishing agent.
Backport note (release/v1.40): picked ahead of its merge to `main`
(envoyproxy#49331). In `_publish_release.yml` the dev publish job (`github-dev`,
from envoyproxy#49305) is left out, as this branch has no dev/release publish
split; the multiarch sign condition goes on the `github` job.
Signed-off-by: Ryan Northey <[email protected]>
… job
With `release-publish-multiarch`, the x64 Publish binary job builds
everything published for both arches (`release.multiarch`), and
uploads the same artifacts as the per-arch jobs did (`release.<arch>`,
`oci.<arch>`, `packages.<arch>`); there is no arm64 job.
`//distribution/publish:publish_<arch>` builds `//distribution/publish`
for the arch's target platform, from any host. Only the target platform
changes: everything runs on the build's execution platforms, so the
arm64 binaries are cross-compiled on x64 (the llvm toolchain has the
arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose
pip deps only resolve for the host) stay on the host's arch.
The tools are now `bundled` too (as the container images' are), so they
are built in the same configuration as the binaries.
`release.publish` builds the host's arch, as before.
The job is named `Server (multiarch)`. It sets `--//distribution:multiarch`,
so on EngFlow the arm64 `.dwp`s are compressed on the large x86_64 pool too,
as they are built on x86_64. Without it (eg a native arm64 build) they keep the
arm platform's pool.
With `release-publish-multiarch`, the x64 Publish binary job
(`release.multiarch`) builds only what the pipeline uses from it, and
signs the release of both arches in the same invocation:
- `//distribution/publish:publish_multiarch_<arch>`: the container
images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and
the stripped release binaries (`release.stripped.tar.zst`), which are
signed.
- `//distribution:signed`, with `--//distribution:signing-inputs=debs`
and `--//distribution:<arch>-{debs,release}` set to those
(`publish_multiarch_<arch>_{debs,release}`): the `.changes` are
signed from the debs, and the `.deb`s and signed `.changes` bundled
into `debs.tar.gz` directly, rather than through the packages
tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the
key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by
`_run.yml` `signing`, under the same conditions as the Sign packages
job, with the snakeoil key for untrusted requests). It uploads
`release.signed`, and the Sign packages job is skipped.
The signing actions are audited as by `release.signed`, in an aquery of
`//distribution:signed` without the builds of its inputs (which can
only drop tool artifacts, so fail the audit, not pass it).
Nothing downstream uses the release tarball (with the debug binaries),
the tools, the packages tarballs, or the release and packages artifacts, which were for the
per-arch Docker OCI, Packages and Sign packages jobs: they are neither
built nor uploaded.
The bundling of the release for signing (the release binaries, the
multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local
(`PUBLISH_PACKAGING_TAGS`): it changes with every commit.
The dev publish (`github-dev`) runs once the release is signed in the
build, as the Sign packages job is skipped, on the publishing agent.
Backport note (release/v1.39): picked ahead of its merge to `main`
(envoyproxy#49331), without the workflow changes (the workflows run from `main`).
Signed-off-by: Ryan Northey <[email protected]>
… job
With `release-publish-multiarch`, the x64 Publish binary job builds
everything published for both arches (`release.multiarch`), and
uploads the same artifacts as the per-arch jobs did (`release.<arch>`,
`oci.<arch>`, `packages.<arch>`); there is no arm64 job.
`//distribution/publish:publish_<arch>` builds `//distribution/publish`
for the arch's target platform, from any host. Only the target platform
changes: everything runs on the build's execution platforms, so the
arm64 binaries are cross-compiled on x64 (the llvm toolchain has the
arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose
pip deps only resolve for the host) stay on the host's arch.
The tools are now `bundled` too (as the container images' are), so they
are built in the same configuration as the binaries.
`release.publish` builds the host's arch, as before.
The job is named `Server (multiarch)`. It sets `--//distribution:multiarch`,
so on EngFlow the arm64 `.dwp`s are compressed on the large x86_64 pool too,
as they are built on x86_64. Without it (eg a native arm64 build) they keep the
arm platform's pool.
With `release-publish-multiarch`, the x64 Publish binary job
(`release.multiarch`) builds only what the pipeline uses from it, and
signs the release of both arches in the same invocation:
- `//distribution/publish:publish_multiarch_<arch>`: the container
images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and
the stripped release binaries (`release.stripped.tar.zst`), which are
signed.
- `//distribution:signed`, with `--//distribution:signing-inputs=debs`
and `--//distribution:<arch>-{debs,release}` set to those
(`publish_multiarch_<arch>_{debs,release}`): the `.changes` are
signed from the debs, and the `.deb`s and signed `.changes` bundled
into `debs.tar.gz` directly, rather than through the packages
tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the
key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by
`_run.yml` `signing`, under the same conditions as the Sign packages
job, with the snakeoil key for untrusted requests). It uploads
`release.signed`, and the Sign packages job is skipped.
The signing actions are audited as by `release.signed`, in an aquery of
`//distribution:signed` without the builds of its inputs (which can
only drop tool artifacts, so fail the audit, not pass it).
Nothing downstream uses the release tarball (with the debug binaries),
the tools, the packages tarballs, or the release and packages artifacts, which were for the
per-arch Docker OCI, Packages and Sign packages jobs: they are neither
built nor uploaded.
The bundling of the release for signing (the release binaries, the
multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local
(`PUBLISH_PACKAGING_TAGS`): it changes with every commit.
The dev publish (`github-dev`) runs once the release is signed in the
build, as the Sign packages job is skipped, on the publishing agent.
Backport note (release/v1.39): picked ahead of its merge to `main`
(envoyproxy#49331), without the workflow changes (the workflows run from `main`).
Signed-off-by: Ryan Northey <[email protected]>
| # EngFlow builds whose actions run on x86_64 workers: x64 builds, and both arches of a multiarch one. | ||
| selects.config_setting_group( | ||
| name = "engflow_rbe_x86_64_workers", | ||
| match_any = [ | ||
| "//bazel:engflow_rbe_x86_64", | ||
| ":engflow_rbe_multiarch", | ||
| ], | ||
| ) |
There was a problem hiding this comment.
The multiarch override only reaches compressed_debug_parts. Every other pool pin goes through envoy_exec_properties (bazel/envoy_rbe.bzl), which selects on //bazel:engflow_rbe_x86_64 = :engflow_rbe + :linux_x86_64. That checks the target CPU.
In release.multiarch, the arm64 half transitions to //bazel/platforms:linux_arm64, so none of those selects match. Its actions still run on x86_64 workers: the exec platform is rbe:linux_x64, which sets no Pool. They all land in the default pool, including:
//source/exe:envoy-staticand//contrib/exe:envoy-static(linux_x64_small)router_check,schema_validatorandconfig_load_check- the compile pins on
source/libraries
Those pins exist because the actions exceed the default pool. I'd expect the arm64 links and compiles to be OOM-killed and retried on every release run, or to fail. A native arm64 build never hit this because rbe:linux_arm64 pins Pool: arm.
Suggestion: move the multiarch flag into //bazel, and point _ENGFLOW_RBE_X86_64 (and the _CONFIGS groups) at a group like this:
selects.config_setting_group(
name = "engflow_rbe_x86_64_workers",
match_any = [":engflow_rbe_x86_64", ":engflow_rbe_multiarch"],
)compressed_debug_parts could then go back to envoy_exec_properties(rbe_pool = "linux_x64_large", test = False).
There was a problem hiding this comment.
Agreed, the arm64 half was missing every pin. Done in e64772f: the multiarch flag is now //bazel:multiarch, and //bazel:engflow_rbe_x86_64 itself matches EngFlow builds whose actions run on x86_64 workers (x64 builds, and both arches of a multiarch one). That covers _ENGFLOW_RBE_X86_64, the _CONFIGS groups built on it and the two direct selects in test/, without touching envoy_rbe.bzl. compressed_debug_parts is back on envoy_exec_properties. A native arm64 build is unchanged. (bot assisted)
… job
With `release-publish-multiarch`, the x64 Publish binary job builds
everything published for both arches (`release.multiarch`), and
uploads the same artifacts as the per-arch jobs did (`release.<arch>`,
`oci.<arch>`, `packages.<arch>`); there is no arm64 job.
`//distribution/publish:publish_<arch>` builds `//distribution/publish`
for the arch's target platform, from any host. Only the target platform
changes: everything runs on the build's execution platforms, so the
arm64 binaries are cross-compiled on x64 (the llvm toolchain has the
arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose
pip deps only resolve for the host) stay on the host's arch.
The tools are now `bundled` too (as the container images' are), so they
are built in the same configuration as the binaries.
`release.publish` builds the host's arch, as before.
The job is named `Server (multiarch)`. It sets `--//distribution:multiarch`,
so on EngFlow the arm64 `.dwp`s are compressed on the large x86_64 pool too,
as they are built on x86_64. Without it (eg a native arm64 build) they keep the
arm platform's pool.
With `release-publish-multiarch`, the x64 Publish binary job
(`release.multiarch`) builds only what the pipeline uses from it, and
signs the release of both arches in the same invocation:
- `//distribution/publish:publish_multiarch_<arch>`: the container
images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and
the stripped release binaries (`release.stripped.tar.zst`), which are
signed.
- `//distribution:signed`, with `--//distribution:signing-inputs=debs`
and `--//distribution:<arch>-{debs,release}` set to those
(`publish_multiarch_<arch>_{debs,release}`): the `.changes` are
signed from the debs, and the `.deb`s and signed `.changes` bundled
into `debs.tar.gz` directly, rather than through the packages
tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the
key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by
`_run.yml` `signing`, under the same conditions as the Sign packages
job, with the snakeoil key for untrusted requests). It uploads
`release.signed`, and the Sign packages job is skipped.
The signing actions are audited as by `release.signed`, in an aquery of
`//distribution:signed` without the builds of its inputs (which can
only drop tool artifacts, so fail the audit, not pass it).
Nothing downstream uses the release tarball (with the debug binaries),
the tools, the packages tarballs, or the release and packages artifacts, which were for the
per-arch Docker OCI, Packages and Sign packages jobs: they are neither
built nor uploaded.
The bundling of the release for signing (the release binaries, the
multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local
(`PUBLISH_PACKAGING_TAGS`): it changes with every commit.
The dev publish (`github-dev`) runs once the release is signed in the
build, as the Sign packages job is skipped, on the publishing agent.
Backport note (release/v1.39): picked ahead of its merge to `main`
(envoyproxy#49331), without the workflow changes (the workflows run from `main`).
Signed-off-by: Ryan Northey <[email protected]>
The release container images and packages are built with Bazel, in the release build (`release.publish`/`release.multiarch`, envoyproxy#49259, envoyproxy#49331). Nothing on this branch builds from `Dockerfile-envoy` any more: remove it, `build.sh`, and the `docker` and `distribution` targets of `ci/do_ci.sh` (the Docker OCI and Packages jobs, which only run for the release branches, with their own `do_ci.sh`). The `docker` target was also how an image was built locally. In its place each image has a `<image>_load` target, which loads it into Docker (`oci_load`), and the local build docs use that. The `release-images` task read the pinned images and their tags from the Dockerfile. It now reads them from the `oci.pull` entries of `MODULE.bazel`, where each has its tag in a `# tag:` comment. Dependabot no longer watches the directory, and the Docker Hub readme links the `dev` tag to the Bazel package. Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.38): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. envoyproxy#49294 added the `.dwp`s with their debug sections compressed (zlib, which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.38): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. envoyproxy#49294 added the `.dwp`s with their debug sections compressed (zlib, which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.37): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.38): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. envoyproxy#49294 added the `.dwp`s with their debug sections compressed (zlib, which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
The release container images and packages are built with Bazel, in the release build (`release.publish`/`release.multiarch`, envoyproxy#49259, envoyproxy#49331). Nothing on this branch builds from `Dockerfile-envoy` any more: remove it, `build.sh`, and the `docker` and `distribution` targets of `ci/do_ci.sh` (the Docker OCI and Packages jobs, which only run for the release branches, with their own `do_ci.sh`), and the environment that `ci/docker-compose.yml` only passed through for them. The `docker` target was also how the images were built locally. A new `release.containers` target builds just the images, as OCI tarballs, without the release tarball, tools or packages, and the local build docs use it. The `release-images` task read the pinned images and their tags from the Dockerfile. It now reads them from the `oci.pull` entries of `MODULE.bazel`, where each has its tag in a `# tag:` comment. Dependabot no longer watches the directory, and the Docker Hub readme links the `dev` tag to the Bazel package. Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.37): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.37): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
…placed The release container images and packages are built with Bazel, and the release is signed, in the release build (`release.publish`/ `release.multiarch`, envoyproxy#49259, envoyproxy#49331). The builds that did those before are only run for the release branches, with their own `ci/do_ci.sh`. Removed: - `distribution/docker/Dockerfile-envoy` and `build.sh`, and the `docker` and `distribution` targets of `ci/do_ci.sh` (the Docker OCI and Packages jobs), with the environment `ci/docker-compose.yml` only passed through for them. - the `release.signed` target (the Sign packages job), and the signing of the packages tarballs it did: the `x64-packages`/`arm64-packages` and `signing-inputs` flags of `//distribution`, and the extraction of the `.deb`s and `.changes` from the tarballs. The `.deb`s and `.changes` built in the same invocation are the only signing inputs. - the `verify.trigger` target, which nothing has run since Verify became a workflow of its own, with `@envoy_repo//:trigger`. The `docker` target was also how the images were built locally. A new `release.containers` target builds just the images, as OCI tarballs, without the release tarball, tools or packages, and the local build docs use it. The `release-images` task read the pinned images and their tags from the Dockerfile. It now reads them from the `oci.pull` entries of `MODULE.bazel`, where each has its tag in a `# tag:` comment. Dependabot no longer watches the directory, and the Docker Hub readme links the `dev` tag to the Bazel package. Signed-off-by: Ryan Northey <[email protected]>
…placed The release container images and packages are built with Bazel, and the release is signed, in the release build (`release.publish`/ `release.multiarch`, envoyproxy#49259, envoyproxy#49331). The builds that did those before are only run for the release branches, with their own `ci/do_ci.sh`. Removed: - `distribution/docker/Dockerfile-envoy` and `build.sh`, and the `docker` and `distribution` targets of `ci/do_ci.sh` (the Docker OCI and Packages jobs), with the environment `ci/docker-compose.yml` only passed through for them. - the `release.signed` target (the Sign packages job), and the signing of the packages tarballs it did: the `x64-packages`/`arm64-packages` and `signing-inputs` flags of `//distribution`, and the extraction of the `.deb`s and `.changes` from the tarballs. The `.deb`s and `.changes` built in the same invocation are the only signing inputs. - the `verify.trigger` target, which nothing runs, with `@envoy_repo//:trigger`. The `docker` target was also how the images were built locally. A new `release.containers` target builds just the images, as OCI tarballs, without the release tarball, tools or packages, and the local build docs use it. The `release-images` task read the pinned images and their tags from the Dockerfile. It now reads them from the `oci.pull` entries of `MODULE.bazel`, where each has its tag in a `# tag:` comment. Dependabot no longer watches the directory, and the Docker Hub readme links the `dev` tag to the Bazel package. Signed-off-by: Ryan Northey <[email protected]>
…placed The release container images and packages are built with Bazel, and the release is signed, in the release build (`release.publish`/ `release.multiarch`, envoyproxy#49259, envoyproxy#49331). The builds that did those before are only run for the release branches, with their own `ci/do_ci.sh`. Removed: - `distribution/docker/Dockerfile-envoy` and `build.sh`, and the `docker` and `distribution` targets of `ci/do_ci.sh` (the Docker OCI and Packages jobs), with the environment `ci/docker-compose.yml` only passed through for them. - the `release.signed` target (the Sign packages job), and the signing of the packages tarballs it did: the `x64-packages`/`arm64-packages` and `signing-inputs` flags of `//distribution`, and the extraction of the `.deb`s and `.changes` from the tarballs. The `.deb`s and `.changes` built in the same invocation are the only signing inputs. - the `verify.trigger` target, which nothing runs, with `@envoy_repo//:trigger`. The `docker` target was also how the images were built locally. A new `release.containers` target builds just the images, as OCI tarballs, without the release tarball, tools or packages, and the local build docs use it. The `release-images` task read the pinned images and their tags from the Dockerfile. It now reads them from the `oci.pull` entries of `MODULE.bazel`, where each has its tag in a `# tag:` comment. Dependabot no longer watches the directory, and the Docker Hub readme links the `dev` tag to the Bazel package. Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.37): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.37): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.38): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. envoyproxy#49294 added the `.dwp`s with their debug sections compressed (zlib, which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.37): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>
… job (envoyproxy#49331) With `release-publish-multiarch`, the x64 Publish binary job builds everything published for both arches (`release.multiarch`), and uploads the same artifacts as the per-arch jobs did (`release.<arch>`, `oci.<arch>`, `packages.<arch>`); there is no arm64 job. `//distribution/publish:publish_<arch>` builds `//distribution/publish` for the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch. The tools are now `bundled` too (as the container images' are), so they are built in the same configuration as the binaries. `release.publish` builds the host's arch, as before. The job is named `Server (multiarch)`. It sets `--//bazel:multiarch`, so on EngFlow the x86_64 RBE pool pins (`envoy_exec_properties`, via `//bazel:engflow_rbe_x86_64`) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool. With `release-publish-multiarch`, the x64 Publish binary job (`release.multiarch`) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation: - `//distribution/publish:publish_multiarch_<arch>`: the container images, uploaded (`oci.<arch>`), and the `.deb`/`.changes` files and the stripped release binaries (`release.stripped.tar.zst`), which are signed. - `//distribution:signed`, with `--//distribution:signing-inputs=debs` and `--//distribution:<arch>-{debs,release}` set to those (`publish_multiarch_<arch>_{debs,release}`): the `.changes` are signed from the debs, and the `.deb`s and signed `.changes` bundled into `debs.tar.gz` directly, rather than through the packages tarballs (`signing-inputs=tarballs`, as the Sign packages job), with the key and passphrase at `ENVOY_SIGNING_{KEY,PASSPHRASE}_PATH` (staged by `_run.yml` `signing`, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploads `release.signed`, and the Sign packages job is skipped. The signing actions are audited as by `release.signed`, in an aquery of `//distribution:signed` without the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it). Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded. The bundling of the release for signing (the release binaries, the multi-arch debs, the `.changes` and `release.signed.tar.zst`) is local (`PUBLISH_PACKAGING_TAGS`): it changes with every commit. The dev publish (`github-dev`) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent. --------- Backport note (release/v1.37): without the workflow changes (the workflows run from `main`). This branch still has selects with both `engflow_rbe_x86_64` and `engflow_rbe_aarch64` (eg `bazel/foreign_cc`), which would both match the arm64 half of a multiarch build on x86_64 workers, so `engflow_rbe_aarch64` is only for a single arch build. `release.signed` keeps this branch's `setup_clang_toolchain`: clang is not the default here, and without it the build has no RBE platform. (cherry picked from commit 44a6cec) Signed-off-by: Ryan Northey <[email protected]>
…voyproxy#49354) The debug images (`envoy-debug`, `envoy-contrib-debug`) took the `.dwp`s as llvm-dwp writes them: debug sections uncompressed (over 3GB for contrib, per arch), each a single blob in the remote cache. which the images' gdb 12 reads) and cached in parts (`//distribution:envoy-dwarf-joined`, `//distribution:envoy-contrib-dwarf-joined`), but only the release tarball (`//distribution/binary`) used them. The images are no longer built from that tarball (envoyproxy#49259), and `release.multiarch` does not build it (envoyproxy#49331), so nothing published had them. This points the images' `.dwp`s at the `-joined` targets, as the comment on the debug layers in this file already describes. Risk Level: low (the `.dwp` in the published debug images; the same file the release tarball has had since envoyproxy#49294) Testing: this PR's Publish (`release.multiarch`), against the postsubmit of its base (499b706), from the Bazel profiles: | | base | this PR | | --- | --- | --- | | `oci.x64` / `oci.arm64` artifacts | 4.10GB / 4.06GB | 3.29GB / 3.24GB | | Writing the `envoy-debug` layer (per arch) | 159s, 101s | 31s, 9s | | Writing the `envoy-contrib-debug` layer (per arch) | 121s, 96s | 29s, 25s | | OCI descriptor of the debug layers | 29-54s | 9-12s | | Compressing the `.dwp`s (new here, remote) | - | 101-118s | | Joining the parts (new here, local) | - | 7-20s | The compression runs whenever a `.dwp` changes, so it is not a critical path win by itself (bazel took 360s here, 443s on the base, where the `.dwp`s were regenerated and here were not): the gain is the smaller images and layers, and no multi-GB `.dwp` blob to fetch. Docs Changes: n/a Release Notes: n/a Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 5e14399) Signed-off-by: Ryan Northey <[email protected]>


Commit Message: release/ci: Build, sign and publish the release of both arches in one job
Additional Description:
With
release-publish-multiarch, the x64 Publish binary job builds everything published for both arches (release.multiarch), and uploads the same artifacts as the per-arch jobs did (release.<arch>,oci.<arch>,packages.<arch>); there is no arm64 job.//distribution/publish:publish_<arch>builds//distribution/publishfor the arch's target platform, from any host. Only the target platform changes: everything runs on the build's execution platforms, so the arm64 binaries are cross-compiled on x64 (the llvm toolchain has the arm64 sysroot and libc++), and the exec tools (eg the Python ones, whose pip deps only resolve for the host) stay on the host's arch.The tools are now
bundledtoo (as the container images' are), so they are built in the same configuration as the binaries.release.publishbuilds the host's arch, as before.The job is named
Server (multiarch). It sets--//bazel:multiarch, so on EngFlow the x86_64 RBE pool pins (envoy_exec_properties, via//bazel:engflow_rbe_x86_64) apply to the arm64 half too, as it is built on x86_64 workers. Without it (eg a native arm64 build) arm64 keeps the arm platform's pool.With
release-publish-multiarch, the x64 Publish binary job (release.multiarch) builds only what the pipeline uses from it, and signs the release of both arches in the same invocation://distribution/publish:publish_multiarch_<arch>: the container images, uploaded (oci.<arch>), and the.deb/.changesfiles and the stripped release binaries (release.stripped.tar.zst), which are signed.//distribution:signed, with--//distribution:signing-inputs=debsand--//distribution:<arch>-{debs,release}set to those (publish_multiarch_<arch>_{debs,release}): the.changesare signed from the debs, and the.debs and signed.changesbundled intodebs.tar.gzdirectly, rather than through the packages tarballs (signing-inputs=tarballs, as the Sign packages job), with the key and passphrase atENVOY_SIGNING_{KEY,PASSPHRASE}_PATH(staged by_run.ymlsigning, under the same conditions as the Sign packages job, with the snakeoil key for untrusted requests). It uploadsrelease.signed, and the Sign packages job is skipped.The signing actions are audited as by
release.signed, in an aquery of//distribution:signedwithout the builds of its inputs (which can only drop tool artifacts, so fail the audit, not pass it).Nothing downstream uses the release tarball (with the debug binaries), the tools, the packages tarballs, or the release and packages artifacts, which were for the per-arch Docker OCI, Packages and Sign packages jobs: they are neither built nor uploaded.
The bundling of the release for signing (the release binaries, the multi-arch debs, the
.changesandrelease.signed.tar.zst) is local (PUBLISH_PACKAGING_TAGS): it changes with every commit.The dev publish (
github-dev) runs once the release is signed in the build, as the Sign packages job is skipped, on the publishing agent.Risk Level: medium (the release publish pipeline)
Testing: envoy-ci-staging, where Publish runs
release.multiarch(eg envoyproxy/envoy-ci-staging run 43904959811: images, packages and the signed release of both arches from the one x64 job)Docs Changes: n/a
Release Notes: n/a