mirror of
https://github.com/mattermost/mattermost.git
synced 2026-11-03 12:48:37 -06:00
docs-ime-render: replace npx wait-on with curl poll (#38787)
Follow-up to #38782. The workflow's server-readiness step used `npx --yes wait-on`, which fetched the latest wait-on tarball from npm on every run — non-reproducible, and any compromised release of wait-on or its transitive deps would run in CI with GITHUB_TOKEN access. Adding wait-on as a pinned devDep would fix reproducibility but pull 21 transitive packages (axios, joi, rxjs, @hapi/joi stack) into package-lock.json just to poll an HTTP endpoint. Replace it with a one-liner curl retry loop instead — curl ships on every runner, no npm fetch, no lockfile change, same 10-minute cap. Reported by @NARSimoes on #38782. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d584e92645
commit
9026858eb6
1 file changed
+4
-1
@@ -66,8 +66,11 @@ jobs:
|
||||
echo "docusaurus pid $!"
|
||||
|
||||
- name: render/wait-for-server
|
||||
# Poll with curl instead of `npx wait-on` — the runner already
|
||||
# ships curl, so this avoids fetching a wait-on tarball (and its
|
||||
# ~20 transitive deps) from npm at run time.
|
||||
run: |
|
||||
npx --yes wait-on --timeout 600000 --httpTimeout 5000 http://localhost:3000
|
||||
timeout 600 bash -c 'until curl -sSf --max-time 5 http://localhost:3000 > /dev/null; do sleep 2; done'
|
||||
|
||||
- name: render/render-ime
|
||||
working-directory: docs/site
|
||||
|
||||
Reference in new issue
Block a user