|
| 1 | +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json |
| 2 | +# CodeRabbit — OpenShift Lightspeed Operator |
| 3 | +# Docs: https://docs.coderabbit.ai/guides/configure-coderabbit |
| 4 | +language: en-US |
| 5 | + |
| 6 | +reviews: |
| 7 | + profile: chill |
| 8 | + |
| 9 | + auto_review: |
| 10 | + enabled: true |
| 11 | + drafts: false |
| 12 | + base_branches: |
| 13 | + - main |
| 14 | + ignore_title_keywords: |
| 15 | + - WIP |
| 16 | + - DO NOT MERGE |
| 17 | + |
| 18 | + # Skip generated, snapshot, and mechanical paths (review source + hand-edited OLM instead) |
| 19 | + path_filters: |
| 20 | + - '!**/zz_generated.deepcopy.go' |
| 21 | + - '!config/crd/bases/**' |
| 22 | + - '!bundle/manifests/ols.openshift.io_olsconfigs.yaml' |
| 23 | + - '!config/rbac/role.yaml' |
| 24 | + - '!go.sum' |
| 25 | + - '!api/go.sum' |
| 26 | + - '!vendor/**' |
| 27 | + - '!bin/**' |
| 28 | + - '!cover.out' |
| 29 | + - '!**/*.log' |
| 30 | + - '!lightspeed-catalog-4.*/**' |
| 31 | + - '!lightspeed-catalog-4.*.Dockerfile' |
| 32 | + - '!lightspeed-catalog.Dockerfile' |
| 33 | + - '!related_images.json' |
| 34 | + - '!hack/boilerplate.go.txt' |
| 35 | + |
| 36 | + path_instructions: |
| 37 | + - path: 'api/v1alpha1/**/*.go' |
| 38 | + instructions: | |
| 39 | + - API changes drive CRD/bundle regeneration (`make generate`, `make manifests`, `make bundle`); flag if only generated YAML changed without matching API edits. |
| 40 | + - Preserve backward compatibility for cluster-scoped OLSConfig: avoid breaking existing fields without a clear migration path. |
| 41 | + - kubebuilder markers, validation, and defaulting must stay consistent with controller behavior in `internal/controller/`. |
| 42 | + - path: 'cmd/**/*.go' |
| 43 | + instructions: | |
| 44 | + - Treat manager flags, controller-runtime wiring, and health/metrics endpoints as high-signal areas. |
| 45 | + - New flags should be reflected in deployment/CSV args under `config/manager/` and `bundle/manifests/` when they affect the shipped operator. |
| 46 | + - path: 'internal/controller/**/*.go' |
| 47 | + instructions: | |
| 48 | + - Follow the ReconcileTask pattern and `reconciler.Reconciler` interface; avoid circular imports between component packages. |
| 49 | + - Wrap errors with shared constants from `internal/controller/utils/errors.go` using `fmt.Errorf("%s: %w", ErrX, err)`. |
| 50 | + - Distinguish owned resources (controller-runtime ownership) vs external resources (watchers in `internal/controller/watchers/`). |
| 51 | + - Keep component packages focused (appserver, postgres, console); do not reintroduce removed alternate backends without an explicit product decision. |
| 52 | + - path: 'internal/controller/**/*_test.go' |
| 53 | + instructions: | |
| 54 | + - Use Ginkgo v2 and Gomega; prefer envtest patterns from `internal/controller/suite_test.go` and `utils/testing.go`. |
| 55 | + - Contributors run `make test`, not bare `go test` — flag tests that skip Makefile/envtest setup assumptions. |
| 56 | + - Reject tests that only mirror implementation without asserting behavior or reconciliation outcomes. |
| 57 | + - path: 'test/e2e/**/*.go' |
| 58 | + instructions: | |
| 59 | + - E2E tests require a cluster; check helpers in `test/e2e/` for consistency and stable cleanup (OLSConfig finalizers, namespaces). |
| 60 | + - Flag flaky timing, missing teardown, or assumptions about optional components not deployed in bundle/operator CI jobs. |
| 61 | + - path: 'bundle/manifests/lightspeed-operator.clusterserviceversion.yaml' |
| 62 | + instructions: | |
| 63 | + - CSV changes affect OLM install: relatedImages, deployment args, permissions, and version must align with `related_images.json` and `cmd/main.go` flags. |
| 64 | + - Version bumps must match `bundle.Dockerfile` labels per AGENTS.md. |
| 65 | + - path: 'config/manager/**' |
| 66 | + instructions: | |
| 67 | + - Kustomize manager deployment must stay aligned with operator flags and image references used in the bundle. |
| 68 | + - path: '**/*.md' |
| 69 | + instructions: | |
| 70 | + - Cross-check commands and architecture descriptions against AGENTS.md, ARCHITECTURE.md, and CONTRIBUTING.md. |
| 71 | + - Flag stale paths (e.g. removed packages) or docs that contradict the current reconciliation flow. |
| 72 | +
|
| 73 | + collapse_walkthrough: true |
| 74 | + poem: false |
| 75 | + high_level_summary: true |
| 76 | + review_status: true |
| 77 | + commit_status: true |
| 78 | + sequence_diagrams: true |
| 79 | + suggested_labels: false |
| 80 | + |
| 81 | + tools: |
| 82 | + golangci-lint: |
| 83 | + enabled: true |
| 84 | + config_file: .golangci.yaml |
| 85 | + gitleaks: |
| 86 | + enabled: true |
| 87 | + |
| 88 | +chat: |
| 89 | + auto_reply: false |
| 90 | + |
| 91 | +knowledge_base: |
| 92 | + code_guidelines: |
| 93 | + enabled: true |
| 94 | + filePatterns: |
| 95 | + - AGENTS.md |
| 96 | + - ARCHITECTURE.md |
| 97 | + - CONTRIBUTING.md |
| 98 | + learnings: |
| 99 | + scope: local |
0 commit comments