azure-webjobs-sdk-extensions
azure-webjobs-sdk-extensions copied to clipboard
Support Azure Files
Add a new trigger binding for Azure Files. Here is some more info https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-files/
We'd want both a trigger as well as input/output bindings.
We definitely need this FileTrigger, or a way to mount a drive in a WebJob and use the FileTrigger from WebJob.Extensions. Currently this approach is possible from within an Azure Servcie as it runs as NetworkService, but impossible in a WebJob as it runs as IIS APPPOOL\your_hosting_web_app, which has no network access. Trying to change the identity of the pool using the advanced settings and a applicationHost.xdt with the content shown below does not work either, transform seems to be fully ignored.
This is all really very sad, as such a trigger would make hybrid solutions with customers having no IT personnel trivial: anybody can drop a file in a share...
Hoping to have a solution for this real quick.
<?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <system.applicationHost> <applicationPools> <add name="%XDT_SITENAME%"> <processModel identityType="NetworkService" xdt:Transform="SetAttributes(identityType)"/> </add> </applicationPools> </system.applicationHost> </configuration>
Please do this. This would enable so many lift and ship scenarios.
+1
This work would likely happen after V2 GAs, but this would be a great feature.
/cc @jeffhollan
I'd also like to know when a file is deleted. When the researchers remove a file, we need to remove it from the DB.
need file-share trigger
Any updates on this feature? Or is there a plausible workaround while we wait for a feature release?
No updates - our team doesn't have the time to work on this right now, so the feature request remains in backlog. Note we already have a Files extension that works for the regular file system - this work item is about supporting Azure Files.
@mathewc Are you referring to external files, which only work in V1 and is marked as experimental?
I created a library that monitors changes in the local file system or on a network drive. Since Azure File Share supports SMB, maybe it can be applied here? You would just set up a recurring job to get the latest changes and then either immediately process them or send them to an Event Grid topic to act as the trigger.
I haven't had time to play with this case, but I think it would work. If anyone wants to give it a go, let me know if it works. Otherwise, I'll try to flesh out the details.
UPDATE: The only way my code would work is if we span up a VM just to host the SMB connection. That's a non-starter for me.
@MisinformedDNA the only missing piece I see with that is you don't know who changed the file.
For audit logging/HIPAA compliance I would like events for Read/Write/Delete. I submitted a feedback item here: https://feedback.azure.com/forums/217298-storage/suggestions/35896822-events-for-azure-files
Any update on this?
@fabiocav and @jeffhollan - Any hope here? Thanks.
Up?
Nearly 4 years on. Any update whatsoever on this guys?
The path forward to adding new trigger support for Azure Functions is having the service integrate with Azure Event Grid. We have made this request to the Azure Storage team and continue to do so, but the big item here that would enable this would be Azure Files supporting Azure Event Grid for 1st party events around file operations.
Functions can trigger on Blob storage events (https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings
) and many other bindings. How long until Storage Account/Files can be supported?
How can we get the Storage team involved in this discussion? Or is there a better place to have this discussion?
@MisinformedDNA I just added a forum question here: [https://social.msdn.microsoft.com/Forums/azure/en-US/ed7fed62-fcc5-42b1-bae3-0f2850c4cb5e/add-a-trigger-binding-for-azure-files?forum=AzureFunctions](MSDN Forums)
@glittle Probably the wrong forum as you chose Azure Functions instead of Azure Storage. (Also, your link is reversed.)
Triggers are defined in Functions, so wouldn't that be where to ask?
At first glance, you might think so, but as @jeffhollan has said above
The path forward to adding new trigger support for Azure Functions is having the service integrate with Azure Event Grid. We have made this request to the Azure Storage team and continue to do so, but the big item here that would enable this would be Azure Files supporting Azure Event Grid for 1st party events around file operations.
Basically, Azure Functions doesn't want to create triggers, they want to work off of triggers. And, really, that's how it should be. We don't need Azure Functions polling our file share like crazy when the Storage team can just know when something happens and raise an event.
Will that do away with Function triggers?
Since Blobs are files, I may be able to do what I need using Blob Storage triggers.
Blobs work fine.
The issue I have with using Blobs is the warning here: MS Warning In addition, storage logs are created on a "best effort" basis. There's no guarantee that all events are captured. Under some conditions, logs may be missed.
BlobTrigger currently employs a hybrid strategy - it uses blob log scan to get notified of changes, but it also does a background receipt based scan of the actual blobs as well. So even if a blob log is missed, the blob will eventually get processed.
For those of us who work in the IT services industry, using a service that has no guarantee of working is a deal-breaker for SLAs.
Any update here?
I too would appreciate this feature.