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

fix(CI): cherry-picking changes to logic for fixing JS CI tests [TEST] #35680

Closed
wants to merge 7 commits into from

Conversation

kelset
Copy link
Contributor

@kelset kelset commented Dec 19, 2022

Summary

Following up from this conversation #35667, I'm just testing if we can cherry-pick these changes to fix the CI for 0.71-stable branch. Ideally wanted to pick only 7f29357 but it needed more commits, so I'm attempting this PR to see what happens.

Changelog

Test Plan

…before testing template app (#35444)

Summary:
Pull Request resolved: #35444

Changelog:
[Internal][Changed] - now using Verdaccio to publish necessary packages for template app

- Adds script `/scripts/template/install-dependencies.js`, which incapsulates the logic of installing dependencies of template app
- The idea of the script is to run verdaccio and publish all necessary packages to node_modules, since these packages might not yet be present on npm
- This should also potentially resolve some template app test failures on CircleCI related to package-ifying Animated, VirtualizedList, FlatList modules

Reviewed By: cortinico

Differential Revision: D41498086

fbshipit-source-id: 48fbbb1c9334e7a9e7657e6275b7b04f9ce290b5
… template initialization (#35459)

Summary:
Pull Request resolved: #35459

Changelog:
[Internal] [Changed] - now bootstrapping Verdaccio before template app initialization, this is required because react-native migh depend on some package which version is not yet published to npm

Reviewed By: cipolleschi

Differential Revision: D41521496

fbshipit-source-id: 6183ab02c697d9d08e9dca5b323bd7a11a749c3a
Summary:
Changelog:
[Internal] [Changed] - fixed unresolved variable in template initialization script

Reviewed By: cipolleschi

Differential Revision: D41527165

fbshipit-source-id: acdd8d4cf9fb6153022b0395d3715ca9ca6363c9
…o` (#35633)

Summary:
Pull Request resolved: #35633

Changelog: [Internal]

These changes add usage of `forEachPackage` as a replacement for `yarn --json workspaces info`.

This is because at some point in release cycle there is a script which removed `workspaces` block from react-native's `package.json`, so `yarn --info workspaces info` produces an error

Reviewed By: cortinico

Differential Revision: D41996732

fbshipit-source-id: 2c62c1a5eb41d711c563f9f7b0de3d67fc11823d

# Conflicts:
#	.circleci/config.yml
@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. Contributor A React Native contributor. p: Microsoft Partner: Microsoft Partner labels Dec 19, 2022
kelset and others added 3 commits December 19, 2022 11:45
…rcleci (#35621)

Summary:
Pull Request resolved: #35621

Changelog: [Internal]

1. Added `for-each-package.js` script. This can be used to iterate through all of the packages inside `/packages` with the access to package manifest. This soon can be used as a replacement for `yarn workspaces --info`
2. Added `find-and-publish-all-bumped-packages.js` script. This script iterates through all the packages and detects if the version was changed via `git log -p` (same as `git diff`). If so, it tries to publish it to npm.
3. Added corresponding job and workflow to CircleCI config, which will use this script

Reviewed By: cortinico

Differential Revision: D41972733

fbshipit-source-id: c5d0ed5b852b744a699ecb88861ea3e82200e1f3
…o` (#35633)

Summary:
Pull Request resolved: #35633

Changelog: [Internal]

These changes add usage of `forEachPackage` as a replacement for `yarn --json workspaces info`.

This is because at some point in release cycle there is a script which removed `workspaces` block from react-native's `package.json`, so `yarn --info workspaces info` produces an error

Reviewed By: cortinico

Differential Revision: D41996732

fbshipit-source-id: 2c62c1a5eb41d711c563f9f7b0de3d67fc11823d
@kelset kelset changed the title fix(CI): cherry-picking changes to logic for fixing JS CI tests fix(CI): cherry-picking changes to logic for fixing JS CI tests [TEST] Dec 19, 2022
@hoxyq
Copy link
Contributor

hoxyq commented Dec 19, 2022

@kelset To fix the problem from template tests, looks like we need to also update the verdaccio config (verdaccio.yml) to the previous version, like here: https://github.com/facebook/react-native/blob/22940e4177c7244ac35a1903bb869a619336eaa5/.circleci/verdaccio.yml

I think this should be enough and everything should be green. I am currently on PTO, but would like to help you with this next week if needed

@kelset
Copy link
Contributor Author

kelset commented Jan 3, 2023

@hoxyq I would suggest you go back and read this comment -> #35667 (comment) for further insights into why this PR is the way it is (it is a test) - my understanding is that we'll just proceed with #35681 and close this one off.

@kelset
Copy link
Contributor Author

kelset commented Jan 10, 2023

not needed anymore

@kelset kelset closed this Jan 10, 2023
@kelset kelset deleted the kelset/test-fix-for-jstest branch January 10, 2023 17:55
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. Contributor A React Native contributor. p: Microsoft Partner: Microsoft Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants