Hi,
I have 2 serverless services where the second service depends on stack output of the first.
But I’m getting this error, quite randomly.
When I tried to run both services in offline mode with serverless-wsgi
Serverless Information ----------------------------------
##########################################################################################
# 2506: 1 of 2 promises have settled
# 2506: 1 unsettled promises:
# 2506: cf:first-dev.ServiceEndpoint waited on by: ${cf:first-dev.ServiceEndpoint, http://localhost:5000}
# This can result from latent connections but may represent a cyclic variable dependency
##########################################################################################
This is a bit from the second service
functions:
client:
iamRoleStatementsInherit: true
handler: wsgi_handler.handler
events:
- http:
path: ui
method: any
environment:
# cf:stackName.outputKey
API_URL: ${cf:first-dev.ServiceEndpoint, http://localhost:5000}
The expected behaviour is:
- No services has been deployed yet
- First service has been started with command
sls wsgi serve -p 5000
- Second service has been started with command
sls wsgi serve -p 4000
- During the run of command
sls wsgi serve -p 4000
, I expectcf:first-dev.ServiceEndpoint
to fail and fall back to default valuehttp://localhost:5000
but instead I get the unsettled promise.
Am I doing something wrong?
Thank you