Skip to content

ci(harness): a retry that passes no longer fails the job - #67

Merged
ronickg merged 1 commit into
mainfrom
ci/harness-retry-cache
Oct 12, 2026
Merged

ronickg merged 1 commit into
mainfrom
ci/harness-retry-cache

Conversation

@ronickg

@ronickg ronickg commented Oct 12, 2026

Copy link
Copy Markdown
Owner

When the first attempt of the on-device suites fails, the retry runs. If the retry passes, the job still goes red:

##[error]An error occurred trying to start process '/usr/bin/bash' ... Argument list too long

This happened on main after #60, and on #65 and #66. In each case the retry passed all 119 tests.

Cause. callstackincubator/react-native-harness@v1.5.0 snapshots .harness/cache/metro before it runs. It then hands that listing to its "Plan Metro cache save" step as INPUT_METRO_SNAPSHOT:

  • On the first run the cache is empty and the variable is 71 bytes.
  • On the retry the cache holds the first run's transforms and the variable is 157,401 bytes, measured in feat(example): Uno's credit amount picker and masked inputs #66's log. That is over Linux's 128 KB limit on a single environment string, so the step can't start.

Fix. Delete the Metro cache before each retry, so its listing is as small as the first run's. The retry already had to transform everything; on a fresh runner that is what the first run does. iOS gets the same step: macOS has no per-string limit, but the listing grows the same way.

Testing. This PR's own checks only reach the retry if a first attempt flakes. The change is a rm -rf of the two folders the action restores and snapshots (action.yml lines 171–197).

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@ronickg
ronickg merged commit fea3445 into main Oct 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant