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

Merged
forgejo_admin merged 2 commits from 230-ci-wget-retry into main 2026-03-28 20:01:56 +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: Replaced bare wget in update-kustomize-tag step with a retry loop (5 attempts, 5s sleep between retries, fatal on complete failure)

Test Plan

  • YAML validates: python3 -c "import yaml; yaml.safe_load(open('.woodpecker.yaml'))"
  • Merge to main and verify Woodpecker pipeline succeeds on the update-kustomize-tag step
  • Simulate transient failure (optional): temporarily use a bad URL, confirm retries log correctly and fail after 5 attempts

🤖 Generated with Claude Code

## 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`: Replaced bare `wget` in `update-kustomize-tag` step with a retry loop (5 attempts, 5s sleep between retries, fatal on complete failure) ## Test Plan - [ ] YAML validates: `python3 -c "import yaml; yaml.safe_load(open('.woodpecker.yaml'))"` - [ ] Merge to main and verify Woodpecker pipeline succeeds on the update-kustomize-tag step - [ ] Simulate transient failure (optional): temporarily use a bad URL, confirm retries log correctly and fail after 5 attempts ## Related - Forgejo issue: forgejo_admin/pal-e-platform#230 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: add retry loop to CI wget for update-kustomize-tag
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
195b5b3e44
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: escape loop variable for Woodpecker substitution engine
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
d78eff77b4
Use $$i instead of $i so Woodpecker passes literal $i to the shell.
Consistent with basketball-api pipeline convention.

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

QA Review — PR #148

Summary

Adds a 5-attempt retry loop around the wget call in the update-kustomize-tag CI step. BusyBox wget lacks built-in retry flags, so transient forgejo-http connection failures were causing silent failures.

Findings

  1. Retry logic -- correct. for i in 1 2 3 4 5 is POSIX-compatible (no seq dependency in BusyBox Alpine). && break exits on first success. 5s sleep between retries.

  2. Fatal guard -- test -f /tmp/update-kustomize-tag.sh || { echo "FATAL: ..."; exit 1; } correctly prevents the pipeline from proceeding with a missing script.

  3. Woodpecker variable escaping -- $${FORGEJO_TOKEN} and $$i correctly use Woodpecker's $$ escape syntax so the shell receives literal ${FORGEJO_TOKEN} and $i at runtime. Consistent with the basketball-api pipeline convention. (Second commit fixed $i -> $$i caught during review.)

  4. YAML block style -- Changed from >- (folded) to | (literal) to preserve the multi-line shell script structure. Correct choice for a script block.

  5. YAML validation -- Passed python3 -c "import yaml; yaml.safe_load(open('.woodpecker.yaml'))".

  6. No unrelated changes -- Only the update-kustomize-tag step commands were modified. sh /tmp/update-kustomize-tag.sh, depends_on, and when clauses are unchanged.

VERDICT: APPROVED

## QA Review — PR #148 ### Summary Adds a 5-attempt retry loop around the `wget` call in the `update-kustomize-tag` CI step. BusyBox wget lacks built-in retry flags, so transient forgejo-http connection failures were causing silent failures. ### Findings 1. **Retry logic** -- correct. `for i in 1 2 3 4 5` is POSIX-compatible (no `seq` dependency in BusyBox Alpine). `&& break` exits on first success. 5s sleep between retries. 2. **Fatal guard** -- `test -f /tmp/update-kustomize-tag.sh || { echo "FATAL: ..."; exit 1; }` correctly prevents the pipeline from proceeding with a missing script. 3. **Woodpecker variable escaping** -- `$${FORGEJO_TOKEN}` and `$$i` correctly use Woodpecker's `$$` escape syntax so the shell receives literal `${FORGEJO_TOKEN}` and `$i` at runtime. Consistent with the basketball-api pipeline convention. (Second commit fixed `$i` -> `$$i` caught during review.) 4. **YAML block style** -- Changed from `>-` (folded) to `|` (literal) to preserve the multi-line shell script structure. Correct choice for a script block. 5. **YAML validation** -- Passed `python3 -c "import yaml; yaml.safe_load(open('.woodpecker.yaml'))"`. 6. **No unrelated changes** -- Only the `update-kustomize-tag` step commands were modified. `sh /tmp/update-kustomize-tag.sh`, `depends_on`, and `when` clauses are unchanged. ### VERDICT: APPROVED
forgejo_admin deleted branch 230-ci-wget-retry 2026-03-28 20:01:56 +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/westside-landing!148
No description provided.