From de30d51d8435bcacc8a633a64560c3a7fcc265aa Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Fri, 12 Jul 2024 11:22:45 +0000 Subject: [PATCH 1/7] update outdated actions --- .github/actions/save_logs_and_results/action.yml | 2 +- .github/actions/setup_extension/action.yml | 2 +- .github/actions/upload_coverage/action.yml | 4 ++-- .github/workflows/build_and_test.yml | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/save_logs_and_results/action.yml b/.github/actions/save_logs_and_results/action.yml index 0f238835d19..4d4960726d8 100644 --- a/.github/actions/save_logs_and_results/action.yml +++ b/.github/actions/save_logs_and_results/action.yml @@ -6,7 +6,7 @@ inputs: runs: using: composite steps: - - uses: actions/upload-artifact@v3.1.1 + - uses: actions/upload-artifact@v4 name: Upload logs with: name: ${{ inputs.folder }} diff --git a/.github/actions/setup_extension/action.yml b/.github/actions/setup_extension/action.yml index 96b408e7e43..4131e7b7025 100644 --- a/.github/actions/setup_extension/action.yml +++ b/.github/actions/setup_extension/action.yml @@ -17,7 +17,7 @@ runs: echo "PG_MAJOR=${{ inputs.pg_major }}" >> $GITHUB_ENV fi shell: bash - - uses: actions/download-artifact@v3.0.1 + - uses: actions/download-artifact@v4 with: name: build-${{ env.PG_MAJOR }} - name: Install Extension diff --git a/.github/actions/upload_coverage/action.yml b/.github/actions/upload_coverage/action.yml index 0b5f581a6a4..a992d7625b6 100644 --- a/.github/actions/upload_coverage/action.yml +++ b/.github/actions/upload_coverage/action.yml @@ -7,7 +7,7 @@ inputs: runs: using: composite steps: - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: flags: ${{ inputs.flags }} token: ${{ inputs.codecov_token }} @@ -21,7 +21,7 @@ runs: mkdir -p /tmp/codeclimate cc-test-reporter format-coverage -t lcov -o /tmp/codeclimate/${{ inputs.flags }}.json lcov.info shell: bash - - uses: actions/upload-artifact@v3.1.1 + - uses: actions/upload-artifact@v4 with: path: "/tmp/codeclimate/*.json" name: codeclimate diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 70bc0bcb9a6..9557082bece 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -48,7 +48,7 @@ jobs: image: ${{ needs.params.outputs.build_image_name }}:${{ needs.params.outputs.sql_snapshot_pg_version }}${{ needs.params.outputs.image_suffix }} options: --user root steps: - - uses: actions/checkout@v3.5.0 + - uses: actions/checkout@v4 - name: Check Snapshots run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} @@ -125,7 +125,7 @@ jobs: - name: Build run: "./ci/build-citus.sh" shell: bash - - uses: actions/upload-artifact@v3.1.1 + - uses: actions/upload-artifact@v4 with: name: build-${{ env.PG_MAJOR }} path: |- @@ -399,7 +399,7 @@ jobs: - test-citus-upgrade - test-pg-upgrade steps: - - uses: actions/download-artifact@v3.0.1 + - uses: actions/download-artifact@v4 with: name: "codeclimate" path: "codeclimate" From d1a7923d5092c23036b53a7c3ff944401ae7e74a Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Fri, 12 Jul 2024 11:49:18 +0000 Subject: [PATCH 2/7] fix codeclimate breaking change on actions/upload-artifact --- .github/actions/upload_coverage/action.yml | 2 +- .github/workflows/build_and_test.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/upload_coverage/action.yml b/.github/actions/upload_coverage/action.yml index a992d7625b6..e4cc93b47d1 100644 --- a/.github/actions/upload_coverage/action.yml +++ b/.github/actions/upload_coverage/action.yml @@ -24,4 +24,4 @@ runs: - uses: actions/upload-artifact@v4 with: path: "/tmp/codeclimate/*.json" - name: codeclimate + name: codeclimate-${{ inputs.flags }} diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 9557082bece..6a02945a0a6 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -401,8 +401,9 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - name: "codeclimate" - path: "codeclimate" + path: codeclimate + pattern: codeclimate-* + merge-multiple: true - name: Upload coverage results to Code Climate run: |- cc-test-reporter sum-coverage codeclimate/*.json -o total.json From 625d97db24673501b4c16f6f72b3f39b077abfb9 Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Fri, 12 Jul 2024 13:46:00 +0000 Subject: [PATCH 3/7] update arbitrary config test flags for upload uniqueness --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 6a02945a0a6..3f466d9b07b 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -287,7 +287,7 @@ jobs: - uses: "./.github/actions/upload_coverage" if: always() with: - flags: ${{ env.pg_major }}_upgrade + flags: ${{ env.pg_major }}_arbitrary_configs_${{ matrix.parallel }} codecov_token: ${{ secrets.CODECOV_TOKEN }} test-pg-upgrade: name: PG${{ matrix.old_pg_major }}-PG${{ matrix.new_pg_major }} - check-pg-upgrade From d358941f533f5c69224c65efcbd67d36351641fe Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Fri, 12 Jul 2024 14:03:17 +0000 Subject: [PATCH 4/7] specify folders for uploading logs --- .github/workflows/build_and_test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 3f466d9b07b..0ca54c612e2 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -284,6 +284,8 @@ jobs: check-arbitrary-configs parallel=4 CONFIGS=$TESTS - uses: "./.github/actions/save_logs_and_results" if: always() + with: + folder: arbitrary_config_logs_pg_${{ matrix.pg_version }}_${{ matrix.parallel }} - uses: "./.github/actions/upload_coverage" if: always() with: @@ -335,6 +337,8 @@ jobs: if: failure() - uses: "./.github/actions/save_logs_and_results" if: always() + with: + folder: ${{ env.old_pg_major }}_${{ env.new_pg_major }}_upgrade_logs - uses: "./.github/actions/upload_coverage" if: always() with: @@ -529,4 +533,5 @@ jobs: done shell: bash - uses: "./.github/actions/save_logs_and_results" + # TODO this section also needs a with.folder based on the matrix if: always() From 0c50683695bd867935c8dd3f970d1bce9cd3c736 Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Fri, 12 Jul 2024 15:06:23 +0000 Subject: [PATCH 5/7] change arbitrary configs to upload files on the major version --- .github/workflows/build_and_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 0ca54c612e2..8db1b2d5c49 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -285,11 +285,11 @@ jobs: - uses: "./.github/actions/save_logs_and_results" if: always() with: - folder: arbitrary_config_logs_pg_${{ matrix.pg_version }}_${{ matrix.parallel }} + folder: arbitrary_config_logs_pg_${{ fromJson(matrix.pg_version).major }}_${{ matrix.parallel }} - uses: "./.github/actions/upload_coverage" if: always() with: - flags: ${{ env.pg_major }}_arbitrary_configs_${{ matrix.parallel }} + flags: ${{ fromJson(matrix.pg_version).major }}_arbitrary_configs_${{ matrix.parallel }} codecov_token: ${{ secrets.CODECOV_TOKEN }} test-pg-upgrade: name: PG${{ matrix.old_pg_major }}-PG${{ matrix.new_pg_major }} - check-pg-upgrade From 86d100ca65f04f09238d38372aef1d6d3d4ef643 Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Fri, 12 Jul 2024 15:14:51 +0000 Subject: [PATCH 6/7] correctly tag citus upgrades --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 8db1b2d5c49..0ffe9b261ba 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -387,7 +387,7 @@ jobs: - uses: "./.github/actions/upload_coverage" if: always() with: - flags: ${{ env.pg_major }}_upgrade + flags: pg${{ fromJson(needs.params.outputs.pg14_version).major }}_citus_upgrade codecov_token: ${{ secrets.CODECOV_TOKEN }} upload-coverage: if: always() From f1a1691bb398dd4e513e526821b2e68636d19a49 Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Fri, 12 Jul 2024 15:44:46 +0000 Subject: [PATCH 7/7] use new flag to configure gcov --- .github/actions/upload_coverage/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/upload_coverage/action.yml b/.github/actions/upload_coverage/action.yml index e4cc93b47d1..4fef6456cc9 100644 --- a/.github/actions/upload_coverage/action.yml +++ b/.github/actions/upload_coverage/action.yml @@ -12,7 +12,7 @@ runs: flags: ${{ inputs.flags }} token: ${{ inputs.codecov_token }} verbose: true - gcov: true + plugin: gcov - name: Create codeclimate coverage run: |- lcov --directory . --capture --output-file lcov.info