Skip to content

Commit

Permalink
Skipped missing tests and breaking changes if repo failed to clone
Browse files Browse the repository at this point in the history
  • Loading branch information
melinath committed Mar 11, 2024
1 parent 7bb79f1 commit 46f1da8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .ci/magician/cmd/generate_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func execGenerateComment(prNumber int, ghTokenMagicModules, buildId, buildStep,
diffs := []Diff{}
for _, repo := range []source.Repo{tpgRepo, tpgbRepo, tgcRepo, tfoicsRepo} {
if !repo.Cloned {
fmt.Println("Skipping diff; repo failed to clone:", repo.Name)
fmt.Println("Skipping diff; repo failed to clone: ", repo.Name)
continue
}
diffStats, err := computeDiff(&repo, oldBranch, ctlr)
Expand All @@ -214,6 +214,10 @@ func execGenerateComment(prNumber int, ghTokenMagicModules, buildId, buildStep,
uniqueBreakingChanges := map[string]struct{}{}
diffProcessorPath := filepath.Join(mmLocalPath, "tools", "diff-processor")
for _, repo := range []source.Repo{tpgRepo, tpgbRepo} {
if !repo.Cloned {
fmt.Println("Skipping breaking changes; repo failed to clone: ", repo.Name)
continue
}
diffProcessorEnv := map[string]string{
"OLD_REF": oldBranch,
"NEW_REF": newBranch,
Expand Down Expand Up @@ -279,6 +283,10 @@ func execGenerateComment(prNumber int, ghTokenMagicModules, buildId, buildStep,
// Run missing test detector (currently only for beta)
missingTestsPath := mmLocalPath
for _, repo := range []source.Repo{tpgbRepo} {
if !repo.Cloned {
fmt.Println("Skipping missing tests; repo failed to clone: ", repo.Name)
continue
}
missingTests, err := detectMissingTests(missingTestsPath, repo.Path, oldBranch, rnr)
if err != nil {
fmt.Println("Error running missing test detector: ", err)
Expand Down

0 comments on commit 46f1da8

Please sign in to comment.