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

Addreason field for workspace builds#2438

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
AbhineetJain merged 12 commits intomainfromabhineetjain/2029-show-build-reason-in-ui
Jun 17, 2022

Conversation

AbhineetJain
Copy link
Contributor

@AbhineetJainAbhineetJain commentedJun 16, 2022
edited
Loading

This PR adds a newreason field for workspace builds to indicate the reason for its initiation. The following values are supported:initiator,autostart,autostop.

The following combinations can arise:

InitiatorReason
initiator_idReason.Initiator
owner_idReason.Autostart
owner_idReason.Autostop

In case ofReason.Autostart andReason.Autostop, we ignore the initiator field when displaying it in the UI, and use the initiator field for the other case - the member could be admin too (or whoever the user may possibly be sharing workspaces with).

Subtasks

  • added a migration to add the new column
  • used the new column while inserting the values into workspace builds table
  • update databasefake

Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

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

I really like this approach! Nice n' simple 😎

AbhineetJain and Emyrk reacted with hooray emoji
@AbhineetJainAbhineetJain requested a review froma team as acode ownerJune 16, 2022 20:59
@AbhineetJainAbhineetJain mentioned this pull requestJun 16, 2022
5 tasks
Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

LG. Minor nit

@AbhineetJain
Copy link
ContributorAuthor

Handles the backend changes required for issues:#2029,#2410

Copy link
Member

@johnstcnjohnstcn left a comment
edited
Loading

Choose a reason for hiding this comment

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

Looks good to me! I Just a couple small issues.

Transition: trans,
JobID: newProvisionerJob.ID,

err = store.InTx(func(db database.Store) error {
Copy link
Member

Choose a reason for hiding this comment

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

This is already in one big transaction, see line 80 -- since we're already in a tx, this ends up being a no-op

Copy link
Member

Choose a reason for hiding this comment

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

Oh TIL. I didn't see that@AbhineetJain

Copy link
ContributorAuthor

@AbhineetJainAbhineetJainJun 17, 2022
edited
Loading

Choose a reason for hiding this comment

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

Thanks@johnstcn. This was also the reason the tests were failing.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Issue:#2468

johnstcn reacted with thumbs up emoji
@AbhineetJainAbhineetJainforce-pushed theabhineetjain/2029-show-build-reason-in-ui branch from778b819 to4802eafCompareJune 17, 2022 16:15
@AbhineetJainAbhineetJainforce-pushed theabhineetjain/2029-show-build-reason-in-ui branch from4802eaf toc5b9aacCompareJune 17, 2022 16:21
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

Nice work!

AbhineetJain reacted with hooray emoji
@AbhineetJainAbhineetJain merged commit289b989 intomainJun 17, 2022
@AbhineetJainAbhineetJain deleted the abhineetjain/2029-show-build-reason-in-ui branchJune 17, 2022 17:41
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@EmyrkEmyrkEmyrk approved these changes

@johnstcnjohnstcnjohnstcn approved these changes

@kylecarbskylecarbskylecarbs approved these changes

@Kira-PilotKira-PilotKira-Pilot approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@AbhineetJain@johnstcn@Emyrk@kylecarbs@Kira-Pilot

[8]ページ先頭

©2009-2025 Movatter.jp