From a80413a0636bc312e1527709a396a61b2bb4de46 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Mon, 3 Feb 2025 20:21:21 -0500 Subject: [PATCH 01/34] proof of concept for regression tests in ci_running --- .github/workflows/regression.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 73728451316e..75de9e83ad7c 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -174,6 +174,7 @@ jobs: - name: Get deb url run: python3 .github/get-deb-url.py --reports-path ${{ env.REPORTS_PATH }} --github-env $GITHUB_ENV - name: Run ${{ env.SUITE }} suite + id: run_suite run: EXITCODE=0; python3 -u ${{ env.SUITE }}/regression.py @@ -182,6 +183,20 @@ jobs: ${{ env.args }} || EXITCODE=$?; .github/add_link_to_logs.sh; exit $EXITCODE + - name: Set Commit Status + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.repos.createCommitStatus({ + owner: context.repo.owner, + repo: context.repo.repo, + sha: context.sha, + state: "success", + context: "regression-${{ matrix.SUITE }}", + description: "Job for ${{ matrix.SUITE }} completed with status ${{ steps.run_suite.outcome }}", + target_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + }); - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 From ffaf474c0eb170ae860e1fa166d2a22f23ffbc9c Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 4 Feb 2025 08:24:44 -0500 Subject: [PATCH 02/34] Use the correct sha and report url --- .github/workflows/regression.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 75de9e83ad7c..f561a69cef28 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -185,17 +185,19 @@ jobs: exit $EXITCODE - name: Set Commit Status uses: actions/github-script@v7 + env: + SUITE_REPORT_INDEX_URL: ${{ env.SUITE_REPORT_INDEX_URL }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | github.rest.repos.createCommitStatus({ owner: context.repo.owner, repo: context.repo.repo, - sha: context.sha, + sha: ${{ github.event.pull_request.head.sha || github.sha }}, state: "success", context: "regression-${{ matrix.SUITE }}", description: "Job for ${{ matrix.SUITE }} completed with status ${{ steps.run_suite.outcome }}", - target_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + target_url: process.env.SUITE_REPORT_INDEX_URL }); - name: Create and upload logs if: always() From 3d665e28faf9567d012b0b9101eb4d73309ccd56 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 4 Feb 2025 09:59:26 -0500 Subject: [PATCH 03/34] fix quoting --- .github/workflows/regression.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index f561a69cef28..d4000b2d659e 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -193,9 +193,9 @@ jobs: github.rest.repos.createCommitStatus({ owner: context.repo.owner, repo: context.repo.repo, - sha: ${{ github.event.pull_request.head.sha || github.sha }}, + sha: "${{ github.event.pull_request.head.sha || github.sha }}", state: "success", - context: "regression-${{ matrix.SUITE }}", + context: "Regression-${{ matrix.SUITE }}", description: "Job for ${{ matrix.SUITE }} completed with status ${{ steps.run_suite.outcome }}", target_url: process.env.SUITE_REPORT_INDEX_URL }); From ca2661c81d514df193b28c45b1883e658646bcb0 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 4 Feb 2025 12:54:19 -0500 Subject: [PATCH 04/34] set status and description for all regression tests --- .github/workflows/regression.yml | 83 +++++++++++++++++++++----- .github/workflows/release_branches.yml | 4 +- 2 files changed, 71 insertions(+), 16 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index d4000b2d659e..82598ce9b2ef 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -184,21 +184,12 @@ jobs: .github/add_link_to_logs.sh; exit $EXITCODE - name: Set Commit Status - uses: actions/github-script@v7 + if: always() + run: python3 .github/set_regression_status.py env: - SUITE_REPORT_INDEX_URL: ${{ env.SUITE_REPORT_INDEX_URL }} - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - github.rest.repos.createCommitStatus({ - owner: context.repo.owner, - repo: context.repo.repo, - sha: "${{ github.event.pull_request.head.sha || github.sha }}", - state: "success", - context: "Regression-${{ matrix.SUITE }}", - description: "Job for ${{ matrix.SUITE }} completed with status ${{ steps.run_suite.outcome }}", - target_url: process.env.SUITE_REPORT_INDEX_URL - }); + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JOB_OUTCOME: ${{ steps.run_suite.outcome }} + SUITE_NAME: "Regression ${{ matrix.SUITE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -242,6 +233,7 @@ jobs: - name: Get deb url run: python3 .github/get-deb-url.py --reports-path ${{ env.REPORTS_PATH }} --github-env $GITHUB_ENV - name: Run ${{ env.SUITE }} suite + id: run_suite run: EXITCODE=0; python3 -u alter/regression.py @@ -251,6 +243,13 @@ jobs: ${{ env.args }} || EXITCODE=$?; .github/add_link_to_logs.sh; exit $EXITCODE + - name: Set Commit Status + if: always() + run: python3 .github/set_regression_status.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JOB_OUTCOME: ${{ steps.run_suite.outcome }} + SUITE_NAME: "Regression Alter ${{ matrix.ONLY }} partition" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -294,6 +293,7 @@ jobs: - name: Get deb url run: python3 .github/get-deb-url.py --reports-path ${{ env.REPORTS_PATH }} --github-env $GITHUB_ENV - name: Run ${{ env.SUITE }} suite + id: run_suite run: EXITCODE=0; python3 -u ${{ env.SUITE }}/benchmark.py @@ -310,6 +310,13 @@ jobs: ${{ env.args }} || EXITCODE=$?; .github/add_link_to_logs.sh; exit $EXITCODE + - name: Set Commit Status + if: always() + run: python3 .github/set_regression_status.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JOB_OUTCOME: ${{ steps.run_suite.outcome }} + SUITE_NAME: "Regression Benchmark ${{ matrix.STORAGE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -349,6 +356,7 @@ jobs: - name: Get deb url run: python3 .github/get-deb-url.py --reports-path ${{ env.REPORTS_PATH }} --github-env $GITHUB_ENV - name: Run ${{ env.SUITE }} suite + id: run_suite run: EXITCODE=0; python3 -u ${{ env.SUITE }}/regression.py @@ -358,6 +366,13 @@ jobs: ${{ env.args }} || EXITCODE=$?; .github/add_link_to_logs.sh; exit $EXITCODE + - name: Set Commit Status + if: always() + run: python3 .github/set_regression_status.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JOB_OUTCOME: ${{ steps.run_suite.outcome }} + SUITE_NAME: "Regression Clickhouse Keeper SSL" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -400,6 +415,7 @@ jobs: - name: Get deb url run: python3 .github/get-deb-url.py --reports-path ${{ env.REPORTS_PATH }} --github-env $GITHUB_ENV - name: Run ${{ env.SUITE }} suite + id: run_suite run: EXITCODE=0; python3 -u ${{ env.SUITE }}/regression.py @@ -408,6 +424,13 @@ jobs: ${{ env.args }} || EXITCODE=$?; .github/add_link_to_logs.sh; exit $EXITCODE + - name: Set Commit Status + if: always() + run: python3 .github/set_regression_status.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JOB_OUTCOME: ${{ steps.run_suite.outcome }} + SUITE_NAME: "Regression LDAP ${{ matrix.SUITE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -446,6 +469,7 @@ jobs: - name: Get deb url run: python3 .github/get-deb-url.py --reports-path ${{ env.REPORTS_PATH }} --github-env $GITHUB_ENV - name: Run ${{ env.SUITE }} suite + id: run_suite run: EXITCODE=0; python3 -u ${{ env.SUITE }}/regression.py @@ -454,6 +478,13 @@ jobs: ${{ env.args }} || EXITCODE=$?; .github/add_link_to_logs.sh; exit $EXITCODE + - name: Set Commit Status + if: always() + run: python3 .github/set_regression_status.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JOB_OUTCOME: ${{ steps.run_suite.outcome }} + SUITE_NAME: "Regression Parquet" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -497,6 +528,7 @@ jobs: - name: Get deb url run: python3 .github/get-deb-url.py --reports-path ${{ env.REPORTS_PATH }} --github-env $GITHUB_ENV - name: Run ${{ env.SUITE }} suite + id: run_suite run: EXITCODE=0; python3 -u ${{ env.SUITE }}/regression.py @@ -510,6 +542,13 @@ jobs: ${{ env.args }} || EXITCODE=$?; .github/add_link_to_logs.sh; exit $EXITCODE + - name: Set Commit Status + if: always() + run: python3 .github/set_regression_status.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JOB_OUTCOME: ${{ steps.run_suite.outcome }} + SUITE_NAME: "Regression Parquet ${{ matrix.STORAGE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -553,6 +592,7 @@ jobs: - name: Get deb url run: python3 .github/get-deb-url.py --reports-path ${{ env.REPORTS_PATH }} --github-env $GITHUB_ENV - name: Run ${{ env.SUITE }} suite + id: run_suite run: EXITCODE=0; python3 -u ${{ env.SUITE }}/regression.py @@ -572,6 +612,13 @@ jobs: ${{ env.args }} || EXITCODE=$?; .github/add_link_to_logs.sh; exit $EXITCODE + - name: Set Commit Status + if: always() + run: python3 .github/set_regression_status.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JOB_OUTCOME: ${{ steps.run_suite.outcome }} + SUITE_NAME: "Regression S3 ${{ matrix.STORAGE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -615,6 +662,7 @@ jobs: - name: Get deb url run: python3 .github/get-deb-url.py --reports-path ${{ env.REPORTS_PATH }} --github-env $GITHUB_ENV - name: Run ${{ env.SUITE }} suite + id: run_suite run: EXITCODE=0; python3 -u ${{ env.SUITE }}/regression.py @@ -630,6 +678,13 @@ jobs: ${{ env.args }} || EXITCODE=$?; .github/add_link_to_logs.sh; exit $EXITCODE + - name: Set Commit Status + if: always() + run: python3 .github/set_regression_status.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JOB_OUTCOME: ${{ steps.run_suite.outcome }} + SUITE_NAME: "Regression Tiered Storage ${{ matrix.STORAGE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 1b7f0a244d5a..804723410ba7 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -539,7 +539,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-app-docker-ce, altinity-setup-regression - commit: 18c56fe46fae827748c557e9ebda0599c11b0a55 + commit: 914f1a5256fc987f230c7c8e9a9be595326267da arch: release build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 @@ -550,7 +550,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cax41, altinity-image-arm-app-docker-ce, altinity-setup-regression - commit: 18c56fe46fae827748c557e9ebda0599c11b0a55 + commit: 914f1a5256fc987f230c7c8e9a9be595326267da arch: aarch64 build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 From 31734130bdd4ba6c8b69e456e03ff7e71e1586b9 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 4 Feb 2025 19:08:16 -0500 Subject: [PATCH 05/34] fix file name --- .github/workflows/regression.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 82598ce9b2ef..2e762bfa84f7 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -185,7 +185,7 @@ jobs: exit $EXITCODE - name: Set Commit Status if: always() - run: python3 .github/set_regression_status.py + run: python3 .github/set_builds_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} @@ -245,7 +245,7 @@ jobs: exit $EXITCODE - name: Set Commit Status if: always() - run: python3 .github/set_regression_status.py + run: python3 .github/set_builds_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} @@ -312,7 +312,7 @@ jobs: exit $EXITCODE - name: Set Commit Status if: always() - run: python3 .github/set_regression_status.py + run: python3 .github/set_builds_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} @@ -368,7 +368,7 @@ jobs: exit $EXITCODE - name: Set Commit Status if: always() - run: python3 .github/set_regression_status.py + run: python3 .github/set_builds_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} @@ -426,7 +426,7 @@ jobs: exit $EXITCODE - name: Set Commit Status if: always() - run: python3 .github/set_regression_status.py + run: python3 .github/set_builds_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} @@ -480,7 +480,7 @@ jobs: exit $EXITCODE - name: Set Commit Status if: always() - run: python3 .github/set_regression_status.py + run: python3 .github/set_builds_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} @@ -544,7 +544,7 @@ jobs: exit $EXITCODE - name: Set Commit Status if: always() - run: python3 .github/set_regression_status.py + run: python3 .github/set_builds_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} @@ -614,7 +614,7 @@ jobs: exit $EXITCODE - name: Set Commit Status if: always() - run: python3 .github/set_regression_status.py + run: python3 .github/set_builds_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} @@ -680,7 +680,7 @@ jobs: exit $EXITCODE - name: Set Commit Status if: always() - run: python3 .github/set_regression_status.py + run: python3 .github/set_builds_status.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} From 216130cc27b8e044bfa2fde8d03df4064ea9680a Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 4 Feb 2025 20:29:06 -0500 Subject: [PATCH 06/34] update hash to use requests instead of pygithub --- .github/workflows/release_branches.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 804723410ba7..e9bb30afec08 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -539,7 +539,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-app-docker-ce, altinity-setup-regression - commit: 914f1a5256fc987f230c7c8e9a9be595326267da + commit: 28374af9e1e9e95836865550081e6a01bf33fe7f arch: release build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 @@ -550,7 +550,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cax41, altinity-image-arm-app-docker-ce, altinity-setup-regression - commit: 914f1a5256fc987f230c7c8e9a9be595326267da + commit: 28374af9e1e9e95836865550081e6a01bf33fe7f arch: aarch64 build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 From 3f1d1b6c3dc9839fec689afb4220c5b1d8991801 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 4 Feb 2025 22:08:31 -0500 Subject: [PATCH 07/34] update hash to use shorter status message --- .github/workflows/release_branches.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index e9bb30afec08..3c6700329551 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -539,7 +539,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-app-docker-ce, altinity-setup-regression - commit: 28374af9e1e9e95836865550081e6a01bf33fe7f + commit: 126226ed61411aa7ad68bd6e470149da16ab1eba arch: release build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 @@ -550,7 +550,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cax41, altinity-image-arm-app-docker-ce, altinity-setup-regression - commit: 28374af9e1e9e95836865550081e6a01bf33fe7f + commit: 126226ed61411aa7ad68bd6e470149da16ab1eba arch: aarch64 build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 From 25be027a3a59b0861529ca79cd6082c8ee9375cc Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 4 Feb 2025 23:25:08 -0500 Subject: [PATCH 08/34] update regression hash again --- .github/workflows/release_branches.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 3c6700329551..40e27f974f3f 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -539,7 +539,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-app-docker-ce, altinity-setup-regression - commit: 126226ed61411aa7ad68bd6e470149da16ab1eba + commit: c99795a32358a8d60dd75b3615ae26a5f97df4ae arch: release build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 @@ -550,7 +550,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cax41, altinity-image-arm-app-docker-ce, altinity-setup-regression - commit: 126226ed61411aa7ad68bd6e470149da16ab1eba + commit: c99795a32358a8d60dd75b3615ae26a5f97df4ae arch: aarch64 build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 From d689c264c368a8a7431dbaeba39d6b987ace517a Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Wed, 5 Feb 2025 09:17:38 -0500 Subject: [PATCH 09/34] update regression hash again --- .github/workflows/release_branches.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 40e27f974f3f..43acbf191ee4 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -539,7 +539,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-app-docker-ce, altinity-setup-regression - commit: c99795a32358a8d60dd75b3615ae26a5f97df4ae + commit: a5b768e5aa5d634f17c5b0c960c1e79580058347 arch: release build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 @@ -550,7 +550,7 @@ jobs: secrets: inherit with: runner_type: altinity-on-demand, altinity-type-cax41, altinity-image-arm-app-docker-ce, altinity-setup-regression - commit: c99795a32358a8d60dd75b3615ae26a5f97df4ae + commit: a5b768e5aa5d634f17c5b0c960c1e79580058347 arch: aarch64 build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout_minutes: 300 From 64606a9a7496ba3f27f48c1f2d02b7d83dd9a615 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:30:11 -0500 Subject: [PATCH 10/34] fix regression not differentiating architecture in ci_running --- .github/workflows/regression.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 2e762bfa84f7..869444f1f0c0 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -189,7 +189,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} - SUITE_NAME: "Regression ${{ matrix.SUITE }}" + SUITE_NAME: "Regression ${{ inputs.arch }} ${{ matrix.SUITE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -249,7 +249,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} - SUITE_NAME: "Regression Alter ${{ matrix.ONLY }} partition" + SUITE_NAME: "Regression ${{ inputs.arch }} Alter ${{ matrix.ONLY }} partition" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -316,7 +316,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} - SUITE_NAME: "Regression Benchmark ${{ matrix.STORAGE }}" + SUITE_NAME: "Regression ${{ inputs.arch }} Benchmark ${{ matrix.STORAGE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -372,7 +372,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} - SUITE_NAME: "Regression Clickhouse Keeper SSL" + SUITE_NAME: "Regression ${{ inputs.arch }} Clickhouse Keeper SSL" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -430,7 +430,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} - SUITE_NAME: "Regression LDAP ${{ matrix.SUITE }}" + SUITE_NAME: "Regression ${{ inputs.arch }} LDAP ${{ matrix.SUITE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -484,7 +484,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} - SUITE_NAME: "Regression Parquet" + SUITE_NAME: "Regression ${{ inputs.arch }} Parquet" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -548,7 +548,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} - SUITE_NAME: "Regression Parquet ${{ matrix.STORAGE }}" + SUITE_NAME: "Regression ${{ inputs.arch }} Parquet ${{ matrix.STORAGE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -618,7 +618,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} - SUITE_NAME: "Regression S3 ${{ matrix.STORAGE }}" + SUITE_NAME: "Regression ${{ inputs.arch }} S3 ${{ matrix.STORAGE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 @@ -684,7 +684,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JOB_OUTCOME: ${{ steps.run_suite.outcome }} - SUITE_NAME: "Regression Tiered Storage ${{ matrix.STORAGE }}" + SUITE_NAME: "Regression ${{ inputs.arch }} Tiered Storage ${{ matrix.STORAGE }}" - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 From 14bc97fef9622b8ee0598499eef8df29a5b2c88b Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Thu, 6 Feb 2025 09:47:52 -0500 Subject: [PATCH 11/34] enable uploads to regression db --- .github/workflows/regression.yml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 869444f1f0c0..0fec14f81a80 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -193,6 +193,10 @@ jobs: - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 + - name: Upload logs to regression results database + if: always() + timeout-minutes: 20 + run: .github/upload_results_to_database.sh 1 - uses: actions/upload-artifact@v4 if: always() with: @@ -253,6 +257,10 @@ jobs: - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 + - name: Upload logs to regression results database + if: always() + timeout-minutes: 20 + run: .github/upload_results_to_database.sh 1 - uses: actions/upload-artifact@v4 if: always() with: @@ -320,6 +328,10 @@ jobs: - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 + - name: Upload logs to regression results database + if: always() + timeout-minutes: 20 + run: .github/upload_results_to_database.sh 1 - uses: actions/upload-artifact@v4 if: always() with: @@ -376,6 +388,10 @@ jobs: - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 + - name: Upload logs to regression results database + if: always() + timeout-minutes: 20 + run: .github/upload_results_to_database.sh 1 - uses: actions/upload-artifact@v4 if: always() with: @@ -434,6 +450,10 @@ jobs: - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 + - name: Upload logs to regression results database + if: always() + timeout-minutes: 20 + run: .github/upload_results_to_database.sh 1 - uses: actions/upload-artifact@v4 if: always() with: @@ -488,6 +508,10 @@ jobs: - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 + - name: Upload logs to regression results database + if: always() + timeout-minutes: 20 + run: .github/upload_results_to_database.sh 1 - uses: actions/upload-artifact@v4 if: always() with: @@ -552,6 +576,10 @@ jobs: - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 + - name: Upload logs to regression results database + if: always() + timeout-minutes: 20 + run: .github/upload_results_to_database.sh 1 - uses: actions/upload-artifact@v4 if: always() with: @@ -622,6 +650,10 @@ jobs: - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 + - name: Upload logs to regression results database + if: always() + timeout-minutes: 20 + run: .github/upload_results_to_database.sh 1 - uses: actions/upload-artifact@v4 if: always() with: @@ -688,6 +720,10 @@ jobs: - name: Create and upload logs if: always() run: .github/create_and_upload_logs.sh 1 + - name: Upload logs to regression results database + if: always() + timeout-minutes: 20 + run: .github/upload_results_to_database.sh 1 - uses: actions/upload-artifact@v4 if: always() with: From 1f8be1f28ff736cc8e6e3906f2c04943bc11dc47 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Fri, 7 Feb 2025 07:36:12 -0500 Subject: [PATCH 12/34] increase integration tests timeout --- tests/ci/ci_config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ci/ci_config.py b/tests/ci/ci_config.py index 5f49d36c8219..443ad5ecb7af 100644 --- a/tests/ci/ci_config.py +++ b/tests/ci/ci_config.py @@ -403,11 +403,12 @@ class CI: JobNames.INTEGRATION_TEST_ASAN_OLD_ANALYZER: CommonJobConfigs.INTEGRATION_TEST.with_properties( required_builds=[BuildNames.PACKAGE_ASAN], num_batches=6, + timeout=12000, # the job timed out with default value (7200) ), JobNames.INTEGRATION_TEST_TSAN: CommonJobConfigs.INTEGRATION_TEST.with_properties( required_builds=[BuildNames.PACKAGE_TSAN], num_batches=6, - timeout=9000, # the job timed out with default value (7200) + timeout=12000, # the job timed out with default value (7200) ), JobNames.INTEGRATION_TEST_ARM: CommonJobConfigs.INTEGRATION_TEST.with_properties( required_builds=[BuildNames.PACKAGE_AARCH64], @@ -418,6 +419,7 @@ class CI: required_builds=[BuildNames.PACKAGE_RELEASE], num_batches=4, #release_only=True, + timeout=12000, # the job timed out with default value (7200) ), JobNames.INTEGRATION_TEST_FLAKY: CommonJobConfigs.INTEGRATION_TEST.with_properties( required_builds=[BuildNames.PACKAGE_ASAN], From 4cf2f86811c2a7a6510e1cda1413d51354b07cd7 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Fri, 7 Feb 2025 16:26:51 -0500 Subject: [PATCH 13/34] script for creating combined ci report --- .github/create_combined_ci_report.py | 128 +++++++++++++++++++++++++ .github/workflows/release_branches.yml | 13 +++ 2 files changed, 141 insertions(+) create mode 100755 .github/create_combined_ci_report.py diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py new file mode 100755 index 000000000000..a237d39d44e4 --- /dev/null +++ b/.github/create_combined_ci_report.py @@ -0,0 +1,128 @@ +#!/usr/bin/env python3 +import argparse +import os +from pathlib import Path + +import requests +from clickhouse_driver import Client +import boto3 +from botocore.exceptions import NoCredentialsError + +DATABASE_HOST_VAR = "CHECKS_DATABASE_HOST" +DATABASE_USER_VAR = "CHECKS_DATABASE_USER" +DATABASE_PASSWORD_VAR = "CHECKS_DATABASE_PASSWORD" + +def get_checks_fails(client: Client, job_url: str): + columns = "check_name, check_status, test_name, test_status, report_url as results_link" + query = f"""SELECT {columns} FROM `gh-data`.checks + WHERE task_url='{job_url}' + AND test_status in ('FAIL', 'ERROR') + """ + return client.query_dataframe(query) + + +def get_checks_errors(client: Client, job_url: str): + columns = "check_name, check_status, test_name, test_status, report_url as results_link" + query = f"""SELECT {columns} FROM `gh-data`.checks + WHERE task_url='{job_url}' + AND check_status=='error' + """ + return client.query_dataframe(query) + + +def get_regression_fails(client: Client, job_url: str): + columns = "architecture, result, test_name, report_url as results_link" + query = f"""SELECT {columns} FROM `gh-data`.clickhouse_regression_results + WHERE job_url='{job_url}' + AND result IN ('Fail', 'Error') + """ + return client.query_dataframe(query) + +def url_to_html_link(url: str) -> str: + if not url: + return "" + text = url.split("/")[-1] + if not text: + text = "results" + return f'{text}' + +def format_results_as_html_table(results) -> str: + if results.empty: + return "" + results.columns = [col.replace("_", " ").title() for col in results.columns] + html = results.to_html(index=False, formatters={"Results Link": url_to_html_link}, escape=False) + return html + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser(description="Create a combined CI report.") + parser.add_argument( + "--actions-job-url", required=True, help="URL of the actions job" + ) + parser.add_argument( + "--ci-running-report-url", required=True, help="URL of the CI running report" + ) + return parser.parse_args() + + +def main(): + args = parse_args() + + client = Client( + host=os.getenv(DATABASE_HOST_VAR), + user=os.getenv(DATABASE_USER_VAR), + password=os.getenv(DATABASE_PASSWORD_VAR), + port=9440, + secure="y", + verify=False, + settings={"use_numpy": True}, + ) + + ci_running_report_url = args.ci_running_report_url + response = requests.get(ci_running_report_url) + + report_destination_url = ci_running_report_url.replace("ci_running.html", "combined_report.html") + _, pr_number, commit_sha, _ = ci_running_report_url.rsplit("/", 3) + + if response.status_code == 200: + ci_running_report = response.text + else: + print( + f"Failed to download CI running report. Status code: {response.status_code}" + ) + + combined_report = f"""{ci_running_report.split("")[0]} +

Checks Fails

+{format_results_as_html_table(get_checks_fails(client, args.actions_job_url))} + +

Checks Errors

+{format_results_as_html_table(get_checks_errors(client, args.actions_job_url))} + +

Regression Fails

+{format_results_as_html_table(get_regression_fails(client, args.actions_job_url))} + + + +""" + + report_path = Path("combined_report.html") + report_path.write_text(combined_report, encoding="utf-8") + + # Upload the report to S3 + s3_client = boto3.client('s3') + + try: + s3_client.put_object( + Bucket="altinity-build-artifacts", + Key=f"{pr_number}/{commit_sha}/combined_report.html", + Body=combined_report, + ContentType='text/html' + ) + except NoCredentialsError: + print("Credentials not available for S3 upload.") + + print(report_destination_url) + + +if __name__ == "__main__": + main() diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 43acbf191ee4..e81954d31a91 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -626,3 +626,16 @@ jobs: ${{ toJson(needs) }} EOF python3 ./tests/ci/ci_buddy.py --check-wf-status + - name: Create and upload combined report + if: ${{ !cancelled() }} + env: + build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + pr_number: ${{ github.event.number }} + run: | + python3 -m venv venv + source venv/bin/activate + pip install clickhouse-driver==0.2.8 + + python3 ./github/create_combined_report.py \ + --actions-job-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} \ + --ci-running-report-url https://s3.amazonaws.com/altinity-build-artifacts/${{ env.pr_number }}/${{ env.build_sha }}/ci_running.html From 00230a14a39c8cab999ac6b35726119882f34129 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Fri, 7 Feb 2025 22:37:56 -0500 Subject: [PATCH 14/34] venv not installed by default, try without --- .github/workflows/release_branches.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index e81954d31a91..60ace7b5b801 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -632,8 +632,6 @@ jobs: build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} pr_number: ${{ github.event.number }} run: | - python3 -m venv venv - source venv/bin/activate pip install clickhouse-driver==0.2.8 python3 ./github/create_combined_report.py \ From 176b1a733c7005c236d15126a23b42e646f02329 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Sat, 8 Feb 2025 10:48:29 -0500 Subject: [PATCH 15/34] fix typo --- .github/workflows/release_branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 60ace7b5b801..75642b582029 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -634,6 +634,6 @@ jobs: run: | pip install clickhouse-driver==0.2.8 - python3 ./github/create_combined_report.py \ + python3 .github/create_combined_report.py \ --actions-job-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} \ --ci-running-report-url https://s3.amazonaws.com/altinity-build-artifacts/${{ env.pr_number }}/${{ env.build_sha }}/ci_running.html From 7bf0f0ab4cfde16fc6acfce883f212f493c49a1d Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Sat, 8 Feb 2025 19:39:18 -0500 Subject: [PATCH 16/34] another typo --- .github/workflows/release_branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 75642b582029..7492dfcf3d80 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -634,6 +634,6 @@ jobs: run: | pip install clickhouse-driver==0.2.8 - python3 .github/create_combined_report.py \ + python3 .github/create_combined_ci_report.py \ --actions-job-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} \ --ci-running-report-url https://s3.amazonaws.com/altinity-build-artifacts/${{ env.pr_number }}/${{ env.build_sha }}/ci_running.html From ee93267c8610b91e0db8484cb01852a0cd1b8498 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Sun, 9 Feb 2025 10:49:49 -0500 Subject: [PATCH 17/34] need to isntall dependencies explicitly --- .github/workflows/release_branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 7492dfcf3d80..d8427462b67b 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -632,7 +632,7 @@ jobs: build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} pr_number: ${{ github.event.number }} run: | - pip install clickhouse-driver==0.2.8 + pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.2.0 python3 .github/create_combined_ci_report.py \ --actions-job-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} \ From d53c21351eeaa55ccba5597ae5433becdd15eb4f Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Sun, 9 Feb 2025 16:47:19 -0500 Subject: [PATCH 18/34] need to specify secrets --- .github/workflows/release_branches.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index d8427462b67b..7581fbd09056 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -629,6 +629,9 @@ jobs: - name: Create and upload combined report if: ${{ !cancelled() }} env: + CHECKS_DATABASE_HOST: ${{ secrets.CHECKS_DATABASE_HOST }} + CHECKS_DATABASE_USER: ${{ secrets.CHECKS_DATABASE_USER }} + CHECKS_DATABASE_PASSWORD: ${{ secrets.CHECKS_DATABASE_PASSWORD }} build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} pr_number: ${{ github.event.number }} run: | From 2365916d0860a1bc630522d1ddda96d533c09333 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Mon, 10 Feb 2025 08:24:56 -0500 Subject: [PATCH 19/34] cleanup --- .github/create_combined_ci_report.py | 62 +++++++++++++++++--------- .github/workflows/release_branches.yml | 6 +-- 2 files changed, 45 insertions(+), 23 deletions(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index a237d39d44e4..992f9feb1f2b 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -11,9 +11,13 @@ DATABASE_HOST_VAR = "CHECKS_DATABASE_HOST" DATABASE_USER_VAR = "CHECKS_DATABASE_USER" DATABASE_PASSWORD_VAR = "CHECKS_DATABASE_PASSWORD" +S3_BUCKET = "altinity-build-artifacts" + def get_checks_fails(client: Client, job_url: str): - columns = "check_name, check_status, test_name, test_status, report_url as results_link" + columns = ( + "check_name, check_status, test_name, test_status, report_url as results_link" + ) query = f"""SELECT {columns} FROM `gh-data`.checks WHERE task_url='{job_url}' AND test_status in ('FAIL', 'ERROR') @@ -22,7 +26,9 @@ def get_checks_fails(client: Client, job_url: str): def get_checks_errors(client: Client, job_url: str): - columns = "check_name, check_status, test_name, test_status, report_url as results_link" + columns = ( + "check_name, check_status, test_name, test_status, report_url as results_link" + ) query = f"""SELECT {columns} FROM `gh-data`.checks WHERE task_url='{job_url}' AND check_status=='error' @@ -38,6 +44,7 @@ def get_regression_fails(client: Client, job_url: str): """ return client.query_dataframe(query) + def url_to_html_link(url: str) -> str: if not url: return "" @@ -46,13 +53,16 @@ def url_to_html_link(url: str) -> str: text = "results" return f'{text}' + def format_results_as_html_table(results) -> str: if results.empty: return "" results.columns = [col.replace("_", " ").title() for col in results.columns] - html = results.to_html(index=False, formatters={"Results Link": url_to_html_link}, escape=False) + html = results.to_html( + index=False, formatters={"Results Link": url_to_html_link}, escape=False + ) return html - + def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description="Create a combined CI report.") @@ -60,7 +70,13 @@ def parse_args() -> argparse.Namespace: "--actions-job-url", required=True, help="URL of the actions job" ) parser.add_argument( - "--ci-running-report-url", required=True, help="URL of the CI running report" + "--pr-number", required=True, help="Pull request number for the S3 path" + ) + parser.add_argument( + "--commit-sha", required=True, help="Commit SHA for the S3 path" + ) + parser.add_argument( + "--no-upload", action="store_true", help="Do not upload the report" ) return parser.parse_args() @@ -68,7 +84,7 @@ def parse_args() -> argparse.Namespace: def main(): args = parse_args() - client = Client( + db_client = Client( host=os.getenv(DATABASE_HOST_VAR), user=os.getenv(DATABASE_USER_VAR), password=os.getenv(DATABASE_PASSWORD_VAR), @@ -78,45 +94,51 @@ def main(): settings={"use_numpy": True}, ) - ci_running_report_url = args.ci_running_report_url - response = requests.get(ci_running_report_url) - - report_destination_url = ci_running_report_url.replace("ci_running.html", "combined_report.html") - _, pr_number, commit_sha, _ = ci_running_report_url.rsplit("/", 3) + s3_path = ( + f"https://s3.amazonaws.com/{S3_BUCKET}/{args.pr_number}/{args.commit_sha}/" + ) + report_destination_url = s3_path + "combined_report.html" + ci_running_report_url = s3_path + "ci_running.html" + response = requests.get(ci_running_report_url) if response.status_code == 200: ci_running_report = response.text else: print( - f"Failed to download CI running report. Status code: {response.status_code}" + f"Failed to download CI running report. Status code: {response.status_code}, Response: {response.text}" ) + exit(1) combined_report = f"""{ci_running_report.split("")[0]}

Checks Fails

-{format_results_as_html_table(get_checks_fails(client, args.actions_job_url))} +{format_results_as_html_table(get_checks_fails(db_client, args.actions_job_url))}

Checks Errors

-{format_results_as_html_table(get_checks_errors(client, args.actions_job_url))} +{format_results_as_html_table(get_checks_errors(db_client, args.actions_job_url))}

Regression Fails

-{format_results_as_html_table(get_regression_fails(client, args.actions_job_url))} +{format_results_as_html_table(get_regression_fails(db_client, args.actions_job_url))} """ - + report_path = Path("combined_report.html") report_path.write_text(combined_report, encoding="utf-8") + if args.no_upload: + print(f"Report saved to {report_path}") + exit(0) + # Upload the report to S3 - s3_client = boto3.client('s3') + s3_client = boto3.client("s3") try: s3_client.put_object( - Bucket="altinity-build-artifacts", - Key=f"{pr_number}/{commit_sha}/combined_report.html", + Bucket=S3_BUCKET, + Key=f"{args.pr_number}/{args.commit_sha}/combined_report.html", Body=combined_report, - ContentType='text/html' + ContentType="text/html; charset=utf-8", ) except NoCredentialsError: print("Credentials not available for S3 upload.") diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 7581fbd09056..7132d5b0429a 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -637,6 +637,6 @@ jobs: run: | pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.2.0 - python3 .github/create_combined_ci_report.py \ - --actions-job-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} \ - --ci-running-report-url https://s3.amazonaws.com/altinity-build-artifacts/${{ env.pr_number }}/${{ env.build_sha }}/ci_running.html + python3 .github/create_combined_ci_report.py --pr-number ${{ env.pr_number }} --commit_sha ${{ env.build_sha }} \ + --actions-job-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} | tee report_link.txt + echo "Combined CI Report: [View Report]($(cat report_link.txt))" >> $GITHUB_STEP_SUMMARY From adba7309e8d269758693c9eb63dc29c8922d454c Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Mon, 10 Feb 2025 16:26:29 -0500 Subject: [PATCH 20/34] fix typo --- .github/workflows/release_branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 7132d5b0429a..ea9ad0151888 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -637,6 +637,6 @@ jobs: run: | pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.2.0 - python3 .github/create_combined_ci_report.py --pr-number ${{ env.pr_number }} --commit_sha ${{ env.build_sha }} \ + python3 .github/create_combined_ci_report.py --pr-number ${{ env.pr_number }} --commit-sha ${{ env.build_sha }} \ --actions-job-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} | tee report_link.txt echo "Combined CI Report: [View Report]($(cat report_link.txt))" >> $GITHUB_STEP_SUMMARY From ed4967748f9835d065daa11b91b64c307944a219 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Mon, 10 Feb 2025 17:02:04 -0500 Subject: [PATCH 21/34] Account for regression reruns --- .github/create_combined_ci_report.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index 992f9feb1f2b..1041c15a8a91 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -37,11 +37,20 @@ def get_checks_errors(client: Client, job_url: str): def get_regression_fails(client: Client, job_url: str): - columns = "architecture, result, test_name, report_url as results_link" - query = f"""SELECT {columns} FROM `gh-data`.clickhouse_regression_results - WHERE job_url='{job_url}' - AND result IN ('Fail', 'Error') - """ + # If you rename the alias for report_url, also update the formatters in format_results_as_html_table + query = f"""SELECT arch, status, test_name, results_link + FROM ( + SELECT + architecture as arch, + test_name, + argMax(result, start_time) AS status, + job_url, + report_url as results_link + FROM `gh-data`.clickhouse_regression_results + GROUP BY architecture, test_name, job_url, report_url) + WHERE job_url='{job_url}' + AND result IN ('Fail', 'Error') + """ return client.query_dataframe(query) From 12e717f03020f681bfd21f06cfe4c86d029ac5df Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Mon, 10 Feb 2025 17:05:51 -0500 Subject: [PATCH 22/34] change title --- .github/create_combined_ci_report.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index 1041c15a8a91..de7dfe5f3099 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -130,7 +130,9 @@ def main(): -""" +""".replace( + "ClickHouse CI running for", "Combined CI Report for" + ) report_path = Path("combined_report.html") report_path.write_text(combined_report, encoding="utf-8") From d49fede1d9d491e8ef28f8698c59a12f095ea272 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Mon, 10 Feb 2025 17:28:55 -0500 Subject: [PATCH 23/34] rename actions-job-url to actions-run-url because that's what it really is --- .github/create_combined_ci_report.py | 8 ++++---- .github/workflows/release_branches.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index de7dfe5f3099..de7bdd24774b 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -76,7 +76,7 @@ def format_results_as_html_table(results) -> str: def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description="Create a combined CI report.") parser.add_argument( - "--actions-job-url", required=True, help="URL of the actions job" + "--actions-run-url", required=True, help="URL of the actions run" ) parser.add_argument( "--pr-number", required=True, help="Pull request number for the S3 path" @@ -120,13 +120,13 @@ def main(): combined_report = f"""{ci_running_report.split("")[0]}

Checks Fails

-{format_results_as_html_table(get_checks_fails(db_client, args.actions_job_url))} +{format_results_as_html_table(get_checks_fails(db_client, args.actions_run_url))}

Checks Errors

-{format_results_as_html_table(get_checks_errors(db_client, args.actions_job_url))} +{format_results_as_html_table(get_checks_errors(db_client, args.actions_run_url))}

Regression Fails

-{format_results_as_html_table(get_regression_fails(db_client, args.actions_job_url))} +{format_results_as_html_table(get_regression_fails(db_client, args.actions_run_url))} diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index ea9ad0151888..fbc3801b95c9 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -638,5 +638,5 @@ jobs: pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.2.0 python3 .github/create_combined_ci_report.py --pr-number ${{ env.pr_number }} --commit-sha ${{ env.build_sha }} \ - --actions-job-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} | tee report_link.txt + --actions-run-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} | tee report_link.txt echo "Combined CI Report: [View Report]($(cat report_link.txt))" >> $GITHUB_STEP_SUMMARY From 76555912ea32ef0ebf6a55e46ad3e436af46666a Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 07:51:16 -0500 Subject: [PATCH 24/34] fix regression query --- .github/create_combined_ci_report.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index de7bdd24774b..3d19bb2ac0e3 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -47,9 +47,10 @@ def get_regression_fails(client: Client, job_url: str): job_url, report_url as results_link FROM `gh-data`.clickhouse_regression_results - GROUP BY architecture, test_name, job_url, report_url) + GROUP BY architecture, test_name, job_url, report_url + ) WHERE job_url='{job_url}' - AND result IN ('Fail', 'Error') + AND status IN ('Fail', 'Error') """ return client.query_dataframe(query) From 420d17c4e5532f1cdcc112f86d3c08606290bd30 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 10:59:58 -0500 Subject: [PATCH 25/34] add toc and order by --- .github/create_combined_ci_report.py | 47 +++++++++++++++++++++------- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index 3d19bb2ac0e3..ac729203c68f 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -20,7 +20,9 @@ def get_checks_fails(client: Client, job_url: str): ) query = f"""SELECT {columns} FROM `gh-data`.checks WHERE task_url='{job_url}' - AND test_status in ('FAIL', 'ERROR') + AND test_status in ('FAIL', 'ERROR') + AND check_status!='error' + ORDER BY check_name, test_name """ return client.query_dataframe(query) @@ -32,6 +34,7 @@ def get_checks_errors(client: Client, job_url: str): query = f"""SELECT {columns} FROM `gh-data`.checks WHERE task_url='{job_url}' AND check_status=='error' + ORDER BY check_name, test_name """ return client.query_dataframe(query) @@ -47,7 +50,8 @@ def get_regression_fails(client: Client, job_url: str): job_url, report_url as results_link FROM `gh-data`.clickhouse_regression_results - GROUP BY architecture, test_name, job_url, report_url + GROUP BY architecture, test_name, job_url, report_url, start_time + ORDER BY start_time DESC, length(test_name) DESC ) WHERE job_url='{job_url}' AND status IN ('Fail', 'Error') @@ -119,21 +123,40 @@ def main(): ) exit(1) - combined_report = f"""{ci_running_report.split("")[0]} -

Checks Fails

-{format_results_as_html_table(get_checks_fails(db_client, args.actions_run_url))} + fail_results = { + "checks_fails": get_checks_fails(db_client, args.actions_run_url), + "checks_errors": get_checks_errors(db_client, args.actions_run_url), + "regression_fails": get_regression_fails(db_client, args.actions_run_url), + } -

Checks Errors

-{format_results_as_html_table(get_checks_errors(db_client, args.actions_run_url))} + combined_report = ci_running_report.replace( + "ClickHouse CI running for", "Combined CI Report for" + ).replace( + "", + f""" +

Table of Contents

+ +

CI Jobs Status

+""", + ) + combined_report = f"""{combined_report.split("")[0]} +

Checks Fails

+{format_results_as_html_table(fail_results['checks_fails'])} + +

Checks Errors

+{format_results_as_html_table(fail_results['checks_errors'])} -

Regression Fails

-{format_results_as_html_table(get_regression_fails(db_client, args.actions_run_url))} +

Regression Fails

+{format_results_as_html_table(fail_results['regression_fails'])} -""".replace( - "ClickHouse CI running for", "Combined CI Report for" - ) +""" report_path = Path("combined_report.html") report_path.write_text(combined_report, encoding="utf-8") From 73af40eb55e74bd490dcf4ccfcb7e45b7186eae8 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:01:35 -0500 Subject: [PATCH 26/34] docstrings --- .github/create_combined_ci_report.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index ac729203c68f..97ae9e227061 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -15,6 +15,10 @@ def get_checks_fails(client: Client, job_url: str): + """ + Get tests that did not succeed for the given job URL. + Exclude checks that have status 'error' as they are counted in get_checks_errors. + """ columns = ( "check_name, check_status, test_name, test_status, report_url as results_link" ) @@ -28,6 +32,9 @@ def get_checks_fails(client: Client, job_url: str): def get_checks_errors(client: Client, job_url: str): + """ + Get checks that have status 'error' for the given job URL. + """ columns = ( "check_name, check_status, test_name, test_status, report_url as results_link" ) @@ -40,6 +47,9 @@ def get_checks_errors(client: Client, job_url: str): def get_regression_fails(client: Client, job_url: str): + """ + Get regression tests that did not succeed for the given job URL. + """ # If you rename the alias for report_url, also update the formatters in format_results_as_html_table query = f"""SELECT arch, status, test_name, results_link FROM ( From e116e0d0aeb102d2c61ee4c841a7dbe038b8d16d Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:21:57 -0500 Subject: [PATCH 27/34] working table sorting --- .github/create_combined_ci_report.py | 37 +++++++++++++++++----------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index 97ae9e227061..8c315323760e 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -82,8 +82,14 @@ def format_results_as_html_table(results) -> str: if results.empty: return "" results.columns = [col.replace("_", " ").title() for col in results.columns] - html = results.to_html( - index=False, formatters={"Results Link": url_to_html_link}, escape=False + html = ( + results.to_html( + index=False, formatters={"Results Link": url_to_html_link}, escape=False + ) # tbody/thead tags interfere with the table sorting script + .replace("\n", "") + .replace("\n", "") + .replace("\n", "") + .replace("\n", "") ) return html @@ -126,7 +132,7 @@ def main(): response = requests.get(ci_running_report_url) if response.status_code == 200: - ci_running_report = response.text + ci_running_report: str = response.text else: print( f"Failed to download CI running report. Status code: {response.status_code}, Response: {response.text}" @@ -139,11 +145,11 @@ def main(): "regression_fails": get_regression_fails(db_client, args.actions_run_url), } - combined_report = ci_running_report.replace( - "ClickHouse CI running for", "Combined CI Report for" - ).replace( - "", - f""" + combined_report = ( + ci_running_report.replace("ClickHouse CI running for", "Combined CI Report for") + .replace( + "", + f"""

Table of Contents

CI Jobs Status

""", - ) - combined_report = f"""{combined_report.split("")[0]} + ) + .replace( + "", + f""" +

Checks Fails

{format_results_as_html_table(fail_results['checks_fails'])} @@ -163,11 +172,9 @@ def main():

Regression Fails

{format_results_as_html_table(fail_results['regression_fails'])} - - - -""" - +""", + ) + ) report_path = Path("combined_report.html") report_path.write_text(combined_report, encoding="utf-8") From 896c2b977ea17b3c3e20a677861476fc2c826bc5 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 12:18:19 -0500 Subject: [PATCH 28/34] better line wrapping of test names and layout tweak --- .github/create_combined_ci_report.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index 8c315323760e..f90899e4d79a 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -78,13 +78,23 @@ def url_to_html_link(url: str) -> str: return f'{text}' +def format_test_name_for_linewrap(text: str) -> str: + """Tweak the test name to improve line wrapping.""" + return text.replace(".py::", "/") + + def format_results_as_html_table(results) -> str: if results.empty: return "" results.columns = [col.replace("_", " ").title() for col in results.columns] html = ( results.to_html( - index=False, formatters={"Results Link": url_to_html_link}, escape=False + index=False, + formatters={ + "Results Link": url_to_html_link, + "Test Name": format_test_name_for_linewrap, + }, + escape=False, ) # tbody/thead tags interfere with the table sorting script .replace("\n", "") .replace("\n", "") @@ -148,17 +158,17 @@ def main(): combined_report = ( ci_running_report.replace("ClickHouse CI running for", "Combined CI Report for") .replace( - "", - f""" -

Table of Contents

+ "", + f"""

Table of Contents

+

CI Jobs Status

-""", +
""", ) .replace( "
", From 948640c3e4401fd8a394ead005e5a0a6978af654 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 12:25:23 -0500 Subject: [PATCH 29/34] increase timeout for arm integration tests --- tests/ci/ci_config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ci/ci_config.py b/tests/ci/ci_config.py index 443ad5ecb7af..0a812953e351 100644 --- a/tests/ci/ci_config.py +++ b/tests/ci/ci_config.py @@ -414,6 +414,7 @@ class CI: required_builds=[BuildNames.PACKAGE_AARCH64], num_batches=6, runner_type=Runners.FUNC_TESTER_ARM, + timeout=9000, # the job timed out with default value (7200) ), JobNames.INTEGRATION_TEST: CommonJobConfigs.INTEGRATION_TEST.with_properties( required_builds=[BuildNames.PACKAGE_RELEASE], From 66f7c1cc961672caaad0c73236d738ebaabe4147 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 12:47:57 -0500 Subject: [PATCH 30/34] more responsive table size --- .github/create_combined_ci_report.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index f90899e4d79a..ea94caa9f75c 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -100,6 +100,7 @@ def format_results_as_html_table(results) -> str: .replace("\n", "") .replace("\n", "") .replace("\n", "") + .replace(' Date: Tue, 11 Feb 2025 14:10:49 -0500 Subject: [PATCH 31/34] little tweaks --- .github/workflows/release_branches.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index fbc3801b95c9..36bf370954cb 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -632,11 +632,19 @@ jobs: CHECKS_DATABASE_HOST: ${{ secrets.CHECKS_DATABASE_HOST }} CHECKS_DATABASE_USER: ${{ secrets.CHECKS_DATABASE_USER }} CHECKS_DATABASE_PASSWORD: ${{ secrets.CHECKS_DATABASE_PASSWORD }} - build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - pr_number: ${{ github.event.number }} + COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + PR_NUMBER: ${{ github.event.number }} + ACTIONS_RUN_URL: ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} + shell: bash run: | pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.2.0 - python3 .github/create_combined_ci_report.py --pr-number ${{ env.pr_number }} --commit-sha ${{ env.build_sha }} \ - --actions-run-url ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} | tee report_link.txt - echo "Combined CI Report: [View Report]($(cat report_link.txt))" >> $GITHUB_STEP_SUMMARY + REPORT_LINK=$(python3 .github/create_combined_ci_report.py --pr-number $PR_NUMBER --commit-sha $COMMIT_SHA --actions-run-url $ACTIONS_RUN_URL) + + IS_VALID_URL=$(echo $REPORT_LINK | grep -E '^https?://') + if [[ -n $IS_VALID_URL ]]; then + echo "Combined CI Report: [View Report]($REPORT_LINK)" >> $GITHUB_STEP_SUMMARY + else + echo "Error: $REPORT_LINK" >> $GITHUB_STEP_SUMMARY + exit 1 + fi From 03590fe5d1b3db96bd4427aa6f1f6ffe0edb4ef2 Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 14:16:42 -0500 Subject: [PATCH 32/34] adjust column order --- .github/create_combined_ci_report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index ea94caa9f75c..64a284b316ec 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -20,7 +20,7 @@ def get_checks_fails(client: Client, job_url: str): Exclude checks that have status 'error' as they are counted in get_checks_errors. """ columns = ( - "check_name, check_status, test_name, test_status, report_url as results_link" + "check_status, check_name, test_status, test_name, report_url as results_link" ) query = f"""SELECT {columns} FROM `gh-data`.checks WHERE task_url='{job_url}' @@ -36,7 +36,7 @@ def get_checks_errors(client: Client, job_url: str): Get checks that have status 'error' for the given job URL. """ columns = ( - "check_name, check_status, test_name, test_status, report_url as results_link" + "check_status, check_name, test_status, test_name, report_url as results_link" ) query = f"""SELECT {columns} FROM `gh-data`.checks WHERE task_url='{job_url}' From 4ab146ddcd29272899436226db0d620086d3ef3e Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 14:45:36 -0500 Subject: [PATCH 33/34] drop redundant rows from the regression fails table --- .github/create_combined_ci_report.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index 64a284b316ec..2eed0aaa2f18 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -2,6 +2,7 @@ import argparse import os from pathlib import Path +from itertools import combinations import requests from clickhouse_driver import Client @@ -46,6 +47,23 @@ def get_checks_errors(client: Client, job_url: str): return client.query_dataframe(query) +def drop_prefix_rows(df, column_to_clean): + """ + Drop rows from the dataframe if: + - the row matches another row completely except for the specified column + - the specified column of that row is a prefix of the same column in another row + """ + to_drop = set() + reference_columns = [col for col in df.columns if col != column_to_clean] + for (i, row_1), (j, row_2) in combinations(df.iterrows(), 2): + if all(row_1[col] == row_2[col] for col in reference_columns): + if row_2[column_to_clean].startswith(row_1[column_to_clean]): + to_drop.add(i) + elif row_1[column_to_clean].startswith(row_2[column_to_clean]): + to_drop.add(j) + return df.drop(to_drop) + + def get_regression_fails(client: Client, job_url: str): """ Get regression tests that did not succeed for the given job URL. @@ -66,7 +84,9 @@ def get_regression_fails(client: Client, job_url: str): WHERE job_url='{job_url}' AND status IN ('Fail', 'Error') """ - return client.query_dataframe(query) + df = client.query_dataframe(query) + df = drop_prefix_rows(df, "test_name") + return df def url_to_html_link(url: str) -> str: From b7e8e4dd1044dd5f099dfa8e60f1e1b9cc08768f Mon Sep 17 00:00:00 2001 From: Stuart <146047128+strtgbb@users.noreply.github.com> Date: Tue, 11 Feb 2025 22:17:42 -0500 Subject: [PATCH 34/34] increase arm integration timeout again --- .github/create_combined_ci_report.py | 4 ++++ tests/ci/ci_config.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/create_combined_ci_report.py b/.github/create_combined_ci_report.py index 2eed0aaa2f18..012348b3e278 100755 --- a/.github/create_combined_ci_report.py +++ b/.github/create_combined_ci_report.py @@ -139,6 +139,9 @@ def parse_args() -> argparse.Namespace: parser.add_argument( "--no-upload", action="store_true", help="Do not upload the report" ) + parser.add_argument( + "--mark-preview", action="store_true", help="Mark the report as a preview" + ) return parser.parse_args() @@ -181,6 +184,7 @@ def main(): .replace( "
", f"""

Table of Contents

+{'

This is a preview. FinishCheck has not completed.

' if args.mark_preview else ""}