Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hosting/railway/oss/scripts/deploy-from-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ redeploy_service_if_exists() {
local service="$1"

if railway_call service "$service" >/dev/null 2>&1; then
railway_call redeploy --service "$service" --environment "$ENV_NAME" --yes >/dev/null
railway_call redeploy --yes >/dev/null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore explicit Railway service on redeploy

When the preview workflow runs deploy-from-images.sh, this helper is redeploying the requested infra service before Alembic, but a bare railway redeploy targets whatever service the CLI currently has linked; Railway’s redeploy reference says --service defaults to the linked service (https://docs.railway.com/cli/redeploy). This reintroduces the observed preview failure from #4725 where the linked service was gateway and the job failed with No deployment found for service before migrations/app deployment; the same bare-redeploy pattern is also restored in deploy-services.sh and smoke.sh.

Useful? React with 👍 / 👎.

fi
}

Expand Down
2 changes: 1 addition & 1 deletion hosting/railway/oss/scripts/deploy-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fi
railway link --project "$PROJECT_NAME" --environment "$ENV_NAME" --json >/dev/null

# Bring stateful infra up first so credentials/volumes are applied.
railway service "$POSTGRES_SERVICE" >/dev/null && railway redeploy --service "$POSTGRES_SERVICE" --environment "$ENV_NAME" --yes
railway service "$POSTGRES_SERVICE" >/dev/null && railway redeploy --yes
if railway service "$REDIS_SERVICE" >/dev/null 2>&1; then
railway up hosting/railway/oss/redis --path-as-root --service "$REDIS_SERVICE" --detach
fi
Expand Down
12 changes: 6 additions & 6 deletions hosting/railway/oss/scripts/smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ repair_path() {

case "$path" in
"/w")
railway service web >/dev/null && railway redeploy --service web --environment "$ENV_NAME" --yes >/dev/null
railway service gateway >/dev/null && railway redeploy --service gateway --environment "$ENV_NAME" --yes >/dev/null
railway service web >/dev/null && railway redeploy --yes >/dev/null
railway service gateway >/dev/null && railway redeploy --yes >/dev/null
;;
"/api/health")
railway service api >/dev/null && railway redeploy --service api --environment "$ENV_NAME" --yes >/dev/null
railway service gateway >/dev/null && railway redeploy --service gateway --environment "$ENV_NAME" --yes >/dev/null
railway service api >/dev/null && railway redeploy --yes >/dev/null
railway service gateway >/dev/null && railway redeploy --yes >/dev/null
;;
"/services/health")
railway service services >/dev/null && railway redeploy --service services --environment "$ENV_NAME" --yes >/dev/null
railway service gateway >/dev/null && railway redeploy --service gateway --environment "$ENV_NAME" --yes >/dev/null
railway service services >/dev/null && railway redeploy --yes >/dev/null
railway service gateway >/dev/null && railway redeploy --yes >/dev/null
;;
*)
return 1
Expand Down
Loading