Skip to content

feat(pins): one pin file, versions.env, read everywhere - #280

Merged
jbouder merged 2 commits into
mainfrom
journeys/s2-pins
Nov 30, 2026
Merged

jbouder merged 2 commits into
mainfrom
journeys/s2-pins

Conversation

@dcmcand

@dcmcand dcmcand commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Slice 2: One pin file

Every pinned dependency version is read from versions.env: dev/Makefile, the published examples, the chart's collector and OpenMeter API images, and CI. A stale generated file fails the existing Check default images check.

Design: CI that enforces the features we offer (integration and user journey tiers), phase 1. The spec and plan are kept locally; this PR is Slice 2 of 13.
Contracts touched: versions.env file format (new); dev/Makefile version variables; pinned fields in examples/*.yaml; chart value usage.collector.image (and the subchart's openmeter.image); render-pins CLI and exit code (new); CI wiring (phase 1 parts only). Documented in docs/architecture/contracts.md, with the six promoted dev patterns in patterns.md.
Depends on: #275 (stacked: this PR's base is #275's branch; it uses scripts/check-render-determinism.sh and the docs test #275 adds). Merge #275 first.

What changes

  • versions.env at the repo root: cert-manager, Gateway API, GIE (corrected from v1.4.0 to v1.5.0, the version the docs and operator already use), Envoy Gateway, AI Gateway, the usage collector and OpenMeter images, CloudNativePG chart and image.
  • operator/cmd/render-pins: renders examples/envoy-ai-gateway.yaml and examples/envoy-gateway.yaml from text/template sources (each published file gains a "Generated from ..., do not edit" header and is otherwise byte-identical), and writes usage.collector.image and the subchart's openmeter.image. --check exits 1 listing stale files; usage errors exit 2. A missing key is an error, never an empty string.
  • dev/Makefile includes ../versions.env; make setup GIE_VERSION=... still overrides; make render-pins rewrites the generated files.
  • CI: Check default images also runs render-pins --check; the AI Gateway CRD render step and scripts/check-render-determinism.sh read AI_GATEWAY_VERSION from versions.env; the docs workflow runs when versions.env changes. Job names are unchanged.
  • The docs test compares the example's AI Gateway version with the pin file (and still checks the example and the installation guide agree).
  • The OpenMeter values comment no longer states a version, and its README points at versions.env and render-pins.

Validation

CI does not run on a PR whose base is not main, so these were run locally; CI runs once #275 merges and this PR retargets.

Step Command Result
unit cd operator && go test ./cmd/render-pins/... ok (table-driven, including exit codes 0/1/2)
fresh go run ./cmd/render-pins --root .. --check exit 0
stale bump AI_GATEWAY_VERSION, USAGE_COLLECTOR_IMAGE or OPENMETER_IMAGE, then --check exit 1 naming the example, the chart values, or the subchart values; reverted
idempotent write twice, then --check 0, no change
make make -C dev -n setup / ... GIE_VERSION=v9.9.9 GIE v1.5.0 / override used
one pin, one edit change one pin, run render-pins the example and make -n setup both show it, nothing else edited
CI equivalents the edited CRD render step verbatim; go run ./cmd/check-default-images; scripts/check-render-determinism.sh; cd docs && npx vitest run; cd operator && make test v1.1.0 and 6 CRDs; ok; PASS; 52/52; ok

@dcmcand
dcmcand added this pull request to stack #281 November 26, 2026 13:31
@github-actions

Copy link
Copy Markdown

📄 Docs preview for journeys/s2-pins:
https://journeys-s2-pins.llm-serving-pack.pages.dev

@dcmcand

dcmcand commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@jbouder could you review this one? It needs a code-owner approval. It is stacked on #275 (its base is #275's branch), so it merges after #275 and CI runs on it once it retargets to main; the PR body has the same checks run locally.

It adds versions.env at the repo root as the one place for dependency pins, plus operator/cmd/render-pins, which renders the two published AI Gateway / Envoy Gateway examples and the chart's collector and OpenMeter image fields from it; Check default images now fails if any of those files is stale. The code to read is operator/cmd/render-pins/ (pins.go, main.go and their tests); the rest is consumers switching to the pin file (dev/Makefile, test.yaml, docs.yml, the render-determinism script, the docs test) and the architecture docs.

@jbouder jbouder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change. CI's Lint operator job also fails on cmd/render-pins (errcheck and line length).

Comment thread operator/cmd/render-pins/pins.go Resolved
Base automatically changed from fix/84-aigw-webhook-cert-manager to main November 30, 2026 08:55
Add versions.env at the repo root, the single place for the
dependency pins: cert-manager, Gateway API, GIE (corrected to
v1.5.0), Envoy Gateway, AI Gateway, the usage collector and
OpenMeter images, and CloudNativePG.

- operator/cmd/render-pins renders examples/envoy-ai-gateway
  .yaml and envoy-gateway.yaml from text/template sources and
  writes the collector and OpenMeter image fields in the
  chart values; --check fails on a stale file
- dev/Makefile includes versions.env (command-line overrides
  still win) and gains a render-pins target
- CI: Check default images runs render-pins --check; the AI
  Gateway CRD render step and the render-determinism script
  read AI_GATEWAY_VERSION from versions.env; docs builds run
  when versions.env changes
- the docs test compares the example with the pin file

Contracts and the promoted dev patterns are documented in
docs/architecture/.
…s.env

ParsePins let `KEY=` through, so render-pins wrote an empty
targetRevision into the example and --check still passed. It also
accepted a value with a space inside it or an inline "# comment",
which a shell `source` of the same file would read differently.
Reject all three with the line number.

Also clear the errcheck and lll findings golangci-lint reports on
cmd/render-pins.
@dcmcand
dcmcand requested a review from jbouder November 30, 2026 09:23

@jbouder jbouder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. The earlier comments are fixed.

@CAM-Gerlach

Copy link
Copy Markdown

Hey, so it looks like this is approved, #275 is merged and this PR rebased on main. While this does (still) pin the Envoy, etc. versions that are vulnerable to eMudhra, merging this will allow me to cleanly make an immediate followup PR as part of #272 adding an EnvoyProxy override with the patched proxy. Thanks!

@jbouder
jbouder merged commit 46acd59 into main Nov 30, 2026
23 checks passed
@jbouder
jbouder deleted the journeys/s2-pins branch November 30, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants