Skip to content

serverless deploy hangs when using --verbose and disableRollback: true #12770

@eranelbaz

Description

@eranelbaz

Issue description

Hey
I'm trying to introduce disableRollback: true to my deployment flow and I noticed that when I use --verbose flag serverless deployment hangs until I release it using AWS Cloudformation Console.

When I'm not using --verbose flag serverless cli exits as expected.

Noticed on monitor-stacks.js there is this part

if (
                stackLatestError &&
                (!this.options.verbose ||
                  (stackStatus &&
                    (stackStatus.endsWith('ROLLBACK_COMPLETE') ||
                      ['DELETE_FAILED', 'DELETE_COMPLETE'].includes(stackStatus))))
              )

When using verbose flag this never evaluates since sls waits for statuses that will never come, adding UPDATE_FAILED to the array solves this hanging issue

Context

The way I recreate it is by deploying S3 bucket with a name that already exists which

provider:
  name: aws
  region: us-east-1
  disableRollback: true

service: elbaz-service
resources:
  Resources:
    YetAnotherDuplicateThingy:
      Type: AWS::S3::Bucket
      Properties:
        BucketName: 'duplicate-name'
        VersioningConfiguration:
          Status: Enabled
        BucketEncryption:
          ServerSideEncryptionConfiguration:
            - ServerSideEncryptionByDefault:
                SSEAlgorithm: AES256
        PublicAccessBlockConfiguration:
          BlockPublicAcls: true
          BlockPublicPolicy: true
          IgnorePublicAcls: true
          RestrictPublicBuckets: true
> serverless -v
Framework Core: 3.39.0 (local)
Plugin: 7.2.3
SDK: 4.5.1

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions