Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: pass usage app name to coder ssh#442

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
f0ssel merged 6 commits intomainfromf0ssel/usage-app
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletiongradle.properties
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ pluginUntilBuild=241.*
# verifier should be used after bumping versions to ensure compatibility in the
# range.
platformType=GW
platformVersion=233.14808-EAP-CANDIDATE-SNAPSHOT
platformVersion=233.15325-EAP-CANDIDATE-SNAPSHOT
instrumentationCompiler=241.10840-EAP-CANDIDATE-SNAPSHOT
platformDownloadSources=true
verifyVersions=2023.3,2024.1
Expand Down
3 changes: 3 additions & 0 deletionssrc/main/kotlin/com/coder/gateway/cli/CoderCLIManager.kt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@ fun ensureCLI(
*/
data class Features(
val disableAutostart: Boolean = false,
val reportWorkspaceUsage: Boolean = false,
)

/**
Expand DownExpand Up@@ -264,6 +265,7 @@ class CoderCLIManager(
"ssh",
"--stdio",
if (settings.disableAutostart && feats.disableAutostart) "--disable-autostart" else null,
if (feats.reportWorkspaceUsage) "--usage-app=jetbrains" else null,
)
val extraConfig =
if (settings.sshConfigOptions.isNotBlank()) {
Expand DownExpand Up@@ -446,6 +448,7 @@ class CoderCLIManager(
Features(
// Autostart with SSH was added in 2.5.0.
disableAutostart = version >= SemVer(2, 5, 0),
reportWorkspaceUsage = version >= SemVer(2, 13, 0),
)
}
}
Expand Down
9 changes: 9 additions & 0 deletionssrc/test/fixtures/outputs/report-usage.conf
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
# --- START CODER JETBRAINS test.coder.invalid
Host coder-jetbrains--foo--test.coder.invalid
ProxyCommand /tmp/coder-gateway/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-gateway/test.coder.invalid/config ssh --stdio --usage-app=jetbrains foo
ConnectTimeout 0
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel ERROR
SetEnv CODER_SSH_SESSION_TYPE=JetBrains
# --- END CODER JETBRAINS test.coder.invalid
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -345,6 +345,7 @@ internal class CoderCLIManagerTest {
},
SSHTest(listOf("foo"), null, "disable-autostart", "blank", "", true, Features(true)),
SSHTest(listOf("foo"), null, "no-disable-autostart", "blank", "", true, Features(false)),
SSHTest(listOf("foo"), null, "report-usage", "blank", "", true, Features(false, true)),
SSHTest(
listOf("extra"),
null,
Expand DownExpand Up@@ -721,7 +722,8 @@ internal class CoderCLIManagerTest {
val tests =
listOf(
Pair("2.5.0", Features(true)),
Pair("4.9.0", Features(true)),
Pair("2.13.0", Features(true, true)),
Pair("4.9.0", Features(true, true)),
Pair("2.4.9", Features(false)),
Pair("1.0.1", Features(false)),
)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp