mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: add some missing workspace updates (#7790)
* Standardize on function to get workspace channel name There were two, now there is one. * Add some missing workspace updates There are some failure cases where we do not set the type as a workspace build which causes the workspace update to never be published. * Make build failures warnings Otherwise the associated test fails due to the logger fataling on error messages.
This commit is contained in:
@ -643,10 +643,14 @@ func CreateWorkspaceBuild(
|
||||
client *codersdk.Client,
|
||||
workspace codersdk.Workspace,
|
||||
transition database.WorkspaceTransition,
|
||||
mutators ...func(*codersdk.CreateWorkspaceBuildRequest),
|
||||
) codersdk.WorkspaceBuild {
|
||||
req := codersdk.CreateWorkspaceBuildRequest{
|
||||
Transition: codersdk.WorkspaceTransition(transition),
|
||||
}
|
||||
for _, mut := range mutators {
|
||||
mut(&req)
|
||||
}
|
||||
build, err := client.CreateWorkspaceBuild(context.Background(), workspace.ID, req)
|
||||
require.NoError(t, err)
|
||||
return build
|
||||
|
Reference in New Issue
Block a user