From d40170b23b86bd4799ea08920a643f15e63f98ec Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 29 Aug 2024 13:05:00 +0200 Subject: pkg/covermerger: we don't need branch info The first versions of this code used branches for git checkout. Later the git repos were merged and branch info usage was reduced. The latest changes switched the code from branch checkout to commit checkout. There is no need in branch info anymore and I don't see any use-cases for it. --- dashboard/app/coverage_batch.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'dashboard/app/coverage_batch.go') diff --git a/dashboard/app/coverage_batch.go b/dashboard/app/coverage_batch.go index 04c7d545c..c5cb73999 100644 --- a/dashboard/app/coverage_batch.go +++ b/dashboard/app/coverage_batch.go @@ -37,9 +37,9 @@ func handleBatchCoverage(w http.ResponseWriter, r *http.Request) { if nsConfig.Coverage == nil { continue } - repo, branch := nsConfig.mainRepoBranch() - if repo == "" || branch == "" { - log.Errorf(ctx, "can't find default repo or branch for ns %s", ns) + repo, _ := nsConfig.mainRepoBranch() + if repo == "" { + log.Errorf(ctx, "can't find default repo for ns %s", ns) continue } periods, err := nsDatesToMerge(ctx, ns, daysToMerge, runsPerBatch) @@ -70,7 +70,7 @@ func handleBatchCoverage(w http.ResponseWriter, r *http.Request) { ctx, nsCovConfig.BatchProject, nsCovConfig.BatchServiceAccount, - batchScript(ns, repo, branch, periods, + batchScript(ns, repo, periods, nsCovConfig.JobInitScript, nsCovConfig.SyzEnvInitScript, nsCovConfig.DashboardClientName), @@ -80,7 +80,7 @@ func handleBatchCoverage(w http.ResponseWriter, r *http.Request) { } } -func batchScript(ns, repo, branch string, periods []coveragedb.TimePeriod, +func batchScript(ns, repo string, periods []coveragedb.TimePeriod, jobInitScript, syzEnvInitScript, clientName string) string { if clientName == "" { clientName = defaultDashboardClientName @@ -98,7 +98,6 @@ func batchScript(ns, repo, branch string, periods []coveragedb.TimePeriod, " -w ../workdir-cover-aggregation/" + " -n " + ns + " -r " + repo + - " -b " + branch + " -d " + strconv.Itoa(period.Days) + " -t " + period.DateTo.String() + " -c " + clientName + -- cgit mrf-deployment