Repository navigation
Fix sync test server port allocation races - #211
Merged
Merged
Conversation
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 sync end-to-end harness releases its selected port before
td-syncbinds it. Another process can take that port, causing a flaky startup failure or letting an unrelated HTTP server's health response make startup appear successful.Initial setup now retries up to five times, only for the current child's confirmed address-in-use failure. Each failed child is reaped before retry, and the final URL is selected before actors save their configuration. Startup requires the child's post-bind startup message and a successful health check. Restarts retain the existing address and data.
Changes are limited to the Go end-to-end harness and six regression cases covering occupied-port health responses, collision recovery and fixed-address restarts, bounded retries, unrelated failures and stale logs, timeout cleanup, and failed process launch.
Fixes jubishop#2.
Submitted upstream from jubishop#3 with the same commit,
ae81b34086de9c1b34e43b7100e648f6dfbf170d.Validation
Validation recorded in the source PR:
go test -race ./test/e2e -run '^TestServerStartup$' -count=10passed.make testpassed, including the complete sync end-to-end suite.make lint,GOWORK=off go build ./..., formatting, and whitespace checks passed.The source PR's GitHub Actions
cross-build,lint, andtestchecks also passed for this commit.