From f021c405067b7ac3772434e1696e91219ae6c122 Mon Sep 17 00:00:00 2001 From: Easton Crupper <65553218+ecrupper@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:02:10 -0400 Subject: [PATCH] fix(api/build): cancel build removes build_executable from table (#978) --- api/build/cancel.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/build/cancel.go b/api/build/cancel.go index 7d5bff144..87af8971e 100644 --- a/api/build/cancel.go +++ b/api/build/cancel.go @@ -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