Skip to content
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

impl: ssh config improvements #41

Merged
merged 21 commits into from
Mar 27, 2025
Merged

impl: ssh config improvements #41

merged 21 commits into from
Mar 27, 2025

Conversation

fioan89
Copy link
Collaborator

@fioan89 fioan89 commented Mar 21, 2025

  • different header blocks to differentiate between Gateway and Toolbox ssh config

  • different key for Toolbox for workspace usage

  • honors the disable autostart setting in the URI handling

  • plugin's display name was changed from Coder Toolbox to Coder

  • adds support for ssh wildcard config, configurable from plugin's Settings page.

  • the settings models were reworked because there was too much confusion around CoderSettings, CoderSettingsState, CoderSettingsService. Lots of properties and some models were introduced only to inject data during tests.

  • among other issues, test related properties were leaking in the business code and there was no clear definition
    between the readable and writable interface. With this PR we have CoderSettingsStore exposing read+write, CoderSettings exposing reads + PluginSettingsStore the underlying persistable store.

  • the tests control data via an instance of PluginSettingsStore just like the business code

  • some of the options that did not make sense to be configurable and were only used in the tests were removed:

    • setupCommand
    • ignoreSetupFailures
  • two settings are now also exposed and configurable in the UI (previously only from tests):

    • ssh log dir
    • ssh extra arguments to the proxy command
  • resolves Coder settings are not taken into account #40

  • resolves convert .ssh/config to use wildcard entries #46

@fioan89 fioan89 requested review from matifali and bcpeinhardt March 21, 2025 23:45
Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

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

I have a concern about --usage-app=toolbox, as we will not ba able to track it before https://github.com/coder/coder/issues/16957.
@f0ssel, @bpmct curious for your thoughts here.

@matifali matifali requested a review from f0ssel March 24, 2025 17:10
fioan89 added 14 commits March 24, 2025 22:40
- instead of the raw interfaces
- this prepares the plugin for the next stage where some of the
  settings are read by the URI handling component.
… enabled

- uri handling always tried to start the workspace if it was stopped.
- this commit honors the `disable autostart` setting which should stop
  the starting of the workspace automatically when connecting via SSH.
- instead user is warned via a pop-up dialog that manual starting is needed
- this patch makes the window visible in uri handling flows when an
  error dialog pops-up.
- catches the exception, logs the errors and pops-up an error dialog during URI handling
- previously the call failed silently (for example when the workspace is stopped and out of date)
- to pop-up Toolbox window when it's not showing.
- too much confusion around CoderSettings, CoderSettingsState, CoderSettingsService
- lots of properties and some models were introduced only to inject data during tests
- test related properties were leaking in the business code and there was no clear definition
  between the readable and writable interface
- with this commit we have CoderSettingsStore exposing read+write, CoderSettings exposing reads + PluginSettingsStore the underlying persistable store
- the tests control data via an instance of PluginSettingsStore just like the business code
- two settings are now also exposed and configurable in the UI (previously only from tests):
  - ssh log dir
  - ssh extra arguments to the proxy command
- resolves #40
- some of the options that did not make sense to be configurable and were only used in the tests were removed:
  - setupCommand
  - ignoreSetupFailures
- these two are Gateway specific
- resolves #46
- it is configurable in the Coder's plugin setting page
- from Coder Toolbox to Coder
- back to jetbrains because there is no tracking support for toolbox, yet.
- use Java's Path to do platform independent path comparison
- slf4j api is now bundled and exposed by Toolbox
fioan89 added 2 commits March 27, 2025 21:06
- Toolbox calls the Coder environment to get SSH connection information. In this particular case
  for wildcard SSH connections the hostname is a bit different.
- this patch computes the correct hostname depending on whether wildcard ssh config is enabled or not.
@fioan89 fioan89 marked this pull request as ready for review March 27, 2025 21:20
@fioan89 fioan89 merged commit df37364 into main Mar 27, 2025
5 checks passed
@fioan89 fioan89 deleted the ssh-config-improvements branch March 27, 2025 21:21
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.

convert .ssh/config to use wildcard entries Coder settings are not taken into account
3 participants