/.github/{scripts,workflows}: remove regressions stuff

This commit is contained in:
coffeegoddd
2024-01-11 13:55:53 -08:00
parent 23ac70aeb8
commit eaff3300c2
5 changed files with 33 additions and 184 deletions
@@ -17,28 +17,11 @@ if [ -z "$NOMS_BIN_FORMAT" ]; then
exit 1
fi
if [ -z "$FROM_VERSION" ] && [ -z "$TO_VERSION" ]; then
echo "Must set FROM_VERSION or TO_VERSION for correctness run"
echo "Must set both for regressions run"
if [ -z "$VERSION" ]; then
echo "Must set VERSION for correctness run"
exit 1
fi
if [ ! -z "$FROM_VERSION" ] && [ -z "$TO_VERSION" ]; then
echo "Setting TO_VERSION for correctness run"
TO_VERSION="$FROM_VERSION"
fi
is_regressions=""
if [ -n "$FROM_VERSION" ] && [ -n "$TO_VERSION" ]; then
if [ -z "$PR_NUMBER" ]; then
echo "Must set PR_NUMBER for regressions run"
exit 1
fi
echo "Starting regressions run from: $FROM_VERSION to: $TO_VERSION for pull request: $PR_NUMBER"
is_regressions="true"
fi
if [ -z "$ACTOR" ]; then
echo "Must set ACTOR"
exit 1
@@ -49,9 +32,9 @@ if [ -z "$MODE" ]; then
exit 1
fi
# use first 8 characters of TO_VERSION to differentiate
# use first 8 characters of VERSION to differentiate
# jobs
short=${TO_VERSION:0:8}
short=${VERSION:0:8}
lowered=$(echo "$ACTOR" | tr '[:upper:]' '[:lower:]')
actorShort="$lowered-$short"
@@ -61,7 +44,7 @@ sleep 0.$[ ( $RANDOM % 10 ) + 1 ]s
timesuffix=`date +%s%N`
jobname=""
if [ -n "$is_regressions" ]; then
if [ -n "$PR_NUMBER" ]; then
jobname="$lowered-$PR_NUMBER"
else
jobname="$actorShort-$timesuffix"
@@ -83,18 +66,17 @@ issuenumber=${PR_NUMBER:-"-1"}
source \
"$TEMPLATE_SCRIPT" \
"$jobname" \
"$FROM_VERSION" \
"$TO_VERSION" \
"$VERSION" \
"$timeprefix" \
"$actorprefix" \
"$format" \
"$NOMS_BIN_FORMAT" \
"$issuenumber" > job.json
# delete existing job with same name if this is a regressions job
if [ -n "$is_regressions" ]; then
# delete existing job with same name if this is a pr job
if [ -n "$PR_NUMBER" ]; then
out=$(KUBECONFIG="$KUBECONFIG" kubectl delete job/"$jobname" -n sql-correctness || true)
echo "Delete regressions job if exists: $out"
echo "Delete pr job if exists: $out"
fi
out=$(KUBECONFIG="$KUBECONFIG" kubectl apply -f job.json || true)