Skip to content

ci(rust): skip unnecessary setup steps#3749

Draft
Standing-Man wants to merge 2 commits into
apache:masterfrom
Standing-Man:ci-opt
Draft

ci(rust): skip unnecessary setup steps#3749
Standing-Man wants to merge 2 commits into
apache:masterfrom
Standing-Man:ci-opt

Conversation

@Standing-Man

@Standing-Man Standing-Man commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Rationale

Rust CI was doing redundant work in two areas:

  1. Lightweight checks such as formatting, dependency sorting, and
    cargo machete installed nextest and system dependencies that they
    did not use.
  2. The two nextest partitions independently compiled the same
    coverage-instrumented workspace before running their respective test
    subsets.

This increased both CI setup time and total compute usage.

What changed?

  • Added configurable Rust setup options for installing nextest and
    platform-specific system dependencies.
  • Skipped unnecessary setup for formatting, sorting, and machete jobs.
  • Explicitly enabled nextest only for jobs that require it.
  • Replaced the two independently compiled Rust test tasks with:
    • one build job that determines the affected crates and creates a
      coverage-instrumented nextest archive;
    • two test jobs that download the same archive and execute separate
      hash partitions.
  • Packaged connector shared libraries alongside the nextest archive so
    integration tests can continue to resolve runtime plugins.
  • Preserved cargo-rail affected-crate filtering, nextest retries, runtime
    setup, and per-partition Codecov reports.
  • Added a benchmark workflow for comparing the baseline and optimized
    Rust setup paths.
  • Updated the Python interpreter synchronization script to use a
    portable Bash shebang.

Results

The setup optimization was measured over three runs:

Measurement Baseline median Optimized median Improvement
Rust setup step 44 s 13 s 31 s / 70.5%
Benchmark job 52 s 20 s 32 s / 61.5%

A pre-merge comparison showed:

Job Baseline Optimized Improvement
fmt 47 s 22 s 25 s / 53%
sort 42 s 19 s 23 s / 55%
machete 79 s 61 s 18 s / 23%
Combined 168 s 102 s 66 s / 39%

The benchmark link.

Local Execution

  • Passed / not passed
    Passed
  • Pre-commit hooks ran / not ran
    Ran

AI Usage

@github-actions

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jul 25, 2026
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.34%. Comparing base (d9635b6) to head (4526ce8).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3749      +/-   ##
============================================
- Coverage     74.53%   74.34%   -0.20%     
  Complexity      969      969              
============================================
  Files          1306     1306              
  Lines        150028   150028              
  Branches     125462   125534      +72     
============================================
- Hits         111829   111535     -294     
- Misses        34700    34909     +209     
- Partials       3499     3584      +85     
Components Coverage Δ
Rust Core 74.66% <ø> (-0.18%) ⬇️
Java SDK 62.71% <ø> (ø)
C# SDK 71.13% <ø> (-1.14%) ⬇️
Python SDK 92.27% <ø> (ø)
PHP SDK 84.52% <ø> (ø)
Node SDK 92.20% <ø> (-0.05%) ⬇️
Go SDK 43.08% <ø> (ø)
see 50 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.

Signed-off-by: StandingMan <jmtangcs@gmail.com>
@Standing-Man
Standing-Man marked this pull request as draft July 25, 2026 03:32
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Jul 25, 2026
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