Repository navigation
Run the remaining mock credential servers on unused ports - #70
Merged
Merged
Conversation
The ECS, EC2, AzureVM and GCP token/STS/impersonation tests started their mock servers on fixed ports 50396-50404. Those ports are inside Linux's ephemeral range, so any socket on a CI runner, including this test run's own client connections, can hold one, and the mock then fails with "bind: address already in use". That failed main on Sep 23 and Oct 22 (port 50400, moved to an OS-assigned port in #64) and on the v2.2.0 bump (port 50404). The ECS, EC2 and AzureVM tests now serve CloudBaseTest's responses from servers on OS-assigned ports, and the GCP mocks get an unused port from freeport(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
quinnj
referenced
this pull request
Nov 1, 2026
Co-authored-by: Jacob Quinn <quinn.jacobd@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The ECS, EC2, AzureVM and GCP token/STS/impersonation tests started mock servers on fixed ports 50396-50404 (CloudBaseTest's defaults plus two overrides). Those ports are inside Linux's ephemeral range (32768-60999), so any socket on the runner, including this test run's own client connections, can hold one, and the mock then fails with
bind: address already in use. That failed main three times in about 30 runs: Sep 23 and Oct 22 on port 50400 (moved to an OS-assigned port in #64), and the v2.2.0 bump today on port 50404 (run).Change (tests only):
withhelpers for these have noportoption.freeport(): thelistenanypattern the file already uses for its other mock servers, but probing 127.0.0.1 (the address the mocks bind) from a start below 32768, outside the Linux and macOS ephemeral ranges, so no outgoing connection can take the port before the mock binds it. The impersonation port is picked while the STS mock is listening, so the two can't get the same port.Verification (Julia 1.13.3, macOS), with a separate process listening on all of 127.0.0.1:50396-50404:
http address already in use: 127.0.0.1:50404.Testing CloudBase tests passed), including all 7 changed testsets.AWS ECS Taskerrors withhttp address already in use: 127.0.0.1:50396and the run stops there.Self-review: handlers match CloudBaseTest's routes and responses (AzureVM's header/query checks return 400 instead of tripping an
@assert);withenvrestoresAWS_CONTAINER_CREDENTIALS_RELATIVE_URI; every server closes infinally.Follow-up idea, not in this PR: CloudBaseTest's ECS/EC2/AzureVM/GCP*
withhelpers still default to fixed ports. Acceptingport=0and handing the bound port to the callback would let tests use them again without the fixed-port risk.🤖 Generated with Claude Code