From 8c84c434db38cd928a5c55664510b4142adf3e06 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Fri, 2 Oct 2026 00:57:44 -0700 Subject: [PATCH] Harden iOS CI retries for runner and gem flakes Summary: Treat any non-successful iOS RNTester E2E matrix result as a failure so the existing fresh-runner retry chain runs when a hosted runner exits before the status step. Disable ruby/setup-ruby's implicit Bundler installation and install the lockfile version with three bounded attempts and backoff. Deterministic Bundler failures still remain red after the final attempt. The E2E change addresses job-level runner failures; it does not change the existing step-level matrix output behavior. Changelog: [Internal] Differential Revision: D122967026 --- .github/actions/test-ios-rntester/action.yml | 21 ++++++++++++++++++++ .github/workflows/e2e-ios-rntester.yml | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/actions/test-ios-rntester/action.yml b/.github/actions/test-ios-rntester/action.yml index 7f5d83855a8e..d6a4b4604ba3 100644 --- a/.github/actions/test-ios-rntester/action.yml +++ b/.github/actions/test-ios-rntester/action.yml @@ -41,6 +41,27 @@ runs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ inputs.ruby-version }} + bundler: none + - name: Install Bundler + shell: bash + run: | + BUNDLER_VERSION="$(awk '/BUNDLED WITH/{getline; print $1}' Gemfile.lock)" + if [ -z "$BUNDLER_VERSION" ]; then + echo "Could not determine Bundler version from Gemfile.lock." >&2 + exit 1 + fi + for attempt in 1 2 3; do + echo "Attempt $attempt of 3" + if gem install bundler --version "$BUNDLER_VERSION" --no-document; then + exit 0 + fi + if [ "$attempt" -lt 3 ]; then + echo "Attempt $attempt failed. Retrying..." + sleep "$((attempt * 10))" + fi + done + echo "All 3 attempts failed." + exit 1 - name: Set Hermes prebuilt version shell: bash run: | diff --git a/.github/workflows/e2e-ios-rntester.yml b/.github/workflows/e2e-ios-rntester.yml index e0f69be743ae..0660257487bf 100644 --- a/.github/workflows/e2e-ios-rntester.yml +++ b/.github/workflows/e2e-ios-rntester.yml @@ -60,7 +60,8 @@ jobs: steps: - id: check run: | - if [[ "${{ needs.test.outputs.status }}" == "failure" ]]; then + if [[ "${{ needs.test.result }}" != "success" || + "${{ needs.test.outputs.status }}" == "failure" ]]; then echo "status=failure" >> $GITHUB_OUTPUT else echo "status=success" >> $GITHUB_OUTPUT