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 #248

Closed
wants to merge 4 commits into from

Conversation

hallvictoria
Copy link
Contributor

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

guptaheena and others added 4 commits September 26, 2024 10:34
* mysql binding support

* fix linting

* Update __init__.py

* fix indentation

---------

Co-authored-by: wangbill <gggwang1993@gmail.com>
Co-authored-by: Gavin Aguiar <80794152+gavin-aguiar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants