From 146f1dd3eb1d79eadbbc2d6a9c6f548f5568a7be Mon Sep 17 00:00:00 2001 From: Andriy Dzikh Date: Tue, 10 Aug 2021 13:50:34 -0700 Subject: [PATCH] Add link to flake charts in auto-created issues --- hack/jenkins/test-flake-chart/compute_flake_rate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hack/jenkins/test-flake-chart/compute_flake_rate.sh b/hack/jenkins/test-flake-chart/compute_flake_rate.sh index e57a27a6e9..eb4c6d5165 100644 --- a/hack/jenkins/test-flake-chart/compute_flake_rate.sh +++ b/hack/jenkins/test-flake-chart/compute_flake_rate.sh @@ -161,6 +161,7 @@ for ROW in $(cat ${MID_FLAKES_ISSUES}); do # Clear $ISSUE_BODY_TMP and fill with the standard header. printf "This test has high flake rates for the following environments:\n\n|Environment|Flake Rate (%%)|\n|---|---|\n" > "${ISSUE_BODY_TMP}" + TEST_CHART_LINK_FORMAT='https://storage.googleapis.com/minikube-flake-rate/flake_chart.html?env=%1$s&test='${TEST_NAME} # 1) Filter $MID_FLAKES_DATA to only include entries with the given test name # 2) Sort by flake rates in descending order # 3) Format the entry into a row in the table @@ -168,7 +169,7 @@ for ROW in $(cat ${MID_FLAKES_ISSUES}); do echo "${TEST_NAME}" \ | join -t , -1 1 -2 2 - "${MID_FLAKES_DATA}" \ | sort -t , -g -r -k 3,3 \ - | awk -F, '{ printf "|%s|%s|\n", $2, $3 }' \ + | awk -F, '{ printf "|[%1$s]('$TEST_CHART_LINK_FORMAT')|%2$s|\n", $2, $3 }' \ >> "${ISSUE_BODY_TMP}" # Edit the issue body to use $ISSUE_BODY_TMP