eddmann / serverless-fargate

Maintain long-running Fargate ECS tasks within your Serverless project
51 stars 21 forks source link

Version 0.0.9 breaks deployment #27

Closed johan-smits closed 2 years ago

johan-smits commented 2 years ago

With 0.0.8 it works but I have updated to 0.0.9 it stopped working:

Environment: linux, node 16.17.0, framework 3.22.0 (local), plugin 6.2.2, SDK 4.3.2
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
At least one of the plugins defines a validation schema that is invalid. Try disabling plugins one by one to identify the problematic plugin and report it to the plugin maintainers.

My config:

service: xxxxxxx

provider:
  name: aws
  region: eu-west-1
  # (required) similar to Lambda-containers, images defined within the provider are available to tasks.
  ecr:
    images:
      xxxxxxx:
        path: ./
        file: Dockerfile

custom: ${file(serverless/shared.yml):custom_api}
plugins: ${file(serverless/shared.yml):plugins_fargate}

fargate:
  memory: 0.5GB
  cpu: 256
  iamRoleStatements:
    - Effect: Allow
      Action: 'secretsmanager:GetSecretValue'
      Resource: 'arn:aws:secretsmanager:eu-west-1:xxxxx:secret:${opt:stage}/xxxxx-support-*'

  tasks:
    chat-support-bot:
      name: chat-support-bot
      image: chat-support-bot
      vpc:
        subnetIds: ${self:custom.vpc.subnetIdsPublic}
        assignPublicIp: true
      environment:
        RUST_LOG: error
eddmann commented 2 years ago

Thanks for the report, this looks to just be affecting Serverless 3 will look into a fix for this today. It looks to be around the addition of the union validation type for 'object'/'string' ARNs

eddmann commented 2 years ago

I've tested the following main branch commit fix and this looks to work with both Serverless 2/3 https://github.com/eddmann/serverless-fargate/commit/e31005e8443bd08c3693ee213ac5e8842d42595b, would you be able to confirm this easily your end?

johan-smits commented 2 years ago

@eddmann yes this works :+1:

Would it be possible to make a release for this 98e069bbabff78778321097223181fd8bf3a4178?

eddmann commented 2 years ago

Great stuff, thanks for checking.

Published https://github.com/eddmann/serverless-fargate/releases/tag/0.0.10 :)