-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix intermittent install failures #9343
Conversation
A new setup script was introduced in #9025 that caused certain parts of the `yarn setup` command to run in parallel. Since then we have been seeing intermittent failures during setup, for example this failed build: https://app.bitrise.io/build/f748e322-fc0b-4c1a-ae72-5a7ce642304a#c69dfbdb-778d-4ba1-b2a0-c71088b0f878-error This failure is caused by the "React Native nodeify" step running in parallel with the "allow-scripts" step, which runs install scripts needed by later setup steps. The setup script has been updated to run these steps sequentially, as they were run before. There are opportunities to do some of these steps in parallel, but we need to ensure that any steps that operate on `node_modules` run in a predictable order and complete prior to any later steps that rely on `node_modules`.
Bitrise❌❌❌ Commit hash: 2e680d2 Note
|
Quality Gate passedIssues Measures |
There are some E2E failures, but they appear to be issues that already exist on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ ✅ ✅
Missing release label release-7.21.0 on PR. Adding release label release-7.21.0 on PR and removing other release labels(release-7.22.0), as PR was cherry-picked in branch 7.21.0. |
Description
A new setup script was introduced in #9025 that caused certain parts of the
yarn setup
command to run in parallel. Since then we have been seeing intermittent failures during setup, for example this failed build: https://app.bitrise.io/build/f748e322-fc0b-4c1a-ae72-5a7ce642304a#c69dfbdb-778d-4ba1-b2a0-c71088b0f878-errorThis failure is caused by the "React Native nodeify" step running in parallel with the "allow-scripts" step, which runs install scripts needed by later setup steps.
The setup script has been updated to run these steps sequentially, as they were run before. There are opportunities to do some of these steps in parallel, but we need to ensure that any steps that operate on
node_modules
run in a predictable order and complete prior to any later steps that rely onnode_modules
.Related issues
Fixes #9344
Relates to #9025
Manual testing steps
The problem appears intermittently in CI. I don't know of a reliable way to reproduce this, but you could artificially create that situation on
main
by adding a delay beforeallow-scripts
is run. On this branch, setup will complete without error even ifallow-scripts
is delayed (because the post install steps now wait for the setup steps to complete before running).To ensure this doesn't introduce any additional regressions, I'd recommend running
yarn setup
then ensuring the build works. Though Bitrise should be effective in testing that.Screenshots/Recordings
N/A
Pre-merge author checklist
Pre-merge reviewer checklist