Skip to content

Commit d6bb3db

Browse files
authored
Disable docker login for external contributor (#3588)
* Remove unused imports * Remove docker login from kurtosis.yml Three steps removed as they are not needed to run interop test. And also allow external contributor to run the CI. - docker login action (not needed) - docker buildx action (not needed) - caching docker layer (not working btw) * Disable docker login for external contributor * Fix comparison
1 parent d3a00eb commit d6bb3db

File tree

3 files changed

+17
-20
lines changed

3 files changed

+17
-20
lines changed

.github/workflows/kurtosis.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,29 @@ jobs:
5050
failed_test_status: ${{ steps.test_result.outputs.failed_test_status }}
5151
runs-on: ubuntu-latest
5252

53+
env:
54+
# Disable login for external contributors.
55+
ENABLE_LOGIN: ${{ secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != '' }}
56+
5357
steps:
5458
- name: Checkout repository
5559
uses: actions/checkout@v4
5660

61+
# Without docker login we get rate limited when multiple PRs are coming in.
62+
# Leading to a cascade of failure for the PRs after that.
63+
# But since external contributor PRs are rare, the default rate limit
64+
# 200 PRs/6 hours seems adequate.
5765
- name: Login to Docker Hub
66+
if: ${{ env.ENABLE_LOGIN == 'true' }}
5867
uses: docker/login-action@v3
5968
with:
6069
username: ${{ secrets.DOCKERHUB_USERNAME }}
6170
password: ${{ secrets.DOCKERHUB_TOKEN }}
6271

63-
- name: Set up Docker Buildx
64-
uses: docker/setup-buildx-action@v2
65-
66-
- name: Cache Docker layers
67-
uses: actions/cache@v3
68-
with:
69-
path: /tmp/.buildx-cache
70-
key: ${{ runner.os }}-buildx-${{ github.sha }}
71-
restore-keys: |
72-
${{ runner.os }}-buildx-
73-
7472
- name: Build Docker image
7573
shell: bash
7674
run: docker build . -t localtestnet
7775

78-
7976
- name: Set up Kurtosis
8077
shell: bash
8178
run: |

tests/eest/eest_blockchain.nim

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# those terms.
99

1010
import
11-
std/[json, cmdline, os],
12-
unittest2,
11+
std/json,
1312
eth/common/headers_rlp,
1413
web3/eth_api_types,
1514
web3/engine_api_types,
@@ -25,10 +24,7 @@ import
2524
../../hive_integration/nodocker/engine/engine_client,
2625
./eest_helpers,
2726
stew/byteutils,
28-
chronos,
29-
../../execution_chain/db/ledger,
30-
../../execution_chain/core/chain/forked_chain,
31-
../../execution_chain/common/common
27+
chronos
3228

3329
proc parseBlocks*(node: JsonNode): seq[BlockDesc] =
3430
for x in node:
@@ -94,10 +90,14 @@ proc processFile*(fileName: string): bool =
9490
return testPass
9591

9692
when isMainModule:
93+
import
94+
os,
95+
unittest2
96+
9797
if paramCount() == 0:
9898
let testFile = getAppFilename().splitPath().tail
9999
echo "Usage: " & testFile & " vector.json"
100100
quit(QuitFailure)
101-
101+
102102
check processFile(paramStr(1))
103103

tests/eest/eest_blockchain_test.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# those terms.
99

1010
import
11-
std/[os, osproc],
11+
std/os,
1212
unittest2,
1313
./eest_helpers,
1414
./eest_blockchain

0 commit comments

Comments
 (0)