Azure / Azure/azure-functions-host

New Feature: blobTrigger / Storage Queue - Pass Action Type to Trigger (e.g. "New", "Update"

Open
#1,611 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

Currently nothing is passed which allows you to know if a blogTrigger or Storage Queue Trigger was triggered by a file creation, or a file modification. This limits the options you have for handling "new" items differently. This requires us to recalculate everything we do for a new file even on a "modify", when in reality only a few small things would need to be updated in our table storage.

This data could easily be added to the bindings or bindingData, or simply allow writing triggers that are only triggered by one type of operation.

This would be extremely useful in conjunction with #1612.

#### Repro steps

1) Setup a Blob or Storage Queue Trigger on a store.

2) Add a file and pause when your trigger is called.

NOTE: There is nothing that seems to indicate that it was a new file.

3) Upload a new version of the same file and do the same.

NOTE: There is no way to tell those triggers apart.

#### Expected behavior

Its expected that you can tell what type of action caused the trigger to be called.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how blobTrigger and Storage Queue Trigger invocations populate bindings or bindingData, then compare the repro steps for file creation and modification. Determine how the action type should be exposed or filtered, and verify that consumers can distinguish new files from updated versions without recalculating everything.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.