Skip to content

Commit ee89dfd

Browse files
committed
ci(mobile-e2e): retry gradle publish + bump HTTP timeouts
Android compat-gate dispatched run 26258070936 failed in 11 seconds with: java.io.IOException: Downloading from https://services.gradle.org/distributions/gradle-9.5.0-bin.zip failed: timeout (10000ms) That's the default 10-second Gradle wrapper download socket timeout biting on a slow services.gradle.org response. The publish step never ran a single task. Two-pronged fix: 1. Bump Gradle's HTTP timeouts to 60s via GRADLE_OPTS so transient slow-fetch periods don't trip a single-request hard fail. 2. Wrap the gradlew invocation in a 3-attempt retry loop with a 10s pause between attempts to absorb single-shot upstream blips. The retry is scoped to the snapshot-publish step only; build/test steps below have their own caching/retry semantics.
1 parent 9aeb93e commit ee89dfd

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/mobile-e2e.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,29 @@ jobs:
194194
}
195195
EOG
196196
chmod +x gradlew
197-
./gradlew \
198-
-I /tmp/disable-signing.gradle \
199-
:source:api:publishToMavenLocal \
200-
:source:ui:publishToMavenLocal \
201-
:source:telemetry:publishToMavenLocal
197+
# Bump the Gradle wrapper download + dependency HTTP timeouts.
198+
# The default socketTimeout is 10s and services.gradle.org has
199+
# transient slow-responses (saw a 10s-timeout failure that aborted
200+
# the entire compat-gate at the wrapper-fetch step before a single
201+
# publish task ran). 60s is comfortably long without making real
202+
# network outages look like hangs. Also retry the gradlew invocation
203+
# twice to absorb single-shot blips.
204+
export GRADLE_OPTS="${GRADLE_OPTS:-} -Dorg.gradle.internal.http.connectionTimeout=60000 -Dorg.gradle.internal.http.socketTimeout=60000"
205+
for attempt in 1 2 3; do
206+
if ./gradlew \
207+
-I /tmp/disable-signing.gradle \
208+
:source:api:publishToMavenLocal \
209+
:source:ui:publishToMavenLocal \
210+
:source:telemetry:publishToMavenLocal; then
211+
break
212+
fi
213+
if [ "$attempt" -eq 3 ]; then
214+
echo "::error::Gradle publish failed after 3 attempts"
215+
exit 1
216+
fi
217+
echo "Gradle publish attempt $attempt failed; retrying in 10s..."
218+
sleep 10
219+
done
202220
203221
- name: Pin @clerk/expo to mavenLocal snapshot
204222
if: inputs.clerk_android_ref != '' && inputs.clerk_android_snapshot_suffix != ''

0 commit comments

Comments
 (0)