config: update client-go and change RUScale default value to 1.34#67320
Conversation
- Update client-go to latest master version - Change RUScale default from 5697.054498 to 1.34 Signed-off-by: disksing <i@disksing.com>
|
Review Complete Findings: 1 issues ℹ️ Learn more details on Pantheon AI. |
|
Hi @disksing. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
📝 WalkthroughWalkthroughBumped a tikv client dependency and changed default RU v2 scaling values in code and example config; updated tests and DEPS pin to align with the new scaling and dependency revision. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
|
Recreating with proper template |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@go.mod`:
- Line 127: Upstream client-go change bumped TiKV RU v2 default to 1.40 (commit
728676760deb) causing runtime divergence with TiDB's DefaultRUV2Config() which
remains 1.34; update the code that seeds TiKV client defaults
(pkg/config/config.go where TiKVClient is initialized from
tikvcfg.DefaultConfig()) to explicitly set the RU v2 scale to TiDB's value (use
the same constant or literal 1.34) after calling tikvcfg.DefaultConfig(), or
alternatively pin the dependency in go.mod to the prior client-go commit, so
runtime [tikv-client.ru-v2].ru-scale matches DefaultRUV2Config(); reference
DefaultRUV2TiKVConfig(), DefaultRUV2Config(), TiKVClient, and
tikvcfg.DefaultConfig() when making the change.
In `@pkg/config/config.go`:
- Around line 367-370: The test hardcodes RU v2 expectations that no longer
match DefaultRUV2Config().RUScale (1.34); update the assertions in
pkg/util/execdetails/execdetails_test.go (the test around the hardcoded 114198.0
/ 296136.0) to either compute expected values by applying
DefaultRUV2Config().RUScale (from DefaultRUV2Config / RUV2Config.RUScale) to the
fixture weights used by pkg/util/execdetails/ruv2_metrics.go, or replace the
literals with the recalculated numbers (≈26.86 and ≈181964.86) so the test
reflects the current scaling behavior.
In `@pkg/config/config.toml.example`:
- Around line 440-442: Update the explanatory comment for the ru-scale setting
to accurately describe the new default behavior (that ru-scale was changed from
5697.054498 to 1.34 and that this drastically reduces computed RU outputs) and
ensure the same updated wording is applied to the RUV2Config comment in
pkg/config/config.go; locate the ru-scale key in config.toml.example and the
RUV2Config struct/comment in config.go and replace the outdated "match legacy RU
values for compatibility" phrasing with a note that documents the prior value,
the new value, and the impact on RU calculations so operators are not misled.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 1b1a9e57-631e-4a40-9a84-a1da6e13d1b4
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (3)
go.modpkg/config/config.gopkg/config/config.toml.example
Signed-off-by: disksing <i@disksing.com>
|
/retest |
Signed-off-by: disksing <i@disksing.com>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
pkg/config/config.toml.example (1)
440-442:⚠️ Potential issue | 🟡 MinorUpdate stale
ru-scalecompatibility note.At Line 441, the comment still says this value is chosen to match legacy RU values, but Line 442 now sets
1.34. Please update this wording (and the matchingRUV2Config.RUScalecomment inpkg/config/config.go) so operators are not misled.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/config/config.toml.example` around lines 440 - 442, The comment for ru-scale is outdated and still claims the value matches legacy RU values while the file sets ru-scale = 1.34; update the human-facing comment in pkg/config/config.toml.example (the line above ru-scale) to remove or rephrase the "match legacy RU values" claim and instead state the actual purpose and rationale for the 1.34 value (e.g., "scale factor used to convert RU v2 float values into scaled integer values; set to 1.34 for current compatibility/rounding behavior"). Also update the corresponding Go doc comment for RUV2Config.RUScale in pkg/config/config.go to the same corrected wording so both descriptions are consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@pkg/config/config.toml.example`:
- Around line 440-442: The comment for ru-scale is outdated and still claims the
value matches legacy RU values while the file sets ru-scale = 1.34; update the
human-facing comment in pkg/config/config.toml.example (the line above ru-scale)
to remove or rephrase the "match legacy RU values" claim and instead state the
actual purpose and rationale for the 1.34 value (e.g., "scale factor used to
convert RU v2 float values into scaled integer values; set to 1.34 for current
compatibility/rounding behavior"). Also update the corresponding Go doc comment
for RUV2Config.RUScale in pkg/config/config.go to the same corrected wording so
both descriptions are consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7e64db84-0ee5-41bf-b245-cd91dcb2e02a
📒 Files selected for processing (3)
pkg/config/config.toml.examplepkg/config/config_test.gopkg/util/execdetails/execdetails_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
- pkg/config/config_test.go
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #67320 +/- ##
================================================
+ Coverage 77.7978% 77.9439% +0.1460%
================================================
Files 2022 1943 -79
Lines 555528 547818 -7710
================================================
- Hits 432189 426991 -5198
+ Misses 121595 120794 -801
+ Partials 1744 33 -1711
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Signed-off-by: disksing <i@disksing.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfzjywxk, nolouch, yudongusa 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 |
|
/test mysql-test |
1 similar comment
|
/test mysql-test |
|
@disksing: The specified target(s) for Use 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. |
|
@disksing: The specified target(s) for Use 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. |
|
/test unit-test |
|
@disksing: The specified target(s) for Use 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. |
What problem does this PR solve?
Issue Number: ref #67199
Problem Summary:
Update client-go dependency and change RUScale default value from 5697.054498 to 1.34.
based on suggestions from @likidu.
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Summary by CodeRabbit
Chores
Tests