fix: add retry loop to CI wget for update-kustomize-tag #91

Merged
forgejo_admin merged 2 commits from 230-ci-wget-retry into main 2026-03-28 20:02:27 +00:00

Summary

BusyBox wget has no built-in retry flags. Transient forgejo-http connection failures cause the kustomize tag update step to fail silently. This wraps the wget call in a 5-attempt retry loop with 5s backoff and a fatal exit if the script never downloads.

Changes

  • .woodpecker.yaml: Wrapped the wget call in the update-kustomize-tag step with a retry loop (5 attempts, 5s sleep between retries, fatal exit on total failure)

Test Plan

  • YAML validated with yaml.safe_load
  • Merge to main and trigger a pipeline run; the update-kustomize-tag step should download the script successfully (or retry gracefully on transient failure)
  • To simulate failure: temporarily point the wget URL at a bad endpoint and verify the retry messages appear in logs before the FATAL exit
## Summary BusyBox wget has no built-in retry flags. Transient forgejo-http connection failures cause the kustomize tag update step to fail silently. This wraps the wget call in a 5-attempt retry loop with 5s backoff and a fatal exit if the script never downloads. ## Changes - `.woodpecker.yaml`: Wrapped the `wget` call in the `update-kustomize-tag` step with a retry loop (5 attempts, 5s sleep between retries, fatal exit on total failure) ## Test Plan - YAML validated with `yaml.safe_load` - Merge to main and trigger a pipeline run; the `update-kustomize-tag` step should download the script successfully (or retry gracefully on transient failure) - To simulate failure: temporarily point the wget URL at a bad endpoint and verify the retry messages appear in logs before the FATAL exit ## Related - Forgejo issue: forgejo_admin/pal-e-platform#230
fix: add retry loop to CI wget for update-kustomize-tag
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
954e414849
BusyBox wget has no retry flags. Transient forgejo-http connection
failures cause the kustomize tag update to fail silently. 5 retries
with 5s backoff.

Ref: forgejo_admin/pal-e-platform#230

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: use test -s to catch zero-byte wget artifacts
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
cbd68ed8a8
BusyBox wget -O creates the output file before downloading. If all
5 attempts fail, the zero-byte file still exists and test -f passes.
Switch to test -s (exists AND non-zero size) to catch this edge case.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

QA Review

Scope: 1 file changed (.woodpecker.yaml), 10 additions / 2 deletions. CI-only change, no app code affected.

Findings

  1. FIXED -- zero-byte file edge case: BusyBox wget -O creates the output file before downloading. If all 5 attempts fail, the zero-byte file persists and test -f would pass, causing sh to run an empty script silently. Fixed in cbd68ed by switching to test -s (exists AND non-zero size).

  2. Retry loop logic: Correct. && break exits on first successful download. Failed attempts log the attempt number and sleep 5s. The test -s guard after the loop catches total failure with a clear FATAL message and exit 1.

  3. YAML validity: Confirmed via yaml.safe_load.

  4. Existing flags preserved: The wget URL and -O flag are unchanged from the original. No auth header needed for this repo (public raw endpoint over cluster DNS).

  5. No regressions: The sh /tmp/update-kustomize-tag.sh invocation is unchanged. depends_on and when guards are unchanged.

VERDICT: APPROVED

## QA Review **Scope:** 1 file changed (.woodpecker.yaml), 10 additions / 2 deletions. CI-only change, no app code affected. ### Findings 1. **FIXED -- zero-byte file edge case:** BusyBox `wget -O` creates the output file before downloading. If all 5 attempts fail, the zero-byte file persists and `test -f` would pass, causing `sh` to run an empty script silently. Fixed in cbd68ed by switching to `test -s` (exists AND non-zero size). 2. **Retry loop logic:** Correct. `&& break` exits on first successful download. Failed attempts log the attempt number and sleep 5s. The `test -s` guard after the loop catches total failure with a clear FATAL message and `exit 1`. 3. **YAML validity:** Confirmed via `yaml.safe_load`. 4. **Existing flags preserved:** The wget URL and `-O` flag are unchanged from the original. No auth header needed for this repo (public raw endpoint over cluster DNS). 5. **No regressions:** The `sh /tmp/update-kustomize-tag.sh` invocation is unchanged. `depends_on` and `when` guards are unchanged. ### VERDICT: APPROVED
forgejo_admin deleted branch 230-ci-wget-retry 2026-03-28 20:02:27 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/pal-e-docs-app!91
No description provided.