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+"/"),