Skip to content

chore: cherry-pick #9343#9382

Merged
MarioAslau merged 1 commit intorelease/7.21.0from
chore/cherry-pick-9343
Apr 23, 2024
Merged

chore: cherry-pick #9343#9382
MarioAslau merged 1 commit intorelease/7.21.0from
chore/cherry-pick-9343

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This PR cherry-picks #9343

<!--
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.
@MarioAslau MarioAslau marked this pull request as ready for review April 23, 2024 16:55
@MarioAslau MarioAslau requested a review from a team as a code owner April 23, 2024 16:55
Copy link
Copy Markdown
Contributor

@chrisleewilcox chrisleewilcox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MarioAslau MarioAslau merged commit 3e7f439 into release/7.21.0 Apr 23, 2024
@MarioAslau MarioAslau deleted the chore/cherry-pick-9343 branch April 23, 2024 17:03
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2024
@metamaskbot metamaskbot added the release-7.21.0 Issue or pull request that will be included in release 7.21.0 label Apr 23, 2024
@metamaskbot
Copy link
Copy Markdown
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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.21.0 Issue or pull request that will be included in release 7.21.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants