Skip to content

Commit 9fccf9d

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

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,23 @@ 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+
for attempt in 1 2 3; do
50+
echo "Attempt $attempt of 3"
51+
if gem install bundler --version "$BUNDLER_VERSION" --no-document; then
52+
exit 0
53+
fi
54+
if [ "$attempt" -lt 3 ]; then
55+
echo "Attempt $attempt failed. Retrying..."
56+
sleep "$((attempt * 10))"
57+
fi
58+
done
59+
echo "All 3 attempts failed."
60+
exit 1
4461
- name: Set Hermes prebuilt version
4562
shell: bash
4663
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)