Skip to content

Conversation

@mxsm
Copy link
Owner

@mxsm mxsm commented Jan 7, 2026

Which Issue(s) This PR Fixes(Closes)

Fixes #5523

Brief Description

How Did You Test This Change?

Summary by CodeRabbit

  • Documentation
    • Updated README with consolidated CLI usage guidance across platforms.
    • Clarified command-line option syntax and added expanded descriptions for each parameter.
    • Included new configuration options and practical usage examples covering default startup, configuration file usage, and parameter overrides.
    • Added configuration priority documentation and platform-specific testing instructions.

✏️ Tip: You can customize this high-level summary in your review settings.

…onfiguration examples for RocketMQ Name Server
@rocketmq-rust-bot
Copy link
Collaborator

🔊@mxsm 🚀Thanks for your contribution🎉!

💡CodeRabbit(AI) will review your code first🔥!

Note

🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

Documentation updates to the rocketmq-namesrv README consolidating platform-specific usage into unified CLI instructions, introducing new command-line options, adding configuration priority details, usage examples, and testing commands for parameter validation.

Changes

Cohort / File(s) Summary
Documentation
rocketmq-namesrv/README.md
Replaced platform-specific usage sections with consolidated CLI documentation; updated option syntax (-c, --configFile); introduced new options (--listenPort, --bindAddress, --rocketmqHome, --kvConfigPath, -p, --printConfigItem); added configuration priority precedence section; included practical usage examples; appended testing section with feature test commands

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Hop hop, let's document with glee!
Options refined, clearer for all to see,
Config priorities charted, examples so bright,
A Name Server guide that feels just right!

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR partially addresses linked issue #5521. It provides improved usage instructions and configuration examples in the README, but does not add separate example configuration files or feature test scripts as requested. Add dedicated example configuration files and separate feature test scripts as outlined in issue #5521, rather than embedding them only in README documentation.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: updating README.md with improved usage instructions and configuration examples for RocketMQ Name Server, which aligns with the raw summary.
Out of Scope Changes check ✅ Passed All changes are in-scope, focused on updating the README.md file with usage instructions, configuration examples, and testing guidance related to RocketMQ Name Server.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

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

Copy link
Contributor

@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: 2

🤖 Fix all issues with AI agents
In @rocketmq-namesrv/README.md:
- Around line 50-80: The README usage examples reference generic paths but do
not point users to the existing example config; update the Usage Examples
section to mention and link to the provided sample file
rocketmq-namesrv/resource/namesrv.toml (or note its relative path) so users can
find it; replace or augment the placeholders (/path/to/namesrv.toml,
config.toml) with a clear reference like "use the provided example at
rocketmq-namesrv/resource/namesrv.toml" and show an example CLI invocation using
that path (e.g., -- -c rocketmq-namesrv/resource/namesrv.toml) and add a short
sentence telling users where to find the example configuration.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af39fed and 064eb9e.

📒 Files selected for processing (1)
  • rocketmq-namesrv/README.md
⏰ 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). (5)
  • GitHub Check: Build & Test (macos-latest)
  • GitHub Check: Build & Test (windows-latest)
  • GitHub Check: Build & Test (ubuntu-latest)
  • GitHub Check: Code Coverage
  • GitHub Check: auto-approve
🔇 Additional comments (3)
rocketmq-namesrv/README.md (3)

17-48: Well-structured CLI documentation. The consolidated help output is clear and provides good descriptions for each option.


82-88: Configuration precedence is well-documented. Clear, concise explanation of the override order.


103-136: Feature table is well-maintained. Clear visual distinction between support levels using emoji and icons.

Comment on lines +50 to +80
### Usage Examples

**Start with default configuration:**

```shell
cargo run --bin rocketmq-namesrv-rust
```

**Start with configuration file:**

```shell
cargo run --bin rocketmq-namesrv-rust -- -c /path/to/namesrv.toml
```

**Print all configuration items:**

```shell
cargo run --bin rocketmq-namesrv-rust -- -p
```

**Override specific parameters:**

```shell
cargo run --bin rocketmq-namesrv-rust -- --listenPort 19876 --bindAddress 127.0.0.1
```

**Combined usage (config file + overrides):**

