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

Suppress confusing warning "A valid undefined..." #5723

merged 1 commit into from Jan 21, 2019


4 participants
Copy link

exoego commented Jan 18, 2019

What did you implement:

Closes #4953
Closes #5353
Closes #5717

How did you implement it:

Variable#warnIfNotFound(variableString, valueToPopulate) outputs a confuging warning A valid undefined ... when variableString does not match any of variable syntaxes.
Such situation can happen when deep variable resolution fails.

This PR suppress warnings when variableString does not match any of variable syntaxes, since a root cause of deep variable resolution failure is warned in other call of #warnIfNotFound.

How can we verify it:

  1. npm i -g exoego/serverless#valid-undefined
  2. sls print over the below severless.yml
  name: aws
  stage: ${env:NODE_ENV}
    securityGroupIds: ${self:custom.config.stage.vpc.securityGroupIds}

    stage: ${file(config/${self:provider.stage}.yml)}
  1. Warnings
    • should contains A valid file to satisfy the declaration 'file(config/.yml)' could not be found.
    • should NOT contains A valid undefined to satisfy the declaration 'deep:3.vpc.securityGroupIds' could not be found


  • Write tests
  • Write documentation N/A
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@exoego exoego force-pushed the exoego:valid-undefined branch from 08fee8d to cec6d55 Jan 18, 2019

@pmuens pmuens added the pr/in-review label Jan 21, 2019


dschep approved these changes Jan 21, 2019

@dschep dschep merged commit a01f339 into serverless:master Jan 21, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.002%) to 93.01%

@dschep dschep added this to In progress in Serverless via automation Jan 21, 2019

@exoego exoego deleted the exoego:valid-undefined branch Jan 21, 2019

@shortjared shortjared added this to the v1.36.3 milestone Jan 22, 2019

@pmuens pmuens moved this from In progress to Done in Serverless Jan 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment