Skip to content

Commit 9de90f7

Browse files
authored
ci: pre-pull testcontainer images on fork PRs (#4684)
## What The `Pre-pull testcontainer images` step is gated on `env.DOCKERHUB_USERNAME`. Fork PRs receive no repository secrets, so that variable is empty and the step is skipped along with the DockerHub login it was grouped with. ## Why With the pre-pull skipped, testcontainers pulls images lazily — inside the first test that resolves the fixture, against that test's `testTimeout`. On PR #4534 that pushed five webapp shards past their 60s cap across three runs, each failing as `Test timed out in 60000ms` while 42 of 43 files in the shard passed. Measured cost of the missing pre-pull, comparing the delta from vitest start to the first container fixture on the same runner class: | Run | Delta | | --- | --- | | internal x2 | +139.9s, +139.4s | | fork x2 | +149.7s, +149.4s | A 10.0s penalty, bimodal to within 0.3s. Note the pulls themselves succeed anonymously — there are no rate-limit errors in any of the failing logs. Only the login needs credentials, so the pre-pull can run unconditionally. ## Scope Removes the `if:` from the pre-pull step in all five workflows that have one. The DockerHub login stays gated, since it genuinely needs secrets.
1 parent 97461c0 commit 9de90f7

5 files changed

Lines changed: 0 additions & 5 deletions

File tree

.github/workflows/e2e-webapp-auth-full.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ jobs:
9999
run: echo "DockerHub login skipped because secrets are not available."
100100

101101
- name: 🐳 Pre-pull testcontainer images
102-
if: ${{ env.DOCKERHUB_USERNAME }}
103102
run: |
104103
docker pull postgres:14
105104
docker pull redis:7.2

.github/workflows/e2e-webapp.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ jobs:
7474
run: echo "DockerHub login skipped because secrets are not available."
7575

7676
- name: 🐳 Pre-pull testcontainer images
77-
if: ${{ env.DOCKERHUB_USERNAME }}
7877
run: |
7978
echo "Pre-pulling Docker images with authenticated session..."
8079
docker pull postgres:14

.github/workflows/unit-tests-internal.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ jobs:
7878
run: echo "DockerHub login skipped because secrets are not available."
7979

8080
- name: 🐳 Pre-pull testcontainer images
81-
if: ${{ env.DOCKERHUB_USERNAME }}
8281
run: |
8382
# Retry each pull - DockerHub registry timeouts are a recurring transient CI flake.
8483
pull() {

.github/workflows/unit-tests-packages.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ jobs:
8181
run: echo "DockerHub login skipped because secrets are not available."
8282

8383
- name: 🐳 Pre-pull testcontainer images
84-
if: ${{ env.DOCKERHUB_USERNAME }}
8584
run: |
8685
# Retry each pull - DockerHub registry timeouts are a recurring transient CI flake.
8786
pull() {

.github/workflows/unit-tests-webapp.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ jobs:
8686
run: echo "DockerHub login skipped because secrets are not available."
8787

8888
- name: 🐳 Pre-pull testcontainer images
89-
if: ${{ env.DOCKERHUB_USERNAME }}
9089
run: |
9190
# Retry each pull - DockerHub registry timeouts are a recurring transient CI flake.
9291
pull() {

0 commit comments

Comments
 (0)