Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

ci(deploy): deploy ai-gateway with every prod push and remove the temporary ECS service check (#19475)

Hassieb Pakzad5cb204754430
diff --git a/.github/workflows/_deploy_ecs_service.yml b/.github/workflows/_deploy_ecs_service.yml
index 5185fe517c..d44e510c46 100644
--- a/.github/workflows/_deploy_ecs_service.yml
+++ b/.github/workflows/_deploy_ecs_service.yml
@@ -123,46 +123,14 @@ jobs:
--build-arg NEXT_PUBLIC_ASSET_PREFIX=${VARS_NEXT_PUBLIC_ASSET_PREFIX} \
.
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
- # Temporary until the prod ai-gateway ECS services are bootstrapped by infra
- # from an image pushed above: a missing ai-gateway service skips the rollout
- # instead of failing the deploy. Other services always roll out and fail
- # loudly when their service is missing.
- - name: Check AWS ECS Service exists
- id: ecs-service
- if: ${{ inputs.service == 'ai-gateway' }}
- env:
- CLUSTER: ${{ inputs.environment }}-cluster
- SERVICE: ${{ inputs.environment }}-${{ inputs.service }}
- IMAGE_TAG: ${{ github.sha }}
- run: |
- status="$(aws ecs describe-services \
- --cluster "$CLUSTER" \
- --services "$SERVICE" \
- --query 'services[0].status' \
- --output text)"
- if [ "$status" = "ACTIVE" ]; then
- echo "exists=true" >> "$GITHUB_OUTPUT"
- exit 0
- fi
- if [ "$status" != "None" ] && [ "$status" != "INACTIVE" ]; then
- echo "::error::ECS service $SERVICE in cluster $CLUSTER has unexpected status $status."
- exit 1
- fi
- echo "exists=false" >> "$GITHUB_OUTPUT"
- message="ECS service $SERVICE in cluster $CLUSTER does not exist (status: $status). Pushed image tag $IMAGE_TAG and skipped the ECS rollout."
- echo "::notice title=ECS rollout skipped::$message"
- echo "### ECS rollout skipped" >> "$GITHUB_STEP_SUMMARY"
- echo "$message" >> "$GITHUB_STEP_SUMMARY"
- name: Render AWS ECS Task Definition
id: render-task-definition
- if: ${{ inputs.service != 'ai-gateway' || steps.ecs-service.outputs.exists == 'true' }}
uses: aws-actions/amazon-ecs-render-task-definition@138c24f321fdbdf7edee4a685519d253cae2cdea # v1.9.0
with:
container-name: ${{ inputs.service }}
image: ${{ steps.login-ecr.outputs.registry }}/${{ inputs.service == 'ai-gateway' && 'ai-gateway' || steps.split.outputs._0 }}:${{ github.sha }}
task-definition-family: ${{ inputs.environment }}-${{ inputs.service }}
- name: Update AWS ECS Service
- if: ${{ inputs.service != 'ai-gateway' || steps.ecs-service.outputs.exists == 'true' }}
uses: aws-actions/amazon-ecs-deploy-task-definition@c465972ecbd160473f22e683363b422a5412a3de # v2.6.3
with:
task-definition: ${{ steps.render-task-definition.outputs.task-definition }}
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 8239fbedc9..2071764d99 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -48,13 +48,7 @@ jobs:
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
- const services = ["web", "web-ingestion", "web-iso", "worker", "worker-cpu"];
- // Prod ai-gateway deploys run only via explicit dispatch until its
- // prod ECS services are bootstrapped.
- const isStaging = context.eventName === "workflow_dispatch"
- ? context.payload.inputs.environment === "staging"
- : context.ref === "refs/heads/main";
- if (isStaging) services.push("ai-gateway");
+ const services = ["web", "web-ingestion", "web-iso", "worker", "worker-cpu", "ai-gateway"];
if (context.eventName === "workflow_dispatch") {
const service = context.payload.inputs.service;