Skip to content

Commit 6ced521

Browse files
Mike Stankavichclaude
andcommitted
chore(tra-974): drop dead BACKEND_LOG_LEVEL key from backend chart
The trakrf-backend logger reads bare LOG_LEVEL via os.Getenv (logger/config.go) — there is no BACKEND_ prefix scheme, so the chart's config.logLevel → BACKEND_LOG_LEVEL ConfigMap key was never read by the backend (confirmed against the backend source). PR #157 added the real LOG_LEVEL emission (config.runtimeLogLevel); this removes the misleading dead key and its now-orphaned config.logLevel value so the chart is honest. No functional change — BACKEND_LOG_LEVEL was inert. Removing it does change both envs' rendered ConfigMap (key drops out), so the next apply-root-app.sh gke rolls the prod backend pod once (clean restart, no behavior change); preview keeps LOG_LEVEL=info via config.runtimeLogLevel. Verified via helm template: BACKEND_LOG_LEVEL absent from all renders; LOG_LEVEL=info still emits when runtimeLogLevel is set; chart renders clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2f1e000 commit 6ced521

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

helm/trakrf-backend/templates/configmap.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ metadata:
77
data:
88
APP_ENV: {{ .Values.config.appEnv | quote }}
99
ENVIRONMENT_LABEL: {{ .Values.config.environmentLabel | quote }}
10-
BACKEND_LOG_LEVEL: {{ .Values.config.logLevel | quote }}
1110
{{- with .Values.config.runtimeLogLevel }}
12-
# LOG_LEVEL is the runtime level the Go backend logger reads (logger/config.go);
13-
# BACKEND_LOG_LEVEL above is legacy and unread by the current backend. Emitted
14-
# only when set, so envs that omit it (prod) keep their APP_ENV→warn default and
15-
# render no LOG_LEVEL key. Set per-env via the root app (preview→info). TRA-974.
11+
# LOG_LEVEL is the runtime level the Go backend logger reads (logger/config.go).
12+
# Emitted only when set, so envs that omit it (prod) keep their APP_ENV→warn
13+
# default and render no LOG_LEVEL key. Set per-env via the root app (preview→info).
1614
LOG_LEVEL: {{ . | quote }}
1715
{{- end }}
1816
SERVICE_NAME: {{ .Values.config.serviceName | quote }}

helm/trakrf-backend/values.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,10 @@ mqtt:
139139
# Non-secret config (ConfigMap)
140140
config:
141141
appEnv: production
142-
logLevel: info
143142
# runtimeLogLevel → the LOG_LEVEL env the Go backend logger actually reads
144-
# (logger/config.go). Empty = inherit the backend's APP_ENV-based default
145-
# (production→warn, dev/preview→debug). Set per-env (preview→info) to pin a
146-
# level. NOTE: logLevel above feeds the legacy BACKEND_LOG_LEVEL key, which the
147-
# current backend does NOT read — dead-key cleanup tracked in TRA-974.
143+
# (logger/config.go, bare os.Getenv — no BACKEND_ prefix scheme). Empty =
144+
# inherit the backend's APP_ENV-based default (production→warn, dev/preview→
145+
# debug). Set per-env (preview→info) to pin a level.
148146
runtimeLogLevel: ""
149147
serviceName: trakrf-backend
150148
corsOrigin: ""

0 commit comments

Comments
 (0)