From 2eb83de16a9efbe4d8b6257bf326a5a201dbfd15 Mon Sep 17 00:00:00 2001 From: coffeegoddd Date: Thu, 21 Jul 2022 15:22:13 -0700 Subject: [PATCH] /.github/{actions,workflows}: fix correctness for both formats --- .../sql-correctness-release-template.json | 6 +++--- .../performance-benchmarking/run-benchmarks.sh | 15 ++++++++++++--- .../scripts/sql-correctness/run-correctness.sh | 14 ++++++++++++-- .github/workflows/ci-email.yaml | 1 + .github/workflows/ci-sql-correctness-release.yaml | 4 ++++ 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/actions/ses-email-action/sql-correctness-release-template.json b/.github/actions/ses-email-action/sql-correctness-release-template.json index 5aee0a1c79..cc72dafa23 100644 --- a/.github/actions/ses-email-action/sql-correctness-release-template.json +++ b/.github/actions/ses-email-action/sql-correctness-release-template.json @@ -1,8 +1,8 @@ { "Template": { "TemplateName": "SqlCorrectnessReleaseTemplate", - "SubjectPart": "SQL Correctness for {{version}}", - "HtmlPart": "\n\n\n \n \n Dolt {{version}} Performance Results\n \n{{results}}", - "TextPart": "Dolt {{version}} SQL correctness,\r\n{{results}}" + "SubjectPart": "SQL Correctness for {{format}} {{version}}", + "HtmlPart": "\n\n\n \n \n Dolt {{format}} {{version}} Performance Results\n \n{{results}}", + "TextPart": "Dolt {{format}} {{version}} SQL correctness,\r\n{{results}}" } } diff --git a/.github/scripts/performance-benchmarking/run-benchmarks.sh b/.github/scripts/performance-benchmarking/run-benchmarks.sh index 28a1e54186..a97e64eb31 100755 --- a/.github/scripts/performance-benchmarking/run-benchmarks.sh +++ b/.github/scripts/performance-benchmarking/run-benchmarks.sh @@ -12,6 +12,11 @@ if [ -z "$TEMPLATE_SCRIPT" ]; then exit 1 fi +if [ -z "$NOMS_BIN_FORMAT" ]; then + echo "Must set NOMS_BIN_FORMAT" + exit 1 +fi + if [ -z "$FROM_SERVER" ] || [ -z "$FROM_VERSION" ] || [ -z "$TO_SERVER" ] || [ -z "$TO_VERSION" ]; then echo "Must set FROM_SERVER FROM_VERSION TO_SERVER and TO_VERSION" exit 1 @@ -31,7 +36,6 @@ if [ "$NOMS_BIN_FORMAT" = "__DOLT_1__" ]; then INIT_BIG_REPO="false" fi - echo "Setting from $FROM_SERVER: $FROM_VERSION" echo "Setting to $TO_SERVER: $TO_VERSION" @@ -45,11 +49,16 @@ actorShort="$lowered-$short" sleep 0.$[ ( $RANDOM % 10 ) + 1 ]s timesuffix=`date +%s%N` -jobname="$actorShort-$timesuffix" + +jobname="$actorShort" +if [ -n "$WITH_TPCC" ]; then + jobname="$jobname-tpcc" +fi +jobname="$jobname-$timesuffix" timeprefix=$(date +%Y/%m/%d) -actorprefix="$MODE/$ACTOR/$actorShort" +actorprefix="$MODE/$ACTOR/$jobname/$NOMS_BIN_FORMAT" format="markdown" if [[ "$MODE" = "release" || "$MODE" = "nightly" ]]; then diff --git a/.github/scripts/sql-correctness/run-correctness.sh b/.github/scripts/sql-correctness/run-correctness.sh index fdd44bc77f..5450dc502f 100755 --- a/.github/scripts/sql-correctness/run-correctness.sh +++ b/.github/scripts/sql-correctness/run-correctness.sh @@ -12,6 +12,11 @@ if [ -z "$TEMPLATE_SCRIPT" ]; then exit 1 fi +if [ -z "$NOMS_BIN_FORMAT" ]; then + echo "Must set NOMS_BIN_FORMAT" + 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" @@ -39,11 +44,16 @@ short=${TO_VERSION:0:8} lowered=$(echo "$ACTOR" | tr '[:upper:]' '[:lower:]') actorShort="$lowered-$short" -jobname="$actorShort" +# random sleep +sleep 0.$[ ( $RANDOM % 10 ) + 1 ]s + +timesuffix=`date +%s%N` + +jobname="$actorShort-$timesuffix" timeprefix=$(date +%Y/%m/%d) -actorprefix="$MODE/$ACTOR/$actorShort" +actorprefix="$MODE/$ACTOR/$jobname/$NOMS_BIN_FORMAT" format="markdown" if [[ "$MODE" = "release" || "$MODE" = "nightly" ]]; then diff --git a/.github/workflows/ci-email.yaml b/.github/workflows/ci-email.yaml index 93d24bf725..0a7df330b5 100644 --- a/.github/workflows/ci-email.yaml +++ b/.github/workflows/ci-email.yaml @@ -39,5 +39,6 @@ jobs: template: ${{ github.event.client_payload.template }} region: us-west-2 version: ${{ github.event.client_payload.version }} + format: ${{ github.event.client_payload.noms_bin_format }} toAddresses: ${{ steps.get-addresses.outputs.addresses }} dataFile: ${{ format('{0}/results.log', github.workspace) }} diff --git a/.github/workflows/ci-sql-correctness-release.yaml b/.github/workflows/ci-sql-correctness-release.yaml index 748d0e4367..ca08d061f6 100644 --- a/.github/workflows/ci-sql-correctness-release.yaml +++ b/.github/workflows/ci-sql-correctness-release.yaml @@ -35,6 +35,9 @@ jobs: runs-on: ubuntu-18.04 needs: set-version-actor name: Dolt SQL Correctness + strategy: + matrix: + dolt_fmt: [ "__LD_1__", "__DOLT_1__" ] steps: - uses: actions/checkout@v2 - uses: azure/setup-kubectl@v2.0 @@ -70,4 +73,5 @@ jobs: ACTOR_EMAIL: ${{ github.event.inputs.email }} REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} KUBECONFIG: "./kubeconfig" + NOMS_BIN_FORMAT: ${{ matrix.dolt_fmt }} TEMPLATE_SCRIPT: "./.github/scripts/sql-correctness/get-dolt-correctness-job-json.sh"