From 0ea8bf3280e18a0ee59e9f59fcd049dfda3f77d0 Mon Sep 17 00:00:00 2001 From: Weston Clark Date: Wed, 28 Oct 2026 13:41:22 -0400 Subject: [PATCH] fix: stop the dev deploy reporting failure after a healthy deploy The dev deploy fed its script to `ssh ec2-deploy` with no command, so it ran in a login shell. On exit a login shell runs ~/.bash_logout, whose clear_console fails without a tty, and under `set -e` that turned the script's `exit 0` into exit 1 even though backend-dev was healthy. Run the script with `bash -s` instead (this also drops the MOTD from the log), and stop printing the expected connection-refused while uvicorn starts. Co-Authored-By: Claude Opus 5.5 --- .github/actions/deploy-dev-to-ec2/action.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/actions/deploy-dev-to-ec2/action.yml b/.github/actions/deploy-dev-to-ec2/action.yml index f23f2b8..0023cdc 100644 --- a/.github/actions/deploy-dev-to-ec2/action.yml +++ b/.github/actions/deploy-dev-to-ec2/action.yml @@ -94,7 +94,9 @@ runs: - name: Deploy dev slot shell: bash run: | - ssh ec2-deploy << 'DEPLOY_EOF' + # Run the script with a plain `bash -s`, not a login shell: a login shell runs + # ~/.bash_logout on exit, and under `set -e` its clear_console (no tty) turns `exit 0` into 1 + ssh ec2-deploy bash -s << 'DEPLOY_EOF' set -euo pipefail DEV_DIR="${{ inputs.dev_dir }}" @@ -170,7 +172,8 @@ runs: echo "Waiting for backend-dev..." for i in $(seq 1 20); do - if curl -fsS http://127.0.0.1:8081/health > /dev/null; then + # Quiet: connection refused is expected while uvicorn starts + if curl -fs http://127.0.0.1:8081/health > /dev/null; then echo "✅ Dev deployment completed: backend-dev healthy" exit 0 fi