Skip to content

feat: support enable/disable cloud location provider via configuration.#1799

Merged
SkyeBeFreeman merged 2 commits intoTencent:2024from
SkyeBeFreeman:24/cloud-location
Mar 12, 2026
Merged

feat: support enable/disable cloud location provider via configuration.#1799
SkyeBeFreeman merged 2 commits intoTencent:2024from
SkyeBeFreeman:24/cloud-location

Conversation

@SkyeBeFreeman
Copy link
Collaborator

PR Type

Feature.

Describe what this PR does for and how you did.

Support enabling or disabling the cloud location provider via Spring configuration property spring.cloud.polaris.location.cloud.enabled (default: true).

Key changes:

  • Add PolarisLocationProperties with inner Cloud class to bind spring.cloud.polaris.location.cloud.enabled
  • Add PolarisLocationConfigModifier that adds the cloud provider when enabled, or removes it when disabled
  • Register both beans in PolarisContextAutoConfiguration
  • Add LOCATION_ORDER constant to OrderConstant.Modifier
  • Add unit tests: PolarisLocationConfigModifierTest and PolarisLocationPropertiesTest

Adding the issue link (#xxx) if possible.

Checklist

  • Add information of this PR to CHANGELOG.md in root of project.
  • Add documentation in javadoc or comment below the PR if necessary.

SkyeBeFreeman and others added 2 commits March 11, 2026 16:17
Signed-off-by: Haotian Zhang <928016560@qq.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Haotian Zhang <928016560@qq.com>
@SkyeBeFreeman SkyeBeFreeman requested a review from fuyuwei01 March 11, 2026 11:33
@SkyeBeFreeman SkyeBeFreeman added this to the 2.1.2.x milestone Mar 11, 2026
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 88.37209% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.94%. Comparing base (0b9d8cd) to head (22473a9).
⚠️ Report is 1 commits behind head on 2024.

Files with missing lines Patch % Lines
...oud/polaris/context/PostInitPolarisSDKContext.java 62.50% 0 Missing and 3 partials ⚠️
...config/location/PolarisLocationConfigModifier.java 89.47% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               2024    #1799      +/-   ##
============================================
+ Coverage     53.86%   53.94%   +0.08%     
  Complexity      152      152              
============================================
  Files           475      477       +2     
  Lines         13930    13966      +36     
  Branches       1730     1734       +4     
============================================
+ Hits           7503     7534      +31     
- Misses         5821     5822       +1     
- Partials        606      610       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@fuyuwei01 fuyuwei01 left a comment

Choose a reason for hiding this comment

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

LGTM.

@SkyeBeFreeman SkyeBeFreeman merged commit 0f2d707 into Tencent:2024 Mar 12, 2026
8 checks passed
@SkyeBeFreeman SkyeBeFreeman deleted the 24/cloud-location branch March 12, 2026 02:55
SkyeBeFreeman added a commit that referenced this pull request Mar 12, 2026
…n. (#1799)

Signed-off-by: Haotian Zhang <928016560@qq.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Haotian Zhang <928016560@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants