Skip to content

Conversation

keelerm84
Copy link
Member

@keelerm84 keelerm84 commented Oct 10, 2025

Previously we started looking for testing ports starting at 5000. If the
port was in use, we would incrementally search upwards until we found a
port we could use.

A recent change in the GH Windows image resulted in a permission error
being raised before we could find a port to use:

Failure/Error: WEBrick::HTTPServer.new(base_opts)

Errno::EACCES:
Permission denied - bind(2) for 127.0.0.1:50018

To address this, we are modifying the tests to set a port of 0, which
will allow the OS to assign an available port for us. This removes the
need for this silly retry logic and hard coded port numbers.


Note

Switch StubHTTPServer to OS-assigned ephemeral ports and set CI matrix fail-fast to false.

  • Tests:
    • Use OS-assigned ephemeral port by setting Port: 0 in spec/http_util.rb and capturing actual port from server.config[:Port].
    • Remove manual port allocation, retry logic, and @@next_port/self.next_port helpers; simplify create_server signature.
  • CI:
    • Disable matrix fail-fast in jobs.build-linux.strategy of .github/workflows/ci.yml.

Written by Cursor Bugbot for commit b1a8f9c. This will update automatically on new commits. Configure here.

Previously we started looking for testing ports starting at 5000. If the
port was in use, we would incrementally search upwards until we found a
port we could use.

A recent change in the GH Windows image resulted in a permission error
being raised before we could find a port to use:

```
Failure/Error: WEBrick::HTTPServer.new(base_opts)

Errno::EACCES:
Permission denied - bind(2) for 127.0.0.1:50018
```

To address this, we are modifying the tests to set a port of 0, which
will allow the OS to assign an available port for us. This removes the
need for this silly retry logic and hard coded port numbers.
@keelerm84 keelerm84 requested a review from a team as a code owner October 10, 2025 16:41
@keelerm84 keelerm84 merged commit 07e0704 into main Oct 10, 2025
9 checks passed
@keelerm84 keelerm84 deleted the mk/sdk-1495/fix-windows-build branch October 10, 2025 17:45
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.

2 participants