fix(slot-13): single-quote SOVEREIGN_REGIONS_JSON to preserve JSON literal (D5) (#1551)
The substitute `${SOVEREIGN_REGIONS_JSON:-}` produces valid JSON like
`[{"cloudRegion":"hel1","controlPlaneSize":"cpx52",...}]`. Unquoted in
the slot-13 YAML, the YAML parser interprets it as a flow-sequence
of flow-mappings, parsing into Go `[]map[string]interface{}`. Helm
chart template `{{ .Values.sovereign.regionsJson }}` then stringifies
via `%v` printf, producing Go map syntax:
[map[cloudRegion:hel1 controlPlaneSize:cpx52 ...]]
The chroot catalyst-api's `chrootRegionsFromEnv` calls
json.Unmarshal which fails → Request.Regions stays empty → topology
loader falls back to live-Nodes path → /cloud renders "1 region 1
cluster" on every multi-region Sovereign.
Caught on t131 (623354058b114dd6, 2026-05-16) — DoD D5.
Fix: single-quote the substitute so YAML treats it as a string literal,
preserving the JSON byte-for-byte.
Co-authored-by: hatiyildiz <hatice.yildiz@openova.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7e87a4d7b9
commit
f88e60726c
@ -623,7 +623,17 @@ spec:
|
||||
# live-Nodes path and emitted "1 cluster 1 region" on every
|
||||
# multi-region Sovereign (caught on t126, 2026-05-16).
|
||||
sovereign:
|
||||
regionsJson: ${SOVEREIGN_REGIONS_JSON:-}
|
||||
# MUST be quoted: SOVEREIGN_REGIONS_JSON contains valid JSON like
|
||||
# `[{"cloudRegion":"hel1",...}]`. Without quotes, YAML interprets
|
||||
# the JSON as a YAML flow-sequence-of-flow-mappings, parses into
|
||||
# `[]map[string]interface{}`, then Helm's chart template `{{ .Values.
|
||||
# sovereign.regionsJson }}` stringifies via Go's `%v` printf —
|
||||
# producing `[map[cloudRegion:hel1 ...]]` (Go map syntax, NOT JSON).
|
||||
# The chroot's chrootRegionsFromEnv then can't json.Unmarshal it →
|
||||
# falls back to live-Nodes path → /cloud renders "1 region 1 cluster"
|
||||
# on every multi-region Sovereign. Caught on t131 2026-05-16.
|
||||
# Single-quoted so embedded double-quotes in the JSON are literal.
|
||||
regionsJson: '${SOVEREIGN_REGIONS_JSON:-}'
|
||||
# ─── QA fixtures (qa-loop iter-6 Cluster-F + EPIC-6 iter-6) ────────
|
||||
# Default-OFF on production; flipped to true via envsubst
|
||||
# QA_FIXTURES_ENABLED=true on the per-Sovereign overlay for any
|
||||
|
||||
Loading…
Reference in New Issue
Block a user