Commit Graph

13 Commits

Author SHA1 Message Date
Lorenzo Blasa
f93da44ee5 Remove idb device polling record
Summary:
If listing devices is successful, then don't record the event
as this is triggered every X amount of seconds.

Reviewed By: antonk52

Differential Revision: D47995681

fbshipit-source-id: 2d0fa68fd7b9c4ce74bad9e8cc0296691d9b8880
2023-08-11 08:19:51 -07:00
Lorenzo Blasa
6668420083 Disable stdout for successful device listing
Summary: If it is successful, we rarely care about stdout, which can be quite verbose. So don't use it.

Reviewed By: antonk52

Differential Revision: D47339446

fbshipit-source-id: 66f43d4184e44ed07364a6f33715139e19b2dc1d
2023-07-11 07:21:00 -07:00
Lorenzo Blasa
e20d723ac0 Make ClientQuery available to certificate provider
Summary:
CertificateProvider is intrinsically related to a client query, make it available to it.

This becomes the optional 'context' of shell executions. When these are recorded, the context is provider to the recorder which can then link an ongoing certificate exchange process with the success or failure of said command.

Reviewed By: antonk52

Differential Revision: D47295894

fbshipit-source-id: 9469d18bda02793d71a6a8b29c93f4af1db23569
2023-07-10 05:52:07 -07:00
Lorenzo Blasa
fc38355eee Centralise logging
Summary:
Centralise connectivity logging into a single place. By having all logs go through a single interface, then it becomes trivial to manipulate them as needed.

In this change, this is not done.

In subsequent diffs, logs will be dispatched via an event and will be visualised in the Connectivity Hub.

Reviewed By: passy

Differential Revision: D47185054

fbshipit-source-id: fb5eab98895be0c8f61fb9a77d3e66d6a8dbcb27
2023-07-10 04:14:14 -07:00
Lorenzo Blasa
f78ca5c09e iOSContainerUtility improvements (?)
Summary:
Bit of refactoring, bit of improvements, maybe. Mainly:

- Name consistency
- Promise chaining to async/await
- Refactoring

Reviewed By: lawrencelomax, antonk52

Differential Revision: D47224620

fbshipit-source-id: 5f4515f576decc03d470c11f24577b43f34a5a28
2023-07-05 05:15:01 -07:00
Andrey Goncharov
c88e8e07d0 Support externally started IDB companion
Reviewed By: lblasa

Differential Revision: D37453361

fbshipit-source-id: 2acd53ae40c8a3f8971ee47cb5161c371be6d3a9
2022-06-27 05:03:09 -07:00
Michel Weststrate
597f679ed3 Propagate errors properly when cert exchange fails
Summary:
Certificate exchange errors should be communicated back to the user, as they are often actionable, and otherwise leave users in a stuck state.

Also removed the ServerController interface, upgraded the listener types to get at the necessary internal apis typewise that were already available.

Removed that error wrapping utility complaining about idb installation, this is rarely ever the problem anymore, and it hides the underlying error.

Reviewed By: nikoant

Differential Revision: D34105452

fbshipit-source-id: 3b3cd0b99cecbda26dfd0744a90690fe568a5ea5
2022-02-09 04:22:25 -08:00
Andrey Goncharov
c7492a83c7 Remove global access to adb client and idb config
Summary: Idb and adb sholuld not really be accessed out side of Adnroid and iOS device managers

Reviewed By: lawrencelomax

Differential Revision: D33915162

fbshipit-source-id: 0d1bb028b9a53254cf5b0ce6289ae76339c5a254
2022-02-02 03:07:00 -08:00
Andrey Goncharov
da618fd3f3 Decouple CertificateProvider and adb/idb client intialization
Summary:
Previously CertificateProvider initialized ADB and provided config to IDB. As result, AndroidDeviceManager and iOSDeviceManager indirectly depended on CertificateProvider.

With this diff we:
1. Make idbConfig resemble adbClient.
2. Make AndroidDeviceManager and iOSDeviceManager initialize their own clients
3. Fix server crash when one of the clients couldn't be initialized. The reason for the crash is CertificateProvider.prototype.init which is no longer needed.

Reviewed By: passy

Differential Revision: D33711652

fbshipit-source-id: 055b5625ed993827b65396f4af5157808479242b
2022-01-26 04:23:05 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Andrey Goncharov
9975aa9319 Fix idb pull
Summary:
Workaround for idb weirdness
Originally started at D27590885
Re-appared at https://github.com/facebook/flipper/issues/3009

Reviewed By: mweststrate

Differential Revision: D32106952

fbshipit-source-id: 63d4fa64503c5c2ba80dae113850c937450ab0fb
2021-11-03 08:11:01 -07:00
Andrey Goncharov
bffd58b3a6 Fix idb device duplicates
Summary:
idb sometimes returns duplicates when we query targets. It leads us to removing valid devices and reconnecting to them again. Eventually, it starves the idb thread pool.
This diff removes the duplicates from the idb output.

Reviewed By: jknoxville

Differential Revision: D32099320

fbshipit-source-id: 7d8b756360f82557000ea5aa037a249b33be9961
2021-11-03 08:11:01 -07:00
Michel Weststrate
d88b28330a Move app/server to flipper-server-core
Summary: moved `app/src/server` to `flipper-server-core/src` and fixed any fallout from that (aka integration points I missed on the preparing diffs).

Reviewed By: passy

Differential Revision: D31541378

fbshipit-source-id: 8a7e0169ebefa515781f6e5e0f7b926415d4b7e9
2021-10-12 16:00:52 -07:00