Merged
Conversation
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **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-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`. ## **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 before `allow-scripts` is run. On this branch, setup will complete without error even if `allow-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** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Collaborator
|
No release label on PR. Adding release label release-7.21.0 on PR, as PR was cherry-picked in branch 7.21.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR cherry-picks #9343