mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 04:18:07 +00:00
upgrade azure-storage-blob to 12.8.0 (#625)
Note, this makes use of the new feature, `ContainerClient.exists()` which models our existing mechanism for doing container existence checking.
This commit is contained in:
@ -10,7 +10,7 @@ import urllib.parse
|
|||||||
from typing import Dict, Optional, Union, cast
|
from typing import Dict, Optional, Union, cast
|
||||||
|
|
||||||
from azure.common import AzureHttpError, AzureMissingResourceHttpError
|
from azure.common import AzureHttpError, AzureMissingResourceHttpError
|
||||||
from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError
|
from azure.core.exceptions import ResourceExistsError
|
||||||
from azure.storage.blob import (
|
from azure.storage.blob import (
|
||||||
BlobClient,
|
BlobClient,
|
||||||
BlobSasPermissions,
|
BlobSasPermissions,
|
||||||
@ -74,11 +74,8 @@ def find_container(
|
|||||||
# increased IOP rates, this should be a slight optimization
|
# increased IOP rates, this should be a slight optimization
|
||||||
for account in reversed(accounts):
|
for account in reversed(accounts):
|
||||||
client = get_blob_service(account).get_container_client(container)
|
client = get_blob_service(account).get_container_client(container)
|
||||||
try:
|
if client.exists():
|
||||||
client.get_container_properties()
|
|
||||||
return client
|
return client
|
||||||
except ResourceNotFoundError:
|
|
||||||
continue
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ azure-mgmt-storage~=17.0.0
|
|||||||
azure-mgmt-resource~=16.0.0
|
azure-mgmt-resource~=16.0.0
|
||||||
azure-mgmt-subscription~=1.0.0
|
azure-mgmt-subscription~=1.0.0
|
||||||
azure-nspkg==3.0.2
|
azure-nspkg==3.0.2
|
||||||
azure-storage-blob==12.7.0
|
azure-storage-blob==12.8.0
|
||||||
azure-storage-common==2.1.0
|
azure-storage-common==2.1.0
|
||||||
azure-storage-queue==12.1.5
|
azure-storage-queue==12.1.5
|
||||||
jinja2~=2.11.3
|
jinja2~=2.11.3
|
||||||
|
@ -9,7 +9,7 @@ dataclasses~=0.6
|
|||||||
pydantic~=1.7.3 --no-binary=pydantic
|
pydantic~=1.7.3 --no-binary=pydantic
|
||||||
memoization~=0.3.1
|
memoization~=0.3.1
|
||||||
msrestazure==0.6.4
|
msrestazure==0.6.4
|
||||||
azure-storage-blob~=12.3
|
azure-storage-blob~=12.8
|
||||||
azure-applicationinsights==0.1.0
|
azure-applicationinsights==0.1.0
|
||||||
tenacity==6.3.1
|
tenacity==6.3.1
|
||||||
docstring_parser==0.7.3
|
docstring_parser==0.7.3
|
||||||
|
Reference in New Issue
Block a user