ci: narrow Rust CI filters to exclude JS-only files in shared packages#3176
Conversation
Shared packages (contracts, dapi-grpc, wasm-*) exist in both Cargo.toml and package.json workspaces. Their broad `packages/foo/**` globs matched JS files like package.json, causing the entire Rust test matrix (17+ suites) to run on JS-only changes. Replace with specific positive-only patterns (src/**, schema/**, Cargo.toml, etc.) so only Rust-relevant file changes trigger Rust CI. Pure Rust packages (rs-*) are unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
packages/foo/**globs with specific Rust-only patterns (src/**,schema/**,Cargo.toml, etc.) for the 10 shared packages that exist in both Cargo.toml and package.json workspacespackage.jsonupdates,.jsfile edits) in contract packages, dapi-grpc, and wasm-* packagesrs-*) are unchanged since they have no JS filesIssue being fixed or feature being added
Fixes excessive CI resource usage: PR #3174 (sinon upgrade) only changed JS
package.jsonfiles yet triggered all 17+ Rust test suites due to broad globs matching JS files in shared packages, which then cascaded through YAML anchor dependencies (contract → dpp → drive → drive-abci → etc.).Root cause
dorny/paths-filterevaluates patterns withsome()(OR) logic — a negation pattern!foo/package.jsonreturns FALSE for that file, but positive patternfoo/**returns TRUE, sosome()still returns TRUE. The fix uses specific positive-only patterns instead of trying negation.Impact
package.jsonchange in contract.jsfile change in dapi-grpcsrc/lib.rschange in contractCargo.tomlchange in contractschema/*.jsonchange in contractSafety net
Nightly cron runs test everything regardless of filters — any missed trigger is caught within 24 hours.
Test plan
rs-packagesin thechangesjob output with no Rust test jobs spawnedsrc/) still triggers the correct downstream test cascade🤖 Generated with Claude Code