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

Fixes WithProxy(#658) and HttpClient(#675) issues #683

Merged
merged 4 commits into from
Aug 30, 2022
Merged

Fixes WithProxy(#658) and HttpClient(#675) issues #683

merged 4 commits into from
Aug 30, 2022

Conversation

PurplestViper
Copy link
Contributor

@PurplestViper PurplestViper commented Aug 26, 2022

Fixes 2 issues:

  1. WithProxy is ignored #658
    • To avoid unnecessary socket allocation, create HttpClient when delayed until Build().
    • The injected HttpClient cannot change the Proxy, add a hint for the ignored WithProxy(IWebProxy).
  2. Inject Ioc-managed HttpClient for MinioClient via constructor #675
    • HttpClient is the basic dependency of MinioClient, MinioClient (HttpClient) is still necessary to implement dependency injection.
    • Generally, the life cycle of the injected HttpClient is managed by IoC or other implementations, and there may even be other operations externally, so add an identifier to control the Dispose() behavior.

@ebozduman
Copy link
Collaborator

@Ruthlessist

Thank your for your contribution effort.
Your changes look great but the bottom-line is, this is the design team's decision, we cannot revive back the obsolete methods. They are deprecated and they will go away.
You are more than welcome to contribute if you have other suggestions, provided that the proposed changes will not violate MinIO requirements.

…lse to indicate whether to dispose httpClient.
@PurplestViper
Copy link
Contributor Author

@ebozduman Respecting the decision of the design team, although I don't think Dependency Injection and Builder patterns are opposites, the modification regarding constructors is now removed.

@ebozduman
Copy link
Collaborator

@Ruthlessist

There are build failures that need to be fixed.

The Linux build failure is because of the lint check.

!!!! Process Aborted !!!!
The following files do not match .editorconfig:
 * Minio/MinioClient.cs
Error: Process completed with exit code 1.

You can either run dotnet regitlint which runs on all files or dotnet regitlint -f commits -a <your-commit-id> to run only on the committed files.

@ebozduman
Copy link
Collaborator

@Ruthlessist
I guess you forgot to run regitlint.

Copy link
Collaborator

@ebozduman ebozduman left a comment

Choose a reason for hiding this comment

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

LGTM
As soon as the lint changes are in we can merge.

@ebozduman ebozduman merged commit 79a109c into minio:master Aug 30, 2022
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.

3 participants