Skip to content

NO-JIRA: Add CodeRabbit config to exclude autogenerated files - #7905

Merged
enxebre merged 3 commits into
openshift:mainfrom
enxebre:coderabbit-config
Mar 10, 2026
Merged

NO-JIRA: Add CodeRabbit config to exclude autogenerated files#7905
enxebre merged 3 commits into
openshift:mainfrom
enxebre:coderabbit-config

Conversation

@enxebre

@enxebre enxebre commented Mar 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a .coderabbit.yaml configuration file modeled after openshift/api's config
  • Excludes all autogenerated files from CodeRabbit code reviews to reduce noise and focus reviews on human-written code
  • Excluded patterns include:
    • vendor/ and api/vendor/ directories
    • zz_generated* files (deepcopy, CRD manifests, swagger docs, etc.)
    • client/ directory (generated clientsets, informers, listers)
    • cmd/install/assets/**/*.yaml (generated CRD install assets)
    • karpenter-operator/controllers/karpenter/assets/*.yaml (generated Karpenter CRDs)
    • *_mock.go files (mockgen generated)
    • *.pb.go / *.pb.gw.go / generated.proto (protobuf generated)
    • docs/content/reference/api.md and aggregated-docs.md (generated API docs)
    • cmd/infra/aws/delegating_client.go (generated delegating client)
    • *_string.go files (stringer generated)

Test plan

  • Verify CodeRabbit picks up the config on subsequent PRs
  • Confirm autogenerated files are no longer reviewed by CodeRabbit

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added configuration file to establish code review automation settings and exclude certain file types from analysis.

Adds a .coderabbit.yaml configuration file that excludes all
autogenerated files from CodeRabbit code reviews. This includes
vendor directories, generated deepcopy/CRD/client/mock/protobuf
files, generated API docs, and other mechanically produced code
that is not suitable for automated review.

Modeled after openshift/api's .coderabbit.yaml configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci-robot

Copy link
Copy Markdown

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro

Run ID: db62669e-ec64-4198-9dbf-12a0277128e2

📥 Commits

Reviewing files that changed from the base of the PR and between 5ed331f and 86c2351.

📒 Files selected for processing (1)
  • .coderabbit.yaml

📝 Walkthrough

Walkthrough

A new .coderabbit.yaml configuration file is added to define code-review automation. It configures inheritance, a "chill" review profile with toggles for summaries, walkthroughs, and statuses, extensive path_filters to exclude generated/vendor/mocks/clients/protobufs/CRDs/docs/testdata and related files, enables golangci-lint and gitleaks as tools, and configures a knowledge_base with code_guidelines (targeting AGENTS.md and related files) plus a local learnings scope.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding a CodeRabbit configuration file to exclude autogenerated files from reviews.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed Pull request only modifies .coderabbit.yaml configuration file with no Ginkgo test code patterns present.
Test Structure And Quality ✅ Passed The PR only introduces a .coderabbit.yaml configuration file with no Ginkgo test code, making this check not applicable to the PR's scope.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@enxebre enxebre changed the title Add CodeRabbit config to exclude autogenerated files NO-JIRA: Add CodeRabbit config to exclude autogenerated files Mar 10, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@enxebre: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

  • Adds a .coderabbit.yaml configuration file modeled after openshift/api's config
  • Excludes all autogenerated files from CodeRabbit code reviews to reduce noise and focus reviews on human-written code
  • Excluded patterns include:
  • vendor/ and api/vendor/ directories
  • zz_generated* files (deepcopy, CRD manifests, swagger docs, etc.)
  • client/ directory (generated clientsets, informers, listers)
  • cmd/install/assets/**/*.yaml (generated CRD install assets)
  • karpenter-operator/controllers/karpenter/assets/*.yaml (generated Karpenter CRDs)
  • *_mock.go files (mockgen generated)
  • *.pb.go / *.pb.gw.go / generated.proto (protobuf generated)
  • docs/content/reference/api.md and aggregated-docs.md (generated API docs)
  • cmd/infra/aws/delegating_client.go (generated delegating client)
  • *_string.go files (stringer generated)

Test plan

  • Verify CodeRabbit picks up the config on subsequent PRs
  • Confirm autogenerated files are no longer reviewed by CodeRabbit

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested review from jparrill and sjenning March 10, 2026 12:39
@openshift-ci

openshift-ci Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.coderabbit.yaml:
- Around line 14-54: The path_filters entry "!client/**" excludes the client
package from sparse-checkout which breaks tooling and linting for files
importing client packages; remove or modify the "!client/**" filter in the
path_filters section so CodeRabbit and golangci-lint can fetch client/**, or
alternatively refactor the callers in test/integration/, hypershift-operator/,
control-plane-operator/, and control-plane-pki-operator/ to stop importing
client packages (clientsets, informers, apply configurations) so the exclusion
is safe; update the .coderabbit.yaml tools.golangci-lint settings only after
ensuring the client/** dependency is either included or eliminated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 8477d4b2-c12d-4604-8f5a-4f681dd06ed1

📥 Commits

Reviewing files that changed from the base of the PR and between 08198a1 and 5ed331f.

📒 Files selected for processing (1)
  • .coderabbit.yaml

Comment thread .coderabbit.yaml
@muraee

muraee commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

missing exclusion for test textures under /testdata

Comment thread .coderabbit.yaml Outdated
language: en-US
reviews:
profile: chill
high_level_summary: false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we not find value in this?

Comment thread .coderabbit.yaml Outdated
profile: chill
high_level_summary: false
review_status: true
commit_status: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This and line 8 default to true already.

Comment thread .coderabbit.yaml Outdated
commit_status: true
collapse_walkthrough: true
changed_files_summary: false
sequence_diagrams: false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we not find value in this?

Comment thread .coderabbit.yaml

# Generated stringer files
- "!**/*_string.go"
tools:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should add gitleaks

Comment thread .coderabbit.yaml
knowledge_base:
code_guidelines:
enabled: true
filePatterns:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we not want to include the hypershift sme files here too?

@bryan-cox

Copy link
Copy Markdown
Member

/area ci-tooling

@openshift-ci openshift-ci Bot added area/ci-tooling Indicates the PR includes changes for CI or tooling and removed do-not-merge/needs-area labels Mar 10, 2026
- Enable high_level_summary and sequence_diagrams
- Remove review_status and commit_status (already default to true)
- Add gitleaks tool
- Include .claude/agents/*.md and .cursor/rules/*.mdc in
  knowledge_base code guidelines filePatterns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@enxebre

enxebre commented Mar 10, 2026

Copy link
Copy Markdown
Member Author

/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Mar 10, 2026
Test fixture files under testdata/ are not meaningful to review
as they are static test inputs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bryan-cox

Copy link
Copy Markdown
Member

/lgtm
/verified bypass

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: The verified label has been added.

Details

In response to this:

/lgtm
/verified bypass

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@enxebre
enxebre merged commit cc479bc into openshift:main Mar 10, 2026
17 of 21 checks passed
@openshift-ci

openshift-ci Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

@enxebre: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aks 86c2351 link true /test e2e-aks

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ci-tooling Indicates the PR includes changes for CI or tooling jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants