ci: consolidate workflow pipeline with dependency chain - #734
Conversation
Convert individual CI workflows to reusable (workflow_call) and add
an orchestrator ci.yml that chains them:
architecture + build + lint (parallel)
-> format -> sync -> code-quality -> claude-review -> complete-build
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 51 seconds. ⌛ 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. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughRefactored GitHub Actions CI/CD workflows to use reusable workflow pattern. Converted nine workflow files from direct event triggers ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/code_quality.yml (1)
5-10:⚠️ Potential issue | 🟡 Minor
qualityjob has no actual checks — gating Claude review on this is a no-op.The
qualityjob only checks out the repo and performs no quality analysis (no SonarQube, CodeClimate, linter aggregation, etc.). In the tier chain (Tier 4 → Tier 5),claude-reviewdepends oncode-qualityvianeeds, but since this job trivially succeeds, the dependency adds pipeline latency without any gating value. Either add the intended quality step(s) or reconsider whether Tier 4 is needed in the chain.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/code_quality.yml around lines 5 - 10, The "quality" job currently only performs a checkout and provides no checks; update the workflow so the "quality" job (job name: quality) either runs actual quality tools (e.g., add steps to run linters, static analysis, SonarQube/CodeClimate scans, or aggregate linter results) or remove the unnecessary dependency from the downstream "claude-review" job (the needs: code-quality/quality linkage). Modify the "quality" job to include one or more concrete steps (install dependencies, run eslint/clang-format/flake8, run Sonar scanner or upload results) and ensure artifact or status reporting so the "claude-review" dependency actually gates progress, or instead remove the needs reference to eliminate the no-op gating.
🧹 Nitpick comments (3)
.github/workflows/claude-code-review.yml (1)
34-34: Prompt relies ongithub.event.pull_request.number— verify caller's event.
${{ github.event.pull_request.number }}will be empty unlessci.ymlis triggered bypull_request/pull_request_target. If the orchestrator ever runs onpushorworkflow_dispatch, the interpolated URL becomes<repo>/pull/and Claude will get a malformed prompt. Consider exposing the PR number as an explicitworkflow_callinput to fail fast and document the dependency.♻️ Suggested hardening
on: - workflow_call: + workflow_call: + inputs: + pr_number: + description: 'Pull request number to review' + required: true + type: string- prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' + prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ inputs.pr_number }}'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/claude-code-review.yml at line 34, The prompt line uses github.event.pull_request.number which is empty unless the workflow is triggered by pull_request/ pull_request_target; change the workflow to accept an explicit workflow_call input (e.g., input name pr_number) and replace github.event.pull_request.number with that input in the prompt, add a step early that checks the pr_number input and fails fast with a clear error if it's missing/empty, and update the workflow docs/description to state that callers must pass pr_number when invoking the workflow (or only invoke via pull_request triggers)..github/workflows/ci.yml (2)
3-7: Consider adding concurrency control to cancel stale runs.When multiple commits are pushed to a PR in quick succession, this workflow will run for each commit, potentially wasting resources. Consider adding concurrency control to automatically cancel in-progress runs when new commits arrive.
⚡ Proposed addition for concurrency control
on: pull_request: branches: - main - development + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yml around lines 3 - 7, Add a top-level GitHub Actions concurrency configuration to the workflow to cancel stale runs: under the existing on: pull_request stanza, add a top-level concurrency block with a stable group key (for example using github.workflow and github.ref or github.head_ref) and set cancel-in-progress: true so in-progress runs for the same PR are cancelled when a new commit is pushed; place this concurrency block at the root of the workflow YAML so it applies to all jobs in the workflow.
37-39: Consider renaming for clarity.The job name
complete-buildcallsbuild.yml, while the earlierbuild-checkjob callsci-build.yml. This naming could be confusing. Consider:
- Renaming
build.ymltoci-build-complete.ymlorci-build-matrix.yml, OR- Renaming the job to match the workflow file more clearly
This would make the relationship between job names and workflow files more intuitive.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yml around lines 37 - 39, The job name complete-build is ambiguous relative to the referenced workflow file build.yml; either rename the workflow file (e.g., build.yml -> ci-build-complete.yml or ci-build-matrix.yml) or rename the job to match the file (e.g., complete-build -> ci-build or ci-build-matrix) so naming is consistent; update all references where the job or file name appears (the complete-build job declaration and any callers like needs: or uses: that reference build.yml) to keep names in sync.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In @.github/workflows/code_quality.yml:
- Around line 5-10: The "quality" job currently only performs a checkout and
provides no checks; update the workflow so the "quality" job (job name: quality)
either runs actual quality tools (e.g., add steps to run linters, static
analysis, SonarQube/CodeClimate scans, or aggregate linter results) or remove
the unnecessary dependency from the downstream "claude-review" job (the needs:
code-quality/quality linkage). Modify the "quality" job to include one or more
concrete steps (install dependencies, run eslint/clang-format/flake8, run Sonar
scanner or upload results) and ensure artifact or status reporting so the
"claude-review" dependency actually gates progress, or instead remove the needs
reference to eliminate the no-op gating.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 3-7: Add a top-level GitHub Actions concurrency configuration to
the workflow to cancel stale runs: under the existing on: pull_request stanza,
add a top-level concurrency block with a stable group key (for example using
github.workflow and github.ref or github.head_ref) and set cancel-in-progress:
true so in-progress runs for the same PR are cancelled when a new commit is
pushed; place this concurrency block at the root of the workflow YAML so it
applies to all jobs in the workflow.
- Around line 37-39: The job name complete-build is ambiguous relative to the
referenced workflow file build.yml; either rename the workflow file (e.g.,
build.yml -> ci-build-complete.yml or ci-build-matrix.yml) or rename the job to
match the file (e.g., complete-build -> ci-build or ci-build-matrix) so naming
is consistent; update all references where the job or file name appears (the
complete-build job declaration and any callers like needs: or uses: that
reference build.yml) to keep names in sync.
In @.github/workflows/claude-code-review.yml:
- Line 34: The prompt line uses github.event.pull_request.number which is empty
unless the workflow is triggered by pull_request/ pull_request_target; change
the workflow to accept an explicit workflow_call input (e.g., input name
pr_number) and replace github.event.pull_request.number with that input in the
prompt, add a step early that checks the pr_number input and fails fast with a
clear error if it's missing/empty, and update the workflow docs/description to
state that callers must pass pr_number when invoking the workflow (or only
invoke via pull_request triggers).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: c5004896-ded0-4626-a396-62e4e3412562
📒 Files selected for processing (9)
.github/workflows/build.yml.github/workflows/ci-architecture.yml.github/workflows/ci-build.yml.github/workflows/ci-format.yml.github/workflows/ci-lint.yml.github/workflows/ci-sync.yml.github/workflows/ci.yml.github/workflows/claude-code-review.yml.github/workflows/code_quality.yml
|
Caution Review failedAn error occurred during the review process. Please try again later. WalkthroughRefactored GitHub Actions CI/CD workflows to use reusable workflow pattern. Converted nine workflow files from direct event triggers ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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
workflow_call)ci.ymlthat chains them withneeds:Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit