Skip to content

ci: fix Consul dev agent startup on Windows CI#412

Draft
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1774372183-fix-consul-readiness
Draft

ci: fix Consul dev agent startup on Windows CI#412
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1774372183-fix-consul-readiness

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 24, 2026

Requirements

  • I have added test coverage for new or changed functionality (CI-only change)
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Follow-up to #411, which surfaced a pre-existing flaky failure in the windows (3.14) CI job. All 52 Consul integration tests fail with consul.base.ConsulException: 500 No known Consul servers.

Upstream fix: launchdarkly/gh-actions#77

Describe the solution you've provided

The persistent-stores action installs Consul via chocolatey, which registers it as a Windows service. The action then calls Start-Process consul agent -dev -http-port=8500, but the service may already have bound to port 8500, causing the dev agent to silently fail. This was flaky because the race between the service starting and the dev agent binding was timing-dependent.

The fix has been made upstream in the persistent-stores action (gh-actions#77), which:

  1. Stops and disables the Consul Windows service after choco install, before starting the dev agent.
  2. Polls GET /v1/status/leader for up to 30 seconds to confirm the agent has completed Raft leader election before the step completes.

This PR pins the Windows persistent-stores reference to the upstream fix commit (0fbe701) so CI can validate the change end-to-end. Once gh-actions#77 is merged and the persistent-stores-v0 tag is updated, this should be switched back to the tag reference.

Describe alternatives you've considered

  • Local workaround in this repo's CI workflow: An earlier revision of this PR added a separate step to stop the service and start a dev agent. This worked but duplicated logic that belongs in the shared action.
  • Add retry logic to the Consul test fixtures: More invasive and masks infrastructure issues rather than solving them.

Additional context

Things a reviewer should verify:

  1. Upstream PR review — the actual fix logic lives in gh-actions#77. Review that PR for correctness of the service stop/readiness poll approach.
  2. Temporary SHA pin — the commit SHA 0fbe701 references an unmerged branch. After gh-actions#77 merges and the persistent-stores-v0 tag is updated, this PR should revert to @persistent-stores-v0.
  3. Only the Windows job is affected — the Linux job uses Docker-based Consul which doesn't have this service conflict.
  4. This change can only be validated by CI — it cannot be tested locally since it targets Windows GitHub Actions runners.

Link to Devin session: https://app.devin.ai/sessions/218fb7de91864819adbc8746029f7331
Requested by: @keelerm84

Co-Authored-By: mkeeler@launchdarkly.com <keelerm84@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration
Copy link
Contributor Author

@cursor review

Co-Authored-By: mkeeler@launchdarkly.com <keelerm84@gmail.com>
@devin-ai-integration devin-ai-integration bot changed the title ci: add Consul readiness check to Windows CI jobs ci: fix Consul dev agent startup on Windows CI 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant