Skip to content

Bug: Plugins are "ignored" when provider name is variable #4837

@MacMcIrish

Description

@MacMcIrish

This is a Bug Report

Description

When the provider name is a variable, the proper plugin may not be used.

For bug reports:

  • What went wrong?
    The loaded deploy plugin was lib/plugins/deploy.
  • What did you expect should have happened?
    The loaded deploy plugin to be lib/plugins/aws/common/deploy
  • What was the config you used?
---
custom:
  name: aws

provider:
  name: ${self:custom.name}
---

Similar or dependent issues:

Additional Data

I've noticed in PluginManager, the following snippet:

    // ignore plugins that specify a different provider than the current one
    if (pluginProvider
      && (pluginProvider !== this.serverless.service.provider.name)) {
      return;
    }

The issue is the provider variables have not been loaded by this step, so I'm assuming the aws plugins are then ignored?

  • Serverless Framework Version you're using:
    1.26.0 (master branch at time of posting)
  • Operating System:
    Ubuntu 16.04

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