Repository navigation
Conversation
Workspace log archives previously lacked Coder deployment and workspace diagnostics, so troubleshooting connection issues required collecting a separate support bundle. In this change, we added a Coder support bundle to the Toolbox ZIP generated by an environment's Collect logs action. The plugin uses the existing deployment login to collect diagnostics for the selected workspace and its agent, when available. Collection supports cancellation and has a two-minute timeout. If it fails, the plugin preserves the other Toolbox diagnostics and adds a failure report instead of a partial bundle. We also documented where bundle collection is available and added tests for collection, cancellation, timeout, and cleanup.
We merged the latest workspace progress reporting changes from main and resolved overlapping additions while preserving support-bundle collection and coverage for both features.
The fixed two-minute limit could interrupt a valid diagnostic collection, and the plugin discarded an inherited session token that would normally take precedence over stored credentials. We changed support-bundle collection to wait until the Coder CLI finishes or the user cancels. The plugin still terminates the process on cancellation, while the CLI can now use inherited credentials according to its normal precedence. We also removed redundant header-command cleanup without changing the existing header configuration behavior. We updated the README to describe the revised behavior and removed the obsolete timeout test. The CLI manager and diagnostic collector tests passed, including cancellation and process cleanup coverage.
Toolbox's general log collection action does not let providers attach additional diagnostic bundles. This left users without a single action that combined detailed Coder diagnostics with local Toolbox logs. We added "Collect detailed deployment and Toolbox logs" to the Coder provider menu. The Coder provider now collects support bundles for every accessible workspace and its agents, regardless of the workspace filter, and combines them with local Toolbox and JetBrains daemon logs. This provider action differs from "Collect logs" in the workspace or environment menu, which limits Coder bundle collection to that workspace and its selected agent. We added a diagnostic collector page that reports progress and supports cancellation. The provider collector preserves available diagnostics when individual bundles or log files cannot be collected, while the log path resolver handles Windows, macOS, and Linux locations and overrides. We also updated the README to explain both actions and added localized UI messages and tests for collection, cancellation, and path handling.
Diagnostic collection opened a separate page and did not provide a visible Cancel button, making it difficult for users to stop collection while working with their workspace list. We moved collection progress and an explicit Cancel control into the expanded Coder header, where they temporarily replace the filters. The Coder provider now expands that header when collection starts, and the header reports that it is busy and cancellable until collection ends. We changed the header to restore the filters and their previous selections after collection. On success, Toolbox reveals the archive in the file manager without leaving a completion label or a Show logs button in the header. The Coder provider also cancels collection when it closes. We removed the separate collector page and its unused localization messages, updated the README, and added header tests covering progress, cancellation, repeated requests, failures, and filter restoration.
# Conflicts: # CHANGELOG.md # README.md
code-asher
left a comment
There was a problem hiding this comment.
Approving since the code looks good but I think getting a support bundle for every accessible workspace is going to be too much information. When I tested and saw the "1/1266" I quickly noped out lol
In a scenario where a user has connection issues, we would probably end up just ignoring everything but the affected workspace anyway. And all the deployment information the support bundle collects will be duplicated (and any workspace that is off will have nothing but deployment info, so those are especially redundant).
Could we add the Toolbox logs to the individual agent log collection action instead of having this global one?
I double-checked the environment’s Collect logs action: Toolbox already includes its local logs and daemon logs alongside our bundle for the selected workspace and agent. That remains the most useful action for troubleshooting a specific connection. The gap is Toolbox’s general Settings > About > Collect logs and diagnostic data action. It currently has no hook allowing providers to add their own bundles, which is why we introduced a separate provider action. Once JetBrains exposes the appropriate hooks, we can move this collection into the general action. My counterproposal is to narrow the provider action to one of these scopes:
What do you think? |
|
Dropping/drafting this PR - after a talk with @matifali and @code-asher we only need to provide logs per workspace/agent. |
Toolbox's general log collection action does not let providers attach additional diagnostic bundles. This left users without a single action that combined detailed Coder diagnostics with local Toolbox logs.
We added "Collect detailed deployment and Toolbox logs" to the Coder provider menu. The Coder provider now collects support bundles for every accessible workspace and its agents, regardless of the workspace filter, and combines them with local Toolbox and JetBrains daemon logs.
This provider action differs from "Collect logs" in the workspace or environment menu, which limits Coder bundle collection to that workspace and its selected agent.
We added a diagnostic collector page that reports progress and supports cancellation. The provider collector preserves available diagnostics when individual bundles or log files cannot be collected, while the log path resolver handles Windows, macOS, and Linux locations and overrides. We also updated the README to explain both actions and added localized UI messages and tests for collection, cancellation, and path handling.