From 2941e84b648a1220252497f74b646b29e9624956 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 10:19:05 -0500 Subject: [PATCH 01/14] give tests permission to write checks/status and put reports on pr Signed-off-by: Justin Florentine --- .github/workflows/acceptance-tests.yml | 4 ++++ .github/workflows/integration-tests.yml | 4 ++++ .github/workflows/reference-tests.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index 4767c53b140..8676c8f2c8c 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -8,6 +8,10 @@ env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" total-runners: 16 +permissions: + statuses: write + checks: write + jobs: authorize: environment: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 63297b5f930..fb947157e37 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -8,6 +8,10 @@ on: env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" +permissions: + statuses: write + checks: write + jobs: authorize: environment: diff --git a/.github/workflows/reference-tests.yml b/.github/workflows/reference-tests.yml index e690b68a635..b3b220bd9f1 100644 --- a/.github/workflows/reference-tests.yml +++ b/.github/workflows/reference-tests.yml @@ -8,6 +8,10 @@ env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" total-runners: 6 +permissions: + statuses: write + checks: write + jobs: prepareReferenceTestEthereum: runs-on: ubuntu-22.04 From 211325e9329e00c8100bb7eaf6d1a966766dac4a Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 10:45:12 -0500 Subject: [PATCH 02/14] moving perms to workflow level did not help Signed-off-by: Justin Florentine --- .github/workflows/acceptance-tests.yml | 4 ---- .github/workflows/integration-tests.yml | 4 ---- .github/workflows/reference-tests.yml | 4 ---- 3 files changed, 12 deletions(-) diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index 8676c8f2c8c..4767c53b140 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -8,10 +8,6 @@ env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" total-runners: 16 -permissions: - statuses: write - checks: write - jobs: authorize: environment: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index fb947157e37..63297b5f930 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -8,10 +8,6 @@ on: env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" -permissions: - statuses: write - checks: write - jobs: authorize: environment: diff --git a/.github/workflows/reference-tests.yml b/.github/workflows/reference-tests.yml index b3b220bd9f1..e690b68a635 100644 --- a/.github/workflows/reference-tests.yml +++ b/.github/workflows/reference-tests.yml @@ -8,10 +8,6 @@ env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" total-runners: 6 -permissions: - statuses: write - checks: write - jobs: prepareReferenceTestEthereum: runs-on: ubuntu-22.04 From 1c462d12f829348d81003c009b4cca58505a2d32 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 11:25:36 -0500 Subject: [PATCH 03/14] intentional acceptance test failure Signed-off-by: Justin Florentine --- .../condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java index efc02f73d44..eb1cfc0c33b 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java @@ -32,6 +32,6 @@ public ExpectSuccessfulEthGetTransactionReceipt( @Override public void verify(final Node node) { - WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isPresent()); + WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isNotPresent()); } } From 85641fb420e95dbc4fda45ce4b5fa0506c188b93 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 11:42:16 -0500 Subject: [PATCH 04/14] explicitly allow mikepenz/action-junit-report@v4 actions Signed-off-by: Justin Florentine --- .../condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java | 1 + 1 file changed, 1 insertion(+) diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java index eb1cfc0c33b..e43d454a175 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java @@ -32,6 +32,7 @@ public ExpectSuccessfulEthGetTransactionReceipt( @Override public void verify(final Node node) { + //TODO: TEST INVERTED FOR INTENTIONAL BREAK PLS UNDO!!! WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isNotPresent()); } } From 177966a4b4ffe0102b9ee4a47dc8ddd39f606b76 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 11:49:30 -0500 Subject: [PATCH 05/14] pendantic spotless Signed-off-by: Justin Florentine --- .../condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java index e43d454a175..fcbf5df9c7d 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java @@ -32,7 +32,7 @@ public ExpectSuccessfulEthGetTransactionReceipt( @Override public void verify(final Node node) { - //TODO: TEST INVERTED FOR INTENTIONAL BREAK PLS UNDO!!! + // TODO: TEST INVERTED FOR INTENTIONAL BREAK PLS UNDO!!! WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isNotPresent()); } } From 56f3e766d8df451063aefc778d72867fd9bd3bfb Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 12:40:21 -0500 Subject: [PATCH 06/14] updated actions allowed Signed-off-by: Justin Florentine --- .../condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java index fcbf5df9c7d..212e852b80d 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java @@ -32,7 +32,7 @@ public ExpectSuccessfulEthGetTransactionReceipt( @Override public void verify(final Node node) { - // TODO: TEST INVERTED FOR INTENTIONAL BREAK PLS UNDO!!! + // TODO: TEST INVERTED FOR INTENTIONAL BREAK PLS UNDO ASAP!!! WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isNotPresent()); } } From 1872ea2cf1f6b768db51291858c90b269c0e8dcf Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 12:58:47 -0500 Subject: [PATCH 07/14] updated actions allowed Signed-off-by: Justin Florentine --- .../condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java index 212e852b80d..fcbf5df9c7d 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java @@ -32,7 +32,7 @@ public ExpectSuccessfulEthGetTransactionReceipt( @Override public void verify(final Node node) { - // TODO: TEST INVERTED FOR INTENTIONAL BREAK PLS UNDO ASAP!!! + // TODO: TEST INVERTED FOR INTENTIONAL BREAK PLS UNDO!!! WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isNotPresent()); } } From 7497ff844969ccc3e8c2b6b7211cfc746bd85ecb Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 13:11:29 -0500 Subject: [PATCH 08/14] undid intentional acc test fail Signed-off-by: Justin Florentine --- .../eth/ExpectSuccessfulEthGetTransactionReceipt.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java index fcbf5df9c7d..efc02f73d44 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java @@ -32,7 +32,6 @@ public ExpectSuccessfulEthGetTransactionReceipt( @Override public void verify(final Node node) { - // TODO: TEST INVERTED FOR INTENTIONAL BREAK PLS UNDO!!! - WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isNotPresent()); + WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isPresent()); } } From d0b06cc884a026a2fbf66d2b27933db797619862 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 13:33:18 -0500 Subject: [PATCH 09/14] intentional acceptance test failure Signed-off-by: Justin Florentine --- .../condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java index efc02f73d44..eb1cfc0c33b 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/eth/ExpectSuccessfulEthGetTransactionReceipt.java @@ -32,6 +32,6 @@ public ExpectSuccessfulEthGetTransactionReceipt( @Override public void verify(final Node node) { - WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isPresent()); + WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isNotPresent()); } } From e4e92a733641006f9922e35997e7b20c3f79747b Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 31 Jan 2024 15:58:35 -0500 Subject: [PATCH 10/14] uprev artifact download Signed-off-by: Justin Florentine --- .github/workflows/acceptance-tests.yml | 2 +- .github/workflows/reference-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index 4767c53b140..c87e8b66fcb 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -40,7 +40,7 @@ jobs: distribution: temurin java-version: 17 - name: get acceptance test report - uses: docker/login-action@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d@v3 + uses: dawidd6/action-download-artifact@v2 with: branch: main name_is_regexp: true diff --git a/.github/workflows/reference-tests.yml b/.github/workflows/reference-tests.yml index e690b68a635..17a5477c668 100644 --- a/.github/workflows/reference-tests.yml +++ b/.github/workflows/reference-tests.yml @@ -62,7 +62,7 @@ jobs: name: 'reference-tests' path: 'ethereum/referencetests/build/generated/sources/reference-test/' - name: get reference test report - uses: docker/login-action@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d@v3 + uses: dawidd6/action-download-artifact@v2 with: branch: main name_is_regexp: true From 19399c0c3ad894d0e5164e1ea41399f647bb48a5 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Thu, 1 Feb 2024 10:18:01 -0500 Subject: [PATCH 11/14] new permission approach Signed-off-by: Justin Florentine --- .github/workflows/acceptance-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index c87e8b66fcb..2c6e1790328 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -40,7 +40,7 @@ jobs: distribution: temurin java-version: 17 - name: get acceptance test report - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 with: branch: main name_is_regexp: true From c200098910ec621419f1f19a0e4dd9bbb79b5bf5 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Fri, 2 Feb 2024 08:35:50 -0500 Subject: [PATCH 12/14] wrong action Signed-off-by: Justin Florentine --- .github/workflows/acceptance-tests.yml | 2 +- .github/workflows/integration-tests.yml | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index 2c6e1790328..69d782f9c47 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -40,7 +40,7 @@ jobs: distribution: temurin java-version: 17 - name: get acceptance test report - uses: dawidd6/action-download-artifact@v3 + uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d with: branch: main name_is_regexp: true diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 63297b5f930..2edb04875d7 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,9 +1,6 @@ name: integration-tests on: - pull_request: - pull_request_review: - types: - - submitted + pull_request_target: env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" From 97e3191ef558b6cbc7eaf6db913fc4d4d0be2224 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Fri, 2 Feb 2024 10:54:34 -0500 Subject: [PATCH 13/14] adds release branches, test actor membership action Signed-off-by: Justin Florentine --- .github/workflows/acceptance-tests.yml | 1 + .github/workflows/integration-tests.yml | 3 +++ .github/workflows/pre-review.yml | 14 +++++++++++++- .github/workflows/reference-tests.yml | 11 ++++++++++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index 69d782f9c47..1cefd9a7ead 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -3,6 +3,7 @@ on: pull_request_target: branches: - main + - release-* env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 2edb04875d7..12082d17353 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,6 +1,9 @@ name: integration-tests on: pull_request_target: + branches: + - main + - release-* env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" diff --git a/.github/workflows/pre-review.yml b/.github/workflows/pre-review.yml index 2baca446251..e7410798c40 100644 --- a/.github/workflows/pre-review.yml +++ b/.github/workflows/pre-review.yml @@ -18,8 +18,20 @@ jobs: 'external' || 'internal' }} runs-on: ubuntu-22.04 steps: - - run: true + - id: get-members + uses: GuillaumeFalourd/github-team-members@v1 + with: + org_slug: org-slug + team_slug: team-slug + token: ${{ secrets.GITHUB_TOKEN }} + + - if: steps.get-members.outputs.actor-belongs-team == 'true' + run: echo "${{ github.actor }} belongs to Team" + shell: bash + - if: steps.get-members.outputs.actor-belongs-team == 'false' + run: echo "${{ github.actor }} doesn't belong to Team" + shell: bash repolint: name: "Repository Linting" runs-on: ubuntu-22.04 diff --git a/.github/workflows/reference-tests.yml b/.github/workflows/reference-tests.yml index 17a5477c668..997b2c2162b 100644 --- a/.github/workflows/reference-tests.yml +++ b/.github/workflows/reference-tests.yml @@ -3,15 +3,24 @@ on: pull_request_target: branches: - main + - release-* env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" total-runners: 6 jobs: + authorize: + environment: + ${{ github.event_name == 'pull_request_target' && + github.event.pull_request.head.repo.full_name != github.repository && + 'external' || 'internal' }} + runs-on: ubuntu-22.04 + steps: + - run: true prepareReferenceTestEthereum: runs-on: ubuntu-22.04 - needs: shouldRun + needs: authorize steps: - name: Checkout Repo uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 From 2bed40cc9806dedb39ccdf7df9325adca8565179 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Fri, 2 Feb 2024 12:22:33 -0500 Subject: [PATCH 14/14] adds release branches, test actor membership action Signed-off-by: Justin Florentine --- .github/workflows/pre-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-review.yml b/.github/workflows/pre-review.yml index e7410798c40..40d969290b9 100644 --- a/.github/workflows/pre-review.yml +++ b/.github/workflows/pre-review.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-22.04 steps: - id: get-members - uses: GuillaumeFalourd/github-team-members@v1 + uses: GuillaumeFalourd/github-team-members@2c201b9c885619191c705b947322e1c37cb53b00 with: org_slug: org-slug team_slug: team-slug