#2672 check bootfile

Merged
lewis merged 6 commits from fix-2559 into V20220815 1 year ago
liuzx commented 1 year ago
https://git.openi.org.cn/OpenI/aiforge/issues/2559
lewis reviewed 1 year ago
routers/repo/cloudbrain.go
@@ -529,0 +547,4 @@
/**
获取启动文件的网页地址
*/
func getBootfileUrl(repo *models.Repository, branchName string, bootFile string) string {
lewis commented 1 year ago
不应该用http请求的方式去判断文件是否存在:1、这种方式比较耗时 2、私有代码仓无法判断 建议改用检查服务端代码仓文件是否存在的方式去判断。
liuzx commented 1 year ago
已解决
liuzx marked this conversation as resolved
lewis reviewed 1 year ago
routers/repo/cloudbrain.go
@@ -305,6 +306,13 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) {

command := cloudbrain.GetCloudbrainDebugCommand()
if jobType == string(models.JobTypeTrain) {
bootFileExict, err := ctx.Repo.FileExists(bootFile, branchName)
lewis commented 1 year ago
bootFileExict有拼写错误
liuzx marked this conversation as resolved
liuzx requested review from lewis 1 year ago
lewis approved these changes 1 year ago
lewis merged commit 51dc66c7de into V20220815 1 year ago

Reviewers

lewis approved these changes 1 year ago
The pull request has been merged as 51dc66c7de.
Sign in to join this conversation.
Loading…
There is no content yet.