Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: extend workspace build reasons to track connection types#18827

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kacpersaw merged 15 commits intomainfromkacpersaw/extend-build-reason
Jul 22, 2025

Conversation

kacpersaw
Copy link
Contributor

@kacpersawkacpersaw commentedJul 10, 2025
edited
Loading

This PR introduces new build reason values to identify what type of connection triggered a workspace build, helping to troubleshoot workspace-related issues.

Database Migration

Added migration 000349_extend_workspace_build_reason.up.sql that extends the build_reason enum with new values:

dashboard, cli, ssh_connection, vscode_connection, jetbrains_connection

Implementation

The build reason is specified through the API when creating new workspace builds:

UI Changes:

  • Tooltip with reason in Build history
image
  • Reason in Audit Logs Row tooltip
imageimage

@kacpersawkacpersaw marked this pull request as ready for reviewJuly 14, 2025 15:10
Comment on lines 3 to 5
ALTERTYPE build_reason ADD VALUE IF NOT EXISTS'ssh_connection';
ALTERTYPE build_reason ADD VALUE IF NOT EXISTS'vscode_connection';
ALTERTYPE build_reason ADD VALUE IF NOT EXISTS'jetbrains_connection';
Copy link
Member

@ethanndicksonethanndicksonJul 15, 2025
edited
Loading

Choose a reason for hiding this comment

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

The_connection part is implicit here - if you're using any of these, it was to connect to the workspace. I would personally drop the suffixes, but it's up to you.

Copy link
Collaborator

@BrunoQuaresmaBrunoQuaresma left a comment

Choose a reason for hiding this comment

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

FE code looks good 👍, only left a minor comment

returnundefined;
};

exportconstgetDisplayInitiatorBuildReason=(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I think this is a nice case to use records.

constbuildReasonLabels:Record<BuildReason,string>={initiator:"API",dashboard:"Dashboard",cli:"CLI",// ...}

So you can use it directly in the component:

<span>{buildReasonLabels[log.build_reason]}</span>

Wdyt?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@BrunoQuaresma I’ve slightly modified the impl based on your suggestion. PTAL

BrunoQuaresma reacted with thumbs up emoji
@kacpersawkacpersaw merged commit482463c intomainJul 22, 2025
29 of 31 checks passed
@kacpersawkacpersaw deleted the kacpersaw/extend-build-reason branchJuly 22, 2025 11:11
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@BrunoQuaresmaBrunoQuaresmaBrunoQuaresma approved these changes

@deansheatherdeansheatherdeansheather approved these changes

@ethanndicksonethanndicksonethanndickson approved these changes

@aslilacaslilacAwaiting requested review from aslilacaslilac is a code owner

Assignees

@kacpersawkacpersaw

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@kacpersaw@BrunoQuaresma@deansheather@ethanndickson

[8]ページ先頭

©2009-2025 Movatter.jp