refactor 'init-big-repo' flag to make setup work optional

This commit is contained in:
Andy Arthur
2022-06-02 16:23:58 -07:00
parent 5c4ed4fd5a
commit 88440b090b
4 changed files with 18 additions and 5 deletions
@@ -2,8 +2,8 @@
set -e
if [ "$#" -lt 9 ]; then
echo "Usage: ./get-job-json.sh <jobname> <fromServer> <fromVersion> <toServer> <toVersion> <timePrefix> <actorPrefix> <format> <issueNumber>"
if [ "$#" -lt 10 ]; then
echo "Usage: ./get-job-json.sh <jobname> <fromServer> <fromVersion> <toServer> <toVersion> <timePrefix> <actorPrefix> <format> <issueNumber> <initBigRepo>"
exit 1
fi
@@ -16,6 +16,7 @@ timePrefix="$6"
actorPrefix="$7"
format="$8"
issueNumber="$9"
initBigRepo="${10}"
tpccRegex="tpcc%"
readTests="('oltp_read_only', 'oltp_point_select', 'select_random_points', 'select_random_ranges', 'covering_index_scan', 'index_scan', 'table_scan', 'groupby_scan')"
@@ -74,7 +75,7 @@ echo '
"--sysbenchQueries='"$medianLatencyChangeWritesQuery"'",
"--tpccQueries='"$tpccLatencyQuery"'",
"--tpccQueries='"$tpccTpsQuery"'",
"--init-big-repo"
"--init-big-repo='"$initBigRepo"'""
]
}
],
@@ -51,7 +51,18 @@ fi
# or default to -1
issuenumber=${ISSUE_NUMBER:-"-1"}
source "$TEMPLATE_SCRIPT" "$jobname" "$FROM_SERVER" "$FROM_VERSION" "$TO_SERVER" "$TO_VERSION" "$timeprefix" "$actorprefix" "$format" "$issuenumber" > job.json
source \
"$TEMPLATE_SCRIPT" \
"$jobname" \
"$FROM_SERVER" \
"$FROM_VERSION" \
"$TO_SERVER" \
"$TO_VERSION" \
"$timeprefix" \
"$actorprefix" \
"$format" \
"$issuenumber" \
"$INIT_BIG_REPO" > job.json
out=$(KUBECONFIG="$KUBECONFIG" kubectl apply -f job.json || true)
@@ -95,4 +95,5 @@ jobs:
ACTOR: ${{ github.actor }}
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
KUBECONFIG: "./kubeconfig"
INIT_BIG_REPO: "true"
TEMPLATE_SCRIPT: "./.github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh"
@@ -279,7 +279,7 @@ type Config struct {
TestOptions []string
// ScriptDir is a path to a directory of lua scripts
ScriptDir string
// DirtyClone downloads a database with existing chunks and commits
// InitBigRepo downloads a database with existing chunks and commits
InitBigRepo bool
}