Repository navigation
test(runtime): allocate heterogeneous silo ports at startup - #11201
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is narrowly scoped to test infrastructure behavior and uses an existing StartSiloAsync option to address a known port-collision failure mode.
Review tier: Lite
Findings: None
What changed in this PR
This PR fixes a flaky failure in heterogeneous upgrade runtime tests by ensuring that additional (spawned) silo endpoints are allocated at the moment of startup, reducing the chance that the test client will temporarily consume a soon-to-be-used gateway port as its ephemeral source port.
Changes:
- Start additional heterogeneous silos via
TestCluster.StartSiloAsync(..., startSiloOnNewPort: true)so ports are allocated against the current in-use set immediately before launch. - Add an inline comment documenting the rationale (preventing ephemeral-port collisions with later-started gateway ports).
| File | Description |
|---|---|
| test/Orleans.Runtime.Tests/HeterogeneousSilosTests/UpgradeTests/UpgradeTestsBase.cs | Switches additional silo startup to allocate ports at startup time to avoid port collisions during heterogeneous upgrade tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Fixes #11186
The heterogeneous upgrade tests selected a consecutive gateway-port block before the cluster client connected. On Linux, the client could then receive one of the future gateway ports as its ephemeral source port; the reported failure shows the client using
49650before the third silo attempted to bind that same gateway port.Allocate each additional spawned silo's endpoints through the existing
startSiloOnNewPortpath immediately before launch. This checks the current listener set, preserves the cluster allocator's reservation tracking, and prevents delayed silo startup from consuming a port selected before client connections were established.Microsoft Reviewers: Open in CodeFlow