Skip to content

Add CodeRabbit configuration to scope automated PR reviews - #2804

Open
karthikvetrivel wants to merge 1 commit into
NVIDIA:mainfrom
karthikvetrivel:add-coderabbit-config
Open

Add CodeRabbit configuration to scope automated PR reviews#2804
karthikvetrivel wants to merge 1 commit into
NVIDIA:mainfrom
karthikvetrivel:add-coderabbit-config

Conversation

@karthikvetrivel

@karthikvetrivel karthikvetrivel commented Aug 25, 2026

Copy link
Copy Markdown
Member

Description

I added a .coderabbit.yaml so that CodeRabbit reviews this repo usefully.

Two things about this repo would make a default install noisy.

  • Roughly half of all pull requests are machine generated by Dependabot, Renovate, and the cherry-pick workflow.
  • Vendored and generated files also make up about 90% of tracked files.

The config addresses both:

  • It uses the quiet profile, so only critical and major findings are posted inline.
  • It skips pull requests authored by dependabot[bot] and github-actions[bot]. A backport only replays commits that were already reviewed on main.
  • It filters vendor/, generated deepcopy and clientset code, the CRD copies that make sync-crds produces, and the intentionally malformed fixtures under testdata/.
  • It disables golangci-lint, which CI already runs with our own config, and yamllint, which cannot parse our Helm and Go templates.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint)
  • Generated assets in-sync (make validate-generated-assets)
  • Go mod artifacts in-sync (make validate-modules)
  • Test cases are added for new code paths

Testing

This change adds no Go code, so there are no new code paths to cover and no Go artifacts to regenerate.

Signed-off-by: Karthik Vetrivel <kvetrivel@nvidia.com>

@rajathagasthya rajathagasthya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Added some suggestions.

Comment thread .coderabbit.yaml

# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

tone_instructions: "Be direct, technical and brief. No praise or emoji. Skip style and formatting, which CI already gates. Without evidence in the diff, ask a question rather than assert a defect."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
tone_instructions: "Be direct, technical and brief. No praise or emoji. Skip style and formatting, which CI already gates. Without evidence in the diff, ask a question rather than assert a defect."
tone_instructions: "Be direct, technical and brief. No praise or emoji. Skip style and formatting, which CI already gates. Without evidence in the diff, ask a question rather than assert a defect. Name the concrete failure each finding prevents."

Comment thread .coderabbit.yaml
Comment on lines +120 to +122
Flag assertions that would still pass if the behaviour under test were
broken, and new operand or CRD behaviour that ships with no regression
test. Do not ask for tests covering generated or vendored code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Flag assertions that would still pass if the behaviour under test were
broken, and new operand or CRD behaviour that ships with no regression
test. Do not ask for tests covering generated or vendored code.
Flag assertions that would still pass if the behavior under test were
broken, and new operand or CRD behaviour that ships with no regression
test. Flag tests that mirror the implementation instead of checking
behavior — the expected value is computed the same way as the code
under test, or the test only checks that a mock was called. These break
on refactors without catching bugs.
Do not ask for tests covering generated or vendored code.

Comment thread .coderabbit.yaml
Comment on lines +90 to +96
ClusterPolicy, GPUCluster and NVIDIADriver are released CRDs that users
have already applied. Treat as major any removed or renamed field,
narrowed +kubebuilder:validation, changed +kubebuilder:default, or
changed Go type: each breaks existing custom resources on upgrade.
New fields must be optional and carry omitempty.
Editing these types requires regenerating the deepcopy and CRD assets,
so say so if the PR does not also update them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
ClusterPolicy, GPUCluster and NVIDIADriver are released CRDs that users
have already applied. Treat as major any removed or renamed field,
narrowed +kubebuilder:validation, changed +kubebuilder:default, or
changed Go type: each breaks existing custom resources on upgrade.
New fields must be optional and carry omitempty.
Editing these types requires regenerating the deepcopy and CRD assets,
so say so if the PR does not also update them.
ClusterPolicy, GPUCluster and NVIDIADriver are released CRDs that users
have already applied. Treat as major any removed or renamed field or
json tag, a field made required, narrowed +kubebuilder:validation,
changed +kubebuilder:default, or changed Go type: each breaks existing
custom resources on upgrade.
New fields must be optional and carry omitempty.
Every new field is permanent API surface that must be supported across
upgrades. Ask for justification when a new field duplicates an existing
knob, could be derived from existing fields, or configures an
implementation detail that could live in a ConfigMap or annotation
instead. Spec holds user intent; status holds observed state; reject
fields that blur that line.
Editing these types requires regenerating the deepcopy and CRD assets,
so say so if the PR does not also update them.

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.

3 participants