Skip to content

Hanging on sls deploy, with no output #3882

Description

@El-Fitz

This is a (Bug Report / Feature Proposal)

Description

  • What went wrong?
    I referenced custom variables in a file two folders higher in the folder hierarchy, and used them to set a variable in serverless.yml. When doing sls deploy, nothing happens, it just 'hangs', with no output, and I have to kill it. Like an infinite loop or recursion.

  • What did you expect should have happened?
    To set the variables properly and deploy ? ^^

  • What was the config you used?
    ?

  • What stacktrace or error message from your provider did you see?
    None

It's kinda funny ^^"

Additional Data

  • Serverless Framework Version you're using: 1.16.1
  • Operating System: macOS 10.13 beta(17A291j)
  • Stack Trace: None
  • Provider Error messages: None

Faulty lines in serverless.yml (makes sls deploy hang indefinitely):

custom:
  private: ${file(../../slsconf/private.yml)}
  sns: ${file(../../slsconf/sns.yml)}

Replacing them with the following works just fine

custom:
  private: ${file(../../slsconf/private.yml)}
  sns:
    topicNames:
    sources:
      source:
        action: sources_source_action_${self:provider.stage}
  arns:
    sources:
      source:
        action: arn:aws:sns:${self:provider.region}:${self:custom.private.IDs.aws}:${self:custom.sns.topicNames.sources.source.action}

Content of private.yml

APIKeys:
  baseSync: anApiKey
IDs:
  aws: myAwsId
misc:
  baseUserAgent: anUser/Agent
  baseTestClientDeviceUUID: anUUID

Content of sns.yml

topicNames:
  sources:
    source:
      action: sources_source_action_${self:provider.stage}

arns:
  sources:
    source:
      action: arn:aws:sns:${self:provider.region}:${self:custom.private.IDs.aws}:${self:custom.sns.topicNames.sources.source.action}

Activity

  1. pmuens commented on Jul 2, 2017

    @pmuens
    Contributor

    Hey @El-Fitz thanks for reporting 👍

    Could you run serverless package and see if it still hangs (just to see if it's actually the Serverless Variable system which causes the bug). Thanks!

  2. hassankhan commented on Jul 2, 2017

    @hassankhan
    Contributor

    I had a similar issue which turned out to be cyclic references in YML.

    @El-Fitz I think in your case it might be that sns.yml references itself under arns.sources.source.action: ${self:custom.sns.topicNames.sources.source.action}. If you change just this (somehow) and try re-deploying does it work?

  3. El-Fitz commented on Jul 2, 2017

    @El-Fitz
    Author

    @hassankhan In an amusing way, if I separate the the arns and topic names in two separate files, it works just fine ^^" Thanks ! 👍

    I'll set it like this from now, to be able to share the sns .yml files across my 'subproject' ^^

    custom:
      private: ${file(../../slsconf/private.yml)}
      sns:
        topicNames: ${file(../../slsconf/snsTopics.yml)}
        arns: ${file(../../slsconf/snsArns.yml)}
    

    @pmuens Otherwise, without @hassankhan's solution, sls package hangs just the same

  4. pmuens commented on Jul 3, 2017

    @pmuens
    Contributor

    Thanks for the investigation @hassankhan 👍 and thanks for confirming @El-Fitz 👍

    This seems the be related to #3627, #3740 and #3711.

    /cc @eahefnawy

  5. added this to the 1.18 milestone on Jul 3, 2017
  6. modified the milestones: 1.19, 1.18 on Jul 20, 2017
  7. modified the milestones: 1.20, 1.19 on Aug 1, 2017
  8. modified the milestones: 1.20, 1.21 on Aug 16, 2017
  9. eahefnawy commented on Aug 23, 2017

    @eahefnawy
    Contributor

    @El-Fitz I think #4144 would solve this issue. Could you try it out and let us know if it works? 😊

  10. erikerikson commented on Aug 23, 2017

    @erikerikson
    Contributor

    #4146 (a branch off of #4144) might be a better target to test with. It solves a serialization related issue I ran into.

  11. modified the milestones: 1.22, 1.21 on Aug 30, 2017
  12. modified the milestones: 1.23, 1.22 on Sep 13, 2017
  13. removed this from the 1.23 milestone on Sep 21, 2017
  14. added this to the 1.25 milestone on Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions