chore(ci): Add path filters and concurrency groups to reduce Actions minutes#1442
chore(ci): Add path filters and concurrency groups to reduce Actions minutes#1442
Conversation
…minutes 316k minutes consumed in 90 days (~58 hrs/day) on free runners. Several workflows ran on every push regardless of what changed, and lacked concurrency groups causing superseded runs to stack. Changes: - test.yml: Add Go/proto path filters (biggest win — 3 shards × every push) - build.yml: Add Go/Dockerfile/proto path filters - quality.yml: Add Go/shell/Tiltfile path filters - proto.yml: Add proto/buf path filters + concurrency group - markdown.yml: Add *.md path filters + concurrency group - saga-validation.yml: Add path filters to push trigger (PR already had them) + concurrency group - codeql.yml: Add concurrency group (no path filters — security scanning should always run) - security.yml: Add concurrency group (same rationale) - e2e.yml: Add concurrency group (already had path filters) No required status checks are configured, so skipped workflows won't block merging.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughNine GitHub Actions workflow files were updated to add path-based triggers and/or concurrency blocks to control when workflows run and to manage cancellation of concurrent runs for push and pull_request events. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build.yml:
- Around line 8-15: The workflow's paths filter under the "paths:" block omits
buf.yaml and buf.lock so changes to protobuf config/lock won't trigger the
build; update the paths list to include 'buf.yaml' and 'buf.lock' alongside the
existing entries (the same change should be applied where the duplicate paths
block appears) so edits that affect buf generate will correctly trigger the
workflow.
In @.github/workflows/quality.yml:
- Around line 6-15: The workflow's paths filter is missing Buf config files so
changes to buf.yaml/buf.lock won't trigger the quality job; update the paths
arrays in .github/workflows/quality.yml (the paths list entries shown around the
existing '**.go', 'go.mod', etc.) to include 'buf.yaml' and 'buf.lock' (and add
them to the second paths block referenced around lines 18-27) so that
modifications to Buf config/lockfiles will run the buf generate/lint checks.
In @.github/workflows/test.yml:
- Around line 6-13: Update the workflow path filters so changes to root-level
buf configuration trigger the job: add "buf.yaml" and "buf.lock" to the paths
list alongside the existing "buf.gen.yaml" and "api/proto/**". Locate the paths
block in the test workflow (the paths: list that currently includes '**.go',
'go.mod', 'go.sum', 'api/proto/**', 'buf.gen.yaml', 'Makefile',
'.github/workflows/test.yml') and insert 'buf.yaml' and 'buf.lock' so buf
generate runs will be triggered when those files change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e6a87f28-2a20-4566-9390-c53e536f828f
📒 Files selected for processing (9)
.github/workflows/build.yml.github/workflows/codeql.yml.github/workflows/e2e.yml.github/workflows/markdown.yml.github/workflows/proto.yml.github/workflows/quality.yml.github/workflows/saga-validation.yml.github/workflows/security.yml.github/workflows/test.yml
Claude Code ReviewCommit: e159ab3 | CI: mostly passing (E2E shards, some CodeQL/security/test shards still pending) Summary: Clean, well-scoped CI optimization. All previous review feedback (from both CodeRabbit and my earlier review) has been addressed across two follow-up commits. e4501d4 added buf.yaml, buf.lock, Makefile to path filters where workflows use buf generate or make. e159ab3 removed path filter from build.yml push trigger to protect tag-based releases -- smart fix for the tag push edge case I flagged. The changes are additive-only (no existing triggers removed), each workflow self-references its own YAML in paths (self-testing), and the author made deliberate choices about which workflows should NOT get path filters (security scanning). Risk Assessment
Findings: No actionable findings remain. All items from the previous review have been addressed. Bot Review Notes: All 3 CodeRabbit threads and both previous claude[bot] threads are resolved. CodeRabbit flagged buf.yaml/buf.lock missing from build, quality, test path filters -- fixed in e4501d4. claude[bot] flagged Makefile missing from build path filter -- fixed in e4501d4. claude[bot] flagged path filter on push trigger risks breaking tag releases -- fixed in e159ab3 by removing push path filter entirely. Previously Flagged
|
Address review comments: workflows that run buf generate need buf.yaml and buf.lock in path filters. build.yml also needs Makefile since it runs make test on push events.
…leases Path filters apply to all push events including tag pushes. A v* tag push on a commit that only changes non-code files would skip the Docker build, breaking releases. Keep path filter on PR trigger only (high frequency), push trigger always runs (low frequency — develop/main/tags).
Stale bot review — findings addressed
Summary
Reduce GitHub Actions minute consumption by adding path filters and concurrency groups to 9 workflows. Current usage: 316k minutes in 90 days (~58 hrs/day of CI time on free runners).
Changes
Path filters added (skip workflows when irrelevant files change)
**.go,go.mod,go.sum,api/proto/**,buf.gen.yaml,Makefile**.go,go.mod,go.sum,Dockerfile,api/proto/**,buf.gen.yaml**.go,go.mod,go.sum,**.sh,Tiltfile,api/proto/**,.golangci.ymlapi/proto/**,buf.yaml,buf.gen.yaml,buf.lock**.md,.markdownlint-cli2.jsonc,package.jsonConcurrency groups added (cancel superseded runs)
Not changed (intentionally)
Impact estimate
Risk
Low. Path filters are additive-only (no existing triggers removed). Each workflow includes its own
.github/workflows/<name>.ymlin paths so trigger changes are self-testing.