Skip to content

ci: split lint into parallel jobs and remove redundant checks#3366

Open
bryantbiggs wants to merge 1 commit intoopen-telemetry:mainfrom
bryantbiggs:fix/split-lint-ci-for-faster-feedback
Open

ci: split lint into parallel jobs and remove redundant checks#3366
bryantbiggs wants to merge 1 commit intoopen-telemetry:mainfrom
bryantbiggs:fix/split-lint-ci-for-faster-feedback

Conversation

@bryantbiggs
Copy link
Contributor

@bryantbiggs bryantbiggs commented Feb 20, 2026

Summary

The CI lint job is the most frequent source of PR failures. After investigating ~20 recent failures, every single one was a legitimate clippy error (dead code, unused variables, etc.) caught by cargo hack --each-feature — not resource exhaustion or flakiness.

The root cause: PRs introduce code that compiles fine with --all-features but triggers warnings when individual features are tested in isolation (e.g., a function only used with grpc-tonic enabled but missing #[cfg(feature = "grpc-tonic")]). Contributors don't know to run cargo hack locally, so they only discover the issue after pushing.

This PR improves the situation by:

  • Splitting lint into two parallel CI jobs for faster feedback:

    • lint: format, workspace clippy, and multi-feature combo checks (~1-2 min)
    • lint-feature-matrix: per-feature clippy via cargo hack --each-feature (~5-6 min)

    Previously all ~150 clippy invocations ran sequentially in a single job. Now the quick checks give immediate feedback while the thorough feature matrix runs in parallel.

  • Removing 6 redundant cargo_feature checks from lint.sh that are already covered by cargo hack --each-feature:

    • opentelemetry-otlp "default", "http-proto", "metrics" (single-feature, already tested individually by cargo hack)
    • opentelemetry-jaeger-propagator "default" (same)
    • opentelemetry-proto "default", "full" (same)
  • Updating CONTRIBUTING.md to document the cargo hack lint command so contributors can catch per-feature issues locally before pushing.

  • Updating scripts/precommit.sh to include the feature matrix check.

Test plan

  • Verify lint job passes (format + workspace clippy + multi-feature combos)
  • Verify lint-feature-matrix job passes (cargo hack per-feature checks)
  • Confirm both jobs run in parallel, not sequentially
  • Confirm no regressions in lint coverage (all multi-feature combos still checked)

Split the monolithic lint job into two parallel CI jobs for faster
feedback:

- `lint`: format check, workspace-wide clippy, and multi-feature
  combination checks (~1-2 min)
- `lint-feature-matrix`: per-feature clippy via cargo hack (~5-6 min)

Previously, all 150 clippy invocations ran sequentially in a single
job. The most common CI failure on PRs is the per-feature matrix
catching dead code or unused warnings that only surface when
individual features are tested in isolation. By splitting these into
parallel jobs, contributors get fast feedback on the common checks
while the thorough feature matrix runs alongside.

Also removes 6 redundant cargo_feature checks from lint.sh that are
already covered by `cargo hack --each-feature`:
- opentelemetry-otlp "default", "http-proto", "metrics"
- opentelemetry-jaeger-propagator "default"
- opentelemetry-proto "default", "full"

Updates CONTRIBUTING.md to document the cargo hack lint command so
contributors can catch per-feature issues locally before pushing.
@bryantbiggs bryantbiggs requested a review from a team as a code owner February 20, 2026 16:14
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.2%. Comparing base (09b85b5) to head (10157b4).

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3366     +/-   ##
=======================================
- Coverage   82.2%   82.2%   -0.1%     
=======================================
  Files        128     128             
  Lines      24626   24626             
=======================================
- Hits       20267   20266      -1     
- Misses      4359    4360      +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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