Uh oh!
There was an error while loading. Please reload this page.
fix(chart): the ingestor tag fallback is per-environment, not always prod's - #694
Conversation
…prod's tracebloc.ingestorTag's last-resort literal was a bare "0.8" for every environment. On the `--reuse-values` replay it exists for — a release predating `channelTags`, where no chart default is adopted — a dev or staging edge therefore spawned the PROD ingestor line. That inverts backend#1360: dev/stg channels exist so an ingestor change can be validated on a real edge without a prod release, and an edge silently validating prod's image reports on the wrong artifact. The literal is also no longer merely wrong. The prod float has moved past the ordering ceiling documented at values.yaml `prodDigest`: the 0.8 line no longer carries the ingestor's `edgeuser` DB_USER default that data-ingestors#468 removed (backend#1853). serviceDbAccountsByEnv supplies DB_USER on dev/stg so those two survive it, but that coupling is accidental, and the same literal is where an out-of-vocabulary CLIENT_ENV lands — there serviceDbAccountsByEnv misses too and nothing supplies DB_USER. That is backend#1752 reconstructed from a typo. Keyed on the RESOLVED environment, so the documented aliases reach it too. Also documents the duplication in both directions: the prod literal is a second copy of values.yaml `channelTags.prod` and cannot read the first (a values lookup is nil on exactly the releases this branch serves), so each now points at the other and the suite pins both. An existing case asserted `0.8` for a DEV edge with channelTags absent — the bug written down as an expectation. Replaced by four cases plus a prod control, so "dev falls back to dev" cannot pass by echoing the environment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
saadqbal
left a comment
There was a problem hiding this comment.
Clean fix. Fallback is now keyed on the resolved env via get $fallbacks $clientEnv | default "0.8", so dev→dev, stg→stg, prod→0.8, and an out-of-vocab env still lands on 0.8 (no empty render). Runs through tracebloc.clientEnv so aliases normalize before the key lookup, and the whole path stays nil-guarded for the --reuse-values replay (channelTags absent) this exists for. The prod-control + values-vs-literal pin tests are the right guards against "echo the env" and silent drift. prod unchanged (still digest-pinned). Chart bumped 1.9.34→1.9.35. helm-unittest green locally (17/17). 👍
…tag-fallback-env-aware # Conflicts: # client/Chart.yaml
saadqbal
left a comment
There was a problem hiding this comment.
Re-reviewed at the merge head — the develop merge is clean. Chart.yaml conflict correctly resolved to 1.9.38 (one above develop's 1.9.37), and the helper + test auto-merged coherently with #695's vocabulary close. Per-env fallback and the values-vs-literal drift guard intact, full helm-unittest 394/394 green. 👍
Uh oh!
There was an error while loading. Please reload this page.
Summary
tracebloc.ingestorTag's last-resort literal was a bare"0.8"for everyenvironment. On the
--reuse-valuesreplay it exists for — a release predatingchannelTags, where no chart default is adopted — a dev or staging edgespawned the PROD ingestor line.
That inverts the whole point of backend#1360: dev/stg channels exist so an
ingestor change can be validated on a real edge without a prod release. An
edge silently validating prod's image reports on the wrong artifact.
It is no longer merely a wrong tag. The prod float has moved past the
ordering ceiling documented at
values.yamlprodDigest: the 0.8 line nolonger carries the ingestor's
edgeuserDB_USERdefault thatdata-ingestors#468 removed (backend#1853).
serviceDbAccountsByEnvsuppliesDB_USERon dev/stg, so those two survive it — but the coupling is accidental,and the same literal is where an out-of-vocabulary
CLIENT_ENVlands, whereserviceDbAccountsByEnvmisses too and nothing suppliesDB_USER. That isbackend#1752 reconstructed from a typo.
Fallback is now keyed on the resolved environment (
dev→dev,stg→stg,prod→0.8), so the documented aliases reach it too.Verified on the real chart — input reaching output, with a control
Rendered against
client/ci/bm-values.yaml,helm v4.1.1.Before (
origin/develop@ead58c6) —channelTags: null, i.e. the replaythis branch serves:
Control proving the opposite input differs (same command,
channelTagspresent):After (this branch):
The duplication is now documented in both directions
The
prodliteral is a second copy ofvalues.yamlchannelTags.prodandcannot read the first:
--reuse-values(unlike--reset-then-reuse-values)does not adopt new chart defaults, so a values lookup is nil on exactly the
releases this branch serves. So each copy now points at the other, and the suite
pins both — a bump that touches only one fails CI instead of drifting.
Tests
An existing case asserted
0.8for a dev edge withchannelTagsabsent —the bug written down as an expectation. Replaced by four cases plus a prod
control, so "dev falls back to dev" cannot pass by merely echoing the
environment.
make check(lint + drift guards + helm lint, all 4 platform value files):make helm-template— all four platforms render:make helm-unittest:Mutation-checked — the new cases actually catch the bug rather than
describing it:
scripts/gen-manifest.sh --checkpasses unchanged: the manifest coversscripts/**only, and this PR touches no file it hashes.Type
Notes for the reviewer
edges whose
channelTagsare absent change, and they change from "prod'simage" to "their own channel", which is what the schema already promises.
values.yaml+templates/**arechart content per
scripts/chart-version-guard.sh).CLIENT_ENV/channelTagsvocabulary that lets anedge reach this fallback by typo in the first place. That one is breaking and
is flagged for your decision; this one is independent and safe on its own.
Note
Medium Risk
Changes which ingestor image tag dev/stg edges use when
channelTagsis absent; prod behavior is unchanged but ingestion spawn paths are operationally sensitive.Overview
tracebloc.ingestorTagno longer uses a single last-resort"0.8"whenimages.ingestor.channelTagsis missing (typical--reuse-valuesupgrades). It now maps resolvedCLIENT_ENVtodev→dev,stg→stg,prod→0.8, with unknown envs still defaulting to0.8.That stops dev/staging from spawning the prod ingestor line when channel tags were never stored—restoring backend#1360’s intent and avoiding accidental prod-image validation on non-prod edges (including DB_USER coupling with the 0.8 line).
Docs and tests:
_helpers.tplandvalues.yamldocument the duplicatedprodliteral vschannelTags.prod;ingestor_channel_tag_test.yamlreplaces the old “dev gets 0.8” expectation with per-env fallback, prod control, alias, and sync checks. Chart version 1.9.37 → 1.9.38.Reviewed by Cursor Bugbot for commit 59d26e0. Bugbot is set up for automated code reviews on this repo. Configure here.