Repository navigation
Conversation
bvolpato
force-pushed
the
bvolpato/go-portable-service-readiness
branch
from
October 28, 2026 23:57
672250f to
ca16bb3
Compare
The readiness probe uses one gRPC channel for all attempts. The default reconnect backoff grows longer than the polling interval, so the probe can miss a service that binds late in the 30 second startup deadline. The TCP poll that the probe replaced did not have this delay. In a local measurement, services that bound 26 to 28 seconds after the start often failed with the default backoff. The same measurement passed with a fixed 250 ms delay, and the wait after a bind dropped from up to 10 seconds to about 1 second.
The test helper binds the port that GetAddr selects, but the port is not reserved between selection and bind. Another process can take the port first. GetAddr handles this race, but the helper failed the test, so TestExpansionServices_GetAddr_RetriesWrongService failed on a busy machine. Skip the test in this case because the test did not reach the behavior that it checks.
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.
Expansion service startup currently accepts any TCP listener on the selected port. Another process can claim that port before the Java jar binds, leaving the helper with an unrelated service address. In this CI run, the failed expansion address also appeared as a Python worker endpoint.
Check the expansion RPC before caching the address, detect an exited jar, and clean up failed startup. A wrong-service response gets a bounded retry on a fresh port. Expand-only services remain supported through a single probe within the startup deadline. The probe uses a fixed reconnect delay because the default gRPC backoff can outlast the startup deadline.
Reproduced the old helper accepting an unrelated gRPC listener and a real jar failing to bind the occupied port. Focused tests, the race detector, vet, and the Windows process-wrapper build passed. Real-jar startup, early exit, and startup-deadline cleanup were also checked. A local measurement with services that bound late in the startup deadline failed often with the default backoff and passed with the fixed delay. The full GoPortable container workflow was not run locally.