Skip to content

Commit c58bfa7

Browse files
authored
[Identity] Adjust IMDS retry backoff (#35070)
This better aligns with other languages. Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
1 parent 072dfb1 commit c58bfa7

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

sdk/identity/azure-identity/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 1.16.0b3 (Unreleased)
3+
## 1.16.0 (Unreleased)
44

55
### Features Added
66

@@ -10,6 +10,8 @@
1010

1111
### Other Changes
1212

13+
- For IMDS requests in `ManagedIdentityCredential`, the retry backoff factor was reduced from 2 to 0.8 in order to avoid excessive retry delays and improve responsiveness. Users can customize this setting with the `retry_backoff_factor` parameter: `ManagedIdentityCredential(retry_backoff_factor=2)`. ([#35070](https://github.com/Azure/azure-sdk-for-python/pull/35070))
14+
1315
## 1.16.0b2 (2024-03-05)
1416

1517
### Features Added

sdk/identity/azure-identity/azure/identity/_credentials/imds.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
PIPELINE_SETTINGS = {
2323
"connection_timeout": 2,
24-
"retry_backoff_factor": 2,
24+
# Five retries, with each retry sleeping for [0.0s, 1.6s, 3.2s, 6.4s, 12.8s] between attempts.
25+
"retry_backoff_factor": 0.8,
2526
"retry_backoff_max": 60,
2627
"retry_on_status_codes": [404, 410, 429] + list(range(500, 600)),
2728
"retry_status": 5,

sdk/identity/azure-identity/azure/identity/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
VERSION = "1.16.0b3"
5+
VERSION = "1.16.0"

sdk/identity/azure-identity/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity",
3939
keywords="azure, azure sdk",
4040
classifiers=[
41-
"Development Status :: 4 - Beta",
41+
"Development Status :: 5 - Production/Stable",
4242
"Programming Language :: Python",
4343
"Programming Language :: Python :: 3 :: Only",
4444
"Programming Language :: Python :: 3",

0 commit comments

Comments
 (0)