Skip to content

ci: 发版候选的安卓构建也预取 Gradle 发行包并延长依赖下载的重试 - #245

Merged
sunerpy merged 1 commit into
mainfrom
ci/candidate-gradle-retries
Nov 10, 2026
Merged

sunerpy merged 1 commit into
mainfrom
ci/candidate-gradle-retries

Conversation

@sunerpy

@sunerpy sunerpy commented Nov 10, 2026

Copy link
Copy Markdown
Owner

What and why

0.3.1 的发版候选(run 42733161564,job 129556020370)在安卓腿上失败:从 dl.google.com 读 androidx.window:window-core:1.5.1 的 POM 超时,Gradle 按默认的三次尝试后停用了 Google 仓库,构建失败;重跑一次后通过。

#241 只给 ci.yml 的 android job 加了 .github/scripts/prepare-gradle.sh(钉住 SHA-256 的 Gradle 发行包、每个仓库试八次、间隔从 2 s 翻倍),release-candidate.yml 的 bundle-android 没有。

  • release-candidate.yml 的 bundle-android 在 pnpm install 之后、构建之前,经 .release-tooling 运行同一个脚本(受信的工具检出已包含 /.github/scripts/)。
  • scripts/release/test_release_workflows.py:新增 GradleDownloads,检查 ci.yml 与 release-candidate.yml 都在 pnpm install 之后、scripts/build-android-rn.sh --unsigned 之前运行这个脚本。改之前它在 release-candidate.yml 上失败,改之后通过。

只改发版工作流和它的测试,不改产品代码,不发版(ci:)。

Verification

  • python3 -m unittest discover -s scripts/release -p "test_release_workflows.py":39 个测试通过;新测试改之前失败('run: .release-tooling/.github/scripts/prepare-gradle.sh apps/mobile-rn' not found)
  • test_fetch_pinned.py 通过,actionlint .github/workflows/release-candidate.yml 通过
  • 下一次发版候选的安卓腿日志里出现 prepare-gradle: 一行(要等下一次发版)
  • No real host name, token or key in the change (.github/scripts/check-no-production-hosts.sh)

Risk and rollback

只影响发版候选的安卓腿:多一步下载 Gradle 发行包(经 fetch-pinned.sh 核对摘要)并写 GRADLE_USER_HOME/gradle.properties 的两项重试设置,构建产物不变。回退就是还原这个提交。

0.3.1 的发版候选(run 42733161564,job 129556020370)在安卓腿上失败:从
dl.google.com 读 androidx.window 的 POM 超时,Gradle 按默认的三次尝试后停用了
这个仓库。#241 只给 ci.yml 的 android job 加了 prepare-gradle.sh(钉住摘要的
Gradle 发行包、每个仓库试八次),发版候选的安卓腿没有。

release-candidate.yml 的 bundle-android 在 pnpm install 之后、构建之前,经
.release-tooling 运行同一个脚本。test_release_workflows.py 检查两处都在构建前运行它。
@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
- Coverage   93.56%   93.56%   -0.01%     
==========================================
  Files         489      489              
  Lines       85860    85860              
  Branches     4909     4909              
==========================================
- Hits        80332    80331       -1     
- Misses       4859     4860       +1     
  Partials      669      669              
Flag Coverage Δ
rust 93.79% <ø> (-0.01%) ⬇️
web 92.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sunerpy
sunerpy merged commit c06dc74 into main Nov 10, 2026
16 checks passed
@sunerpy
sunerpy deleted the ci/candidate-gradle-retries branch November 10, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant