0

I would like to run my blob storage trigger over existing files continuously for testing purposes, but after the trigger has run once over the files, I can't get it to run again on those existing files. This message is what I receive in the logs:

Blob '[some file]' will be skipped for function 'BlobTrigger1' because this blob with ETag '" 
[tag]"' has already been processed. PollId: '[poll id]'. Source: 'ContainerScan'.

Is there a way I can reset that "ContainerScan" somehow so I can run the trigger again over the existing files?

BlakeB9
  • 345
  • 1
  • 3
  • 13
  • I'm pretty sure if you delete the function and put it back, it will pick everything up again. If you have literally 1000's of blobs then that may be an accepted approach, otherwise, just re-upload your files, that'll trigger the function again. – Skin Mar 10 '22 at 23:18
  • 1
    Thanks for the reply @Skin I actually had been deleting the files and re uploading them on a smaller sample size of files, but knew when I eventually went to go test it on all the files I wanted the trigger to run on, I'd probably run into some errors. And wouldn't be able to just delete and re upload them. Also, unfortunately deleting the function and re deploying it hadn't worked either due to the file being tagged. I ended up finding how to remove those tags and will probably end up answering my own question here shortly. – BlakeB9 Mar 11 '22 at 16:33
  • Yes, definitely post your answer, would be good for the community to know how. – Skin Mar 11 '22 at 20:04

1 Answers1

1

For anyone else that may come across this...

Look inside your storage account. You should have a container in there called 'azure-webjobs-hosts' click on it, and then click on the folder called 'blobreceipts'. This folder is holding some data that is used to recognize whether or not your function has been run over specific blobs. Just delete the blobs found inside of this folder to be able to run your trigger again over the existing files.

Helpful tip: Use Storage Explorer (Desktop edition) to select all and delete blobs in that folder.

EDIT: So this seemed to work, however, I'm noticing that this can be inconsistent.

BlakeB9
  • 345
  • 1
  • 3
  • 13
  • Did you ever encounter scenario where the Function would not trigger even after deleting the blob receipts? How did you get around that? – Ryan Aug 28 '23 at 23:43
  • @Ryan Hey Ryan, I don't remember exactly. Try stopping your entire function app, delete the receipts, then start back up the function app and see if that helps. – BlakeB9 Aug 30 '23 at 22:26