Skip to content

Conversation

Nexusrex18
Copy link
Contributor

Fix multiple issues in dubbogo-cli when interacting with ZooKeeper as a registry. This PR resolves a panic caused by invalid URL parsing (://dubbo-go-samples-configcenter-zookeeper-client), addresses a "too many colons" error when initializing the ZooKeeper client, and improves error handling for cases where ZooKeeper data is missing (e.g., /dubbo node not found). It also updates the tool to fetch URL data from node content rather than node names, ensuring correct method extraction.

Key changes:

  • cmd/show.go: Added input validation, passed raw host addresses, and handled errors gracefully with user-friendly output.
  • metadata/zookeeper/zookeeper.go: Fixed URL parsing by using node content, stripped schemes from addresses, and improved robustness.

Tested with:

  • Empty ZooKeeper: Displays "No data available" without crashing.
  • Populated ZooKeeper: Correctly lists interfaces and methods (e.g., org.apache.dubbo.sample.UserProvider with GetUser, UpdateUser).

Fixes: #2681

Signed-off-by: Nexusrex18 lavisnj350@gmail.com

@No-SilverBullet
Copy link
Member

Please reformat the code. There are too many diffs. It seems that there shouldn't be so many changes.

@Nexusrex18
Copy link
Contributor Author

@No-SilverBullet I have fixed the formatting issues.

@AlexStocks AlexStocks changed the base branch from main to develop March 15, 2025 12:58
@AlexStocks
Copy link
Contributor

have changed the target branch from main to develop branch, this is our develop branch.

@No-SilverBullet
Copy link
Member

No-SilverBullet commented Mar 17, 2025

LGTM. But still needs to check the CI error, we will check it.

@No-SilverBullet
Copy link
Member

No-SilverBullet commented Mar 17, 2025

@Nexusrex18 please pull the develop branch, CI version has been updated. Same with your other PR #2799 still needs to pull the newest change with develop branch.

@Nexusrex18
Copy link
Contributor Author

@No-SilverBullet I have successfully pulled the develop branch for newest change.

@AlexStocks
Copy link
Contributor

AlexStocks commented Mar 19, 2025

@Nexusrex18 thx for your contributions. After so many PRs, we dubbo-go team wanna invite you join our developing team in Wechat group which is a Chinese Instant Message chat tool.

@Nexusrex18
Copy link
Contributor Author

Hi @AlexStocks , thank you so much for the invitation and for recognizing my contributions. I’d love to join the dubbo-go developing team. However, WeChat is not available in my country, so I can’t access it easily. Could we use an alternative like Slack, Discord, Telegram, or email instead? I’m happy to adapt to whatever works best for the team. Excited to collaborate more!

@AlexStocks AlexStocks closed this Mar 19, 2025
@AlexStocks AlexStocks reopened this Mar 19, 2025
Copy link

@AlexStocks
Copy link
Contributor

Hi @AlexStocks , thank you so much for the invitation and for recognizing my contributions. I’d love to join the dubbo-go developing team. However, WeChat is not available in my country, so I can’t access it easily. Could we use an alternative like Slack, Discord, Telegram, or email instead? I’m happy to adapt to whatever works best for the team. Excited to collaborate more!

my discord name is alexstockssr

@No-SilverBullet No-SilverBullet merged commit bd9cc14 into apache:develop Mar 21, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dubbogo-cli show show zk detail err
3 participants