Skip to content

Use packaged react-native in test-e2e-local script - #36703

Closed
fortmarek wants to merge 1 commit into
react:mainfrom
fortmarek:fortmarek/fix-test-e2e-local-script
Closed

Use packaged react-native in test-e2e-local script#36703
fortmarek wants to merge 1 commit into
react:mainfrom
fortmarek:fortmarek/fix-test-e2e-local-script

Conversation

@fortmarek

@fortmarekfortmarek commented Mar 29, 2023

Copy link
Copy Markdown
Contributor

Summary

The current test-e2e-local script had two bugs:

  • On this line we were initializing a new RN project with the packed react-native created here
  • We were updating the local RN version after running npm packhere. This meant that the version inside the packaged react-native-xyz.tgz was not updated since we ran pack before updating it. This was fine since the init command was using the local react-native repository instead of the packed version.

Changelog:

[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script

Test Plan

  • Run yarn test-e2e-local -t RNTestProject -p Android. The command should succeed.

I am not completely sure how to double check that we are using the packed version. Locally, I have a fsmonitor--daemon.ipc in my react-native/.git that can't be copied. The .git folder would be copied only when cli.js init was called with the whole repository – which is how I found out about the issue in the first place.

@fortmarek
fortmarek requested a review from kelsetMarch 29, 2023 14:36
@facebook-github-botfacebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Shopify Partner: Shopify Partner labels Mar 29, 2023

@kelsetkelset left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks reasonable to me

@analysis-bot

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a8,546,664+0
androidhermesarmeabi-v7a7,861,177+0
androidhermesx869,027,965+0
androidhermesx86_648,883,653+0
androidjscarm64-v8a9,167,110+0
androidjscarmeabi-v7a8,357,650+0
androidjscx869,223,172+0
androidjscx86_649,481,667+0

Base commit: c1c22eb
Branch: main

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-botfacebook-github-bot added the Merged This PR has been merged. label Mar 29, 2023
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@cipolleschi merged this pull request in 0328a8d.

kelset pushed a commit that referenced this pull request Mar 30, 2023
Summary:
The current `test-e2e-local` script had two bugs:
- On [this](https://github.com/facebook/react-native/blob/c1c22ebacc4097ce56f19385161ebb23ee1624b3/scripts/test-e2e-local.js#L219) line we were initializing a new RN project with the packed `react-native` created [here](https://github.com/facebook/react-native/blob/c1c22ebacc4097ce56f19385161ebb23ee1624b3/scripts/test-e2e-local.js#L211)
- We were updating the local RN version after running `npm pack` [here](https://github.com/facebook/react-native/blob/c1c22ebacc4097ce56f19385161ebb23ee1624b3/scripts/test-e2e-local.js#L214). This meant that the version inside the packaged `react-native-xyz.tgz` was not updated since we ran `pack` before updating it. This was fine since the `init` command was using the local `react-native` repository instead of the packed version.
## Changelog:
[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
Pull Request resolved: #36703
Test Plan:
- Run `yarn test-e2e-local -t RNTestProject -p Android`. The command should succeed.
I am not completely sure how to double check that we are using the packed version. Locally, I have a `fsmonitor--daemon.ipc` in my `react-native/.git` that can't be copied. The `.git` folder would be copied only when `cli.js init` was called with the whole repository – which is how I found out about the issue in the first place.
Reviewed By: hoxyq
Differential Revision: D44504599
Pulled By: cipolleschi
fbshipit-source-id: e57e2858bab46d4f978eed3cbaf3e504138594b8
# Conflicts:
#	scripts/test-e2e-local.js
kelset pushed a commit that referenced this pull request Mar 30, 2023
Summary:
The current `test-e2e-local` script had two bugs:
- On [this](https://github.com/facebook/react-native/blob/c1c22ebacc4097ce56f19385161ebb23ee1624b3/scripts/test-e2e-local.js#L219) line we were initializing a new RN project with the packed `react-native` created [here](https://github.com/facebook/react-native/blob/c1c22ebacc4097ce56f19385161ebb23ee1624b3/scripts/test-e2e-local.js#L211)
- We were updating the local RN version after running `npm pack` [here](https://github.com/facebook/react-native/blob/c1c22ebacc4097ce56f19385161ebb23ee1624b3/scripts/test-e2e-local.js#L214). This meant that the version inside the packaged `react-native-xyz.tgz` was not updated since we ran `pack` before updating it. This was fine since the `init` command was using the local `react-native` repository instead of the packed version.
## Changelog:
[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
Pull Request resolved: #36703
Test Plan:
- Run `yarn test-e2e-local -t RNTestProject -p Android`. The command should succeed.
I am not completely sure how to double check that we are using the packed version. Locally, I have a `fsmonitor--daemon.ipc` in my `react-native/.git` that can't be copied. The `.git` folder would be copied only when `cli.js init` was called with the whole repository – which is how I found out about the issue in the first place.
Reviewed By: hoxyq
Differential Revision: D44504599
Pulled By: cipolleschi
fbshipit-source-id: e57e2858bab46d4f978eed3cbaf3e504138594b8
@fortmarekfortmarek mentioned this pull request Apr 25, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.p: ShopifyPartner: ShopifyPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@fortmarek@analysis-bot@facebook-github-bot@kelset@hoxyq