Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
a47452e
sync PPAF
simorenoh Jun 15, 2025
b8228e7
async changes
simorenoh Jun 16, 2025
151a2fa
Update test_per_partition_automatic_failover_async.py
simorenoh Jun 16, 2025
b9e0a08
CI fixes
simorenoh Jun 16, 2025
e4d7046
changelog
simorenoh Jun 16, 2025
09e7163
broken link
simorenoh Jun 16, 2025
4e28f66
Update test_location_cache.py
simorenoh Jun 16, 2025
c5319e8
change PPAF detection logic
simorenoh Jun 16, 2025
eba6093
Update _global_partition_endpoint_manager_circuit_breaker_core.py
simorenoh Jun 16, 2025
2ec5c5d
Update _global_partition_endpoint_manager_circuit_breaker_core.py
simorenoh Jun 17, 2025
62d7be0
fix tests and remove environment variable
tvaron3 Jun 18, 2025
b57949d
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
tvaron3 Jun 18, 2025
24b8415
fix tests
tvaron3 Jun 23, 2025
9595327
revert excluded locations change
tvaron3 Jul 2, 2025
8911ef5
fix analyze
tvaron3 Jul 3, 2025
25dbeb3
test excluded locations
tvaron3 Jul 7, 2025
d61a9a9
Add different error handling for 503 and 408s, update README
tvaron3 Jul 8, 2025
3f8ac23
Merge branch 'main' into cosmos-ppaf
simorenoh Jul 30, 2025
f1c69ed
mypy, cspell, pylint
simorenoh Jul 31, 2025
9306d15
remove tag from tests since config is service based
simorenoh Jul 31, 2025
bd07d83
add threshold-based retries for 408, 5xx errors
simorenoh Aug 7, 2025
80cc824
Merge branch 'main' into cosmos-ppaf
simorenoh Aug 8, 2025
2e5838c
update constant use, rollback session token PR change
simorenoh Aug 8, 2025
8b7d181
threshold based retries
simorenoh Aug 18, 2025
f25b660
Merge branch 'main' into cosmos-ppaf
simorenoh Aug 18, 2025
d8ed980
Update _base.py
simorenoh Aug 19, 2025
fcd5c60
cspell, test fixes
simorenoh Aug 19, 2025
93c76ad
Merge branch 'main' into cosmos-ppaf
simorenoh Aug 19, 2025
467a95d
Update _service_unavailable_retry_policy.py
simorenoh Aug 19, 2025
b9aa01c
mypy, pylint
simorenoh Aug 19, 2025
64f95e3
503 behavior change, use regional contexts
simorenoh Aug 21, 2025
d05fc5e
mypy, pylint, tests
simorenoh Aug 21, 2025
85b2007
special-casing 503s
simorenoh Aug 21, 2025
f8fa70a
small fix
simorenoh Aug 21, 2025
e5c5ac5
exclude region tests
simorenoh Aug 21, 2025
ccd9def
session retry tests
simorenoh Aug 22, 2025
1dccc5d
pylint, cspell
simorenoh Aug 22, 2025
ebf0b0d
Merge branch 'main' into cosmos-ppaf
simorenoh Aug 22, 2025
c2bb93a
change errors since 503 is now retried directly
simorenoh Aug 25, 2025
c3879d8
Update sdk/cosmos/azure-cosmos/README.md
simorenoh Aug 26, 2025
1d57bf2
address comments
simorenoh Aug 26, 2025
eec77e7
Update _service_unavailable_retry_policy.py
simorenoh Aug 26, 2025
4c2bf32
small test updates for 503 behavior
simorenoh Aug 26, 2025
05654a9
further comments
simorenoh Aug 27, 2025
f982d21
Update test_per_partition_circuit_breaker_sm_mrr.py
simorenoh Aug 27, 2025
d9ca7a4
test fixes
simorenoh Aug 27, 2025
f1dce5d
Update test_excluded_locations.py
simorenoh Aug 27, 2025
1582cf3
small improvement to region-finding
simorenoh Aug 29, 2025
8f7ec0c
pylint
simorenoh Aug 29, 2025
1c10349
Merge branch 'main' into cosmos-ppaf
simorenoh Aug 29, 2025
effb6d1
Update _global_partition_endpoint_manager_per_partition_automatic_fai…
simorenoh Aug 29, 2025
1e773f5
address comments, add threshold lock
simorenoh Aug 29, 2025
24a44d9
add more comments
simorenoh Aug 29, 2025
d07610a
Merge branch 'main' into cosmos-ppaf
simorenoh Sep 2, 2025
f984204
Merge branch 'main' into cosmos-ppaf
simorenoh Sep 4, 2025
c772092
edge cases
simorenoh Sep 19, 2025
143cf17
Merge branch 'main' into cosmos-ppaf
simorenoh Sep 19, 2025
ef9f73a
Merge branch 'main' into cosmos-ppaf
simorenoh Oct 2, 2025
3acda24
changes from testing
simorenoh Oct 7, 2025
9a6b17b
pylint
simorenoh Oct 7, 2025
c3e0035
Merge branch 'main' into cosmos-ppaf
simorenoh Oct 8, 2025
8f75444
fixes pylint/mypy
simorenoh Oct 8, 2025
0ccd9bf
mypy complaining about assigning str to none
simorenoh Oct 8, 2025
f4e4d65
testing changes - will roll back later
simorenoh Oct 8, 2025
4e276e1
Merge branch 'cosmos-ppaf' of https://github.com/Azure/azure-sdk-for-…
simorenoh Oct 8, 2025
8f87b13
Update _endpoint_discovery_retry_policy.py
simorenoh Oct 9, 2025
3e1f6be
Update _asynchronous_request.py
simorenoh Oct 17, 2025
42817fc
add user agent feature flags
simorenoh Oct 17, 2025
23f3b0d
Merge branch 'main' into cosmos-ppaf
simorenoh Oct 20, 2025
65f9e01
Update test_per_partition_automatic_failover_async.py
simorenoh Oct 20, 2025
e15e43d
move user agent logic
simorenoh Oct 24, 2025
0d7e887
sync and async match, remove print statements
simorenoh Oct 29, 2025
aa3b641
leftover timer
simorenoh Oct 29, 2025
799f6de
Update _retry_utility.py
simorenoh Oct 30, 2025
36249b4
use constants
simorenoh Oct 30, 2025
f5cd24b
Merge branch 'main' into cosmos-ppaf
simorenoh Oct 31, 2025
0495c7b
pylint
simorenoh Oct 31, 2025
335e10e
Merge branch 'main' into cosmos-ppaf
simorenoh Nov 17, 2025
2f004b7
Merge branch 'main' into cosmos-ppaf
simorenoh Nov 17, 2025
8639093
Update CHANGELOG.md
simorenoh Nov 17, 2025
5b3815f
react to comments
simorenoh Nov 19, 2025
e31d674
Update _retry_utility.py
simorenoh Nov 19, 2025
e55871c
mypy pylint
simorenoh Nov 19, 2025
0463a3f
test fixes
simorenoh Nov 20, 2025
cdfdc01
add lock to failure additions
simorenoh Nov 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CI fixes
  • Loading branch information
