GeezerVison is showing github.com — fix(google-auth-oauthlib): prevent port re-use on windows by daniel-sanche · Pull Request #18166 · googleapis/google-cloud-python
Conversation
Building off of #18137
The commit history has test results running against windows, using a temporary GitHub Action workflow. It was removed from the latest commit
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
gemini-code-assist[bot] reacted with eyes emoji
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.
Code Review
This pull request adds a new unit test, test_run_local_server_exclusive_port_binding, to verify that no other process or socket can bind to the port while run_local_server is active. The review feedback points out a critical issue where an assertion failure inside the ThreadPoolExecutor context can cause the test suite to hang indefinitely because the context manager blocks waiting for the server thread to finish. It is recommended to wrap the assertions in a try...finally block to guarantee that the server thread is unblocked and terminated cleanly.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
parthea
changed the title
[DRAFT] fix: prevert port re-use on windows
[DRAFT] fix: prevent port re-use on windows
Aug 19, 2026
daniel-sanche
changed the title
[DRAFT] fix: prevent port re-use on windows
fix(google-auth-oauthlib): prevent port re-use on windows
Aug 19, 2026
This was referenced Aug 19, 2026
Uh oh!
There was an error while loading. Please reload this page.
hebaalazzeh
pushed a commit
that referenced
this pull request
Aug 21, 2026
CI Jobs have logic to find the merge base, and compare changes against
it to determine which packages have changed in the PR
Previously, it used a fetch-depth of 2, to avoid downloading the whole
monorepo history. This could cause issues finding the base, which would
trigger a full test run (see
#18166)
This PR does a full fetch (fetch-depth: 0), but filters out blobs, so
the clone and comparison is still fast
ohmayr
pushed a commit
that referenced
this pull request
Sep 28, 2026
Extending the solution in
#18166
We previously added a guard to prevent external processes sitting on the
same port, and hijacking oauth calls. This PR extends that logic to also
prevent processes using the ipv6 address
Fixes: #18296
Reviewers
ohmayr
ohmayr approved these changes
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|