Граф коммитов

57 Коммитов

Автор SHA1 Сообщение Дата
Riccardo Cipolleschi 6aae713a18 Disable unstable E2E tests (#41153)
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
2023-10-23 07:15:00 -07:00
Sam Zhou 246b5cf414 Remove CI check jobs on .flowconfig.android in react-native (#39158)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39158

.flowconfig.android is the same as .flowconfig now. The check is meaningless. This diff removes it and the flowconfig.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D48629137

fbshipit-source-id: bc1bee9426eed7bc41dc7a1efe75333e1191e066
2023-08-26 10:00:22 -07:00
Riccardo Cipolleschi 641be98b1e Split Config.yml to run jobs selectively (#39042)
Summary:
Right now, every PR runs the whole test suite. For example, a changelog PR, will run all the tests. As of last month, that meant quite a few $s per single run.

With this PR, we are going to leverage dynamic configuration and file filtering to create a config.yml on the flight, depending on the files changed by the commit/pr.

They way it works is the following:
- It starts a setup workflow in CircleCI.
- This workflow fetch the list of files that have been changed in the current commit.
- It executes a bunch of filtering and computation to understand which tests makes sense to run.
- It creates a config on the flight to run those.
- It continue the pipeline on that config.

Currently, the way it works is the following:
- If a `.md` file has been modified => run nothing
- If only files in the `ReactAndroid` folder are modified => run tests for android only
- If only files in the `React` folder are modified or `ruby` files are modified => run only iOS tests
- If only js files, not in the scripts folder are modified => run only JS tests
- if only files in the e2e folder are modified => run only e2e tests
- else => run everything.

Of course, we can play and modify those filters t make sure that they reflect the work and the tests to the best we can.

bypass-github-exports-checks

## Changelog:
[Internal] - Split circleci config and run test selectively.

Pull Request resolved: https://github.com/facebook/react-native/pull/39042

Test Plan:
- [X] Tested on the local branch for general sanity check.
- [X] Import it in fbsource
- [x] Create a stacked diff which changes only a md file => verify that no tests are run.
- [x] Create a stacked diff which changes only files in ReactAndroid => verify that only android tests run.
- [x] Create a stacked diff which changes only files in React => verify that only iOS tests run.
- [x] Create a stacked diff which changes only ruby files => verify that only iOS tests run.
- [x] Create a stacked diff which changes ruby files and file in React => verify that only iOS tests run.
- [x] Create a stacked diff which changes only files JS not in the script folder => verify that JS tests run.
- [x] Create a stacked diff which changes only JS files in the script folder => verify that the whole suite starts.
- [x] Create a stacked diff which changes only files in the E2E folder => verify that only E2E files runs.
- [x] Trigger a nightly pipeline => verify that parameters are passed to the generated config.

Reviewed By: NickGerleman

Differential Revision: D48394437

Pulled By: cipolleschi

fbshipit-source-id: 771f3e68daa8318d2b73dd91ce85a41488110c04
2023-08-18 07:22:22 -07:00
Riccardo Cipolleschi c326ec0475 Add retry mechanism to test_e2e_android to reduce flakyness (#39068)
Summary:
We figured that android e2e tests are a bit flakier than needed. This change add a retry mechanism to rerun the tests up to 3 times in order to try and reduce the flakyness there.

## Changelog:

[Internal] - Add retry to Android e2e tests

Pull Request resolved: https://github.com/facebook/react-native/pull/39068

Test Plan: CircleCI stays green

Reviewed By: cortinico

Differential Revision: D48463517

Pulled By: cipolleschi

fbshipit-source-id: cdf3dca047dce89cc5d2dccc9b847283b93bbd36
2023-08-18 04:08:56 -07:00
Riccardo Cipolleschi e7f6f079cb Implement retry mechanism during yarn installation (#39020)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39020

Sometimes yarn fails to intall, we are implementing a retry mechanism

## Changelog:
[Internal] - Add retry mechanism in template jobs.

Reviewed By: cortinico

Differential Revision: D48234860

fbshipit-source-id: ece3c40051ff143837ed79db2390fbb599fa8ae2
2023-08-16 08:31:44 -07:00
Riccardo Cipolleschi 623f44c7ce Revert D48118162: Split CircleCI config
Differential Revision:
D48118162

Original commit changeset: 73c8071a7e80

Original Phabricator Diff: D48118162

fbshipit-source-id: f070601c8631a9b91bb298ce94a9eb7cee13e059
2023-08-16 05:46:52 -07:00
Riccardo Cipolleschi 67f8d4014e Split CircleCI config (#38793)
Summary:
Right now, every PR runs the whole test suite. For example, a changelog PR, will run all the tests. As of last month, that meant quite a few $s per single run.

With this PR, we are going to leverage dynamic configuration and file filtering to create a config.yml on the flight, depending on the files changed by the commit/pr.

They way it works is the following:
- It starts a setup workflow in CircleCI.
- This workflow fetch the list of files that have been changed in the current commit.
- It executes a bunch of filtering and computation to understand which tests makes sense to run.
- It creates a config on the flight to run those.
- It continue the pipeline on that config.

Currently, the way it works is the following:
- If a `.md` file has been modified => run nothing
- If only files in the `ReactAndroid` folder are modified => run tests for android only
- If only files in the `React` folder are modified or `ruby` files are modified => run only iOS tests
- If only js files, not in the scripts folder are modified => run only JS tests
- if only files in the e2e folder are modified => run only e2e tests
- else => run everything.

Of course, we can play and modify those filters t make sure that they reflect the work and the tests to the best we can.

bypass-github-export-checks

## Changelog:

[Internal] - Split circleci config and run test selectively.

Pull Request resolved: https://github.com/facebook/react-native/pull/38793

Test Plan:
- [X] Tested on the local branch for general sanity check.
- [X] Import it in fbsource
- [x] Create a stacked diff which changes only a md file => verify that no tests are run.
- [x] Create a stacked diff which changes only files in ReactAndroid => verify that only android tests run.
- [x] Create a stacked diff which changes only files in React => verify that only iOS tests run.
- [x] Create a stacked diff which changes only ruby files => verify that only iOS tests run.
- [x] Create a stacked diff which changes ruby files and file in React => verify that only iOS tests run.
- [x] Create a stacked diff which changes only files JS not in the script folder => verify that JS tests run.
- [x] Create a stacked diff which changes only JS files in the script folder => verify that the whole suite starts.
- [x] Create a stacked diff which changes only files in the E2E folder => verify that only E2E files runs.
- [x] Trigger a nightly pipeline => verify that parameters are passed to the generated config.

Reviewed By: rshest

Differential Revision: D48118162

Pulled By: cipolleschi

fbshipit-source-id: 73c8071a7e80cd930fe538f77d7bb5de75f22ab7
2023-08-16 04:30:54 -07:00
Riccardo Cipolleschi e9b565381c Add script poll Maven for Artifacts (#38985)
Summary:
This local change adds a script to poll Maven automatically after the release has happened.
This should allow the Release Crew not to repeatedly and manually refresh Maven urls in order to see whether the artifacts are there or not.
As soon as this job is green, artifacts are out!

Cost wise, we are using a small machine, which costs 5 credits per minute.

## Changelog:
[Internal] -Add script and CI job to poll for maven after a release.

Pull Request resolved: https://github.com/facebook/react-native/pull/38985

Test Plan:
Tested locally, running the JS script.
[Verified that the CI job can execute it.](https://app.circleci.com/pipelines/github/facebook/react-native/29634/workflows/5966d5f9-12ca-40b1-9185-758fe98d3aee/jobs/944107)

We can only test this for real while doing a proper release.

Reviewed By: cortinico

Differential Revision: D48309874

Pulled By: cipolleschi

fbshipit-source-id: 5c38b588c29c1311b1fa4e4ca44785583db0b701
2023-08-15 03:26:58 -07:00
Riccardo Cipolleschi ad18f811fe Mitigate flakiness in iOS (#38894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38894

This diff introduces a script `run_with_retry` that we can apply to single commands in order to mitigate the flakiness.

This can be useful when networking is involved, to retry installing some dependencies, or for example with some e2e/integration tests.

The diff applies this rerun to the iOS tests so we mitigate failures in CI.

## Changelog:
[Internal] - Add script to retry CI steps and mitigate iOS flakyness.

Reviewed By: cortinico

Differential Revision: D48189365

fbshipit-source-id: a0e115754bcdb8f8353bb5f070163f8cf8f7c9cf
2023-08-10 09:25:44 -07:00
Nicola Corti 0a84952ce5 Cleanup the commitlies code (#38889)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38889

As we don't really use the commitlies code in CircleCI, I'm cleaning up some of the code used to publish artifacts to the user.

Changelog:
[Internal] [Changed] - Cleanup the commitlies code

Reviewed By: cipolleschi

Differential Revision: D48189398

fbshipit-source-id: c4591ee290eba49224322d44a32052ff292ccbed
2023-08-09 09:23:14 -07:00
szymonrybczak 529c952499 Move script checking Appium server status to separate file (#38692)
Summary:
This PR is small cleanup in `.circleci/config.yml` file. Request here: https://github.com/facebook/react-native/pull/36267#discussion_r1272050735

## Changelog:
[INTERNAL] [CHANGED] - move script checking Appium server status to separate file

Pull Request resolved: https://github.com/facebook/react-native/pull/38692

Test Plan: CI Green 

Reviewed By: NickGerleman

Differential Revision: D47926222

Pulled By: ryancat

fbshipit-source-id: eeff338ca018549762dce46a744b80f659b4bd5d
2023-07-31 21:36:49 -07:00
Nicola Corti 7d7f48da41 Remove Buck OSS 1 setup. (#36900)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36900

This commit effectively removes all the Buck 1 OSS infra code we do have inside
React Native as we'll need to rework most of it once we move to Buck 2

Changelog:
[Internal] [Changed] - Remove Buck OSS 1 setup

Reviewed By: mdvacca, cipolleschi

Differential Revision: D44956134

fbshipit-source-id: c0ad1914286c428480248658c4282df5477bba2b
2023-04-13 13:19:24 -07:00
Nicola Corti 9eaf6f5bdb Move test-docker-android from GH Actions to CircleCI (#36093)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36093

The Test Docker Android job is flaky as sometimes fetching artifacts from remote
returns different hashes.
I'm moving the job to CircleCI (so it's faster) + I'm using the `buck_fetch.sh`
script we already have which has a retry logic.

Changelog:
[Internal] [Changed] - Move test-docker-android from GH Actions to CircleCI

Reviewed By: javache

Differential Revision: D43121477

fbshipit-source-id: 1df114fd3ad9445a4a5dc7834bf811c3476322cd
2023-02-08 12:51:09 -08:00
Lorenzo Sciandra cfa25e0a4a fix(release scripts): backport fixes from 0.71 into main (#35258)
Summary:
This PR backport two fixes we did in 0.71 to unblock the release process:
* the change in `publish-npm` is needed because of the introduction of .strict() from 4f3ca8facf
* the removal of the other script (added originally here e4b5d3eec9) is because:
  1) that step is not needed anymore (we don't publish/upload hermes artifacts to the GH release)
  2) by the time this job gets run the release crew has already setup the GH release
  3) the logic for the versioning was broken and even on the 0.71-rc pipeline it was tagging stuff as 1000.0.0

## 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] - Fix release scripts for "release" pipeline scenario

Pull Request resolved: https://github.com/facebook/react-native/pull/35258

Test Plan: The fact that 0.71-rc0 was released is the  for this.

Reviewed By: jacdebug

Differential Revision: D41120888

Pulled By: cipolleschi

fbshipit-source-id: 06d108f0659ad1db53c6324fe1d735f52c34a3c5
2022-11-08 10:03:29 -08:00
Héctor Ramos e4b5d3eec9 Circle CI: Upload both tarballs to releases, dry-run the release workflow on every commit (#35015)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35015

React Native releases are cut every few months. Without testing, the workflow is prone to breakage.

Dry-run the release workflow on every commit in order to surface any issues as they are introduced instead of at release time.

Fixed issues that surfaced during testing of this workflow:
- Upload both Hermes tarballs

Changelog: [internal]

Reviewed By: mdvacca

Differential Revision: D40483764

fbshipit-source-id: 5ca6bd4dcdfd64c24882ffb202edbfd701efd462
2022-10-19 17:54:22 -07:00
Luna Wei dc56eb99f1 Fix missing renames from bots to react-native-bots (#34713)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34713

Changelog: [Internal] - Fix up missing bots usage after we moved everything to packages/react-native-bots in 767f8e0249

Reviewed By: NickGerleman

Differential Revision: D39583230

fbshipit-source-id: 6cc6b7923e67139dc3c81dfe0c39005dde905248
2022-09-16 12:41:06 -07:00
Nicola Corti 4699a39489 Isolate the buck OSS commands inside test_buck (#34378)
Summary:
This isolates and parallelize all the BUCK related work inside a `test_buck` job, so it's immediately clear where a failure happend.

I've also added a couple of minor improvements:
- Don't clone okbuck just to consume a script. I've copied the script over instead.
- Removed unnecessary `buck_cache_key`

This should reduce ~5 minute of build time from Test Android which was already beyond 10 minutes.

## Changelog

[Internal] - Isolate the buck OSS commands inside test_buck

Pull Request resolved: https://github.com/facebook/react-native/pull/34378

Test Plan: Let's wait for a `test_buck` and `test_android` output.

Reviewed By: cipolleschi

Differential Revision: D38580359

Pulled By: cortinico

fbshipit-source-id: 8b3915bbc28b4a7a169011fe9047f402c2d1f6ee
2022-08-11 02:46:00 -07:00
Héctor Ramos cd8dbd15ff Circle CI: Create GiHub Release draft when bumping version
Summary:
Automatically create a GitHub Release draft when a new React Native release is created.

The GitHub Release will be created by the same Circle CI job that publishes the package to npm.

This job will also upload the built Hermes binaries to the GitHub release.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D36646696

fbshipit-source-id: 0a863dc4e3215fc95f7852f8dc43858cdd852aaa
2022-07-14 13:42:08 -07:00
Nicola Corti afb0307036 Setup a toplevel downloadAll task (#33852)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33852

Similarly to buildAll and cleanAll, I'm creating a downloadlAll task
which is aligning the behavior of the download task we're doing on CIs.

I've also updated the Offline Cache as we're now storing a bigger set of dependencies.

Changelog:
[Internal] [Changed] - Setup a toplevel downloadAll task

allow-large-files

Reviewed By: cipolleschi

Differential Revision: D36441728

fbshipit-source-id: f847b5e665c64e0b4b93d984bbc1b64c00a3b4f7
2022-05-17 15:31:48 -07:00
Andrei Shikov fc9dec9a35 Download kotlin compiler JARs for Buck instead of checking them in (#33209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33209

Downloads Kotlin compiler JARs with Buck before starting docker build. This solution is slower than checking in JARs directly, but it allows to keep lighter size of the repo for people who want a complete checkout.

Changelog: [Internal] - Update CI build to download Kotlin jars for buck

Reviewed By: cortinico

Differential Revision: D34582932

fbshipit-source-id: 290398579ce2a4d57c7af318c66526689db6073c
2022-03-02 13:04:49 -08:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Luna Wei 2a605c30e4 Comment on PR with link to PR artifact
Summary: Changelog: [Internal] Configure circleCI to comment on PR after building tarball

Reviewed By: hramos

Differential Revision: D31387660

fbshipit-source-id: 28902148cf5e2ea15320333b90a6a7fa9d553c3b
2021-10-08 17:55:00 -07:00
Tim Yung 3024ec7ce6 Upgrade to `firebase^9.0.2` in ./bots (#32218)
Summary:
Addresses the following couple security vulnerabilities.

- https://github.com/advisories/GHSA-9r2w-394v-53qc
- https://github.com/advisories/GHSA-qq89-hq3f-393p

Newer versions of the `firebase` dependency no longer depends on `tar`.

## Changelog

[Internal]

Pull Request resolved: https://github.com/facebook/react-native/pull/32218

Test Plan: See bots run on this pull request.

Reviewed By: sammy-SC

Differential Revision: D30969643

Pulled By: yungsters

fbshipit-source-id: 85c886ead7d8563dcaaef537f34bda57c7dc23a5
2021-09-16 13:20:47 -07:00
Andrei Shikov 66173e1d04 Update folly to 2021.04.26.00 in OSS build
Summary:
Updates Gradle script to include new version of folly (synced to iOS update)
Adds fmt and libevent as well as some boost ASM sources to enable compilation of folly futures.

Changelog:
[Android] Updated folly to 2021.04.26

Reviewed By: fkgozali

Differential Revision: D28124377

fbshipit-source-id: d44c5a1ded5ee7ad514a9df14ea2ba326d4aa0e3
2021-05-11 06:03:43 -07:00
Tim Yung 13c650b8db RN: Retry `buck Fetch` in CircleCI
Summary:
Currently, various CircleCI jobs intermittently fail when trying to fetch dependencies via Maven.

This adds a few retries before failing the CircleCI job to reduce noise from intermittent network fetch failures.

Changelog:
[Internal]

Reviewed By: fkgozali

Differential Revision: D28153008

fbshipit-source-id: ac944882ff0495f568973a709d6d61ef7b51b318
2021-05-03 10:12:40 -07:00
Scott Ngan defdb6d0be Add Java linting using google-java-format (#30444)
Summary:
Adds `google-java-format` linting for all `.java` files in the `ReactAndroid/` folder

- Linting requires java and is now performed on the android container
- https://github.com/google/google-java-format

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Added] - Linting for *.java files (google-java-format)

Pull Request resolved: https://github.com/facebook/react-native/pull/30444

Test Plan: See this example PR for lint comments: https://github.com/facebook/react-native/pull/30512

Reviewed By: hramos

Differential Revision: D25253627

Pulled By: nganbread

fbshipit-source-id: e39e4411bf09a96c054afaf6c12b3d05a80f40fa
2020-12-07 03:12:35 -08:00
Tommy Nguyen 1908d50ba4 Fix CIRCLE_PR_NUMBER may not always be set (#28640)
Summary:
This fixes build failures where `CIRCLE_PR_NUMBER` is not set. This can happen if the PR did not come from a fork.

## Changelog

[Internal] [Fixed] - Fix CIRCLE_PR_NUMBER may not always be set
Pull Request resolved: https://github.com/facebook/react-native/pull/28640

Test Plan: Report bundle size step should pass on both this PR and https://github.com/facebook/react-native/issues/28641.

Reviewed By: cpojer

Differential Revision: D21045553

Pulled By: TheSavior

fbshipit-source-id: fdfcb1bb88a96345b78ca69c49623df71d4cd608
2020-04-15 11:46:33 -07:00
Tommy Nguyen 175589bff0 Add diffing to app bundle size reports (#28284)
Summary:
Add diffing to app bundle size reports.

## Changelog

[Internal] [Changed] - Add diffing to app bundle size reports

Pull Request resolved: https://github.com/facebook/react-native/pull/28284

Test Plan:
- App bundle size reports should now display a diff where available
  - Right now, the database contains only one entry for the last known good iOS build
- Triggering a new build should not create additional comments

Reviewed By: cpojer

Differential Revision: D20450158

Pulled By: hramos

fbshipit-source-id: 720772275f24d3ff0a49705f4dada2efe2e99bd3
2020-03-20 07:15:11 -07:00
Tommy Nguyen 32127e8160 Improvements to app bundle size reports (#28169)
Summary:
Make the Android app bundle size report more legible, and update existing reports if possible.

## Changelog

[Internal] [Changed] - Update existing app bundle size report if possible
[Internal] [Changed] - Generate table for APK sizes report
Pull Request resolved: https://github.com/facebook/react-native/pull/28169

Test Plan:
- App bundle size reports should be updated when possible
- Android apk sizes should be reported using a table

Reviewed By: cpojer

Differential Revision: D20141490

Pulled By: hramos

fbshipit-source-id: 3fc1b808b27e893c0a3e4e34eafc39094448799c
2020-02-27 13:52:14 -08:00
Tommy Nguyen 1b562929dc Report size of app bundles on PRs (#28041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/28041

Report size of app bundles on PRs. See [React Native Benchmark Suite](https://github.com/react-native-community/discussions-and-proposals/issues/186) for further discussion.

## Changelog

[Internal] [Added] - Report size of app bundles on PRs
Pull Request resolved: https://github.com/facebook/react-native/pull/28019

Test Plan: PRs should start seeing comments from a bot with app bundle sizes, given that they got built successfully.

Reviewed By: cpojer

Differential Revision: D19859187

Pulled By: hramos

fbshipit-source-id: 3920dc60e6fd073928388e6ae52fc2ba1bc745ac
2020-02-12 22:21:00 -08:00
Héctor Ramos 9c3f4c021e Bots cleanup, avoid leaving inline reviews when N>5 (#24923)
Summary:
This PR cleans up some of our GitHub bots. The overall goal is to make the contribution process just a tad nicer.

### analysis-bot

* The bot will continue leaving GitHub Reviews when it finds lint issues, but will abstain from leaving inline comments if they would exceed 5 in number.
* The review comment left by the bot has instructions on how to reproduce the lint issues locally. This will educate PR authors on how to run lint and fix the issues without unnecessarily spamming the PR with 50+ comments, while still providing useful reviews to authors when only a handful of lint issues slip by.
* Code moved to `bots/` directory for ease of discovery and co-location with pull-bot.
* Added `yarn lint-ci` command. This seems like the right choice: it's running `yarn lint` and other linters, and it is only intended to run on CI.
* It's still possible to run `yarn lint-ci` locally, though the script will stop short of posting a review to GitHub unless the necessary envvars are provided.
* Added `yarn shellcheck` command. This can be run locally, though it requires `shellcheck` to be installed.
* Outside of this PR, I added instructions on using shellcheck to https://github.com/facebook/react-native/wiki/Development-Dependencies
* Updated Circle CI config to use these new commands, and streamlined the `analyze_pr` step.
* Documented analysis-bot in `bots/README.md`.

### pull-bot

* Bumped `danger-js` dependency. No breaking changes found in this minor bump from what I can tell.
* Documented pull-bot in `bots/README.md`.

### misc

* PR template: don't use jargon.

## Changelog

[Internal] [Changed] - GitHub Bots cleanup
Pull Request resolved: https://github.com/facebook/react-native/pull/24923

Differential Revision: D15399744

Pulled By: hramos

fbshipit-source-id: 32632e775f8554424072270e3f98542de84bfb8c
2019-05-21 19:38:54 -07:00
Kudo Chien 8e375850de Use node package dependency to manage JSC version (#24276)
Summary:
In origin approach, we packed libjsc.so inside react-native.aar and it is difficult for user to choose different JSC variants. E.g., [the Intl supported version](https://github.com/react-native-community/jsc-android-buildscripts#international-variant).

This change list allows application to determine JSC versions or variants by npm/yarn package.

There is a |useIntlJsc| flag in build.gradle, it will use the same JSC version but with Intl support.

`yarn add jsc-android@canary`

[Android] [Changed] - Allow application to select different JSC variants

**MIGRATION**
Note that there are some changes in build.gradle.
Existing application needs to change their android/build.gradle and android/app/build.gradle.
Hopefully, the rn-diff-purge should handle the case well.
Pull Request resolved: https://github.com/facebook/react-native/pull/24276

Differential Revision: D14752359

Pulled By: cpojer

fbshipit-source-id: a4bfb135ad8e328f404a2d1a062412f40ebf4622
2019-04-04 14:22:14 -07:00
Peter van der Zee dcd4e90d9a Bump Prettier to 1.16.4
Summary:
@public
This bumps Prettier to v1.16.4
Only format source files were updated.

Reviewed By: mjesun

Differential Revision: D14454893

fbshipit-source-id: 72f9872fe764a79dbf0d9fab9bebb1456b039f2f
2019-03-14 07:00:27 -07:00
Héctor Ramos 9820c88877 No longer run disabled tests on Héctor's PRs (#23562)
Summary:
Do not run disabled tests, even when the commit / PR is pushed by hramos. See the existing functionality at https://circleci.com/gh/facebook/react-native/73844?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link:

![screen shot 2019-02-20 at 8 21 39 am](https://user-images.githubusercontent.com/165856/53106776-90ecb600-34e8-11e9-9b02-a7f3990407b2.png)

There are a handful of tests that are known to be broken in Circle CI. This has been the case since at least Fall 2017, when we migrated to Circle 2.0. These tests haven't been fixed for several reasons, one of them being that once they were removed from the Circle CI config, the pressure to fix them has been lowered.

Last year, I added these disabled tests back to Circle CI, but used a script to prevent them from running unless the job was initiated by myself. This would allow us to get good signal from Circle CI without polluting results with known failing tests, while still showing me which tests needed some work before getting re-enabled again.

In practice, this functionality is introducing more friction as I work on fixing new CI failures: my own fixup PRs are marked as failing due to these "disabled tests" (see test_android on https://github.com/facebook/react-native/pull/23558). To ensure we don't lose track of these failures, I've created an umbrella issue at https://github.com/facebook/react-native/issues/23561.
Pull Request resolved: https://github.com/facebook/react-native/pull/23562

Differential Revision: D14161172

Pulled By: cpojer

fbshipit-source-id: 040500dcb433d3127c64a42b31f94af6bbaa6ed1
2019-02-20 18:46:22 -08:00
Héctor Ramos 937c79e2f2 Suggest running yarn lint --fix (#23413)
Summary:
This PR expands the code analysis script to allow for customizing the GitHub Review left by analysis-bot whenever it finds code-level issues.

Some, but not all, `eslint` errors are fixable by running `yarn lint --fix`. When the `eslint` converter finds warnings or errors, the bot will suggest running the command as part of the review.

The script could be adjusted to only suggest this when `eslint` returns a non-zero `fixableErrorCount` or `fixableWarningCount`, but I think this is a good first step to get people to unblock themselves when they see this type of review from the bot.

I've also excluded `bots/` and `scripts/` from eslint as these have several `eslint` errors that need to be addressed. These directories do not contain core RN code, so they can be excluded for now.

[GENERAL] [Changed] - analysis-bot will suggest fixing eslint warnings on code reviews
Pull Request resolved: https://github.com/facebook/react-native/pull/23413

Differential Revision: D14065757

Pulled By: cpojer

fbshipit-source-id: cc588643f7ddb3c4631d89c26b799f7a7244e616
2019-02-13 08:46:03 -08:00
Kudo Chien 3fae388424 Fix CircleCI build error (#22822)
Summary:
----------

side effect of gradle task name changed from f3e5cce474

Changelog:
----------

[Android] [Fixed] - Fix CircleCI build error
Pull Request resolved: https://github.com/facebook/react-native/pull/22822

Differential Revision: D13562455

Pulled By: RSNara

fbshipit-source-id: a39a19350dcd91b2f06e064c3aec62b94d009fab
2018-12-30 10:47:10 -08:00
Héctor Ramos 44878ea9bc Fix code analysis bot failure to post lint warnings on pull requests
Summary:
The code analysis script takes the results of `eslint .` and filters out any messages for filepaths outside of what is modified in a given pull request. This diff fixes an issue where the bot will fail to post warnings if a pull request contains multiple commits, where the most recent commit is a rebase (e.g. 63c00f20a7 in https://github.com/facebook/react-native/pull/22470). This happens because the script looks for files changed in the most recent commit in a PR.

In this diff, we switch to a new GitHub API that returns the list of all files changed by a PR, obviating the need to go through individual commits in a PR to look for changed files.

Reviewed By: TheSavior

Differential Revision: D13324154

fbshipit-source-id: f9f50028439d1969b0feea65f0b3e8bf75ac1a33
2018-12-05 13:15:56 -08:00
Tim Yung a689711f68 RN: Missing Copyright Headers
Summary: Adds copyright headers to all files that are missing them.

Reviewed By: hramos

Differential Revision: D12837494

fbshipit-source-id: 6330a18919676dec9ff2c03b7c9329ed9127d930
2018-10-31 01:37:26 -07:00
Héctor Ramos bb93abf5ca Fix checkout_code: Remove Metro cache check (#21998)
Summary:
This was a specific check that was prone to break at some point. That time has come. Removing it as it is not providing any useful signal.
Pull Request resolved: https://github.com/facebook/react-native/pull/21998

Differential Revision: D12823839

Pulled By: hramos

fbshipit-source-id: e870670d7803af78c4559052613ea364ce1478df
2018-10-29 08:46:09 -07:00
Héctor Ramos 5c5af3e1c9 Enforce lockfile is kept up to date (#21739)
Summary:
Adds a new script that runs Yarn with --frozen-lockfile, and fails if Yarn finds the lockfile is out of sync.

Keeping the lockfile in sync with package.json will ensure our internal open source tests can run offline, as our offline mirror is updated whenever the lockfile changes.

Reverted yarn.lock to https://raw.githubusercontent.com/facebook/react-native/6eeff75849c9b8bf91592c1b7906b4dab8fba518/yarn.lock, then ran `scripts/circleci/validate_yarn_lockfile.sh`, and verified the script failed as expected.

I then ran Yarn without the --frozen-lockfile flag, and reran the validation script. This time, the script finished successfully.
Pull Request resolved: https://github.com/facebook/react-native/pull/21739

Differential Revision: D10365642

Pulled By: hramos

fbshipit-source-id: 9ab7f03919427a86b12901d4c422ef04dd0839f6
2018-10-12 14:17:09 -07:00
Héctor Ramos 6967a4fa56 Flag code analysis issues once per converter used (#21503)
Summary:
Fixes issue where the bot would leave multiple lines in the top review comment if, say, eslint found 30 issues, there would be 30 mentions of eslint having found issues.

See https://github.com/facebook/react-native/pull/21492 for an example of such a case, where `analysis-bot` left a spammy review at https://github.com/facebook/react-native/pull/21492#pullrequestreview-161837975.
Pull Request resolved: https://github.com/facebook/react-native/pull/21503

Differential Revision: D10219439

Pulled By: hramos

fbshipit-source-id: 75d32ef3bfeaa91ab614763a19494659ad1be0dd
2018-10-05 11:33:38 -07:00
Héctor Ramos b030fcbbf5 Update path to code analysis script (#21443)
Summary:
The script was moved after the original ShellCheck PR was opened, and this was lost during the rebase.
Pull Request resolved: https://github.com/facebook/react-native/pull/21443

Differential Revision: D10133498

Pulled By: hramos

fbshipit-source-id: da61b782362ab2d13cb6f0bca3fb1c9a0af08ae5
2018-10-01 15:22:35 -07:00
Héctor Ramos 53b487d215 Use ShellCheck (#19681)
Summary:
As recommended in https://circleci.com/docs/2.0/using-shell-scripts/#use-shellcheck

It will only run on PRs for now.
Pull Request resolved: https://github.com/facebook/react-native/pull/19681

Differential Revision: D10111711

Pulled By: hramos

fbshipit-source-id: e980a526561dced79e5197a11cfb41a3eba9be8b
2018-09-28 17:03:24 -07:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
Héctor Ramos fe4f03517c Add missing copyright headers (#21000)
Summary:
One of our automated project tools noted that these were all missing their copyright headers.
Pull Request resolved: https://github.com/facebook/react-native/pull/21000

Differential Revision: D9721495

Pulled By: hramos

fbshipit-source-id: 6ccf0f37165a0fe16cf06bd996d615f2286101dc
2018-09-07 13:17:38 -07:00
Héctor Ramos e84bf99d40 Use PR reviews (#20927)
Summary:
Use GitHub PR Reviews instead of individual comments. The result is similar to the existing implementation, but there will be a top level comment indicating possible next steps for the PR author.

Verified on Circle.
Pull Request resolved: https://github.com/facebook/react-native/pull/20927

Differential Revision: D9596595

Pulled By: hramos

fbshipit-source-id: 3628b0097aa9a21a40089f2cbe1859bd64ccd8b7
2018-08-30 16:38:07 -07:00
Héctor Ramos 1fe7b40a33 Fix eslint code analysis bot (#20822)
Summary:
The eslint bot has not been working since the migration to Circle 2.0.
Pull Request resolved: https://github.com/facebook/react-native/pull/20822

Differential Revision: D9492680

Pulled By: hramos

fbshipit-source-id: 7f2f9ac125b6cab1750902c485a6d27d6c3cf302
2018-08-23 20:34:51 -07:00
Héctor Ramos d0f0e8e248 Gate failing steps behind a username check (#20818)
Summary:
There are some steps known to be failing on master. This pollutes checks for unrelated PRs.

This PR will make it so that PRs submitted by anyone other than myself will no-op on these steps.

Future work: Have an array of whitelisted contributors, and make it much easier to turn individual tests on and off.
Pull Request resolved: https://github.com/facebook/react-native/pull/20818

Differential Revision: D9484946

Pulled By: hramos

fbshipit-source-id: d6c187b341f13552b33d0f1d569b65f6c66ae48f
2018-08-23 15:18:04 -07:00
Héctor Ramos 6af3b161c0 Run failing tests in CI, without turning CI red (#20775)
Summary:
We have several disabled tests in Circle, and they are not running at all.
This prevents us from seeing when a disabled test might actually be fixed, as enabling the test requires uncommenting the correct line in Circle CI's config.

In this PR, we use the existing swallow_error script to run known-failing steps, without failing the job. This will let us see the step's output in CI, without polluting PRs that have not introduced new failures to CI.
Pull Request resolved: https://github.com/facebook/react-native/pull/20775

Differential Revision: D9442412

Pulled By: hramos

fbshipit-source-id: 83c930811a559fdcf6d7b926b4073343e862d2b3
2018-08-22 12:31:19 -07:00
Héctor Ramos dfcf9c50b6 Fix test_android test failure, add libpulse0 dep
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/20377

Differential Revision: D8983760

Pulled By: hramos

fbshipit-source-id: d36cdb577b0eadc78e3274db755d05d440ae423f
2018-07-24 16:33:49 -07:00