From 32e23ca4a84787985b391cd254b8e6e4ef5bcbc0 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Tue, 24 Jan 2023 18:26:34 +0300 Subject: [PATCH 01/13] Disable package testing workflow --- .../workflows/packaging-test-pipelines.yml | 4 +- .github/workflows/sqlancer-test-pipelines.yml | 120 ++++++++++++++++++ 2 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/sqlancer-test-pipelines.yml diff --git a/.github/workflows/packaging-test-pipelines.yml b/.github/workflows/packaging-test-pipelines.yml index 0233f2c1a..39a8948ef 100644 --- a/.github/workflows/packaging-test-pipelines.yml +++ b/.github/workflows/packaging-test-pipelines.yml @@ -1,8 +1,8 @@ name: Build tests in packaging images on: - pull_request: - types: [opened, reopened,synchronize] + # pull_request: + # types: [opened, reopened,synchronize] workflow_dispatch: diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml new file mode 100644 index 000000000..9325d65f7 --- /dev/null +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -0,0 +1,120 @@ +name: Run sqlancer on release branch + +on: + push: + branches: "**" + workflow_dispatch: + inputs: + citus_release: + default: release-11.1 + timeout: + default: 1m + +env: + timeout: ${{ inputs.timeout }} + citus_release: ${{ inputs.citus_release }} + +jobs: + + run-sqlancer-test-on-citus: + runs-on: ubuntu-latest + container: + image: 'citus/exttester:15.1-dev-895be1f' + + steps: + - name: Checkout citus release + uses: actions/checkout@v3 + with: + ref: ${{ inputs.citus_release }} + repository: citusdata/citus + + - name: Configure + run: | + echo "Current Shell:$0" + echo "GCC Version: $(gcc --version)" + ./configure 2>&1 | tee output.log + + - name: Make install-all + run: | + make install-all -sj$(cat /proc/cpuinfo | grep "core id" | wc -l) 2>&1 | tee -a output.log + + - name: Setup Maven + uses: s4u/setup-maven-action@v1.6.0 + with: + java-version: 11 + + - name: Checkout Sqlancer + uses: actions/checkout@v3 + with: + ref: master + repository: sqlancer/sqlancer + + - name: Build SQLancer + run: mvn -B package -DskipTests=true + + - name: Set up Citus cluster + run: | + mkdir -p citus/coordinator citus/worker1 citus/worker2 + chown -R circleci:circleci citus + gosu circleci initdb -D citus/coordinator + gosu circleci initdb -D citus/worker1 + gosu circleci initdb -D citus/worker2 + gosu circleci echo "shared_preload_libraries = 'citus'" >> citus/coordinator/postgresql.conf + gosu circleci echo "shared_preload_libraries = 'citus'" >> citus/worker1/postgresql.conf + gosu circleci echo "shared_preload_libraries = 'citus'" >> citus/worker2/postgresql.conf + gosu circleci pg_ctl -D citus/coordinator -o "-p 9700" -l citus/coordinator_logfile start + gosu circleci pg_ctl -D citus/worker1 -o "-p 9701" -l citus/worker1_logfile start + gosu circleci ls citus/worker1 + gosu circleci pg_ctl -D citus/worker2 -o "-p 9702" -l citus/worker2_logfile start + gosu circleci psql -c "CREATE ROLE sqlancer SUPERUSER LOGIN CREATEDB PASSWORD 'sqlancer';" -p 9700 -d postgres + gosu circleci createdb test -p 9700 + gosu circleci psql -c "CREATE ROLE sqlancer SUPERUSER LOGIN CREATEDB PASSWORD 'sqlancer';" -p 9701 -d postgres + gosu circleci createdb test -p 9701 + gosu circleci psql -c "CREATE ROLE sqlancer SUPERUSER LOGIN CREATEDB PASSWORD 'sqlancer';" -p 9702 -d postgres + gosu circleci createdb test -p 9702 + gosu circleci psql -c "CREATE EXTENSION citus;" -p 9700 -d test + gosu circleci psql -c "CREATE EXTENSION citus;" -p 9701 -d test + gosu circleci psql -c "CREATE EXTENSION citus;" -p 9702 -d test + gosu circleci psql -c "SELECT * from citus_add_node('localhost', 9701);" -p 9700 -d test + gosu circleci psql -c "SELECT * from citus_add_node('localhost', 9702);" -p 9700 -d test + - name: Run Tests + run: CITUS_AVAILABLE=true mvn -Dtest=TestCitus test + + - name: Publish Logs + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: logs + path: | + logs + citus/coordinator_logfile + citus/worker1_logfile + citus/worker2_logfile + + - name: Publish Summary + if: ${{ always() }} + run: | + declare -A errors_table + + while read line + do + IFS=':' + read -a delimitedArr <<< "$line" + + file=${delimitedArr[0]} + category=${delimitedArr[2]} + error=${delimitedArr[3]} + + if [[ -z "${errors_table[$error]}" ]] + then + errors_table["$error"]="$file " + else + errors_table["$error"]="${errors_table[$error]} $file " + fi + + done < <(grep -noR "ERROR:.*" logs/citus) + + for key in "${!errors_table[@]}"; do + echo "### $key" >> $GITHUB_STEP_SUMMARY + echo "${errors_table[$key]}" >> $GITHUB_STEP_SUMMARY + done From a5e614a2e6a36097dd1b4f261dfe8c13f124ecf5 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Mon, 6 Feb 2023 16:44:29 +0300 Subject: [PATCH 02/13] Add sqlancer testing pipeline --- .github/workflows/sqlancer-test-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index 9325d65f7..b94b45f01 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -118,3 +118,4 @@ jobs: echo "### $key" >> $GITHUB_STEP_SUMMARY echo "${errors_table[$key]}" >> $GITHUB_STEP_SUMMARY done + shell: bash From 6c16e8b3718236dcc0682df3d4c75a3919f3e950 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Tue, 7 Feb 2023 10:14:14 +0300 Subject: [PATCH 03/13] Reorganize input variables and namings. --- .github/workflows/sqlancer-test-pipelines.yml | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index b94b45f01..da59bdae1 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -1,18 +1,12 @@ -name: Run sqlancer on release branch +name: Run sqlancer tests on: - push: - branches: "**" workflow_dispatch: inputs: citus_release: default: release-11.1 - timeout: - default: 1m - -env: - timeout: ${{ inputs.timeout }} - citus_release: ${{ inputs.citus_release }} + description: 'Branch, tag or SHA to run tests against' + required: true jobs: @@ -38,17 +32,17 @@ jobs: run: | make install-all -sj$(cat /proc/cpuinfo | grep "core id" | wc -l) 2>&1 | tee -a output.log - - name: Setup Maven - uses: s4u/setup-maven-action@v1.6.0 - with: - java-version: 11 - - name: Checkout Sqlancer uses: actions/checkout@v3 with: ref: master repository: sqlancer/sqlancer + - name: Setup Maven + uses: s4u/setup-maven-action@v1.6.0 + with: + java-version: 11 + - name: Build SQLancer run: mvn -B package -DskipTests=true @@ -109,13 +103,13 @@ jobs: then errors_table["$error"]="$file " else - errors_table["$error"]="${errors_table[$error]} $file " + errors_table["$error"]=", ${errors_table[$error]} $file " fi done < <(grep -noR "ERROR:.*" logs/citus) for key in "${!errors_table[@]}"; do echo "### $key" >> $GITHUB_STEP_SUMMARY - echo "${errors_table[$key]}" >> $GITHUB_STEP_SUMMARY + echo "in ${errors_table[$key]}" >> $GITHUB_STEP_SUMMARY done shell: bash From 271a41335a826e2ad56ca64412a1774dfccd434a Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Tue, 7 Feb 2023 10:20:31 +0300 Subject: [PATCH 04/13] Reorder steps --- .github/workflows/sqlancer-test-pipelines.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index da59bdae1..52226151c 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -32,17 +32,18 @@ jobs: run: | make install-all -sj$(cat /proc/cpuinfo | grep "core id" | wc -l) 2>&1 | tee -a output.log - - name: Checkout Sqlancer - uses: actions/checkout@v3 - with: - ref: master - repository: sqlancer/sqlancer - name: Setup Maven uses: s4u/setup-maven-action@v1.6.0 with: java-version: 11 + - name: Checkout Sqlancer + uses: actions/checkout@v3 + with: + ref: master + repository: sqlancer/sqlancer + - name: Build SQLancer run: mvn -B package -DskipTests=true From 599cd565592cfea7cd179046aad057d0b5bd51ed Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Tue, 7 Feb 2023 10:32:14 +0300 Subject: [PATCH 05/13] Fix typo. --- .github/workflows/sqlancer-test-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index 52226151c..71fa7ca28 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -104,7 +104,7 @@ jobs: then errors_table["$error"]="$file " else - errors_table["$error"]=", ${errors_table[$error]} $file " + errors_table["$error"]=" ${errors_table[$error]}, $file " fi done < <(grep -noR "ERROR:.*" logs/citus) From 9085e899d756c0cd79178fac95c97779b4536f70 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Tue, 7 Feb 2023 11:06:17 +0300 Subject: [PATCH 06/13] Revert "Disable package testing workflow" This reverts commit 32e23ca4a84787985b391cd254b8e6e4ef5bcbc0. --- .github/workflows/packaging-test-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packaging-test-pipelines.yml b/.github/workflows/packaging-test-pipelines.yml index 5d2558cab..ae8d9d725 100644 --- a/.github/workflows/packaging-test-pipelines.yml +++ b/.github/workflows/packaging-test-pipelines.yml @@ -1,8 +1,8 @@ name: Build tests in packaging images on: - # pull_request: - # types: [opened, reopened,synchronize] + pull_request: + types: [opened, reopened,synchronize] workflow_dispatch: From b086fbeba5845d9471409fb5ef5860995108ea76 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Wed, 12 Apr 2023 10:55:58 +0300 Subject: [PATCH 07/13] Update sqlancer-test-pipelines.yml --- .github/workflows/sqlancer-test-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index 71fa7ca28..d2f3ad543 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -73,7 +73,7 @@ jobs: gosu circleci psql -c "SELECT * from citus_add_node('localhost', 9701);" -p 9700 -d test gosu circleci psql -c "SELECT * from citus_add_node('localhost', 9702);" -p 9700 -d test - name: Run Tests - run: CITUS_AVAILABLE=true mvn -Dtest=TestCitus test + run: CITUS_AVAILABLE=true mvn -Dtest=TestCitus test --timeout-seconds 3600 - name: Publish Logs if: ${{ always() }} From 09eaba564982cb376b527f931e97d8e3d1c2bb9f Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Thu, 13 Apr 2023 15:39:53 +0300 Subject: [PATCH 08/13] Update sqlancer-test-pipelines.yml --- .github/workflows/sqlancer-test-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index d2f3ad543..b33c06f08 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -73,7 +73,7 @@ jobs: gosu circleci psql -c "SELECT * from citus_add_node('localhost', 9701);" -p 9700 -d test gosu circleci psql -c "SELECT * from citus_add_node('localhost', 9702);" -p 9700 -d test - name: Run Tests - run: CITUS_AVAILABLE=true mvn -Dtest=TestCitus test --timeout-seconds 3600 + run: CITUS_AVAILABLE=true mvn -Dtest=TestCitus test -fn - name: Publish Logs if: ${{ always() }} From 6432024b0c4ed3e8709ece208771027b4e862bcb Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Thu, 13 Apr 2023 16:00:15 +0300 Subject: [PATCH 09/13] Update sqlancer-test-pipelines.yml --- .github/workflows/sqlancer-test-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index b33c06f08..c051895f3 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -73,7 +73,7 @@ jobs: gosu circleci psql -c "SELECT * from citus_add_node('localhost', 9701);" -p 9700 -d test gosu circleci psql -c "SELECT * from citus_add_node('localhost', 9702);" -p 9700 -d test - name: Run Tests - run: CITUS_AVAILABLE=true mvn -Dtest=TestCitus test -fn + run: CITUS_AVAILABLE=true mvn -Dtest=TestCitus test - name: Publish Logs if: ${{ always() }} From 10d46fb28d3815b5970617c12732b8b1209b9a41 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Mon, 3 Jul 2023 16:41:38 +0300 Subject: [PATCH 10/13] Update sqlancer-test-pipelines.yml --- .github/workflows/sqlancer-test-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index c051895f3..0c95ce15e 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -41,7 +41,7 @@ jobs: - name: Checkout Sqlancer uses: actions/checkout@v3 with: - ref: master + ref: main repository: sqlancer/sqlancer - name: Build SQLancer From 21bf66cdddc00d88e606c8dc71bfb2212298839f Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Tue, 4 Jul 2023 11:21:28 +0300 Subject: [PATCH 11/13] Update sqlancer-test-pipelines.yml --- .github/workflows/sqlancer-test-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index 0c95ce15e..d8422cf91 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -41,7 +41,7 @@ jobs: - name: Checkout Sqlancer uses: actions/checkout@v3 with: - ref: main + ref: v2.0.0 repository: sqlancer/sqlancer - name: Build SQLancer From dee67e19170a65f71a22371173151ee945ce389c Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Wed, 5 Jul 2023 16:37:35 +0300 Subject: [PATCH 12/13] Update sqlancer-test-pipelines.yml --- .github/workflows/sqlancer-test-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index d8422cf91..16620a693 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -41,8 +41,8 @@ jobs: - name: Checkout Sqlancer uses: actions/checkout@v3 with: - ref: v2.0.0 - repository: sqlancer/sqlancer + ref: gokhangulbiz/citus_v12_support + repository: gokhangulbiz/sqlancer - name: Build SQLancer run: mvn -B package -DskipTests=true From 55ae7a631da4ec2455b403e5af9bbd953f044f54 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Tue, 19 Sep 2023 09:27:28 +0300 Subject: [PATCH 13/13] Update sqlancer-test-pipelines.yml --- .github/workflows/sqlancer-test-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sqlancer-test-pipelines.yml b/.github/workflows/sqlancer-test-pipelines.yml index 16620a693..b42795120 100644 --- a/.github/workflows/sqlancer-test-pipelines.yml +++ b/.github/workflows/sqlancer-test-pipelines.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: citus_release: - default: release-11.1 + default: main description: 'Branch, tag or SHA to run tests against' required: true @@ -13,7 +13,7 @@ jobs: run-sqlancer-test-on-citus: runs-on: ubuntu-latest container: - image: 'citus/exttester:15.1-dev-895be1f' + image: 'citus/exttester:15.4-dev-c5dad6b' steps: - name: Checkout citus release