Repository navigation
distribution: Compress the release .dwps, and cache them in parts - #49294
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The zstd-compressed debug sections are incompatible with Ubuntu 22.04’s stock GDB 12 in the debug images, breaking source-level debugging of the packaged .dwp files.
1 open issue
What changed in this PR
This PR reduces release debug-symbol size and remote-cache download time by compressing .dwp files and caching them in smaller parts.
Changes:
- Adds a toolchain-based compression rule, using the large remote-execution pool.
- Splits compressed debug files into four cacheable parts and rejoins them locally.
- Updates release bundles to use the reassembled debug files.
| File | Description |
|---|---|
distribution/BUILD |
Defines compression, splitting, and local reassembly targets. |
distribution/binary/debug.bzl |
Adds the configurable objcopy debug-section compression rule. |
distribution/binary/BUILD |
Packages reassembled .dwp files in release bundles. |
Review effort: Balanced
phlax
force-pushed
the
distribution-dwp-parts
branch
from
November 15, 2026 18:32
a0f19ef to
2e1010f
Compare
phlax
force-pushed
the
distribution-dwp-parts
branch
from
November 15, 2026 18:56
2e1010f to
13bb415
Compare
phlax
force-pushed
the
distribution-dwp-parts
branch
from
November 15, 2026 19:26
13bb415 to
8c0fdad
Compare
phlax
force-pushed
the
distribution-dwp-parts
branch
from
November 15, 2026 19:48
8c0fdad to
5db0cc4
Compare
llvm-dwp writes the `.dwp`s with their debug sections uncompressed (over 3GB for contrib), which the link's `--compress-debug-sections` does not reach. They are compressed (zlib, which the debug images' gdb 12 reads, unlike zstd; with the C++ toolchain's objcopy, which holds the whole file: on the large RBE pool for x86_64, and on the arm pool for arm64), to ~1.1-1.2GB. Blobs that size are often served from the remote cache's fallback, slowly (35% of the >700MB downloads sampled, against 4-14% below): the same action splits each compressed `.dwp` into 4 parts (~300MB), so the whole compressed file is never a blob of its own, and the parts download in parallel and are joined locally for the release (and so the debug images). Signed-off-by: Ryan Northey <[email protected]>
phlax
force-pushed
the
distribution-dwp-parts
branch
from
November 15, 2026 20:58
5db0cc4 to
f239146
Compare
phlax
added a commit
that referenced
this pull request
Nov 16, 2026
Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (#49294, #49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 16, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Signed-off-by: Ryan Northey <[email protected]> Backport note (release/v1.40): the images are built from this branch's bases (the `Dockerfile-envoy` digests: ubuntu 5ec03bb3, distroless 6a2a3346), the new modules are added to this branch's pins (`rules_cc` 0.2.25, `rules_foreign_cc` 0.16.0, `su-exec` 0.3), and the lockfiles are regenerated. (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…voyproxy#49294) The release (`//distribution/binary:release`, and so the debug images built from it) bundles the `.dwp`s, which llvm-dwp writes with their debug sections uncompressed: over 3GB for contrib, per arch. The link's `--compress-debug-sections` does not reach them. - **Compressed:** a `compressed_debug_parts` rule runs the C++ toolchain's objcopy (`--compress-debug-sections=zlib`) on each `.dwp`, on the large RBE pool for x86_64, and the arm pool for arm64 (objcopy holds the whole file), to ~1.1-1.2GB (~0.9-1GB with zstd). zlib rather than zstd, as the debug images (Ubuntu 22.04) have gdb 12, which reads zstd-compressed debug sections only from gdb 13. - **Cached in parts:** blobs that size are often served from the remote cache's fallback, slowly. In envoy-ci-staging, 35% of the downloads over 700MB came from the fallback (at 25-130 Mbps; one ~1GB `.dwp` took 60-212s), against 4-14% of smaller ones. The same action splits each compressed `.dwp` into 4 parts (~300MB, cached remotely), so the whole compressed file is never a blob of its own (a separate split action had to fetch it first: ~107s on the critical path). The parts download in parallel and are joined locally (`no-remote`, as the joined file is ~1.2GB and new whenever the debug info changes, ie on any source change). With this, all 16 parts of a build were served from the distributed cache, the slowest in ~20s. In envoy-ci-staging this took the debug image layers' input downloads from 8-212s to ~2-20s, and the release build to its fastest (~88s of bazel). Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit ab6a2fb) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.38): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.38): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…voyproxy#49294) The release (`//distribution/binary:release`, and so the debug images built from it) bundles the `.dwp`s, which llvm-dwp writes with their debug sections uncompressed: over 3GB for contrib, per arch. The link's `--compress-debug-sections` does not reach them. - **Compressed:** a `compressed_debug_parts` rule runs the C++ toolchain's objcopy (`--compress-debug-sections=zlib`) on each `.dwp`, on the large RBE pool for x86_64, and the arm pool for arm64 (objcopy holds the whole file), to ~1.1-1.2GB (~0.9-1GB with zstd). zlib rather than zstd, as the debug images (Ubuntu 22.04) have gdb 12, which reads zstd-compressed debug sections only from gdb 13. - **Cached in parts:** blobs that size are often served from the remote cache's fallback, slowly. In envoy-ci-staging, 35% of the downloads over 700MB came from the fallback (at 25-130 Mbps; one ~1GB `.dwp` took 60-212s), against 4-14% of smaller ones. The same action splits each compressed `.dwp` into 4 parts (~300MB, cached remotely), so the whole compressed file is never a blob of its own (a separate split action had to fetch it first: ~107s on the critical path). The parts download in parallel and are joined locally (`no-remote`, as the joined file is ~1.2GB and new whenever the debug info changes, ie on any source change). With this, all 16 parts of a build were served from the distributed cache, the slowest in ~20s. In envoy-ci-staging this took the debug image layers' input downloads from 8-212s to ~2-20s, and the release build to its fastest (~88s of bazel). Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit ab6a2fb) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.37): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). - the distroless base is this branch's (`base-nossl-debian12`), and su-exec is `@com_github_ncopa_suexec` here. The dependency metadata is inline in `repository_locations.bzl` (no `deps.yaml` on this branch). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.38): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.37): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). - the distroless base is this branch's (`base-nossl-debian12`), and su-exec is `@com_github_ncopa_suexec` here. The dependency metadata is inline in `repository_locations.bzl` (no `deps.yaml` on this branch). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.37): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). - the distroless base is this branch's (`base-nossl-debian12`), and su-exec is `@com_github_ncopa_suexec` here. The dependency metadata is inline in `repository_locations.bzl` (no `deps.yaml` on this branch). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.37): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). - the distroless base is this branch's (`base-nossl-debian12`), and su-exec is `@com_github_ncopa_suexec` here. The dependency metadata is inline in `repository_locations.bzl` (no `deps.yaml` on this branch). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.37): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). - the distroless base is this branch's (`base-nossl-debian12`), and su-exec is `@com_github_ncopa_suexec` here. The dependency metadata is inline in `repository_locations.bzl` (no `deps.yaml` on this branch). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…voyproxy#49294) The release (`//distribution/binary:release`, and so the debug images built from it) bundles the `.dwp`s, which llvm-dwp writes with their debug sections uncompressed: over 3GB for contrib, per arch. The link's `--compress-debug-sections` does not reach them. - **Compressed:** a `compressed_debug_parts` rule runs the C++ toolchain's objcopy (`--compress-debug-sections=zlib`) on each `.dwp`, on the large RBE pool for x86_64, and the arm pool for arm64 (objcopy holds the whole file), to ~1.1-1.2GB (~0.9-1GB with zstd). zlib rather than zstd, as the debug images (Ubuntu 22.04) have gdb 12, which reads zstd-compressed debug sections only from gdb 13. - **Cached in parts:** blobs that size are often served from the remote cache's fallback, slowly. In envoy-ci-staging, 35% of the downloads over 700MB came from the fallback (at 25-130 Mbps; one ~1GB `.dwp` took 60-212s), against 4-14% of smaller ones. The same action splits each compressed `.dwp` into 4 parts (~300MB, cached remotely), so the whole compressed file is never a blob of its own (a separate split action had to fetch it first: ~107s on the critical path). The parts download in parallel and are joined locally (`no-remote`, as the joined file is ~1.2GB and new whenever the debug info changes, ie on any source change). With this, all 16 parts of a build were served from the distributed cache, the slowest in ~20s. In envoy-ci-staging this took the debug image layers' input downloads from 8-212s to ~2-20s, and the release build to its fastest (~88s of bazel). Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit ab6a2fb) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.38): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…voyproxy#49294) The release (`//distribution/binary:release`, and so the debug images built from it) bundles the `.dwp`s, which llvm-dwp writes with their debug sections uncompressed: over 3GB for contrib, per arch. The link's `--compress-debug-sections` does not reach them. - **Compressed:** a `compressed_debug_parts` rule runs the C++ toolchain's objcopy (`--compress-debug-sections=zlib`) on each `.dwp`, on the large RBE pool for x86_64, and the arm pool for arm64 (objcopy holds the whole file), to ~1.1-1.2GB (~0.9-1GB with zstd). zlib rather than zstd, as the debug images (Ubuntu 22.04) have gdb 12, which reads zstd-compressed debug sections only from gdb 13. - **Cached in parts:** blobs that size are often served from the remote cache's fallback, slowly. In envoy-ci-staging, 35% of the downloads over 700MB came from the fallback (at 25-130 Mbps; one ~1GB `.dwp` took 60-212s), against 4-14% of smaller ones. The same action splits each compressed `.dwp` into 4 parts (~300MB, cached remotely), so the whole compressed file is never a blob of its own (a separate split action had to fetch it first: ~107s on the critical path). The parts download in parallel and are joined locally (`no-remote`, as the joined file is ~1.2GB and new whenever the debug info changes, ie on any source change). With this, all 16 parts of a build were served from the distributed cache, the slowest in ~20s. In envoy-ci-staging this took the debug image layers' input downloads from 8-212s to ~2-20s, and the release build to its fastest (~88s of bazel). Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit ab6a2fb) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.37): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). - the distroless base is this branch's (`base-nossl-debian12`), and su-exec is `@com_github_ncopa_suexec` here. The dependency metadata is inline in `repository_locations.bzl` (no `deps.yaml` on this branch). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…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]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 18, 2026
…voyproxy#49294) The release (`//distribution/binary:release`, and so the debug images built from it) bundles the `.dwp`s, which llvm-dwp writes with their debug sections uncompressed: over 3GB for contrib, per arch. The link's `--compress-debug-sections` does not reach them. - **Compressed:** a `compressed_debug_parts` rule runs the C++ toolchain's objcopy (`--compress-debug-sections=zlib`) on each `.dwp`, on the large RBE pool for x86_64, and the arm pool for arm64 (objcopy holds the whole file), to ~1.1-1.2GB (~0.9-1GB with zstd). zlib rather than zstd, as the debug images (Ubuntu 22.04) have gdb 12, which reads zstd-compressed debug sections only from gdb 13. - **Cached in parts:** blobs that size are often served from the remote cache's fallback, slowly. In envoy-ci-staging, 35% of the downloads over 700MB came from the fallback (at 25-130 Mbps; one ~1GB `.dwp` took 60-212s), against 4-14% of smaller ones. The same action splits each compressed `.dwp` into 4 parts (~300MB, cached remotely), so the whole compressed file is never a blob of its own (a separate split action had to fetch it first: ~107s on the critical path). The parts download in parallel and are joined locally (`no-remote`, as the joined file is ~1.2GB and new whenever the debug info changes, ie on any source change). With this, all 16 parts of a build were served from the distributed cache, the slowest in ~20s. In envoy-ci-staging this took the debug image layers' input downloads from 8-212s to ~2-20s, and the release build to its fastest (~88s of bazel). Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit ab6a2fb) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 18, 2026
…yproxy#49259) Builds all of the release container images with bazel (rules_oci) instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`, `envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`, `envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`. - Distroless images: the pinned distroless base, plus the config and binary layers. - Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN` steps of the `envoy-base` stage become layers: - `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to the base's passwd/group/shadow/gshadow as `adduser --group --system envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg status; - the package data, the CA bundle (`cacerts`), and `/etc/timezone` / `/etc/localtime` (`Etc/UTC`); - `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`, `su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same entrypoint/cmd/env/port. - The binaries use the same opt/strip transition as the release bundle, so they come from the release build. - The debug layers are gzipped at level 1: their contents' debug sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely shrinks. - `release.publish` strips the release binaries locally: the client downloads them anyway (the release tarball and images are built locally), while a remote strip waits on a worker fetching the freshly linked binary (~30s in envoy-ci-staging). CI targets: - `release.server`: the release binaries and tools; `release.server_only` (used by the Publish workflow, and so by release branches) is the same, unchanged. - `release.publish` (new): as `release.server`, and the distro packages, and the images (`//distribution/docker:images`) as OCI tarballs (the image layout, as `docker buildx -o type=oci` writes it for a single platform) in the release binary directory. - `docker` is unchanged (buildx): where `release-publish` is set its job is skipped, as `release.publish` writes the images to `build_images/<image>.<arch>.tar` itself. Local loads and multi-platform builds still use it. Publish switches to `release.publish` here: `.github/config.yml` sets `release-publish: true`, so each arch's binary job builds the release binaries, the images and the packages in one invocation and uploads them (`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate Docker OCI and Packages jobs are skipped. Branches without `release-publish` (the release branches) keep `release.server_only` and the separate jobs, with buildx. Differences from the buildx images: - No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with rules_oci Additional Description:ckages are those of the pinned base until its digest (and the snapshot) is bumped. - Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash links. This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the v0.5.20 release) until it is released; the docs/external jobs fail with the override ("Missing version info: envoy_toolshed"). --------- Backport note (release/v1.37): this branch builds with WORKSPACE, so: - rules_oci is 2.2.6, which needs only the aspect_bazel_lib and bazel_features that this branch has (later versions need tar.bzl 0.7 and bazel_lib 3). Its toolchains, and the base images (this branch's `Dockerfile-envoy` digests), are set up in `bazel/dependency_imports.bzl`. - rules_distroless and tar.bzl's rules are bzlmod-only: the three Ubuntu packages are fetched as `.deb` archives (the same snapshot, versions and hashes), and `flatten`, `cacerts` and the OCI tarballs are small local rules over the hermetic bsdtar (`distribution/docker/layers.bzl`). - no lockfiles, and no workflow changes (the workflows run from `main`). - the distroless base is this branch's (`base-nossl-debian12`), and su-exec is `@com_github_ncopa_suexec` here. The dependency metadata is inline in `repository_locations.bzl` (no `deps.yaml` on this branch). (cherry picked from commit aa082aa) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 18, 2026
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Commit Message: distribution: Compress the release .dwps, and cache them in parts
Additional Description:
The release (
//distribution/binary:release, and so the debug images built from it) bundles the.dwps, which llvm-dwp writes with their debug sections uncompressed: over 3GB for contrib, per arch. The link's--compress-debug-sectionsdoes not reach them.compressed_debug_partsrule runs the C++ toolchain's objcopy (--compress-debug-sections=zlib) on each.dwp, on the large RBE pool for x86_64, and the arm pool for arm64 (objcopy holds the whole file), to ~1.1-1.2GB (~0.9-1GB with zstd). zlib rather than zstd, as the debug images (Ubuntu 22.04) have gdb 12, which reads zstd-compressed debug sections only from gdb 13..dwptook 60-212s), against 4-14% of smaller ones. The same action splits each compressed.dwpinto 4 parts (~300MB, cached remotely), so the whole compressed file is never a blob of its own (a separate split action had to fetch it first: ~107s on the critical path). The parts download in parallel and are joined locally (no-remote, as the joined file is ~1.2GB and new whenever the debug info changes, ie on any source change). With this, all 16 parts of a build were served from the distributed cache, the slowest in ~20s.In envoy-ci-staging this took the debug image layers' input downloads from 8-212s to ~2-20s, and the release build to its fastest (~88s of bazel).
Risk Level: low
Testing: CI, envoy-ci-staging
Docs Changes: n/a
Release Notes: n/a