Skip to content

Commit

Permalink
fix(api/build): cancel build removes build_executable from table (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Sep 29, 2023
1 parent 3d1f418 commit f021c40
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions api/build/cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,15 @@ func CancelBuild(c *gin.Context) {
return
}

// remove build executable for clean up
_, err = database.FromContext(c).PopBuildExecutable(ctx, b.GetID())
if err != nil {
retErr := fmt.Errorf("unable to pop build %s from executables table: %w", entry, err)
util.HandleError(c, http.StatusInternalServerError, retErr)

return
}

// retrieve the steps for the build from the step table
steps := []*library.Step{}
page := 1
Expand Down

0 comments on commit f021c40

Please sign in to comment.