Loading
Retry state and API requests on 429 and connection resets
Problem
Since job tokens count against the pipeline user's rate limit, the integration tests hit 429s. The retries added in ff4a595d did not help in two places:
- AutoEncryption pipes
curl --retry 5 --fail-with-bodyinto jq. On a 429 the error body goes into the pipe, jq exits 5 and the retry hits a closed pipe (curl: (23)). Job 17709932175. - The bats teardown DELETE has no retry and failed on
curl: (56) Connection reset by peer. Job 17709845603.
fetch_mr_plan makes four API calls with no retry at all.
Fix
- AutoEncryption:
--failinstead of--fail-with-body, so nothing is written to the pipe on an error. - bats teardown:
--retry 5 --retry-all-errors. - fetch_mr_plan:
--retry 5; the responses go to a temp file with--output, which curl truncates before a retry. A captured$(...)would keep the 429 body in front of the JSON.
alpine 3.24 ships curl 8.23.0, debian 13 ships 8.14.1.
Edited by Timo Furrer