Skip to content

feat: set 'jetbrains_connection' as build reason on workspace start #150

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kacpersaw
Copy link

This PR is part of coder/coder#18827 which introduces new build reason values to identify what type of connection triggered a workspace build, helping to troubleshoot workspace-related issues.

import com.squareup.moshi.Json

enum class WorkspaceBuildReason {
@Json(name = "jetbrains_connection") JETBRAINS_CONNECTION,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Toolbox plugin polls every 5 seconds the workspaces, which means in theory we will have to deserialized the other possible values otherwise I think a JsonDataException will be raised. I'd have to test it... but I think that's what moshi will do.

Copy link
Author

Choose a reason for hiding this comment

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

This enum is only used by CreateWorkspaceBuildRequest and only applies when starting a workspace.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So you mean if I start a workspace from vs code, Toolbox will never receive the workspace build reason while polling, do I get that right?

Copy link
Author

Choose a reason for hiding this comment

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

Correct :)

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