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

WebJobs Extension: Allow binding to BlobContainerClient without blob #37124

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

aishwaryabh
Copy link
Contributor

Contributing to the Azure SDK

resolves Azure/azure-functions-dotnet-worker#1337

For binding BlobContainerClient as an input binding, we are required to provide blob name in the result such as BlobInput("input-container/blob-name"). We should be allowed to do this without providing the blob name, and currently we run into an error if you try to just put down the container name:
Invalid blob path specified : 'input-container'. Blob identifiers must be in the format 'container/blob'

This PR loosens the parsing and validating checks by adding a new parameter to BlobPath.ParseAndValidate called isParameterBindingData. This value is only set to true if we are binding to a parameter binding data type and then skips some of the checks which caused this to fail initially.

We have added a check in the dotnet worker to ensure that blob name cannot be null if we are not binding to a BlobContainerClient, which is the check we are skipping on the webjobs extension.

@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files) labels Jun 20, 2023
@github-actions
Copy link

Thank you for your contribution @aishwaryabh! We will review the pull request and get back to you soon.

@aishwaryabh aishwaryabh changed the title Allow binding to BlobContainerClient without blob WebJobs Extension: Allow binding to BlobContainerClient without blob Jun 20, 2023
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

Copy link
Member

@seanmcc-msft seanmcc-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the changelog.

@amnguye
Copy link
Member

amnguye commented Jun 23, 2023

/azp run net - storage - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@seanmcc-msft
Copy link
Member

/check-enforcer override

@seanmcc-msft seanmcc-msft merged commit 8c4faba into Azure:main Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SDK Binding - Blob] Binding to BlobContainerClient should not require you to provide a blob path
4 participants