Skip to content

Commit b8115d6

Browse files
committed
Differentiate between worker connection and IDE retrieval
Hopefully this makes it seem less stuck in cases where it takes longer. See #260.
1 parent ebb97dc commit b8115d6

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44

55
## Unreleased
66

7-
## 2.5.1 - 2023-07-07
8-
97
### Fixed
108
- Inability to connect to a workspace after going back to the workspaces view.
119

10+
### Changed
11+
- Add a message to distinguish between connecting to the worker and querying for
12+
IDEs.
13+
14+
## 2.5.1 - 2023-07-07
15+
1216
### Fixed
1317
- Inability to download new editors in older versions of Gateway.
1418

src/main/kotlin/com/coder/gateway/views/steps/CoderLocateRemoteProjectStepView.kt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ class CoderLocateRemoteProjectStepView(private val setNextButtonEnabled: (Boolea
165165
// Clear contents from the last attempt if any.
166166
cbIDEComment.foreground = UIUtil.getContextHelpForeground()
167167
cbIDEComment.text = CoderGatewayBundle.message("gateway.connector.view.coder.remoteproject.ide.none.comment")
168-
cbIDE.renderer = IDECellRenderer(CoderGatewayBundle.message("gateway.connector.view.coder.retrieve-ides"))
169168
ideComboBoxModel.removeAllElements()
170169
setNextButtonEnabled(false)
171170

@@ -185,14 +184,23 @@ class CoderLocateRemoteProjectStepView(private val setNextButtonEnabled: (Boolea
185184
try {
186185
val ides = suspendingRetryWithExponentialBackOff(
187186
action = { attempt ->
188-
logger.info("Retrieving IDEs... (attempt $attempt)")
189-
if (attempt > 1) {
190-
cbIDE.renderer = IDECellRenderer(CoderGatewayBundle.message("gateway.connector.view.coder.retrieve.ides.retry", attempt))
191-
}
187+
logger.info("Connecting with SSH and uploading worker if missing... (attempt $attempt)")
188+
cbIDE.renderer =
189+
if (attempt > 1)
190+
IDECellRenderer(CoderGatewayBundle.message("gateway.connector.view.coder.connect-ssh.retry", attempt))
191+
else IDECellRenderer(CoderGatewayBundle.message("gateway.connector.view.coder.connect-ssh"))
192192
val executor = createRemoteExecutor(CoderCLIManager.getHostName(deploymentURL, selectedWorkspace))
193+
193194
if (ComponentValidator.getInstance(tfProject).isEmpty) {
195+
logger.info("Installing remote path validator...")
194196
installRemotePathValidator(executor)
195197
}
198+
199+
logger.info("Retrieving IDEs... (attempt $attempt)")
200+
cbIDE.renderer =
201+
if (attempt > 1)
202+
IDECellRenderer(CoderGatewayBundle.message("gateway.connector.view.coder.retrieve-ides.retry", attempt))
203+
else IDECellRenderer(CoderGatewayBundle.message("gateway.connector.view.coder.retrieve-ides"))
196204
retrieveIDEs(executor, selectedWorkspace)
197205
},
198206
retryIf = {

src/main/resources/messages/CoderGatewayBundle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ gateway.connector.view.workspaces.token.comment=The last used token is shown abo
2929
gateway.connector.view.workspaces.token.rejected=This token was rejected.
3030
gateway.connector.view.workspaces.token.injected=This token was pulled from your CLI config.
3131
gateway.connector.view.workspaces.token.none=No existing token found.
32+
gateway.connector.view.coder.connect-ssh=Establishing SSH connection to remote worker...
33+
gateway.connector.view.coder.connect-ssh.retry=Establishing SSH connection to remote worker (attempt {0})...
3234
gateway.connector.view.coder.retrieve-ides=Retrieving IDEs...
33-
gateway.connector.view.coder.retrieve.ides.retry=Retrieving IDEs (attempt {0})...
35+
gateway.connector.view.coder.retrieve-ides.retry=Retrieving IDEs (attempt {0})...
3436
gateway.connector.view.coder.retrieve-ides.failed=Failed to retrieve IDEs
3537
gateway.connector.view.coder.retrieve-ides.failed.retry=Failed to retrieve IDEs...retrying {0}
3638
gateway.connector.view.coder.remoteproject.next.text=Start IDE and connect

0 commit comments

Comments
 (0)