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

Enable faster deployments by default #1395

Merged
merged 1 commit into from
Feb 6, 2023
Merged

Enable faster deployments by default #1395

merged 1 commit into from
Feb 6, 2023

Conversation

mnapoli
Copy link
Member

@mnapoli mnapoli commented Feb 2, 2023

I set this manually in every project:

provider:
  name: aws
  deploymentMethod: direct

Why not have Bref set it by default?

This PR enable the following feature by default: https://www.serverless.com/framework/docs/providers/aws/guide/deploying#deployment-method (unless the user set it explicitly in serverless.yml)

That makes full deployments 2 times faster or more.

See serverless/serverless#10815 for some numbers.


TL/DR about the underlying issue: Serverless Framework v3 deploys with CloudFormation changesets enabled to show a nice progress count while the deployment progresses.

But changesets, unfortunately, make the deployment MUCH longer for no apparent reason. That's unfortunate. We introduced an option in serverless.yml to opt-out of these slower deployments, with the goal of making this the default for Serverless Framework v4.

The idea here is to enable this option by default with Bref. The only downside is that we lose the interactive progress, specifically the number of resources deployed in real time 🤷

Enable the following feature by default: https://www.serverless.com/framework/docs/providers/aws/guide/deploying#deployment-method (unless the user set it explicitly in `serverless.yml`)

That makes full deployments often 2 times faster or more.
@mnapoli mnapoli added this to the 2.0 milestone Feb 2, 2023
@mnapoli mnapoli self-assigned this Feb 2, 2023
@GrahamCampbell
Copy link
Contributor

Hmmmm, I don't feel like a plugin should be messing with that, and I prefer using change sets to deploy.

@mnapoli
Copy link
Member Author

mnapoli commented Feb 2, 2023

@GrahamCampbell I'm interested, why do you use changesets with serverless framework specifically?

@GrahamCampbell
Copy link
Contributor

I don't particularly care either way. They were just the default in v3, and I didn't change it. I would object to us overwriting it though. If we want people to get the "best" option by default, serverless framework v4 should be released I guess, or maybe just all the bref docs explicitly sets the deployment method, so copy-paste examples are already using it.

@mnapoli
Copy link
Member Author

mnapoli commented Feb 6, 2023

I worked on adding that flag in SF v3, not making it the default was a mistake to be honest (we had long debates).

SF v4 will use it, but is not coming anytime soon unfortunately. And there are no know downsides to skipping changesets (which was the default in v2). Even AWS CDK, SST, and other tools are going in that direction because of the performance issue with changesets.

It really feels like a cheap way to make deployments 2 times faster (or often more). If I had the choice, I'd set that by default that in SF directly.

I'll be bold and move forward with this, even though it does feel like overstepping boundaries between software.

@mnapoli mnapoli merged commit 082d793 into v2 Feb 6, 2023
@mnapoli mnapoli deleted the enable-faster-deploys branch February 6, 2023 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants