Skip to content

ci: cache TiUP components and run playground from cached binaries - #7912

Merged
jiefenghuang merged 2 commits into
mainfrom
ci-cache-tiup
Nov 26, 2026
Merged

jiefenghuang merged 2 commits into
mainfrom
ci-cache-tiup

Conversation

@zxh326

@zxh326 zxh326 commented Nov 25, 2026

Copy link
Copy Markdown
Member

Problem

TiKV/TiDB CI jobs occasionally fail during tiup playground bootstrap when the upstream TiUP mirror (https://tiup-mirrors.pingcap.com) serves inconsistent manifests (e.g., snapshot.json pointing to a missing /<ver>.pd.json returning 404). Even if ~/.tiup were cached alone, tiup playground still resolves component manifests from the mirror unless explicit --*.binpath flags are provided, and sudo/root steps previously used /root/.tiup instead of /home/runner/.tiup.

Changes

  • Add composite action .github/actions/cache-tiup (actions/cache@v5) caching ~/.tiup/{bin,components,manifests,tiup.toml} keyed by OS/arch, meta engine (tikv/tidb), and pinned versions (v1.17.1 / v8.5.7).
  • Update .github/scripts/start_meta_engine.sh:
    • Share /home/runner/.tiup across runner and sudo/root invocations and restore ownership for cache saving.
    • Skip install.sh and launch tiup playground offline with --pd.binpath, --kv.binpath (and --db.binpath for TiDB), plus --without-monitor (and --tiflash 0 for TiDB), when all pinned binaries are present in the cache.
    • Keep existing download and stale manifest cleanup fallback on cache miss.
  • Wire .github/actions/cache-tiup into the 22 workflows that run TiKV or TiDB jobs.

@zxh326
zxh326 requested a review from jiefenghuang as a code owner November 25, 2026 03:27
@jiefenghuang
jiefenghuang merged commit 7674bd8 into main Nov 26, 2026
98 checks passed
@jiefenghuang
jiefenghuang deleted the ci-cache-tiup branch November 26, 2026 09:31
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.

2 participants