-
Notifications
You must be signed in to change notification settings - Fork 967
fix: Resolve URL parsing panic and improve error handling in dubbogo-cli for ZooKeeper #2795
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
fix: Resolve URL parsing panic and improve error handling in dubbogo-cli for ZooKeeper #2795
Conversation
Please reformat the code. There are too many diffs. It seems that there shouldn't be so many changes. |
@No-SilverBullet I have fixed the formatting issues. |
have changed the target branch from main to develop branch, this is our develop branch. |
LGTM. But still needs to check the CI error, we will check it. |
@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. |
@No-SilverBullet I have successfully pulled the |
@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. |
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 |
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:
org.apache.dubbo.sample.UserProvider
withGetUser, UpdateUser
).Fixes: #2681
Signed-off-by: Nexusrex18 lavisnj350@gmail.com