-
Notifications
You must be signed in to change notification settings - Fork 1
impl: ssh config improvements #41
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1788632
impl: custom ssh config header block for toolbox plugin
fioan89 2a86abe
impl: report workspace usage under toolbox
fioan89 270fa89
impl: change hostname in ssh config to reflect toolbox plugin
fioan89 d3968ae
fix: update tests with to reflect the changes to the ssh parameters
fioan89 6a3491d
fix: ssh header block as `JETBRAINS TOOLBOX`
fioan89 3a8738c
refactor: expose typed settings and secrets store
fioan89 1da3f4b
impl: don't start the workspace automatically if disable-autostart is…
fioan89 a104721
fix: force window to show when error dialogs pops-up
fioan89 d885c60
fix: resiliency when REST call to start the workspace fail
fioan89 0bdd3ff
fix: resiliency when workspace agent is not ready
fioan89 2929b0e
refactor: reuse block of code
fioan89 1708944
impl: rework the settings models
fioan89 a47e4b2
impl: support for ssh wildcard config
fioan89 b183af0
fix: missing i18n strings
fioan89 de8f9f0
impl: change plugin's display name
fioan89 71cabd1
chore: revert --usage-app
fioan89 67ec906
fix: test exercising the features available
fioan89 76bb8b8
fix: test assert raw string paths on different platforms
fioan89 a53684d
fix: add support for Toolbox 2.6.0.39689
fioan89 fd860d1
impl: enable wildcard config by default
fioan89 81eacfb
fix: provide the correct ssh host when wildcard ssh config is enabled
fioan89 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/test/resources/fixtures/inputs/existing-end-no-newline.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Host test | ||
Port 80 | ||
Host test2 | ||
Port 443 # --- START CODER JETBRAINS test.coder.invalid | ||
some jetbrains config # --- END CODER JETBRAINS test.coder.invalid | ||
Port 443 # --- START CODER TOOLBOX test.coder.invalid | ||
fioan89 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
some jetbrains config # --- END CODER TOOLBOX test.coder.invalid | ||
fioan89 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Host test | ||
Port 80 | ||
# --- START CODER JETBRAINS test.coder.invalid | ||
# --- START CODER TOOLBOX test.coder.invalid | ||
some jetbrains config | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid | ||
Host test2 | ||
Port 443 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# --- START CODER JETBRAINS test.coder.invalid | ||
# --- START CODER TOOLBOX test.coder.invalid | ||
some jetbrains config | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/test/resources/fixtures/inputs/malformed-mismatched-start.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# --- START CODER JETBRAINS test.coder.something-else | ||
# --- START CODER TOOLBOX test.coder.something-else | ||
some jetbrains config | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# --- START CODER JETBRAINS test.coder.invalid | ||
# --- START CODER TOOLBOX test.coder.invalid | ||
some jetbrains config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
some jetbrains config | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid |
4 changes: 2 additions & 2 deletions
4
src/test/resources/fixtures/inputs/malformed-start-after-end.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid | ||
some jetbrains config | ||
# --- START CODER JETBRAINS test.coder.invalid | ||
# --- START CODER TOOLBOX test.coder.invalid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# --- START CODER JETBRAINS test.coder.invalid | ||
Host coder-jetbrains--foo-bar--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid ssh --stdio --usage-app=jetbrains foo-bar | ||
# --- START CODER TOOLBOX test.coder.invalid | ||
Host coder-toolbox--foo-bar--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid ssh --stdio --usage-app=toolbox foo-bar | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
Host coder-jetbrains--foo-bar--test.coder.invalid--bg | ||
Host coder-toolbox--foo-bar--test.coder.invalid--bg | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid ssh --stdio --usage-app=disable foo-bar | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# --- START CODER JETBRAINS test.coder.invalid | ||
Host coder-jetbrains--foo--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid ssh --stdio --disable-autostart --usage-app=jetbrains foo | ||
# --- START CODER TOOLBOX test.coder.invalid | ||
Host coder-toolbox--foo--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid ssh --stdio --disable-autostart --usage-app=toolbox foo | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
Host coder-jetbrains--foo--test.coder.invalid--bg | ||
Host coder-toolbox--foo--test.coder.invalid--bg | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid ssh --stdio --disable-autostart --usage-app=disable foo | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
src/test/resources/fixtures/outputs/header-command-windows.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# --- START CODER JETBRAINS test.coder.invalid | ||
Host coder-jetbrains--header--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid --header-command "\"C:\Program Files\My Header Command\HeaderCommand.exe\" --url=\"%%CODER_URL%%\" --test=\"foo bar\"" ssh --stdio --usage-app=jetbrains header | ||
# --- START CODER TOOLBOX test.coder.invalid | ||
Host coder-toolbox--header--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid --header-command "\"C:\Program Files\My Header Command\HeaderCommand.exe\" --url=\"%%CODER_URL%%\" --test=\"foo bar\"" ssh --stdio --usage-app=toolbox header | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
Host coder-jetbrains--header--test.coder.invalid--bg | ||
Host coder-toolbox--header--test.coder.invalid--bg | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid --header-command "\"C:\Program Files\My Header Command\HeaderCommand.exe\" --url=\"%%CODER_URL%%\" --test=\"foo bar\"" ssh --stdio --usage-app=disable header | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# --- START CODER JETBRAINS test.coder.invalid | ||
Host coder-jetbrains--header--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid --header-command 'my-header-command --url="$CODER_URL" --test="foo bar" --literal='\''$CODER_URL'\''' ssh --stdio --usage-app=jetbrains header | ||
# --- START CODER TOOLBOX test.coder.invalid | ||
Host coder-toolbox--header--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid --header-command 'my-header-command --url="$CODER_URL" --test="foo bar" --literal='\''$CODER_URL'\''' ssh --stdio --usage-app=toolbox header | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
Host coder-jetbrains--header--test.coder.invalid--bg | ||
Host coder-toolbox--header--test.coder.invalid--bg | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid --header-command 'my-header-command --url="$CODER_URL" --test="foo bar" --literal='\''$CODER_URL'\''' ssh --stdio --usage-app=disable header | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# --- START CODER JETBRAINS test.coder.invalid | ||
Host coder-jetbrains--foo--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid ssh --stdio --log-dir /tmp/coder-toolbox/test.coder.invalid/logs --usage-app=jetbrains foo | ||
# --- START CODER TOOLBOX test.coder.invalid | ||
Host coder-toolbox--foo--test.coder.invalid | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid ssh --stdio --log-dir /tmp/coder-toolbox/test.coder.invalid/logs --usage-app=toolbox foo | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
Host coder-jetbrains--foo--test.coder.invalid--bg | ||
Host coder-toolbox--foo--test.coder.invalid--bg | ||
ProxyCommand /tmp/coder-toolbox/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-toolbox/test.coder.invalid/config --url https://test.coder.invalid ssh --stdio --usage-app=disable foo | ||
ConnectTimeout 0 | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile /dev/null | ||
LogLevel ERROR | ||
SetEnv CODER_SSH_SESSION_TYPE=JetBrains | ||
# --- END CODER JETBRAINS test.coder.invalid | ||
# --- END CODER TOOLBOX test.coder.invalid |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.