fix(ctl/dump): stop execution when port-forward fails to start - #1927
pratham15541 wants to merge 3 commits into
Conversation
RunDump logged a port-forward start failure but kept running, going on to call http.Get() against a local address with nothing forwarded to it. This produced a confusing secondary 'connection refused' error that masked the real failure reason. Aligns ctl/dump/dump.go with the identical pattern already used in ctl/log/log.go, ctl/monitoring/monitoring.go, and ctl/authz/authz.go.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @pratham15541! It looks like this is your first PR to kmesh-net/kmesh 🎉 |
There was a problem hiding this comment.
Pull request overview
This PR fixes kmeshctl dump error handling so that if the Kubernetes port-forward fails to start, the command stops immediately instead of continuing and producing a misleading secondary connection refused error.
Changes:
- Exit immediately when
fw.Start()fails inRunDump, preventing follow-on HTTP calls to an unforwarded local address.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
Adding label DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes: #1926
RunDump logged a port-forward start failure but kept running, going on to call http.Get() against a local address with nothing forwarded to it. This produced a confusing secondary connection refused error that masked the real failure reason.