Repository navigation
Closed
Labels
Description
This is a Bug Report
Repository to reproduce:
https://github.com/philiiiiiipp/sls-deploy-bug
Description
- What went wrong?
Running sls deploy with a serverless.yml containing a variable import inside the provider field silently stops. Setting the name to aws works fine.
serverless.yml:
service: sls-deploy-test
provider:
# This works fine
# name: aws
# This does not work
name: ${file(./serverless.values.yml):providerName}
runtime: nodejs8.10
region: eu-west-1
stage: dev
functions:
onlyDatHuisEmail:
handler: ./index.handler
memorySize: 128
timeout: 3
serverless.values.yml:
providerName: aws
Deploying with import:
$ npm run sls:deploy
> [email protected] sls:deploy /test-folder/sls-deploy
> SLS_DEBUG=true sls deploy
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Packaging service...
Serverless: Excluding development dependencies...
$
I have tried this with different versions of serverless dating back till 1.23.0, all with the same effect.
Running sls print gives the same correct output, with and without the import
$ sls print
service: sls-deploy-test
provider:
stage: dev
region: eu-west-1
name: aws
runtime: nodejs8.10
functions:
onlyDatHuisEmail:
handler: ./index.handler
memorySize: 128
timeout: 3
What did you expect should have happened?
It should deploy
Similar or dependent issues:
- Variables from external yml file not being referenced properly when writing to lambda environment #5272 Might be related
Additional Data
- Serverless Framework Version you're using: 1.30.3 ( tried it with various versions till 1.23.3 )
- Operating System: MacOS
- Stack Trace: -
- Provider Error messages: -
Activity
[-]Variables from external .yml file cause sls deploy to silently exit after packaging [/-][+]Variables from external .yml file in provider field cause sls deploy to silently exit after packaging [/+][-]Variables from external .yml file in provider field cause sls deploy to silently exit after packaging [/-][+]Variables from external .yml file in provider field cause sls to silently exit after packaging [/+]philiiiiiipp commentedon Sep 7, 2018
sls removealso silently stops.[-]Variables from external .yml file in provider field cause sls to silently exit after packaging [/-][+]Variables from external .yml file in provider `name` field cause sls to silently exit after packaging [/+][-]Variables from external .yml file in provider `name` field cause sls to silently exit after packaging [/-][+]Variables from external .yml file in provider name field cause sls to silently exit after packaging [/+]philiiiiiipp commentedon Sep 7, 2018
After further investigation it seems like its only happening for the
provider.namefieldivanmartos commentedon Feb 5, 2021
any update pls? This is still the case for me
my
serverless-workers.ymland in
provider.ymlsls packageand alsosls deployreturn same issueI'm running on serverless version
2.20.1medikoo commentedon Mar 3, 2021
Fixed with #8987