fix: Restore HTTP readiness poll for Consul on Windows#92
Merged
Conversation
The consul members readiness check from #77 fails the step on its first iteration. While Consul is still starting, consul members writes a connection-refused message to stderr; the 2>&1 merge under the Actions PowerShell wrapper ($ErrorActionPreference=Stop) surfaces that as a NativeCommandError and terminates the step before the retry loop can run. Restore the previous /v1/status/leader HTTP poll, where Invoke-RestMethod raises a catchable exception that the try/catch swallows so the loop retries until the agent is ready. The /noservice install change from #77 is unaffected.
5de73a0 to
349ec8d
Compare
jsonbailey
approved these changes
Jun 8, 2026
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.
Summary
The
consul membersreadiness check introduced in #77 fails the Windows step on its first loop iteration, so this restores the previous HTTP readiness poll.Root cause
While the dev agent is still starting,
consul memberswrites a connection-refused message to stderr:The
2>&1merge under the Actions PowerShell wrapper (which runs with$ErrorActionPreference = 'Stop') turns that native-command stderr into a terminatingNativeCommandError, killing the step on the very first iteration -- the retry loop never runs, and there was notry/catchto absorb it.Fix
Restore the
/v1/status/leaderHTTP poll.Invoke-RestMethodraises a catchable exception on connection-refused, which thetry/catchswallows so the loop retries until the agent is ready (30s timeout, fail on timeout). This reverts only that last change to the Consul-for-Windows step; the/noserviceinstall change from #77 is left intact.Observed in python-server-sdk#412 CI.