diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-08-29 13:05:00 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-08-29 12:10:57 +0000 |
| commit | d40170b23b86bd4799ea08920a643f15e63f98ec (patch) | |
| tree | a55653bc42dc4cde6537f49c340a7f1b48d93731 /dashboard/app/coverage_batch.go | |
| parent | 9bd464fceeaf3432dae1d1598586454ad21fb42a (diff) | |
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.
Diffstat (limited to 'dashboard/app/coverage_batch.go')
| -rw-r--r-- | dashboard/app/coverage_batch.go | 11 |
1 files changed, 5 insertions, 6 deletions
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 + |
