question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ContainerClient retry options broken?

See original GitHub issue

https://github.com/Azure/azure-sdk-for-python/blob/ffe6a56bff6cd01493e47d3e50957c748a7ce632/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py#L169

No matter how I set the retry options, they are not being used by the below code -

        blob_container_client = ContainerClient(account_url=self.url,
                                                credential=self.sas_token,
                                                container_name=self.container_name,
                                                retry_total=2,
                                                retry_connect=2,
                                                retry_read=2,
                                                retry_status=2,
                                                retry_mode=RetryMode.Fixed,
                                                retry_backoff_factor=0.8
                                                )

Is it because the sdk code in ContainerClient --> __init__ is NOT passing the **kwargs to AzureBlobStorage ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tasherif-msftcommented, Jan 22, 2021

Hi @shahdadpuri-varun, which blob operation are you trying to perform where these are failing? Note that ContainerClient is inheriting from StorageAccountHostsMixin. We initialize our pipeline there where we also initialize our policies. Including our Retry policies. You can find this if you had dug deeper into the inherited class. Eventually we hit: https://github.com/Azure/azure-sdk-for-python/blob/91b3438381185e3771a719ef907d4f4ea7fa40d4/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/base_client.py#L235 Where we pass **kwargs and initialize the retry policy.

1reaction
shahdadpuri-varuncommented, Jan 22, 2021

Thanks a lot @tasherif-msft You have been very helpful today!! 🤘

Read more comments on GitHub >

github_iconTop Results From Across the Web

BlobDownloadToBufferOptions interface | Microsoft Learn
With this option, every additional retry means an additional FileClient.download() request will be made from the broken point, until the requested block has ......
Read more >
Python Azure module error handling TCP 104 not being caught
REFERENCE: Connection broken: ConnectionResetError(104, 'Connection reset by peer') error while streaming.
Read more >
azure.storage.blob package - NET
This client provides operations to retrieve and configure the account properties as well as list, create and delete containers within the account. For ......
Read more >
azblob - Go Packages
The pipeline specifies things like retry policies, logging, ... BatchTransferOptions identifies options used by DoBatchTransfer.
Read more >
Why Can't I Connect to Kafka? | Troubleshoot Connectivity
Docker host (e.g., your laptop) – Container: Client | Container: Kafka ... in Docker), you have a few options, none of which are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found