Skip to content

chore(ci): replace Hardsix/action-wait-for-api with a curl poll (Node 24) - #26

Merged
lucas-d-ramos merged 1 commit into
mainfrom
chore/replace-wait-for-api
Aug 24, 2026
Merged

chore(ci): replace Hardsix/action-wait-for-api with a curl poll (Node 24)#26
lucas-d-ramos merged 1 commit into
mainfrom
chore/replace-wait-for-api

Conversation

@lucas-d-ramos

Copy link
Copy Markdown
Contributor

Removes the last Node 20 dependency in this repo by replacing Hardsix/action-wait-for-api@v2.0.2 with an inline curl poll.

Why replace rather than bump: v2.0.2 is upstream's latest release, and it targets node20. There is no version to move to. Every other pin in this repo is already Node 24 — this one step would have been the only thing left when Node 20 leaves the runners in fall 2026.

Behaviour is identical, by construction

The old call site passed only url, so it ran entirely on the action's defaults. From its action.yml at v2.0.2:

Input Default Reproduced as
method GET curl default
expected-status 200 [ "$code" = "200" ]
timeout 300 deadline=$((SECONDS + 300))
interval 10 sleep 10, also --max-time 10 per attempt

headers, expected-response-field and expected-response-field-value were never set, so nothing depends on them.

A connection failure (backend not up yet) yields 000 rather than aborting the step, so the poll keeps retrying until the deadline — matching the action, which treats "not reachable" as "not ready yet". On timeout it emits a ::error:: annotation with the last status seen, which is more diagnostic than what we had.

The URL goes through env, deliberately

deploy_marker is a workflow_call input supplied by the calling repo. Interpolating caller-controlled text straight into a run: script body is a script-injection path, so it is passed as an environment variable instead and the script only ever references "$MARKER_URL".

Blast radius

Nothing outside this repo calls deploy-strapi.yml. I checked every uses: line in all 42 non-archived org repos — the only references to it are internal to this file. So this cannot break a consumer today. The flip side is that it also cannot be exercised by one, and this repo's ci gate is actionlint (which does shellcheck run: blocks, so the script is linted but not executed).

Part of the org-wide Node 24 action sweep — this is the last item in it.

… 24)

Hardsix/action-wait-for-api@v2.0.2 targets node20 and v2.0.2 is upstream's
latest release, so there was nothing to bump to. It was the only Node 20
dependency left in this repo.

The old call site passed only `url`, so this reproduces the action's defaults
exactly: GET, succeed on 200, poll every 10s, fail after 300s. A connection
failure yields 000 and keeps retrying rather than aborting, matching the
action's treatment of "not reachable" as "not ready yet".

The URL is passed via env rather than interpolated into the script body:
deploy_marker is a workflow_call input from the calling repo, and splicing
caller-controlled text into a shell script is an injection path.

Nothing outside this repo calls deploy-strapi.yml, so there is no consumer
to break.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lucas-d-ramos
lucas-d-ramos merged commit 38c8e71 into main Aug 24, 2026
2 checks passed
@lucas-d-ramos
lucas-d-ramos deleted the chore/replace-wait-for-api branch August 24, 2026 14:42
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