From 9059134344c1da3907fbe5b1051446665ec55acb Mon Sep 17 00:00:00 2001 From: xopenwrt Date: Tue, 30 Jun 2026 23:31:42 +0800 Subject: [PATCH] ci retry package downloads serially --- .github/workflows/X-x86_64_X.yml | 9 ++++++++- .github/workflows/X-x86_64_Y.yml | 9 ++++++++- .github/workflows/X-x86_64_Z.yml | 9 ++++++++- AI_CHANGELOG_GRUB2_DOWNLOAD_RETRY.md | 20 ++++++++++++++++++++ CODEX_HANDOFF.md | 3 ++- 5 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 AI_CHANGELOG_GRUB2_DOWNLOAD_RETRY.md diff --git a/.github/workflows/X-x86_64_X.yml b/.github/workflows/X-x86_64_X.yml index 9bb1faa..bf2d7e7 100644 --- a/.github/workflows/X-x86_64_X.yml +++ b/.github/workflows/X-x86_64_X.yml @@ -252,7 +252,14 @@ jobs: cd openwrt ./scripts/feeds install -a make defconfig - make download -j${DOWNLOAD_JOBS} + mkdir -p dl + if ! make download -j${DOWNLOAD_JOBS} + then + echo "Parallel package download failed; retrying serially with verbose output." + find dl -type f -size -1024c -print -delete + make download -j1 V=s + fi + find dl -type f -size -1024c -print -delete - name: Build OpenWrt run: | diff --git a/.github/workflows/X-x86_64_Y.yml b/.github/workflows/X-x86_64_Y.yml index 879a002..43cd7ef 100644 --- a/.github/workflows/X-x86_64_Y.yml +++ b/.github/workflows/X-x86_64_Y.yml @@ -249,7 +249,14 @@ jobs: cd openwrt ./scripts/feeds install -a make defconfig - make download -j${DOWNLOAD_JOBS} + mkdir -p dl + if ! make download -j${DOWNLOAD_JOBS} + then + echo "Parallel package download failed; retrying serially with verbose output." + find dl -type f -size -1024c -print -delete + make download -j1 V=s + fi + find dl -type f -size -1024c -print -delete - name: Build OpenWrt run: | diff --git a/.github/workflows/X-x86_64_Z.yml b/.github/workflows/X-x86_64_Z.yml index 7ed622c..2dbfae3 100644 --- a/.github/workflows/X-x86_64_Z.yml +++ b/.github/workflows/X-x86_64_Z.yml @@ -247,7 +247,14 @@ jobs: cd openwrt ./scripts/feeds install -a make defconfig - make download -j${DOWNLOAD_JOBS} + mkdir -p dl + if ! make download -j${DOWNLOAD_JOBS} + then + echo "Parallel package download failed; retrying serially with verbose output." + find dl -type f -size -1024c -print -delete + make download -j1 V=s + fi + find dl -type f -size -1024c -print -delete - name: Build OpenWrt run: | diff --git a/AI_CHANGELOG_GRUB2_DOWNLOAD_RETRY.md b/AI_CHANGELOG_GRUB2_DOWNLOAD_RETRY.md new file mode 100644 index 0000000..6f508da --- /dev/null +++ b/AI_CHANGELOG_GRUB2_DOWNLOAD_RETRY.md @@ -0,0 +1,20 @@ +# AI Modification Log: GRUB2 Download Retry + +Date: 2026-06-29 + +## Summary + +- Updated the X/Y/Z x86_64 workflows so `make download` retries serially with `V=s` after a parallel download failure. +- Added cleanup for tiny incomplete files in `dl/` before the retry and after download completion. +- Updated `CODEX_HANDOFF.md` to record that the config-comment task was interrupted by this build failure fix. + +## Reason + +The reported failure stopped at `package/boot/grub2` with build variant `efi` during `make package/download`. Retrying `make download` serially follows the OpenWrt error guidance and avoids common parallel download or cached partial-file failures while preserving detailed logs if the upstream package still fails. + +## Verification + +- Inspected the workflow diff and confirmed only the X/Y/Z pre-download blocks changed. +- Parsed the edited X/Y/Z workflow files with PyYAML. +- Checked workflow line endings and confirmed X stayed LF while Y/Z stayed CRLF. +- Ran whitespace validation with `git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --check` because Y/Z intentionally still use CRLF. diff --git a/CODEX_HANDOFF.md b/CODEX_HANDOFF.md index e5dd07e..b5a584b 100644 --- a/CODEX_HANDOFF.md +++ b/CODEX_HANDOFF.md @@ -13,7 +13,7 @@ This file is the stable restart point for future Codex sessions in this reposito - Remote tracking branch: `origin/ai` - Latest completed task batch: continued the GitHub Actions X/Y/Z optimization backlog through multiple high-priority and low-risk maintainability/script items. - Latest task commit at handoff update time: `1629605 docs update codex handoff` -- Current requested task: update the todo handoff, then add comments to `Configs/x86_64-X`, `Configs/x86_64-Y`, and `Configs/x86_64-Z`, plus a dedicated config optimization todo list. +- Current requested task: fixed a reported `package/boot/grub2` EFI failure during `make download` by adding a serial verbose retry path; resume #35 after this fix is committed. - Backlog file: `NOTES_GHA_XYZ_OPTIMIZATION.md` ## Completed Backlog Items @@ -48,6 +48,7 @@ Each code fix has a corresponding `AI_CHANGELOG_*.md` file. Immediate continuation: +- Build failure fix completed: X/Y/Z pre-download now retries serially with `V=s` after a parallel package download failure, and cleans tiny incomplete files from `dl/`. - #35: Document the X/Y/Z x86_64 config intent. Add header comments to `Configs/x86_64-X`, `Configs/x86_64-Y`, and `Configs/x86_64-Z`, then list config-specific optimization points as todos. The next unresolved backlog items need broader design or more careful behavior decisions: