Skip to content

Conversation

amanrao23
Copy link
Member

@amanrao23 amanrao23 commented Oct 1, 2025

Packages impacted by this PR

@azure/cosmos

Issues associated with this PR

#35967

Describe the problem that is addressed by this PR

This PR is follow up of #35954 for fixing the default value of ppaf flags.
This PR makes the following changes:

  1. Always check if PPAF logic is enabled through GlobalEndpointManager (It contains the most recent value of PPAF settings in account). It is done this way to account for upcoming dynamic PPAF enablement.
  2. Remove PPAF feature usage tracking with useragent for now (need to come up with a better way).
  3. Disable PPAF if enableEndpointDiscovery is true.
  4. Code Cleanup

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Are there test cases added in this PR? (If not, why?)

N/A

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

@Copilot Copilot AI review requested due to automatic review settings October 1, 2025 06:09
@github-actions github-actions bot added the Cosmos label Oct 1, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the default value of PPAF (Partition-level Failover) flags by moving the partition-level failover configuration from the connection policy to the global endpoint manager. The change ensures that partition-level failover is enabled by default as intended.

Key Changes

  • Removed enablePartitionLevelFailover parameter from TimeoutFailoverRetryPolicy constructor
  • Updated all references to access partition-level failover settings through globalEndpointManager instead of connectionPolicy
  • Removed automatic PPAF feature flag tracking from user agent since it's now enabled by default

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
timeoutFailoverRetryPolicy.ts Removed enablePartitionLevelFailover parameter and updated condition to use globalEndpointManager
retryUtility.ts Removed enablePartitionLevelFailover parameter from TimeoutFailoverRetryPolicy constructor call
RequestHandler.ts Updated partition-level failover checks to use globalEndpointManager instead of connectionPolicy
globalEndpointManager.ts Removed refreshPPAFFeatureFlag call since PPAF is now enabled by default
platform.ts Removed automatic PPAF feature flag tracking from user agent and added TODO comment
ClientContext.ts Updated isPartitionLevelFailOverEnabled method to check globalEndpointManager instead of connectionPolicy

Copy link

github-actions bot commented Oct 1, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

@azure/cosmos

@ujjwalsoni1707
Copy link
Member

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants