Repository navigation
ci: Retry the buildroot fetch and share the retry loop - #91
Draft
cgwalters-bot wants to merge 1 commit into
Draft
cgwalters-bot wants to merge 1 commit into
cgwalters-bot wants to merge 1 commit into
Conversation
Part of bootc-dev#87 The RPM and metalink flakes in the package, test-container-export, test-baseconfigs and test-integration jobs come from podman builds that fetch over the network without the retry loop `build-fetch` already has. This moves that loop out of `build-fetch` into `hack/ci-retry` so more than one recipe can use it. It also adds `just package-fetch`, which runs the `buildroot` stage (install-buildroot and `cargo fetch`, both before the `--network=none` cutoff) with retries and the same `base_buildargs` as `just package`, so the package build and its reproducibility check get a cache hit. Without the workflow change below, nothing in CI calls `package-fetch` yet. This run cannot change files under `.github/`, so the diff below needs to be applied by hand. It adds a retried fetch before `check-buildsys` in the package job and a `build-fetch` step before the build in test-container-export and test-baseconfigs. In test-integration, it re-runs `build-fetch` after `podman builder prune -af`, because the prune removes the fetch layer that the TMT step's `just build` then needs again. It also sets `BOOTC_SKIP_PACKAGE=1` on the TMT step. Without that, the step rebuilt the RPMs from source and ran the buildroot fetch again with no retry. TMT now tests the RPM artifacts from the package job, the same ones the earlier steps in that job use. A package that is really missing is still retried until `BOOTC_CI_RETRIES` runs out, as `build-fetch` already does. With CI's 10 x 60s, that also means a deterministic buildroot or `cargo fetch` failure in the package job takes about 9 minutes longer to report. dnf's and podman's output is still shown on every attempt. Verified with `just --dry-run` on `package-fetch` and `build-fetch`, shellcheck on `hack/ci-retry`, a local run of the script against a failing and a passing command, and a YAML parse of the edited workflow. actionlint is not installed and no podman build was run, so the cache hits were worked out from the build args, not observed. Review: one pass, no blockers. Follow-ups it noted: `just validate` and the `tools` stage of `tmt/tests/Dockerfile.upgrade` also fetch without retry; `package` could use `_local-deps-args` so its args cannot drift from `package-fetch`'s; the test-integration re-fetch also rebuilds the unused upgrade-source fetch stage. ## Caller settings Repository cgwalters-forge/bootc, file `.github/workflows/ci.yml`: ```diff diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84006f0..685a47e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -270,6 +270,9 @@ jobs: printf 'BOOTC_base=%s\n' "$BASE" >> "$GITHUB_ENV" printf 'BOOTC_buildroot_base=%s\n' "$BUILDROOT_BASE" >> "$GITHUB_ENV" + - name: Fetch package buildroot (with retry) + run: just package-fetch + - name: Build packages (and verify build system) run: just check-buildsys @@ -402,7 +405,13 @@ jobs: - name: Reclaim disk space before TMT run: podman builder prune -af + # The prune above dropped the fetch layer; the TMT step rebuilds the image. + - name: Re-fetch external dependencies (with retry) + run: BOOTC_SKIP_PACKAGE=1 just build-fetch + - name: Run TMT integration tests + env: + BOOTC_SKIP_PACKAGE: "1" run: | if [[ "${{ matrix.variant }}" = composefs ]]; then just test-composefs "${{ matrix.bootloader }}" "${{ matrix.filesystem }}" "${{ matrix.boot_type }}" "${{ matrix.seal_state }}" @@ -541,6 +550,9 @@ jobs: name: packages-${{ matrix.test_os }} path: target/packages/ + - name: Fetch external dependencies (with retry) + run: BOOTC_SKIP_PACKAGE=1 just build-fetch + - name: Build container with baseconfig run: BOOTC_SKIP_PACKAGE=1 just build @@ -644,6 +656,9 @@ jobs: name: packages-centos-10 path: target/packages/ + - name: Fetch external dependencies (with retry) + run: BOOTC_SKIP_PACKAGE=1 just build-fetch + - name: Build and run container export test run: | BOOTC_SKIP_PACKAGE=1 just test-container-export ``` Generated-by: https://github.com/cgwalters/#llms
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #87
The RPM and metalink flakes in the package, test-container-export, test-baseconfigs and test-integration jobs come from podman builds that fetch over the network without the retry loop
build-fetchalready has. This moves that loop out ofbuild-fetchintohack/ci-retryso more than one recipe can use it. It also addsjust package-fetch, which runs thebuildrootstage (install-buildroot andcargo fetch, both before the--network=nonecutoff) with retries and the samebase_buildargsasjust package, so the package build and its reproducibility check get a cache hit.Without the workflow change below, nothing in CI calls
package-fetchyet. This run cannot change files under.github/, so the diff below needs to be applied by hand. It adds a retried fetch beforecheck-buildsysin the package job and abuild-fetchstep before the build in test-container-export and test-baseconfigs. In test-integration, it re-runsbuild-fetchafterpodman builder prune -af, because the prune removes the fetch layer that the TMT step'sjust buildthen needs again. It also setsBOOTC_SKIP_PACKAGE=1on the TMT step. Without that, the step rebuilt the RPMs from source and ran the buildroot fetch again with no retry. TMT now tests the RPM artifacts from the package job, the same ones the earlier steps in that job use.A package that is really missing is still retried until
BOOTC_CI_RETRIESruns out, asbuild-fetchalready does. With CI's 10 x 60s, that also means a deterministic buildroot orcargo fetchfailure in the package job takes about 9 minutes longer to report. dnf's and podman's output is still shown on every attempt.Verified with
just --dry-runonpackage-fetchandbuild-fetch, shellcheck onhack/ci-retry, a local run of the script against a failing and a passing command, and a YAML parse of the edited workflow. actionlint is not installed and no podman build was run, so the cache hits were worked out from the build args, not observed.Review: one pass, no blockers. Follow-ups it noted:
just validateand thetoolsstage oftmt/tests/Dockerfile.upgradealso fetch without retry;packagecould use_local-deps-argsso its args cannot drift frompackage-fetch's; the test-integration re-fetch also rebuilds the unused upgrade-source fetch stage.Caller settings
Repository cgwalters-forge/bootc, file
.github/workflows/ci.yml: