Skip to content

chart: a deployed mesh does not say which external-harness contract version it satisfies #1544

Closed

Description

@bpalermo

The contract an external test harness reads (#1535: metric names and labels, the prober's log-line format, workload object names) carries a version in the repository, but nothing on a running installation states it. A harness can only infer it from the chart version in the helm.sh/chart label of the agent DaemonSet, which is an approximation: it needs a hand-maintained "first chart version that satisfies contract N" floor, and that floor is derived from git history.

Proposal: render the contract version as a label or annotation on a chart-owned object (the agent DaemonSet is the natural place), from the same file the contract test reads, with a template test that fails when the two differ.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Activity

  1. added
    enhancement
    minor
    chart
    on Oct 9, 2026
  2. bpalermo commented on Oct 9, 2026

    @bpalermo
    OwnerAuthor

    Tried in #1595 and left out of it. What was found, so the next attempt starts from it:

    Blocker. The chart cannot read the contract at package time without one line in test/harnesscontract/BUILD.bazel. //test/harnesscontract:external-harness.yaml is a source file that is not exported, so a genrule in //charts/aether fails analysis ("is not visible from target //charts/aether:harness_contract_version"). The Go library that embeds the file is public but testonly, and the published helm_chart targets (:aether, :aether_commit) are not, so a tool built on it cannot feed them either. #1566 (open) does not export the file. The line that unblocks it:

    exports_files(["external-harness.yaml"], visibility = ["//charts/aether:__pkg__"])

    The design that worked up to that point (rendered and tested locally with the visibility error as the only failure):

    • An annotation, aether.io/harness-contract-version, on the agent DaemonSet's own metadata. Not a label: nothing selects by contract version, an "at least N" question is not a label selector anyway, and an annotation can never end up in a selector. Not on a pod template: a contract bump must replace no pod.
    • The value comes from the file, not from a literal: a genrule in charts/aether/BUILD.bazel extracts the top-level version: into files/harness-contract-version (it fails the build unless there is exactly one such line holding a positive integer), both packagings pass it in files, and a helper reads it with .Files.Get. A contract bump then needs no edit under charts/.
    • The annotation has to be optional in the template. The conformance jobs (.github/actions/run-conformance) and one step of ci.yaml render charts/aether from the source tree, where a generated file does not exist. So: rendered by every packaged chart, absent from a source-tree render, and a render failure only when the file is there and is not a positive integer.
    • The consistency test: a Go test in charts/aether that renders both packagings and compares the annotation with harnesscontract.MustLoad(t).Version (a second, independent read of the contract), and asserts that no other object, no label and no pod template carries the key. //bazel/helm/rendertest, added by fix(chart): the node proxy's Envoy stats name their service, and the prober and udsecho charts' mesh names are held to the Go constants (#1561, #1589, #1582, #1588) #1595, is the helper for it.

    Two things to decide with it: the annotation key is itself something a harness reads, so it belongs in the contract as an entry (an addition, no version bump); and a contract bump would then change what the chart renders without a Chart.yaml bump, which is the intent here but is new for the bare <X.Y.Z> tag (#1588).

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

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

    chartenhancementminor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions