coder / coder/jetbrains-coder

Improve Error Logging During Connection Establishment

Offen
#514 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
upstream
Vorherrschende Sprache
Kotlin
Sterne
33
Forks
18
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
1

Beschreibung

### Problem Description

When establishing a connection via the Coder Registry module that uses the URI handler or Coder JetBrains Gateway Plugin wizard, users are presented with insufficient error logs when the connection fails. This makes it difficult to troubleshoot and identify the root cause. A few example errors are given below.

![Image](https://github.com/user-attachments/assets/61ede519-1deb-491d-86ac-96994c05b5b7)

![Image](https://github.com/user-attachments/assets/577bd520-f818-4d22-92d6-77fdbac38fa6)

### Current Issues:
The logs can be collected from the Collect Logs button and suggest repeated retries but do not guide users on the next steps.

```console
java.lang.Throwable: Failed to retrieve IDEs (attempt 4; will retry in 49718 ms)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at com.coder.gateway.views.steps.CoderWorkspaceProjectIDEStepView$init$1$ides$2.invoke(CoderWorkspaceProjectIDEStepView.kt:242)
at com.coder.gateway.views.steps.CoderWorkspaceProjectIDEStepView$init$1$ides$2.invoke(CoderWorkspaceProjectIDEStepView.kt:206)
at com.coder.gateway.util.RetryKt.suspendingRetryWithExponentialBackOff(Retry.kt:62)
at com.coder.gateway.util.RetryKt$suspendingRetryWithExponentialBackOff$1.invokeSuspend(Retry.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:125)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
```

- Lack of detailed error messages to guide users.
- Logs are not surfaced or accessible during the connection process.

### Desired Solution

Implement streaming logs that provide visibility into the connection process and allow copying logs. Similar to how the VSCode remote does.

Improving the error messaging and log visibility will:
- Reduce user frustration by making failures more transparent.
- Speed up troubleshooting for both users and support teams.
- Enhance reliability and trust in the platform’s connection processes.

Upstream Issue: https://youtrack.jetbrains.com/issue/GTW-10251/Unactionable-Error-messages

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit CoderWorkspaceProjectIDEStepView.kt im Bereich des Retry- und IDE-Abrufablaufs und prüfe Retry.kt; das Issue verweist außerdem auf den URI handler und den JetBrains Gateway wizard. Vergleiche das Remote-Logging-Verhalten von VSCode und verifiziere anschließend, dass Verbindungsfehler streambare, kopierbare Logs mit umsetzbaren Fehlerdetails offenlegen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
kotlin
Bereich
desktop, observability
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.