Skip to content

fix(ci): handle transient API failures in E2E lint/unit gate polling#133

Closed
SebTardif wants to merge 1 commit into
mainfrom
fix/e2e-gate-retry
Closed

fix(ci): handle transient API failures in E2E lint/unit gate polling#133
SebTardif wants to merge 1 commit into
mainfrom
fix/e2e-gate-retry

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

The 'Wait for lint and unit gate' step polls the GitHub API to check job status before running E2E tests. If the API returns truncated JSON, jq parse fails and set -Eeuo pipefail kills the step immediately.

Fix: Validate the API response with jq empty before parsing, and continue the poll loop on transient failures instead of aborting the entire E2E job.

Root cause: PR #132 CI run 26617885011 failed because gh api returned an unfinished JSON string, causing jq: parse error: Unfinished string at EOF.

The 'Wait for lint and unit gate' step polls the GitHub API to check
job status before running E2E tests. If the API returns truncated JSON,
jq parse fails and set -Eeuo pipefail kills the step immediately.

Add retry-on-failure: validate the API response with jq empty before
parsing, and continue the poll loop on transient failures instead of
aborting the entire E2E job.

Fixes a flaky E2E failure seen on PR #132 (run 26617885011).

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@github-actions github-actions Bot added area/ci CI/CD workflows size/xs < 10 lines changed labels May 29, 2026
@SebTardif SebTardif added this pull request to the merge queue May 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks May 29, 2026
@SebTardif

Copy link
Copy Markdown
Contributor Author

Fix cherry-picked to main in d70ed2e. Closing as the change is already on the default branch.

@SebTardif SebTardif closed this May 29, 2026
@SebTardif SebTardif deleted the fix/e2e-gate-retry branch May 29, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI/CD workflows size/xs < 10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant