This repository was archived by the owner on Mar 6, 2026. It is now read-only.
fix: clean up HTTP session and pool during tear down phase#1007
Merged
arithmetic1728 merged 2 commits intogoogleapis:mainfrom Apr 6, 2022
Merged
fix: clean up HTTP session and pool during tear down phase#1007arithmetic1728 merged 2 commits intogoogleapis:mainfrom
arithmetic1728 merged 2 commits intogoogleapis:mainfrom
Conversation
9bb80e6 to
12ad314
Compare
Contributor
|
Is it possible to add a simple test? |
Contributor
Author
|
@arithmetic1728 It might be a non-trivial task. In the original reproduction, we rely on the warning message printed to console to know if the socket is leaked. If there isn't a memory-leak-detection job, it would be tricky to create an ad-hoc one. Alternatively... we can add a test to explicitly invoke |
Contributor
|
@lidizheng yes that works. We just need some simple mock tests to cover the newly added lines. |
Contributor
|
I will fix the lint, and system test issue in a separate PR, they are not related to your change. |
3a5b628 to
f8461d0
Compare
* Add unit tests for the change * Fix the unittest to test on the correct class * Make linter happy
arithmetic1728
approved these changes
Apr 6, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With help from @parthea , we are able to pin point the "creator" of the SSLSocket causing grpc/grpc#29227.
This PR cleans the HTTP resources in the
__del__methods.Fixes: grpc/grpc#29227
Fixes: googleapis/python-secret-manager#271