feat(cmd/joj3): use joint-teapot joj3-all [force build]
	
		
			
	
		
	
	
				
					
				
			This commit is contained in:
		
							parent
							
								
									555760bf1f
								
							
						
					
					
						commit
						0abca551ed
					
				|  | @ -64,53 +64,26 @@ func Run(conf *conf.Conf) error { | ||||||
| 		wg.Wait() | 		wg.Wait() | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| 	var wg sync.WaitGroup | 	skipIssueArg := "--no-skip-result-issue" | ||||||
| 	var scoreboardErr, failedTableErr, issueErr error | 	if conf.Teapot.SkipIssue { | ||||||
| 	if !conf.Teapot.SkipScoreboard { | 		skipIssueArg = "--skip-result-issue" | ||||||
| 		wg.Add(1) | 	} | ||||||
| 		go func() { | 	skipScoreboardArg := "--no-skip-scoreboard" | ||||||
| 			defer wg.Done() | 	if conf.Teapot.SkipScoreboard { | ||||||
| 			err := execCommand("joint-teapot", []string{ | 		skipScoreboardArg = "--skip-scoreboard" | ||||||
| 				"joj3-scoreboard", envFilePath, conf.Stage.OutputPath, actor, | 	} | ||||||
|  | 	skipFailedTableArg := "--no-skip-failed-table" | ||||||
|  | 	if conf.Teapot.SkipFailedTable { | ||||||
|  | 		skipFailedTableArg = "--skip-failed-table" | ||||||
|  | 	} | ||||||
|  | 	if err := execCommand("joint-teapot", []string{ | ||||||
|  | 		"joj3-all", envFilePath, conf.Stage.OutputPath, actor, | ||||||
| 		conf.Teapot.GradingRepoName, repoName, runNumber, | 		conf.Teapot.GradingRepoName, repoName, runNumber, | ||||||
| 				conf.Teapot.ScoreboardPath, conf.Name, sha, | 		conf.Teapot.ScoreboardPath, conf.Teapot.FailedTablePath, | ||||||
| 			}) | 		conf.Name, sha, skipIssueArg, skipScoreboardArg, | ||||||
| 			if err != nil { | 		skipFailedTableArg, | ||||||
| 				scoreboardErr = err | 	}); err != nil { | ||||||
| 			} | 		slog.Error("teapot exit", "error", err) | ||||||
| 		}() |  | ||||||
| 	} |  | ||||||
| 	if !conf.Teapot.SkipFailedTable { |  | ||||||
| 		wg.Add(1) |  | ||||||
| 		go func() { |  | ||||||
| 			defer wg.Done() |  | ||||||
| 			err := execCommand("joint-teapot", []string{ |  | ||||||
| 				"joj3-failed-table", envFilePath, conf.Stage.OutputPath, actor, |  | ||||||
| 				conf.Teapot.GradingRepoName, repoName, runNumber, |  | ||||||
| 				conf.Teapot.FailedTablePath, conf.Name, sha, |  | ||||||
| 			}) |  | ||||||
| 			if err != nil { |  | ||||||
| 				failedTableErr = err |  | ||||||
| 			} |  | ||||||
| 		}() |  | ||||||
| 	} |  | ||||||
| 	if !conf.Teapot.SkipIssue { |  | ||||||
| 		wg.Add(1) |  | ||||||
| 		go func() { |  | ||||||
| 			defer wg.Done() |  | ||||||
| 			err := execCommand("joint-teapot", []string{ |  | ||||||
| 				"joj3-create-result-issue", envFilePath, conf.Stage.OutputPath, |  | ||||||
| 				repoName, runNumber, conf.Name, actor, sha, |  | ||||||
| 			}) |  | ||||||
| 			if err != nil { |  | ||||||
| 				issueErr = err |  | ||||||
| 			} |  | ||||||
| 		}() |  | ||||||
| 	} |  | ||||||
| 	wg.Wait() |  | ||||||
| 	if scoreboardErr != nil || failedTableErr != nil || issueErr != nil { |  | ||||||
| 		slog.Error("teapot exit", "scoreboardErr", scoreboardErr, |  | ||||||
| 			"failedTableErr", failedTableErr, "issueErr", issueErr) |  | ||||||
| 		return fmt.Errorf("teapot exit") | 		return fmt.Errorf("teapot exit") | ||||||
| 	} | 	} | ||||||
| 	return nil | 	return nil | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user