Skip to content

Cannot determine which Envoy a running proxy contains: version gauge mismatches the pin and images carry no provenance labels #837

Closed

Description

@bpalermo

You cannot determine which Envoy commit a running aether-proxy contains — neither from the process nor from the image. Two symptoms, one gap.

Surfaced while investigating #829, where knowing the exact Envoy build mattered for whether a runtime guard's behaviour was in play.

Symptom 1 — the runtime gauge does not match the pin

envoy_server_version reads 3121738 = 0x2FA24A → hex string 2fa24a, identically on all five proxy nodes. Envoy derives that gauge from the first six hex digits of its build SCM revision.

Our pinned Envoy is 1.40.0-dev.20260904.13144fb.envoy — first six digits 13144f = 1250383. They do not match and are not close.

Most likely reading: the gauge is stamped from the proxy/ workspace's own SCM revision rather than Envoy's, since we build Envoy as a bzlmod dependency and the stamping takes the driving repo. If so the gauge will report the driving repo forever, and no amount of reading it will ever answer "which Envoy is this".

Symptom 2 — the image carries no provenance either, and one annotation is actively misleading

Decoded from the published index (aether-proxy@sha256:caa471b6…, arm64 config blob — amd64 may differ):

  • No labels at all. No org.opencontainers.image.revision, no version, no build metadata.
  • created is 1970-01-01T00:00:00Z; history entries are bazel bu…. Fully reproducible, zero-timestamp output — deliberate and good.
  • The manifest's only annotation is org.opencontainers.image.source = https://github.com/GoogleContainerTools/distroless, inherited from the distroless base. That is worse than absent: anything walking image annotations for provenance gets a confident wrong answer pointing at Google's repo rather than ours.

Confirmed repo-wide: there are no org.opencontainers.image.* labels on any image we publish, so this is not specific to the proxy — the proxy is just where it bites, because it is the one image whose contents come from a third-party pin.

Why determinism is not the obstacle

Zero timestamps are a feature and should stay. But org.opencontainers.image.revision is a fixed string, not a clock — stamping it costs nothing in reproducibility. Provenance and determinism are separable here, and the current build has dropped the first while achieving the second.

Proposed

  1. Add org.opencontainers.image.revision (the aether commit) and org.opencontainers.image.source (this repo, overriding the inherited distroless value) to every published image.
  2. Add an explicit Envoy commit / module version label on aether-proxy specifically — that is the fact that cannot be recovered any other way.
  3. Reconcile envoy_server_version against the new label once, and record in proxy/README.md what the gauge actually reports. If it is the driving workspace, say so plainly so nobody re-derives this.
  4. Check whether the amd64 config blob differs from arm64.

Why now

#830 established that the next Envoy pin bump will be non-trivial — upstream moved to bzlmod just after our snapshot, and a runtime guard changes filter-chain drain semantics with its default on. A bump of that shape is exactly when "which Envoy is actually running?" must be answerable from the artifact, not from a build log someone has to go and find.

Credit: the image-side analysis was done by the infra peer against the published index, read-only with an anonymous pull token.

Activity

  1. added
    bug
    on Sep 20, 2026
  2. bpalermo commented on Sep 20, 2026

    @bpalermo
    OwnerAuthor

    Answered definitively: envoy_server_version reports the aether commit, and always will

    Not inferred — established by asking the binary from the published image directly. //test/envoy_validate:envoy_bin is the Envoy extracted from the aether-proxy image at the digest the chart pins:

    envoy  version: cff8beb87eb685a44e00cf70c1a534695039da1b/1.40.0-dev/Clean/RELEASE/BoringSSL
    

    cff8beb87eb685a44e00cf70c1a534695039da1b is an aether commit — that image's own tag: in values.yaml. The Envoy component is a bare 1.40.0-dev carrying no Envoy sha at all.

    So the 0x2FA24A = 3121738 in the original report is not a mystery: it is aether commit 2fa24a8 ("test: drop duplicate integration targets … (#772) (#788)"), i.e. an older image than the current pin, not a build mismatch. The alarming third reading is eliminated.

    Mechanism, each step read from source:

    1. proxy/.bazelrc:179 → bazel/get_workspace_status → git rev-parse HEAD. proxy/ is a nested workspace inside the aether repo, so BUILD_SCM_REVISION is the aether commit; Envoy arrives as a bzlmod module and its git is never consulted.
    2. envoy_cc_binary defaults to stamp = 1 (@envoy//bazel/envoy_binary.bzl) — cc_binary's "stamp even under --nostamp". That is what explains a stamped sha appearing although no proxy build passes --stamp. Verified with a minimal cc_binary + linkstamp: --nostamp alone yields Bazel's redacted "0"; adding stamp = 1 yields the workspace-status value.
    3. @envoy//source/server/server.cc:606 — atoull(VersionInfo::revision().substr(0, 6), 16).

    The gauge can therefore never answer "which Envoy is this?", which is exactly why the labels are the fix rather than better interpretation of the gauge. This is now in proxy/README.md under "Which Envoy is this?" with the reproduce command.

    Labels, proved on built images

    Plain bazel build, no --stamp, all eight rules_img images: source = https://github.com/bpalermo/aether, revision = <aether commit>, and created still unset — zero timestamps preserved. Present both at index level and on each per-platform descriptor.

    aether-proxy additionally carries dev.aethermesh.envoy.module-version = 1.40.0-dev.20260904.13144fb.envoy, .revision = 13144fb, .bazel-registry = bed06c78…. The registry commit is included because that registry keeps one version directory per module and deletes the previous one, so the module version alone does not resolve — a lesson from #830.

    Determinism did not regress, and it was measured

    bazel shutdown (fresh workspace status, new BUILD_TIMESTAMP) then rebuild: 4,556 action cache hits, zero actions re-executed, byte-identical index digest. volatile-status.txt is constant-metadata to Bazel and invalidates nothing.

    STABLE_GIT_COMMIT is deliberately stable rather than volatile: a volatile key is excluded from the cache key, so a cached config blob would re-publish the previous commit's sha — the exact "confident wrong answer" failure this issue exists to fix. rules_img uses stamp = "force" rather than "auto"; "auto" would have baked the literal {{.STABLE_GIT_COMMIT}} into every non-stamped build.

    amd64 vs arm64 (item 4)

    Decoded both config blobs from the published index. Identical in every provenance respect — no labels, created = 1970-01-01T00:00:00Z, bazel bu… history, the same lone inherited org.opencontainers.image.source = …/distroless. The original arm64-only analysis was fully representative.

    Fixed in #845.

  3. added a commit that references this issue on Sep 20, 2026
  4. added a commit that references this issue on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions