Skip to content

ci: scope PR behavior, core, and binding matrices to affected surfaces - #8579

Merged
Xuanwo merged 1 commit into
mainfrom
xuanwo/optimize-ci-for-prs
Nov 21, 2026
Merged

Xuanwo merged 1 commit into
mainfrom
xuanwo/optimize-ci-for-prs

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 21, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Rationale for this change

With full main verification now running in isolated nightly pipelines (#8577), pull requests still trigger large cross-service and cross-language fan-out:

  • Modifying a single service or core file launches ~270–355 behavior jobs across all 8 bindings and external cloud accounts (Azure/HF failures routinely break unrelated PRs).
  • Modifying any file under core/** (including a single service crate or docs) triggers all 17 language binding CIs (including Java's 4 OS × 5 JDK matrix) and all 5 integrations, plus redundant ci_core builds and full fuzz runs.

This PR scopes PR CI to fast, deterministic verification of directly affected surfaces and representative consumers, while preserving full cross-matrix coverage on direct component changes and in nightly_tier_a.yml / nightly_tier_b.yml / test_fuzz.yml.

What changes are included in this PR?

  1. Scoped, deterministic PR behavior routing (.github/scripts/test_behavior/plan.py, .github/workflows/test_behavior.yml):
    • Exclude all live/external setups (op://services and github/read_only) from PR runs (enable_secrets=false); emit explicit step summary notes when a PR touches a live-only service (e.g. gcs, hf, azdls, azfile, ghac).
    • Compute impact as the union across all changed files:
      • Single service changes run only core behavior tests for that service's local setups (no cross-binding fan-out), expanding verified inter-service dependencies (azure-common → azblob/azdls/azfile/ghac, azblob → ghac).
      • Shared core runtime / facade / layers / testkit / planner changes run the deterministic core smoke set (memory, fs on Linux + Windows, s3/0_silo_s3, azblob/azurite_azblob, http/nginx).
      • Single binding changes run that binding's local smoke set (memory, fs/local_fs, s3/0_silo_s3), with bindings/c/** also exercising binding_go.
      • Single integration changes run that integration's local setups (object_store: fs, s3).
    • Update and expand unit tests in .github/scripts/test_behavior/test_plan.py (20 tests).
  2. Slim ci_core.yml and test_fuzz.yml on PRs:
    • Remove build_all_features from ci_core.yml (covered by check_clippy --workspace --all-targets --all-features and unit --all-features).
    • Run heavy 3-OS 40-feature build_all_platforms only on workflow_call (Nightly Tier A), keeping check_docs, doc-test, check_msrv, check_clippy, check_tls_features, unit, run_examples, build_under_wasm, and 3-OS build_default_features on PRs.
    • Scope test_fuzz.yml PR triggers to core/fuzz/**, .github/actions/fuzz_test/**, and .github/workflows/test_fuzz.yml (nightly schedule still runs all targets).
  3. Impact-routed binding, integration, and generator CIs:
    • Replace broad core/** triggers with the shared core runtime surface (core/Cargo.toml, core/Cargo.lock, core/src/**, core/core/Cargo.toml, core/core/src/** excluding docs, core/http-transports/**) on representative PR consumers: C, Go, Java, Node.js, Python, and integrations/object_store.
    • Route direct layer dependencies (core/layers/<name>/**) to the bindings that import them (java, nodejs, python, dotnet, ruby), keep bindings/c/** routing to C ABI downstreams (go, zig, d, swift), and include dev/** templates in ci_odev.yml (check_generated).
    • In ci_bindings_go.yml, add a smoke job that builds libopendal_c from HEAD (services-fs) and executes go test -v . via OPENDAL_C_LIB_PATH.
    • In ci_bindings_java.yml, add a scope job so indirect core/layer PRs run a single ubuntu-latest / JDK 25 build & test, while direct bindings/java/** PRs, tag pushes, and Nightly Tier A still run the full 4 OS × 5 JDK matrix.
    • Scope remaining bindings (cpp, dotnet, ruby, zig, dart, haskell, lua, moonbit, ocaml, d, swift) and integrations (dav-server, parquet, spring, unftp-sbe) on PRs to direct changes and explicit dependency edges (all enabled bindings and integrations run nightly in nightly_tier_a.yml).

Are there any user-facing changes?

No public library API changes. PR checks run faster and without live external cloud service noise.

Breaking changes

AI Usage Statement

  • Harness: pi (via T3 Code)
  • Model: Gemini 4 Neon
  • Effort: high
  • Role: Implemented Phase 2 PR CI scoping across planner, core, fuzz, odev, binding, and integration workflows and verified with local YAML, license, typo, and planner unit tests.
  • Harness: Codex (via T3 Code delegated review)
  • Model: gpt-6.2-astra
  • Effort: high
  • Role: Reviewed the Phase 2 routing design across two rounds, identifying azure-common / ghac dependency edges, dev/** generator coverage, binding direct layer edges, Go C-library runtime smoke, and Java matrix scoping.

Assumptions / unknowns: Real-world PR P95 latency and runner-minute reductions should be observed over the pilot window after merge.

@Xuanwo
Xuanwo requested a review from tisonkun as a code owner November 21, 2026 15:14
@Xuanwo
Xuanwo merged commit 3da2a2e into main Nov 21, 2026
132 of 135 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/optimize-ci-for-prs branch November 21, 2026 15:37
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