From 84c4666a31fa6d0c3cb08ac6d792c4eb09f2237c Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Fri, 11 Nov 2022 09:07:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/cloudbrain/cloudbrainTask/notebook.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/cloudbrain/cloudbrainTask/notebook.go b/services/cloudbrain/cloudbrainTask/notebook.go index e5e5f3596..71aa71770 100644 --- a/services/cloudbrain/cloudbrainTask/notebook.go +++ b/services/cloudbrain/cloudbrainTask/notebook.go @@ -130,7 +130,6 @@ func cloudBrainFileNoteBookCreate(ctx *context.Context, option api.CreateFileNot return } command := cloudbrain.GetCloudbrainDebugCommand() - commitID, _ := ctx.Repo.GitRepo.GetBranchCommitID(option.BranchName) specId := setting.FileNoteBook.SpecIdGPU if option.Type == 0 { specId = setting.FileNoteBook.SpecIdCPU @@ -150,6 +149,9 @@ func cloudBrainFileNoteBookCreate(ctx *context.Context, option api.CreateFileNot ctx.JSON(http.StatusOK, models.BaseErrorMessageApi(ctx.Tr("points.insufficient_points_balance"))) return } + ctx.Repo = &context.Repository{ + Repository: repo, + } req := cloudbrain.GenerateCloudBrainTaskReq{ Ctx: ctx, @@ -170,7 +172,7 @@ func cloudBrainFileNoteBookCreate(ctx *context.Context, option api.CreateFileNot BranchName: option.BranchName, BootFile: option.File, Params: "{\"parameter\":[]}", - CommitID: commitID, + CommitID: "", BenchmarkTypeID: 0, BenchmarkChildTypeID: 0, ResultPath: storage.GetMinioPath(jobName, cloudbrain.ResultPath+"/"),