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

Add bots as a yarn workspace and update danger action #34652

Closed
wants to merge 1 commit into from

Conversation

lunaleaps
Copy link
Contributor

@lunaleaps lunaleaps commented Sep 10, 2022

Summary

When working on #34614, danger is failing because it doesn't share node_modules with the root directory where typescript is installed as we added it as a parser in our eslint config.

By setting bots as a yarn workspace, dependencies are all installed under the root node_modules folder and in local testing (detailed in test section) we no longer have the typescript module not found error. However, danger will continue to fail on #34614 as the danger_pr Github action runs from what's defined on main.

Once these changes land, I can rebase #34614 on it and danger's eslint should pass.

Changelog

[Internal][Fixed] - Add bots directory as a yarn workspace and update danger_pr Github action

Test Plan

To verify this fix I had to run:

react-native $ yarn && cd bots
react-native/bots$ yarn run danger pr https://github.com/facebook/react-native/pull/34614

which resulted in

❯ yarn run danger pr https://github.com/facebook/react-native/pull/34614
yarn run v1.22.19
$ lunaleaps/react-native/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/34614
Starting Danger PR on facebook/react-native#34614

Danger: ✓ found only warnings, not failing the build
## Warnings
:lock: package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>

✨  Done in 12.78s.

Verified this also on another PR:

yarn run danger pr https://github.com/facebook/react-native/pull/34650

@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 Sep 10, 2022
@lunaleaps lunaleaps marked this pull request as ready for review September 10, 2022 06:24
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 4e70376
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,636,422 -6,611
android hermes armeabi-v7a 7,048,246 -6,924
android hermes x86 7,938,220 -6,365
android hermes x86_64 7,910,347 -6,357
android jsc arm64-v8a 9,512,406 -3,615
android jsc armeabi-v7a 8,287,704 -3,930
android jsc x86 9,451,945 -3,404
android jsc x86_64 10,043,196 -3,233

Base commit: 4e70376
Branch: main

Copy link
Contributor

@NickGerleman NickGerleman left a comment

Choose a reason for hiding this comment

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

You should also now be able to remove the "yarn.lock" in the bots folder.

@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

Summary:
When working on facebook#34614, danger is failing because it doesn't share `node_modules` with the root directory where `typescript` is installed as we added it as a parser in our eslint config.

By setting `bots` as a yarn workspace, dependencies are all installed under the root `node_modules` folder and in local testing (detailed in test section) we no longer have the `typescript module not found` error. However, danger will continue to fail on facebook#34614 as the `danger_pr` Github action runs from what's defined on `main`.

Once these changes land, I can rebase facebook#34614 on it and danger's eslint should pass.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal][Fixed] - Add `bots` directory as a yarn workspace and update `danger_pr` Github action

Pull Request resolved: facebook#34652

Test Plan:
To verify this fix I had to run:
```
react-native $ yarn && cd bots
react-native/bots$ yarn run danger pr facebook#34614
```

which resulted in
```
❯ yarn run danger pr facebook#34614
yarn run v1.22.19
$ lunaleaps/react-native/node_modules/.bin/danger pr facebook#34614
Starting Danger PR on facebook#34614

Danger: ✓ found only warnings, not failing the build
## Warnings
:lock: package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>

✨  Done in 12.78s.
```
Verified this also on another PR:
```
yarn run danger pr facebook#34650
```

Reviewed By: NickGerleman

Differential Revision: D39435286

Pulled By: lunaleaps

fbshipit-source-id: b560d92635be8d95baf27274f745315aaf56d748
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D39435286

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @lunaleaps in 767f8e0.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 13, 2022
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
allow-large-files

When working on facebook#34614, danger is failing because it doesn't share `node_modules` with the root directory where `typescript` is installed as we added it as a parser in our eslint config.

By setting `bots` as a yarn workspace, dependencies are all installed under the root `node_modules` folder and in local testing (detailed in test section) we no longer have the `typescript module not found` error. However, danger will continue to fail on facebook#34614 as the `danger_pr` Github action runs from what's defined on `main`.

Once these changes land, I can rebase facebook#34614 on it and danger's eslint should pass.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal][Fixed] - Add `bots` directory as a yarn workspace and update `danger_pr` Github action

Pull Request resolved: facebook#34652

Test Plan:
To verify this fix I had to run:
```
react-native $ yarn && cd bots
react-native/bots$ yarn run danger pr facebook#34614
```

which resulted in
```
❯ yarn run danger pr facebook#34614
yarn run v1.22.19
$ lunaleaps/react-native/node_modules/.bin/danger pr facebook#34614
Starting Danger PR on facebook#34614

Danger: ✓ found only warnings, not failing the build
## Warnings
:lock: package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>

✨  Done in 12.78s.
```
Verified this also on another PR:
```
yarn run danger pr facebook#34650
```

Reviewed By: NickGerleman

Differential Revision: D39435286

Pulled By: lunaleaps

fbshipit-source-id: 8c82f49facf162f4fc0918e3abd95eb7e4ad1e37
@lunaleaps lunaleaps deleted the add-bots-to-workspace branch January 19, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 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