simorenoh committed Jun 16, 2025
commit b9e0a081bf572f9bb5fb002f20aca9edfad6ac95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from azure.cosmos._routing.routing_range import PartitionKeyRangeWrapper

if TYPE_CHECKING:
from azure.cosmos._cosmos_client_connection import CosmosClientConnection
from azure.cosmos.aio._cosmos_client_connection_async import CosmosClientConnection

logger = logging.getLogger("azure.cosmos._GlobalPartitionEndpointManagerForPerPartitionAutomaticFailover")

Expand Down Expand Up @@ -126,8 +126,7 @@ def resolve_service_endpoint_for_partition(
partition_failover_info.current_regional_endpoint = request.location_endpoint_to_route
self.partition_range_to_failover_info[pk_range_wrapper] = partition_failover_info
return self._resolve_service_endpoint(request)
else:
return self._resolve_service_endpoint_for_partition_circuit_breaker(request, pk_range_wrapper)
return self._resolve_service_endpoint_for_partition_circuit_breaker(request, pk_range_wrapper)

def compute_available_preferred_regions(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def try_move_to_next_location(self, available_account_regional_endpoints: Set[st

return False

class _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync(_GlobalPartitionEndpointManagerForCircuitBreakerAsync):
class _GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync(
_GlobalPartitionEndpointManagerForCircuitBreakerAsync):
"""
This internal class implements the logic for partition endpoint management for
geo-replicated database accounts.
Expand Down Expand Up @@ -126,8 +127,7 @@ def resolve_service_endpoint_for_partition(
partition_failover_info.current_regional_endpoint = request.location_endpoint_to_route
self.partition_range_to_failover_info[pk_range_wrapper] = partition_failover_info
return self._resolve_service_endpoint(request)
else:
return self._resolve_service_endpoint_for_partition_circuit_breaker(request, pk_range_wrapper)
return self._resolve_service_endpoint_for_partition_circuit_breaker(request, pk_range_wrapper)

def compute_available_preferred_regions(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from test_per_partition_circuit_breaker_mm import (REGION_1, REGION_2, PK_VALUE, BATCH,
write_operations_and_errors, perform_write_operation)

# cspell:disable-file
# cspell:disable

@pytest.fixture(scope="class", autouse=True)
def setup_teardown():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from test_per_partition_circuit_breaker_mm import REGION_1, REGION_2, PK_VALUE, BATCH, write_operations_and_errors
from test_per_partition_circuit_breaker_mm_async import perform_write_operation

# cspell:disable-file
# cspell:disable

@pytest.fixture(scope="class", autouse=True)
def setup_teardown():
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/live-platform-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
{
"PerPartitionAutomaticFailoverTestConfig": {
"Ubuntu2004_313_ppaf": {
"Ubuntu2004_313_partition_automatic_failover": {
"OSVmImage": "env:LINUXVMIMAGE",
"Pool": "env:LINUXPOOL",
"PythonVersion": "3.13",
Expand Down
Loading