```shell
cargo run --bin rocketmq-namesrv-rust -- -c config.toml --listenPort 19876 --rocketmqHome /opt/rocketmq
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# List files in rocketmq-namesrv directory
find rocketmq-namesrv -type f -name "*.toml" -o -name "*config*" | head -20

Repository: mxsm/rocketmq-rust

Length of output: 287


🏁 Script executed:

# Read the README.md file to see actual content
cat rocketmq-namesrv/README.md | head -100

Repository: mxsm/rocketmq-rust

Length of output: 2189


🏁 Script executed:

# Search for any configuration file examples or templates
fd -e toml . rocketmq-namesrv

Repository: mxsm/rocketmq-rust

Length of output: 128


🏁 Script executed:

# Check if there are any example or template files
ls -la rocketmq-namesrv/ | grep -E "example|config|template"

Repository: mxsm/rocketmq-rust

Length of output: 120


🏁 Script executed:

# Check the content of the example configuration file
cat rocketmq-namesrv/resource/namesrv.toml

Repository: mxsm/rocketmq-rust

Length of output: 80


🏁 Script executed:

# List what's in the examples directory
ls -la rocketmq-namesrv/examples/

Repository: mxsm/rocketmq-rust

Length of output: 479


🏁 Script executed:

# Check if README references the actual example files
grep -n "resource\|examples" rocketmq-namesrv/README.md

Repository: mxsm/rocketmq-rust

Length of output: 44


🏁 Script executed:

# Check if PR/commit mentions configuration files requirement
git log --oneline --all | grep -i "config\|example" | head -10

Repository: mxsm/rocketmq-rust

Length of output: 1119


🏁 Script executed:

# Search for any references to resource/namesrv.toml in documentation
grep -r "resource/namesrv" rocketmq-namesrv/ --include="*.md" --include="*.rs"

Repository: mxsm/rocketmq-rust

Length of output: 44


🏁 Script executed:

# Get the full content of the configuration file to verify it's a proper example
cat rocketmq-namesrv/resource/namesrv.toml

Repository: mxsm/rocketmq-rust

Length of output: 80


Link the example configuration file in the README. A configuration file exists at rocketmq-namesrv/resource/namesrv.toml, but it's not referenced in the documentation. The README references /path/to/namesrv.toml and config.toml without guiding users to the actual example file. Update the documentation to link to or reference the existing example configuration so users can easily discover and use it.

🤖 Prompt for AI Agents
In @rocketmq-namesrv/README.md around lines 50 - 80, The README usage examples
reference generic paths but do not point users to the existing example config;
update the Usage Examples section to mention and link to the provided sample
file rocketmq-namesrv/resource/namesrv.toml (or note its relative path) so users
can find it; replace or augment the placeholders (/path/to/namesrv.toml,
config.toml) with a clear reference like "use the provided example at
rocketmq-namesrv/resource/namesrv.toml" and show an example CLI invocation using
that path (e.g., -- -c rocketmq-namesrv/resource/namesrv.toml) and add a short
sentence telling users where to find the example configuration.

Comment on lines +90 to +101
### Testing

Run the feature test script to validate the parameter parsing:

```shell
# Windows
.\scripts\test_namesrv_features.ps1

# Linux/Mac
chmod +x scripts/test_namesrv_features.sh
./scripts/test_namesrv_features.sh
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Check if scripts directory exists and list its contents
echo "=== Checking for scripts directory ==="
git ls-files | grep -i scripts || echo "No 'scripts' directory found in git tracking"

echo -e "\n=== Checking for test_namesrv_features files ==="
git ls-files | grep -i "test_namesrv_features" || echo "No test_namesrv_features files found"

echo -e "\n=== All changed/staged files in PR ==="
git ls-files --cached | head -30

Repository: mxsm/rocketmq-rust

Length of output: 1387


🏁 Script executed:

#!/bin/bash

# Double-check by looking for any shell scripts or PowerShell scripts in PR
echo "=== Checking for any .sh files in PR ==="
git ls-files | grep "\.sh$"

echo -e "\n=== Checking for any .ps1 files in PR ==="
git ls-files | grep "\.ps1$"

echo -e "\n=== Checking if scripts directory exists at all ==="
git ls-files | grep "^scripts/" || echo "No files found in scripts/ directory"

Repository: mxsm/rocketmq-rust

Length of output: 277


Test scripts referenced in README but not provided. The documentation instructs users to run ./scripts/test_namesrv_features.sh and .\scripts\test_namesrv_features.ps1, but these scripts do not exist in the repository. Per the PR objectives stating "Provide feature test scripts for the RocketMQ Name Server," these script files must be added to the scripts/ directory, or the Testing section should be removed from the README if out of scope.

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.40%. Comparing base (af39fed) to head (064eb9e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5524   +/-   ##
=======================================
  Coverage   38.40%   38.40%           
=======================================
  Files         815      815           
  Lines      110515   110515           
=======================================
+ Hits        42443    42445    +2     
+ Misses      68072    68070    -2     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@rocketmq-rust-bot rocketmq-rust-bot left a comment

Choose a reason for hiding this comment

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

LGTM - All CI checks passed ✅

@rocketmq-rust-bot rocketmq-rust-bot merged commit 2ebb9d4 into main Jan 7, 2026
20 checks passed
@rocketmq-rust-bot rocketmq-rust-bot added approved PR has approved and removed ready to review waiting-review waiting review this PR labels Jan 7, 2026
@mxsm mxsm changed the title [ISSUE #5521]📝Update README.md with improved usage instructions and configuration examples for RocketMQ Name Server [ISSUE #5523]📝Update README.md with improved usage instructions and configuration examples for RocketMQ Name Server Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc📝] Update README.md with improved usage instructions and configuration examples for RocketMQ Name Server

4 participants