From d1f0fc86ee3287fa6875b50aa6e99424a88d8df4 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Mon, 25 Nov 2024 15:36:59 +0100 Subject: [PATCH 01/38] Update slack notification for flaky test detector --- .github/workflows/flakeguard-on-demand.yml | 2 +- .github/workflows/flakeguard.yml | 44 ++++++++++++++++++++-- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/.github/workflows/flakeguard-on-demand.yml b/.github/workflows/flakeguard-on-demand.yml index 0ac8444a542..307cb746eae 100644 --- a/.github/workflows/flakeguard-on-demand.yml +++ b/.github/workflows/flakeguard-on-demand.yml @@ -68,7 +68,7 @@ jobs: runAllTests: ${{ inputs.runAllTests }} findByTestFilesDiff: ${{ inputs.findByTestFilesDiff }} findByAffectedPackages: ${{ inputs.findByAffectedPackages }} - slackNotificationAfterTestsChannelId: ${{ inputs.slack_notification_after_tests_channel_id }} + slackNotificationAfterTestsChannelId: ${{ inputs.slack_notification_after_tests_channel_id || 'C07TRF65CNS' }} #flaky-test-detector-notifications extraArgs: ${{ inputs.extraArgs }} secrets: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 8364a5c142a..50316c44c27 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -306,6 +306,7 @@ jobs: shell: bash run: | set -e # Exit immediately if a command exits with a non-zero status. + if [ -d "test_results" ]; then cd test_results ls -R . @@ -322,10 +323,21 @@ jobs: echo "All tests count: $ALL_TESTS_COUNT" echo "all_tests_count=$ALL_TESTS_COUNT" >> "$GITHUB_OUTPUT" - # Use flakeguard to filter and output failed tests based on PassRatio threshold - flakeguard aggregate-results --filter-failed=true --threshold "${{ inputs.runThreshold }}" --min-pass-ratio=${{ env.MIN_PASS_RATIO }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json + # Use flakeguard to filter and output flaky tests based on PassRatio threshold + flakeguard aggregate-results --filter-flaky=true --threshold "${{ inputs.runThreshold }}" --min-pass-ratio=${{ env.MIN_PASS_RATIO }} --results-path . --output-results ../flaky_tests.json --output-logs ../flaky_test_logs.json + + # Count flaky tests + if [ -f "../flaky_tests.json" ]; then + FLAKY_TESTS_COUNT=$(jq 'length' ../flaky_tests.json) + else + FLAKY_TESTS_COUNT=0 + fi + echo "Flaky tests count: $FLAKY_TESTS_COUNT" + echo "flaky_tests_count=$FLAKY_TESTS_COUNT" >> "$GITHUB_OUTPUT" # Count failed tests + flakeguard aggregate-results --filter-failed=true --threshold "${{ inputs.runThreshold }}" --min-pass-ratio=${{ env.MIN_PASS_RATIO }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json + if [ -f "../failed_tests.json" ]; then FAILED_TESTS_COUNT=$(jq 'length' ../failed_tests.json) else @@ -333,10 +345,23 @@ jobs: fi echo "Failed tests count: $FAILED_TESTS_COUNT" echo "failed_tests_count=$FAILED_TESTS_COUNT" >> "$GITHUB_OUTPUT" + + # Calculate flaky ratio (flaky / non-flaky tests ratio in %) + if [ "$ALL_TESTS_COUNT" -gt 0 ]; then + NON_FLAKY_COUNT=$((ALL_TESTS_COUNT - FLAKY_TESTS_COUNT - FAILED_TESTS_COUNT)) + FLAKY_RATIO=$(awk "BEGIN {printf \"%.2f\", ($FLAKY_TESTS_COUNT / $ALL_TESTS_COUNT) * 100}") + else + NON_FLAKY_COUNT=0 + FLAKY_RATIO=0 + fi + echo "Flaky ratio: $FLAKY_RATIO%" + echo "flaky_ratio=$FLAKY_RATIO" >> "$GITHUB_OUTPUT" else echo "No test results directory found." echo "all_tests_count=0" >> "$GITHUB_OUTPUT" + echo "flaky_tests_count=0" >> "$GITHUB_OUTPUT" echo "failed_tests_count=0" >> "$GITHUB_OUTPUT" + echo "flaky_ratio=0" >> "$GITHUB_OUTPUT" fi - name: Calculate Flakiness Threshold Percentage @@ -556,9 +581,22 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "Ran changed tests between `${{ inputs.baseRef }}` and `${{ needs.get-tests.outputs.git_head_short_sha }}` (`${{ env.GIT_HEAD_REF }}`)." + "text": "${{ inputs.runAllTests == 'true' && format('Ran all tests for `${{ inputs.headRef }}` branch.', '') || format('Ran changed tests between `${{ inputs.baseRef }}` and `${{ needs.get-tests.outputs.git_head_short_sha }}` (`${{ env.GIT_HEAD_REF }}`).', '') }}" } }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Total Flaky Tests:* ${{ steps.set_test_results.outputs.flaky_tests_count }}" + }, + { + "type": "mrkdwn", + "text": "*Flaky to Non-Flaky Ratio:* ${{ steps.set_test_results.outputs.flaky_ratio }}%" + } + ] + }, { "type": "section", "text": { From ea75e526b8e486e69b126d269e0d1e8830d6c4c2 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Mon, 25 Nov 2024 15:54:42 +0100 Subject: [PATCH 02/38] Bump flakeguard and support shuffle flag --- .github/workflows/flakeguard.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 50316c44c27..a2bafd8fa1e 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -60,10 +60,13 @@ env: ALL_TESTS_RUNNER_COUNT: ${{ fromJson(inputs.extraArgs)['all_tests_runner_count'] || '2' }} # The number of GitHub runners to use when running all tests `runAllTests=true`. TEST_REPEAT_COUNT: ${{ fromJson(inputs.extraArgs)['test_repeat_count'] || '5' }} # The number of times each runner should run a test to detect flaky tests. RUN_WITH_RACE: ${{ fromJson(inputs.extraArgs)['run_with_race'] || 'true' }} # Whether to run tests with -race flag. + RUN_WITH_SHUFFLE: ${{ fromJson(inputs.extraArgs)['run_with_shuffle'] || 'false' }} # Whether to run tests with -shuffle flag. + SHUFFLE_SEED: ${{ fromJson(inputs.extraArgs)['shuffle_seed'] || '999' }} # The seed to use when -shuffle flag is enabled. Requires RUN_WITH_SHUFFLE to be true. ALL_TESTS_RUNNER: ${{ fromJson(inputs.extraArgs)['all_tests_runner'] || 'ubuntu22.04-32cores-128GB' }} # The runner to use for running all tests. DEFAULT_RUNNER: 'ubuntu-latest' # The default runner to use for running tests. UPLOAD_ALL_TEST_RESULTS: ${{ fromJson(inputs.extraArgs)['upload_all_test_results'] || 'false' }} # Whether to upload all test results as artifacts. PRINT_FAILED_TESTS: ${{ fromJson(inputs.extraArgs)['print_failed_tests'] || 'false' }} # Whether to print failed tests in the GitHub console. + jobs: get-tests: @@ -98,7 +101,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@be06798af83ef6d9f7cf04e8b10a8484520c5061 # flakguard@0.0.1 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@18318aa45ff3c54ff10a5fc154bcd8930b34c93c # flakguard@0.0.1 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -257,11 +260,11 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@be06798af83ef6d9f7cf04e8b10a8484520c5061 # flakguard@0.0.1 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@18318aa45ff3c54ff10a5fc154bcd8930b34c93c # flakguard@0.0.1 - name: Run tests with flakeguard shell: bash - run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json + run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json env: CL_DATABASE_URL: ${{ env.DB_URL }} @@ -299,7 +302,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@be06798af83ef6d9f7cf04e8b10a8484520c5061 # flakguard@0.0.1 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@18318aa45ff3c54ff10a5fc154bcd8930b34c93c # flakguard@0.0.1 - name: Set combined test results id: set_test_results From 57222ac1e1d5aa2908da748500cfbc4b0a71fb17 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:04:20 +0100 Subject: [PATCH 03/38] bump flakeguard --- .github/workflows/flakeguard.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index a2bafd8fa1e..ad5ff6dac28 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -101,7 +101,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@18318aa45ff3c54ff10a5fc154bcd8930b34c93c # flakguard@0.0.1 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d2d8cf21c5c265d04ec7732ebda1125cbcd6d2c7 # flakguard@0.0.1 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -260,7 +260,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@18318aa45ff3c54ff10a5fc154bcd8930b34c93c # flakguard@0.0.1 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d2d8cf21c5c265d04ec7732ebda1125cbcd6d2c7 # flakguard@0.0.1 - name: Run tests with flakeguard shell: bash @@ -302,7 +302,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@18318aa45ff3c54ff10a5fc154bcd8930b34c93c # flakguard@0.0.1 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d2d8cf21c5c265d04ec7732ebda1125cbcd6d2c7 # flakguard@0.0.1 - name: Set combined test results id: set_test_results From 215e7aff6a99806172ddbfbf720d47467f0ce67b Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 28 Nov 2024 13:44:00 +0100 Subject: [PATCH 04/38] update notification --- .github/workflows/flakeguard.yml | 87 ++++++++++++++++++++++---------- 1 file changed, 59 insertions(+), 28 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 37f4dc66abe..4965f5b74a3 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -326,18 +326,6 @@ jobs: echo "All tests count: $ALL_TESTS_COUNT" echo "all_tests_count=$ALL_TESTS_COUNT" >> "$GITHUB_OUTPUT" - # Use flakeguard to filter and output flaky tests based on PassRatio threshold - flakeguard aggregate-results --filter-flaky=true --threshold "${{ inputs.runThreshold }}" --min-pass-ratio=${{ env.MIN_PASS_RATIO }} --results-path . --output-results ../flaky_tests.json --output-logs ../flaky_test_logs.json - - # Count flaky tests - if [ -f "../flaky_tests.json" ]; then - FLAKY_TESTS_COUNT=$(jq 'length' ../flaky_tests.json) - else - FLAKY_TESTS_COUNT=0 - fi - echo "Flaky tests count: $FLAKY_TESTS_COUNT" - echo "flaky_tests_count=$FLAKY_TESTS_COUNT" >> "$GITHUB_OUTPUT" - # Count failed tests flakeguard aggregate-results --filter-failed=true --threshold "${{ inputs.runThreshold }}" --min-pass-ratio=${{ env.MIN_PASS_RATIO }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json @@ -349,22 +337,26 @@ jobs: echo "Failed tests count: $FAILED_TESTS_COUNT" echo "failed_tests_count=$FAILED_TESTS_COUNT" >> "$GITHUB_OUTPUT" - # Calculate flaky ratio (flaky / non-flaky tests ratio in %) + # Calculate failed ratio (failed / non-failed tests ratio in %) if [ "$ALL_TESTS_COUNT" -gt 0 ]; then - NON_FLAKY_COUNT=$((ALL_TESTS_COUNT - FLAKY_TESTS_COUNT - FAILED_TESTS_COUNT)) - FLAKY_RATIO=$(awk "BEGIN {printf \"%.2f\", ($FLAKY_TESTS_COUNT / $ALL_TESTS_COUNT) * 100}") + NON_FAILED_COUNT=$((ALL_TESTS_COUNT - FAILED_TESTS_COUNT)) + + if [ "$NON_FAILED_COUNT" -gt 0 ]; then + FAILED_RATIO=$(awk "BEGIN {printf \"%.2f\", ($FAILED_TESTS_COUNT / $NON_FAILED_COUNT) * 100}") + else + FAILED_RATIO=0 + fi else - NON_FLAKY_COUNT=0 - FLAKY_RATIO=0 + NON_FAILED_COUNT=0 + FAILED_RATIO=0 fi - echo "Flaky ratio: $FLAKY_RATIO%" - echo "flaky_ratio=$FLAKY_RATIO" >> "$GITHUB_OUTPUT" + echo "Failed tests ratio: $FAILED_RATIO%" + echo "failed_ratio=$FAILED_RATIO" >> "$GITHUB_OUTPUT" else echo "No test results directory found." echo "all_tests_count=0" >> "$GITHUB_OUTPUT" - echo "flaky_tests_count=0" >> "$GITHUB_OUTPUT" echo "failed_tests_count=0" >> "$GITHUB_OUTPUT" - echo "flaky_ratio=0" >> "$GITHUB_OUTPUT" + echo "failed_ratio=0" >> "$GITHUB_OUTPUT" fi - name: Calculate Flakiness Threshold Percentage @@ -563,10 +555,9 @@ jobs: body: commentBody }); - - name: Send Slack message - uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 - if: ${{ inputs.slackNotificationAfterTestsChannelId != '' && fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} - id: slack + - name: Send Slack message for failed tests + if: ${{ inputs.slackNotificationAfterTestsChannelId != '' && fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 }} + uses: slackapi/slack-github-action@v1.25.0 env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} with: @@ -575,7 +566,7 @@ jobs: { "attachments": [ { - "color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || contains(join(needs.*.result, ','), 'cancelled') && '#FFA000' || '2E7D32' }}", + "color": "#C62828", "blocks": [ { "type": "section", @@ -596,14 +587,54 @@ jobs: "fields": [ { "type": "mrkdwn", - "text": "*Total Flaky Tests:* ${{ steps.set_test_results.outputs.flaky_tests_count }}" + "text": "*Total Failed Tests:* ${{ steps.set_test_results.outputs.failed_tests_count }}" }, { "type": "mrkdwn", - "text": "*Flaky to Non-Flaky Ratio:* ${{ steps.set_test_results.outputs.flaky_ratio }}%" + "text": "*Failed to Non-Failed Ratio:* ${{ steps.set_test_results.outputs.failed_ratio }}%" } ] }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "${{ format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details> | <{3}/compare/{4}...{5}#files_bucket|Compare Changes>{6}', github.server_url, github.repository, github.run_id, inputs.repoUrl, inputs.baseRef, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}" + } + } + ] + } + ] + } + + - name: Send general Slack message + uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 + if: ${{ inputs.slackNotificationAfterTestsChannelId != '' && fromJson(steps.set_test_results.outputs.failed_tests_count) == 0 && fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} + id: slack + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + with: + channel-id: ${{ inputs.slackNotificationAfterTestsChannelId }} + payload: | + { + "attachments": [ + { + "color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || contains(join(needs.*.result, ','), 'cancelled') && '#FFA000' || '2E7D32' }}", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Flaky Test Detector for `${{ steps.set_project_path_pretty.outputs.path }}` project - ${{ contains(join(needs.*.result, ','), 'failure') && 'Failed :x:' || contains(join(needs.*.result, ','), 'cancelled') && 'Was cancelled :warning:' || 'Passed :white_check_mark:' }}" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "${{ inputs.runAllTests == 'true' && format('Ran all tests for `${{ inputs.headRef }}` branch.', '') || format('Ran changed tests between `${{ inputs.baseRef }}` and `${{ needs.get-tests.outputs.git_head_short_sha }}` (`${{ env.GIT_HEAD_REF }}`).', '') }}" + } + }, { "type": "section", "text": { From 55ac10258ca0fedd4e370a80a49a5509e5ce086a Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 28 Nov 2024 13:45:22 +0100 Subject: [PATCH 05/38] Fix --- .github/workflows/flakeguard.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 4965f5b74a3..66d5ad40c50 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -325,10 +325,11 @@ jobs: ALL_TESTS_COUNT=$(jq 'length' ../all_tests.json) echo "All tests count: $ALL_TESTS_COUNT" echo "all_tests_count=$ALL_TESTS_COUNT" >> "$GITHUB_OUTPUT" - - # Count failed tests + + # Use flakeguard to filter and output failed tests based on PassRatio threshold flakeguard aggregate-results --filter-failed=true --threshold "${{ inputs.runThreshold }}" --min-pass-ratio=${{ env.MIN_PASS_RATIO }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json - + + # Count failed tests if [ -f "../failed_tests.json" ]; then FAILED_TESTS_COUNT=$(jq 'length' ../failed_tests.json) else From a49e36231d8623045a033f1ed05ad6d875549a10 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:21:57 +0100 Subject: [PATCH 06/38] Add separate job for nightly flakeguard workflow --- .github/workflows/flakeguard-nightly.yml | 21 +++++++++++++++++++++ .github/workflows/flakeguard-on-demand.yml | 3 --- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/flakeguard-nightly.yml diff --git a/.github/workflows/flakeguard-nightly.yml b/.github/workflows/flakeguard-nightly.yml new file mode 100644 index 00000000000..5c18f40b683 --- /dev/null +++ b/.github/workflows/flakeguard-nightly.yml @@ -0,0 +1,21 @@ +name: Flakeguard Nightly + +on: + schedule: + # Run every night at 3:00 AM UTC + - cron: '0 3 * * *' + workflow_dispatch: + +jobs: + trigger-flaky-test-detection: + name: Find Flaky Tests + uses: ./.github/workflows/flakeguard.yml + with: + repoUrl: 'https://github.com/smartcontractkit/chainlink' + baseRef: 'origin/develop' + projectPath: '.' + maxPassRatio: '1.0' + runAllTests: 'true' + extraArgs: '{ "skipped_tests": "TestChainComponents", "test_repeat_count": "5", "all_tests_runner": "ubuntu22.04-32cores-128GB", "all_tests_runner_count": "3", "run_with_race": "false" }' + secrets: + SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} diff --git a/.github/workflows/flakeguard-on-demand.yml b/.github/workflows/flakeguard-on-demand.yml index d89c16e21c8..9a3aff67d45 100644 --- a/.github/workflows/flakeguard-on-demand.yml +++ b/.github/workflows/flakeguard-on-demand.yml @@ -1,9 +1,6 @@ name: Flakeguard On Demand on: - schedule: - # Run every night at 3:00 AM UTC - - cron: '0 3 * * *' workflow_dispatch: inputs: repoUrl: From dbb132e7cdb4b6d2043fd571462b9c0ba488480e Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:23:21 +0100 Subject: [PATCH 07/38] trigger --- .github/workflows/flakeguard-nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flakeguard-nightly.yml b/.github/workflows/flakeguard-nightly.yml index 5c18f40b683..5b8f83a610f 100644 --- a/.github/workflows/flakeguard-nightly.yml +++ b/.github/workflows/flakeguard-nightly.yml @@ -1,6 +1,7 @@ name: Flakeguard Nightly on: + push: schedule: # Run every night at 3:00 AM UTC - cron: '0 3 * * *' From 712a893cba96a25b77e63a55b48ac04f79b8d8b8 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:24:11 +0100 Subject: [PATCH 08/38] fix --- .github/workflows/flakeguard-nightly.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/flakeguard-nightly.yml b/.github/workflows/flakeguard-nightly.yml index 5b8f83a610f..5290973e29d 100644 --- a/.github/workflows/flakeguard-nightly.yml +++ b/.github/workflows/flakeguard-nightly.yml @@ -1,7 +1,6 @@ name: Flakeguard Nightly on: - push: schedule: # Run every night at 3:00 AM UTC - cron: '0 3 * * *' @@ -16,7 +15,7 @@ jobs: baseRef: 'origin/develop' projectPath: '.' maxPassRatio: '1.0' - runAllTests: 'true' + runAllTests: true extraArgs: '{ "skipped_tests": "TestChainComponents", "test_repeat_count": "5", "all_tests_runner": "ubuntu22.04-32cores-128GB", "all_tests_runner_count": "3", "run_with_race": "false" }' secrets: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} From a2c425932d820ea56393c6e6a4c3dada0905c3b1 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:35:55 +0100 Subject: [PATCH 09/38] Fix --- .github/workflows/flakeguard-nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flakeguard-nightly.yml b/.github/workflows/flakeguard-nightly.yml index 5290973e29d..a4f3ab31f18 100644 --- a/.github/workflows/flakeguard-nightly.yml +++ b/.github/workflows/flakeguard-nightly.yml @@ -17,5 +17,6 @@ jobs: maxPassRatio: '1.0' runAllTests: true extraArgs: '{ "skipped_tests": "TestChainComponents", "test_repeat_count": "5", "all_tests_runner": "ubuntu22.04-32cores-128GB", "all_tests_runner_count": "3", "run_with_race": "false" }' + slackNotificationAfterTestsChannelId: 'C07TRF65CNS' #flaky-test-detector-notifications secrets: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} From 8d1738bd769b483e49de5bbe679f6ba3ef932677 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:22:04 +0100 Subject: [PATCH 10/38] Fix codeowners issue --- .github/workflows/flakeguard.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 0bdb1a0f73d..9e69192eeaf 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -284,6 +284,11 @@ jobs: outputs: test_results: ${{ steps.set_test_results.outputs.results }} steps: + - name: Checkout repository + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + ref: ${{ env.GIT_HEAD_REF }} + - name: Set Pretty Project Path id: set_project_path_pretty run: | @@ -296,7 +301,7 @@ jobs: - name: Download all test result artifacts uses: actions/download-artifact@v4.1.8 with: - path: test_results + path: ci_test_results pattern: test-result-${{ needs.get-tests.outputs.workflow_id }}-* @@ -310,8 +315,8 @@ jobs: run: | set -e # Exit immediately if a command exits with a non-zero status. - if [ -d "test_results" ]; then - cd test_results + if [ -d "ci_test_results" ]; then + cd ci_test_results ls -R . # Fix flakeguard binary path @@ -327,7 +332,7 @@ jobs: echo "all_tests_count=$ALL_TESTS_COUNT" >> "$GITHUB_OUTPUT" # Use flakeguard to filter and output failed tests based on MaxPassRatio - flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json --project-path=${{ inputs.projectPath }} --codeowners-path=.github/CODEOWNERS + flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json --project-path=${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS # Count failed tests if [ -f "../failed_tests.json" ]; then From fdda55429fece4e8c4fa68821772afbdcafdc182 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:08:16 +0100 Subject: [PATCH 11/38] fix --- .github/workflows/flakeguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 9e69192eeaf..04d6040f3bc 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -366,7 +366,7 @@ jobs: fi - name: Tests Summary - if: always() + if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} run: | FILE_SIZE=$(wc -c < all_tests.md) echo "File size: $FILE_SIZE bytes" From bbf180cc8aa7f42de40e67e4fc428573a77bee0a Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:08:16 +0100 Subject: [PATCH 12/38] fix --- .github/workflows/flakeguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 0e5bfe1a81e..5febb885a19 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -342,7 +342,7 @@ jobs: fi - name: Tests Summary - if: always() + if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} run: | FILE_SIZE=$(wc -c < all_tests.md) echo "File size: $FILE_SIZE bytes" From 9cca6361896740ff3ceaed9c4039ccd56273e49d Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:35:55 +0100 Subject: [PATCH 13/38] Fix --- .github/workflows/flakeguard-nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flakeguard-nightly.yml b/.github/workflows/flakeguard-nightly.yml index 5290973e29d..a4f3ab31f18 100644 --- a/.github/workflows/flakeguard-nightly.yml +++ b/.github/workflows/flakeguard-nightly.yml @@ -17,5 +17,6 @@ jobs: maxPassRatio: '1.0' runAllTests: true extraArgs: '{ "skipped_tests": "TestChainComponents", "test_repeat_count": "5", "all_tests_runner": "ubuntu22.04-32cores-128GB", "all_tests_runner_count": "3", "run_with_race": "false" }' + slackNotificationAfterTestsChannelId: 'C07TRF65CNS' #flaky-test-detector-notifications secrets: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} From bf035ef6f191bce6dc6f1f77e5a0cf8672e8fa67 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:22:04 +0100 Subject: [PATCH 14/38] Fix codeowners issue --- .github/workflows/flakeguard.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 5febb885a19..f5569585557 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -283,6 +283,11 @@ jobs: outputs: test_results: ${{ steps.set_test_results.outputs.results }} steps: + - name: Checkout repository + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + ref: ${{ env.GIT_HEAD_REF }} + - name: Set Pretty Project Path id: set_project_path_pretty run: | @@ -295,7 +300,7 @@ jobs: - name: Download all test result artifacts uses: actions/download-artifact@v4.1.8 with: - path: test_results + path: ci_test_results pattern: test-result-${{ needs.get-tests.outputs.workflow_id }}-* @@ -308,8 +313,9 @@ jobs: shell: bash run: | set -e # Exit immediately if a command exits with a non-zero status. - if [ -d "test_results" ]; then - cd test_results + + if [ -d "ci_test_results" ]; then + cd ci_test_results ls -R . # Fix flakeguard binary path @@ -325,7 +331,7 @@ jobs: echo "all_tests_count=$ALL_TESTS_COUNT" >> "$GITHUB_OUTPUT" # Use flakeguard to filter and output failed tests based on MaxPassRatio - flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json --project-path=${{ inputs.projectPath }} --codeowners-path=.github/CODEOWNERS + flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json --project-path=${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS # Count failed tests if [ -f "../failed_tests.json" ]; then From 6abd3796e8919be3094e47f51bc6d8140fca0d90 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:31:41 +0100 Subject: [PATCH 15/38] revert: fail test --- core/web/resolver/spec_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 69d6a56509c..b0dbfa1aa73 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -42,7 +42,7 @@ func TestResolver_CronSpec(t *testing.T) { Type: job.Cron, CronSpec: &job.CronSpec{ CronSchedule: "CRON_TZ=UTC 0 0 1 1 *", - EVMChainID: ubig.NewI(42), + EVMChainID: ubig.NewI(45), CreatedAt: f.Timestamp(), }, }, nil) From 192038034483b87414d2e08160e56d6e65de2e52 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:53:05 +0100 Subject: [PATCH 16/38] Fix all tests path --- .github/workflows/flakeguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index f5569585557..0b7b2dafa31 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -418,7 +418,7 @@ jobs: script: | const fs = require('fs'); const prNumber = context.payload.pull_request.number; - const commentBody = fs.readFileSync('../all_tests.md', 'utf8'); + const commentBody = fs.readFileSync('all_tests.md', 'utf8'); await github.rest.issues.createComment({ owner: context.repo.owner, From 9652d422b4f2bfc57acb3e4f8a2f488cb891f128 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:59:53 +0100 Subject: [PATCH 17/38] fix notification --- .github/workflows/flakeguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 9c3e60d093d..bc3fe6fac56 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -469,7 +469,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ inputs.runAllTests == 'true' && format('Ran all tests for `${{ inputs.headRef }}` branch.', '') || format('Ran changed tests between `${{ inputs.baseRef }}` and `${{ needs.get-tests.outputs.git_head_short_sha }}` (`${{ env.GIT_HEAD_REF }}`).', '') }}" + "text": "${{ inputs.runAllTests == 'true' && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" } }, { From d06bb80ab3d6f5c4c3ed7a99dcebe8a9da18fc28 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:06:05 +0100 Subject: [PATCH 18/38] Fix format --- .github/workflows/flakeguard.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index bc3fe6fac56..23bc9abe0e6 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -477,11 +477,11 @@ jobs: "fields": [ { "type": "mrkdwn", - "text": "*Total Failed Tests:* ${{ steps.set_test_results.outputs.failed_tests_count }}" + "text": "Total Failed Tests: ${{ steps.set_test_results.outputs.failed_tests_count }}" }, { "type": "mrkdwn", - "text": "*Failed to Non-Failed Ratio:* ${{ steps.set_test_results.outputs.failed_ratio }}%" + "text": "Failed to Non-Failed Ratio: ${{ steps.set_test_results.outputs.failed_ratio }}%" } ] }, From 65eb6922a958166f430509fa967dd778c1e9e61b Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:15:51 +0100 Subject: [PATCH 19/38] Revert "revert: fail test" This reverts commit 6abd3796e8919be3094e47f51bc6d8140fca0d90. --- core/web/resolver/spec_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index b0dbfa1aa73..69d6a56509c 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -42,7 +42,7 @@ func TestResolver_CronSpec(t *testing.T) { Type: job.Cron, CronSpec: &job.CronSpec{ CronSchedule: "CRON_TZ=UTC 0 0 1 1 *", - EVMChainID: ubig.NewI(45), + EVMChainID: ubig.NewI(42), CreatedAt: f.Timestamp(), }, }, nil) From 099f6475614776a3b361234ad92b3c5554b27a8a Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:30:12 +0100 Subject: [PATCH 20/38] debug --- .github/workflows/flakeguard.yml | 8 ++++---- core/web/resolver/spec_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 23bc9abe0e6..aa81f35e8b9 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -101,7 +101,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@04bfae2602c015036f366a8dd4e7a619096cc516 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@dc031c8f3008c6f8a56a41b9d10ac68271952290 # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -260,11 +260,11 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@04bfae2602c015036f366a8dd4e7a619096cc516 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@dc031c8f3008c6f8a56a41b9d10ac68271952290 # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash - run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json + run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=1 --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json env: CL_DATABASE_URL: ${{ env.DB_URL }} @@ -307,7 +307,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@04bfae2602c015036f366a8dd4e7a619096cc516 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@dc031c8f3008c6f8a56a41b9d10ac68271952290 # flakguard@0.1.0 - name: Set combined test results id: set_test_results diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 69d6a56509c..b0dbfa1aa73 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -42,7 +42,7 @@ func TestResolver_CronSpec(t *testing.T) { Type: job.Cron, CronSpec: &job.CronSpec{ CronSchedule: "CRON_TZ=UTC 0 0 1 1 *", - EVMChainID: ubig.NewI(42), + EVMChainID: ubig.NewI(45), CreatedAt: f.Timestamp(), }, }, nil) From a1b60c3af19d12e6a269b263c0889532379b91d4 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:42:13 +0100 Subject: [PATCH 21/38] bump --- .github/workflows/flakeguard.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index aa81f35e8b9..9d60e47e2ce 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -101,7 +101,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@dc031c8f3008c6f8a56a41b9d10ac68271952290 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d8bab5b837fd124a807114d3ae9c478f868ae29c # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -260,7 +260,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@dc031c8f3008c6f8a56a41b9d10ac68271952290 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d8bab5b837fd124a807114d3ae9c478f868ae29c # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -307,7 +307,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@dc031c8f3008c6f8a56a41b9d10ac68271952290 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d8bab5b837fd124a807114d3ae9c478f868ae29c # flakguard@0.1.0 - name: Set combined test results id: set_test_results From e146d32d7a6f3d6309e2e7f9db495028da9fdb40 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:51:54 +0100 Subject: [PATCH 22/38] Fix --- .github/workflows/flakeguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 9d60e47e2ce..f8371750cb7 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -332,7 +332,7 @@ jobs: echo "all_tests_count=$ALL_TESTS_COUNT" >> "$GITHUB_OUTPUT" # Use flakeguard to filter and output failed tests based on MaxPassRatio - flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json --project-path=${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS + flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json --project-path=${{ github.workspace }}/${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS # Count failed tests if [ -f "../failed_tests.json" ]; then From 2516aaf0a1a79ee8948e24c497e8d035be6a2a6c Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:09:39 +0100 Subject: [PATCH 23/38] bump --- .github/workflows/flakeguard.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index f8371750cb7..beb68e4a625 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -101,7 +101,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d8bab5b837fd124a807114d3ae9c478f868ae29c # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@831be3f74b940ee114553fa62d4eaa3ee35bedd8 # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -260,7 +260,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d8bab5b837fd124a807114d3ae9c478f868ae29c # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@831be3f74b940ee114553fa62d4eaa3ee35bedd8 # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -307,7 +307,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d8bab5b837fd124a807114d3ae9c478f868ae29c # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@831be3f74b940ee114553fa62d4eaa3ee35bedd8 # flakguard@0.1.0 - name: Set combined test results id: set_test_results From 8e178dec810dc4304337f1b8ec2386909e0c77b3 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:13:09 +0100 Subject: [PATCH 24/38] fix --- .github/workflows/flakeguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index beb68e4a625..d37c72fa6a3 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -324,7 +324,7 @@ jobs: export PATH # Use flakeguard to aggregate all test results - flakeguard aggregate-results --results-path . --output-results ../all_tests.json + flakeguard aggregate-results --results-path . --output-results ../all_tests.json --project-path=${{ github.workspace }}/${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS # Count all tests ALL_TESTS_COUNT=$(jq '.Results | length' ../all_tests.json) From 0315ff0cbf9b830123c25efb265b96d99ab4b6f9 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:24:27 +0100 Subject: [PATCH 25/38] fix --- .github/workflows/flakeguard.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index d37c72fa6a3..d414668b8b7 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -101,7 +101,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@831be3f74b940ee114553fa62d4eaa3ee35bedd8 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@1c35e64b704dd10ef082c0887764244580382d4a # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -260,7 +260,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@831be3f74b940ee114553fa62d4eaa3ee35bedd8 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@1c35e64b704dd10ef082c0887764244580382d4a # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -307,7 +307,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@831be3f74b940ee114553fa62d4eaa3ee35bedd8 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@1c35e64b704dd10ef082c0887764244580382d4a # flakguard@0.1.0 - name: Set combined test results id: set_test_results From f69398bb8c4ce6b0815d233100ad7c0b89090686 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:37:26 +0100 Subject: [PATCH 26/38] bump --- .github/workflows/flakeguard.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index d414668b8b7..71465348035 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -101,7 +101,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@1c35e64b704dd10ef082c0887764244580382d4a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@bcd9ec90fb615d4a43164b4f09c761dd93854dea # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -260,7 +260,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@1c35e64b704dd10ef082c0887764244580382d4a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@bcd9ec90fb615d4a43164b4f09c761dd93854dea # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -307,7 +307,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@1c35e64b704dd10ef082c0887764244580382d4a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@bcd9ec90fb615d4a43164b4f09c761dd93854dea # flakguard@0.1.0 - name: Set combined test results id: set_test_results From 115152ba9f29d2c2436938f6ade52d14a1974717 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:39:57 +0100 Subject: [PATCH 27/38] revert --- .github/workflows/flakeguard.yml | 2 +- core/web/resolver/spec_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 71465348035..8f7ebabd12d 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -264,7 +264,7 @@ jobs: - name: Run tests with flakeguard shell: bash - run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=1 --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json + run: flakeguard run --project-path=${{ inputs.projectPath }} --test-packages=${{ matrix.testPackages }} --run-count=${{ env.TEST_REPEAT_COUNT }} --max-pass-ratio=${{ inputs.maxPassRatio }} --race=${{ env.RUN_WITH_RACE }} --shuffle=${{ env.RUN_WITH_SHUFFLE }} --shuffle-seed=${{ env.SHUFFLE_SEED }} --skip-tests=${{ env.SKIPPED_TESTS }} --print-failed-tests=${{ env.PRINT_FAILED_TESTS }} --output-json=test-result.json env: CL_DATABASE_URL: ${{ env.DB_URL }} diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index b0dbfa1aa73..69d6a56509c 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -42,7 +42,7 @@ func TestResolver_CronSpec(t *testing.T) { Type: job.Cron, CronSpec: &job.CronSpec{ CronSchedule: "CRON_TZ=UTC 0 0 1 1 *", - EVMChainID: ubig.NewI(45), + EVMChainID: ubig.NewI(42), CreatedAt: f.Timestamp(), }, }, nil) From 7204727a8806cb92610dd57f0f55998a876affe6 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:45:06 +0100 Subject: [PATCH 28/38] Fix --- .github/workflows/flakeguard.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 0b7b2dafa31..234a7f6ce1d 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -323,7 +323,7 @@ jobs: export PATH # Use flakeguard to aggregate all test results - flakeguard aggregate-results --results-path . --output-results ../all_tests.json + flakeguard aggregate-results --results-path . --output-results ../all_tests.json --project-path=${{ github.workspace }}/${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS # Count all tests ALL_TESTS_COUNT=$(jq '.Results | length' ../all_tests.json) @@ -331,7 +331,7 @@ jobs: echo "all_tests_count=$ALL_TESTS_COUNT" >> "$GITHUB_OUTPUT" # Use flakeguard to filter and output failed tests based on MaxPassRatio - flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json --project-path=${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS + flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json --project-path=${{ github.workspace }}/${{ inputs.projectPath }} --codeowners-path=${{ github.workspace }}/.github/CODEOWNERS # Count failed tests if [ -f "../failed_tests.json" ]; then From ddde02a5847e6db2d211aa10063bac6a555e3ad9 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:48:16 +0100 Subject: [PATCH 29/38] bump flakeguard to fix codeowners --- .github/workflows/flakeguard.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 234a7f6ce1d..1ba3c840499 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -100,7 +100,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@04bfae2602c015036f366a8dd4e7a619096cc516 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f03577def97a20a38c0e1de1cbe7fc98d416dd86 # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -259,7 +259,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@04bfae2602c015036f366a8dd4e7a619096cc516 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f03577def97a20a38c0e1de1cbe7fc98d416dd86 # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -306,7 +306,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@04bfae2602c015036f366a8dd4e7a619096cc516 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f03577def97a20a38c0e1de1cbe7fc98d416dd86 # flakguard@0.1.0 - name: Set combined test results id: set_test_results From 0e38c4223138904f636cab81ec3bc6c3724c843f Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:51:54 +0100 Subject: [PATCH 30/38] bump --- .github/workflows/flakeguard.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 8f7ebabd12d..e40fdec1c39 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -101,7 +101,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@bcd9ec90fb615d4a43164b4f09c761dd93854dea # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f03577def97a20a38c0e1de1cbe7fc98d416dd86 # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -260,7 +260,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@bcd9ec90fb615d4a43164b4f09c761dd93854dea # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f03577def97a20a38c0e1de1cbe7fc98d416dd86 # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -307,7 +307,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@bcd9ec90fb615d4a43164b4f09c761dd93854dea # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f03577def97a20a38c0e1de1cbe7fc98d416dd86 # flakguard@0.1.0 - name: Set combined test results id: set_test_results From 4f339d9b1bc0e79e831c7329c492ebf10cc32fc5 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:14:51 +0100 Subject: [PATCH 31/38] fix --- .github/workflows/flakeguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index e40fdec1c39..826ea7859d6 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -522,7 +522,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ inputs.runAllTests == 'true' && format('Ran all tests for `${{ inputs.headRef }}` branch.', '') || format('Ran changed tests between `${{ inputs.baseRef }}` and `${{ needs.get-tests.outputs.git_head_short_sha }}` (`${{ env.GIT_HEAD_REF }}`).', '') }}" + "text": "${{ inputs.runAllTests == 'true' && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" } }, { From fbe763b5ca800b45e03a706d1c7dbb31463fc308 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 4 Dec 2024 09:28:08 +0100 Subject: [PATCH 32/38] Bump flakeguard --- .github/workflows/flakeguard.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 826ea7859d6..fec3ce85ff6 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -101,7 +101,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f03577def97a20a38c0e1de1cbe7fc98d416dd86 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9e40f2765df01f20b3bf53f0fb3ead920e3a1f4a # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -260,7 +260,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f03577def97a20a38c0e1de1cbe7fc98d416dd86 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9e40f2765df01f20b3bf53f0fb3ead920e3a1f4a # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -307,7 +307,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f03577def97a20a38c0e1de1cbe7fc98d416dd86 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@9e40f2765df01f20b3bf53f0fb3ead920e3a1f4a # flakguard@0.1.0 - name: Set combined test results id: set_test_results From 5dcb3a82575e5decb385f9494761e1b62e8f3849 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:55:04 +0100 Subject: [PATCH 33/38] fail test on purpose --- core/web/resolver/spec_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 69d6a56509c..b0dbfa1aa73 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -42,7 +42,7 @@ func TestResolver_CronSpec(t *testing.T) { Type: job.Cron, CronSpec: &job.CronSpec{ CronSchedule: "CRON_TZ=UTC 0 0 1 1 *", - EVMChainID: ubig.NewI(42), + EVMChainID: ubig.NewI(45), CreatedAt: f.Timestamp(), }, }, nil) From d2a7d470a895a67dd65a255252f1ea78d220d235 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:56:34 +0100 Subject: [PATCH 34/38] fix --- .github/workflows/flakeguard.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index fec3ce85ff6..2cfc2a9af19 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -469,7 +469,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ inputs.runAllTests == 'true' && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" + "text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" } }, { @@ -522,7 +522,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ inputs.runAllTests == 'true' && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" + "text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" } }, { From 48bf79a0c7a5fc0b7ab91e0ba76527e31ea45314 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:51:51 +0100 Subject: [PATCH 35/38] Fix --- .github/workflows/flakeguard.yml | 2 +- core/web/resolver/spec_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 2cfc2a9af19..2977648336b 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -522,7 +522,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', inputs.headRef) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" + "text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', inputs.baseRef, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" } }, { diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index b0dbfa1aa73..69d6a56509c 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -42,7 +42,7 @@ func TestResolver_CronSpec(t *testing.T) { Type: job.Cron, CronSpec: &job.CronSpec{ CronSchedule: "CRON_TZ=UTC 0 0 1 1 *", - EVMChainID: ubig.NewI(45), + EVMChainID: ubig.NewI(42), CreatedAt: f.Timestamp(), }, }, nil) From eeb9e3e4316b9baa41e068d69553b30e1310a47a Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:58:01 +0100 Subject: [PATCH 36/38] Fix --- .github/workflows/flakeguard-nightly.yml | 2 +- .github/workflows/flakeguard.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard-nightly.yml b/.github/workflows/flakeguard-nightly.yml index a4f3ab31f18..294e16155bb 100644 --- a/.github/workflows/flakeguard-nightly.yml +++ b/.github/workflows/flakeguard-nightly.yml @@ -12,7 +12,7 @@ jobs: uses: ./.github/workflows/flakeguard.yml with: repoUrl: 'https://github.com/smartcontractkit/chainlink' - baseRef: 'origin/develop' + headRef: 'origin/develop' projectPath: '.' maxPassRatio: '1.0' runAllTests: true diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 2977648336b..ede82fc1b04 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -13,7 +13,7 @@ on: description: 'The path to the project to run the flaky test detection.' default: '.' baseRef: - required: true + required: false type: string description: 'The base reference or branch to compare changes for detecting flaky tests.' headRef: @@ -529,7 +529,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details> | <{3}/compare/{4}...{5}#files_bucket|Compare Changes>{6}', github.server_url, github.repository, github.run_id, inputs.repoUrl, inputs.baseRef, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}" + "text": "${{ inputs.runAllTests == true && format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details>', github.server_url, github.repository, github.run_id) || format('<{0}/{1}/actions/runs/{2}|View Flaky Detector Details> | <{3}/compare/{4}...{5}#files_bucket|Compare Changes>{6}', github.server_url, github.repository, github.run_id, inputs.repoUrl, inputs.baseRef, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}" } } ] From 29c85cd664f8c7ceb35b952b5607d94f2a976a71 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:24:44 +0100 Subject: [PATCH 37/38] fix --- .github/workflows/flakeguard-nightly.yml | 2 +- .github/workflows/flakeguard.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/flakeguard-nightly.yml b/.github/workflows/flakeguard-nightly.yml index 294e16155bb..37c00fa0a8f 100644 --- a/.github/workflows/flakeguard-nightly.yml +++ b/.github/workflows/flakeguard-nightly.yml @@ -12,7 +12,7 @@ jobs: uses: ./.github/workflows/flakeguard.yml with: repoUrl: 'https://github.com/smartcontractkit/chainlink' - headRef: 'origin/develop' + headRef: 'develop' projectPath: '.' maxPassRatio: '1.0' runAllTests: true diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index ede82fc1b04..532b8dedd61 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -386,7 +386,7 @@ jobs: with: path: all_tests.md name: all-summary.md - retention-days: 7 + retention-days: 90 - name: Upload All Test Results as Artifact if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} @@ -394,7 +394,7 @@ jobs: with: path: all_tests.json name: all-test-results.json - retention-days: 7 + retention-days: 90 - name: Upload Failed Tests Summary as Artifact if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }} @@ -402,7 +402,7 @@ jobs: with: path: failed_tests.md name: failed-summary.md - retention-days: 7 + retention-days: 90 - name: Upload Failed Test Results as Artifact if: ${{ fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 }} @@ -410,7 +410,7 @@ jobs: with: path: failed_tests.json name: failed-test-results.json - retention-days: 7 + retention-days: 90 - name: Upload Failed Test Logs as Artifact if: ${{ fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 }} @@ -418,7 +418,7 @@ jobs: with: path: failed_test_logs.json name: failed-test-logs.json - retention-days: 7 + retention-days: 90 - name: Upload All Test Results as Artifact if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 && env.UPLOAD_ALL_TEST_RESULTS == 'true' }} @@ -426,7 +426,7 @@ jobs: with: path: all_tests.json name: all-test-results.json - retention-days: 7 + retention-days: 90 - name: Post comment on PR if flaky tests found if: ${{ fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 && github.event_name == 'pull_request' }} From 650ac03ceb9cf75d00e4732705a9dc316bc47cef Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:46:10 +0100 Subject: [PATCH 38/38] fix lint --- .github/workflows/flakeguard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 532b8dedd61..ecc56e2f291 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -447,7 +447,7 @@ jobs: - name: Send Slack message for failed tests if: ${{ inputs.slackNotificationAfterTestsChannelId != '' && fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 }} - uses: slackapi/slack-github-action@v1.25.0 + uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} with: