test(cli): bind GitHub OAuth tests to loopback - #28980
Merged
Merged
Conversation
hugodutka
force-pushed
the
fix/eng-3285-oauth-loopback-listener
branch
5 times, most recently
from
September 7, 2026 12:29
22caa6d to
83c7a67
Compare
hugodutka
commented
Sep 7, 2026
| "--postgres-url", dbURL, | ||
| "--http-address", ":0", | ||
| // Match the client's loopback address to avoid overlapping wildcard listeners on macOS. | ||
| "--http-address", "127.0.0.1:0", |
Contributor
Author
There was a problem hiding this comment.
This is the only new change in this PR. The rest is reverting previous PRs that introduced ineffective fixes.
hugodutka
marked this pull request as ready for review
September 7, 2026 12:30
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.
On macOS, the Coder test server listening on all addresses could share a port with another test’s loopback listener. Go enables
SO_REUSEADDRby default, allowing overlapping addresses such as[::]:61025and127.0.0.1:61025. The OAuth test’s SDK connects to127.0.0.1:61025, so its requests could reach the other server and report GitHub authentication as disabled despite the intended server being correctly configured.Bind the GitHub OAuth default-provider tests to
127.0.0.1:0, matching the SDK’s address and preventing this overlap. Remove the retries introduced in #28358 and #28622: they were unnecessary to fix the flake.To test this fix, I had an agent connect to a live GitHub macOS runner with wush, reproduce the flake, and verify the new changes actually resolve it.
Refs https://linear.app/codercom/issue/ENG-3285/flake-testserveroauth2githubdefaultprovidernewdeployment
Generated by Coder Agents on behalf of @hugodutka.