Skip to content
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

fix: value resolution for BlobSource.EVENT_GRID #247

Closed
wants to merge 3 commits into from

Conversation

hallvictoria
Copy link
Contributor

@hallvictoria hallvictoria commented Sep 26, 2024

When defining a BlobTrigger using BlobSource.EVENT_GRID, the source value was not being resolved correctly, and the error below was being thrown. This is because the host was receiving EVENT_GRID as the source value, instead of the correct value "EventGrid". This changes what source is set to in the BlobTrigger decorator. If source is defined, source is set to the EVENT_GRID value. If source is not defined, source is set to null and is ignored.

@app.blob_trigger(arg_name="myblob",
                  path="mycontainer",
                  data_type=func.DataType.STRING,
                  source = func.BlobSource.EVENT_GRID,
                  connection="AzureWebJobsStorage") 
The 'blob_trigger' function is in error: Unable to configure binding 'myblob' of type 'blobTrigger'. This may indicate invalid function.json properties. Could not convert 'EVENT_GRID' to BlobTriggerSource. Error converting value "EVENT_GRID" to type 'Microsoft.Azure.WebJobs.BlobTriggerSource'. Path 'source', line 1, position 165. Requested value 'EVENT_GRID' was not found.

Fixes: Azure/azure-functions-python-worker#1582

@hallvictoria hallvictoria marked this pull request as ready for review September 26, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] EventGrid enum doesn't work and need to use "Event Grid" string
2 participants