Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

nolotz
Copy link
Contributor

@nolotz nolotz commented Sep 14, 2024

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:

  • Use Lift's ServerSideWebsite with Serverless 4.
  • Trigger deployment or any action that calls the uploadAssets function.
  • Observe the error due to the missing argument for progress.create().

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:

uploadProgress = progress.create();

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

Solves serverless/serverless#12797

Cheers,
Noah

@mnapoli
Copy link
Member

mnapoli commented Oct 23, 2024

Hi, is this backwards compatible with SF v3?

@nolotz
Copy link
Contributor Author

nolotz commented Oct 23, 2024

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 mnapoli merged commit d3bc25e into getlift:master Oct 23, 2024
@mnapoli
Copy link
Member

mnapoli commented Oct 23, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants