Skip to content

Conversation

mangalaman93
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings March 13, 2025 01:57
@mangalaman93 mangalaman93 requested a review from a team as a code owner March 13, 2025 01:57
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an API for UID allocation starting from zero by introducing a new AllocateUIDs RPC in the gRPC API along with its corresponding client implementation in Go.

  • Implements a new function in zero.go to call the AllocateUIDs RPC.
  • Updates the gRPC generated code in protos/api.v25/api.v25_grpc.pb.go to include the new AllocateUIDs method and handler.
  • Adds new message definitions and RPC declaration in protos/api.v25.proto to support UID allocation.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
zero.go Adds the AllocateUIDs client function for allocating UIDs.
protos/api.v25/api.v25_grpc.pb.go Updates gRPC methods with the new AllocateUIDs implementation.
protos/api.v25.proto Adds RPC declaration and message definitions for AllocateUIDs.
Comments suppressed due to low confidence (2)

zero.go:19

  • Consider adding unit or integration tests for the AllocateUIDs function to validate correct behavior of the new UID allocation API call.
func (d *Dgraph) AllocateUIDs(ctx context.Context, howMany uint64) (uint64, uint64, error) {

protos/api.v25.proto:39

  • Ensure there are tests covering both the request and response messages for the AllocateUIDs RPC to validate the correctness of the proto definitions.
message AllocateUIDsRequest {

harshil-goel
harshil-goel previously approved these changes Mar 13, 2025
@mangalaman93 mangalaman93 force-pushed the aman/zero branch 3 times, most recently from c42dd1d to e8c85c4 Compare March 13, 2025 20:53
@mangalaman93 mangalaman93 changed the title Add API for Allocating UIDs from Zero Add API for Allocating UIDs, Timestamp and NS IDs from Zero Mar 13, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces an API to allocate UIDs, Timestamps, and Namespace IDs by adding a new AllocateIDs RPC call with corresponding proto definitions and gRPC stubs.

  • Added AllocateIDs RPC with its request and response messages along with a LeaseType enum in the proto file
  • Updated .trunk/trunk.yaml to upgrade the Go runtime version
  • Extended the generated gRPC code with client and server implementations for the new RPC

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
protos/api.v25.proto Adds AllocateIDs RPC, its request/response messages, and LeaseType
.trunk/trunk.yaml Updates the Go runtime from 1.23.5 to 1.24.1
protos/api.v25/api.v25_grpc.pb.go Integrates AllocateIDs method into the gRPC client and server stubs

@mangalaman93 mangalaman93 enabled auto-merge (squash) March 17, 2025 16:07
@mangalaman93 mangalaman93 disabled auto-merge March 18, 2025 20:31
@mangalaman93 mangalaman93 enabled auto-merge (squash) March 19, 2025 12:21
@mangalaman93 mangalaman93 merged commit e0f2028 into main Mar 19, 2025
4 checks passed
@mangalaman93 mangalaman93 deleted the aman/zero branch March 19, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants