Skip to content

Include Coder support bundles in workspace diagnostics - #363

Open
fioan89 wants to merge 1 commit into
mainfrom
feature/workspace-support-bundles
Open

fioan89 wants to merge 1 commit into
mainfrom
feature/workspace-support-bundles

Conversation

@fioan89

@fioan89 fioan89 commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

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.

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.

@code-asher code-asher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful!

Comment on lines +614 to +616
// An inherited token must not override the selected deployment's stored login.
builder.environment().remove("CODER_SESSION_TOKEN")
builder.environment().remove("CODER_HEADER_COMMAND")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we should be doing for the other cli invocations as well? Or is there something unique about this one?

/** Runs the support-bundle command with a timeout and terminates it on cancellation. */
internal suspend fun runSupportBundleProcess(
command: List<String>,
timeoutSeconds: Long = 120,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minutes does seem like a very long time but at the same time I feel like it will just take however long it takes, and the user can cancel if they feel like it takes too long, rather than trying to be prescriptive about it.

Any harm in letting it be unbounded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants