Add link to flake charts in auto-created issues

pull/12229/head
Andriy Dzikh 2021-08-10 13:50:34 -07:00
parent 59a2929394
commit 146f1dd3eb
1 changed files with 2 additions and 1 deletions

View File

@ -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