ci(desktop): retry vlcDownload on transient network failures
Every desktop packaging job (Windows MSI, macOS DMG, Linux DEB) currently
breaks on the smallest blip when fetching VLC from get.videolan.org. The
`ir.mahozad.vlc-setup` plugin registers `vlcDownload` / `upxDownload`
tasks that extend `de.undercouch.gradle.tasks.download.Download`, but it
does not configure retries or a generous read timeout, so a single
`SocketTimeoutException` aborts the build.
Recent main runs all failed at the same step:
> Task :desktopApp:vlcDownload FAILED
> A failure occurred while executing ...DefaultWorkAction
> java.net.SocketTimeoutException: Read timed out
Configure all `Download` tasks in this project with:
- 5 attempts total (initial + 4 retries),
- 30 s connect timeout,
- 5 min read timeout (VLC archives are 40-90 MB and the mirror can be
slow under load),
- `tempAndMove` so a partial download from one attempt cannot poison
the next.
This is a CI-only change \u2014 it does not alter what gets bundled, just
makes the fetch resilient.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import de.undercouch.gradle.tasks.download.Download
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import java.nio.file.Files
|
||||
|
||||
@@ -144,6 +145,25 @@ tasks.named("spotlessKotlin") {
|
||||
mustRunAfter("vlcSetup")
|
||||
}
|
||||
|
||||
// `ir.mahozad.vlc-setup` registers `vlcDownload` / `upxDownload` tasks that
|
||||
// extend `de.undercouch.gradle.tasks.download.Download`. Defaults are 0 retries
|
||||
// and a short read timeout, so a transient blip on get.videolan.org fails the
|
||||
// whole desktop build on CI (Windows MSI, macOS DMG, Linux DEB). Configure all
|
||||
// Download tasks in this project to retry with generous timeouts so flaky
|
||||
// network conditions do not break packaging jobs.
|
||||
tasks.withType<Download>().configureEach {
|
||||
// 5 attempts total (initial + 4 retries) before failing the task.
|
||||
retries(4)
|
||||
// 30s to establish a TCP / TLS connection.
|
||||
connectTimeout(30_000)
|
||||
// 5 minutes per attempt for the body — VLC archives are 40-90 MB and
|
||||
// get.videolan.org can be slow under load.
|
||||
readTimeout(5 * 60_000)
|
||||
// Stage to a temp file and rename only on full success, so a partial
|
||||
// download from one attempt cannot poison the next.
|
||||
tempAndMove(true)
|
||||
}
|
||||
|
||||
// --- AppImage packaging (Linux) ---
|
||||
//
|
||||
// Compose Multiplatform's TargetFormat.AppImage is known-broken in 1.10.x (CMP-7101).
|
||||
|
||||
Reference in New Issue
Block a user