Skip to content

Add runtime property to Service / Function in service? #1517

Closed

Description

@pmuens

We need a way to specify a runtime (As stated in #1470) so that we can compile the correct resources.

The question is if one service should be bound to a runtime (Add a runtime property in the Service.js class) or if one function should have a runtime property?

How should we implement this? Should this be a necessary property the user has to define in the serverless.yaml file (like already done with the provider property or should we auto detect the runtime (e.g. look into the code / the handler)?

What are your thoughts @eahefnawy @flomotlik ?

Status: Done --> (#1536)

Activity

  1. added this to the milestone on Jul 8, 2016
  2. flomotlik commented on Jul 8, 2016

    @flomotlik
    Contributor

    so that we can compile the correct resources

    Do you mean automatically creating include/exclude rules? Imho that should be something we can solve through the tempting. E.g. if you have a Java project we add the src folder automatically to your excludes. I don't think the packaging mechanism should have built-in exclusions depending on the language is this is more surprising than simply adding include/excludes through the tempting. Then they are in the serverless.yml and no surprise.

    We do need it for setting it in the runtime attribute of the function of course.

  3. pmuens commented on Jul 10, 2016

    @pmuens
    ContributorAuthor

    Yep. Agree. We should do this in the templates (another plugin for this would be overkill).

  4. pmuens commented on Jul 11, 2016

    @pmuens
    ContributorAuthor

    Ok. The proposal is that one runtimes should be used throughout the whole service (they are service bound). We can add function bound runtimes later on.

  5. self-assigned this
    on Jul 11, 2016
  6. pmuens commented on Jul 12, 2016

    @pmuens
    ContributorAuthor

    Done with #1536

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions