Skip to content
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

[RN][Release]Fix RNTestProject testing on Android #41172

Closed

Conversation

cipolleschi
Copy link
Contributor

@cipolleschi cipolleschi commented Oct 24, 2023

Summary:

While releasing RN 0.73.0-RC3, we relaized that the e2e test script was bugged for Android when used to test RNTestProject with the -c option.

There were 2 problems:

  • The downloaded maven-local was not actually used because it doesn't work with a zip. (We were always downloading a version from Maven)
  • The versions of React Native between maven-local and the locally packaged React Native were different.

This change fixes the script by:

  • Downloading maven-local
  • Unzipping maven-local and passing the new folder to the Android app
  • Downloading the React Native version that has been packaged in CI

By unzipping maven-local and using the unzipped folder, we make sure that Android is actually using the local repository.
By downloading both the packaged react native and the maven-local from the same CI workflow, we ensure that the versions are aligned.

This also speeds-up further the Android testing.

While running this change, we also moved the pod install step inside the if (iOS) branch, so we do not install Cocoapods if we need to test
Android.

Changelog:

[Internal] - Fix Android E2E test script when downloading artefacts from CI

Test Plan:

Tested locally on both main and 0.73-stable, on both Android and iOS

@facebook-github-bot facebook-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: Facebook Partner: Facebook Partner labels Oct 24, 2023
@cipolleschi cipolleschi force-pushed the cipolleschi/fix_e2e_test_android_rntestproject branch from 7be2946 to cf6d076 Compare October 24, 2023 14:11
@cipolleschi cipolleschi force-pushed the cipolleschi/fix_e2e_test_android_rntestproject branch from cf6d076 to 6cde706 Compare October 24, 2023 14:20
@analysis-bot
Copy link

analysis-bot commented Oct 24, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,653,248 +1
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,035,016 +0
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 3648886
Branch: main

@kelset
Copy link
Contributor

kelset commented Oct 24, 2023

(I guess the idea is to merge on main then pick in 0.72 and 0.73? I seem to recall @cortinico mentioning that this needs to be fixed in 0.72 too?)

@cipolleschi
Copy link
Contributor Author

(I guess the idea is to merge on main then pick in 0.72 and 0.73? I seem to recall @cortinico mentioning that this needs to be fixed in 0.72 too?)

@kelset yes, I already ported it to 0.73 (but I committed it by mistake, 🤦 ) once this is approved, I'll port the changes to 0.72 too

@cipolleschi cipolleschi force-pushed the cipolleschi/fix_e2e_test_android_rntestproject branch from 6cde706 to c3f2455 Compare October 25, 2023 13:44
@facebook-github-bot
Copy link
Contributor

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

@cipolleschi cipolleschi force-pushed the cipolleschi/fix_e2e_test_android_rntestproject branch from c3f2455 to 99083a4 Compare October 27, 2023 13:44
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 27, 2023
@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in 4eed12b.

Othinn pushed a commit to Othinn/react-native that referenced this pull request Oct 30, 2023
Summary:
While releasing RN 0.73.0-RC3, we relaized that the e2e test script was bugged for Android when used to test RNTestProject with the `-c` option.

There  were 2 problems:
- The downloaded maven-local was not actually used because it doesn't work with a zip. (We were always downloading a version from Maven)
- The versions of React Native between maven-local and the locally packaged React Native were different.

This change fixes the script by:
- Downloading maven-local
- Unzipping maven-local and passing the new folder to the Android app
- Downloading the React Native version that has been packaged in CI

By unzipping maven-local and using the unzipped folder, we make sure that Android is actually using the local repository.
By downloading both the packaged react native and the maven-local from the same CI workflow, we ensure that the versions are aligned.

This also speeds-up further the Android testing.

While running this change, we also moved the `pod install` step inside the `if (iOS)` branch, so we do not install Cocoapods if we need to test
Android.

## Changelog:
[Internal] - Fix Android E2E test script when downloading artefacts from CI

Pull Request resolved: facebook#41172

Test Plan: Tested locally on both main and 0.73-stable, on both Android and iOS

Reviewed By: cortinico

Differential Revision: D50651448

Pulled By: cipolleschi

fbshipit-source-id: 70a9ed19072119d19c5388e8a4309d7333a08e13
fortmarek pushed a commit that referenced this pull request Nov 8, 2023
Summary:
While releasing RN 0.73.0-RC3, we relaized that the e2e test script was bugged for Android when used to test RNTestProject with the `-c` option.

There  were 2 problems:
- The downloaded maven-local was not actually used because it doesn't work with a zip. (We were always downloading a version from Maven)
- The versions of React Native between maven-local and the locally packaged React Native were different.

This change fixes the script by:
- Downloading maven-local
- Unzipping maven-local and passing the new folder to the Android app
- Downloading the React Native version that has been packaged in CI

By unzipping maven-local and using the unzipped folder, we make sure that Android is actually using the local repository.
By downloading both the packaged react native and the maven-local from the same CI workflow, we ensure that the versions are aligned.

This also speeds-up further the Android testing.

While running this change, we also moved the `pod install` step inside the `if (iOS)` branch, so we do not install Cocoapods if we need to test
Android.

[Internal] - Fix Android E2E test script when downloading artefacts from CI

Pull Request resolved: #41172

Test Plan: Tested locally on both main and 0.73-stable, on both Android and iOS

Reviewed By: cortinico

Differential Revision: D50651448

Pulled By: cipolleschi

fbshipit-source-id: 70a9ed19072119d19c5388e8a4309d7333a08e13
fortmarek added a commit that referenced this pull request Nov 10, 2023
* Fix RNTestProject testing on Android (#41172)

Summary:
While releasing RN 0.73.0-RC3, we relaized that the e2e test script was bugged for Android when used to test RNTestProject with the `-c` option.

There  were 2 problems:
- The downloaded maven-local was not actually used because it doesn't work with a zip. (We were always downloading a version from Maven)
- The versions of React Native between maven-local and the locally packaged React Native were different.

This change fixes the script by:
- Downloading maven-local
- Unzipping maven-local and passing the new folder to the Android app
- Downloading the React Native version that has been packaged in CI

By unzipping maven-local and using the unzipped folder, we make sure that Android is actually using the local repository.
By downloading both the packaged react native and the maven-local from the same CI workflow, we ensure that the versions are aligned.

This also speeds-up further the Android testing.

While running this change, we also moved the `pod install` step inside the `if (iOS)` branch, so we do not install Cocoapods if we need to test
Android.

[Internal] - Fix Android E2E test script when downloading artefacts from CI

Pull Request resolved: #41172

Test Plan: Tested locally on both main and 0.73-stable, on both Android and iOS

Reviewed By: cortinico

Differential Revision: D50651448

Pulled By: cipolleschi

fbshipit-source-id: 70a9ed19072119d19c5388e8a4309d7333a08e13

* Backport e2e script changes to main (#41332)

Summary:
Last week, I modified the e2e script to make sure it was working properly with 0.73.
This change backport those changes in main

## Changelog:
[Internal] - Backport e2e script changes

Pull Request resolved: #41332

Test Plan: Tested locally

Reviewed By: dmytrorykun

Differential Revision: D51025796

Pulled By: cipolleschi

fbshipit-source-id: 89ecd3701eaac4ba4bdde2c640df45a158329158

* Use old REACT_NATIVE_MAVEN_LOCAL_REPO env var

* prettier

---------

Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
Co-authored-by: Riccardo Cipolleschi <cipolleschi@meta.com>
huntie added a commit to huntie/react-native that referenced this pull request Feb 15, 2024
Summary:
Restores behaviour of `yarn test-e2e-local` when we are not using `--circleciToken`. The `npm pack` logic (necessary for the subsequent `updateTemplatePackage` call before initing `RNTestProject`) was deleted in facebook#41172 / D50651448.

facebook@4eed12b#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffL224-L240

Changelog: [Internal]

Differential Revision: D53806191
huntie added a commit to huntie/react-native that referenced this pull request Feb 15, 2024
Summary:

Restores behaviour of `yarn test-e2e-local` when we are not using `--circleciToken`. The `npm pack` logic (necessary for the subsequent `updateTemplatePackage` call before initing `RNTestProject`) was deleted in facebook#41172 / D50651448.

facebook@4eed12b#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffL224-L240

Changelog: [Internal]

Differential Revision: D53806191
huntie added a commit to huntie/react-native that referenced this pull request Feb 15, 2024
…k#43043)

Summary:

Restores behaviour of `yarn test-e2e-local` when we are not using `--circleciToken`. The `npm pack` logic (necessary for the subsequent `updateTemplatePackage` call before initing `RNTestProject`) was deleted in facebook#41172 / D50651448.

facebook@4eed12b#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffL224-L240

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53806191
huntie added a commit to huntie/react-native that referenced this pull request Feb 15, 2024
…k#43043)

Summary:

Restores behaviour of `yarn test-e2e-local` when we are not using `--circleciToken`. The `npm pack` logic (necessary for the subsequent `updateTemplatePackage` call before initing `RNTestProject`) was deleted in facebook#41172 / D50651448.

facebook@4eed12b#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffL224-L240

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53806191
huntie added a commit to huntie/react-native that referenced this pull request Feb 15, 2024
…k#43043)

Summary:

Restores behaviour of `yarn test-e2e-local` when we are not using `--circleciToken`. The `npm pack` logic (necessary for the subsequent `updateTemplatePackage` call before initing `RNTestProject`) was deleted in facebook#41172 / D50651448.

facebook@4eed12b#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffL224-L240

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53806191
huntie added a commit to huntie/react-native that referenced this pull request Feb 15, 2024
…k#43043)

Summary:

Restores behaviour of `yarn test-e2e-local` when we are not using `--circleciToken`. The `npm pack` logic (necessary for the subsequent `updateTemplatePackage` call before initing `RNTestProject`) was deleted in facebook#41172 / D50651448.

facebook@4eed12b#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffL224-L240

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53806191
huntie added a commit to huntie/react-native that referenced this pull request Feb 15, 2024
…k#43043)

Summary:

Restores behaviour of `yarn test-e2e-local` when we are not using `--circleciToken`. The `npm pack` logic (necessary for the subsequent `updateTemplatePackage` call before initing `RNTestProject`) was deleted in facebook#41172 / D50651448.

facebook@4eed12b#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffL224-L240

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53806191
facebook-github-bot pushed a commit that referenced this pull request Feb 15, 2024
Summary:
Pull Request resolved: #43043

Restores behaviour of `yarn test-e2e-local` when we are not using `--circleciToken`. The `npm pack` logic (necessary for the subsequent `updateTemplatePackage` call before initing `RNTestProject`) was deleted in #41172 / D50651448.

4eed12b#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffL224-L240

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53806191

fbshipit-source-id: 918306d5dea90266292728cda9c0e243e5c37eba
@cortinico cortinico deleted the cipolleschi/fix_e2e_test_android_rntestproject branch June 10, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants