fix: stop Consul Windows service before starting dev agent#77
Draft
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Draft
fix: stop Consul Windows service before starting dev agent#77devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
The chocolatey package registers Consul as a Windows service which races with the dev agent for port binding. Stop and disable the service before starting the dev agent, and add a readiness check that polls the leader endpoint to confirm the agent is ready. Co-Authored-By: mkeeler@launchdarkly.com <keelerm84@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
devin-ai-integration bot
added a commit
to launchdarkly/python-server-sdk
that referenced
this pull request
Mar 24, 2026
Point the Windows persistent-stores action at the commit that stops the Consul Windows service before starting the dev agent, replacing the local workaround. See: launchdarkly/gh-actions#77 Co-Authored-By: mkeeler@launchdarkly.com <keelerm84@gmail.com>
3 tasks
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
choco install consulcommand registers Consul as a Windows service, which races with the subsequentStart-Process consul agent -devfor port binding. When the service wins the race and binds to the configured port first, the dev agent silently fails to start, causing all Consul integration tests in downstream repos to fail with500 No known Consul servers.This was observed as a flaky failure in python-server-sdk#411 — only
windows (3.14)lost the race on that run, but the issue is non-deterministic and affects all Windows matrix entries.This PR:
choco install, before starting the dev agent./v1/status/leader(up to 30s) so the step only completes once Consul has elected a leader and is actually ready to serve requests.Review & Testing Checklist for Human
Stop-Service consulfully terminates the service process and releases the port (not just a pause) — if it doesn't, aStop-Process consul -Forcemay also be needed beforeStart-Process.runner.os == 'Windows'conditional, but worth a glance.Notes
-ErrorAction SilentlyContinueonStop-Service/Set-Serviceis intentional: if a future chocolatey package version stops registering a Windows service, these calls will no-op gracefully instead of failing.Link to Devin session: https://app.devin.ai/sessions/218fb7de91864819adbc8746029f7331
Requested by: @keelerm84