Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issues with diff-processor caused by GA-only compilation errors #10250

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions .ci/magician/cmd/generate_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ func execGenerateComment(prNumber int, ghTokenMagicModules, buildId, buildStep,
for _, serviceLabel := range serviceLabels {
uniqueServiceLabels[serviceLabel] = struct{}{}
}

err = cleanDiffProcessor(diffProcessorPath, rnr)
if err != nil {
fmt.Println("cleaning up diff processor: ", err)
errors[repo.Title] = append(errors[repo.Title], "The diff processor failed to clean up properly.")
}
}
breakingChangesSlice := maps.Keys(uniqueBreakingChanges)
sort.Strings(breakingChangesSlice)
Expand Down Expand Up @@ -376,6 +370,11 @@ func computeDiff(repo *source.Repo, oldBranch string, ctlr *source.Controller) (

// Build the diff processor for tpg or tpgb
func buildDiffProcessor(diffProcessorPath, providerLocalPath string, env map[string]string, rnr ExecRunner) error {
for _, path := range []string{"old", "new", "bin"} {
if err := rnr.RemoveAll(filepath.Join(diffProcessorPath, path)); err != nil {
return err
}
}
if err := rnr.PushDir(diffProcessorPath); err != nil {
return err
}
Expand Down Expand Up @@ -442,15 +441,6 @@ func changedSchemaLabels(prNumber int, currentLabels []string, diffProcessorPath
return labels, nil
}

func cleanDiffProcessor(diffProcessorPath string, rnr ExecRunner) error {
for _, path := range []string{"old", "new", "bin"} {
if err := rnr.RemoveAll(filepath.Join(diffProcessorPath, path)); err != nil {
return err
}
}
return nil
}

// Run the missing test detector and return the results.
// Returns an empty string unless there are missing tests.
// Error will be nil unless an error occurs during setup.
Expand Down
Loading