serverless / serverless-azure-functions

Serverless Azure Functions Plugin – Add Azure Functions support to the Serverless Framework
MIT License
266 stars 162 forks source link

feat: add support for durable functions #613

Open Ayzrian opened 2 years ago

Ayzrian commented 2 years ago

What did you implement:

Closes #553

There was no bindings definition for durable functions, so this resulted into problems in case we want to use serverless azure functions and durable functions. Added support for the bindings to generate right functions.json file.

How did you implement it:

Added definitions for possible bindings to bindings.json file.

How can we verify it:

Add durableClient input to HTTP triggered function to test it.

Todos:

Is this ready for review?: YES
Is it a breaking change?: NO

Ayzrian commented 2 years ago

Hey, @tbarlow12 I wonder if you could review my PR and merge if possible?

I have bumped into this issue on my project and would like to add support for durable bindings in your plugin.

Ayzrian commented 2 years ago

Just spotted that need to add extra work to support orchestratorTrigger

Ayzrian commented 2 years ago

Ok ready now.

Ayzrian commented 2 years ago

Also should close #377

Ayzrian commented 2 years ago

I wonder if @medikoo you could help us getting this merged?

pgrzesik commented 2 years ago

Hey @Ayzrian - thanks a lot for the PR. I'm currently getting more familiar with the plugin and intend to dedicate some time to maintaining it in the coming weeks.

Ayzrian commented 2 years ago

Hey, @pgrzesik thanks! So I assume that we shouldn't expect this PR to be merged in the near days, right?

In that case we will probably will use fork version util this PR is merged.

pgrzesik commented 2 years ago

Hey @Ayzrian - definitely not, I'm still learning more about Azure serverless offerings itself as I want to be confident that the changes that I can potentially introduce won't be breaking anything. Sorry about that!

Ayzrian commented 2 years ago

@pgrzesik no worries, take your time. Meanwhile, we decided to drop using serverless since Azure is hardly supported right now and we would prefer to use native tools.

pgrzesik commented 2 years ago

Sure thing @Ayzrian. If you have time, could you share what are the key features that are currently missing, but it would be great if they were supported by the plugin? I'm trying to understand what would be needed to make this plugin a really great choice for building Serverless apps on Azure

Aravin commented 2 years ago

@pgrzesik

Hope you can see the bug title Add support for durable function

To know about durable functions: https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp

To know about durable function binding: https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-bindings?tabs=csharp%2C2x-durable-functions

Missing triggers:

  1. orchestrationTrigger
  2. entityTrigger
  3. activityTrigger

Durable function js quick start: https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-js-vscode