Skip to content

Suggestion: skip pruning if deployment is skipped #64

@Blikingor

Description

@Blikingor

I came across this log output today:

service-name: Recoverable error occurred (Rate exceeded), sleeping for ~4 seconds. Try 1 of 20
service-name: Recoverable error occurred (Rate exceeded), sleeping for ~7 seconds. Try 1 of 20
service-name: Recoverable error occurred (Rate exceeded), sleeping for ~6 seconds. Try 1 of 20
service-name: ✔ Pruning of functions complete
service-name: No changes to deploy. Deployment skipped. (36s)

The service was not deployed since there were no changes but the pruning still executed and did nothing other than query AWS for the version of all lambda functions in the service and running in to a AWS rate limit.

I think this could be avoided with a check in index.js postDeploy, similar to what Serverless detects and does internally:

if (this.options.noDeploy === true || this.serverless.service.provider.shouldNotDeploy) {
      return BbPromise.resolve();
    }

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions