Skip to content

ci: add dynamic CI planner, Tier 1/2 matrix routing, ccache, and merge_group support - #3833

Draft
jihuayu wants to merge 2 commits into
apache:unstablefrom
jihuayu:ci-tiered-planner-3830
Draft

jihuayu wants to merge 2 commits into
apache:unstablefrom
jihuayu:ci-tiered-planner-3830

Conversation

@jihuayu

@jihuayu jihuayu commented Nov 27, 2026

Copy link
Copy Markdown
Member

Part of #3829
Closes #3830

Motivation

Every pull request currently triggers 35+ uncached heavy CI jobs (~97–148 minutes end-to-end) and runs full-repo clang-tidy (~38 minutes). In addition, .github/workflows/kvrocks.yaml and .github/workflows/compatibility.yml must handle merge_group events before GitHub Merge Queue can be enabled in .asf.yaml (#3832).

Changes

  1. Dynamic CI Planner (.github/scripts/ci_plan.py + test_ci_plan.py):
    • Replaces the static PR-only Precondition filter to support pull_request, merge_group, and push events while keeping Required as the sole branch-protection status check.
    • Tier 1 (pull_request default): Runs 8 orthogonal build jobs covering GCC, Clang, AppleClang, x86_64 + arm64, ENABLE_OPENSSL, ENABLE_LUAJIT=OFF, ENABLE_NEW_ENCODING=FALSE, DISABLE_JEMALLOC, Clang ASan+LSan+UBSan, Clang TSan, and SonarCloud coverage.
    • Canonical baseline preserved: Ubuntu 24 GCC keeps native Unix Makefiles + GNU ld to guard real source-release builds and static library link order, while PR feature/sanitizer jobs use --ninja and -fuse-ld=lld.
    • Path & label escalation: Automatically adds Alpine 3 (musl) + dual-arch check-docker when build/Docker/CI files change, runs boundary compatibility versions (v2.3.0, v2.15.0) when storage/types/build files change, and escalates to full Tier 2 when ci/full label is applied or when targeting non-unstable release branches.
    • Tier 2 (merge_group, push, or ci/full): Runs the full canonical Unix Makefiles host matrix (dropping the duplicate Darwin Clang arm64 without Jemalloc job since CMakeLists.txt already sets DISABLE_JEMALLOC=ON on Apple hosts), all 6 Linux distro containers, dual-arch check-docker, full clang-tidy, and all 6 compatibility versions (skipping SonarCloud on synthetic merge_group refs).
  2. ASF-Allowlist-Compliant Caching & Workflow Speedups (zero C++/Go/CMake changes):
    • Installs ccache via apt/brew + official actions/cache@v6 (-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache).
    • Enables Go module/build caching (cache: true + cache-dependency-path: tests/gocase/go.sum, plus -count=1 in compatibility.yml).
    • Runs incremental run-clang-tidy-18 on modified C/C++ translation units in Tier 1 PRs.
    • Replaces hardcoded sleep 1m / sleep 10s waits in check-docker and kvrocks2redis tests with readiness polling.

@jihuayu jihuayu added enhancement type enhancement A-ci area ci labels Nov 27, 2026
@jihuayu jihuayu self-assigned this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci area ci enhancement type enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: add dynamic CI planner, Tier 1/2 matrix routing, ccache, and merge_group support

1 participant