From 5924e8dafb05a601e6e5229bebc9801c2db5ed56 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 17:10:35 +0000 Subject: [PATCH 1/3] ci: add Consul readiness check to Windows CI jobs Co-Authored-By: mkeeler@launchdarkly.com --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8261bd9..c8dff16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,6 +97,25 @@ jobs: consul: true dynamodb: true + - name: Wait for Consul to be ready + run: | + $timeout = 30 + $elapsed = 0 + while ($elapsed -lt $timeout) { + try { + $response = Invoke-RestMethod -Uri 'http://127.0.0.1:8500/v1/status/leader' -TimeoutSec 2 + if ($response -and $response -ne '""') { + Write-Host "Consul is ready (leader: $response)" + exit 0 + } + } catch {} + Write-Host "Waiting for Consul to elect a leader... ($elapsed/$timeout seconds)" + Start-Sleep -Seconds 1 + $elapsed++ + } + Write-Error "Consul did not become ready within $timeout seconds" + exit 1 + - name: Install poetry uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 From b7e0fede763927e24bc35b021439670f461e5d52 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 17:14:07 +0000 Subject: [PATCH 2/3] ci: stop Consul Windows service before starting dev agent Co-Authored-By: mkeeler@launchdarkly.com --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8dff16..a7fdd6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,8 +97,15 @@ jobs: consul: true dynamodb: true - - name: Wait for Consul to be ready + - name: Start Consul dev agent run: | + # The chocolatey package installs Consul as a Windows service which + # conflicts with the dev agent started by the persistent-stores action. + # Stop the service so the dev agent can bind to port 8500. + Stop-Service consul -ErrorAction SilentlyContinue + Set-Service consul -StartupType Disabled -ErrorAction SilentlyContinue + Start-Process consul -ArgumentList 'agent', '-dev', '-http-port=8500' + $timeout = 30 $elapsed = 0 while ($elapsed -lt $timeout) { From 3a6cc675f70034ec77d9db1fcb5d4d8f70f79b4b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 17:35:03 +0000 Subject: [PATCH 3/3] ci: reference gh-actions fix for Consul Windows service conflict 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 --- .github/workflows/ci.yml | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7fdd6a..694518b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,38 +91,12 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: launchdarkly/gh-actions/actions/persistent-stores@persistent-stores-v0 + - uses: launchdarkly/gh-actions/actions/persistent-stores@0fbe701c3f75ea37148aa949bf0e25f170fcb461 with: redis: true consul: true dynamodb: true - - name: Start Consul dev agent - run: | - # The chocolatey package installs Consul as a Windows service which - # conflicts with the dev agent started by the persistent-stores action. - # Stop the service so the dev agent can bind to port 8500. - Stop-Service consul -ErrorAction SilentlyContinue - Set-Service consul -StartupType Disabled -ErrorAction SilentlyContinue - Start-Process consul -ArgumentList 'agent', '-dev', '-http-port=8500' - - $timeout = 30 - $elapsed = 0 - while ($elapsed -lt $timeout) { - try { - $response = Invoke-RestMethod -Uri 'http://127.0.0.1:8500/v1/status/leader' -TimeoutSec 2 - if ($response -and $response -ne '""') { - Write-Host "Consul is ready (leader: $response)" - exit 0 - } - } catch {} - Write-Host "Waiting for Consul to elect a leader... ($elapsed/$timeout seconds)" - Start-Sleep -Seconds 1 - $elapsed++ - } - Write-Error "Consul did not become ready within $timeout seconds" - exit 1 - - name: Install poetry uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439