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

fix: improve ssh config logic when workspaces change#59

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
fioan89 merged 2 commits intomainfromfix-cant-connect-to-workspace
Apr 2, 2025
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
4 changes: 4 additions & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,10 @@

## Unreleased

### Fixed

- SSH config is regenerated correctly when Workspaces are added or removed

## 0.1.0 - 2025-04-01

### Added
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -194,10 +194,9 @@ class CoderRemoteEnvironment(
*/
override fun equals(other: Any?): Boolean {
if (other == null) return false
if (this === other) return true // Note the triple ===
if (this === other) return true
if (other !is CoderRemoteEnvironment) return false
if (id != other.id) return false
return true
return id == other.id
}

/**
Expand Down
11 changes: 5 additions & 6 deletionssrc/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -113,12 +113,11 @@ class CoderRemoteProvider(
return@launch
}

// Reconfigure if a new environment is found.
// TODO@JB: Should we use the add/remove listeners instead?
val newEnvironments = resolvedEnvironments.subtract(lastEnvironments)
if (newEnvironments.isNotEmpty()) {
context.logger.info("Found new environment(s), reconfiguring CLI: $newEnvironments")
cli.configSsh(newEnvironments.map { it.name }.toSet())

// Reconfigure if environments changed.
if (lastEnvironments.size != resolvedEnvironments.size || lastEnvironments != resolvedEnvironments) {
context.logger.info("Workspaces have changed, reconfiguring CLI: $resolvedEnvironments")
cli.configSsh(resolvedEnvironments.map { it.name }.toSet())
}

environments.update {
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp