*: update kvproto to apiv3#11024
Conversation
Signed-off-by: disksing <i@disksing.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Warning Review limit reached
Next review available in: 23 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR updates kvproto and migrates keyspace, GC, and TSO code from direct protobuf fields to generated oneof wrappers and getter accessors. Related tests, API serialization, dependency files, and keyspace gRPC compatibility are updated. Changeskvproto oneof migration
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
server/apiv2/handlers/keyspace.go (1)
300-300: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePrefer
strconv.FormatUintover castinguint32toint.While casting to
intis safe on 64-bit architectures, it is generally more idiomatic to use unsigned formatting for unsigned integers rather than casting them to signed variants.♻️ Proposed refactor
- resp.NextPageToken = strconv.Itoa(int(scanned[len(scanned)-1].GetId())) + resp.NextPageToken = strconv.FormatUint(uint64(scanned[len(scanned)-1].GetId()), 10)🤖 Prompt for 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. In `@server/apiv2/handlers/keyspace.go` at line 300, Update the NextPageToken assignment in the keyspace handler to format scanned[len(scanned)-1].GetId() with strconv.FormatUint, converting it only to the required unsigned integer type and removing the uint32-to-int cast.
🤖 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 `@pkg/keyspace/keyspace.go`:
- Around line 553-561: Move the manager.keyspaceNameLookup.Store call out of the
RunInTxn callback and perform it only after the enclosing transaction returns
successfully. Keep the storage update inside the transaction, and ensure the
cache is not mutated when the transaction fails or commit encounters a CAS
mismatch.
---
Nitpick comments:
In `@server/apiv2/handlers/keyspace.go`:
- Line 300: Update the NextPageToken assignment in the keyspace handler to
format scanned[len(scanned)-1].GetId() with strconv.FormatUint, converting it
only to the required unsigned integer type and removing the uint32-to-int cast.
🪄 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: 2146e9a5-68fc-4eef-aebb-6a5b35f47316
⛔ Files ignored due to path filters (4)
client/go.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sumtests/integrations/go.sumis excluded by!**/*.sumtools/go.sumis excluded by!**/*.sum
📒 Files selected for processing (21)
client/clients/tso/stream.goclient/gc_client.goclient/go.modclient/http/types.goclient/keyspace_client.goclient/keyspace_client_test.goclient/servicediscovery/tso_service_discovery.gogo.modpkg/gc/gc_state_manager.gopkg/gc/gc_state_manager_test.gopkg/keyspace/keyspace.gopkg/keyspace/keyspace_test.gopkg/mcs/resourcemanager/server/manager_test.gopkg/storage/keyspace_test.gopkg/utils/tsoutil/tso_proto_factory.goserver/apiv2/handlers/keyspace.goserver/forward.goserver/gc_service.goserver/keyspace_service.gotests/integrations/go.modtools/go.mod
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
|
@disksing: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11024 +/- ##
==========================================
+ Coverage 79.23% 79.25% +0.02%
==========================================
Files 541 541
Lines 76035 76053 +18
==========================================
+ Hits 60245 60275 +30
+ Misses 11545 11534 -11
+ Partials 4245 4244 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/test pull-unit-test-next-gen-3 |
What problem does this PR solve?
Issue Number: close #11025
The kvproto APIV3 branch changes several keyspace-related protobuf fields to oneofs. PD needs to consume the latest definitions and adapt the affected requests, responses, and test fixtures.
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Release note
Summary by CodeRabbit
kvprotodependency to the newer revision.