-
Notifications
You must be signed in to change notification settings - Fork 357
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
Invocation Filters #980
Comments
+1. Please. Otherwise extendability and traceability are actually very limited. |
I'd like to make a note that, IMO, this should support async WebJobs as first class citizens - it was actually a rather complicated and touchy thing to get working with my interception strategy. Having to add ContinuesWith, manually setting cancel/exception/result, and more, is a lot to ask when the entire point behind WebJobs is to keep things as simple as possible. |
@jamesbascle Of course we'd support async filters. Basically we'll be doing something like WebAPI ActionFilters. As you can see, that model supports sync/async. If you're asking for something more, please share details. I realize my sketch code above didn't make that clear :) |
My two cents worth modification to your code
Can we also combine a sort of rules engine to these function context Out of the Box. This will actually provide the rules that needs be executed before the functions is executed. Otherwise it will exit without executing the rule. This is similar to rules of openWhisk. To start with we can leverage the WF4 rules engine. Question how we will instantiate the rule engine in performance/cost efficient way. If we get this trick right then we are home |
I assume like WebAPI, we could apply a filter globally? |
Applying only in function level right? Because each job in an isolated entity. Multiple jobs (dissimilar) could be packaged at runtime in a job host. So I think applying filter globally will not make that much sense |
It definitely makes sense, but it should be optional. They should be
configurable via attributes on a per job function, per job class, and
global basis.
…On Mar 22, 2017 10:34 PM, "VenkateshSrini" ***@***.***> wrote:
Applying only in function level right? Because each job in an isolated
entity. Multiple jobs (dissimilar) could be packaged at runtime in a job
host. So I think applying filter globally will not make that much sense
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#980 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD_ohWqZ1gNwaDTFIXkRTXCmyI5tBTQyks5rodpQgaJpZM4Lo0bI>
.
|
Looking forward to it! |
Is it closed because another PR has been opened or is it implemented. Please clarify |
@VenkateshSrini check the case and commits. It's merged into |
FYI - this feature is now available in the nightly builds on myget with version 2.1.0-beta1-10998. There is also a wiki page describing the feature here: https://github.com/Azure/azure-webjobs-sdk/wiki/Function-Filters |
Despite this thread being from 2017 the link to that wiki still has
Is this true? Is it in preview or has it been accepted permanently now? |
Looks like this is getting helb up by #1284 Specifically #1284 (comment) |
Looking like this approach is going to get abandoned:
|
We should consider adding an Invoke Filter concept. This is very similar to WebAPI ActionFilters (the problem domain is basically the same). We've already had some related asks (see #734, #895). The idea is to provide a declarative programming model that allows people to attach filters to their job methods, classes, etc. similar to the way filters are specified in WebAPI. The invoke filter will receive a context object that contains everything needed to perform validations, do logging, etc. before any input/output bindings occur and before the function executes. In addition to invocation filters, we'll also enable different filter types mapping to different stages in the execution pipeline (e.g. exception/error filters). Here’s an sketch:
This attribute could be applied at the function or class level. We could also support host level as well (e.g. add to JobHostConfiguration service collection). Just like WebAPI ActionFilters, where they can be specified declaratively, as well as at the service config level.
The text was updated successfully, but these errors were encountered: