From c2ac4f8f9d7c0cc46804ae8845330cc80c0a053e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 18 Sep 2026 01:05:49 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(deploy):=20the=20operator-se?= =?UTF-8?q?cret=20assertion=20named=20an=20unbound=20variable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The post-up env assertion aborted the deploy script with 'container: unbound variable' AFTER the new stack was already healthy, so every deploy reported failure while the correct build stayed live. Bind the container name before the inspect, and translate the block's comments (this repo is English-only). Local-Gate: 6992a743739affc85cebb7777608ffc3eb73a386 (1469 passed, 542s) --- .github/workflows/main.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 950db1a..2ed2af4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -637,24 +637,25 @@ jobs: exit 1 ;; esac - # OPERATOR SIRLARI KONTEYNERDE MI -- bu iddia olmadan iki dosyali - # `--env-file` sinifi sessizce geri gelebilir: stack compose - # varsayilanlariyla ayaga kalkar ve hicbir sey kirmizi olmaz. En - # guclu hal: konteynerin ortamindaki DEGER, operator dosyasindaki - # DEGERLE birebir ayni olmali. Deger YAZDIRILMAZ. + # ARE THE OPERATOR SECRETS IN THE CONTAINER? Without this claim the + # two-file `--env-file` class can silently come back: the stack comes + # up on the compose defaults and nothing turns red. The strongest + # form: the VALUE in the container's environment must equal the VALUE + # in the operator file byte for byte. No value is ever printed. + container=hezarfen_backend container_env=$(podman inspect -f '{{range .Config.Env}}{{println .}}{{end}}' "$container") for cift in "AI_SHARED_TOKEN=$AI_SHARED_TOKEN" "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" "AI_QUIC_ADDR=$AI_QUIC_ADDR" "BUILDER_USERNAME=$BUILDER_USERNAME"; do ad=${cift%%=*} case "$container_env" in *"$cift"*) ;; *) - echo "container env: $ad operator dosyasindaki degeri TASIMIYOR -- operator env compose'a ulasmamis; rolling back" >&2 + echo "container env: $ad does not carry the operator value -- the operator env never reached compose; rolling back" >&2 rollback exit 1 ;; esac done - echo 'ok: operator sirlari konteynerde (AI_SHARED_TOKEN / POSTGRES_PASSWORD / AI_QUIC_ADDR / BUILDER_USERNAME birebir)' + echo 'ok: the operator secrets are in the container (AI_SHARED_TOKEN / POSTGRES_PASSWORD / AI_QUIC_ADDR / BUILDER_USERNAME byte for byte)' echo 'hezarfen_backend_compose is up' REMOTE