Repository navigation
feat(ci): add staging deployment workflow - #13
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04b1f5be96
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| test "$UNSAFE_DESTROY_COUNT" = "0" | ||
|
|
||
| - name: Apply release preparation | ||
| run: terraform -chdir="$TF_WORKING_DIR" apply -input=false "$RUNNER_TEMP/staging-prepare.tfplan" |
There was a problem hiding this comment.
Wait for services to drain before migrating
When staging currently has running API/worker tasks, this apply only submits the desired_count=0 service updates and then the next step starts the migration immediately. I checked infra/terraform/ecs_services.tf, and neither ECS service sets wait_for_steady_state; the AWS provider docs say that option defaults to false, so old tasks can still be draining and writing to the database while pnpm migrate is running. Add an explicit aws ecs wait services-stable after the prepare apply, or otherwise make Terraform wait for the zero-count state before launching the migration task.
Useful? React with 👍 / 👎.
Summary
prisma migrate deployas a one-off ECS taskSafety
maininfra/terraformValidation
bash -n