Skip to content

Retry Alpine package operations and reuse repository indexes - #1347

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:fix/alpine-apk-retries
Nov 29, 2026
Merged

vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:fix/alpine-apk-retries

Conversation

@vharseko

Copy link
Copy Markdown
Member

Summary

  • Allow up to three attempts for apk update, apk add, and apk upgrade, with 5- and 15-second delays. Propagate the final failure to the build.
  • Fetch each Alpine repository index once on a healthy build, reuse the indexes during package installation and upgrades, and remove them in the same image layer.

The linux/386 Alpine build in #1341 failed after a transient DNS error while fetching APKINDEX. Build and Release both use this Dockerfile.

Verification

  • Built the CI image from a local server ZIP for all six target platforms and observed one successful index refresh per platform.
  • On linux/386, injected HTTP 503 responses for an index and the OpenJDK 11 package. Both operations recovered, and the package retry reused the indexes.
  • Verified that persistent failures preserve the last exit status, and built the linux/amd64 image from the released OpenDJ 5.2.0 ZIP.

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The bounded retry preserves argument boundaries and the final APK exit status; persistent failure stops the remaining build commands.

@vharseko
vharseko merged commit 29a7662 into OpenIdentityPlatform:master Nov 29, 2026
14 checks passed
@vharseko
vharseko deleted the fix/alpine-apk-retries branch November 29, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants