Skip to content

feat: add coder connect exists hidden subcommand - #17418

Merged
spikecurtis merged 1 commit into
mainfrom
spike/connect-exists-cmd
Apr 17, 2025
Merged

spikecurtis merged 1 commit into
mainfrom
spike/connect-exists-cmd

Conversation

@spikecurtis

@spikecurtis spikecurtis commented Apr 16, 2025 •

Copy link
Copy Markdown
Contributor

Adds a new hidden subcommand coder connect exists <hostname> that checks if the name exists via Coder Connect. This will be used in SSH config to match only if Coder Connect is unavailable for the hostname in question, so that the SSH client will directly dial the workspace over an existing Coder Connect tunnel.

Also refactors the way we inject a test DNS resolver into the lookup functions so that we can test from outside the workspacesdk package.

spikecurtis commented Apr 16, 2025 •

Copy link
Copy Markdown
Contributor Author

@spikecurtis
spikecurtis marked this pull request as ready for review April 16, 2025 13:26
@spikecurtis
spikecurtis force-pushed the spike/connect-exists-cmd branch from ecef684 to 169ab02 Compare April 16, 2025 13:30

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! 👍🏻

Comment thread cli/root.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

&exitError{code: 1} could potentially be used instead, but I see other uses of it have disappeared from the code base.

@spikecurtis
spikecurtis force-pushed the spike/connect-exists-cmd branch from 169ab02 to a89e1c3 Compare April 17, 2025 06:57
@spikecurtis
spikecurtis force-pushed the spike/connect-exists-cmd branch from a89e1c3 to dc5fab3 Compare April 17, 2025 07:12
@spikecurtis
spikecurtis merged commit 3b54254 into main Apr 17, 2025

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Apr 17, 3:23 AM EDT: A user merged this pull request with Graphite.

@spikecurtis
spikecurtis deleted the spike/connect-exists-cmd branch April 17, 2025 07:23
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants