From 85a3e1079e08e1bad59c7eb884a502dd485fd5a1 Mon Sep 17 00:00:00 2001 From: Ronald Goedeke Date: Mon, 12 Oct 2026 14:42:31 -0300 Subject: [PATCH] ci(harness): a retry that passes no longer fails the job The harness action snapshots .harness/cache/metro before each run and passes the listing to its "Plan Metro cache save" step as one environment variable. The first run starts from an empty cache (71 bytes); the retry starts from the first run's full cache, ~157 KB, over Linux's 128 KB limit on a single environment string. bash could not start ("Argument list too long") and the job failed even though all 119 tests passed on the retry: main after #60, #65 and #66. Clear the Metro cache before each retry so its listing is as small as the first run's. iOS gets the same step. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/harness.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/harness.yml b/.github/workflows/harness.yml index 95f3bb0e..4c4e5f15 100644 --- a/.github/workflows/harness.yml +++ b/.github/workflows/harness.yml @@ -99,6 +99,15 @@ jobs: adb shell settings put global window_animation_scale 0 adb shell settings put global transition_animation_scale 0 adb shell settings put global animator_duration_scale 1 + # The action snapshots .harness/cache/metro before it runs and hands + # the listing to its cache-save step as one environment variable. After + # a full first run that listing is ~150 KB, over Linux's 128 KB limit on + # a single environment string, so the step cannot start and fails the + # job even when the retry passed. Starting the retry from an empty + # cache keeps the listing as small as the first run's. + - name: Clear the first run's Metro cache + if: steps.suites.outcome == 'failure' + run: rm -rf example/.harness/cache/metro example/.harness/cache/metro-file-map - name: Run the suites again if: steps.suites.outcome == 'failure' uses: callstackincubator/react-native-harness@v1.5.0 @@ -183,6 +192,11 @@ jobs: xcrun simctl shutdown "$udid" xcrun simctl boot "$udid" xcrun simctl bootstatus "$udid" -b + # As in the Android job: a full Metro cache makes the action's cache-save + # step fail to start. + - name: Clear the first run's Metro cache + if: steps.suites.outcome == 'failure' + run: rm -rf example/.harness/cache/metro example/.harness/cache/metro-file-map - name: Run the suites again if: steps.suites.outcome == 'failure' uses: callstackincubator/react-native-harness@v1.5.0