Skip to content
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

Implement ngt property get API #2584

Merged
merged 20 commits into from
Aug 22, 2024
Merged

Implement ngt property get API #2584

merged 20 commits into from
Aug 22, 2024

Conversation

kmrmt
Copy link
Contributor

@kmrmt kmrmt commented Aug 16, 2024

Description

Add API for getting NGT Property

Related Issue

Versions

  • Vald Version: v1.7.13
  • Go Version: v1.22.6
  • Rust Version: v1.80.0
  • Docker Version: v27.1.1
  • Kubernetes Version: v1.30.3
  • Helm Version: v3.15.3
  • NGT Version: v2.2.4
  • Faiss Version: v1.8.0

Checklist

Special notes for your reviewer

Summary by CodeRabbit

  • New Features

    • Introduced detailed API documentation for index properties, enhancing usability and clarity.
    • Added a new RPC method to retrieve index properties.
    • Introduced new message types to manage index property configurations.
    • Added methods for retrieving detailed properties of the NGT index.
    • Enhanced server capabilities to handle concurrent requests for index property details.
  • Enhancements

    • New endpoint for retrieving index property details via GET request.
    • Expanded functionality in client and server implementations to support retrieval of index properties.
  • Documentation

    • Updated API documentation to reflect new endpoints and data structures.
    • Configured Codecov to ignore specific paths in coverage reporting for improved clarity.
  • Version Update

    • Updated version number from 1.22.6 to 1.23.0.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

Copy link
Contributor

coderabbitai bot commented Aug 16, 2024

Walkthrough

Walkthrough

The recent updates significantly enhance the API by introducing new data structures and RPC methods for managing index properties. Key additions include the Property and PropertyDetail types, which encapsulate indexing attributes, along with the new IndexProperty RPC method for retrieving these properties. Various files have been improved to bolster documentation, error handling, and overall usability, ensuring a more robust and clear interface for developers.

Changes

Files Summary
apis/docs/v1/docs.md, apis/proto/v1/payload/payload.proto, apis/proto/v1/vald/index.proto Added sections for Info.Index.Property, Info.Index.PropertyDetail, new Property message types, and the IndexProperty RPC method.
apis/grpc/v1/vald/vald.go Introduced constant IndexPropertyRPCName for RPC service identification.
apis/swagger/v1/vald/index.swagger.json Created new GET endpoint /index/property with response schemas for IndexProperty and IndexPropertyDetail.
internal/client/v1/client/vald/vald.go, pkg/agent/core/ngt/service/ngt.go, pkg/gateway/lb/handler/grpc/handler.go Implemented IndexProperty method in client and server to retrieve index properties.
internal/core/algorithm/ngt/ngt.go Added GetProperty method and Property struct to manage index properties.
versions/GO_VERSION Updated version from 1.22.6 to 1.23.0.
codecov.yml Added ignore patterns for Codecov to streamline coverage reports.
internal/core/algorithm/ngt/ngt_test.go Introduced Test_ngt_Property to validate NGT properties in the testing suite.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Server
    participant NGT

    Client->>Server: Request IndexProperty()
    Server->>NGT: GetProperty()
    NGT-->>Server: Return Property Detail
    Server-->>Client: Return IndexProperty Detail
Loading

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

Attention: Patch coverage is 19.37984% with 208 lines in your changes missing coverage. Please review.

Project coverage is 24.53%. Comparing base (145b9cc) to head (438b4a8).
Report is 1 commits behind head on main.

Files Patch % Lines
pkg/gateway/lb/handler/grpc/handler.go 0.00% 92 Missing ⚠️
internal/core/algorithm/ngt/ngt.go 43.95% 51 Missing ⚠️
pkg/agent/core/ngt/service/ngt.go 0.00% 40 Missing ⚠️
internal/client/v1/client/vald/vald.go 0.00% 21 Missing ⚠️
pkg/agent/core/ngt/handler/grpc/index.go 69.23% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2584      +/-   ##
==========================================
+ Coverage   17.37%   24.53%   +7.15%     
==========================================
  Files         566      530      -36     
  Lines       69218    45522   -23696     
==========================================
- Hits        12026    11167     -859     
+ Misses      56392    33604   -22788     
+ Partials      800      751      -49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (15)
pkg/agent/core/ngt/handler/grpc/index.go (1)

244-262: IndexProperty method is well-implemented, consider enhancing error messages.

The IndexProperty method is consistent with existing methods, using tracing and error handling effectively. Consider adding more context to error messages for better debugging.

- return nil, err
+ return nil, fmt.Errorf("failed to retrieve index property: %w", err)
apis/proto/v1/payload/payload.proto (2)

593-630: Review the Property message for completeness and consistency.

The Property message defines various fields related to indexing properties. Ensure that all necessary fields are included and that their types are appropriate. The field names and types appear consistent with typical indexing configurations. Consider adding comments to describe each field for better clarity.

+ // Represents index Property with detailed configurations.
message Property {
  int32 dimension = 1;
  int32 thread_pool_size = 2;
  string object_type = 3;
  string distance_type = 4;
  string index_type = 5;
  string database_type = 6;
  string object_alignment = 7;
  int32 path_adjustment_interval = 8;
  int32 graph_shared_memory_size = 9;
  int32 tree_shared_memory_size = 10;
  int32 object_shared_memory_size = 11;
  int32 prefetch_offset = 12;
  int32 prefetch_size = 13;
  string accuracy_table = 14;
  string search_type = 15;
  float max_magnitude = 16;
  int32 n_of_neighbors_for_insertion_order = 17;
  float epsilon_for_insertion_order = 18;
  string refinement_object_type = 19;
  int32 truncation_threshold = 20;
  int32 edge_size_for_creation = 21;
  int32 edge_size_for_search = 22;
  int32 edge_size_limit_for_creation = 23;
  double insertion_radius_coefficient = 24;
  int32 seed_size = 25;
  string seed_type = 26;
  int32 truncation_thread_pool_size = 27;
  int32 batch_size_for_creation = 28;
  string graph_type = 29;
  int32 dynamic_edge_size_base = 30;
  int32 dynamic_edge_size_rate = 31;
  float build_time_limit = 32;
  int32 outgoing_edge = 33;
  int32 incoming_edge = 34;
}

632-635: Review the PropertyDetail message for structure and usage.

The PropertyDetail message uses a map to associate string keys with Property values. This design is flexible and allows for easy retrieval of properties by identifier. Ensure that the map keys are well-defined and documented in the broader system context.

+ // Represents index Properties for each agent, identified by a string key.
message PropertyDetail {
  map<string, Property> details = 1;
}
internal/core/algorithm/ngt/ngt.go (6)

162-197: Review the Property struct for completeness and consistency.

The Property struct defines various fields related to NGT index properties. Ensure that all necessary fields are included and that their types are appropriate. The field names and types appear consistent with typical indexing configurations. Consider adding comments to describe each field for better clarity.

+ // Property represents the configuration parameters for an NGT index.
type Property struct {
  Dimension                     int32
  ThreadPoolSize                int32
  ObjectType                    objectType
  DistanceType                  distanceType
  IndexType                     indexType
  DatabaseType                  databaseType
  ObjectAlignment               objectAlignment
  PathAdjustmentInterval        int32
  GraphSharedMemorySize         int32
  TreeSharedMemorySize          int32
  ObjectSharedMemorySize        int32
  PrefetchOffset                int32
  PrefetchSize                  int32
  AccuracyTable                 string
  SearchType                    string
  MaxMagnitude                  float32
  NOfNeighborsForInsertionOrder int32
  EpsilonForInsersionOrder      float32
  RefinementObjectType          objectType
  TruncationThreshold           int32
  EdgeSizeForCreation           int32
  EdgeSizeForSearch             int32
  EdgeSizeLimitForCreation      int32
  InsertionRadiusCoefficient    float64
  SeedSize                      int32
  SeedType                      seedType
  TruncationThreadPoolSize      int32
  BatchSizeForCreation          int32
  GraphType                     graphType
  DynamicEdgeSizeBase           int32
  DynamicEdgeSizeRate           int32
  BuildTimeLimit                float32
  OutgoingEdge                  int32
  IncomingEdge                  int32
}

387-395: Ensure clarity in indexType.String() method.

The String() method provides string representations for indexType values. Ensure all possible indexType values are covered, and consider adding a default case for unexpected values.

func (i indexType) String() string {
  switch i {
  case GraphAndTree:
    return "GraphAndTree"
  case Graph:
    return "Graph"
  default:
    return "Unknown"
  }
}

397-405: Ensure clarity in databaseType.String() method.

The String() method provides string representations for databaseType values. Ensure all possible databaseType values are covered, and consider adding a default case for unexpected values.

func (d databaseType) String() string {
  switch d {
  case Memory:
    return "Memory"
  case MemoryMappedFile:
    return "MemoryMappedFile"
  default:
    return "Unknown"
  }
}

407-415: Ensure clarity in objectAlignment.String() method.

The String() method provides string representations for objectAlignment values. Ensure all possible objectAlignment values are covered, and consider adding a default case for unexpected values.

func (o objectAlignment) String() string {
  switch o {
  case ObjectAlignmentTrue:
    return "true"
  case ObjectAlignmentFalse:
    return "false"
  default:
    return "Unknown"
  }
}

417-429: Ensure clarity in seedType.String() method.

The String() method provides string representations for seedType values. Ensure all possible seedType values are covered, and consider adding a default case for unexpected values.

func (s seedType) String() string {
  switch s {
  case RandomNodes:
    return "RandomNodes"
  case FixedNodes:
    return "FixedNodes"
  case FirstNode:
    return "FirstNode"
  case AllLeafNodes:
    return "AllLeafNodes"
  default:
    return "Unknown"
  }
}

431-451: Ensure clarity in graphType.String() method.

The String() method provides string representations for graphType values. Ensure all possible graphType values are covered, and consider adding a default case for unexpected values.

func (g graphType) String() string {
  switch g {
  case ANNG:
    return "ANNG"
  case KNNG:
    return "KNNG"
  case BKNNG:
    return "BKNNG"
  case ONNG:
    return "ONNG"
  case IANNG:
    return "IANNG"
  case DNNG:
    return "DNNG"
  case RANNG:
    return "RANNG"
  case RIANNG:
    return "RIANNG"
  default:
    return "Unknown"
  }
}
apis/docs/v1/docs.md (4)

328-368: Enhance field descriptions for clarity.

The Info.Index.Property section is well-structured, but the descriptions for each field are missing. Providing a brief description for each field would enhance understanding and usability.

| dimension                          | [int32](#int32)   |       | The number of dimensions for the index. |
| thread_pool_size                   | [int32](#int32)   |       | The size of the thread pool used.       |
| object_type                        | [string](#string) |       | The type of object being indexed.       |
| distance_type                      | [string](#string) |       | The type of distance metric used.       |
| index_type                         | [string](#string) |       | The type of index.                      |
| database_type                      | [string](#string) |       | The type of database.                   |
| object_alignment                   | [string](#string) |       | The alignment of objects.               |
| path_adjustment_interval           | [int32](#int32)   |       | Interval for path adjustment.           |
| graph_shared_memory_size           | [int32](#int32)   |       | Size of shared memory for the graph.    |
| tree_shared_memory_size            | [int32](#int32)   |       | Size of shared memory for the tree.     |
| object_shared_memory_size          | [int32](#int32)   |       | Size of shared memory for objects.      |
| prefetch_offset                    | [int32](#int32)   |       | Offset for prefetching data.            |
| prefetch_size                      | [int32](#int32)   |       | Size of the prefetch buffer.            |
| accuracy_table                     | [string](#string) |       | Table for accuracy metrics.             |
| search_type                        | [string](#string) |       | Type of search algorithm.               |
| max_magnitude                      | [float](#float)   |       | Maximum magnitude for vectors.          |
| n_of_neighbors_for_insertion_order | [int32](#int32)   |       | Number of neighbors for insertion.      |
| epsilon_for_insertion_order        | [float](#float)   |       | Epsilon value for insertion order.      |
| refinement_object_type             | [string](#string) |       | Type of refinement object.              |
| truncation_threshold               | [int32](#int32)   |       | Threshold for truncation.               |
| edge_size_for_creation             | [int32](#int32)   |       | Edge size during creation.              |
| edge_size_for_search               | [int32](#int32)   |       | Edge size during search.                |
| edge_size_limit_for_creation       | [int32](#int32)   |       | Limit for edge size during creation.    |
| insertion_radius_coefficient       | [double](#double) |       | Coefficient for insertion radius.       |
| seed_size                          | [int32](#int32)   |       | Size of the seed.                       |
| seed_type                          | [string](#string) |       | Type of seed used.                      |
| truncation_thread_pool_size        | [int32](#int32)   |       | Thread pool size for truncation.        |
| batch_size_for_creation            | [int32](#int32)   |       | Batch size during creation.             |
| graph_type                         | [string](#string) |       | Type of graph.                          |
| dynamic_edge_size_base             | [int32](#int32)   |       | Base size for dynamic edges.            |
| dynamic_edge_size_rate             | [int32](#int32)   |       | Rate of change for dynamic edges.       |
| build_time_limit                   | [float](#float)   |       | Time limit for building the index.      |
| outgoing_edge                      | [int32](#int32)   |       | Number of outgoing edges.               |
| incoming_edge                      | [int32](#int32)   |       | Number of incoming edges.               |

371-378: Add description for the details field.

The Info.Index.PropertyDetail section is missing a description for the details field. Providing a brief explanation would improve clarity.

| details | [Info.Index.PropertyDetail.DetailsEntry](#payload-v1-Info-Index-PropertyDetail-DetailsEntry) | repeated | Detailed index properties for each agent. |

381-387: Add descriptions for key and value fields.

The Info.Index.PropertyDetail.DetailsEntry section lacks descriptions for the key and value fields. Adding these would enhance understanding.

| key   | [string](#string)                                      |       | The identifier for the property detail. |
| value | [Info.Index.Property](#payload-v1-Info-Index-Property) |       | The property details associated with the key. |

1635-1635: Ensure consistency in the RPC method description.

The IndexProperty RPC method is described as retrieving index property details. Ensure this description is consistent with other RPC method descriptions.

| IndexProperty         | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.PropertyDetail](#payload-v1-Info-Index-PropertyDetail)     | Represents the RPC to retrieve index property details. |
pkg/gateway/lb/handler/grpc/handler.go (2)

4065-4067: Consider adding comments to explain the function.

Adding a brief comment at the start of the function to explain its purpose would improve readability and maintainability.

// IndexProperty retrieves indexing property details from multiple agents and aggregates the results.

4080-4138: Ensure all errors are captured and sent to the error channel.

In the pkg/gateway/lb/handler/grpc/handler.go file, errors within the goroutine are not being sent to the ech channel. Instead, they are returned, which might not align with the intended error handling strategy. Please verify that all potential errors are captured and communicated through the ech channel to ensure consistent error management.

  • Review the error handling logic in pkg/gateway/lb/handler/grpc/handler.go to ensure errors are sent to ech.
Analysis chain

Verify error handling in goroutine.

The goroutine handles errors by sending them to ech. Verify that all potential errors are captured and that the function behaves correctly if multiple errors occur.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify error handling in the IndexProperty function's goroutine.

# Test: Check for any unhandled errors that might not be captured by the error channel.
rg --type go 's.eg.Go' -A 20 | rg 'return err'

Length of output: 46


Script:

#!/bin/bash
# Description: Verify error handling in the IndexProperty function's goroutine.

# Test: Check for how errors are handled and sent to the error channel `ech`.
rg --type go 's.eg.Go' -A 50 | rg 'ech <- err'

# Test: Check for any error handling patterns within the goroutine.
rg --type go 's.eg.Go' -A 50 | rg 'if err != nil'

# Test: Verify if errors are being returned or ignored.
rg --type go 's.eg.Go' -A 50 | rg 'return err'

Length of output: 3266

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4fb802d and ddea475.

Files ignored due to path filters (5)
  • apis/grpc/v1/payload/payload.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/payload/payload.pb.json.go is excluded by !**/*.pb.json.go
  • apis/grpc/v1/payload/payload_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
Files selected for processing (14)
  • apis/docs/v1/docs.md (3 hunks)
  • apis/grpc/v1/vald/vald.go (1 hunks)
  • apis/proto/v1/payload/payload.proto (1 hunks)
  • apis/proto/v1/vald/index.proto (1 hunks)
  • apis/swagger/v1/vald/index.swagger.json (2 hunks)
  • internal/client/v1/client/vald/vald.go (2 hunks)
  • internal/core/algorithm/ngt/ngt.go (6 hunks)
  • pkg/agent/core/ngt/handler/grpc/index.go (1 hunks)
  • pkg/agent/core/ngt/service/ngt.go (2 hunks)
  • pkg/gateway/lb/handler/grpc/handler.go (1 hunks)
  • rust/libs/proto/src/filter.egress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/payload.v1.rs (1 hunks)
  • rust/libs/proto/src/vald.v1.tonic.rs (9 hunks)
Files skipped from review due to trivial changes (3)
  • apis/grpc/v1/vald/vald.go
  • rust/libs/proto/src/filter.egress.v1.tonic.rs
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs
Additional comments not posted (12)
apis/proto/v1/vald/index.proto (1)

49-52: Addition of IndexProperty RPC method is well-structured.

The new IndexProperty RPC method is consistent with existing methods and correctly includes an HTTP GET annotation. This addition enhances the service by allowing retrieval of index properties.

apis/swagger/v1/vald/index.swagger.json (1)

57-77: New endpoint and object definitions enhance the API's functionality.

The addition of the /index/property endpoint and the IndexProperty and IndexPropertyDetail object definitions significantly enhance the API. The properties are well-defined, providing comprehensive coverage of index configurations.

Also applies to: 169-312

internal/core/algorithm/ngt/ngt.go (1)

90-91: Ensure proper error handling in GetProperty.

The GetProperty method retrieves NGT index properties. Verify that error handling is consistent and that all potential errors from C function calls are managed appropriately.

internal/client/v1/client/vald/vald.go (2)

1295-1305: Ensure proper error handling in singleClient.IndexProperty.

The IndexProperty method in singleClient delegates the call to the underlying vc client. Verify that error handling is consistent with other singleClient methods and that all potential errors are managed appropriately.


831-851: Ensure proper error handling in client.IndexProperty.

The IndexProperty method uses a round-robin approach to connect to the gRPC server. Verify that error handling is consistent with other client methods and that all potential errors are managed appropriately.

rust/libs/proto/src/payload.v1.rs (2)

959-1031: Review the Property struct for alignment with documentation.

The Property struct is well-defined with appropriate data types. Ensure that the field names and types align with the intended usage and documentation.

Verification successful

Verification Successful: Property Struct Alignment with Documentation

The Property struct in the Rust code matches the documentation precisely in terms of field names and types. No discrepancies were found.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the `Property` struct fields align with the documentation.

# Test: Search for `Property` struct usage in documentation files. Expect: Consistent field names and types.
rg --type markdown 'Property'

Length of output: 1254


Script:

#!/bin/bash
# Extract the section of the documentation that describes the `Property` struct
sed -n '/### Info.Index.Property/,/### Info.Index.PropertyDetail/p' apis/docs/v1/docs.md

Length of output: 89853


1032-1038: Review the PropertyDetail struct for usage consistency.

The PropertyDetail struct uses a map to associate string keys with Property instances, which is appropriate. Ensure consistent usage across the codebase.

Verification successful

Usage of PropertyDetail is consistent across the codebase.

The PropertyDetail struct is used consistently in the vald.v1.tonic.rs file as a response type in both synchronous and asynchronous contexts. This suggests it is integrated properly within the system's design.

  • PropertyDetail is used in the index_property function and IndexPropertySvc implementation as a response type.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent usage of `PropertyDetail` struct across the codebase.

# Test: Search for `PropertyDetail` struct usage. Expect: Consistent usage patterns.
rg --type rust 'PropertyDetail'

Length of output: 473


Script:

#!/bin/bash
# Extract lines around the usage of `PropertyDetail` in `vald.v1.tonic.rs` to understand the context.
rg --type rust 'PropertyDetail' -A 5 -B 5 rust/libs/proto/src/vald.v1.tonic.rs

Length of output: 1367

pkg/agent/core/ngt/service/ngt.go (1)

2048-2089: LGTM! Verify usage of IndexProperty.

The implementation of IndexProperty is correct and handles errors appropriately.

Ensure that the new method IndexProperty is used correctly throughout the codebase.

Verification successful

Usage of IndexProperty is verified and appropriate.

The IndexProperty method is correctly integrated across various components, including GRPC server and client implementations. Its usage aligns with its intended functionality of retrieving index properties.

  • Locations where IndexProperty is used:
    • pkg/agent/core/ngt/handler/grpc/index.go
    • pkg/gateway/lb/handler/grpc/handler.go
    • internal/client/v1/client/vald/vald.go
    • apis/grpc/v1/vald/index_vtproto.pb.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `IndexProperty` method in the codebase.

# Test: Search for the method usage. Expect: Occurrences of `IndexProperty` method calls.
rg --type go -A 3 $'IndexProperty'

Length of output: 11263

pkg/gateway/lb/handler/grpc/handler.go (2)

4068-4073: Ensure trace span is always ended.

The trace span is correctly started and ended. Ensure that any future additions to the function do not disrupt this pattern.


4139-4176: Ensure comprehensive error handling.

The function includes detailed error handling with specific cases for different error types. Ensure that all possible error scenarios are covered and that the error messages provide sufficient context for debugging.

rust/libs/proto/src/vald.v1.tonic.rs (2)

1836-1864: LGTM! Verify the function usage in the codebase.

The index_property function is correctly implemented to retrieve index properties via a gRPC call. Ensure that all calls to this function are correctly integrated within the codebase.

Verification successful

Function index_property is correctly integrated within the codebase.

The index_property function is defined and used within the same file, as part of a trait implementation. There are no additional occurrences outside this file, indicating that it is correctly scoped and integrated.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `index_property` match the expected usage.

# Test: Search for the function usage. Expect: Occurrences of the function call with correct arguments.
rg --type rust -A 5 $'index_property'

Length of output: 1564


1908-1918: LGTM! Verify the function implementation in the codebase.

The index_property function is correctly implemented to handle requests for index properties. Ensure that the implementation aligns with the expected functionality.

pkg/gateway/lb/handler/grpc/handler.go Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (5)
rust/libs/proto/src/payload.v1.rs (2)

962-1030: Ensure consistency and clarity in field naming.

The Property struct fields are generally well-defined, but consider the following:

  1. Naming Consistency: Ensure that all field names are consistently named according to your project's naming conventions. For example, n_of_neighbors_for_insertion_order could be renamed to num_neighbors_for_insertion_order for clarity and consistency.

  2. Documentation: Adding comments to each field explaining its purpose would enhance readability and maintainability. This is especially important for complex fields like insertion_radius_coefficient.

  3. Data Types: Verify that the chosen data types for each field are appropriate. For instance, ensure that int32 is sufficient for fields like dimension and thread_pool_size.


1035-1037: Consider documenting the map structure usage.

The PropertyDetail struct uses a map to associate string keys with Property instances. Consider adding documentation to explain the expected format and usage of the keys in this map. This will help future developers understand how to interact with this structure.

apis/docs/v1/docs.md (3)

328-368: Add descriptions for each field in Info.Index.Property.

The fields in this section lack descriptions, which can hinder understanding and usability. Adding descriptions will improve clarity.

| Field                              | Type              | Label | Description |
| ---------------------------------- | ----------------- | ----- | ----------- |
| dimension                          | [int32](#int32)   |       | The number of dimensions for the index. |
| thread_pool_size                   | [int32](#int32)   |       | The size of the thread pool used for operations. |
| object_type                        | [string](#string) |       | The type of object being indexed. |
| distance_type                      | [string](#string) |       | The type of distance metric used. |
| index_type                         | [string](#string) |       | The type of index structure. |
| database_type                      | [string](#string) |       | The type of database used. |
| object_alignment                   | [string](#string) |       | The alignment of objects in memory. |
| path_adjustment_interval           | [int32](#int32)   |       | The interval for path adjustment operations. |
| graph_shared_memory_size           | [int32](#int32)   |       | The size of shared memory for the graph. |
| tree_shared_memory_size            | [int32](#int32)   |       | The size of shared memory for the tree. |
| object_shared_memory_size          | [int32](#int32)   |       | The size of shared memory for objects. |
| prefetch_offset                    | [int32](#int32)   |       | The offset for prefetch operations. |
| prefetch_size                      | [int32](#int32)   |       | The size for prefetch operations. |
| accuracy_table                     | [string](#string) |       | The table used for accuracy measurements. |
| search_type                        | [string](#string) |       | The type of search algorithm used. |
| max_magnitude                      | [float](#float)   |       | The maximum magnitude for vectors. |
| n_of_neighbors_for_insertion_order | [int32](#int32)   |       | The number of neighbors considered for insertion order. |
| epsilon_for_insertion_order        | [float](#float)   |       | The epsilon value used for insertion order. |
| refinement_object_type             | [string](#string) |       | The type of object used for refinement. |
| truncation_threshold               | [int32](#int32)   |       | The threshold for truncation operations. |
| edge_size_for_creation             | [int32](#int32)   |       | The size of edges during creation. |
| edge_size_for_search               | [int32](#int32)   |       | The size of edges during search. |
| edge_size_limit_for_creation       | [int32](#int32)   |       | The limit for edge size during creation. |
| insertion_radius_coefficient       | [double](#double) |       | The coefficient for insertion radius. |
| seed_size                          | [int32](#int32)   |       | The size of the seed used in operations. |
| seed_type                          | [string](#string) |       | The type of seed used. |
| truncation_thread_pool_size        | [int32](#int32)   |       | The size of the thread pool for truncation. |
| batch_size_for_creation            | [int32](#int32)   |       | The batch size used during creation. |
| graph_type                         | [string](#string) |       | The type of graph structure used. |
| dynamic_edge_size_base             | [int32](#int32)   |       | The base size for dynamic edges. |
| dynamic_edge_size_rate             | [int32](#int32)   |       | The rate of change for dynamic edge size. |
| build_time_limit                   | [float](#float)   |       | The time limit for building operations. |
| outgoing_edge                      | [int32](#int32)   |       | The number of outgoing edges. |
| incoming_edge                      | [int32](#int32)   |       | The number of incoming edges. |

371-377: Add a description for the details field in Info.Index.PropertyDetail.

The details field is missing a description, which can lead to confusion about its purpose and usage.

| Field   | Type                                                                                         | Label    | Description |
| ------- | -------------------------------------------------------------------------------------------- | -------- | ----------- |
| details | [Info.Index.PropertyDetail.DetailsEntry](#payload-v1-Info-Index-PropertyDetail-DetailsEntry) | repeated | A list of detailed index properties for each agent. |

381-386: Add descriptions for the key and value fields in Info.Index.PropertyDetail.DetailsEntry.

The fields key and value lack descriptions, which can hinder understanding of their roles in the structure.

| Field | Type                                                   | Label | Description |
| ----- | ------------------------------------------------------ | ----- | ----------- |
| key   | [string](#string)                                      |       | The identifier for the property. |
| value | [Info.Index.Property](#payload-v1-Info-Index-Property) |       | The property details associated with the key. |
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4fb802d and ddea475.

Files ignored due to path filters (5)
  • apis/grpc/v1/payload/payload.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/payload/payload.pb.json.go is excluded by !**/*.pb.json.go
  • apis/grpc/v1/payload/payload_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
Files selected for processing (14)
  • apis/docs/v1/docs.md (3 hunks)
  • apis/grpc/v1/vald/vald.go (1 hunks)
  • apis/proto/v1/payload/payload.proto (1 hunks)
  • apis/proto/v1/vald/index.proto (1 hunks)
  • apis/swagger/v1/vald/index.swagger.json (2 hunks)
  • internal/client/v1/client/vald/vald.go (2 hunks)
  • internal/core/algorithm/ngt/ngt.go (6 hunks)
  • pkg/agent/core/ngt/handler/grpc/index.go (1 hunks)
  • pkg/agent/core/ngt/service/ngt.go (2 hunks)
  • pkg/gateway/lb/handler/grpc/handler.go (1 hunks)
  • rust/libs/proto/src/filter.egress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/payload.v1.rs (1 hunks)
  • rust/libs/proto/src/vald.v1.tonic.rs (9 hunks)
Files skipped from review due to trivial changes (3)
  • apis/grpc/v1/vald/vald.go
  • rust/libs/proto/src/filter.egress.v1.tonic.rs
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs
Additional comments not posted (18)
apis/proto/v1/vald/index.proto (1)

49-52: Addition of IndexProperty RPC looks good.

The new IndexProperty RPC method is well-integrated with the existing service and follows the established pattern for defining RPC methods and HTTP endpoints.

pkg/agent/core/ngt/handler/grpc/index.go (1)

244-262: New IndexProperty method implementation looks solid.

The addition of the IndexProperty method is consistent with existing methods in the file. It includes appropriate error handling and tracing.

Ensure that the s.ngt.IndexProperty() function is correctly implemented and handles all necessary error cases.

Verification successful

Implementation of IndexProperty Method Verified

The IndexProperty method in the ngt package is correctly implemented. It properly retrieves properties and handles errors, consistent with Go's best practices.

  • Located in pkg/agent/core/ngt/service/ngt.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the implementation of `IndexProperty` method in the `ngt` package.

# Test: Search for the `IndexProperty` function implementation in the `ngt` package.
# Expect: The function should be defined and handle errors appropriately.
ast-grep --lang go --pattern $'func ($_).IndexProperty() ($_ *payload.Info_Index_Property, $_ error) {
  $$$
}'

Length of output: 112


Script:

#!/bin/bash
# Description: Search for the `IndexProperty` function implementation in the `ngt` package using `rg`.

# Test: Use `rg` to find the `IndexProperty` function definition.
rg 'func\s+\(\w+\s+\*ngt\)\s+IndexProperty\(\)\s+\(\s*\*payload\.Info_Index_Property\s*,\s*error\s*\)' --context 5

Length of output: 745

apis/swagger/v1/vald/index.swagger.json (2)

57-77: Addition of /index/property endpoint is well-documented.

The new endpoint for retrieving index properties is clearly defined and follows the existing documentation structure.


169-312: New data structures IndexProperty and IndexPropertyDetail are well-defined.

The data structures provide a comprehensive representation of index properties, enhancing the API's documentation and usability.

apis/proto/v1/payload/payload.proto (2)

633-635: Verify map key type suitability.

The PropertyDetail message uses a map with a string key for storing Property instances. Ensure that the string key is appropriate for uniquely identifying each Property instance. Consider if there are any constraints or validations needed for the keys.


595-630: Ensure field types align with intended usage.

The Property message contains fields with various data types. Verify that each field's type aligns with its intended usage, especially for fields like max_magnitude, insertion_radius_coefficient, and epsilon_for_insertion_order, which are floating-point numbers. Ensure these fields are necessary and correctly typed.

Verification successful

Field types align with intended usage and are necessary.

The fields max_magnitude, epsilon_for_insertion_order, and insertion_radius_coefficient are properly typed as floating-point numbers and are used across the codebase, indicating their necessity and correct implementation.

  • These fields are referenced in Rust and Go implementations, as well as documented in the project's documentation files.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage and necessity of floating-point fields in the Property message.

# Test: Check if the fields are used and necessary in the codebase.
rg --type proto 'max_magnitude|insertion_radius_coefficient|epsilon_for_insertion_order'

Length of output: 120


Script:

#!/bin/bash
# Description: Verify the usage and necessity of floating-point fields in the Property message.

# Test: Check if the fields are used and necessary in the codebase by searching for them in .proto files.
rg 'max_magnitude|insertion_radius_coefficient|epsilon_for_insertion_order' --glob '*.proto'

Length of output: 328


Script:

#!/bin/bash
# Description: Search for references to the floating-point fields in the entire codebase to verify their usage.

# Test: Check for references to the fields in other parts of the codebase.
rg 'max_magnitude|insertion_radius_coefficient|epsilon_for_insertion_order'

Length of output: 1850

internal/core/algorithm/ngt/ngt.go (2)

1148-1189: Ensure correct error handling and memory management in GetProperty.

The GetProperty method involves C API calls and conversions between C and Go types. Verify that errors from ngt_get_property_info are correctly handled and that any allocated memory is properly managed. Ensure all fields in the Property struct are initialized correctly.


227-239: Ensure completeness of type alias constants.

Verify that each type alias (indexType, databaseType, objectAlignment, seedType, graphType) has a complete set of constants representing all possible values. Ensure the string methods cover all constants.

internal/client/v1/client/vald/vald.go (2)

831-851: Ensure consistency in gRPC call setup and error handling.

The IndexProperty method should follow the same pattern as other gRPC methods in the file. Verify that the tracing setup and error handling are consistent and that any potential errors are logged or handled appropriately.

Verification successful

Consistency in gRPC Method Implementations Verified

The IndexProperty method is consistent with other gRPC methods like Exists and Search in terms of gRPC call setup, error handling, and tracing integration. No issues were found.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistency in gRPC call setup and error handling for IndexProperty method.

# Test: Compare the IndexProperty method with other gRPC methods in the file for consistency.
rg --type go 'func \(c \*client\) (Exists|Search|IndexProperty)'

Length of output: 805


Script:

#!/bin/bash
# Extract the implementation of the Exists and Search methods for comparison.
ast-grep --lang go --pattern 'func (c *client) Exists($_) ($_, error) { $$$ }' 
ast-grep --lang go --pattern 'func (c *client) Search($_) ($_, error) { $$$ }'

Length of output: 161


Script:

#!/bin/bash
# Adjust the pattern to capture the Exists and Search methods with more context.
rg --type go -A 20 'func \(c \*client\) Exists\(' internal/client/v1/client/vald/vald.go
rg --type go -A 20 'func \(c \*client\) Search\(' internal/client/v1/client/vald/vald.go

Length of output: 1406


1295-1305: Verify direct gRPC call setup in IndexProperty.

Ensure that the IndexProperty method in singleClient correctly sets up the gRPC call and handles any errors. Confirm that it is consistent with other methods in the singleClient struct.

pkg/agent/core/ngt/service/ngt.go (1)

2048-2089: LGTM! Verify property mappings.

The IndexProperty function is well-implemented, retrieving and returning index properties correctly. Ensure that all properties are correctly mapped to the payload.Info_Index_Property fields.

To verify, check if all properties from core.GetProperty() are correctly mapped and utilized.

Verification successful

Property Mapping Verified in IndexProperty Function

The IndexProperty function in ngt.go correctly maps all properties from the Property struct returned by GetProperty in internal/core/algorithm/ngt/ngt.go to the payload.Info_Index_Property fields. All fields are accounted for and properly utilized.

  • The GetProperty method and its return type Property are found in internal/core/algorithm/ngt/ngt.go.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all properties from `core.GetProperty()` are correctly mapped to `payload.Info_Index_Property`.

# Test: Search for the `GetProperty` method in the core package and check its return type.
ast-grep --lang go --pattern $'func GetProperty() (prop Property, err error) {
  $$$
}'

Length of output: 88


Script:

#!/bin/bash
# Search for the GetProperty function definition in the entire repository to locate its implementation.
rg 'func GetProperty' -A 10

Length of output: 29


Script:

#!/bin/bash
# Perform a broader search for methods that handle or return properties in the core package.
rg 'Property' -A 10

Length of output: 97420

pkg/gateway/lb/handler/grpc/handler.go (5)

4065-4073: Ensure proper tracing setup and teardown.

The tracing span is correctly started and ended, ensuring that the method's execution is monitored. This is important for performance and error tracking.


4074-4078: Initialize error and detail channels correctly.

The error channel ech and the detail map in detail are correctly initialized. This setup supports asynchronous error handling and concurrent access to the detail map.


4144-4175: Comprehensive error handling.

The method includes comprehensive error handling, wrapping errors with appropriate gRPC status codes and logging them. This ensures that errors are communicated effectively to the client and logged for debugging.


4176-4177: Return constructed detail response.

The method returns the constructed detail response, which contains the indexed property details. Ensure that all necessary details are included in the response.


4080-4138: Handle errors and update details concurrently.

The use of a goroutine to broadcast requests and handle responses is appropriate. The method correctly handles errors and updates the detail map with a mutex to ensure thread safety. However, ensure that the prop variable is correctly initialized and used.

Verification successful

prop is correctly initialized and used.

The IndexProperty method initializes prop correctly, ensuring it is not nil when used. The implementation in pkg/agent/core/ngt/handler/grpc/index.go shows prop being initialized by calling another method, which is consistent with the expected behavior. No issues found.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that `prop` is correctly initialized and used in `IndexProperty`.

# Test: Search for the `IndexProperty` method to check `prop` initialization.
rg --type go -A 10 'func \(s \*server\) IndexProperty'

Length of output: 1645

rust/libs/proto/src/vald.v1.tonic.rs (2)

1836-1864: Addition of index_property method in index_client looks good.

The method is well-integrated and follows the existing pattern for client methods. Ensure that this new method is correctly utilized in the client interface.

Verify the integration and usage of this method in the codebase to ensure it is called correctly.


1908-1918: Addition of index_property method in index_server looks good.

The method is consistent with other server methods and follows the required patterns for gRPC server implementations. Ensure that this new method is correctly implemented in the server logic.

Verify the implementation of this method in the server logic to ensure it functions as expected.

internal/core/algorithm/ngt/ngt.go Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Outside diff range, codebase verification and nitpick comments (4)
apis/docs/v1/docs.md (4)

328-368: Ensure comprehensive field descriptions.

The Info.Index.Property section introduces several fields, but their descriptions are missing. Providing descriptions for each field would improve clarity and usability of the documentation.

| dimension                          | [int32](#int32)   |       | The dimension of the index. |
| thread_pool_size                   | [int32](#int32)   |       | The size of the thread pool used for indexing. |
| object_type                        | [string](#string) |       | The type of objects being indexed. |
| distance_type                      | [string](#string) |       | The type of distance metric used. |
| index_type                         | [string](#string) |       | The type of index structure. |
| database_type                      | [string](#string) |       | The type of database used. |
| object_alignment                   | [string](#string) |       | The alignment of objects in memory. |
| path_adjustment_interval           | [int32](#int32)   |       | The interval for adjusting paths. |
| graph_shared_memory_size           | [int32](#int32)   |       | The size of shared memory for the graph. |
| tree_shared_memory_size            | [int32](#int32)   |       | The size of shared memory for the tree. |
| object_shared_memory_size          | [int32](#int32)   |       | The size of shared memory for objects. |
| prefetch_offset                    | [int32](#int32)   |       | The offset for prefetching data. |
| prefetch_size                      | [int32](#int32)   |       | The size of data to prefetch. |
| accuracy_table                     | [string](#string) |       | The accuracy table used for indexing. |
| search_type                        | [string](#string) |       | The type of search algorithm used. |
| max_magnitude                      | [float](#float)   |       | The maximum magnitude for vectors. |
| n_of_neighbors_for_insertion_order | [int32](#int32)   |       | The number of neighbors considered for insertion order. |
| epsilon_for_insertion_order        | [float](#float)   |       | The epsilon value for insertion order. |
| refinement_object_type             | [string](#string) |       | The type of refinement objects. |
| truncation_threshold               | [int32](#int32)   |       | The threshold for truncation. |
| edge_size_for_creation             | [int32](#int32)   |       | The edge size used during creation. |
| edge_size_for_search               | [int32](#int32)   |       | The edge size used during search. |
| edge_size_limit_for_creation       | [int32](#int32)   |       | The limit on edge size during creation. |
| insertion_radius_coefficient       | [double](#double) |       | The coefficient for insertion radius. |
| seed_size                          | [int32](#int32)   |       | The size of the seed used. |
| seed_type                          | [string](#string) |       | The type of seed used. |
| truncation_thread_pool_size        | [int32](#int32)   |       | The size of the thread pool for truncation. |
| batch_size_for_creation            | [int32](#int32)   |       | The batch size used during creation. |
| graph_type                         | [string](#string) |       | The type of graph structure. |
| dynamic_edge_size_base             | [int32](#int32)   |       | The base size for dynamic edges. |
| dynamic_edge_size_rate             | [int32](#int32)   |       | The rate of change for dynamic edge sizes. |
| build_time_limit                   | [float](#float)   |       | The time limit for building the index. |
| outgoing_edge                      | [int32](#int32)   |       | The number of outgoing edges. |
| incoming_edge                      | [int32](#int32)   |       | The number of incoming edges. |

371-378: Clarify the Info.Index.PropertyDetail section.

The Info.Index.PropertyDetail section describes properties for each agent, but the description field is empty. Providing a detailed explanation would enhance understanding.

| details | [Info.Index.PropertyDetail.DetailsEntry](#payload-v1-Info-Index-PropertyDetail-DetailsEntry) | repeated | Detailed properties for each agent. |

381-387: Enhance the Info.Index.PropertyDetail.DetailsEntry section.

The DetailsEntry section lacks descriptions for its fields. Adding descriptions would improve the documentation's clarity.

| key   | [string](#string)                                      |       | The key representing the agent identifier. |
| value | [Info.Index.Property](#payload-v1-Info-Index-Property) |       | The property details associated with the agent. |

1635-1635: Ensure clarity in the IndexProperty RPC method description.

The description for the IndexProperty RPC method is brief. Expanding it to explain its purpose and usage would be beneficial.

| IndexProperty         | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.PropertyDetail](#payload-v1-Info-Index-PropertyDetail)     | Represents the RPC to retrieve detailed index properties for each agent. |
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4fb802d and ddea475.

Files ignored due to path filters (5)
  • apis/grpc/v1/payload/payload.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/payload/payload.pb.json.go is excluded by !**/*.pb.json.go
  • apis/grpc/v1/payload/payload_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
Files selected for processing (14)
  • apis/docs/v1/docs.md (3 hunks)
  • apis/grpc/v1/vald/vald.go (1 hunks)
  • apis/proto/v1/payload/payload.proto (1 hunks)
  • apis/proto/v1/vald/index.proto (1 hunks)
  • apis/swagger/v1/vald/index.swagger.json (2 hunks)
  • internal/client/v1/client/vald/vald.go (2 hunks)
  • internal/core/algorithm/ngt/ngt.go (6 hunks)
  • pkg/agent/core/ngt/handler/grpc/index.go (1 hunks)
  • pkg/agent/core/ngt/service/ngt.go (2 hunks)
  • pkg/gateway/lb/handler/grpc/handler.go (1 hunks)
  • rust/libs/proto/src/filter.egress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/payload.v1.rs (1 hunks)
  • rust/libs/proto/src/vald.v1.tonic.rs (9 hunks)
Files skipped from review due to trivial changes (2)
  • rust/libs/proto/src/filter.egress.v1.tonic.rs
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs
Additional comments not posted (21)
apis/proto/v1/vald/index.proto (1)

49-52: LGTM! Verify the usage of the new RPC method.

The addition of the IndexProperty RPC method is consistent with existing methods and enhances the API's functionality. Ensure that the new method is correctly integrated and utilized across the system.

Verification successful

The IndexProperty RPC method is correctly integrated and utilized across the system.

The method is referenced in multiple files, including client implementations, service handlers, and documentation, indicating proper integration.

  • rust/libs/proto/src/vald.v1.tonic.rs: References to the method in Rust code.
  • internal/client/v1/client/vald/vald.go: Client calls to IndexProperty.
  • pkg/gateway/lb/handler/grpc/handler.go: Service handler implementation.
  • pkg/agent/core/ngt/service/ngt.go: Service logic for IndexProperty.
  • apis/swagger/v1/vald/index.swagger.json: Swagger documentation for the method.
  • apis/proto/v1/vald/index.proto: Definition of the RPC method.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the new `IndexProperty` RPC method.

# Test: Search for the method usage. Expect: Occurrences where the new method is called or referenced.
rg --type proto --type go 'IndexProperty'

Length of output: 71


Script:

#!/bin/bash
# Description: Verify the usage of the new `IndexProperty` RPC method.

# Test: Search for the method usage in all files.
rg 'IndexProperty'

Length of output: 5787

apis/grpc/v1/vald/vald.go (1)

142-142: LGTM!

The addition of IndexPropertyRPCName is consistent with the existing naming conventions and enhances the module's capabilities.

pkg/agent/core/ngt/handler/grpc/index.go (1)

244-262: LGTM! Verify the integration of the new method.

The IndexProperty method is well-implemented, with appropriate error handling and tracing. Ensure that the method is correctly integrated and tested within the system.

apis/swagger/v1/vald/index.swagger.json (3)

169-300: Review the IndexProperty object definition.

The IndexProperty schema is comprehensive and well-structured, covering various properties related to the index. Ensure that these properties are correctly mapped to the actual data structures in the implementation.


301-312: Review the IndexPropertyDetail object definition.

The IndexPropertyDetail schema encapsulates the IndexProperty in a map structure. This is a suitable design for handling multiple properties. Ensure that this structure is correctly utilized in the implementation.


57-77: Verify the new endpoint /index/property.

The new endpoint is well-defined with a summary, operation ID, and response schemas. Ensure that this endpoint is correctly integrated into the system and that it is tested for expected behavior.

apis/proto/v1/payload/payload.proto (2)

593-630: Review the Property message definition.

The Property message is detailed and covers a wide range of configuration parameters. Ensure that these fields are correctly mapped to the corresponding data in the system and that they are validated where necessary.


632-635: Review the PropertyDetail message definition.

The PropertyDetail message uses a map to associate string identifiers with Property instances. This design is effective for managing properties across different agents. Ensure that this mapping is correctly implemented and utilized.

internal/core/algorithm/ngt/ngt.go (5)

90-91: Review the GetProperty method signature.

The GetProperty method is correctly added to the NGT interface. Ensure that this method is implemented correctly and that it retrieves the expected properties.


162-197: Review the Property struct definition.

The Property struct is comprehensive and mirrors the Property message in the proto file. Ensure that the data is correctly populated and used within the application.


227-239: Review new type definitions for index properties.

The new type definitions (indexType, databaseType, objectAlignment, seedType, graphType) enhance type safety. Ensure these types are used consistently across the codebase.


387-451: Review string methods for new types.

The string methods provide human-readable representations for the new types, which is useful for debugging and logging. Ensure these methods are used where appropriate.


1148-1189: Verify the GetProperty method implementation.

The method retrieves and converts C properties into Go structures. Ensure that all fields are correctly mapped and that error handling is robust.

internal/client/v1/client/vald/vald.go (2)

831-851: Consistent tracing and error handling.

The IndexProperty method in the client struct correctly follows the established pattern for tracing and error handling, similar to other methods in the file. Ensure that the vald.NewValdClient(conn).IndexProperty method is correctly implemented and tested.


1295-1305: Consistent tracing and error handling.

The IndexProperty method in the singleClient struct also follows the established pattern for tracing and error handling. Ensure that the vc.IndexProperty method is correctly implemented and tested.

rust/libs/proto/src/payload.v1.rs (2)

959-1031: Thorough definition of Property struct.

The Property struct includes a comprehensive set of fields for indexing configuration. Ensure that all fields are necessary and correctly defined for the intended use case. Consider documenting the purpose of each field for better maintainability.


1032-1038: Appropriate use of PropertyDetail struct.

The PropertyDetail struct effectively uses a map to associate string keys with Property values, allowing for flexible configuration management. Ensure that the map keys are well-defined and consistently used throughout the codebase.

pkg/gateway/lb/handler/grpc/handler.go (2)

4065-4077: Ensure proper initialization of detail map.

The detail map is initialized with a capacity based on the agent count. Ensure that this count accurately reflects the expected number of agents to avoid potential issues with map resizing.

Verification successful

Initialization of detail map is correct.

The GetAgentCount method is consistently used across the file to initialize maps with agent-related data, indicating its reliability for this purpose. The detail map initialization is appropriate and should not cause resizing issues.

  • Code location: pkg/gateway/lb/handler/grpc/handler.go, line 4077
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the agent count used for initializing the `detail` map.

# Test: Check the agent count retrieval logic. Expect: Correct retrieval and usage.
ast-grep --lang go --pattern 's.gateway.GetAgentCount($_)'

Length of output: 618


4139-4176: Verify error handling after channel operations.

The method handles errors from the channel, but ensure that all edge cases are considered, such as channel closure and context cancellation.

Verification successful

Consider handling or documenting channel closure explicitly. The current error handling logic seems robust as receiving from a closed channel in Go returns the zero value without causing a panic. However, explicitly handling or documenting the case where the channel ech might be closed before the select statement could enhance clarity and prevent potential misunderstandings.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify error handling logic for channel operations.

# Test: Check for potential issues with channel operations. Expect: Robust handling.
ast-grep --lang go --pattern 'select { case <-ctx.Done(): $_ case err = <-ech: $_ }'

Length of output: 1518


Script:

#!/bin/bash
# Description: Check for handling of channel closure or additional error handling logic related to channels in the file under review.

# Test: Search for any handling of channel closure in the specified file.
ast-grep --lang go --pattern 'select { case <-ctx.Done(): $_ case err = <-ech: $_ }' pkg/gateway/lb/handler/grpc/handler.go

# Additionally, search for any defer or close operations on the channel 'ech' in the file.
rg 'defer|close' pkg/gateway/lb/handler/grpc/handler.go -A 3 -B 3

Length of output: 24366

rust/libs/proto/src/vald.v1.tonic.rs (2)

1838-1864: Addition of index_property method in index_client looks good.

The implementation follows the established pattern for gRPC methods, including error handling and request path setup.


1910-1918: Addition of index_property method in index_server looks good.

The method is properly defined and follows the server-side gRPC pattern.

pkg/agent/core/ngt/service/ngt.go Outdated Show resolved Hide resolved
pkg/gateway/lb/handler/grpc/handler.go Outdated Show resolved Hide resolved
Copy link

cloudflare-workers-and-pages bot commented Aug 16, 2024

Deploying vald with  Cloudflare Pages  Cloudflare Pages

Latest commit: 438b4a8
Status: ✅  Deploy successful!
Preview URL: https://e04194a9.vald.pages.dev
Branch Preview URL: https://feature-agent-ngt-property-a.vald.pages.dev

View logs

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between ddea475 and 8aac629.

Files selected for processing (3)
  • internal/core/algorithm/ngt/ngt.go (7 hunks)
  • pkg/agent/core/ngt/service/ngt.go (2 hunks)
  • pkg/gateway/lb/handler/grpc/handler.go (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • internal/core/algorithm/ngt/ngt.go
  • pkg/agent/core/ngt/service/ngt.go
  • pkg/gateway/lb/handler/grpc/handler.go

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8aac629 and 6092097.

Files selected for processing (1)
  • rust/bin/agent/src/handler/index.rs (1 hunks)

rust/bin/agent/src/handler/index.rs Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 6092097 and c7392d2.

Files selected for processing (1)
  • internal/core/algorithm/ngt/option.go (1 hunks)
Additional comments not posted (1)
internal/core/algorithm/ngt/option.go (1)

112-112: Improved variable initialization.

Initializing d with d := DistanceNone ensures it has a defined starting state, enhancing code clarity and preventing potential uninitialized usage.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between c7392d2 and b214859.

Files ignored due to path filters (1)
  • apis/grpc/v1/payload/payload.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
Files selected for processing (2)
  • README.md (1 hunks)
  • versions/GO_VERSION (1 hunks)
Files skipped from review due to trivial changes (2)
  • README.md
  • versions/GO_VERSION

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 19, 2024
Signed-off-by: Kosuke Morimoto <[email protected]>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3a387c6 and 66ae195.

Files ignored due to path filters (10)
  • apis/grpc/v1/agent/sidecar/sidecar_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/payload/payload.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/payload/payload.pb.json.go is excluded by !**/*.pb.json.go
  • apis/grpc/v1/payload/payload_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/rpc/errdetails/error_details.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • example/client/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
  • rust/Cargo.lock is excluded by !**/*.lock
Files selected for processing (23)
  • README.md (1 hunks)
  • apis/docs/v1/docs.md (3 hunks)
  • apis/grpc/v1/vald/vald.go (1 hunks)
  • apis/proto/v1/payload/payload.proto (1 hunks)
  • apis/proto/v1/vald/index.proto (1 hunks)
  • apis/swagger/v1/vald/index.swagger.json (2 hunks)
  • codecov.yml (1 hunks)
  • example/client/go.mod (2 hunks)
  • example/client/go.mod.default (1 hunks)
  • go.mod (16 hunks)
  • hack/go.mod.default (1 hunks)
  • internal/client/v1/client/vald/vald.go (2 hunks)
  • internal/core/algorithm/ngt/ngt.go (7 hunks)
  • internal/core/algorithm/ngt/option.go (1 hunks)
  • internal/net/http/client/client_test.go (1 hunks)
  • pkg/agent/core/ngt/handler/grpc/index_test.go (2 hunks)
  • pkg/gateway/lb/handler/grpc/handler.go (1 hunks)
  • rust/bin/agent/src/handler/index.rs (1 hunks)
  • rust/libs/proto/src/filter.egress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/payload.v1.rs (1 hunks)
  • rust/libs/proto/src/vald.v1.tonic.rs (9 hunks)
  • versions/GO_VERSION (1 hunks)
Files skipped from review due to trivial changes (4)
  • apis/proto/v1/vald/index.proto
  • example/client/go.mod
  • rust/libs/proto/src/filter.egress.v1.tonic.rs
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs
Files skipped from review as they are similar to previous changes (13)
  • README.md
  • apis/docs/v1/docs.md
  • apis/grpc/v1/vald/vald.go
  • apis/proto/v1/payload/payload.proto
  • codecov.yml
  • example/client/go.mod.default
  • go.mod
  • internal/core/algorithm/ngt/option.go
  • internal/net/http/client/client_test.go
  • rust/bin/agent/src/handler/index.rs
  • rust/libs/proto/src/payload.v1.rs
  • rust/libs/proto/src/vald.v1.tonic.rs
  • versions/GO_VERSION
Additional context used
GitHub Check: grpc-sequential
internal/core/algorithm/ngt/ngt.go

[failure] 1163-1163:
missing return


[failure] 1162-1162:
declared and not used: cprop

GitHub Check: grpc-stream
internal/core/algorithm/ngt/ngt.go

[failure] 1163-1163:
missing return


[failure] 1162-1162:
declared and not used: cprop

GitHub Check: codecov/patch
internal/client/v1/client/vald/vald.go

[warning] 833-837: internal/client/v1/client/vald/vald.go#L833-L837
Added lines #L833 - L837 were not covered by tests


[warning] 840-848: internal/client/v1/client/vald/vald.go#L840-L848
Added lines #L840 - L848 were not covered by tests


[warning] 850-850: internal/client/v1/client/vald/vald.go#L850
Added line #L850 was not covered by tests


[warning] 1297-1301: internal/client/v1/client/vald/vald.go#L1297-L1301
Added lines #L1297 - L1301 were not covered by tests


[warning] 1304-1304: internal/client/v1/client/vald/vald.go#L1304
Added line #L1304 was not covered by tests

pkg/gateway/lb/handler/grpc/handler.go

[warning] 4067-4071: pkg/gateway/lb/handler/grpc/handler.go#L4067-L4071
Added lines #L4067 - L4071 were not covered by tests


[warning] 4074-4077: pkg/gateway/lb/handler/grpc/handler.go#L4074-L4077
Added lines #L4074 - L4077 were not covered by tests


[warning] 4080-4086: pkg/gateway/lb/handler/grpc/handler.go#L4080-L4086
Added lines #L4080 - L4086 were not covered by tests


[warning] 4089-4116: pkg/gateway/lb/handler/grpc/handler.go#L4089-L4116
Added lines #L4089 - L4116 were not covered by tests


[warning] 4118-4118: pkg/gateway/lb/handler/grpc/handler.go#L4118
Added line #L4118 was not covered by tests


[warning] 4120-4123: pkg/gateway/lb/handler/grpc/handler.go#L4120-L4123
Added lines #L4120 - L4123 were not covered by tests


[warning] 4125-4126: pkg/gateway/lb/handler/grpc/handler.go#L4125-L4126
Added lines #L4125 - L4126 were not covered by tests


[warning] 4128-4128: pkg/gateway/lb/handler/grpc/handler.go#L4128
Added line #L4128 was not covered by tests


[warning] 4130-4133: pkg/gateway/lb/handler/grpc/handler.go#L4130-L4133
Added lines #L4130 - L4133 were not covered by tests


[warning] 4135-4135: pkg/gateway/lb/handler/grpc/handler.go#L4135
Added line #L4135 was not covered by tests


[warning] 4137-4137: pkg/gateway/lb/handler/grpc/handler.go#L4137
Added line #L4137 was not covered by tests


[warning] 4139-4139: pkg/gateway/lb/handler/grpc/handler.go#L4139
Added line #L4139 was not covered by tests


[warning] 4141-4144: pkg/gateway/lb/handler/grpc/handler.go#L4141-L4144
Added lines #L4141 - L4144 were not covered by tests


[warning] 4146-4149: pkg/gateway/lb/handler/grpc/handler.go#L4146-L4149
Added lines #L4146 - L4149 were not covered by tests


[warning] 4151-4168: pkg/gateway/lb/handler/grpc/handler.go#L4151-L4168
Added lines #L4151 - L4168 were not covered by tests


[warning] 4170-4174: pkg/gateway/lb/handler/grpc/handler.go#L4170-L4174
Added lines #L4170 - L4174 were not covered by tests


[warning] 4176-4176: pkg/gateway/lb/handler/grpc/handler.go#L4176
Added line #L4176 was not covered by tests


[warning] 4178-4178: pkg/gateway/lb/handler/grpc/handler.go#L4178
Added line #L4178 was not covered by tests

Additional comments not posted (12)
apis/swagger/v1/vald/index.swagger.json (2)

57-77: New Endpoint Definition: /index/property.

The new GET endpoint /index/property is well-defined with a summary, operation ID, and response schemas. Ensure that the implementation of this endpoint in the server code properly handles requests and returns appropriate responses based on the defined schema.


169-312: New Object Definitions: IndexProperty and IndexPropertyDetail.

The new object definitions are comprehensive and provide detailed properties related to the index. Ensure that these definitions are consistent with the actual data structures used in the server code and that they are appropriately documented for API consumers.

hack/go.mod.default (2)

3-3: Go Version Update: go 1.23.0.

The Go version has been updated to 1.23.0. Verify that the codebase is compatible with this version and take advantage of any new features or improvements it offers.

Verification successful

Go Version Compatibility Verified: go 1.23.0.

The codebase appears to be compatible with Go 1.23.0. No deprecated Go-specific features or constructs that would affect compatibility were found. The deprecated notices are mostly related to generated protobuf files, which are common and not related to the Go version.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility with Go 1.23.0 by checking for any deprecated features or breaking changes.

# Test: Check for deprecated features. Expect: No deprecated features.
rg --type go 'deprecated|removed' --ignore-case

# Test: Check for breaking changes. Expect: No breaking changes.
rg --type go 'breaking change' --ignore-case

Length of output: 17984


Script:

#!/bin/bash
# Description: Check for Go-specific deprecated features or constructs that might affect compatibility with Go 1.23.0.

# Search for known deprecated Go constructs or functions.
rg --type go 'golang.org/x' --ignore-case -A 5

# Search for any Go-specific deprecation notices.
rg --type go 'deprecated' --ignore-case -A 5

Length of output: 55331


5-5: Dependency Update: cloud.google.com/go.

The replace directive for cloud.google.com/go has been updated to point to upgrade. Ensure that this change does not introduce any breaking changes or incompatibilities with the existing codebase.

internal/core/algorithm/ngt/ngt.go (2)

90-91: New Method: GetProperty.

The GetProperty method is introduced to retrieve NGT index properties. Ensure that this method is correctly implemented and integrated with the rest of the ngt package.


162-197: Typographical Error in Property Struct.

There is a typographical error in the Property struct field EpsilonForInsersionOrder. It should be EpsilonForInsertionOrder.

-		EpsilonForInsersionOrder      float32
+		EpsilonForInsertionOrder      float32
internal/client/v1/client/vald/vald.go (2)

1295-1305: New Method: IndexProperty in singleClient.

The IndexProperty method is well-implemented with proper tracing and error handling. Ensure that this method is covered by tests to verify its functionality.

Tools
GitHub Check: codecov/patch

[warning] 1297-1301: internal/client/v1/client/vald/vald.go#L1297-L1301
Added lines #L1297 - L1301 were not covered by tests


[warning] 1304-1304: internal/client/v1/client/vald/vald.go#L1304
Added line #L1304 was not covered by tests


831-851: New Method: IndexProperty in client.

The IndexProperty method is well-implemented with proper tracing and error handling. Ensure that this method is covered by tests to verify its functionality.

Verification successful

The IndexProperty method is covered by tests. The IndexProperty method is indirectly tested in the pkg/agent/core/ngt/handler/grpc/index_test.go file through the Test_server_IndexProperty function. This indicates that the method's functionality is being verified, albeit not directly in the client package.

  • Test function: Test_server_IndexProperty in pkg/agent/core/ngt/handler/grpc/index_test.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify test coverage for the `IndexProperty` method in `client`.

# Test: Check for test functions. Expect: Test functions covering `IndexProperty`.
rg --type go 'func TestIndexProperty' -A 5

Length of output: 44


Script:

#!/bin/bash
# Search for references to the `IndexProperty` method in Go test files to check for indirect test coverage.
rg --type go 'IndexProperty' --glob '*_test.go' -A 5

Length of output: 898

Tools
GitHub Check: codecov/patch

[warning] 833-837: internal/client/v1/client/vald/vald.go#L833-L837
Added lines #L833 - L837 were not covered by tests


[warning] 840-848: internal/client/v1/client/vald/vald.go#L840-L848
Added lines #L840 - L848 were not covered by tests


[warning] 850-850: internal/client/v1/client/vald/vald.go#L850
Added line #L850 was not covered by tests

pkg/agent/core/ngt/handler/grpc/index_test.go (1)

2544-2582: Expand test coverage for IndexProperty.

The test function currently includes only one test case. Consider adding more test cases to cover various scenarios, as indicated by the TODO comment.

pkg/gateway/lb/handler/grpc/handler.go (3)

4074-4078: Initialize error channel with appropriate buffer size.

The error channel ech is initialized without a buffer. Consider adding a buffer to prevent potential blocking if multiple errors are encountered.

ech := make(chan error, s.gateway.GetAgentCount(ctx))
Tools
GitHub Check: codecov/patch

[warning] 4074-4077: pkg/gateway/lb/handler/grpc/handler.go#L4074-L4077
Added lines #L4074 - L4077 were not covered by tests


4080-4086: Review error handling within the goroutine.

The error handling logic inside the goroutine should ensure that all possible errors are captured and appropriately handled. The switch case covers common errors, but consider if additional error types should be managed.

+ // Consider adding handling for other potential error types that may arise.
Tools
GitHub Check: codecov/patch

[warning] 4080-4086: pkg/gateway/lb/handler/grpc/handler.go#L4080-L4086
Added lines #L4080 - L4086 were not covered by tests


4089-4116: Ensure comprehensive error handling and test coverage.

The IndexProperty method's error handling covers several cases, but ensure that all potential errors are managed and that the logic is covered by tests.

Tools
GitHub Check: codecov/patch

[warning] 4089-4116: pkg/gateway/lb/handler/grpc/handler.go#L4089-L4116
Added lines #L4089 - L4116 were not covered by tests

internal/core/algorithm/ngt/ngt.go Outdated Show resolved Hide resolved
pkg/gateway/lb/handler/grpc/handler.go Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Outside diff range, codebase verification and nitpick comments (4)
apis/docs/v1/docs.md (4)

328-368: Add descriptions for fields in Info.Index.Property.

The fields in this section lack descriptions. Adding descriptions will improve clarity and usability of the documentation.

| Field                              | Type              | Label | Description |
| ---------------------------------- | ----------------- | ----- | ----------- |
| dimension                          | [int32](#int32)   |       | Dimension of the index. |
| thread_pool_size                   | [int32](#int32)   |       | Size of the thread pool. |
| object_type                        | [string](#string) |       | Type of the object. |
| distance_type                      | [string](#string) |       | Type of distance metric used. |
| index_type                         | [string](#string) |       | Type of index. |
| database_type                      | [string](#string) |       | Type of database. |
| object_alignment                   | [string](#string) |       | Alignment of the object. |
| path_adjustment_interval           | [int32](#int32)   |       | Interval for path adjustment. |
| graph_shared_memory_size           | [int32](#int32)   |       | Size of shared memory for graph. |
| tree_shared_memory_size            | [int32](#int32)   |       | Size of shared memory for tree. |
| object_shared_memory_size          | [int32](#int32)   |       | Size of shared memory for object. |
| prefetch_offset                    | [int32](#int32)   |       | Offset for prefetching. |
| prefetch_size                      | [int32](#int32)   |       | Size of prefetch. |
| accuracy_table                     | [string](#string) |       | Table of accuracy metrics. |
| search_type                        | [string](#string) |       | Type of search. |
| max_magnitude                      | [float](#float)   |       | Maximum magnitude. |
| n_of_neighbors_for_insertion_order | [int32](#int32)   |       | Number of neighbors for insertion order. |
| epsilon_for_insertion_order        | [float](#float)   |       | Epsilon value for insertion order. |
| refinement_object_type             | [string](#string) |       | Type of refinement object. |
| truncation_threshold               | [int32](#int32)   |       | Threshold for truncation. |
| edge_size_for_creation             | [int32](#int32)   |       | Edge size for creation. |
| edge_size_for_search               | [int32](#int32)   |       | Edge size for search. |
| edge_size_limit_for_creation       | [int32](#int32)   |       | Limit on edge size for creation. |
| insertion_radius_coefficient       | [double](#double) |       | Coefficient for insertion radius. |
| seed_size                          | [int32](#int32)   |       | Size of seed. |
| seed_type                          | [string](#string) |       | Type of seed. |
| truncation_thread_pool_size        | [int32](#int32)   |       | Thread pool size for truncation. |
| batch_size_for_creation            | [int32](#int32)   |       | Batch size for creation. |
| graph_type                         | [string](#string) |       | Type of graph. |
| dynamic_edge_size_base             | [int32](#int32)   |       | Base size for dynamic edge. |
| dynamic_edge_size_rate             | [int32](#int32)   |       | Rate of dynamic edge size. |
| build_time_limit                   | [float](#float)   |       | Limit on build time. |
| outgoing_edge                      | [int32](#int32)   |       | Number of outgoing edges. |
| incoming_edge                      | [int32](#int32)   |       | Number of incoming edges. |

371-377: Add description for details field in Info.Index.PropertyDetail.

The details field lacks a description. Adding a description will enhance the clarity of the documentation.

| Field   | Type                                                                                         | Label    | Description |
| ------- | -------------------------------------------------------------------------------------------- | -------- | ----------- |
| details | [Info.Index.PropertyDetail.DetailsEntry](#payload-v1-Info-Index-PropertyDetail-DetailsEntry) | repeated | Detailed properties for each agent. |

381-386: Add descriptions for fields in Info.Index.PropertyDetail.DetailsEntry.

The key and value fields lack descriptions. Adding descriptions will improve clarity and usability of the documentation.

| Field | Type                                                   | Label | Description |
| ----- | ------------------------------------------------------ | ----- | ----------- |
| key   | [string](#string)                                      |       | The key for the property detail entry. |
| value | [Info.Index.Property](#payload-v1-Info-Index-Property) |       | The value associated with the key, representing the index property. |

1636-1636: Enhance description for IndexProperty RPC method.

The description for the IndexProperty RPC method is brief. Providing a more detailed explanation of its functionality and use cases will improve the documentation.

| Method Name           | Request Type                           | Response Type                                                                      | Description                                                     |
| --------------------- | -------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| IndexProperty         | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.PropertyDetail](#payload-v1-Info-Index-PropertyDetail)     | Represents the RPC to retrieve detailed index properties for each agent, allowing users to access specific configuration and performance metrics. |
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3a387c6 and 66ae195.

Files ignored due to path filters (10)
  • apis/grpc/v1/agent/sidecar/sidecar_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/payload/payload.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/payload/payload.pb.json.go is excluded by !**/*.pb.json.go
  • apis/grpc/v1/payload/payload_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/rpc/errdetails/error_details.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • apis/grpc/v1/vald/index_vtproto.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • example/client/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
  • rust/Cargo.lock is excluded by !**/*.lock
Files selected for processing (23)
  • README.md (1 hunks)
  • apis/docs/v1/docs.md (3 hunks)
  • apis/grpc/v1/vald/vald.go (1 hunks)
  • apis/proto/v1/payload/payload.proto (1 hunks)
  • apis/proto/v1/vald/index.proto (1 hunks)
  • apis/swagger/v1/vald/index.swagger.json (2 hunks)
  • codecov.yml (1 hunks)
  • example/client/go.mod (2 hunks)
  • example/client/go.mod.default (1 hunks)
  • go.mod (16 hunks)
  • hack/go.mod.default (1 hunks)
  • internal/client/v1/client/vald/vald.go (2 hunks)
  • internal/core/algorithm/ngt/ngt.go (7 hunks)
  • internal/core/algorithm/ngt/option.go (1 hunks)
  • internal/net/http/client/client_test.go (1 hunks)
  • pkg/agent/core/ngt/handler/grpc/index_test.go (2 hunks)
  • pkg/gateway/lb/handler/grpc/handler.go (1 hunks)
  • rust/bin/agent/src/handler/index.rs (1 hunks)
  • rust/libs/proto/src/filter.egress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs (2 hunks)
  • rust/libs/proto/src/payload.v1.rs (1 hunks)
  • rust/libs/proto/src/vald.v1.tonic.rs (9 hunks)
  • versions/GO_VERSION (1 hunks)
Files skipped from review due to trivial changes (5)
  • apis/grpc/v1/vald/vald.go
  • apis/proto/v1/vald/index.proto
  • example/client/go.mod
  • rust/libs/proto/src/filter.egress.v1.tonic.rs
  • rust/libs/proto/src/filter.ingress.v1.tonic.rs
Files skipped from review as they are similar to previous changes (12)
  • README.md
  • apis/proto/v1/payload/payload.proto
  • apis/swagger/v1/vald/index.swagger.json
  • codecov.yml
  • example/client/go.mod.default
  • go.mod
  • hack/go.mod.default
  • internal/core/algorithm/ngt/option.go
  • internal/net/http/client/client_test.go
  • rust/bin/agent/src/handler/index.rs
  • rust/libs/proto/src/payload.v1.rs
  • versions/GO_VERSION
Additional context used
GitHub Check: grpc-sequential
internal/core/algorithm/ngt/ngt.go

[failure] 1163-1163:
missing return


[failure] 1162-1162:
declared and not used: cprop

GitHub Check: grpc-stream
internal/core/algorithm/ngt/ngt.go

[failure] 1163-1163:
missing return


[failure] 1162-1162:
declared and not used: cprop

GitHub Check: codecov/patch
internal/client/v1/client/vald/vald.go

[warning] 833-837: internal/client/v1/client/vald/vald.go#L833-L837
Added lines #L833 - L837 were not covered by tests


[warning] 840-848: internal/client/v1/client/vald/vald.go#L840-L848
Added lines #L840 - L848 were not covered by tests


[warning] 850-850: internal/client/v1/client/vald/vald.go#L850
Added line #L850 was not covered by tests


[warning] 1297-1301: internal/client/v1/client/vald/vald.go#L1297-L1301
Added lines #L1297 - L1301 were not covered by tests


[warning] 1304-1304: internal/client/v1/client/vald/vald.go#L1304
Added line #L1304 was not covered by tests

pkg/gateway/lb/handler/grpc/handler.go

[warning] 4067-4071: pkg/gateway/lb/handler/grpc/handler.go#L4067-L4071
Added lines #L4067 - L4071 were not covered by tests


[warning] 4074-4077: pkg/gateway/lb/handler/grpc/handler.go#L4074-L4077
Added lines #L4074 - L4077 were not covered by tests


[warning] 4080-4086: pkg/gateway/lb/handler/grpc/handler.go#L4080-L4086
Added lines #L4080 - L4086 were not covered by tests


[warning] 4089-4116: pkg/gateway/lb/handler/grpc/handler.go#L4089-L4116
Added lines #L4089 - L4116 were not covered by tests


[warning] 4118-4118: pkg/gateway/lb/handler/grpc/handler.go#L4118
Added line #L4118 was not covered by tests


[warning] 4120-4123: pkg/gateway/lb/handler/grpc/handler.go#L4120-L4123
Added lines #L4120 - L4123 were not covered by tests


[warning] 4125-4126: pkg/gateway/lb/handler/grpc/handler.go#L4125-L4126
Added lines #L4125 - L4126 were not covered by tests


[warning] 4128-4128: pkg/gateway/lb/handler/grpc/handler.go#L4128
Added line #L4128 was not covered by tests


[warning] 4130-4133: pkg/gateway/lb/handler/grpc/handler.go#L4130-L4133
Added lines #L4130 - L4133 were not covered by tests


[warning] 4135-4135: pkg/gateway/lb/handler/grpc/handler.go#L4135
Added line #L4135 was not covered by tests


[warning] 4137-4137: pkg/gateway/lb/handler/grpc/handler.go#L4137
Added line #L4137 was not covered by tests


[warning] 4139-4139: pkg/gateway/lb/handler/grpc/handler.go#L4139
Added line #L4139 was not covered by tests


[warning] 4141-4144: pkg/gateway/lb/handler/grpc/handler.go#L4141-L4144
Added lines #L4141 - L4144 were not covered by tests


[warning] 4146-4149: pkg/gateway/lb/handler/grpc/handler.go#L4146-L4149
Added lines #L4146 - L4149 were not covered by tests


[warning] 4151-4168: pkg/gateway/lb/handler/grpc/handler.go#L4151-L4168
Added lines #L4151 - L4168 were not covered by tests


[warning] 4170-4174: pkg/gateway/lb/handler/grpc/handler.go#L4170-L4174
Added lines #L4170 - L4174 were not covered by tests


[warning] 4176-4176: pkg/gateway/lb/handler/grpc/handler.go#L4176
Added line #L4176 was not covered by tests


[warning] 4178-4178: pkg/gateway/lb/handler/grpc/handler.go#L4178
Added line #L4178 was not covered by tests

Additional comments not posted (5)
pkg/agent/core/ngt/handler/grpc/index_test.go (1)

2477-2582: Expand test coverage for IndexProperty.

The test function currently includes only one test case. Consider adding more test cases to cover various scenarios, as indicated by the TODO comment.

pkg/gateway/lb/handler/grpc/handler.go (2)

4074-4078: Initialize error channel with appropriate buffer size.

The error channel ech is initialized without a buffer. Consider adding a buffer to prevent potential blocking if multiple errors are encountered.

ech := make(chan error, s.gateway.GetAgentCount(ctx))
Tools
GitHub Check: codecov/patch

[warning] 4074-4077: pkg/gateway/lb/handler/grpc/handler.go#L4074-L4077
Added lines #L4074 - L4077 were not covered by tests


4065-4178: LGTM!

The IndexProperty function is well-structured with appropriate error handling and tracing.

Tools
GitHub Check: codecov/patch

[warning] 4067-4071: pkg/gateway/lb/handler/grpc/handler.go#L4067-L4071
Added lines #L4067 - L4071 were not covered by tests


[warning] 4074-4077: pkg/gateway/lb/handler/grpc/handler.go#L4074-L4077
Added lines #L4074 - L4077 were not covered by tests


[warning] 4080-4086: pkg/gateway/lb/handler/grpc/handler.go#L4080-L4086
Added lines #L4080 - L4086 were not covered by tests


[warning] 4089-4116: pkg/gateway/lb/handler/grpc/handler.go#L4089-L4116
Added lines #L4089 - L4116 were not covered by tests


[warning] 4118-4118: pkg/gateway/lb/handler/grpc/handler.go#L4118
Added line #L4118 was not covered by tests


[warning] 4120-4123: pkg/gateway/lb/handler/grpc/handler.go#L4120-L4123
Added lines #L4120 - L4123 were not covered by tests


[warning] 4125-4126: pkg/gateway/lb/handler/grpc/handler.go#L4125-L4126
Added lines #L4125 - L4126 were not covered by tests


[warning] 4128-4128: pkg/gateway/lb/handler/grpc/handler.go#L4128
Added line #L4128 was not covered by tests


[warning] 4130-4133: pkg/gateway/lb/handler/grpc/handler.go#L4130-L4133
Added lines #L4130 - L4133 were not covered by tests


[warning] 4135-4135: pkg/gateway/lb/handler/grpc/handler.go#L4135
Added line #L4135 was not covered by tests


[warning] 4137-4137: pkg/gateway/lb/handler/grpc/handler.go#L4137
Added line #L4137 was not covered by tests


[warning] 4139-4139: pkg/gateway/lb/handler/grpc/handler.go#L4139
Added line #L4139 was not covered by tests


[warning] 4141-4144: pkg/gateway/lb/handler/grpc/handler.go#L4141-L4144
Added lines #L4141 - L4144 were not covered by tests


[warning] 4146-4149: pkg/gateway/lb/handler/grpc/handler.go#L4146-L4149
Added lines #L4146 - L4149 were not covered by tests


[warning] 4151-4168: pkg/gateway/lb/handler/grpc/handler.go#L4151-L4168
Added lines #L4151 - L4168 were not covered by tests


[warning] 4170-4174: pkg/gateway/lb/handler/grpc/handler.go#L4170-L4174
Added lines #L4170 - L4174 were not covered by tests


[warning] 4176-4176: pkg/gateway/lb/handler/grpc/handler.go#L4176
Added line #L4176 was not covered by tests


[warning] 4178-4178: pkg/gateway/lb/handler/grpc/handler.go#L4178
Added line #L4178 was not covered by tests

rust/libs/proto/src/vald.v1.tonic.rs (2)

1836-1864: New index_property method in index_client is well-implemented.

The addition of the index_property method to the index_client module is correctly implemented, following the established pattern for gRPC client methods. This enhancement expands the service's capabilities effectively.


1908-1918: New index_property method in index_server is well-implemented.

The server-side implementation of the index_property method aligns with the client-side, ensuring consistency and correctness in handling requests and responses.

internal/core/algorithm/ngt/ngt.go Outdated Show resolved Hide resolved
internal/core/algorithm/ngt/ngt.go Outdated Show resolved Hide resolved
internal/client/v1/client/vald/vald.go Show resolved Hide resolved
internal/client/v1/client/vald/vald.go Show resolved Hide resolved
pkg/gateway/lb/handler/grpc/handler.go Show resolved Hide resolved
kmrmt and others added 2 commits August 20, 2024 15:23
Signed-off-by: Kosuke Morimoto <[email protected]>
This commit fixes the style issues introduced in 1d43dbb according to the output
from Gofumpt and Prettier.

Details: #2584
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 66ae195 and e4526c3.

Files selected for processing (1)
  • internal/core/algorithm/ngt/ngt.go (7 hunks)
Additional context used
GitHub Check: codecov/patch
internal/core/algorithm/ngt/ngt.go

[warning] 399-404: internal/core/algorithm/ngt/ngt.go#L399-L404
Added lines #L399 - L404 were not covered by tests


[warning] 406-406: internal/core/algorithm/ngt/ngt.go#L406
Added line #L406 was not covered by tests


[warning] 409-414: internal/core/algorithm/ngt/ngt.go#L409-L414
Added lines #L409 - L414 were not covered by tests


[warning] 416-416: internal/core/algorithm/ngt/ngt.go#L416
Added line #L416 was not covered by tests


[warning] 419-424: internal/core/algorithm/ngt/ngt.go#L419-L424
Added lines #L419 - L424 were not covered by tests


[warning] 426-426: internal/core/algorithm/ngt/ngt.go#L426
Added line #L426 was not covered by tests


[warning] 429-438: internal/core/algorithm/ngt/ngt.go#L429-L438
Added lines #L429 - L438 were not covered by tests


[warning] 440-440: internal/core/algorithm/ngt/ngt.go#L440
Added line #L440 was not covered by tests


[warning] 443-460: internal/core/algorithm/ngt/ngt.go#L443-L460
Added lines #L443 - L460 were not covered by tests


[warning] 462-462: internal/core/algorithm/ngt/ngt.go#L462
Added line #L462 was not covered by tests


[warning] 1160-1199: internal/core/algorithm/ngt/ngt.go#L1160-L1199
Added lines #L1160 - L1199 were not covered by tests

Additional comments not posted (1)
internal/core/algorithm/ngt/ngt.go (1)

1160-1199: Ensure correct mapping of fields in GetProperty.

The GetProperty method implementation looks mostly correct, but there is a potential issue with the mapping of EpsilonForInsertionOrder. It seems to be incorrectly set to n_of_neighbors_for_insertion_order, which might be a copy-paste error. Verify the correct mapping for this field.

Tools
GitHub Check: codecov/patch

[warning] 1160-1199: internal/core/algorithm/ngt/ngt.go#L1160-L1199
Added lines #L1160 - L1199 were not covered by tests

internal/core/algorithm/ngt/ngt.go Show resolved Hide resolved
internal/core/algorithm/ngt/ngt.go Show resolved Hide resolved
internal/core/algorithm/ngt/ngt.go Show resolved Hide resolved
internal/core/algorithm/ngt/ngt.go Show resolved Hide resolved
internal/core/algorithm/ngt/ngt.go Show resolved Hide resolved
Signed-off-by: Kosuke Morimoto <[email protected]>
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between e4526c3 and 50d6a8c.

Files selected for processing (2)
  • pkg/agent/core/ngt/handler/grpc/index.go (1 hunks)
  • pkg/agent/core/ngt/service/ngt.go (2 hunks)
Files skipped from review as they are similar to previous changes (2)
  • pkg/agent/core/ngt/handler/grpc/index.go
  • pkg/agent/core/ngt/service/ngt.go

Signed-off-by: Kosuke Morimoto <[email protected]>
coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 20, 2024
Signed-off-by: Kosuke Morimoto <[email protected]>
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 50d6a8c and 4994b17.

Files ignored due to path filters (1)
  • apis/grpc/v1/payload/payload.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
Files selected for processing (1)
  • codecov.yml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • codecov.yml

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 20, 2024
@kmrmt kmrmt requested review from a team, kpango and hlts2 and removed request for a team August 21, 2024 01:00
Signed-off-by: Kosuke Morimoto <[email protected]>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4994b17 and 438b4a8.

Files selected for processing (1)
  • internal/core/algorithm/ngt/ngt_test.go (1 hunks)
Additional comments not posted (2)
internal/core/algorithm/ngt/ngt_test.go (2)

4788-4794: LGTM! The use of a default check function is appropriate.

The defaultCheckFunc provides a clear and reusable way to validate test results. This approach enhances maintainability and readability.


4795-4803: LGTM! The use of a default create function is appropriate.

The defaultCreateFunc simplifies the creation of NGT instances for testing. This approach promotes code reuse and reduces duplication.

internal/core/algorithm/ngt/ngt_test.go Show resolved Hide resolved
Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

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

LGTM

@kpango kpango merged commit 4560a2b into main Aug 22, 2024
161 checks passed
@kpango kpango deleted the feature/agent/ngt-property-api branch August 22, 2024 05:25
vdaas-ci pushed a commit that referenced this pull request Aug 22, 2024
* add property to proto

Signed-off-by: Kosuke Morimoto <[email protected]>

* build proto files

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix rust API

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix unit test

Signed-off-by: Kosuke Morimoto <[email protected]>

* make format

Signed-off-by: Kosuke Morimoto <[email protected]>

* make format

Signed-off-by: Kosuke Morimoto <[email protected]>

* update

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix test

Signed-off-by: Kosuke Morimoto <[email protected]>

* add unit test

Signed-off-by: Kosuke Morimoto <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in de3ef81 according to the output
from Gofumpt and Prettier.

Details: #2584

* add codecov.yml to ignore generated code

Signed-off-by: Kosuke Morimoto <[email protected]>

* make format

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix conflict

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix

Signed-off-by: Kosuke Morimoto <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 1d43dbb according to the output
from Gofumpt and Prettier.

Details: #2584

* fix

Signed-off-by: Kosuke Morimoto <[email protected]>

* format

Signed-off-by: Kosuke Morimoto <[email protected]>

* add codecov ignore

Signed-off-by: Kosuke Morimoto <[email protected]>

* add unit test

Signed-off-by: Kosuke Morimoto <[email protected]>

---------

Signed-off-by: Kosuke Morimoto <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
kmrmt added a commit that referenced this pull request Sep 3, 2024
…2588)

* Implement ngt property get API (#2584)

* add property to proto

Signed-off-by: Kosuke Morimoto <[email protected]>

* build proto files

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix rust API

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix unit test

Signed-off-by: Kosuke Morimoto <[email protected]>

* make format

Signed-off-by: Kosuke Morimoto <[email protected]>

* make format

Signed-off-by: Kosuke Morimoto <[email protected]>

* update

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix test

Signed-off-by: Kosuke Morimoto <[email protected]>

* add unit test

Signed-off-by: Kosuke Morimoto <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in de3ef81 according to the output
from Gofumpt and Prettier.

Details: #2584

* add codecov.yml to ignore generated code

Signed-off-by: Kosuke Morimoto <[email protected]>

* make format

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix conflict

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix

Signed-off-by: Kosuke Morimoto <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 1d43dbb according to the output
from Gofumpt and Prettier.

Details: #2584

* fix

Signed-off-by: Kosuke Morimoto <[email protected]>

* format

Signed-off-by: Kosuke Morimoto <[email protected]>

* add codecov ignore

Signed-off-by: Kosuke Morimoto <[email protected]>

* add unit test

Signed-off-by: Kosuke Morimoto <[email protected]>

---------

Signed-off-by: Kosuke Morimoto <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* resolve conflict

Signed-off-by: Kosuke Morimoto <[email protected]>

* fix conflict

Signed-off-by: Kosuke Morimoto <[email protected]>

---------

Signed-off-by: Kosuke Morimoto <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment