Commit Graph

22 Commits

Author SHA1 Message Date
greenkeeper[bot]
ff1b3a4382 Update @types/node in group doctor to the latest version � (#840)
Summary:
## The dependency [types/node](https://github.com/DefinitelyTyped/DefinitelyTyped) was updated from `12.12.28` to `13.7.5`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

 ---

**Publisher:** [types](https://www.npmjs.com/~types)
**License:** MIT

[Find out more about this release](https://github.com/DefinitelyTyped/DefinitelyTyped).

 ---

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

 ---

Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Pull Request resolved: https://github.com/facebook/flipper/pull/840

Reviewed By: passy

Differential Revision: D20189689

Pulled By: cekkaewnumchai

fbshipit-source-id: 710179a10e3f85d13fc7cfed77de2c0bfcf5153a
2020-03-03 09:57:30 -08:00
Chaiwat Ekkaewnumchai
2afa75a5a7 Change npm to yarn
Summary:
`npm` is not found in Tupperware and cause an error in Sandcastle (https://our.intern.facebook.com/intern/sandcastle/job/36028797237063790/).

Changing from `npm` to `yarn`

Note:
- changing job spec (`vcs` and `type` in `capacities`) without changing `npm` passes the test (https://our.intern.facebook.com/intern/sandcastle/job/18014398729063207). Not sure what to do now

Reviewed By: nikoant

Differential Revision: D20191486

fbshipit-source-id: b354c28a61dbce7bc165bd43c4c608fe359a9670
2020-03-03 09:57:29 -08:00
Anton Nikolaev
b625efee3d Doctor complains Android SDK is not installed
Summary:
There are complaints about Android SDK being reported as "not installed" when it is actually installed. To address them, I changed the way how we detect SDK and also added some minimal actionable feedback for each check.

The problem with the previous implementation of Android SDK check via "envinfo" is that the library uses "sdkmanager" tool under the hood, and this tool doesn't work on Java 9+. To fix this I'm changing the way how we assume SDK is installed to simple check for "adb" tool existence.

Actionable feedback is shown on Doctor report when you click to an item.

Reviewed By: jknoxville

Differential Revision: D19517769

fbshipit-source-id: 1c21f1bdcd05c7c0ae3f97b9c3454efa2c861d26
2020-01-23 13:37:02 -08:00
Anton Nikolaev
f94446310d ~10% of healthcheck runs failed with error "Cannot fine property length of undefned"
Summary: According to dashboard, ~10% of healthcheck runs failed with error "Cannot find property length of undefned". So here I'm fixing the only place where length property is used by doctor.

Reviewed By: passy

Differential Revision: D19470886

fbshipit-source-id: 3ad88370e5cb652c6f20034ebf5f38fadc46bf53
2020-01-20 09:54:24 -08:00
Anton Nikolaev
751c778069 Use unique keys to identify healthchecks
Summary: Added unique keys for each healthcheck and used them to save already seen failures. Later I will also use them for gathering doctor analytics.

Reviewed By: jknoxville

Differential Revision: D19301583

fbshipit-source-id: 0c0aa977ea73ce555e0d9fb8e8ead844624fb9cd
2020-01-08 08:12:06 -08:00
Anton Nikolaev
5c8ab0790b Add watchman installation check
Summary: Doctor to show warning if Watchman is not available

Reviewed By: mweststrate

Differential Revision: D19298730

fbshipit-source-id: 68f915c63c5f78aad91f549aabda8d4d972f4e39
2020-01-08 01:59:57 -08:00
Anton Nikolaev
2bee021966 Do not show Doctor warning on startup for already seen problems
Summary: Doctor sometimes can show false-positives and in such case there is no way to suppress showing warning message on each startup. To reduce annoyance I've added an option to save the problems already seen by user and show the Doctor warning only for new problems.

Reviewed By: mweststrate

Differential Revision: D19187095

fbshipit-source-id: 14c1fcc9674f47fbe0b5b0f2d5d1bceb47f7b45d
2020-01-02 08:55:15 -08:00
Anton Nikolaev
b716b50729 Safer workaround for Android SDK detection with Java 9/10
Summary: Safer workaround for Android SDK detection with Java 9/10

Reviewed By: mweststrate

Differential Revision: D19158381

fbshipit-source-id: 8c4ce456543712204423f14abe8a1840308c8bf9
2019-12-18 07:24:41 -08:00
Anton Nikolaev
5eaa87c676 Rollback workaround for Android SDK detection
Summary: Rolling back workaround for Android SDK detection as it breaks detection with Java 8 while fixing Java 9+

Reviewed By: cekkaewnumchai

Differential Revision: D19146945

fbshipit-source-id: 2bea318d5f5cfafdf213d2ec73e837f6e86c9f33
2019-12-17 18:26:04 -08:00
Anton Nikolaev
5d17eede85 Workaround for Anrdoid SDK detection not working with Java 9+ installed
Summary: Workaround for Anrdoid SDK detection not working with Java 9+ installed

Reviewed By: mweststrate

Differential Revision: D19094906

fbshipit-source-id: a7c8c9c8403d25ecc9b2d95113718ddf1821a349
2019-12-16 16:40:09 -08:00
Anton Nikolaev
3fefd9de15 Fix module resolution for flipper-doctor and return it to sonar directory and effectively to GitHub
Summary: Fix module resolution for flipper-doctor and return it to sonar directory and effectively to GitHub

Reviewed By: mweststrate

Differential Revision: D18963720

fbshipit-source-id: 61ea78ecbb154de79c7a2d348f347c64325e794c
2019-12-13 04:06:02 -08:00
Anton Nikolaev
735a586c37 Move flipper-doctor library out of sonar folder
Summary: Temporary move flipper-doctor library out of sonar folder to fix the build

Reviewed By: jknoxville

Differential Revision: D18626493

fbshipit-source-id: 352587b0db914a0f40069f6af6cd5569b03fb508
2019-11-21 03:10:36 -08:00
Anton Nikolaev
ddb135ac39 Basic Doctor UI
Summary:
- Basic Doctor UI showing issues with installation
- Run healthchecks in background on startup and show warning message if something is wrong

Reviewed By: jknoxville

Differential Revision: D18502599

fbshipit-source-id: 194939a080ba7412ed3293d95c533bfad7031d3b
2019-11-21 03:10:36 -08:00
John Knox
0914deda2d Add Healthcheck Result type
Summary: Adds a type for the return type of runHealthchecks()

Reviewed By: passy

Differential Revision: D18474919

fbshipit-source-id: b86968088d61d9d2d31815b4c725396cc05d8ca5
2019-11-13 08:42:40 -08:00
John Knox
ad64b257f6 Upgrade prettier
Summary: So we can use null coalescing and the other goodies in the doctor.

Reviewed By: passy

Differential Revision: D18477611

fbshipit-source-id: 60108d3c7c03e3fe4a4313653d5f615d287411fd
2019-11-13 08:42:39 -08:00
John Knox
22a86747d4 Wrap command execution in util
Summary:
Take the low level execution details out of the healthchecks.

The xcode-select change is sound because `xcode-select -p` returns status code > 0 when not set, so exec will throw, so no need to inspect stdout.

Reviewed By: passy

Differential Revision: D18449564

fbshipit-source-id: b2e2797a51aca45cfd78e707e99341798401897c
2019-11-12 06:55:52 -08:00
John Knox
999e3784b8 Check for openssl
Reviewed By: mweststrate

Differential Revision: D18448006

fbshipit-source-id: 1d98c1f8476e916f270c9d8f7bc63ab0d2386ac6
2019-11-12 06:55:52 -08:00
John Knox
802c857578 Check instruments are on path
Reviewed By: mweststrate

Differential Revision: D18427166

fbshipit-source-id: be075a23d2f0216ac79fc8bd8e083a351e9dbbc9
2019-11-12 06:55:51 -08:00
John Knox
55cfe11e2c Check xcode-select is set
Summary:
Basic check for some xcode-path

There'll be a separate connected device check that looks at the current simulators and sees if they are running the same xcode version.

Reviewed By: mweststrate

Differential Revision: D18427090

fbshipit-source-id: 5e202d8920cae1ffce444e81a0c138a97936f758
2019-11-12 06:55:51 -08:00
John Knox
1750516250 Add check for Xcode
Summary: Checks for xcode. We'll be able to do some version comparisons here if we find incompatible versions going forward, but for now, just check if it exists.

Reviewed By: mweststrate

Differential Revision: D18425284

fbshipit-source-id: 4a35a40de17f168f409c86264c5c3e172d7d1569
2019-11-12 06:55:51 -08:00
John Knox
fc1e4098ed Make healthchecks async
Summary:
Rework the healthchecks.

* Makes them healthcheck run api async so they can do more.
* Adds isRequired to the top level categories - this specifies if the category itself is required. The isRequired attributes of its constituent checks specifies if they are required within that category.
* Move isRequired outside the result of the healthcheck functions, because its static.

Reviewed By: mweststrate

Differential Revision: D18425189

fbshipit-source-id: 9d5c136a426732375d32cd27a758d9c92d123214
2019-11-12 06:55:50 -08:00
John Knox
2ae2352972 Add starter package
Summary:
Adds a new package with typescript set up, to be published to npm.

Followed this as a guideline: https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c

Reviewed By: passy

Differential Revision: D18244495

fbshipit-source-id: c684f0bb33e61699f605c637186c7a81136a920f
2019-11-06 09:39:57 -08:00