Skip to content

Bug: Packaging fails silently when referencing external provider information #4814

Open

Description

@MacMcIrish

This is a Bug Report

Description

For bug reports:

  • What went wrong?
    Deployment / packaging fails silently for config that references external provider.
  • What did you expect should have happened?
    Successful deployment.
  • What was the config you used?

Basic example

serverless.yml:

service: service-name

provider: ${file(./resources/data.yml):provider}

resources:
  Resources:
     ..

/resources/data.yml

provider:
  region: us-west-2
  • What stacktrace or error message from your provider did you see?
    There was no stack trace, but the last output with SLS_DEBUG=* was:

Serverless: Packaging service...

Additional Data

Copying the provider information over from the other file results in successful packaging.
Adding a functions parameter to the config also results in a successful packaging.

  • Serverless Framework Version you're using:
    1.26.1
  • Operating System:
    Ubuntu 16.04

Activity

  1. changed the title [-]Bug: Packaging fails silently when missing `functions` param[/-] [+]Bug: Packaging fails silently when referencing external `provider` information[/+] on Mar 9, 2018
  2. Omicron7 commented on Mar 12, 2018

    @Omicron7

    @MacMcIrish I wrote this serverless-merge-config which should help. It implements a post variable merge. So your initial "workaround" will now work.

    service: service-name
    
    provider:
      name: aws
      $<<: ${file(./resources/data.yml):provider}
    
    resources:
      Resources:
         ...

    One caveat: digging through the source, it looks like provider requires the provider name to be in the configuration and not included through a variable.

  3. dihmeetree commented on Jun 19, 2018

    @dihmeetree

    Also experiencing this as well! Wanted to provide my provider options in an external yaml file :/

  4. simlu commented on Jun 19, 2018

    @simlu

    @lolcoolkat We are now using yaml-boost for everything and it's working great so far. You just need to switch to a serverless.js file.

  5. dihmeetree commented on Jun 19, 2018

    @dihmeetree

    Thanks for the suggestion @simlu !!!!!!!! I will check it out 😸

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions