forge
Explore
Log in

Don't you dare go Hollow

The operator-secret assertion named an unbound variable

Browse files at this commit

c2ac4f8f9d7c0cc46804ae8845330cc80c0a053eAhmet Kaan GümüşParent: 125a9b4
  • fix
    • the operator-secret assertion named an unbound variable
Show full message
🐛 fix(deploy): the operator-secret assertion named an unbound variable

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.ymlmodified+8 -7
@@ -637,24 +637,25 @@ jobs:
637637 exit 1
638638 ;;
639639 esac
640- # OPERATOR SIRLARI KONTEYNERDE MI -- bu iddia olmadan iki dosyali
641- # `--env-file` sinifi sessizce geri gelebilir: stack compose
642- # varsayilanlariyla ayaga kalkar ve hicbir sey kirmizi olmaz. En
643- # guclu hal: konteynerin ortamindaki DEGER, operator dosyasindaki
644- # DEGERLE birebir ayni olmali. Deger YAZDIRILMAZ.
640+ # ARE THE OPERATOR SECRETS IN THE CONTAINER? Without this claim the
641+ # two-file `--env-file` class can silently come back: the stack comes
642+ # up on the compose defaults and nothing turns red. The strongest
643+ # form: the VALUE in the container's environment must equal the VALUE
644+ # in the operator file byte for byte. No value is ever printed.
645+ container=hezarfen_backend
645646 container_env=$(podman inspect -f '{{range .Config.Env}}{{println .}}{{end}}' "$container")
646647 for cift in "AI_SHARED_TOKEN=$AI_SHARED_TOKEN" "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" "AI_QUIC_ADDR=$AI_QUIC_ADDR" "BUILDER_USERNAME=$BUILDER_USERNAME"; do
647648 ad=${cift%%=*}
648649 case "$container_env" in
649650 *"$cift"*) ;;
650651 *)
651- echo "container env: $ad operator dosyasindaki degeri TASIMIYOR -- operator env compose'a ulasmamis; rolling back" >&2
652+ echo "container env: $ad does not carry the operator value -- the operator env never reached compose; rolling back" >&2
652653 rollback
653654 exit 1
654655 ;;
655656 esac
656657 done
657- echo 'ok: operator sirlari konteynerde (AI_SHARED_TOKEN / POSTGRES_PASSWORD / AI_QUIC_ADDR / BUILDER_USERNAME birebir)'
658+ echo 'ok: the operator secrets are in the container (AI_SHARED_TOKEN / POSTGRES_PASSWORD / AI_QUIC_ADDR / BUILDER_USERNAME byte for byte)'
658659 echo 'hezarfen_backend_compose is up'
659660 REMOTE
660661