client: remove prefix watch for resource group config#10920
Conversation
Signed-off-by: tongjian <1045931706@qq.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughIn ChangesNarrow controller config watch range
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: tongjian <1045931706@qq.com>
…ies/pd into enhancement/remove_prefix_watch
The WatchCount test overwrites the shared controller config key with DefaultConfig, which pollutes other config-related tests after removing the prefix watch. Save the original config and restore it on cleanup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: tongjian <1045931706@qq.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/integrations/mcs/resourcemanager/resource_manager_test.go`:
- Around line 566-573: The defer cleanup function returns early when
originalConfig.GetKvs() is empty, but this fails to clean up if the key
pd.ControllerConfigPathPrefixBytes was created during the test, leaving
persistent state behind. Instead of returning early when
len(originalConfig.GetKvs()) equals zero, add a call to suite.client.Delete with
suite.ctx and pd.ControllerConfigPathPrefixBytes to properly remove the key that
was added during the test. Keep the existing Put logic for when the original
configuration did have values.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5b4cd987-f229-46a4-afe8-2293a2a1506f
📒 Files selected for processing (1)
tests/integrations/mcs/resourcemanager/resource_manager_test.go
|
/retest |
|
/retest |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10920 +/- ##
==========================================
+ Coverage 79.15% 79.17% +0.01%
==========================================
Files 540 540
Lines 74801 74801
==========================================
+ Hits 59212 59223 +11
+ Misses 11405 11397 -8
+ Partials 4184 4181 -3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@YuhaoZhang00: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retest |
Signed-off-by: tongjian <1045931706@qq.com>
|
/retest |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lhy1024, okJiang, rleungx, YuhaoZhang00 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
7 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
What problem does this PR solve?
Issue Number: Close #10919
The resource group controller config watcher only needs to watch the controller config key, but it currently also passes
opt.WithPrefix(). This makes the watch range broader than necessary.What is changed and how does it work?
Check List
Tests
Release note
Summary by CodeRabbit
Bug Fixes
Tests