-
Notifications
You must be signed in to change notification settings - Fork 2
fix: validating undefined connection strings #44
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YunchuWang
reviewed
May 13, 2024
...-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/storageStreamDownloader.py
Outdated
Show resolved
Hide resolved
YunchuWang
reviewed
May 13, 2024
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/blobClient.py
Outdated
Show resolved
Hide resolved
YunchuWang
reviewed
Jul 2, 2024
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Show resolved
Hide resolved
…-extensions into hallvictoria/invalid-connection-string
YunchuWang
reviewed
Jul 8, 2024
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Outdated
Show resolved
Hide resolved
YunchuWang
approved these changes
Jul 8, 2024
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Outdated
Show resolved
Hide resolved
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Outdated
Show resolved
Hide resolved
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Outdated
Show resolved
Hide resolved
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Outdated
Show resolved
Hide resolved
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Outdated
Show resolved
Hide resolved
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Outdated
Show resolved
Hide resolved
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Outdated
Show resolved
Hide resolved
...unctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/containerClient.py
Outdated
Show resolved
Hide resolved
azurefunctions-extensions-bindings-blob/azurefunctions/extensions/bindings/blob/utils.py
Outdated
Show resolved
Hide resolved
gavin-aguiar
approved these changes
Aug 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The extension obtains the connection string by getting the corresponding environment variable / App Setting. If the connection string variable name is not an app setting, the connection property is set to None. When creating a client type and the connection is None, the azure-storage-blob sdk throws an error saying:
AttributeError("'NoneType' object has no attribute 'rstrip'")
.This is not a clear error, so this adds validation on the connection string in the extension side. If the connection is None, an error will be thrown saying
ValueError('Storage account connection string NAME does not exist. Please make sure that it is a defined App Setting.')
The purpose of this PR is not to perform validation on the connection string object. The sdk already does this. The goal of this is to improve the error in the specific case where the connection string is formatted correctly but does not have corresponding value set.
ValueError('Connection string missing required connection details.')
ValueError: Connection string is either blank or malformed.
.