-
Notifications
You must be signed in to change notification settings - Fork 15
docs(module-controller): enhance local development debugging instruct… #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ions Added detailed steps for remote debugging with minikube, including building a debug image, applying deployments, and configuring IDE for remote debugging. Improved clarity and structure of the documentation for better user guidance.
WalkthroughThe documentation for local development and testing was updated in both English and Chinese. The changes add comprehensive, step-by-step instructions for remote debugging the ModuleController component using minikube, including building a debug Docker image, deploying it, configuring port-forwarding, and setting up a VSCode debugging session. Minor formatting improvements were also made. Additionally, the previous "how to debug" section was removed from the ModuleController V2 design documents in both languages. Changes
Possibly related PRs
Suggested reviewers
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Nitpick comments (5)
content/zh-cn/docs/contribution-guidelines/contribution/local-dev-test.md (3)
77-78
: Consistent capitalisation of “IDE”
ide
should be upper-case for consistency with the rest of the document.-5. 在 ide 打断点后运行调试,看看程序是否成功在断点处暂停。 +5. 在 IDE 打断点后运行调试,查看程序是否成功在断点处暂停。
81-83
: Add language identifier to fenced code block (markdown-lint MD040)
Specify the language so syntax highlighting & linters work.-``` +```bash make minikube-debug--- `10-10`: **Refine introductory phrase per LanguageTool hint** Placing “关于…” mid-sentence is awkward in Chinese technical writing. Consider the recommended alternative. ```diff -无需其它的环境准备工作。<br />关于代码提交细节请参考: +无需其它的环境准备工作。<br />对于代码提交细节,请参考:
content/en/docs/contribution-guidelines/contribution/local-dev-test.md (2)
29-29
: Tighten wording (“exactly the same”)
Trim the verbosity for cleaner prose.-The development approach for module-controller is exactly the same as the standard K8S Operator development approach. +The development approach for module-controller is the same as the standard K8S Operator development approach.
81-83
: Missing language identifier on fenced block (markdown-lint MD040)
Addbash
to enable syntax highlighting.-``` +```bash make minikube-debug</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between da74a21370cdffab0bf24e150f9e1a155288b9cd and 9df6865caec97c1ec233b7987bb66f54c4f871a0. </details> <details> <summary>📒 Files selected for processing (2)</summary> * `content/en/docs/contribution-guidelines/contribution/local-dev-test.md` (1 hunks) * `content/zh-cn/docs/contribution-guidelines/contribution/local-dev-test.md` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🪛 LanguageTool</summary> <details> <summary>content/zh-cn/docs/contribution-guidelines/contribution/local-dev-test.md</summary> [uncategorized] ~10-~10: “关于”组成的介词短语必需位于句首,或请改用"对于"代替。 Context: ....6 及以上版本即可正常开发代码和单元测试,无需其它的环境准备工作。<br />关于代码提交细节请参考:[完成第一次 PR 提交](/docs/contributi... (wb2) </details> <details> <summary>content/en/docs/contribution-guidelines/contribution/local-dev-test.md</summary> [style] ~29-~29: ‘exactly the same’ might be wordy. Consider a shorter alternative. Context: ...pment approach for module-controller is exactly the same as the standard K8S Operator developmen... (EN_WORDINESS_PREMIUM_EXACTLY_THE_SAME) </details> </details> <details> <summary>🪛 markdownlint-cli2 (0.17.2)</summary> <details> <summary>content/zh-cn/docs/contribution-guidelines/contribution/local-dev-test.md</summary> 81-81: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> <details> <summary>content/en/docs/contribution-guidelines/contribution/local-dev-test.md</summary> 81-81: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> </details> </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
content/zh-cn/docs/contribution-guidelines/contribution/local-dev-test.md
Outdated
Show resolved
Hide resolved
…uctions Enhance the debugging section for module-controller in both English and Chinese documentation. Added commands for building, deploying, and debugging with minikube, and clarified steps for using pre-built images and IDE configurations.
There was a problem hiding this 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
🧹 Nitpick comments (4)
content/zh-cn/docs/contribution-guidelines/contribution/local-dev-test.md (2)
8-12
: 改善首句措辞“关于代码提交细节请参考 …” 里 “关于” 作介词应位于句首,或改为 “有关 / 对于”。
-无需其它的环境准备工作。<br />关于代码提交细节请参考: +无需其它的环境准备工作。<br />有关代码提交的细节请参考:
35-38
: 避免使用 “latest” Tag 以确保可复现性
…:latest
容易因镜像漂移导致调试环境与文档不一致,建议换成固定版本号(例如当前同页面已给出的v2.1.4
),或在文档中明确说明 “latest 只用于快速尝试,正式调试请锁定版本”。content/en/docs/contribution-guidelines/contribution/local-dev-test.md (2)
8-12
: Minor wording polish“without any other environment preparation” → “without any additional environment setup” reads more naturally.
35-38
: Lock image tag instead of “latest”Same concern as the Chinese doc: ▼
minikube image build -f debug.Dockerfile -t …/module-controller-v2:latest .
Using
latest
hampers reproducibility; recommend pinning to an explicit version or adding a note.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
content/en/docs/contribution-guidelines/contribution/local-dev-test.md
(1 hunks)content/en/docs/contribution-guidelines/module-controller-v2/design.md
(1 hunks)content/zh-cn/docs/contribution-guidelines/contribution/local-dev-test.md
(1 hunks)content/zh-cn/docs/contribution-guidelines/module-controller-v2/design.md
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- content/zh-cn/docs/contribution-guidelines/module-controller-v2/design.md
🧰 Additional context used
🪛 LanguageTool
content/zh-cn/docs/contribution-guidelines/contribution/local-dev-test.md
[uncategorized] ~10-~10: “关于”组成的介词短语必需位于句首,或请改用"对于"代替。
Context: ....6 及以上版本即可正常开发代码和单元测试,无需其它的环境准备工作。
关于代码提交细节请参考:[完成第一次 PR 提交](/docs/contributi...
(wb2)
🔇 Additional comments (5)
content/zh-cn/docs/contribution-guidelines/contribution/local-dev-test.md (2)
63-68
: kubectl exec 到 Deployment 可能选到非期望 Pod
kubectl exec deployments/module-controller …
依赖 kubectl 为 Deployment 选取首个 Pod,但若出现滚动更新或副本>1,可能进入旧 Pod。
建议在文档中给出更稳妥的示例:POD=$(kubectl get pod -l app=module-controller -o name | head -n1) kubectl exec -it "$POD" -- /bin/sh
70-74
: 二进制名称与前文不一致此处
exec ./module_controller
,而前文构建示例使用-o manager
。请确认镜像内真实二进制名,避免读者照搬命令后出现 “file not found”。content/en/docs/contribution-guidelines/contribution/local-dev-test.md (2)
63-68
: Potentially ambiguous kubectl exec target
kubectl exec deployments/module-controller …
may pick an unexpected Pod when multiple replicas exist. Consider documenting a safer pattern that resolves the Pod name first (see Chinese comment).
70-74
: Binary name mismatchThe command runs
./module_controller
, while the earlier build section outputsmanager
. Please verify which binary actually exists inside the debug image and align the docs.content/en/docs/contribution-guidelines/module-controller-v2/design.md (1)
147-147
: No issues – removal looks cleanThe obsolete debugging section has been removed and the remaining content renders correctly.
…ions
Added detailed steps for remote debugging with minikube, including building a debug image, applying deployments, and configuring IDE for remote debugging. Improved clarity and structure of the documentation for better user guidance.
Summary by CodeRabbit