Repository navigation
feat(pins): one pin file, versions.env, read everywhere - #280
Conversation
|
📄 Docs preview for |
|
@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 |
jbouder
left a comment
There was a problem hiding this comment.
One change. CI's Lint operator job also fails on cmd/render-pins (errcheck and line length).
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/.
1ad95cf to
3c0cb84
Compare
…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.
jbouder
left a comment
There was a problem hiding this comment.
Approved. The earlier comments are fixed.
|
Hey, so it looks like this is approved, #275 is merged and this PR rebased on |
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 existingCheck default imagescheck.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.envfile format (new);dev/Makefileversion variables; pinned fields inexamples/*.yaml; chart valueusage.collector.image(and the subchart'sopenmeter.image);render-pinsCLI and exit code (new); CI wiring (phase 1 parts only). Documented indocs/architecture/contracts.md, with the six promoted dev patterns inpatterns.md.Depends on: #275 (stacked: this PR's base is #275's branch; it uses
scripts/check-render-determinism.shand the docs test #275 adds). Merge #275 first.What changes
versions.envat 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: rendersexamples/envoy-ai-gateway.yamlandexamples/envoy-gateway.yamlfromtext/templatesources (each published file gains a "Generated from ..., do not edit" header and is otherwise byte-identical), and writesusage.collector.imageand the subchart'sopenmeter.image.--checkexits 1 listing stale files; usage errors exit 2. A missing key is an error, never an empty string.dev/Makefileincludes../versions.env;make setup GIE_VERSION=...still overrides;make render-pinsrewrites the generated files.Check default imagesalso runsrender-pins --check; the AI Gateway CRD render step andscripts/check-render-determinism.shreadAI_GATEWAY_VERSIONfromversions.env; the docs workflow runs whenversions.envchanges. Job names are unchanged.versions.envandrender-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.cd operator && go test ./cmd/render-pins/...go run ./cmd/render-pins --root .. --checkAI_GATEWAY_VERSION,USAGE_COLLECTOR_IMAGEorOPENMETER_IMAGE, then--check--checkmake -C dev -n setup/... GIE_VERSION=v9.9.9render-pinsmake -n setupboth show it, nothing else editedgo run ./cmd/check-default-images;scripts/check-render-determinism.sh;cd docs && npx vitest run;cd operator && make test