/.github/{actions,workflows}: fix correctness for both formats

This commit is contained in:
coffeegoddd
2022-07-21 15:22:13 -07:00
parent f66bc18478
commit 2eb83de16a
5 changed files with 32 additions and 8 deletions

View File

@@ -1,8 +1,8 @@
{
"Template": {
"TemplateName": "SqlCorrectnessReleaseTemplate",
"SubjectPart": "SQL Correctness for {{version}}",
"HtmlPart": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Dolt {{version}} Performance Results</title>\n <style>\n table {\n border: 1px solid black;\n letter-spacing: 1px;\n font-family: sans-serif;\n font-size: .8rem;\n padding: 5px;\n margin: 5px;\n }\n th {\n border: 1px solid rgb(190, 190, 190);\n padding: 10px;\n }\n td {\n padding: 5px;\n }\n tr:nth-child(even) {background-color: #f2f2f2;}\n </style>\n</head><body>{{results}}</body></html>",
"TextPart": "Dolt {{version}} SQL correctness,\r\n{{results}}"
"SubjectPart": "SQL Correctness for {{format}} {{version}}",
"HtmlPart": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Dolt {{format}} {{version}} Performance Results</title>\n <style>\n table {\n border: 1px solid black;\n letter-spacing: 1px;\n font-family: sans-serif;\n font-size: .8rem;\n padding: 5px;\n margin: 5px;\n }\n th {\n border: 1px solid rgb(190, 190, 190);\n padding: 10px;\n }\n td {\n padding: 5px;\n }\n tr:nth-child(even) {background-color: #f2f2f2;}\n </style>\n</head><body>{{results}}</body></html>",
"TextPart": "Dolt {{format}} {{version}} SQL correctness,\r\n{{results}}"
}
}

View File

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

View File

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

View File

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

View File

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