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:
637 exit 1637 exit 1
638 ;;638 ;;
639 esac639 esac
640- # OPERATOR SIRLARI KONTEYNERDE MI -- bu iddia olmadan iki dosyali640+ # ARE THE OPERATOR SECRETS IN THE CONTAINER? Without this claim the
641- # `--env-file` sinifi sessizce geri gelebilir: stack compose641+ # two-file `--env-file` class can silently come back: the stack comes
642- # varsayilanlariyla ayaga kalkar ve hicbir sey kirmizi olmaz. En642+ # up on the compose defaults and nothing turns red. The strongest
643- # guclu hal: konteynerin ortamindaki DEGER, operator dosyasindaki643+ # form: the VALUE in the container's environment must equal the VALUE
644- # DEGERLE birebir ayni olmali. Deger YAZDIRILMAZ.644+ # in the operator file byte for byte. No value is ever printed.
645+ container=hezarfen_backend
645 container_env=$(podman inspect -f '{{range .Config.Env}}{{println .}}{{end}}' "$container")646 container_env=$(podman inspect -f '{{range .Config.Env}}{{println .}}{{end}}' "$container")
646 for cift in "AI_SHARED_TOKEN=$AI_SHARED_TOKEN" "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" "AI_QUIC_ADDR=$AI_QUIC_ADDR" "BUILDER_USERNAME=$BUILDER_USERNAME"; do647 for cift in "AI_SHARED_TOKEN=$AI_SHARED_TOKEN" "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" "AI_QUIC_ADDR=$AI_QUIC_ADDR" "BUILDER_USERNAME=$BUILDER_USERNAME"; do
647 ad=${cift%%=*}648 ad=${cift%%=*}
648 case "$container_env" in649 case "$container_env" in
649 *"$cift"*) ;;650 *"$cift"*) ;;
650 *)651 *)
651- echo "container env: $ad operator dosyasindaki degeri TASIMIYOR -- operator env compose'a ulasmamis; rolling back" >&2652+ echo "container env: $ad does not carry the operator value -- the operator env never reached compose; rolling back" >&2
652 rollback653 rollback
653 exit 1654 exit 1
654 ;;655 ;;
655 esac656 esac
656 done657 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)'
658 echo 'hezarfen_backend_compose is up'659 echo 'hezarfen_backend_compose is up'
659 REMOTE660 REMOTE
660 661