From 7aae0c9f45b97e7e57c16e420fdac905e7ab1132 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Fri, 28 Feb 2025 14:48:15 -0800 Subject: [PATCH 01/22] gha test 1 --- .github/workflows/e2e-test.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 229aba540..83dbaa162 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -197,7 +197,6 @@ jobs: - name: Set release version env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Add variables and upload test results if: always() run: | @@ -213,12 +212,18 @@ jobs: LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }} LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }} + - name: Generate test summary and store to GITHUB ENV + run: | + filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') + python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}" + notify-slack: runs-on: ubuntu-latest needs: [integration-tests] if: ${{ (success() || failure()) }} # Run even if integration tests fail and only on main repository steps: - name: Notify Slack + id: main_message uses: slackapi/slack-github-action@v2.0.0 with: method: chat.postMessage @@ -247,4 +252,15 @@ jobs: - type: context elements: - type: mrkdwn - text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`" \ No newline at end of file + text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`" + + - name: Test summary thread + if: success() + uses: slackapi/slack-github-action@v2.0.0 + with: + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} + payload: | + channel: ${{ secrets.SLACK_CHANNEL_ID }} + thread_ts: "${{ steps.main_message.outputs.ts }}" + text: {{ env.TEST_SUMMARY }}" \ No newline at end of file From bc11443955dfaa9100b0c2f2850a9aafe104edbd Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Fri, 28 Feb 2025 14:52:19 -0800 Subject: [PATCH 02/22] update submodule --- e2e_scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e_scripts b/e2e_scripts index 0f2ff0169..b8c152098 160000 --- a/e2e_scripts +++ b/e2e_scripts @@ -1 +1 @@ -Subproject commit 0f2ff016956090c6fff046f4479e7efe8d0086e5 +Subproject commit b8c15209879b9898aceb36d7eba4b7427be0d54a From 2d20015a2a7e30aaccd09f3163ec00fd4cd77ec7 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Fri, 28 Feb 2025 16:28:59 -0800 Subject: [PATCH 03/22] add test summary --- .github/workflows/e2e-test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 83dbaa162..25f0aca44 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -172,7 +172,7 @@ jobs: process-upload-report: runs-on: ubuntu-latest needs: [integration-tests] - if: always() && github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository + if: always() #&& github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository steps: - name: Checkout code @@ -217,6 +217,9 @@ jobs: filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}" + - name: Verify Environment Variable + run: echo "$TEST_SUMMARY" + notify-slack: runs-on: ubuntu-latest needs: [integration-tests] @@ -234,7 +237,7 @@ jobs: - type: section text: type: mrkdwn - text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:" + text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* ${{ needs.integration-tests.result == 'success' && ':white_check_mark:' || ':failed: Build Failed' }}" - type: divider - type: section fields: From d375d192e48a39f0087a2acd51550743ff341105 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Sun, 2 Mar 2025 19:17:10 -0800 Subject: [PATCH 04/22] gha test 2 --- .github/workflows/e2e-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 25f0aca44..b5f174951 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -237,7 +237,7 @@ jobs: - type: section text: type: mrkdwn - text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* ${{ needs.integration-tests.result == 'success' && ':white_check_mark:' || ':failed: Build Failed' }}" + text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* ${{ needs.integration-tests.result == 'success' && ':white_check_mark:' || ':failed:' }}" - type: divider - type: section fields: @@ -266,4 +266,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: {{ env.TEST_SUMMARY }}" \ No newline at end of file + text: "{{ env.TEST_SUMMARY }}" \ No newline at end of file From 2b1b6abd16adfe9031607935e028be575e653cc0 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Sun, 2 Mar 2025 22:03:37 -0800 Subject: [PATCH 05/22] gha test 3 --- .github/workflows/e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index b5f174951..cd301513c 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -266,4 +266,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: "{{ env.TEST_SUMMARY }}" \ No newline at end of file + text: {{ env.TEST_SUMMARY }} \ No newline at end of file From 71b1da5fb084fbd0f01c241dfba7abfd3c6cd155 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Sun, 2 Mar 2025 22:08:13 -0800 Subject: [PATCH 06/22] gha test 4 --- .github/workflows/e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index cd301513c..7f6158012 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -266,4 +266,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: {{ env.TEST_SUMMARY }} \ No newline at end of file + text: "${{ env.TEST_SUMMARY }}" \ No newline at end of file From 20e7545ff6cb8240f6e4a24dae5f8f9d3afda8e9 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Sun, 2 Mar 2025 22:16:23 -0800 Subject: [PATCH 07/22] gha test 5 --- .github/workflows/e2e-test.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 7f6158012..515a42dc1 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -220,6 +220,9 @@ jobs: - name: Verify Environment Variable run: echo "$TEST_SUMMARY" + - name: Verify Environment Variable 2 + run: echo "${{ env.TEST_SUMMARY }}" + notify-slack: runs-on: ubuntu-latest needs: [integration-tests] @@ -257,6 +260,12 @@ jobs: - type: mrkdwn text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`" + - name: Verify Environment Variable 3 + run: echo "$TEST_SUMMARY" + + - name: Verify Environment Variable 4 + run: echo "${{ env.TEST_SUMMARY }}" + - name: Test summary thread if: success() uses: slackapi/slack-github-action@v2.0.0 @@ -266,4 +275,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: "${{ env.TEST_SUMMARY }}" \ No newline at end of file + text: "$TEST_SUMMARY" \ No newline at end of file From f3f98476b995f9d5ea305cf2e347c4948cecabce Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 08:48:34 -0800 Subject: [PATCH 08/22] gha test 6 --- .github/workflows/e2e-test.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 515a42dc1..26e2f449d 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -212,16 +212,12 @@ jobs: LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }} LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }} - - name: Generate test summary and store to GITHUB ENV + - name: Generate test summary and save to output + id: set-test-summary run: | filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') - python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}" - - - name: Verify Environment Variable - run: echo "$TEST_SUMMARY" - - - name: Verify Environment Variable 2 - run: echo "${{ env.TEST_SUMMARY }}" + summary=$(python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}") + echo "summary=$summary" >> $GITHUB_OUTPUT notify-slack: runs-on: ubuntu-latest @@ -260,11 +256,12 @@ jobs: - type: mrkdwn text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`" - - name: Verify Environment Variable 3 - run: echo "$TEST_SUMMARY" - - - name: Verify Environment Variable 4 - run: echo "${{ env.TEST_SUMMARY }}" + - name: Debug Test Summary Output + run: | + echo "TEST_SUMMARY output from previous job:" + echo "--------------------------------------" + echo "${{ needs.process-upload-report.outputs.test_summary }}" + echo "--------------------------------------" - name: Test summary thread if: success() @@ -275,4 +272,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: "$TEST_SUMMARY" \ No newline at end of file + text: "${{ needs.process-upload-report.outputs.test_summary }}" \ No newline at end of file From a3856368a96918044462775516730f6394578857 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 09:46:48 -0800 Subject: [PATCH 09/22] gha test 7 --- .github/workflows/e2e-test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 26e2f449d..f0f02cbbe 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -91,7 +91,8 @@ jobs: run: | timestamp=$(date +'%Y%m%d%H%M') report_filename="${timestamp}_sdk_test_report.xml" - make test-int RUN_DB_FORK_TESTS=${{ github.event.inputs.run_db_fork_tests }} RUN_DB_TESTS=${{ github.event.inputs.run_db_tests }} TEST_SUITE="${{ github.event.inputs.test_suite }}" TEST_ARGS="--junitxml=${report_filename}" +# make test-int RUN_DB_FORK_TESTS=${{ github.event.inputs.run_db_fork_tests }} RUN_DB_TESTS=${{ github.event.inputs.run_db_tests }} TEST_SUITE="${{ github.event.inputs.test_suite }}" TEST_ARGS="--junitxml=${report_filename}" + make test-int TEST_SUITE=domain env: LINODE_TOKEN: ${{ env.LINODE_TOKEN }} @@ -217,7 +218,9 @@ jobs: run: | filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') summary=$(python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}") - echo "summary=$summary" >> $GITHUB_OUTPUT + echo "summary<> $GITHUB_OUTPUT + echo "$summary" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT notify-slack: runs-on: ubuntu-latest From 74e138d323b3dcb2fe7770eab6312f36c8dc5258 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 09:50:23 -0800 Subject: [PATCH 10/22] gha test 8 --- .github/workflows/e2e-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index f0f02cbbe..3187515d3 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -91,8 +91,7 @@ jobs: run: | timestamp=$(date +'%Y%m%d%H%M') report_filename="${timestamp}_sdk_test_report.xml" -# make test-int RUN_DB_FORK_TESTS=${{ github.event.inputs.run_db_fork_tests }} RUN_DB_TESTS=${{ github.event.inputs.run_db_tests }} TEST_SUITE="${{ github.event.inputs.test_suite }}" TEST_ARGS="--junitxml=${report_filename}" - make test-int TEST_SUITE=domain + make test-int RUN_DB_FORK_TESTS=${{ github.event.inputs.run_db_fork_tests }} RUN_DB_TESTS=${{ github.event.inputs.run_db_tests }} TEST_SUITE="domain" TEST_ARGS="--junitxml=${report_filename}" env: LINODE_TOKEN: ${{ env.LINODE_TOKEN }} From 7c091256bccef3c7778db7d40a62c009af00c059 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 09:53:29 -0800 Subject: [PATCH 11/22] gha test 9 --- .github/workflows/e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 3187515d3..7d5865011 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -223,7 +223,7 @@ jobs: notify-slack: runs-on: ubuntu-latest - needs: [integration-tests] + needs: [integration-tests, process-upload-report] if: ${{ (success() || failure()) }} # Run even if integration tests fail and only on main repository steps: - name: Notify Slack From e671f296056bff6c531c5d37db5c72208b0ff76d Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 10:18:29 -0800 Subject: [PATCH 12/22] gha test 10 --- .github/workflows/e2e-test.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 7d5865011..b7a6caa33 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -173,6 +173,7 @@ jobs: runs-on: ubuntu-latest needs: [integration-tests] if: always() #&& github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository + output: ${{ steps.set-test-summary.outputs.summary }} steps: - name: Checkout code @@ -216,16 +217,18 @@ jobs: id: set-test-summary run: | filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') - summary=$(python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}") - echo "summary<> $GITHUB_OUTPUT - echo "$summary" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + test_output=$(python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}") + echo "summary=$test_output" >> "$GITHUB_OUTPUT" notify-slack: runs-on: ubuntu-latest needs: [integration-tests, process-upload-report] if: ${{ (success() || failure()) }} # Run even if integration tests fail and only on main repository steps: + - env: + TEST_SUMMARY: ${{ needs.process-upload-report.outputs.summary}} + run: echo "$TEST_SUMMARY" + - name: Notify Slack id: main_message uses: slackapi/slack-github-action@v2.0.0 @@ -274,4 +277,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: "${{ needs.process-upload-report.outputs.test_summary }}" \ No newline at end of file + text: "${{ $TEST_SUMMARY }}" \ No newline at end of file From 89cc97b5ff12581c781b3b2962713d188a0e0990 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 10:24:26 -0800 Subject: [PATCH 13/22] gha test 11 --- .github/workflows/e2e-test.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index b7a6caa33..30d1bb3b8 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -173,7 +173,8 @@ jobs: runs-on: ubuntu-latest needs: [integration-tests] if: always() #&& github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository - output: ${{ steps.set-test-summary.outputs.summary }} + outputs: + summary: ${{ steps.set-test-summary.outputs.summary }} steps: - name: Checkout code @@ -226,8 +227,8 @@ jobs: if: ${{ (success() || failure()) }} # Run even if integration tests fail and only on main repository steps: - env: - TEST_SUMMARY: ${{ needs.process-upload-report.outputs.summary}} - run: echo "$TEST_SUMMARY" + SUMMARY: ${{ needs.process-upload-report.outputs.summary }} + run: echo "$SUMMARY" - name: Notify Slack id: main_message @@ -265,7 +266,7 @@ jobs: run: | echo "TEST_SUMMARY output from previous job:" echo "--------------------------------------" - echo "${{ needs.process-upload-report.outputs.test_summary }}" + echo "${{ needs.process-upload-report.outputs.summary }}" echo "--------------------------------------" - name: Test summary thread @@ -277,4 +278,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: "${{ $TEST_SUMMARY }}" \ No newline at end of file + text: "${{ needs.process-upload-report.outputs.summary }}" From 5517978a125785e2dc00d8b89e4108f603fadf00 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 10:33:26 -0800 Subject: [PATCH 14/22] gha test 12 --- .github/workflows/e2e-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 30d1bb3b8..b8a5f998c 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -219,7 +219,8 @@ jobs: run: | filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') test_output=$(python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}") - echo "summary=$test_output" >> "$GITHUB_OUTPUT" + test_output_encoded=$(echo -n "$test_output" | base64) + echo "summary=$test_output_encoded" >> "$GITHUB_OUTPUT" notify-slack: runs-on: ubuntu-latest From 380ed71441ce1c6de92de8c1a1b0bae6c2c5392f Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 10:44:33 -0800 Subject: [PATCH 15/22] gha test 13 --- .github/workflows/e2e-test.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index b8a5f998c..763ed31c0 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -227,10 +227,6 @@ jobs: needs: [integration-tests, process-upload-report] if: ${{ (success() || failure()) }} # Run even if integration tests fail and only on main repository steps: - - env: - SUMMARY: ${{ needs.process-upload-report.outputs.summary }} - run: echo "$SUMMARY" - - name: Notify Slack id: main_message uses: slackapi/slack-github-action@v2.0.0 @@ -263,12 +259,19 @@ jobs: - type: mrkdwn text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`" - - name: Debug Test Summary Output + - name: Decode Test Summary + id: decode-test-summary run: | - echo "TEST_SUMMARY output from previous job:" - echo "--------------------------------------" - echo "${{ needs.process-upload-report.outputs.summary }}" - echo "--------------------------------------" + TEST_SUMMARY_ENCODED="${{ needs.process-upload-report.outputs.summary }}" + if [[ -n "$TEST_SUMMARY_ENCODED" ]]; then + TEST_SUMMARY=$(echo "$TEST_SUMMARY_ENCODED" | base64 --decode) + echo "TEST_SUMMARY=$TEST_SUMMARY" >> $GITHUB_ENV + else + echo "TEST_SUMMARY=No summary available." >> $GITHUB_ENV + fi + + - name: Debug Decoded Test Summary + run: echo "$TEST_SUMMARY" - name: Test summary thread if: success() @@ -279,4 +282,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: "${{ needs.process-upload-report.outputs.summary }}" + text: "${{ env.TEST_SUMMARY }}" From 03ccc834aad6e7e82eef80b47fbc3d2f7452292b Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 10:44:43 -0800 Subject: [PATCH 16/22] gha test 13 --- e2e_scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e_scripts b/e2e_scripts index b8c152098..569c88ee1 160000 --- a/e2e_scripts +++ b/e2e_scripts @@ -1 +1 @@ -Subproject commit b8c15209879b9898aceb36d7eba4b7427be0d54a +Subproject commit 569c88ee146617c002466bbe87ba3a7d92f805bc From 1283debb91545c5121b7d86f6974efaff7c4f974 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 11:00:01 -0800 Subject: [PATCH 17/22] gha test 14 --- .github/workflows/e2e-test.yml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 763ed31c0..3a6d25464 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -219,8 +219,11 @@ jobs: run: | filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') test_output=$(python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}") - test_output_encoded=$(echo -n "$test_output" | base64) - echo "summary=$test_output_encoded" >> "$GITHUB_OUTPUT" + { + echo 'summary<> "$GITHUB_OUTPUT" notify-slack: runs-on: ubuntu-latest @@ -259,19 +262,8 @@ jobs: - type: mrkdwn text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`" - - name: Decode Test Summary - id: decode-test-summary - run: | - TEST_SUMMARY_ENCODED="${{ needs.process-upload-report.outputs.summary }}" - if [[ -n "$TEST_SUMMARY_ENCODED" ]]; then - TEST_SUMMARY=$(echo "$TEST_SUMMARY_ENCODED" | base64 --decode) - echo "TEST_SUMMARY=$TEST_SUMMARY" >> $GITHUB_ENV - else - echo "TEST_SUMMARY=No summary available." >> $GITHUB_ENV - fi - - - name: Debug Decoded Test Summary - run: echo "$TEST_SUMMARY" + - name: Debug Test Summary + run: echo "${{ needs.process-upload-report.outputs.summary }}" - name: Test summary thread if: success() @@ -282,4 +274,4 @@ jobs: payload: | channel: ${{ secrets.SLACK_CHANNEL_ID }} thread_ts: "${{ steps.main_message.outputs.ts }}" - text: "${{ env.TEST_SUMMARY }}" + text: "${{ needs.process-upload-report.outputs.summary }}" From 868df43e4df389d40dcc3ee76a40951d4feac404 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 11:04:11 -0800 Subject: [PATCH 18/22] gha test 15 --- .github/workflows/e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 3a6d25464..65ec9d99f 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -221,7 +221,7 @@ jobs: test_output=$(python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}") { echo 'summary<> "$GITHUB_OUTPUT" From 24fe3c28484f000fdc394f0bcd9dc39ac5cfc19e Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 11:10:57 -0800 Subject: [PATCH 19/22] gha test 16 --- test/integration/models/domain/test_domain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/models/domain/test_domain.py b/test/integration/models/domain/test_domain.py index 36ecbb0dc..21e6b26cc 100644 --- a/test/integration/models/domain/test_domain.py +++ b/test/integration/models/domain/test_domain.py @@ -13,7 +13,7 @@ def test_get_domain_record(test_linode_client, test_domain): test_linode_client, test_domain.records.first().id, test_domain.id ) - assert dr.id == test_domain.records.first().id + assert False def test_save_null_values_excluded(test_linode_client, test_domain): @@ -23,7 +23,7 @@ def test_save_null_values_excluded(test_linode_client, test_domain): domain.master_ips = ["127.0.0.1"] res = domain.save() - assert res + assert False def test_zone_file_view(test_linode_client, test_domain): From dd19ae44d1c8d87a5f836e0eb6f617712af51b71 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 11:15:45 -0800 Subject: [PATCH 20/22] gha test 17 --- e2e_scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e_scripts b/e2e_scripts index 569c88ee1..e87ca9ef3 160000 --- a/e2e_scripts +++ b/e2e_scripts @@ -1 +1 @@ -Subproject commit 569c88ee146617c002466bbe87ba3a7d92f805bc +Subproject commit e87ca9ef370ff00e6a03f4d9a7a71a9ad195d246 From 02256baab54a8deb236f3c4e6be2c738367eae70 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 11:24:53 -0800 Subject: [PATCH 21/22] gha test 18 --- e2e_scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e_scripts b/e2e_scripts index e87ca9ef3..5d0054351 160000 --- a/e2e_scripts +++ b/e2e_scripts @@ -1 +1 @@ -Subproject commit e87ca9ef370ff00e6a03f4d9a7a71a9ad195d246 +Subproject commit 5d0054351277faa68a224172674210795cb36646 From 356e7ba86ebd179b6138635eafa54457e5b1dc17 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 3 Mar 2025 11:33:12 -0800 Subject: [PATCH 22/22] improve slack test notification --- .github/workflows/e2e-test.yml | 7 ++----- test/integration/models/domain/test_domain.py | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 65ec9d99f..c0ccc8e87 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -91,7 +91,7 @@ jobs: run: | timestamp=$(date +'%Y%m%d%H%M') report_filename="${timestamp}_sdk_test_report.xml" - make test-int RUN_DB_FORK_TESTS=${{ github.event.inputs.run_db_fork_tests }} RUN_DB_TESTS=${{ github.event.inputs.run_db_tests }} TEST_SUITE="domain" TEST_ARGS="--junitxml=${report_filename}" + make test-int RUN_DB_FORK_TESTS=${{ github.event.inputs.run_db_fork_tests }} RUN_DB_TESTS=${{ github.event.inputs.run_db_tests }} TEST_SUITE="${{ github.event.inputs.test_suite }}" TEST_ARGS="--junitxml=${report_filename}" env: LINODE_TOKEN: ${{ env.LINODE_TOKEN }} @@ -172,7 +172,7 @@ jobs: process-upload-report: runs-on: ubuntu-latest needs: [integration-tests] - if: always() #&& github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository + if: always() && github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository outputs: summary: ${{ steps.set-test-summary.outputs.summary }} @@ -262,9 +262,6 @@ jobs: - type: mrkdwn text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`" - - name: Debug Test Summary - run: echo "${{ needs.process-upload-report.outputs.summary }}" - - name: Test summary thread if: success() uses: slackapi/slack-github-action@v2.0.0 diff --git a/test/integration/models/domain/test_domain.py b/test/integration/models/domain/test_domain.py index 21e6b26cc..36ecbb0dc 100644 --- a/test/integration/models/domain/test_domain.py +++ b/test/integration/models/domain/test_domain.py @@ -13,7 +13,7 @@ def test_get_domain_record(test_linode_client, test_domain): test_linode_client, test_domain.records.first().id, test_domain.id ) - assert False + assert dr.id == test_domain.records.first().id def test_save_null_values_excluded(test_linode_client, test_domain): @@ -23,7 +23,7 @@ def test_save_null_values_excluded(test_linode_client, test_domain): domain.master_ips = ["127.0.0.1"] res = domain.save() - assert False + assert res def test_zone_file_view(test_linode_client, test_domain):