Skip to content

Commit 9807f48

Browse files
cortinicofacebook-github-bot
authored andcommitted
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
1 parent cd2de18 commit 9807f48

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

‎.github/actions/test-ios-rntester/action.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,27 @@ runs:
4141
uses: ruby/setup-ruby@v1
4242
with:
4343
ruby-version: ${{ inputs.ruby-version }}
44+
bundler: none
45+
- name: Install Bundler
46+
shell: bash
47+
run: |
48+
BUNDLER_VERSION="$(awk '/BUNDLED WITH/{getline; print $1}' Gemfile.lock)"
49+
if [ -z "$BUNDLER_VERSION" ]; then
50+
echo "Could not determine Bundler version from Gemfile.lock." >&2
51+
exit 1
52+
fi
53+
for attempt in 1 2 3; do
54+
echo "Attempt $attempt of 3"
55+
if gem install bundler --version "$BUNDLER_VERSION" --no-document; then
56+
exit 0
57+
fi
58+
if [ "$attempt" -lt 3 ]; then
59+
echo "Attempt $attempt failed. Retrying..."
60+
sleep "$((attempt * 10))"
61+
fi
62+
done
63+
echo "All 3 attempts failed."
64+
exit 1
4465
- name: Set Hermes prebuilt version
4566
shell: bash
4667
run: |

‎.github/workflows/e2e-ios-rntester.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ jobs:
6060
steps:
6161
- id: check
6262
run: |
63-
if [[ "${{ needs.test.outputs.status }}" == "failure" ]]; then
63+
if [[ "${{ needs.test.result }}" != "success" ||
64+
"${{ needs.test.outputs.status }}" == "failure" ]]; then
6465
echo "status=failure" >> $GITHUB_OUTPUT
6566
else
6667
echo "status=success" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)