getlift / lift

Expanding Serverless Framework beyond functions using the AWS CDK
MIT License
920 stars 112 forks source link

ServerSideWebsite: Add Progress.create() arg for Serverless 4 compatibility #408

Closed nolotz closed 1 month ago

nolotz commented 2 months ago

Hi there,

With the release of Serverless 4, it appears that the ServerlessUtils progress.create() method now requires an initial argument to be passed. This is causing issues during deployment and any other time the uploadAssets() function is called.

Steps to Reproduce:

Proposed Fix: Update the uploadAssets() function in ServerSideWebsite to pass an initial argument to progress.create() as follows:

uploadProgress = progress.create({
      message: 'Uploading assets'
});

Current Code Reference: https://github.com/getlift/lift/blob/08772c56cc219ca7fa65cc4ff7c4dfea20246a70/src/constructs/aws/ServerSideWebsite.ts#L242

Documentation: https://www.serverless.com/framework/docs/guides/plugins/cli-output#interactive-progress

Solves serverless/serverless#12797

Cheers, Noah

mnapoli commented 1 month ago

Hi, is this backwards compatible with SF v3?

nolotz commented 1 month ago

Hi Antony, its basically the same and end user wouldn't notice. SF 3.0.0 [1] is using SFU 6.0.0 [2] and since then progress.create supports message and name properties.

[1] https://github.com/serverless/utils/blob/v6.0.0/docs/log.md [2] https://github.com/serverless/serverless/blob/v3.0.0/package.json

Cheers, Noah

mnapoli commented 1 month ago

Thanks!