Skip to content
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

Binding is not supported for "sendGrid" event #561

Open
mohovkm opened this issue Jul 24, 2021 · 1 comment
Open

Binding is not supported for "sendGrid" event #561

mohovkm opened this issue Jul 24, 2021 · 1 comment

Comments

@mohovkm
Copy link

mohovkm commented Jul 24, 2021

This is a Bug Report

Description

When I run sls deploy or sls offline with the following code (sendGrid block), the plugin says, that binding is not supported

functions:
  queue-out:
    handler: queue_out.main
    events:
      - queue: emailQueue
        name: queue
        connection: AzureWebJobsStorage
        accessRights: manage
      
      - sendGrid: true
        name: sendGridMessage
        direction: out
        apiKey: sendGridKey
        from: konstantin_mokhov@epam.com

Additional Data

azure_tests> sls deploy
Serverless: Initializing provider configuration...
Serverless: Configuration warning: Unrecognized provider 'azure'
Serverless:  
Serverless: You're relying on provider plugin which doesn't provide a validation schema for its config.
Serverless: Please report the issue at its bug tracker linking: https://www.serverless.com/framework/docs/providers/aws/guide/plugins#extending-validation-schema
Serverless: You may turn off this message with "configValidationMode: off" setting
Serverless:  
Serverless: Removing .serverless directory
Serverless: Parsing Azure Functions Bindings.json...
Serverless: Parsing Azure Functions Bindings.json...
Serverless: Building binding for function: queue-out event: queueTrigger
Serverless: Building binding for function: queue-out event: sendGrid
Serverless: Building binding for function: queue-in event: httpTrigger
Serverless: Building binding for function: queue-in event: http
Serverless: Building binding for function: queue-in event: queue
 
 Error ---------------------------------------------------
 
  Error: Binding not supported
      at Function.<anonymous> (/Users/konstantin_mokhov_epam/dev/epam_pymeetup_2021/azure_tests/node_modules/serverless-azure-functions/lib/shared/utils.js:112:39)
      at step (/Users/konstantin_mokhov_epam/dev/epam_pymeetup_2021/azure_tests/node_modules/serverless-azure-functions/lib/shared/utils.js:43:23)
      at Object.next (/Users/konstantin_mokhov_epam/dev/epam_pymeetup_2021/azure_tests/node_modules/serverless-azure-functions/lib/shared/utils.js:24:53)
      at fulfilled (/Users/konstantin_mokhov_epam/dev/epam_pymeetup_2021/azure_tests/node_modules/serverless-azure-functions/lib/shared/utils.js:15:58)
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              14.16.0
     Framework Version:         2.52.1
     Plugin Version:            5.4.3
     SDK Version:               4.2.5
     Components Version:        3.14.0
 
Serverless: Deprecation warning: CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:
             - AzureInvokePlugin for "resourceGroup", "region", "subscriptionId", "method", "function", "path", "data", "port"
             - AzureRemovePlugin for "resourceGroup", "region", "subscriptionId", "function", "force"
             - AzureDeployPlugin for "resourceGroup", "region", "subscriptionId", "dryrun", "stage", "function"
             - AzureFuncPlugin for "name"
             - AzureOfflinePlugin for "nocleanup", "spawnargs"
             - AzureRollbackPlugin for "resourceGroup", "region", "subscriptionId", "function"
             - AzureInfoPlugin for "resourceGroup", "region", "subscriptionId", "function", "dryrun", "arm"
            Please report this issue in plugin issue tracker.
            Starting with next major release, this will be communicated with a thrown error.
            More Info: https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA
@mohovkm
Copy link
Author

mohovkm commented Jul 27, 2021

As far as I understood from research, Microsoft marked SendGrid as a separate service and moved it from Azure.
If we'll create the following code, we could fine run sls offline and sls deploy (don't know, is it will be working fine or not):

functions:
  queue-out:
    handler: main.main
    events:
      - queue: NameQueue
        name: queue
        connection: MyConnection
        accessRights: listen

      - http: true
        direction: out
        name: $return

      - sendGrid:
          x-azure-settings:
            direction: out
            apiKey: api_key
            name: message
            from: e@ma.il

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant