Skip to content
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

Create open-source-summer-experience-haring-mosn-community-weixin-doi… #1310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tangtang-0521
Copy link
Contributor

@tangtang-0521 tangtang-0521 commented Mar 5, 2025

…ng-what-you-think-is-cool

Summary by CodeRabbit

  • Documentation
    • Added a new blog post titled "开源之夏经验分享|MOSN 社区韦鑫:做自己认为很酷的事" by 韦鑫 from Nanjing University of Aeronautics and Astronautics.
    • The post details experiences from the 2024 Open Source Summer program, including the integration of advanced traffic control features within the MoE ecosystem and insights on community collaboration and plugin development.

Copy link

coderabbitai bot commented Mar 5, 2025

Walkthrough

This pull request adds a new blog post file in the content repository. The post, authored by 韦鑫, details his experience during the 2024 Open Source Summer program. It describes the integration of Sentinel-golang traffic control capabilities into the MoE (MOSN on Envoy) ecosystem. The document outlines project objectives, includes an overview of existing HTNN community plugins, discusses specific Sentinel-golang features, and explains the plugin development process with configuration and testing procedures.

Changes

File(s) Modified Change Summary
content/zh/blog/...mosn-community-weixin-doing-what-you-think-is-cool Added a new blog post detailing the integration of Sentinel-golang traffic control capabilities into the MoE ecosystem, including project objectives and plugin development insights.

Sequence Diagram(s)

sequenceDiagram
    participant Developer as 韦鑫
    participant HTNN as HTNN Community Plugins
    participant Sentinel as Sentinel-golang
    participant MoE as MoE Ecosystem

    Developer->>HTNN: Review existing traffic control plugins
    Developer->>Sentinel: Explore features (flow control, circuit breaking, etc.)
    Developer->>MoE: Integrate Sentinel capabilities
    MoE-->>Developer: Supply guidelines & structure
    Developer->>MoE: Configure and test plugin development
    Developer-->Developer: Document and reflect in blog post
Loading

Poem

I'm a bunny who hops with glee,
Sharing stories of tech and creativity.
In open-source fields, I cheer aloud,
With Sentinel, MoE, and community proud.
Leap into code, where dreams are compiled—
A rabbit's joy in every new file!
🐰✨


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.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai 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

Documentation and Community

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

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

🧹 Nitpick comments (11)
content/zh/blog/open-source-summer-experience-haring-mosn-community-weixin-doing-what-you-think-is-cool (11)

15-15: Use proper markdown link formatting.

The project link uses both markdown and HTML-style formatting which may cause rendering issues.

-​**项目链接**​:[https://github.com/mosn/htnn/tree/main/plugins/plugins/sentinel](*https://github.com/mosn/htnn/tree/main/plugins/plugins/sentinel*)
+​**项目链接**​:[https://github.com/mosn/htnn/tree/main/plugins/plugins/sentinel](https://github.com/mosn/htnn/tree/main/plugins/plugins/sentinel)

31-50: Clear explanation of Sentinel-golang capabilities and implementation decisions.

This section effectively explains what traffic control capabilities Sentinel-golang offers and provides well-reasoned justifications for why certain features (memory-based flow control, isolation, and system adaptive protection) were not implemented in this specific project context. The technical reasoning is sound and demonstrates good architectural decision-making.


148-151: Remove HTML span tags in code paths.

Using HTML <span> tags inside the code paths may cause rendering issues with some markdown processors. Standard markdown formatting should be used instead.

-1. 进入 `<span>types/plugins</span>` 目录,创建插件配置结构目录 `<span>sentinel</span>`
-2. 在 `<span>sentinel/config.proto</span>` 中定义插件模型,即配置结构
-3. 通过根目录的 `<span>Makefile</span>`,执行 `<span>make gen-proto</span>` 生成插件的 Go 配置结构
-4. 在 `<span>sentinel/config.go</span>` 定义插件名称、类型、执行顺序等,并编写 Validate 作为配置校验逻辑
-5. 在 `<span>plugins.go</span>` 中添加配置结构 package
+1. 进入 `types/plugins` 目录,创建插件配置结构目录 `sentinel`
+2. 在 `sentinel/config.proto` 中定义插件模型,即配置结构
+3. 通过根目录的 `Makefile`,执行 `make gen-proto` 生成插件的 Go 配置结构
+4. 在 `sentinel/config.go` 定义插件名称、类型、执行顺序等,并编写 Validate 作为配置校验逻辑
+5. 在 `plugins.go` 中添加配置结构 package

156-161: Remove HTML span tags in code paths.

Similar to the previous comment, HTML <span> tags should be removed from these code paths.

-2. 在 `<span>sentinel/config.go</span>` 中编写插件配置解析逻辑
-3. 在 `<span>sentinel/filter.go</span>` 中编写插件核心工作逻辑
-4. 在 `<span>sentinel/config_test.go</span>` 中编写配置解析的单元测试
-5. 在 `<span>sentinel/filter_test.go</span>` 中编写插件工作所依赖方法的单元测试
+2. 在 `sentinel/config.go` 中编写插件配置解析逻辑
+3. 在 `sentinel/filter.go` 中编写插件核心工作逻辑
+4. 在 `sentinel/config_test.go` 中编写配置解析的单元测试
+5. 在 `sentinel/filter_test.go` 中编写插件工作所依赖方法的单元测试

164-167: Remove HTML span tags in code paths.

Remove HTML <span> tags from code paths here as well.

-1. 返回 `<span>plugins</span>` 目录
-2. 在 `<span>plugins.go</span>` 中添加插件 package
-3. 在 `<span>tests/integration/sentinel_test.go</span>` 中编写集成测试
-4. 通过当前目录下的 `<span>Makefile</span>`,执行 `<span>make bulid_test_so</span>` 得到编译产物,接着进行集成测试,如GreenOpstest -v  ./tests/integration/sentinel\_test.go ./tests/integration/suite\_test.go
+1. 返回 `plugins` 目录
+2. 在 `plugins.go` 中添加插件 package
+3. 在 `tests/integration/sentinel_test.go` 中编写集成测试
+4. 通过当前目录下的 `Makefile`,执行 `make bulid_test_so` 得到编译产物,接着进行集成测试,如GreenOpstest -v  ./tests/integration/sentinel_test.go ./tests/integration/suite_test.go

174-180: Remove HTML span tags and fix documentation link formatting.

Remove HTML <span> tags and fix the documentation link formatting.

-`<span>content/zh-hans/docs/reference/plugins/sentinel.md</span>` 中
-
-3. 使用仓库提供的翻译工具得到 `<span>prompt:go run cmd/translator/main.go -f .content/zh-hans/docs/reference/plugins/sentinel.md --from zh-Hans | pbcopy</span>`
-4. 将粘贴板内容提交到 LLM,如 ChatGPT 中得到英文文档,保存到
-
-`<span>content/en/docs/reference/plugins/sentinel.md</span>` 中
+`content/zh-hans/docs/reference/plugins/sentinel.md` 中
+
+3. 使用仓库提供的翻译工具得到 `prompt:go run cmd/translator/main.go -f .content/zh-hans/docs/reference/plugins/sentinel.md --from zh-Hans | pbcopy`
+4. 将粘贴板内容提交到 LLM,如 ChatGPT 中得到英文文档,保存到
+
+`content/en/docs/reference/plugins/sentinel.md` 中

184-184: Remove HTML span tags in code paths.

Remove HTML <span> tags from the Makefile command paths.

-2. 通过根目录的 `<span>Makefile</span>`, 执行 make lint,make fmt 等命令做代码提交前的检查
+2. 通过根目录的 `Makefile`, 执行 make lint,make fmt 等命令做代码提交前的检查

188-190: Fix link formatting.

The links use an incorrect format that might not render properly. Use standard markdown link syntax.

-* 如何二次开发 HTNN:[*https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/get\_involved.md*](*https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/get\_involved.md*)
-* 插件开发:[*https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/plugin\_development.md*](*https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/plugin\_development.md*)
-* 插件集成测试框架:[*https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/plugin\_integration\_test\_framework.md*](*https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/plugin\_integration\_test\_framework.md*)
+* 如何二次开发 HTNN:[https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/get_involved.md](https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/get_involved.md)
+* 插件开发:[https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/plugin_development.md](https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/plugin_development.md)
+* 插件集成测试框架:[https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/plugin_integration_test_framework.md](https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/developer-guide/plugin_integration_test_framework.md)

168-168: Fix typo in build command.

There appears to be a typo in the build command.

-4. 通过当前目录下的 `<span>Makefile</span>`,执行 `<span>make bulid_test_so</span>` 得到编译产物,接着进行集成测试,如GreenOpstest -v  ./tests/integration/sentinel\_test.go ./tests/integration/suite\_test.go
+4. 通过当前目录下的 `Makefile`,执行 `make build_test_so` 得到编译产物,接着进行集成测试,如GreenOpstest -v  ./tests/integration/sentinel_test.go ./tests/integration/suite_test.go

97-97: Clarify explanation with proper spacing.

The explanation of circuit breaking behavior has some formatting issues where the asterisks meant to create italics are pushing against the text.

-7. 若匹配上,则以 entry 为入参调用 Sentinel API TraceError 统计错误*(当达到用户配置的错误数量时会在下一次调用 Sentinel API Entry 时触发流控,即熔断) ​*
+7. 若匹配上,则以 entry 为入参调用 Sentinel API TraceError 统计错误 *(当达到用户配置的错误数量时会在下一次调用 Sentinel API Entry 时触发流控,即熔断)*

183-183: Fix formatting issue with maturity level explanation.

The formatting for the feature maturity level explanation has spacing issues.

-1. 在 `maintainer/feature_maturity_level.yaml` 中添加插件的成熟级别*(feature maturity level)  ​*
+1. 在 `maintainer/feature_maturity_level.yaml` 中添加插件的成熟级别 *(feature maturity level)*
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0809f8 and 1cadf2e.

📒 Files selected for processing (1)
  • content/zh/blog/open-source-summer-experience-haring-mosn-community-weixin-doing-what-you-think-is-cool (1 hunks)
🔇 Additional comments (3)
content/zh/blog/open-source-summer-experience-haring-mosn-community-weixin-doing-what-you-think-is-cool (3)

1-13: Well-structured introduction with clear author information.

The blog post begins with a well-organized header that clearly identifies the author, their background, and sets appropriate expectations for the readers. Including the reading time estimate (7 minutes for 3756 characters) is helpful for readers.


55-55: Verify image accessibility.

The blog post contains an image without alt text. For better accessibility, consider adding descriptive alternative text to the image.

-![图片](https://img.alicdn.com/imgextra/i4/O1CN01jGAXCH1hZKYZjoYIk_!!6000000004291-0-tps-1080-1478.jpg)
+![请求-响应流程图](https://img.alicdn.com/imgextra/i4/O1CN01jGAXCH1hZKYZjoYIk_!!6000000004291-0-tps-1080-1478.jpg)

192-228: Well-written personal reflection with valuable insights.

This section offers an excellent personal perspective on the author's open-source journey. It effectively communicates their motivations, challenges faced during development, and the valuable lessons learned. The discussion about solving the Sentinel Entry's Exit timing issue (lines 205-211) provides a particularly insightful technical detail that demonstrates the collaborative problem-solving process in open-source communities.

The concluding thoughts about the importance of testing, CI/CD, and encouragement for others to participate in open-source are inspiring and align well with best practices in software development.

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.

1 participant