Skip to content

test/envoy_validate: validate against the pinned aether-proxy image, not a stock Envoy release binary (gate and data plane have drifted: v1.39.0 vs 1.40.0-dev custom build) #709

Closed

Description

@bpalermo

Summary

//test/envoy_validate runs envoy --mode validate over aether-generated bootstraps, but the binary it uses is the stock Envoy v1.39.0 release asset (@envoy_binary_linux_{amd64,arm64} in the root MODULE.bazel), while the deployed proxy is the custom build of a 1.40.0-dev snapshot (proxy/MODULE.bazel, 1.40.0-dev.20260904.13144fb.envoy) with wasm / dynamic-modules / hickory compiled out and aether_stats compiled in. The gate and the data plane have drifted apart twice now (v1.38 comment still in test/envoy_validate/BUILD.bazel, v1.39 pin, 1.40-dev proxy), and the KNOWN SKEW note in MODULE.bazel says as much.

Two consequences:

  1. False passes. An agent-generated config that references an extension the custom proxy does not compile in (anything under the _DROPPED list in proxy/bazel/build_config/extensions_build_config.bzl) validates fine against stock Envoy and NACKs on the real proxy. Stock Envoy is strictly more permissive than what we ship.
  2. False failures / missed coverage on version skew. Fields, defaults and deprecations differ between 1.39 and the 1.40 snapshot; the gate tests the wrong schema.

There is no stock release asset for a main snapshot (and envoyproxy/envoy-dev on Docker Hub stopped updating 2025-08), so "re-pin the stock binary to match" cannot work while the proxy tracks main. The only binary that is always exactly in sync with the proxy is the proxy.

Proposal: validate against the pinned aether-proxy image

Make //test/envoy_validate:envoy_bin resolve to the Envoy binary inside ghcr.io/bpalermo/aether/aether-proxy at the digest the chart pins (charts/aether/values.yaml → aether-proxy.image.digest), so the gate validates against the exact binary talos deploys and moves whenever the chart pin moves. No second version to keep in sync; the chart pin becomes the single source of truth.

Shape:

  • Root MODULE.bazel: a rules_img pull of the multi-arch index by digest (rules_img is already a root dependency for image builds), one repo per arch, and a small rule/genrule that extracts /usr/local/bin/envoy from the image layers into a File that envoy_bin selects on @platforms//cpu. Keep the select() shape in test/envoy_validate/BUILD.bazel.
  • Digest/tag read from one place. Either (a) a tiny //charts:proxy_pin.bzl (or a .bzl next to values.yaml) that both the chart and MODULE.bazel read, or (b) a CI assertion that the digest in MODULE.bazel equals the one in values.yaml (same class as the values.yaml tag/digest consistency check proposed in proxy-release bump-chart rewrites tag: but the chart prefers digest: — automated proxy releases never change the deployed image #703). (a) is preferred: one edit moves both.
  • proxy-release's bump-chart job then also moves the root pin in the same commit (it already rewrites tag: + digest:; add the third sed).
  • Local dev: the image lives on GHCR. If the package is private, bazel test //test/envoy_validate/... needs a GHCR login locally; CI already has packages: read via GITHUB_TOKEN. Decide visibility (public is simplest; the binary is not secret) before landing.
  • Delete @envoy_binary_linux_* and the KNOWN SKEW block; fix the stale 1.38.0 comment in the BUILD file.

Not in scope: which Envoy version the proxy pins (release vs snapshot) — see #695 for the history; the re-pin to 1.40.0.envoy when it publishes is a routine one-line bump and stays under #697's registry-pin rule (module version + registry commit together).

Refs: #695 (closed, payoff landed), #697 (bzlmod migration), #703 (bump-chart / pin-consistency CI), #656 (the shipped Envoy's symbol-table guard — could move onto the same extracted binary).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions