Service level package config is added to warmup function package config by default
See original GitHub issueWe’re creating a build which is output to dist
in our project root.
In serverless.yml
we have this.
package
individually: true
exclude:
- ./**
include:
- dist/index.js
This is working fine for the main function. However, for the warmup
lambda, it’s including the dist
code. I’ve tried adding a package
to custom.warmup
but I can’t get it to be excluded.
I’ve tried lots of variations, and this is what I currently have.
warmup:
name: alexa-custom-warmup-${opt:stage, 'dev'}
cleanFolder: true
prewarm: true
package:
individually: true
exclude:
- ./**
include:
- _warmup/index.js
Any ideas?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Serverless Plugin Warmup
WarmUp solves cold starts by creating a scheduled lambda (the warmer) that invokes all the selected service's lambdas in a configured time interval...
Read more >Environment variables and app settings in Azure App Service
By default, it is master . WEBSITE_RUN_FROM_PACKAGE, Set to 1 to run the app from a local ZIP package, or set to the...
Read more >Configuring Warmup Requests to Improve Performance
Enabling warmup requests Warmup requests are used by the App Engine scheduler, which controls the auto scaling of instances based on user-supplied ......
Read more >Set the default instance warmup for an Auto Scaling group
You can use the default instance warmup to unify these settings at the group level. By default, these parameters will be set to...
Read more >How do I get NuGet to install/update all the packages in ...
nuget install packages.config. Or with NuGet 2.7 you can restore all packages in the solution using the command line. nuget restore YourSolution.sln.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry for the delay answer. Christmas holidays got on the way.
Are you setting:
at your function level? Or at the service level? Can you share the whole config? (of course, you can obscure the names and other sensitive stuff)
I suspect that you are setting it at the package level. Which is automatically inherited by the warmup lambda unless you override it at the warmup configuration (as you already figured out).
Maybe this was a questionable decision and the service-level package configuration shouldn’t be inherited. But that would be a breaking change that would require a major version change.
I’ll consider it for 5.0. 😄
Almost a year later but I’m looking back at this.
The issue seems to be in the serverless framework itself prioritizing includes over excludes… (see https://github.com/serverless/serverless/issues/8093)
For now the workaround is to force the exclusions but using includes like:
I’ll be releasing v5 at some point and making excluding the top level includes the default.