Open rustd opened 8 years ago
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"?>
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.
any update?
We could really do with this, any update?
Another here that would like this feature in Functions. Why? Because you cant mount blob storage in Non-Linux Web Apps.
This would be really useful. End users don't like using Blobs (trying to teach 'Ernie' from Accounts to use Storage explorer is a non-starter when he's been accessing files from an 'S:' Drive for 25 years).
Having input & output for Storage Account File Shares would be really useful.
It's been 5 years since the original post though, can't see it'll get picked up any time soon..
I have some use cases for this as well; please finally support this.
Looks like we're closer to being able to do this.. I see they have Azure Storage Logs as a preview feature, which is along the right lines for being able to trigger something from changes in the File Share.
https://docs.microsoft.com/en-us/answers/questions/153703/azure-trigger-function-for-file-share.html
Shame it isn't generally available yet.. could really do with this for a solution we're trying to put together. Sigh.
Any updates on the matter??
Any updates?
Please implement this feature. It will be really useful
We would also like to see this feature
@MisinformedDNA For the time being, does it make sense to poll the file share and find out changes based on LastModifiedAt and Length? We also need to have an active mapping or table somewhere to compare the changes in the share - add, delete, modified.
@gautamsamal A SHA is probably best, but I just use LastModifiedAt. Length can be misleading if the content changes but the length stays the same.
Any updates?
Adding myself in here, this feature would make a world of difference for so many!!!
Jumping onto the thread, hoping for implementation!
This would make a huge difference. Hoping it can be implemented.
Please implement this, it would make a huge difference to my solutions.
Hoping for implementation too! We need it urgently.
Has anyone tried this? https://docs.microsoft.com/en-us/azure/storage/files/storage-files-monitoring?tabs=azure-portal
I am able to work out an alternative solution for now with the diagnostics logs. I am pushing it to an event hub and then filtering out the write events
fileEvent.OperationName == "Write" || fileEvent.OperationName == "PutRange"
Needed to add also a data layer to compare old vs new files and as well as a check for open file handles. So far it seems to be working.
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/