-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: The configfile interface cannot correctly obtain configuration t… #5198
base: master
Are you sure you want to change the base?
fix: The configfile interface cannot correctly obtain configuration t… #5198
Conversation
…hrough grayscale labels
WalkthroughThe recent changes enhance the gray release rule system's functionality by modifying key methods to accept additional parameters, specifically Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ConfigFileController
participant GrayReleaseRulesHolder
Client->>ConfigFileController: Request configuration
ConfigFileController->>GrayReleaseRulesHolder: check hasGrayReleaseRule(appId, clusterName, clientIp, clientLabel, namespace)
GrayReleaseRulesHolder-->>ConfigFileController: Returns gray release rule status
ConfigFileController-->>Client: Respond with configuration
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA dongsheng.qi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/grayReleaseRule/GrayReleaseRulesHolder.java (1 hunks)
- apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/grayReleaseRule/GrayReleaseRulesHolderTest.java (2 hunks)
- apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileController.java (4 hunks)
- apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileControllerTest.java (2 hunks)
Additional comments not posted (6)
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/grayReleaseRule/GrayReleaseRulesHolderTest.java (2)
112-123
: Test case updates are appropriate.The changes to the test cases correctly reflect the updated method signature of
hasGrayReleaseRule
, ensuring that the additional parameterssomeClusterName
andsomeClientLabel
are tested. This enhances the specificity and robustness of the tests.
147-156
: Additional test case updates are appropriate.These changes further ensure that the
hasGrayReleaseRule
method is tested with the new parameters, maintaining consistency across the test suite.apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileControllerTest.java (2)
98-98
: Mock setup updates are appropriate.The mock setup for
hasGrayReleaseRule
has been updated to include the new parameters, ensuring that the mock behavior aligns with the updated method signature.
202-202
: Test case updates are appropriate.The changes to the test case correctly reflect the updated method signature of
hasGrayReleaseRule
, ensuring that the additional parameters are tested.apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/grayReleaseRule/GrayReleaseRulesHolder.java (1)
159-184
: Method enhancements are well-implemented.The
hasGrayReleaseRule
method has been expanded to include additional parameters and logic for checking both IP-based and label-based rules. These changes enhance the method's capability to manage gray release rules comprehensively.apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileController.java (1)
178-178
: Update method signature forhasGrayReleaseRule
.The method signature has been updated to include
clusterName
andclientLabel
, which allows for more granular control over gray release rules. Ensure that all calls to this method are updated accordingly in the codebase.
.../src/main/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileController.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileController.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileController.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileController.java (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileController.java
Please link the email |
…hrough grayscale labels
What's the purpose of this PR
fix configfile interface cannot recognize grayscale labels
XXXXX
Which issue(s) this PR fixes:
fix configservice
Follow this checklist to help us incorporate your contribution quickly and easily:
write rule, the cache of reversedGrayReleaseRuleCache hadn't concept of allIp
read rule, There is no solution identified by gray label
Summary by CodeRabbit
New Features
clusterName
andclientLabel
.Bug Fixes
Tests
Documentation