From 9807f4847f694203fa220eacfb856a6468cc623c Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Fri, 2 Oct 2026 02:09:27 -0700 Subject: [PATCH] Harden iOS CI retries for runner and gem flakes Summary: Two unrelated iOS CI jobs failed on `main` commit `cd2de187e8878119896159371225acbb9dfa5d9c`. The commit itself only changed Android autolinking code, so neither failure was attributable to its product change. This patch hardens the two affected CI paths without weakening their final failure semantics. ### Dynamic-framework Bundler setup Failed job: https://github.com/react/react-native/actions/runs/36918732275/job/110559233737 The Debug dynamic-framework job failed while `ruby/setup-ruby` was performing its implicit one-shot Bundler installation. Its Release sibling passed in the same workflow, and both lanes passed on the immediately preceding `main` commit. That evidence points to a transient RubyGems/Bundler setup failure rather than a deterministic React Native regression. Disable the implicit installation with `bundler: none`, read the exact pinned Bundler version from `Gemfile.lock`, and install it with three bounded attempts and 10-/20-second backoff. The script fails immediately if the lockfile version cannot be determined, and persistent installation failures remain red after the third attempt. ### E2E hosted-runner loss Failed job: https://github.com/react/react-native/actions/runs/36918732275/job/110577294552 The Release E2E matrix cell lost communication with its GitHub-hosted runner before reaching the step that writes its explicit status output. The downstream report job checked only that output. Because runner loss left the output empty rather than setting it to `failure`, the report job incorrectly emitted success and skipped the existing fresh-runner retry chain. Also inspect `needs.test.result`. Any non-successful matrix result now propagates failure and activates the existing retry jobs, while successful jobs and explicit test failures retain their previous behaviour. This changes failure reporting only; it does not alter E2E test execution. 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