From aa53afdce2597f30584ff742957b2eb3f5400198 Mon Sep 17 00:00:00 2001 From: tico88612 <17496418+tico88612@users.noreply.github.com> Date: Fri, 26 Apr 2024 20:07:59 +0800 Subject: [PATCH 1/4] test: add tools/{rw-heatmaps,testgrid-analysis} to module_dirs Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com> --- scripts/test_lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test_lib.sh b/scripts/test_lib.sh index 550c718d3..29c4a075e 100644 --- a/scripts/test_lib.sh +++ b/scripts/test_lib.sh @@ -166,7 +166,7 @@ function run_for_module { } function module_dirs() { - echo "api pkg client/pkg client/internal/v2 client/v3 server etcdutl etcdctl tests ." + echo "api pkg client/pkg client/internal/v2 client/v3 server etcdutl etcdctl tests tools/rw-heatmaps tools/testgrid-analysis ." } # maybe_run [cmd...] runs given command depending on the DRY_RUN flag. From 6138a4cbba904551660e556536e4038af0f79f94 Mon Sep 17 00:00:00 2001 From: tico88612 <17496418+tico88612@users.noreply.github.com> Date: Mon, 15 Apr 2024 17:59:38 +0800 Subject: [PATCH 2/4] testgrid-analysis: increment-decrement fixed Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com> --- tools/testgrid-analysis/cmd/data.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testgrid-analysis/cmd/data.go b/tools/testgrid-analysis/cmd/data.go index 5ea284e78..899523aa2 100644 --- a/tools/testgrid-analysis/cmd/data.go +++ b/tools/testgrid-analysis/cmd/data.go @@ -95,9 +95,9 @@ func processRow(dashboard, tab string, row *apipb.ListRowsResponse_Row, allTests if maxDays > 0 && header.Started.AsTime().Before(earliestTimeToConsider) { continue } - total += 1 + total++ if _, ok := failureTestStatusesInt[cell.Result]; ok { - failed += 1 + failed++ // markdown table format of | commit | log | logs = append(logs, fmt.Sprintf("| %s | %s | https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/%s/%s |", strings.Join(header.Extra, ","), header.Started.AsTime().String(), tab, header.Build)) } From e3c1812302f63f7ad2dfc7f04735600087e6e689 Mon Sep 17 00:00:00 2001 From: tico88612 <17496418+tico88612@users.noreply.github.com> Date: Thu, 11 Apr 2024 19:12:14 +0800 Subject: [PATCH 3/4] testgrid-analysis: tab is unused & remove Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com> --- tools/testgrid-analysis/cmd/github.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testgrid-analysis/cmd/github.go b/tools/testgrid-analysis/cmd/github.go index 51955ef6b..47445da4a 100644 --- a/tools/testgrid-analysis/cmd/github.go +++ b/tools/testgrid-analysis/cmd/github.go @@ -26,7 +26,7 @@ import ( func createIssues(tests []*TestResultSummary, labels []string) { openIssues := getOpenIssues(labels) for _, t := range tests { - createIssueIfNonExist(tab, t, openIssues, append(labels, "help wanted")) + createIssueIfNonExist(t, openIssues, append(labels, "help wanted")) } } @@ -54,7 +54,7 @@ func getOpenIssues(labels []string) []*github.Issue { return allIssues } -func createIssueIfNonExist(tab string, t *TestResultSummary, issues []*github.Issue, labels []string) { +func createIssueIfNonExist(t *TestResultSummary, issues []*github.Issue, labels []string) { // check if there is already an open issue regarding this test for _, issue := range issues { if strings.Contains(*issue.Title, t.Name) { From a988f7edc5febfdb1bf68798094f34613c013de6 Mon Sep 17 00:00:00 2001 From: tico88612 <17496418+tico88612@users.noreply.github.com> Date: Fri, 26 Apr 2024 07:52:53 +0800 Subject: [PATCH 4/4] script/test_lib: add description about modules Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com> --- scripts/test_lib.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/test_lib.sh b/scripts/test_lib.sh index 29c4a075e..b521a06ee 100644 --- a/scripts/test_lib.sh +++ b/scripts/test_lib.sh @@ -178,6 +178,9 @@ function maybe_run() { fi } +# modules +# returns the list of all modules in the project, not including the tools, +# as they are not considered to be added to the bill for materials. function modules() { modules=( "${ROOT_MODULE}/api/v3"