Skip to content

Commit 3a6cc67

Browse files
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 <keelerm84@gmail.com>
1 parent b7e0fed commit 3a6cc67

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -91,38 +91,12 @@ jobs:
9191
with:
9292
python-version: ${{ matrix.python-version }}
9393

94-
- uses: launchdarkly/gh-actions/actions/persistent-stores@persistent-stores-v0
94+
- uses: launchdarkly/gh-actions/actions/persistent-stores@0fbe701c3f75ea37148aa949bf0e25f170fcb461
9595
with:
9696
redis: true
9797
consul: true
9898
dynamodb: true
9999

100-
- name: Start Consul dev agent
101-
run: |
102-
# The chocolatey package installs Consul as a Windows service which
103-
# conflicts with the dev agent started by the persistent-stores action.
104-
# Stop the service so the dev agent can bind to port 8500.
105-
Stop-Service consul -ErrorAction SilentlyContinue
106-
Set-Service consul -StartupType Disabled -ErrorAction SilentlyContinue
107-
Start-Process consul -ArgumentList 'agent', '-dev', '-http-port=8500'
108-
109-
$timeout = 30
110-
$elapsed = 0
111-
while ($elapsed -lt $timeout) {
112-
try {
113-
$response = Invoke-RestMethod -Uri 'http://127.0.0.1:8500/v1/status/leader' -TimeoutSec 2
114-
if ($response -and $response -ne '""') {
115-
Write-Host "Consul is ready (leader: $response)"
116-
exit 0
117-
}
118-
} catch {}
119-
Write-Host "Waiting for Consul to elect a leader... ($elapsed/$timeout seconds)"
120-
Start-Sleep -Seconds 1
121-
$elapsed++
122-
}
123-
Write-Error "Consul did not become ready within $timeout seconds"
124-
exit 1
125-
126100
- name: Install poetry
127101
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439
128102

0 commit comments

Comments
 (0)