Skip to content

📖 Add a development.md#1147

Merged
openshift-merge-bot[bot] merged 2 commits intoopen-cluster-management-io:mainfrom
qiujian16:dev-md
Sep 11, 2025
Merged

📖 Add a development.md#1147
openshift-merge-bot[bot] merged 2 commits intoopen-cluster-management-io:mainfrom
qiujian16:dev-md

Conversation

@qiujian16
Copy link
Member

@qiujian16 qiujian16 commented Aug 27, 2025

Summary

Related issue(s)

Fixes #

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive Development Guide covering environment setup, project structure, workflows, coding standards, testing (unit/integration/E2E), API update process, build/release, troubleshooting, and contributing.
    • Updated README to link to the Development Guide after Getting Started and include quick-start guidance.
    • Improves contributor onboarding; no runtime or public API changes.

@openshift-ci openshift-ci bot requested review from deads2k and jnpacker August 27, 2025 08:16
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16

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

@coderabbitai
Copy link

coderabbitai bot commented Aug 27, 2025

Warning

Rate limit exceeded

@qiujian16 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 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.

📥 Commits

Reviewing files that changed from the base of the PR and between be6d709 and 575b27e.

📒 Files selected for processing (1)
  • development.md (1 hunks)

Walkthrough

Adds a new development guide at development.md and updates README.md to link to and describe it. No code, API, or runtime behavior changes.

Changes

Cohort / File(s) Summary
Documentation
README.md, development.md
Added development.md containing a comprehensive development guide for contributors and tools; updated README.md to include a link and brief description pointing to the new guide.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • deads2k
  • jnpacker
  • mikeshng
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link

codecov bot commented Aug 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.20%. Comparing base (2657dd6) to head (575b27e).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1147   +/-   ##
=======================================
  Coverage   58.20%   58.20%           
=======================================
  Files         211      211           
  Lines       20791    20791           
=======================================
  Hits        12101    12101           
  Misses       7623     7623           
  Partials     1067     1067           
Flag Coverage Δ
unit 58.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

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

Actionable comments posted: 5

🧹 Nitpick comments (2)
development.md (2)

72-72: Add language to fenced code block (markdownlint MD040).

Apply this diff:

-```
+```text

79-80: Use proper “gRPC” capitalization.

Apply this diff:

-│   ├── server/            # GRPC server
+│   ├── server/            # gRPC server
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a9424bc and 1623d84.

📒 Files selected for processing (2)
  • README.md (1 hunks)
  • development.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
development.md

[grammar] ~7-~7: There might be a mistake here.
Context: ...# Table of Contents - Project Overview - [Development Environment Setup](#developm...

(QB_NEW_EN)


[grammar] ~8-~8: There might be a mistake here.
Context: ...erview) - Development Environment Setup - Code Organization -...

(QB_NEW_EN)


[grammar] ~9-~9: There might be a mistake here.
Context: ...-environment-setup) - Code Organization - [Development Workflow](#development-workf...

(QB_NEW_EN)


[grammar] ~10-~10: There might be a mistake here.
Context: ...de-organization) - Development Workflow - [Code Standards and Style](#code-standard...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...nt-workflow) - Code Standards and Style - Testing Guidelines...

(QB_NEW_EN)


[grammar] ~12-~12: There might be a mistake here.
Context: ...andards-and-style) - Testing Guidelines - API Development - [Bu...

(QB_NEW_EN)


[grammar] ~13-~13: There might be a mistake here.
Context: ...(#testing-guidelines) - API Development - Build and Release -...

(QB_NEW_EN)


[grammar] ~14-~14: There might be a mistake here.
Context: ...](#api-development) - Build and Release - Troubleshooting ## P...

(QB_NEW_EN)


[grammar] ~29-~29: There might be a mistake here.
Context: ...y Technologies - Language: Go 1.24+ - Framework: Kubernetes operators with c...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...rnetes operators with controller-runtime - Build System: Make with OpenShift buil...

(QB_NEW_EN)


[grammar] ~31-~31: There might be a mistake here.
Context: ...m**: Make with OpenShift build machinery - Testing: Ginkgo/Gomega for BDD-style t...

(QB_NEW_EN)


[grammar] ~32-~32: There might be a mistake here.
Context: ...ing**: Ginkgo/Gomega for BDD-style tests - Packaging: Helm charts and OLM bundles...

(QB_NEW_EN)


[grammar] ~39-~39: There might be a mistake here.
Context: ...tion guide](https://go.dev/doc/install)) - Docker or Podman (container engine) - [K...

(QB_NEW_EN)


[grammar] ~40-~40: There might be a mistake here.
Context: ...)) - Docker or Podman (container engine) - Kind (local ...

(QB_NEW_EN)


[grammar] ~41-~41: There might be a mistake here.
Context: ...igs.k8s.io/) (local Kubernetes clusters) - [kubectl](https://kubernetes.io/docs/task...

(QB_NEW_EN)


[grammar] ~42-~42: There might be a mistake here.
Context: ...s.io/docs/tasks/tools/) (Kubernetes CLI) - [clusteradm](https://github.com/open-clus...

(QB_NEW_EN)


[grammar] ~97-~97: There might be a mistake here.
Context: ...g/common/: Shared utilities and helpers - pkg/registration/hub/: Hub-side registration controllers - p...

(QB_NEW_EN)


[grammar] ~98-~98: There might be a mistake here.
Context: ...hub/: Hub-side registration controllers - pkg/registration/spoke/: Managed cluster registration logic - ...

(QB_NEW_EN)


[grammar] ~99-~99: There might be a mistake here.
Context: ...ke/: Managed cluster registration logic - pkg/work/hub/: Hub-side work distribution - pkg/work...

(QB_NEW_EN)


[grammar] ~100-~100: There might be a mistake here.
Context: ...g/work/hub/: Hub-side work distribution - pkg/work/spoke/: Managed cluster work application - pk...

(QB_NEW_EN)


[grammar] ~101-~101: There might be a mistake here.
Context: ...poke/: Managed cluster work application - pkg/placement/controllers/`: Placement scheduling and decision logi...

(QB_NEW_EN)


[grammar] ~103-~103: Ensure spelling is correct
Context: ...ision logic - pkg/addon/controllers/: Addon lifecycle management controllers ## De...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~155-~155: There might be a mistake here.
Context: ...nventions**: Use gofmt, go vet, and golangci-lint - Variable naming: Use camelCase for loc...

(QB_NEW_EN)


[grammar] ~163-~163: There might be a mistake here.
Context: ...ust be organized in the following order: 1. Standard library packages 2. Third-party...

(QB_NEW_EN)


[grammar] ~164-~164: There might be a mistake here.
Context: ...wing order: 1. Standard library packages 2. Third-party packages 3. OCM packages ...

(QB_NEW_EN)


[grammar] ~165-~165: There might be a mistake here.
Context: ...library packages 2. Third-party packages 3. OCM packages ```go import ( // Stan...

(QB_NEW_EN)


[grammar] ~250-~250: There might be a mistake here.
Context: ...n make test-e2e ``` E2E test variables: - IMAGE_TAG: Tag for container images (default: lat...

(QB_NEW_EN)


[grammar] ~251-~251: There might be a mistake here.
Context: ...g for container images (default: latest) - KLUSTERLET_DEPLOY_MODE: Deployment mode (Default, Singleton, S...

(QB_NEW_EN)


[grammar] ~252-~252: There might be a mistake here.
Context: ...de (Default, Singleton, SingletonHosted) - MANAGED_CLUSTER_NAME: Name of the managed cluster (default: ...

(QB_NEW_EN)


[grammar] ~253-~253: There might be a mistake here.
Context: ... the managed cluster (default: cluster1) - KUBECONFIG: Must be set to point to test cluster ...

(QB_NEW_EN)


[grammar] ~258-~258: There might be a mistake here.
Context: ... *_test.go files alongside source code - Integration tests: test/integration/...

(QB_NEW_EN)


[grammar] ~259-~259: There might be a mistake here.
Context: ...n tests**: test/integration/ directory - E2E tests: test/e2e/ directory - **T...

(QB_NEW_EN)


[grammar] ~260-~260: There might be a mistake here.
Context: ...y - E2E tests: test/e2e/ directory - Test utilities: test/framework/ and ...

(QB_NEW_EN)


[grammar] ~266-~266: There might be a mistake here.
Context: ...e test names using Describe, Context, and It - Use table-driven tests for multi...

(QB_NEW_EN)


[grammar] ~297-~297: There might be a mistake here.
Context: ... 4. Remove replace directive before submitting PR ### Update Process The `make updat...

(QB_NEW_EN)


[grammar] ~301-~301: There might be a mistake here.
Context: ...cess The make update command handles: - CRD copying from api repository - Helm c...

(QB_NEW_EN)


[grammar] ~390-~390: There might be a mistake here.
Context: ...unctionality 4. Run quality checks: make verify test-unit 5. Submit pull request with DCO sign-off ...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
development.md

72-72: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: verify
  • GitHub Check: integration
  • GitHub Check: build
  • GitHub Check: unit
🔇 Additional comments (3)
development.md (2)

188-200: All Makefile targets in development.md are valid

I’ve confirmed that every target listed under lines 188–200 of development.md exists in the Makefile:

  • verify – defined at Makefile line 108
  • verify-gocilint – defined at Makefile line 88
  • verify-fmt-imports – defined at Makefile line 98
  • verify-crds – defined at Makefile line 85
  • fmt-imports – defined at Makefile line 95

No documented targets are missing or renamed.


70-104: All referenced directories and links validated

All advertised directories (solutions/, cmd/, pkg/, manifests/, deploy/, test/, test/e2e, test/integration, cmd/addon, cmd/placement, cmd/registration, cmd/registration-operator, cmd/server) and the CONTRIBUTING.md file exist. The solutions/setup-dev-environment folder is present, and the README link to it is correct. No dead paths remain.

README.md (1)

105-106: LGTM — good discoverability improvement.

development.md Outdated
Comment on lines 157 to 158
- **Error handling**: Always handle errors explicitly, use `errors.Wrap()` for context
- **Comments**: Write clear comments for exported functions and complex logic
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Prefer stdlib error wrapping over pkg/errors.

Recommend fmt.Errorf with %w (and errors.Join) instead of errors.Wrap().

Apply this diff:

-- **Error handling**: Always handle errors explicitly, use `errors.Wrap()` for context
+- **Error handling**: Always handle errors explicitly; wrap with `fmt.Errorf("context: %w", err)` and use `errors.Join(...)` when aggregating errors
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Error handling**: Always handle errors explicitly, use `errors.Wrap()` for context
- **Comments**: Write clear comments for exported functions and complex logic
- **Error handling**: Always handle errors explicitly; wrap with `fmt.Errorf("context: %w", err)` and use `errors.Join(...)` when aggregating errors
- **Comments**: Write clear comments for exported functions and complex logic
🤖 Prompt for AI Agents
In development.md around lines 157 to 158, the guidance currently recommends
using errors.Wrap() from pkg/errors; update the text to prefer the Go standard
library error wrapping: use fmt.Errorf with %w for single wrapped errors and
errors.Join for combining multiple errors, and remove or deprecate mention of
errors.Wrap; also add a short note to update import guidance (use "fmt" and
"errors" from the stdlib) and a brief example suggestion showing
fmt.Errorf("context: %w", err) and errors.Join(err1, err2) for clarity.

Copy link

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
development.md (1)

39-44: Unify Go version (pinned vs. plus).

Key Technologies says Go 1.24.0, but Prerequisites says 1.24+. Align to the pinned version.

- - Go 1.24+ ([installation guide](https://go.dev/doc/install))
+ - Go 1.24.0 ([installation guide](https://go.dev/doc/install))
🧹 Nitpick comments (2)
development.md (2)

72-93: Add language hint to fenced block (markdownlint MD040).

Label the directory tree as text to satisfy markdownlint and improve rendering.

-```
+```text
 ...
-```
+```

300-305: Add an explicit “do not edit CRDs here” warning.

Per project practice, CRDs are generated from the api repo. Add a guard note to prevent accidental edits. (Using retrieved learnings from prior PRs.)

 The `make update` command handles:
 - CRD copying from api repository
 - Helm chart updates
 - Operator manifest generation
 - ClusterServiceVersion updates
+
+> Note: Do not edit CRDs under deploy/*/crds directly. Make schema changes in the
+> open-cluster-management-io/api repository, regenerate there, then run `make update`
+> in this repo to sync generated artifacts.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1623d84 and 1e3f705.

📒 Files selected for processing (1)
  • development.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-28T01:58:50.021Z
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:168-175
Timestamp: 2025-08-28T01:58:50.021Z
Learning: In the OCM project, CRD schemas come from the open-cluster-management.io/api dependency. Changes to CRD schemas should be made upstream in that API package, not in the local CRD YAML files which are generated/copied from the API types.

Applied to files:

  • development.md
🪛 LanguageTool
development.md

[grammar] ~7-~7: There might be a mistake here.
Context: ...# Table of Contents - Project Overview - [Development Environment Setup](#developm...

(QB_NEW_EN)


[grammar] ~8-~8: There might be a mistake here.
Context: ...erview) - Development Environment Setup - Code Organization -...

(QB_NEW_EN)


[grammar] ~9-~9: There might be a mistake here.
Context: ...-environment-setup) - Code Organization - [Development Workflow](#development-workf...

(QB_NEW_EN)


[grammar] ~10-~10: There might be a mistake here.
Context: ...de-organization) - Development Workflow - [Code Standards and Style](#code-standard...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...nt-workflow) - Code Standards and Style - Testing Guidelines...

(QB_NEW_EN)


[grammar] ~12-~12: There might be a mistake here.
Context: ...andards-and-style) - Testing Guidelines - API Development - [Bu...

(QB_NEW_EN)


[grammar] ~13-~13: There might be a mistake here.
Context: ...(#testing-guidelines) - API Development - Build and Release -...

(QB_NEW_EN)


[grammar] ~14-~14: There might be a mistake here.
Context: ...](#api-development) - Build and Release - Troubleshooting ## P...

(QB_NEW_EN)


[grammar] ~29-~29: There might be a mistake here.
Context: ... Technologies - Language: Go 1.24.0 - Framework: Kubernetes operators with c...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...rnetes operators with controller-runtime - Build System: Make with OpenShift buil...

(QB_NEW_EN)


[grammar] ~31-~31: There might be a mistake here.
Context: ...m**: Make with OpenShift build machinery - Testing: Ginkgo/Gomega for BDD-style t...

(QB_NEW_EN)


[grammar] ~32-~32: There might be a mistake here.
Context: ...ing**: Ginkgo/Gomega for BDD-style tests - Packaging: Helm charts and OLM bundles...

(QB_NEW_EN)


[grammar] ~39-~39: There might be a mistake here.
Context: ...tion guide](https://go.dev/doc/install)) - Docker or Podman (container engine) - [K...

(QB_NEW_EN)


[grammar] ~40-~40: There might be a mistake here.
Context: ...)) - Docker or Podman (container engine) - Kind (local ...

(QB_NEW_EN)


[grammar] ~41-~41: There might be a mistake here.
Context: ...igs.k8s.io/) (local Kubernetes clusters) - [kubectl](https://kubernetes.io/docs/task...

(QB_NEW_EN)


[grammar] ~42-~42: There might be a mistake here.
Context: ...s.io/docs/tasks/tools/) (Kubernetes CLI) - [clusteradm](https://github.com/open-clus...

(QB_NEW_EN)


[grammar] ~97-~97: There might be a mistake here.
Context: ...g/common/: Shared utilities and helpers - pkg/registration/hub/: Hub-side registration controllers - p...

(QB_NEW_EN)


[grammar] ~98-~98: There might be a mistake here.
Context: ...hub/: Hub-side registration controllers - pkg/registration/spoke/: Managed cluster registration logic - ...

(QB_NEW_EN)


[grammar] ~99-~99: There might be a mistake here.
Context: ...ke/: Managed cluster registration logic - pkg/work/hub/: Hub-side work distribution - pkg/work...

(QB_NEW_EN)


[grammar] ~100-~100: There might be a mistake here.
Context: ...g/work/hub/: Hub-side work distribution - pkg/work/spoke/: Managed cluster work application - pk...

(QB_NEW_EN)


[grammar] ~101-~101: There might be a mistake here.
Context: ...poke/: Managed cluster work application - pkg/placement/controllers/`: Placement scheduling and decision logi...

(QB_NEW_EN)


[grammar] ~103-~103: Ensure spelling is correct
Context: ...ision logic - pkg/addon/controllers/: Addon lifecycle management controllers ## De...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~155-~155: There might be a mistake here.
Context: ...nventions**: Use gofmt, go vet, and golangci-lint - Variable naming: Use camelCase for loc...

(QB_NEW_EN)


[grammar] ~162-~162: There might be a mistake here.
Context: ...ust be organized in the following order: 1. Standard library packages 2. Third-party...

(QB_NEW_EN)


[grammar] ~163-~163: There might be a mistake here.
Context: ...wing order: 1. Standard library packages 2. Third-party packages 3. OCM packages ...

(QB_NEW_EN)


[grammar] ~164-~164: There might be a mistake here.
Context: ...library packages 2. Third-party packages 3. OCM packages ```go import ( // Stan...

(QB_NEW_EN)


[grammar] ~249-~249: There might be a mistake here.
Context: ...n make test-e2e ``` E2E test variables: - IMAGE_TAG: Tag for container images (default: lat...

(QB_NEW_EN)


[grammar] ~250-~250: There might be a mistake here.
Context: ...g for container images (default: latest) - KLUSTERLET_DEPLOY_MODE: Deployment mode (Default, Singleton, S...

(QB_NEW_EN)


[grammar] ~251-~251: There might be a mistake here.
Context: ...de (Default, Singleton, SingletonHosted) - MANAGED_CLUSTER_NAME: Name of the managed cluster (default: ...

(QB_NEW_EN)


[grammar] ~252-~252: There might be a mistake here.
Context: ... the managed cluster (default: cluster1) - KUBECONFIG: Must be set to point to test cluster ...

(QB_NEW_EN)


[grammar] ~257-~257: There might be a mistake here.
Context: ... *_test.go files alongside source code - Integration tests: test/integration/...

(QB_NEW_EN)


[grammar] ~258-~258: There might be a mistake here.
Context: ...n tests**: test/integration/ directory - E2E tests: test/e2e/ directory - **T...

(QB_NEW_EN)


[grammar] ~259-~259: There might be a mistake here.
Context: ...y - E2E tests: test/e2e/ directory - Test utilities: test/framework/ and ...

(QB_NEW_EN)


[grammar] ~265-~265: There might be a mistake here.
Context: ...e test names using Describe, Context, and It - Use table-driven tests for multi...

(QB_NEW_EN)


[grammar] ~296-~296: There might be a mistake here.
Context: ... 4. Remove replace directive before submitting PR ### Update Process The `make updat...

(QB_NEW_EN)


[grammar] ~300-~300: There might be a mistake here.
Context: ...cess The make update command handles: - CRD copying from api repository - Helm c...

(QB_NEW_EN)


[grammar] ~389-~389: There might be a mistake here.
Context: ...unctionality 4. Run quality checks: make verify test-unit 5. Submit pull request with DCO sign-off ...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
development.md

72-72: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: unit
  • GitHub Check: build
  • GitHub Check: integration
  • GitHub Check: verify
🔇 Additional comments (3)
development.md (3)

241-247: Nice: updated kind kubeconfig flow matches current kind behavior.

The deprecated get kubeconfig-path is replaced correctly with writing kubeconfig to a file and exporting KUBECONFIG.


70-93: No changes needed: code organization tree accurately reflects repository directories.
All listed paths (cmd/*, pkg/*, manifests, deploy, test/*, solutions) exist in the repo.


189-199: Makefile target names in development.md are correct; no updates needed

Signed-off-by: Jian Qiu <jqiu@redhat.com>
Copy link

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
development.md (2)

54-56: Pin clusteradm to a release tag; avoid “main” and “latest”

Use a concrete tag for reproducibility and replace bundle-version “latest” with an explicit version.

-   curl -fsSL https://raw.githubusercontent.com/open-cluster-management-io/clusteradm/main/hack/install.sh | bash
-   clusteradm init --wait --bundle-version="latest"
+   # Replace <TAG> with a concrete release (e.g., vX.Y.Z)
+   curl -fsSL https://raw.githubusercontent.com/open-cluster-management-io/clusteradm/<TAG>/hack/install.sh | bash
+   clusteradm init --wait --bundle-version="<BUNDLE_VERSION>"
-   clusteradm join --hub-token <token> --hub-apiserver <url> --wait --cluster-name cluster1 --force-internal-endpoint-lookup --bundle-version="latest"
+   clusteradm join --hub-token <token> --hub-apiserver <url> --wait --cluster-name cluster1 --force-internal-endpoint-lookup --bundle-version="<BUNDLE_VERSION>"

Also applies to: 60-62


29-39: Unify Go version: pin to one exact value

You list Go 1.24.0 (Line 29) but “Go 1.24+” (Line 39). Please make them consistent and pinned to the exact version to match go.mod/CI.

Apply:

- - Go 1.24+ ([installation guide](https://go.dev/doc/install))
+ - Go 1.24.0 ([installation guide](https://go.dev/doc/install))
🧹 Nitpick comments (4)
development.md (4)

168-183: Avoid import name collision with stdlib errors

Importing k8s API errors unaliased conflicts with the stdlib “errors” in examples. Alias to apierrors to set good precedent.

-    "k8s.io/apimachinery/pkg/api/errors"
+    apierrors "k8s.io/apimachinery/pkg/api/errors"

72-93: Add language to fenced code block (markdownlint MD040)

Specify a language for the directory tree to satisfy linters.

-```
+```text
 ...

---

`241-247`: **Add kind cluster creation step for E2E section**

You export kubeconfig for “ocm-e2e” without showing its creation. Add the create step to avoid confusion.


```diff
 ```bash
-# 1. Create kind cluster and set KUBECONFIG
-kind get kubeconfig --name ocm-e2e > /tmp/kubeconfig-ocm-e2e
+# 1. Create kind cluster and set KUBECONFIG
+kind create cluster --name ocm-e2e
+kind get kubeconfig --name ocm-e2e > /tmp/kubeconfig-ocm-e2e
 export KUBECONFIG=/tmp/kubeconfig-ocm-e2e

300-305: Call out: don’t edit CRD YAMLs here; update API repo instead

Reinforce that CRDs are generated from open-cluster-management.io/api, aligning with project practice.

 The `make update` command handles:
 - CRD copying from api repository
 - Helm chart updates
 - Operator manifest generation
 - ClusterServiceVersion updates
+> Note: Do not edit CRD YAMLs in this repo directly. Make schema changes in
+> the open-cluster-management.io/api repository, run its generators, then
+> update this repo via `make update`.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1e3f705 and be6d709.

📒 Files selected for processing (2)
  • README.md (1 hunks)
  • development.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • README.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-28T01:58:50.021Z
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:168-175
Timestamp: 2025-08-28T01:58:50.021Z
Learning: In the OCM project, CRD schemas come from the open-cluster-management.io/api dependency. Changes to CRD schemas should be made upstream in that API package, not in the local CRD YAML files which are generated/copied from the API types.

Applied to files:

  • development.md
🪛 LanguageTool
development.md

[grammar] ~7-~7: There might be a mistake here.
Context: ...# Table of Contents - Project Overview - [Development Environment Setup](#developm...

(QB_NEW_EN)


[grammar] ~8-~8: There might be a mistake here.
Context: ...erview) - Development Environment Setup - Code Organization -...

(QB_NEW_EN)


[grammar] ~9-~9: There might be a mistake here.
Context: ...-environment-setup) - Code Organization - [Development Workflow](#development-workf...

(QB_NEW_EN)


[grammar] ~10-~10: There might be a mistake here.
Context: ...de-organization) - Development Workflow - [Code Standards and Style](#code-standard...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...nt-workflow) - Code Standards and Style - Testing Guidelines...

(QB_NEW_EN)


[grammar] ~12-~12: There might be a mistake here.
Context: ...andards-and-style) - Testing Guidelines - API Development - [Bu...

(QB_NEW_EN)


[grammar] ~13-~13: There might be a mistake here.
Context: ...(#testing-guidelines) - API Development - Build and Release -...

(QB_NEW_EN)


[grammar] ~14-~14: There might be a mistake here.
Context: ...](#api-development) - Build and Release - Troubleshooting ## P...

(QB_NEW_EN)


[grammar] ~29-~29: There might be a mistake here.
Context: ... Technologies - Language: Go 1.24.0 - Framework: Kubernetes operators with c...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...rnetes operators with controller-runtime - Build System: Make with OpenShift buil...

(QB_NEW_EN)


[grammar] ~31-~31: There might be a mistake here.
Context: ...m**: Make with OpenShift build machinery - Testing: Ginkgo/Gomega for BDD-style t...

(QB_NEW_EN)


[grammar] ~32-~32: There might be a mistake here.
Context: ...ing**: Ginkgo/Gomega for BDD-style tests - Packaging: Helm charts and OLM bundles...

(QB_NEW_EN)


[grammar] ~39-~39: There might be a mistake here.
Context: ...tion guide](https://go.dev/doc/install)) - Docker or Podman (container engine) - [K...

(QB_NEW_EN)


[grammar] ~40-~40: There might be a mistake here.
Context: ...)) - Docker or Podman (container engine) - Kind (local ...

(QB_NEW_EN)


[grammar] ~41-~41: There might be a mistake here.
Context: ...igs.k8s.io/) (local Kubernetes clusters) - [kubectl](https://kubernetes.io/docs/task...

(QB_NEW_EN)


[grammar] ~42-~42: There might be a mistake here.
Context: ...s.io/docs/tasks/tools/) (Kubernetes CLI) - [clusteradm](https://github.com/open-clus...

(QB_NEW_EN)


[grammar] ~97-~97: There might be a mistake here.
Context: ...g/common/: Shared utilities and helpers - pkg/registration/hub/: Hub-side registration controllers - p...

(QB_NEW_EN)


[grammar] ~98-~98: There might be a mistake here.
Context: ...hub/: Hub-side registration controllers - pkg/registration/spoke/: Managed cluster registration logic - ...

(QB_NEW_EN)


[grammar] ~99-~99: There might be a mistake here.
Context: ...ke/: Managed cluster registration logic - pkg/work/hub/: Hub-side work distribution - pkg/work...

(QB_NEW_EN)


[grammar] ~100-~100: There might be a mistake here.
Context: ...g/work/hub/: Hub-side work distribution - pkg/work/spoke/: Managed cluster work application - pk...

(QB_NEW_EN)


[grammar] ~101-~101: There might be a mistake here.
Context: ...poke/: Managed cluster work application - pkg/placement/controllers/`: Placement scheduling and decision logi...

(QB_NEW_EN)


[grammar] ~103-~103: Ensure spelling is correct
Context: ...ision logic - pkg/addon/controllers/: Addon lifecycle management controllers ## De...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~155-~155: There might be a mistake here.
Context: ...nventions**: Use gofmt, go vet, and golangci-lint - Variable naming: Use camelCase for loc...

(QB_NEW_EN)


[grammar] ~162-~162: There might be a mistake here.
Context: ...ust be organized in the following order: 1. Standard library packages 2. Third-party...

(QB_NEW_EN)


[grammar] ~163-~163: There might be a mistake here.
Context: ...wing order: 1. Standard library packages 2. Third-party packages 3. OCM packages ...

(QB_NEW_EN)


[grammar] ~164-~164: There might be a mistake here.
Context: ...library packages 2. Third-party packages 3. OCM packages ```go import ( // Stan...

(QB_NEW_EN)


[grammar] ~249-~249: There might be a mistake here.
Context: ...n make test-e2e ``` E2E test variables: - IMAGE_TAG: Tag for container images (default: lat...

(QB_NEW_EN)


[grammar] ~250-~250: There might be a mistake here.
Context: ...g for container images (default: latest) - KLUSTERLET_DEPLOY_MODE: Deployment mode (Default, Singleton, S...

(QB_NEW_EN)


[grammar] ~251-~251: There might be a mistake here.
Context: ...de (Default, Singleton, SingletonHosted) - MANAGED_CLUSTER_NAME: Name of the managed cluster (default: ...

(QB_NEW_EN)


[grammar] ~252-~252: There might be a mistake here.
Context: ... the managed cluster (default: cluster1) - KUBECONFIG: Must be set to point to test cluster ...

(QB_NEW_EN)


[grammar] ~257-~257: There might be a mistake here.
Context: ... *_test.go files alongside source code - Integration tests: test/integration/...

(QB_NEW_EN)


[grammar] ~258-~258: There might be a mistake here.
Context: ...n tests**: test/integration/ directory - E2E tests: test/e2e/ directory - **T...

(QB_NEW_EN)


[grammar] ~259-~259: There might be a mistake here.
Context: ...y - E2E tests: test/e2e/ directory - Test utilities: test/framework/ and ...

(QB_NEW_EN)


[grammar] ~265-~265: There might be a mistake here.
Context: ...e test names using Describe, Context, and It - Use table-driven tests for multi...

(QB_NEW_EN)


[grammar] ~296-~296: There might be a mistake here.
Context: ... 4. Remove replace directive before submitting PR ### Update Process The `make updat...

(QB_NEW_EN)


[grammar] ~300-~300: There might be a mistake here.
Context: ...cess The make update command handles: - CRD copying from api repository - Helm c...

(QB_NEW_EN)


[grammar] ~389-~389: There might be a mistake here.
Context: ...unctionality 4. Run quality checks: make verify test-unit 5. Submit pull request with DCO sign-off ...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
development.md

72-72: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: integration
  • GitHub Check: unit
  • GitHub Check: verify
  • GitHub Check: build
🔇 Additional comments (1)
development.md (1)

189-198: All referenced Make targets exist
Confirmed that the Makefile defines verify-crds, verify-gocilint, verify-fmt-imports, and fmt-imports targets.

Signed-off-by: Jian Qiu <jqiu@redhat.com>
@elgnay
Copy link
Contributor

elgnay commented Sep 4, 2025

LGTM

@elgnay
Copy link
Contributor

elgnay commented Sep 11, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Sep 11, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit e4530ee into open-cluster-management-io:main Sep 11, 2025
21 checks passed
@qiujian16 qiujian16 deleted the dev-md branch September 11, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants