From 34ea5316ded47b0dd5765a35c1c16c25780c88d3 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:54:13 +0100 Subject: [PATCH 01/23] Bump report runner for flakeguard workflow --- .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 4c1aa695c62..33ed2c41f3f 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -281,7 +281,7 @@ jobs: needs: [get-tests, run-tests] if: always() name: Report - runs-on: ubuntu-24.04-8cores-32GB-ARM # Use a runner with more resources to avoid OOM errors when aggregating test results. + runs-on: ubuntu22.04-32cores-128GB # Use a runner with more resources to avoid OOM errors when aggregating test results. outputs: test_results: ${{ steps.results.outputs.results }} steps: From 0e9b0846f3a2c840d934a819a9f4660afad89057 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:23:25 +0100 Subject: [PATCH 02/23] Add metadata for flakeguard reports --- .github/workflows/flakeguard.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 33ed2c41f3f..8fd482e0e97 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -102,7 +102,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@2c9e819a664bd39db7a8fc7840d464111e7f43bd # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -261,7 +261,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@2c9e819a664bd39db7a8fc7840d464111e7f43bd # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -308,7 +308,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@2c9e819a664bd39db7a8fc7840d464111e7f43bd # flakguard@0.1.0 - name: Aggregate Flakeguard Results id: results @@ -330,6 +330,10 @@ jobs: --repo-path "${{ github.workspace }}" \ --codeowners-path "${{ github.workspace }}/.github/CODEOWNERS" \ --max-pass-ratio "${{ inputs.maxPassRatio }}" + --repo-url "${{ inputs.repoUrl }}.git" + --base-ref "${{ inputs.baseRef }}" + --head-ref "${{ env.GIT_HEAD_REF }}" + --github-workflow-name "${{ github.workflow }}" # Print out the summary file echo -e "\nFlakeguard Summary:" From b82d91958fc4d5879d98a1ba132fb12b4c2cf51f Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:50:25 +0100 Subject: [PATCH 03/23] fix --- .github/workflows/flakeguard.yml | 33 +++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 8fd482e0e97..7f59cee3f41 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -56,6 +56,7 @@ on: required: true env: + GIT_BASE_REF: ${{ inputs.baseRef }} GIT_HEAD_REF: ${{ inputs.headRef || github.ref }} SKIPPED_TESTS: ${{ fromJSON(inputs.extraArgs)['skipped_tests'] || '' }} # Comma separated list of test names to skip running in the flaky detector. Related issue: TT-1823 DEFAULT_MAX_RUNNER_COUNT: ${{ fromJSON(inputs.extraArgs)['default_max_runner_count'] || '8' }} # The default maximum number of GitHub runners to use for parallel test execution. @@ -80,6 +81,7 @@ jobs: affected_test_packages: ${{ steps.get-tests.outputs.packages }} git_head_sha: ${{ steps.get_commit_sha.outputs.git_head_sha }} git_head_short_sha: ${{ steps.get_commit_sha.outputs.git_head_short_sha }} + git_base_sha: ${{ steps.get_commit_sha.outputs.git_base_sha }} steps: - name: Checkout repository uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 @@ -87,14 +89,32 @@ jobs: fetch-depth: 0 ref: ${{ env.GIT_HEAD_REF }} - - name: Get commit SHA + - name: Get SHA id: get_commit_sha run: | + # Resolve HEAD SHA git_head_sha=$(git rev-parse HEAD) git_head_short_sha=$(git rev-parse --short HEAD) echo "git_head_sha=$git_head_sha" >> $GITHUB_OUTPUT echo "git_head_short_sha=$git_head_short_sha" >> $GITHUB_OUTPUT + # Print HEAD SHAs to the console + echo "HEAD SHA: $git_head_sha" + echo "HEAD Short SHA: $git_head_short_sha" + + # Conditionally resolve BASE SHA + if [ -n "${{ env.GIT_BASE_REF }}" ]; then + git fetch origin ${{ env.GIT_BASE_REF }} --quiet + git_base_sha=$(git rev-parse origin/${{ env.GIT_BASE_REF }}) + echo "git_base_sha=$git_base_sha" >> $GITHUB_OUTPUT + + # Print BASE SHA to the console + echo "BASE SHA: $git_base_sha" + else + echo "BASE SHA not provided." + echo "git_base_sha=" >> $GITHUB_OUTPUT + fi + - name: Set up Go 1.21.9 uses: actions/setup-go@v5.0.2 with: @@ -102,7 +122,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@2c9e819a664bd39db7a8fc7840d464111e7f43bd # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@7d17ecdf25f484bbfeb2a883fc1909b39c390ecf # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -261,7 +281,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@2c9e819a664bd39db7a8fc7840d464111e7f43bd # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@7d17ecdf25f484bbfeb2a883fc1909b39c390ecf # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -308,7 +328,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@2c9e819a664bd39db7a8fc7840d464111e7f43bd # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@7d17ecdf25f484bbfeb2a883fc1909b39c390ecf # flakguard@0.1.0 - name: Aggregate Flakeguard Results id: results @@ -330,9 +350,8 @@ jobs: --repo-path "${{ github.workspace }}" \ --codeowners-path "${{ github.workspace }}/.github/CODEOWNERS" \ --max-pass-ratio "${{ inputs.maxPassRatio }}" - --repo-url "${{ inputs.repoUrl }}.git" - --base-ref "${{ inputs.baseRef }}" - --head-ref "${{ env.GIT_HEAD_REF }}" + --base-sha "${{ needs.get-tests.outputs.git_base_sha }}" + --head-sha "${{ needs.get-tests.outputs.git_head_sha }}" --github-workflow-name "${{ github.workflow }}" # Print out the summary file From 87c94c5378354906f631cb73182058c486ef9e81 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:51:17 +0100 Subject: [PATCH 04/23] Add repo url --- .github/workflows/flakeguard.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 7f59cee3f41..7921009ea57 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -350,6 +350,7 @@ jobs: --repo-path "${{ github.workspace }}" \ --codeowners-path "${{ github.workspace }}/.github/CODEOWNERS" \ --max-pass-ratio "${{ inputs.maxPassRatio }}" + --repo-url "${{ inputs.repoUrl }}" --base-sha "${{ needs.get-tests.outputs.git_base_sha }}" --head-sha "${{ needs.get-tests.outputs.git_head_sha }}" --github-workflow-name "${{ github.workflow }}" From 9d04762afa06051847a95eeb66710e216f0a3e01 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:53:42 +0100 Subject: [PATCH 05/23] 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 7921009ea57..046d8d6bd41 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -105,7 +105,7 @@ jobs: # Conditionally resolve BASE SHA if [ -n "${{ env.GIT_BASE_REF }}" ]; then git fetch origin ${{ env.GIT_BASE_REF }} --quiet - git_base_sha=$(git rev-parse origin/${{ env.GIT_BASE_REF }}) + git_base_sha=$(git rev-parse ${{ env.GIT_BASE_REF }}) echo "git_base_sha=$git_base_sha" >> $GITHUB_OUTPUT # Print BASE SHA to the console From 73197cddd49ad5264c1209c7521a9cd73147fb8f Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:54:24 +0100 Subject: [PATCH 06/23] update --- .github/workflows/flakeguard-on-demand.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flakeguard-on-demand.yml b/.github/workflows/flakeguard-on-demand.yml index 0ba84c5ab58..020ce9aa0dd 100644 --- a/.github/workflows/flakeguard-on-demand.yml +++ b/.github/workflows/flakeguard-on-demand.yml @@ -17,7 +17,7 @@ on: required: true type: string description: 'The base reference or branch to compare changes for detecting flaky tests.' - default: 'origin/develop' + default: 'develop' headRef: required: false type: string From f565ddf499de69ea77032fbfd38f5aac2d9ededb Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:57:33 +0100 Subject: [PATCH 07/23] fix --- .github/workflows/flakeguard-on-demand.yml | 7 +++---- .github/workflows/flakeguard.yml | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/flakeguard-on-demand.yml b/.github/workflows/flakeguard-on-demand.yml index 020ce9aa0dd..4508da30e6b 100644 --- a/.github/workflows/flakeguard-on-demand.yml +++ b/.github/workflows/flakeguard-on-demand.yml @@ -14,14 +14,13 @@ 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.' - default: 'develop' + description: 'The base reference or branch to compare changes for detecting flaky tests. Set only when running diffs between branches. E.g. (develop)' headRef: required: false type: string - description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch.' + description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch. E.g. (develop)' runAllTests: required: false type: boolean diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 046d8d6bd41..60a84341b15 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -15,11 +15,11 @@ on: baseRef: required: false type: string - description: 'The base reference or branch to compare changes for detecting flaky tests.' + description: 'The base reference or branch to compare changes for detecting flaky tests. Set only when running diffs between branches. E.g. (develop)' headRef: required: false type: string - description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch.' + description: 'The head reference or branch to compare changes for detecting flaky tests. Default is the current branch. E.g. (develop)' runAllTests: required: false type: boolean From f40b543664ad9d4e94199c7b6d9a9390685fb577 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:01:15 +0100 Subject: [PATCH 08/23] to revert: change test to kick off run --- core/web/resolver/spec_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 69d6a56509c..9cc06500235 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -26,7 +26,6 @@ import ( // Specs are only embedded on the job and are not fetchable by it's own id, so // we test the spec resolvers by fetching a job by id. - func TestResolver_CronSpec(t *testing.T) { var ( id = int32(1) From cb39b3dbaefed505e06b6a9cf3875281cac5196f Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:11:25 +0100 Subject: [PATCH 09/23] 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 60a84341b15..217af2b1e69 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -104,7 +104,7 @@ jobs: # Conditionally resolve BASE SHA if [ -n "${{ env.GIT_BASE_REF }}" ]; then - git fetch origin ${{ env.GIT_BASE_REF }} --quiet + # git fetch origin ${{ env.GIT_BASE_REF }} --quiet git_base_sha=$(git rev-parse ${{ env.GIT_BASE_REF }}) echo "git_base_sha=$git_base_sha" >> $GITHUB_OUTPUT From bbc6b27fa744607ed774e71118fd293fd48d8a9a Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:16:13 +0100 Subject: [PATCH 10/23] fix --- .github/workflows/flakeguard.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 217af2b1e69..e74094b8fd1 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -104,8 +104,9 @@ jobs: # Conditionally resolve BASE SHA if [ -n "${{ env.GIT_BASE_REF }}" ]; then - # git fetch origin ${{ env.GIT_BASE_REF }} --quiet - git_base_sha=$(git rev-parse ${{ env.GIT_BASE_REF }}) + git fetch origin ${{ env.GIT_BASE_REF }} --quiet + + git_base_sha=$(git rev-parse origin/${{ env.GIT_BASE_REF }}) echo "git_base_sha=$git_base_sha" >> $GITHUB_OUTPUT # Print BASE SHA to the console From 1ca9b3db5c91f318f56e4ebc193651be5b174dbe Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:34:51 +0100 Subject: [PATCH 11/23] fix --- .github/workflows/flakeguard.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index e74094b8fd1..ed3fbeb48c7 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -105,7 +105,7 @@ jobs: # Conditionally resolve BASE SHA if [ -n "${{ env.GIT_BASE_REF }}" ]; then git fetch origin ${{ env.GIT_BASE_REF }} --quiet - + git_base_sha=$(git rev-parse origin/${{ env.GIT_BASE_REF }}) echo "git_base_sha=$git_base_sha" >> $GITHUB_OUTPUT @@ -350,10 +350,10 @@ jobs: --output-path ./flakeguard-report \ --repo-path "${{ github.workspace }}" \ --codeowners-path "${{ github.workspace }}/.github/CODEOWNERS" \ - --max-pass-ratio "${{ inputs.maxPassRatio }}" - --repo-url "${{ inputs.repoUrl }}" - --base-sha "${{ needs.get-tests.outputs.git_base_sha }}" - --head-sha "${{ needs.get-tests.outputs.git_head_sha }}" + --max-pass-ratio "${{ inputs.maxPassRatio }}" \ + --repo-url "${{ inputs.repoUrl }}" \ + --base-sha "${{ needs.get-tests.outputs.git_base_sha }}" \ + --head-sha "${{ needs.get-tests.outputs.git_head_sha }}" \ --github-workflow-name "${{ github.workflow }}" # Print out the summary file From 18c8d8c27f85dafe6cba4dbdf77e755658f84e53 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:46:54 +0100 Subject: [PATCH 12/23] 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 ed3fbeb48c7..09396f23cdc 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -123,7 +123,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@7d17ecdf25f484bbfeb2a883fc1909b39c390ecf # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@ccfea1bcfab12eb8cac98b3007b08440deb1db25 # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -282,7 +282,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@7d17ecdf25f484bbfeb2a883fc1909b39c390ecf # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@ccfea1bcfab12eb8cac98b3007b08440deb1db25 # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -329,7 +329,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@7d17ecdf25f484bbfeb2a883fc1909b39c390ecf # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@ccfea1bcfab12eb8cac98b3007b08440deb1db25 # flakguard@0.1.0 - name: Aggregate Flakeguard Results id: results From 2062f50ffb193a255d4d54db585cf46a36157310 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:48:10 +0100 Subject: [PATCH 13/23] revert unit test --- core/web/resolver/spec_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 9cc06500235..69d6a56509c 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -26,6 +26,7 @@ import ( // Specs are only embedded on the job and are not fetchable by it's own id, so // we test the spec resolvers by fetching a job by id. + func TestResolver_CronSpec(t *testing.T) { var ( id = int32(1) From 6d21baaa67f960b86dd0539260f4b813e3759d4b Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:18:50 +0100 Subject: [PATCH 14/23] 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 33ed2c41f3f..8a48ac1725d 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -102,7 +102,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d3bffaf82860b71f0c6228175999f8476be2550e # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -261,7 +261,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d3bffaf82860b71f0c6228175999f8476be2550e # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -308,7 +308,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@404e04e1e2e2dd5a384b09bd05b8d80409b6609a # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d3bffaf82860b71f0c6228175999f8476be2550e # flakguard@0.1.0 - name: Aggregate Flakeguard Results id: results From acfee80460fcb0c6ba605a30ac30d91b7d1e21fd Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:10:19 +0100 Subject: [PATCH 15/23] downgrade report runner --- .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 c149475af0e..5f464666719 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -302,7 +302,7 @@ jobs: needs: [get-tests, run-tests] if: always() name: Report - runs-on: ubuntu22.04-32cores-128GB # Use a runner with more resources to avoid OOM errors when aggregating test results. + runs-on: ubuntu-24.04-8cores-32GB-ARM # Use a runner with more resources to avoid OOM errors when aggregating test results. outputs: test_results: ${{ steps.results.outputs.results }} steps: From 09892107e156df61cebe6560c6545d01e686c926 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:13:25 +0100 Subject: [PATCH 16/23] fix references --- .github/workflows/flakeguard.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index 5f464666719..8df600f9b9a 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -136,7 +136,7 @@ jobs: PATH=$PATH:$(go env GOPATH)/bin export PATH - PACKAGES=$(flakeguard find --find-by-test-files-diff=${{ inputs.findByTestFilesDiff }} --find-by-affected-packages=${{ inputs.findByAffectedPackages }} --base-ref=origin/${{ inputs.baseRef }} --project-path=${{ inputs.projectPath }}) + PACKAGES=$(flakeguard find --find-by-test-files-diff=${{ inputs.findByTestFilesDiff }} --find-by-affected-packages=${{ inputs.findByAffectedPackages }} --base-ref=origin/${{ env.GIT_BASE_REF }} --project-path=${{ inputs.projectPath }}) echo $PACKAGES echo "packages=$PACKAGES" >> $GITHUB_OUTPUT @@ -151,7 +151,7 @@ jobs: PATH=$PATH:$(go env GOPATH)/bin export PATH - TEST_FILES=$(flakeguard find --only-show-changed-test-files=true --base-ref=origin/${{ inputs.baseRef }} --project-path=${{ inputs.projectPath }}) + TEST_FILES=$(flakeguard find --only-show-changed-test-files=true --base-ref=origin/${{ env.GIT_BASE_REF }} --project-path=${{ inputs.projectPath }}) echo $TEST_FILES echo "test_files=$TEST_FILES" >> $GITHUB_OUTPUT @@ -486,7 +486,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}`).', env.GIT_BASE_REF, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" } }, { @@ -506,7 +506,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": "${{ 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, env.GIT_BASE_REF, needs.get-tests.outputs.git_head_sha, github.event_name == 'pull_request' && format(' | <{0}|View PR>', github.event.pull_request.html_url) || '') }}" } } ] @@ -539,7 +539,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "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) }}" + "text": "${{ inputs.runAllTests == true && format('Ran all tests for `{0}` branch.', env.GIT_HEAD_REF) || format('Ran changed tests between `{0}` and `{1}` (`{2}`).', env.GIT_BASE_REF, needs.get-tests.outputs.git_head_short_sha, env.GIT_HEAD_REF) }}" } }, { From 88cf3e89f6eb3f8854d8888fae392918f0faaa1b Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:18:38 +0100 Subject: [PATCH 17/23] use flakeguard with perf optimisations --- .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 8df600f9b9a..112e7c659be 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -123,7 +123,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d3bffaf82860b71f0c6228175999f8476be2550e # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a08fcaf5a75cd4676445d25d8e585753c1a8328c # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -282,7 +282,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d3bffaf82860b71f0c6228175999f8476be2550e # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a08fcaf5a75cd4676445d25d8e585753c1a8328c # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -329,7 +329,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@d3bffaf82860b71f0c6228175999f8476be2550e # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a08fcaf5a75cd4676445d25d8e585753c1a8328c # flakguard@0.1.0 - name: Aggregate Flakeguard Results id: results From fd4d9f078f3f804e80fb1283eb459f6fe787f408 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:09:52 +0100 Subject: [PATCH 18/23] 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 112e7c659be..7ce96d91e38 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -123,7 +123,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a08fcaf5a75cd4676445d25d8e585753c1a8328c # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a482c472498a026916e74952e0d8e1786e51a778 # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -282,7 +282,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a08fcaf5a75cd4676445d25d8e585753c1a8328c # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a482c472498a026916e74952e0d8e1786e51a778 # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -329,7 +329,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a08fcaf5a75cd4676445d25d8e585753c1a8328c # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a482c472498a026916e74952e0d8e1786e51a778 # flakguard@0.1.0 - name: Aggregate Flakeguard Results id: results From 111a2fc0ce07c547c83a9ad6349d4bc14089097a Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:38:23 +0100 Subject: [PATCH 19/23] to 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 73e9cc72558fb98e379b12c5c621c1da8481beb7 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:01:11 +0100 Subject: [PATCH 20/23] 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 7ce96d91e38..ab9abaac683 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -123,7 +123,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a482c472498a026916e74952e0d8e1786e51a778 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f6854b16c61789bff70d96747532f6ff23772447 # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -282,7 +282,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a482c472498a026916e74952e0d8e1786e51a778 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f6854b16c61789bff70d96747532f6ff23772447 # flakguard@0.1.0 - name: Run tests with flakeguard shell: bash @@ -329,7 +329,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@a482c472498a026916e74952e0d8e1786e51a778 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f6854b16c61789bff70d96747532f6ff23772447 # flakguard@0.1.0 - name: Aggregate Flakeguard Results id: results From cd25af8544a8007dd13e595eb1d312adff8f7cde Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:01:19 +0100 Subject: [PATCH 21/23] Revert "to revert: fail test" This reverts commit 111a2fc0ce07c547c83a9ad6349d4bc14089097a. --- 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 92d66609e365a39636e79eb058214b7a5cd0ac1a Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:20:49 +0100 Subject: [PATCH 22/23] bump flakeguard --- .github/workflows/flakeguard.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/flakeguard.yml b/.github/workflows/flakeguard.yml index ab9abaac683..fffd85ee111 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -123,7 +123,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f6854b16c61789bff70d96747532f6ff23772447 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@fc2d7e38486853d2bed06e9074868087f5b55506 # flakguard@0.1.0 - name: Find new or updated test packages if: ${{ inputs.runAllTests == false }} @@ -282,11 +282,11 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f6854b16c61789bff70d96747532f6ff23772447 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@fc2d7e38486853d2bed06e9074868087f5b55506 # 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 }} --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 }} --output-json=test-result.json --omit-test-outputs-on-success=true env: CL_DATABASE_URL: ${{ env.DB_URL }} @@ -329,7 +329,7 @@ jobs: - name: Install flakeguard shell: bash - run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@f6854b16c61789bff70d96747532f6ff23772447 # flakguard@0.1.0 + run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/flakeguard@fc2d7e38486853d2bed06e9074868087f5b55506 # flakguard@0.1.0 - name: Aggregate Flakeguard Results id: results From fbf87576b5c8d6e1c7ed07c11ab5b1cd24c87e91 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Fri, 13 Dec 2024 09:48:22 +0100 Subject: [PATCH 23/23] downgrade report runner --- .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 fffd85ee111..82d33e3e124 100644 --- a/.github/workflows/flakeguard.yml +++ b/.github/workflows/flakeguard.yml @@ -302,7 +302,7 @@ jobs: needs: [get-tests, run-tests] if: always() name: Report - runs-on: ubuntu-24.04-8cores-32GB-ARM # Use a runner with more resources to avoid OOM errors when aggregating test results. + runs-on: ubuntu-latest outputs: test_results: ${{ steps.results.outputs.results }} steps: