dotnet-starter-kit icon indicating copy to clipboard operation
dotnet-starter-kit copied to clipboard

Deployment error

Open wimdevriendt opened this issue 4 months ago • 1 comments

Hi Mukesh, i cannot reopen previous issue but now i got following error: rds_endpoint = "dev-eu-west-1-postgres.cx02aeyuku1e.eu-west-1.rds.amazonaws.com" rds_port = 5432 rds_secret_arn = "arn:aws:secretsmanager:eu-west-1:997916277888:secret:rds!db-a2f061c8-4444-44b0-a633-43cb6b367843-W5cKPq" redis_connection_string = redis_endpoint = "master.dev-eu-west-1-redis.bqfblm.euw1.cache.amazonaws.com" s3_bucket_arn = "arn:aws:s3:::dev-fsh-app-bucket-euw1" s3_bucket_name = "dev-fsh-app-bucket-euw1" s3_cloudfront_distribution_id = "E1D7FM72IBA6UF" s3_cloudfront_domain = "d28u7f0nl6nv2o.cloudfront.net" vpc_cidr_block = "10.10.0.0/16" vpc_id = "vpc-0ad007251ac86fed5" waf_web_acl_arn = "arn:aws:wafv2:eu-west-1:997916277888:regional/webacl/dev-eu-west-1-waf/2bef039f-00f0-4de3-8014-fc8da0983905" ==> Running DbMigrator task (migrate) task: arn:aws:ecs:eu-west-1:997916277888:task/dev-eu-west-1-cluster/65d25d1ac45848e7b52a9296f7776285 — waiting for it to stop... Die : migrator (migrate) exited None — CannotPullContainerError: pull image manifest has been retried 7 time(s): failed to resolve ref ghcr.io/fullstackhero/fsh-db-migrator:488a56ef6051: ghcr.io/fullstackhero/fsh-db-migrator:488a56ef6051: not found (logs: CloudWatch /ecs/dev-db-migrator) At D:\repos\6_PureAutomationPersonal\fullstackhero\PA.TSM\PA.TSM\deploy\terraform\apps\starter\deploy.ps1:153 char:5

  • Die "migrator ($label) exited $exitCode — $reason (logs: CloudWat ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Die

wimdevriendt avatar Jul 12 '26 13:07 wimdevriendt

Thanks for the detailed log — that pinned it down.

What happened: the deploy tried to run the migrator from ghcr.io/fullstackhero/fsh-db-migrator:488a56ef6051, and that tag doesn't exist in the registry. The 488a56ef6051 tag is your local git short-SHA — it only gets used when you run with -BuildApi, where the script builds the images and pushes them to the registry itself. Since you're deploying a fork, that push went to the default ghcr.io/fullstackhero registry, which you don't have write access to, so the push was rejected. The script didn't stop on that failed push (a PowerShell-specific gap — see below), so it carried on and told ECS to pull a tag that was never published → CannotPullContainerError.

To unblock yourself now, pick one:

  1. Deploy an already-published tag (simplest — no build):

    ./deploy.ps1 -Environment dev -Region eu-west-1 -ImageTag v1.0.0
    

    (or set container_image_tag = "v1.0.0" in envs/dev/eu-west-1/terraform.tfvars). The published tags live on the GHCR packages page.

  2. Build & push to a registry you own (if you want to deploy your own code changes):

    docker login ghcr.io          # or `aws ecr get-login-password ... | docker login` for ECR
    ./deploy.ps1 -Environment dev -Region eu-west-1 -BuildApi -Registry ghcr.io/<your-org>
    

    The -Registry must be one your credentials can push to.

On the tooling side: #1341 hardens deploy.ps1 so a failed image push now stops the deploy immediately with a clear message (naming the registry/access cause and the two options above), instead of failing opaquely at the ECS pull step several minutes later.

iammukeshm avatar Jul 13 '26 13:07 iammukeshm