Open aheitzmann opened 1 month ago
@aheitzmann thanks so much for the details here
is it possible that the deploy did not actually work? like did you verify that the service is actually updated? when the deploy fails (usually due to container crashing or health checks failing), ECS rolls back the service to the last pervious version, which still results in the steady state message in the events. my guess is that the deploy was unsuccessful, and the cnc CLI is reporting that accurately.
@zach-withcoherence Yes, I verified that the deployment was successful. The event logs don't show any rollback, and the task details of the currently running healthy task show that it was launched at the expected time, and has an updated revision number.
interesting, thanks so much for confirming that.
will investigate, one thing it could be is that the build succeeded after the allowed timeout. that can be configured as per the docs https://docs.withcoherence.com/configuration/cnc-yml/:
x-cnc:
type: backend
# Need to define the URL path to route to the service
# Unless you customize IaC to subdomain routing
url_path: /api
# For DB migrations, what command to run?
# Runs in the container
migrate: ["prisma", "migrate"]
# For DB seeding, what command to run?
# MUST be idempotent!!
# Runs in the container
seed: ["prisma", "seed"]
# CI pipeline timeout limits before failing
timeouts:
# default is 20 for both
deploy: 10
build: 10
e.g. setting to 20 would allow 20 mins to pass before failing
To be clear, I'm not using a CI pipeline. I run the build and deploy commands with CNC from my local machine. The build and publish to ECR succeeds. The deploy command outputs the failure message mentioned within about 15 seconds. It does take several minutes for the new deployment to reach a stable state in ECS.
interesting, thanks so much for confirming that.
will investigate, one thing it could be is that the build succeeded after the allowed timeout. that can be configured as per the docs https://docs.withcoherence.com/configuration/cnc-yml/:
x-cnc: type: backend # Need to define the URL path to route to the service # Unless you customize IaC to subdomain routing url_path: /api # For DB migrations, what command to run? # Runs in the container migrate: ["prisma", "migrate"] # For DB seeding, what command to run? # MUST be idempotent!! # Runs in the container seed: ["prisma", "seed"] # CI pipeline timeout limits before failing timeouts: # default is 20 for both deploy: 10 build: 10
e.g. setting to 20 would allow 20 mins to pass before failing
Description
cnc deploy start
reports "Deploy failed... check events and stopped tasks in the ea8a1c02af-backe-main-demo-app ecs service for more information." But in the AWS console the deploy shows as successful.Repro Details
Machine: Apple M1 Pro OS: Sonoma 14.6.1 (23G93)
cnc.yml
environments.yml
Command
cnc deploy perform demo --service-tag app=v1
Output:
Service events from the AWS Console: