-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Bugfix] IndexInfo API moved from Agent Client to Vald Client #132
Conversation
Signed-off-by: hlts2 <[email protected]>
Warning Rate limit exceeded@hlts2 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 32 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughWalkthroughThe recent changes introduce various enhancements and refactorings, primarily focusing on the Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this 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
Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
Files selected for processing (16)
- VALD_SHA (1 hunks)
- index.d.ts (1 hunks)
- index.js (1 hunks)
- src/vald/v1/agent/core/agent_pb.grpc-client.d.ts (3 hunks)
- src/vald/v1/agent/core/agent_pb.grpc-client.js (1 hunks)
- src/vald/v1/agent/core/agent_pb.js (1 hunks)
- src/vald/v1/payload/payload_pb.d.ts (4 hunks)
- src/vald/v1/payload/payload_pb.js (4 hunks)
- src/vald/v1/vald/index_pb.d.ts (1 hunks)
- src/vald/v1/vald/index_pb.grpc-client.d.ts (1 hunks)
- src/vald/v1/vald/index_pb.grpc-client.js (1 hunks)
- src/vald/v1/vald/index_pb.js (1 hunks)
- src/vald/v1/vald/object_pb.grpc-client.d.ts (3 hunks)
- src/vald/v1/vald/object_pb.grpc-client.js (1 hunks)
- src/vald/v1/vald/object_pb.js (1 hunks)
- tests/e2e.test.ts (3 hunks)
Files skipped from review due to trivial changes (3)
- VALD_SHA
- index.js
- src/vald/v1/vald/index_pb.d.ts
Additional context used
Biome
src/vald/v1/vald/index_pb.js
[error] 22-23: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
src/vald/v1/vald/index_pb.grpc-client.js
[error] 22-23: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
Additional comments not posted (42)
index.d.ts (2)
2-2
: Import statement forv1_payload
is correct.The import statement is consistent with the existing import pattern.
6-6
: Export statement forv1_payload
is correct.The export statement is consistent with the existing export pattern.
src/vald/v1/agent/core/agent_pb.js (2)
55-55
: Verify the correctness ofCreateIndex
service method changes.The HTTP path has been updated to include
{pool_size}
and the input type has been changed topayload_pb_2.Control_CreateIndexRequest
. Ensure that the new path and input type are correctly implemented and consistent with the service definitions.
57-57
: Verify the correctness ofCreateAndSaveIndex
service method changes.The HTTP path has been updated to include
{pool_size}
and the input type has been changed topayload_pb_2.Control_CreateIndexRequest
. Ensure that the new path and input type are correctly implemented and consistent with the service definitions.src/vald/v1/vald/index_pb.js (2)
56-56
: Verify the correctness ofIndexInfo
service method.The
IndexInfo
service method has been added with the HTTP path/index/info
. Ensure that the new service method is correctly implemented and consistent with the service definitions.
57-57
: Verify the correctness ofIndexDetail
service method.The
IndexDetail
service method has been added with the HTTP path/index/detail
. Ensure that the new service method is correctly implemented and consistent with the service definitions.src/vald/v1/vald/object_pb.js (6)
54-55
: LGTM! Approved import changes.The new payload types are imported correctly and will be used in the updated methods.
61-61
: LGTM! Approved methodExists
changes.The method
Exists
uses the new payload typepayload_pb_8.Object_ID
correctly.
62-62
: LGTM! Approved methodGetObject
changes.The method
GetObject
uses the new payload typespayload_pb_7.Object_VectorRequest
andpayload_pb_6.Object_Vector
correctly.
63-63
: LGTM! Approved methodStreamGetObject
changes.The method
StreamGetObject
uses the new payload typespayload_pb_7.Object_VectorRequest
andpayload_pb_5.Object_StreamVector
correctly.
64-64
: LGTM! Approved methodStreamListObject
changes.The method
StreamListObject
uses the new payload typespayload_pb_4.Object_List_Request
andpayload_pb_3.Object_List_Response
correctly.
65-65
: LGTM! Approved methodGetTimestamp
addition.The new method
GetTimestamp
is added correctly and uses the appropriate payload types.src/vald/v1/vald/index_pb.grpc-client.js (2)
65-68
: LGTM! Approved methodindexInfo
implementation.The method
indexInfo
is implemented correctly to get index information.
74-77
: LGTM! Approved methodindexDetail
implementation.The method
indexDetail
is implemented correctly to get detailed index information.src/vald/v1/agent/core/agent_pb.grpc-client.js (2)
Line range hint
1-79
: LGTM! Approved removal of methodindexInfo
.The removal of the method
indexInfo
from theAgentClient
class is consistent with the PR objectives.
Line range hint
1-79
: LGTM! Approved removal of methodgetTimestamp
.The removal of the method
getTimestamp
from theAgentClient
class is consistent with the PR objectives.src/vald/v1/vald/index_pb.grpc-client.d.ts (5)
1-29
: File header and imports look good.The licensing information is correct and all necessary imports are included.
30-53
:IIndexClient
interface looks good.The methods are correctly declared and aligned with the protobuf definitions.
59-61
:IndexClient
class constructor looks good.The constructor is correctly implemented and follows best practices.
62-67
:IndexClient.indexInfo
method looks good.The method is correctly implemented and handles all parameter combinations.
68-73
:IndexClient.indexDetail
method looks good.The method is correctly implemented and handles all parameter combinations.
src/vald/v1/vald/object_pb.grpc-client.js (4)
Line range hint
1-29
: File header and imports look good.The licensing information is correct and all necessary imports are included.
Line range hint
30-35
:ObjectClient
class constructor looks good.The constructor is correctly implemented and follows best practices.
Line range hint
36-95
: Existing methods inObjectClient
class look good.The methods are correctly implemented and follow best practices.
96-104
:ObjectClient.getTimestamp
method looks good.The method is correctly implemented and follows best practices.
src/vald/v1/agent/core/agent_pb.grpc-client.d.ts (4)
Line range hint
1-16
: File header and imports look good.The licensing information is correct and all necessary imports are included.
Line range hint
17-33
:IAgentClient
interface looks good.The remaining methods are correctly declared and aligned with the protobuf definitions. The removal of
indexInfo
andgetTimestamp
methods aligns with the PR objectives.
Line range hint
34-36
:AgentClient
class constructor looks good.The constructor is correctly implemented and follows best practices.
Line range hint
37-66
: Remaining methods inAgentClient
class look good.The methods are correctly implemented and follow best practices. The removal of
indexInfo
andgetTimestamp
methods aligns with the PR objectives.src/vald/v1/vald/object_pb.grpc-client.d.ts (3)
25-26
: Imports are necessary for the new method.The import statements for
Object_Timestamp
andObject_TimestampRequest
are necessary for the newgetTimestamp
method.
72-80
: New method overloads enhance client interface functionality.The addition of the
getTimestamp
method with multiple overloads in theIObjectClient
interface provides flexibility for different combinations of parameters, enhancing the functionality of the client interface.
114-119
: New method overloads enhance client class functionality.The addition of the
getTimestamp
method with multiple overloads in theObjectClient
class provides flexibility for different combinations of parameters, enhancing the functionality of the client class.tests/e2e.test.ts (2)
19-19
: Import is necessary for the new testing suite.The import statement for
IndexClient
from theindex_pb.grpc-client
module is necessary for the new testing suite for index operations.
207-226
: New testing suite enhances testing capabilities.The new testing suite for index operations, including setup and teardown procedures for the
IndexClient
, enhances the testing capabilities related to index operations.src/vald/v1/payload/payload_pb.d.ts (6)
923-923
: RenamedObject_GetTimestampRequest
toObject_TimestampRequest
.The renaming improves clarity and aligns with the purpose of the interface.
2112-2116
: RenamedObject_GetTimestampRequest$Type
toObject_TimestampRequest$Type
.The renaming maintains consistency with the interface name change.
2119-2121
: RenamedObject_GetTimestampRequest
constant toObject_TimestampRequest
.The renaming maintains consistency with the interface and class name changes.
1260-1286
: AddedInfo_Index_Detail
interface.The new interface provides a clear and organized way to handle detailed index counts for agents.
2312-2318
: AddedInfo_Index_Detail$Type
class.The new class provides necessary serialization and deserialization functionality for the
Info_Index_Detail
interface.
2319-2322
: AddedInfo_Index_Detail
constant.The new constant aligns with the interface and class additions, ensuring consistency.
src/vald/v1/payload/payload_pb.js (2)
2463-2465
: Renaming is consistent.The class
Object_GetTimestampRequest
has been renamed toObject_TimestampRequest
and the associated exports have been updated. Ensure that all references to this class in the codebase are updated accordingly.Verification successful
Renaming is consistent.
The class
Object_GetTimestampRequest
has been successfully renamed toObject_TimestampRequest
and the associated references have been updated throughout the codebase.
src/vald/v1/vald/object_pb.js
src/vald/v1/payload/payload_pb.js
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `Object_GetTimestampRequest` have been updated to `Object_TimestampRequest`. # Test: Search for the old class name. Expect: No occurrences of the old class name. rg --type js 'Object_GetTimestampRequest'Length of output: 41
Script:
#!/bin/bash # Description: Verify that the new class name `Object_TimestampRequest` is used correctly throughout the codebase. # Test: Search for the new class name. Expect: Occurrences of the new class name. rg --type js 'Object_TimestampRequest'Length of output: 2793
3410-3491
: New classInfo_Index_Detail
is well-defined.The new class
Info_Index_Detail
has been added with propertiescounts
,replica
, andlive_agents
. The class is well-defined and follows best practices.Ensure that the new class is correctly integrated and used within the codebase.
Verification successful
New class
Info_Index_Detail
is well-defined and properly integrated.The new class
Info_Index_Detail
is referenced and used across multiple files, includingindex_pb.js
,index_pb.grpc-client.d.ts
, andpayload_pb.d.ts
. This indicates proper integration and usage within the codebase.
src/vald/v1/vald/index_pb.js
src/vald/v1/vald/index_pb.grpc-client.d.ts
src/vald/v1/payload/payload_pb.d.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage and integration of the new class `Info_Index_Detail`. # Test: Search for the usage of the new class. Expect: Proper integration and usage. rg --type js 'Info_Index_Detail'Length of output: 2743
Script:
#!/bin/bash # Description: Verify the usage and integration of the new class `Info_Index_Detail` in index_pb.js. # Test: Search for the usage of the new class within index_pb.js. Expect: Proper integration and usage. rg 'Info_Index_Detail' src/vald/v1/vald/index_pb.js -A 10Length of output: 205
Script:
#!/bin/bash # Description: Verify the usage and integration of the new class `Info_Index_Detail` across the repository. # Test: Search for any additional references to the new class within the repository. Expect: Proper integration and usage. rg 'Info_Index_Detail'Length of output: 4758
Signed-off-by: hlts2 <[email protected]>
There was a problem hiding this 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
Files selected for processing (2)
- src/vald/v1/vald/index.d.ts (2 hunks)
- src/vald/v1/vald/index.js (1 hunks)
Additional comments not posted (3)
src/vald/v1/vald/index.js (1)
7-8
: New exports added forindex
andindex_grpc
.The new exports follow the same pattern as the existing ones, ensuring consistency in the module's structure.
src/vald/v1/vald/index.d.ts (2)
7-8
: New imports added forindex
andindex_grpc
.The new imports follow the same pattern as the existing ones, ensuring consistency in the module's structure.
24-25
: New exports added forindex
andindex_grpc
.The new exports follow the same pattern as the existing ones, ensuring consistency in the module's structure.
Signed-off-by: hlts2 <[email protected]>
Signed-off-by: Vdaas CI <[email protected]>
Signed-off-by: hlts2 <[email protected]>
Signed-off-by: hlts2 <[email protected]>
Signed-off-by: Vdaas CI <[email protected]>
Signed-off-by: hlts2 <[email protected]>
As titled
Summary by CodeRabbit
New Features
v1_payload
to the exported default object.Improvements
IAgentClient
interface.Bug Fixes
Tests