Summary:
Danger seems to have a bug where it's not transpiling the import of
rnx-kit/rn-changelog-generator. This mitigates the issue to get our
project back on track.
This can be replicated locally by:
```bash
DEBUG="*" DANGER_GITHUB_API_TOKEN=$GITHUB_TOKEN yarn danger pr https://github.com/facebook/react-native/pull/47182
```
You can see it running correctly here when switching to the branch with the fix. **I'm a little concerned that this is still failing on the PR**. Thoughts?
{F1946190275}
Changelog: [internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/47192
Reviewed By: cortinico
Differential Revision: D64924466
Pulled By: blakef
fbshipit-source-id: 68df0521620809effe3a78ce842e043382ad64a6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47109
Fixes the `lint/sort-imports` errors that are now surfaced after fixing the lint configuration.
For a couple files, I added lint suppressions instead because the unsorted import ordering is important due to interleaved calls with side effects.
Changelog:
[Internal]
Reviewed By: GijsWeterings
Differential Revision: D64569485
fbshipit-source-id: 26415d792e2b9efe08c05d1436f723faae549882
Summary:
this PR fixes a few small ESLint issues that were showing up under PR diffs.
## Changelog:
[INTERNAL] [FIXED] - Fix various ESLint issues
Pull Request resolved: https://github.com/facebook/react-native/pull/46379
Test Plan: ran JS tests + linter; all passing
Reviewed By: cipolleschi
Differential Revision: D62385788
Pulled By: NickGerleman
fbshipit-source-id: b33d7ade4696bbaed2ac1a3fc2e0b3dff9bb04b7
Summary:
E2E tests in OSS are expensive and flaky.
They already prevented some broken changes to land on main, but as of today:
- they are always green, so they are not bloking
- nobody is looking at the reporting job
- the reporting job takes a lot of time to run and prevent other useful signals to be available soon
- it is expensive
So we decide to disable them for the time being, while we iterate on those with Callstack and MSFT.
## Changelog:
[Internal] - Disable E2E tests
Pull Request resolved: https://github.com/facebook/react-native/pull/41153
Test Plan: CircleCI stays green
Reviewed By: cortinico
Differential Revision: D50552818
Pulled By: cipolleschi
fbshipit-source-id: 7160a8074492c3c9a55485d8a17a6883eb4b35b5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39399
Even after making these never report command failures, and allowing no output for thirty minutes, there are still failures here (though less) which cause lands to be aborted, especially for stacks with multiple diffs (it has prevented a recent stack of mine from landing after multiple attempts).
```
yarn run v1.22.19
$ node ./../../scripts/e2e/run-e2e-tests.js android
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
at isModuleDeclaration (/home/circleci/project/node_modules/babel/types/lib/validators/generated/index.js:3940:35)
at NodePath.<computed> [as isModuleDeclaration] (/home/circleci/project/node_modules/babel/traverse/lib/path/index.js:181:12)
/bin/bash: line 2: 14063 Hangup yarn test-e2e android 2>&1
14064 Done | tee /tmp/test_log
Too long with no output (exceeded 30m0s): context deadline exceeded
```
We are not able to detect regressions from tests while they are configured to suppress all failures, and they are still causing issues (though less), so this disables them at the job level until improvements can be made.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D49175533
fbshipit-source-id: f8b99725a57500b027874f3ef51d74c869502a22
Summary:
Given that the e2e tests are quite flaky, we want to reduce the flakyness making them non land blocking.
The idea is to:
1. always have them green in CircleCI
2. store the test logs in CircleCI artifacts, so we can explore them if needed.
3. use danger to read the artifacts from CircleCI and post a message to inform the user whether the Test ends up successfully or not.
## Changelog:
[Internal] - Make e2e tests non land-blocking. Use Danger to report the status of the E2E jobs
Pull Request resolved: https://github.com/facebook/react-native/pull/39129
Test Plan: CircleCI stays green, logs are uploaded as artifacts.
Reviewed By: rshest
Differential Revision: D48642955
Pulled By: cipolleschi
fbshipit-source-id: 185862f46c47d59f949743a9b893162b2bb3a651
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36994
We already run changelog validation internally which has specific exemptions for codemods and dirsynced directories. Do not run twice, now that we need to export diffs.
An alternative solution would be to port the logic to the OSS changelog generator and stop running the internal one, but that would increase latency, and we have made fixes to the internal once as recent as two weeks ago in D44746795.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D45135111
fbshipit-source-id: e23c2613b183f75a148d1b38b31c259acc9c9fc5
Summary:
Currently we have a tool (rnx-kit/rn-changelog-generator) that extracts changelog messages from our commit history to generate the changelog for a React Native release.
In hopes of standardizing to one place where changelog validation occurs -- I've moved this logic to the package rnx-kit/rn-changelog-generator such that if the formatting ever changes, the changelog parsing is also updated.
Changelog: [Internal] - Updating danger to use logic in rnx-kit/rn-changelog-generator for changelog validation.
Pull Request resolved: https://github.com/facebook/react-native/pull/36507
Test Plan: Tried `require`-ing the package and on a changelog message. I'm not sure exactly how to test a dangerfile -- IIRC it has to run off `main`
Reviewed By: cortinico, cipolleschi
Differential Revision: D44183479
Pulled By: lunaleaps
fbshipit-source-id: f65440f7b66a048f961d4698d78210c74e276452
Summary:
allow-large-files
When working on https://github.com/facebook/react-native/pull/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 https://github.com/facebook/react-native/pull/34614 as the `danger_pr` Github action runs from what's defined on `main`.
Once these changes land, I can rebase https://github.com/facebook/react-native/pull/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: https://github.com/facebook/react-native/pull/34652
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
🔒 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
```
Reviewed By: NickGerleman
Differential Revision: D39435286
Pulled By: lunaleaps
fbshipit-source-id: 8c82f49facf162f4fc0918e3abd95eb7e4ad1e37