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

.NET SDK rework #25

Merged
merged 78 commits into from
Aug 6, 2023
Merged

.NET SDK rework #25

merged 78 commits into from
Aug 6, 2023

Conversation

roji
Copy link
Collaborator

@roji roji commented Aug 4, 2023

tawalke and others added 30 commits June 8, 2023 19:33
- It shouldn't create a new HttpClient instance for each MilvusRestClient.  If one isn't supplied to the ctor, it should use a shared instance.
- It shouldn't configure a supplied HttpClient instance with a base Uri or default headers.  Doing so would mutate an HttpClient potentially being used for other purposes.
- It shouldn't Dispose of a supplied HttpClient instance, as ownership isn't being transferred.
- Also marked the client as sealed so that it needn't implement the IDisposable pattern and deal with possible derived types.  And then related removed the duplicative Close that's unnecessary with Dispose existing.
- Removed duplicative BaseAddress.
- Seal it, and then avoid implementing the IDisposable pattern
- Avoid disposing of a GrpcChannel passed in, as this client does not have ownership of it
- Dedup methods
- Avoid serializing to an intermediate throwaway string
- Avoid a new HttpMethod for PATCH on every call
The IGrpcRequest, IRestRequest, and IValidatable interfaces don't seem to be serving a purpose.  They're implemented but never consumed.
The files under ApiSchema were attempting to centralize argument handling across the gRPC and REST clients.  However, this led to complications around things like argument validation, such as arguments not being validated before they were used, and also made it harder to see the flow of data from arguments into the REST / gRPC calls. We're also contemplating whether we need the REST client at all, at which point such centralization only adds complexity.
Makes it easier to reason about the surface area and version.  We can selectively unseal as needed.
roji and others added 24 commits July 15, 2023 15:54
* fixed oldpassword enocder error

* fixed test error

* Apply suggestions from code review

Co-authored-by: Shay Rojansky <[email protected]>

* add missing namespace.

* simplify code

---------

Co-authored-by: Shay Rojansky <[email protected]>
* remove extra configuration for Zilliz Cloud

* remove extra config for zilliz cloud
* Enforce some analyzer rules

* Make errors into warnings
Add flush methods and tests
Notably make QueryAsync accept a parameter object rather than many
optional parameters, aligning it to SearchAsync.
@weianweigan
Copy link
Collaborator

Thanks! It's great that we will be merging into the milvus repository. Let's merge it now?

@roji
Copy link
Collaborator Author

roji commented Aug 6, 2023

It's ready from merging as far as I'm concerned (I don't have write access to do that though).

@weianweigan
Copy link
Collaborator

It's ready from merging as far as I'm concerned (I don't have write access to do that though).

Ok, Let me merge it now. (●'◡'●)

@weianweigan weianweigan merged commit ce4755d into milvus-io:main Aug 6, 2023
@roji roji deleted the rework branch August 6, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants