Skip to content

Add CodeRabbit configuration#377

Open
sradco wants to merge 1 commit into
kubevirt:mainfrom
sradco:coderabbit-review-instructions
Open

Add CodeRabbit configuration#377
sradco wants to merge 1 commit into
kubevirt:mainfrom
sradco:coderabbit-review-instructions

Conversation

@sradco
Copy link
Copy Markdown
Collaborator

@sradco sradco commented May 20, 2026

Add .coderabbit.yaml with:

  • Path filters to skip review of generated
    dashboard YAMLs (dashboards/perses/**)
    and go.sum
  • Review instruction for Go files to flag
    functions that are too long and should be
    split into smaller, focused helpers

Signed-off-by: Shirly Radco sradco@redhat.com
Co-authored-by: AI Assistant noreply@cursor.com

Made with Cursor

@kubevirt-bot kubevirt-bot added the dco-signoff: no Indicates the PR's author has not DCO signed all their commits. label May 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Review Change Stack

Warning

Review limit reached

@sradco, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 1 review of capacity. Refill in 43 minutes and 57 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 758a46c4-6ac9-4c04-ba59-0ce9e18525ea

📥 Commits

Reviewing files that changed from the base of the PR and between ff70c50 and a79023d.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • docs/review_guidelines/dashboards.md
  • docs/review_guidelines/go.md
📝 Walkthrough

Walkthrough

This PR adds Go-specific review guidance (docs/review_guidelines/go.md), extends dashboard review instructions with Grafana and Perses guidance (docs/review_guidelines/dashboards.md), and updates .coderabbit.yaml to exclude go.sum from path_filters and to direct Go files (**/*.go) to the new Go review guidelines.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kubevirt-bot kubevirt-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S labels May 20, 2026
@sradco sradco force-pushed the coderabbit-review-instructions branch from 9f6b835 to ac35d10 Compare May 20, 2026 13:29
@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XS and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S labels May 20, 2026
@sradco sradco force-pushed the coderabbit-review-instructions branch from ac35d10 to e978bff Compare May 20, 2026 13:32
Comment thread .coderabbit.yaml
instructions: "Follow docs/review_guidelines/docs.md"
- path: "dashboards/**"
instructions: "Follow docs/review_guidelines/dashboards.md"
- path: "**/*.go"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be maybe under docs/review_guidelines/go.md?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks

@sradco sradco force-pushed the coderabbit-review-instructions branch from e978bff to ff70c50 Compare May 25, 2026 07:50
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/review_guidelines/go.md (1)

5-9: ⚡ Quick win

Clarify scope and exceptions to reduce subjective enforcement.

These rules are directionally good, but “~30 lines” and “hard to understand at a glance” are still ambiguous. Please add brief qualifiers (for example: exclude test helpers/generated code, and call out acceptable anonymous-function use such as short go func closures) so reviewers apply this consistently.

[Suggestion example]

Proposed wording
-- Keep functions short and focused. A function longer than ~30 lines
-  is a signal to split it.
+- Keep functions short and focused. In production code, a function longer
+  than ~30 non-comment lines is a signal to split it (tests and generated
+  code may be exceptions).
...
-- Flag any function that is hard to understand at a glance.
+- Flag any function that is hard to understand quickly due to mixed concerns,
+  deep nesting, or unclear naming.

As per coding guidelines, “confirm the doc is understandable by cluster administrators who aren’t Go developers.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/review_guidelines/go.md` around lines 5 - 9, Update the guidance text to
remove ambiguity by adding brief qualifiers: state that the "~30 lines"
guideline is directional (not a hard limit) and should exclude test helpers and
generated code; clarify that "each function should do one thing" allows short,
idiomatic anonymous functions (e.g., brief go func closures, inline callbacks
under ~10 lines) and utility lambdas, and add a note that reviewers should flag
only functions that are long/complex enough to harm readability or maintenance
for cluster administrators unfamiliar with Go; reference the existing bullets
about function length and anonymous functions so reviewers apply these
exceptions consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/review_guidelines/go.md`:
- Around line 5-9: Update the guidance text to remove ambiguity by adding brief
qualifiers: state that the "~30 lines" guideline is directional (not a hard
limit) and should exclude test helpers and generated code; clarify that "each
function should do one thing" allows short, idiomatic anonymous functions (e.g.,
brief go func closures, inline callbacks under ~10 lines) and utility lambdas,
and add a note that reviewers should flag only functions that are long/complex
enough to harm readability or maintenance for cluster administrators unfamiliar
with Go; reference the existing bullets about function length and anonymous
functions so reviewers apply these exceptions consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0bc8a7cc-a53a-4f10-a99d-d3aa82022445

📥 Commits

Reviewing files that changed from the base of the PR and between ac35d10 and ff70c50.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • docs/review_guidelines/dashboards.md
  • docs/review_guidelines/go.md
✅ Files skipped from review due to trivial changes (2)
  • docs/review_guidelines/dashboards.md
  • .coderabbit.yaml

and Perses dashboard review guidelines

Add Go review guidelines in
docs/review_guidelines/go.md to flag long
functions that should be split. Update
dashboard review guidelines with a Perses
section explaining that YAML files are
generated artifacts and should not be
reviewed for PromQL — review the Go builder
code instead.

Signed-off-by: Shirly Radco <sradco@redhat.com>
Co-authored-by: AI Assistant <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@sradco sradco force-pushed the coderabbit-review-instructions branch from ff70c50 to a79023d Compare May 25, 2026 08:06
@sradco
Copy link
Copy Markdown
Collaborator Author

sradco commented May 25, 2026

@avlitman update, please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants