Skip to content

fix: gh cs ssh can hide errors on port forwarding#13135

Open
rylena wants to merge 1 commit intocli:trunkfrom
rylena:fix/issue-11206
Open

fix: gh cs ssh can hide errors on port forwarding#13135
rylena wants to merge 1 commit intocli:trunkfrom
rylena:fix/issue-11206

Conversation

@rylena
Copy link
Copy Markdown

@rylena rylena commented Apr 10, 2026

Summary

Make codespaces RPC setup wait for a real gRPC connection instead of treating lazy client construction as success, so port-forward failures from gh cs ssh surface immediately.

Changes

  • replace the lazy grpc.NewClient setup in internal/codespaces/rpc/invoker.go with a blocking grpc.DialContext(..., grpc.WithBlock())
  • keep waiting on the same setup race, but only report success once the forwarded local port is actually connected
  • add a regression test that reproduces the hidden port-forward error case and asserts the error bubbles up from CreateInvoker

Testing

  • go test ./internal/codespaces/rpc/...
  • go test ./internal/codespaces/...

Fixes #11206

@rylena rylena requested a review from a team as a code owner April 10, 2026 08:39
@github-actions github-actions bot added unmet-requirements external pull request originating outside of the CLI core team needs-triage needs to be reviewed labels Apr 10, 2026
@github-actions
Copy link
Copy Markdown

Thanks for your pull request! Unfortunately, it doesn't meet the minimum requirements for review:

  • None of the referenced issues have the help wanted label

Please update your PR to address the above. Requirements:

  1. Include a detailed description of what this PR does
  2. Link to an issue with the help wanted label (use Fixes #123 or Closes #123 if it resolves the issue)

This PR will be automatically closed in 7 days if these requirements are not met.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team needs-triage needs to be reviewed unmet-requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gh cs ssh can hide errors on port forwarding

1 participant