Repository navigation
ci(parity): retry the PlatformIO half of the ESP32-S3 size check on transient CDN faults - #1958
Conversation
The nightly ESP32-S3 size-parity gate (run 42464103663) died on a GitHub release-asset CDN 504 while PlatformIO fetched the pioarduino platform, and that read as a firmware-size regression on main. The test had one attempt and treated every non-zero exit as a parity failure. Classify transient download/network faults (CDN 5xx, connection reset, timeouts, DNS) and retry them up to PLATFORMIO_ATTEMPTS with a growing backoff; compiler errors still fail on the first attempt. The retry policy is extracted as run_with_transient_retry so it is unit-testable without PlatformIO, a toolchain download or a live network fault. Per-attempt budget (900 s, #806), platform pin, fixture and the fbuild_size <= pio_size assertion are unchanged.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
Live witness of the retry path, on this branch's head (run 42467904763, 09:36–09:40Z): So: classification and the retry loop behave exactly as intended against a real fault, and the failure now names the attempt and the URL instead of looking like a size regression. The same run also shows the honest limit: GitHub's release-asset CDN is intermittently 504-ing for that asset right now (a manual HEAD probe returned The structural fix for the download exposure (cache |
Why
The nightly
ESP32-S3 size parity (#1432)gate turnedmainred on 2026-11-08 (run42464103663) with:
That is a GitHub release-asset CDN 504, not a firmware-size regression: the test died at
build_with_platformio's singleassert!(output.success()), before the fbuild build and thesize comparison ever ran. The previous 14 nightly runs (2026-10-25 … 2026-11-07) were green.
The outage was live and independent of the repo — re-running the same run failed again in
1 m 55 s, and the scheduled
Build Comparison Benchmark(42466790090) could not even installsetup-soldr:release request failed after 4 attempts … HTTP 504.So a third-party CDN fault, whose only symptom is "download failed", was being reported as a
size-parity failure on the trunk.
esp32s3_size_parityfetches the pioarduino platform, theesp_installtool and the arduino-esp32 framework from GitHub release assets on every run,so it is exposed to this daily; it had no retry at all. (fbuild's own downloader already retries
5× and reports
gave up after 5 attempts— the asymmetry was on the PlatformIO side.)What
crates/fbuild-build/tests/it/esp32s3_size_parity.rs:is_transient_download_failure(output)— classifies a failure as a transient download/networkfault (release-CDN 5xx,
Connection reset,Read timed out, DNS failure,RemoteDisconnected)versus a real build defect.
run_with_transient_retry(attempts, backoff, attempt_fn)— the retry policy, extracted so it istestable without PlatformIO, a toolchain download or a network fault.
build_with_platformionow runs through it withPLATFORMIO_ATTEMPTS = 3and aRETRY_BACKOFF * attempt(30 s, 60 s) backoff, and still uses the same 900 s per-attempt budgetfrom audit: blocking operations with no timeout in tests + benches (sub-issue of #802) #806. Compiler errors and
.piofailures fail on the first attempt, unchanged.transient fault or the build itself failed.
Nothing else changes: same platform pin, same Blink fixture, same
fbuild_size <= pio_sizeassertion, same workflow.
Tests
soldr cargo test -p fbuild-build --test it esp32s3_size_parity::tests→ 7 passed, 0 failed(real output):
Classifier inputs include the verbatim 504 string from run 42464103663.
Other gates:
soldr fmt --checkrc 0;soldr clippy -p fbuild-build --all-targetsrc 0 with nodiagnostics in this file;
ci/check_test_layout.pyok;ci/enforce_platform_boundary.py --print-totals→rows=44; dylint_rows=43, rc 0 (unchanged).Not done
#[ignore]d integration body itself — the real two-build comparison still needsPlatformIO plus a working CDN, which this host does not have (
pioabsent; GitHub release assetsare 504-ing right now). The retry path is proven by the extracted-policy tests, not claimed as an
end-to-end hardware/network proof.
~/.platformio: a cache key is only safe when the pinnedplatform URL fully determines the contents, and this workflow's cache budget is already under the
repo ceiling. Left for a separate change if it is wanted.