Summary: New 0.8.0 release which includes name changes from sonar to flipper.
Reviewed By: passy, danielbuechele
Differential Revision: D10050160
fbshipit-source-id: 5394ea0d032cea39f40cc9ed8e0f054e506d4f04
Summary: This shouldn't have any effect on anything, it doesn't need to be any particular value.
Reviewed By: danielbuechele
Differential Revision: D9944462
fbshipit-source-id: f84c70b3cd18fdfe1d41f07b5b0ede2fdec3f44a
Summary: We are referencing a no longer existing folder.
Reviewed By: priteshrnandgaonkar
Differential Revision: D10009244
fbshipit-source-id: 710c363fdeaf4f8621eb5f5d0bde2cbd4295ae64
Summary: Part of sonar to flipper rename
Reviewed By: priteshrnandgaonkar
Differential Revision: D9929102
fbshipit-source-id: 88cdbd33aa5c76e386449f54f4eb8c6435865ed1
Summary: Part of sonar to flipper rename
Reviewed By: passy
Differential Revision: D9929101
fbshipit-source-id: f33e1ac7f88fbe88a9d48180d064b596603a3c58
Summary: Part of sonar to flipper rename
Reviewed By: passy
Differential Revision: D9920275
fbshipit-source-id: 02f97d1e51d58864283d26e8d3a724cac973e938
Summary: Part of sonar to flipper rename
Reviewed By: passy
Differential Revision: D9919821
fbshipit-source-id: a44a2a04d5463750f884f8bf1328e02d56593e82
Summary:
Part of Sonar -> Flipper rename.
It's about time this is renamed from *Websocket as well, since it doesn't use websockets anymore.
Reviewed By: passy
Differential Revision: D9919695
fbshipit-source-id: 78a63bfb7d5de19c093b7fb775d1426b4fc58f77
Summary:
Part of the Sonar -> Flipper rename
Intentionally left externally visible buck target as Sonar for now to minimize diff size.
Reviewed By: passy
Differential Revision: D9871684
fbshipit-source-id: 6926eb62c578a05cd895745c75ed7da3cfe965b5
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/277
Link all dynamically loaded libraries statically with the exception of libevent.
Reviewed By: jknoxville
Differential Revision: D9967422
fbshipit-source-id: b33cec5da0c2b34f47217353f205b9d77f1acae2
Summary: This diff wraps the call to refresh plugins in `performAndReport`. All the important methods are already wrapped in this function. This diff also logs the error in the standard error if the connection is not established. With this diff the iOS app should not crash due exceptions thrown in iOS and cpp code. For android the app won't crash due to exception of cpp but can crash due to exceptions thrown in java code of the plugin
Reviewed By: jknoxville
Differential Revision: D9848112
fbshipit-source-id: 689ef9240e47400e8ce8c89b4c0ccec43d2180f9
Summary:
Versions of flipper from before 7th August 2018 don't return any response, so we don't store any connection_config.json file.
To keep the functionality the same as with up-to-date app versions, when this happens, store an empty config file ("{}").
Reviewed By: danielbuechele
Differential Revision: D9682885
fbshipit-source-id: fd580f6bba6b6b20135aa2c076be10e1eea0f8bc
Summary: Loading the deviceId is not critical, so if it ever fails, we can live with that by swallowing the exception and using the default (possibly 'unknown' deviceId).
Reviewed By: danielbuechele
Differential Revision: D9682886
fbshipit-source-id: e5d60dd262fce683dd444167edd1475e0c029759
Summary: There's no need for these to be macros.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9555471
fbshipit-source-id: a78d6cdb4ceb1830f749eda50e0e07ebc55723bf
Summary:
SonarWebSocketImpl has got pretty bloated. So I'm extracting all the file interaction out of it into
ConnectionContextStore. The purpose of this class is to provide all the context needed to establish a connection.
This makes SonarWebSocketImpl more functional and therefore testable.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9540089
fbshipit-source-id: 0cd1d69f2b11eaf9f569245a2da14f85cc140427
Summary:
If you use a null eventbase, folly implicitly decides which one to run the futures in, for example
the timekeeper thread.
The only component that passes in event bases is sonar.cpp.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9539443
fbshipit-source-id: 7fd7289257c84b039a7ac00b14f78bb271262480
Summary:
Android devices don't always know their own serial.
But we do a certificate exchange using adb from the desktop, so we can provide it in the response.
After this the client will provide it every time it connects, so we can do things like filter plugins by device id.
For apps that have already done cert exchange, they'll continue to use 'unknown' as their id until they do it again with an up to date version of sonar.
We can think about forcefully stopping that, but I haven't done it.
Reviewed By: danielbuechele
Differential Revision: D9481460
fbshipit-source-id: f8932699711ebbec4260fabe32f87e6cdff920f2
Summary:
See https://github.com/facebook/flipper/issues/230 for a longer
explanation.
It turns out that many of the tasks in `native.gradle` (at least
`prepareGlog` which modifies files inside the source directory, but also
others) cause the cmake cache to invalidate.
Because we run those tasks unconditionally, we need to recompile all our
C++ code even when unmodified.
I fix this by adding a manual cache key to this which simply skips all
the tasks unless an up-to-date `external_cache_revision.txt` is found.
This is a bit hacky, but the alternatives are a) convincing cmake that
these modifications are not recompile-worthy which I have no idea how to
do and which might be impossible to do `mtime` on the files touches, or
b) having fine-grained `onlyIf` rules for every task which can easily
break. This seems the most straight-forward option.
Fixes#230.
Pull Request resolved: https://github.com/facebook/flipper/pull/242
Reviewed By: jknoxville
Differential Revision: D9381340
Pulled By: passy
fbshipit-source-id: a7db55aacac4a29076c29298d6c5b97d8bc91f66
Summary: calling SonarClient::instance()->stop() without a connection will try to deref a null client_
Reviewed By: jknoxville
Differential Revision: D9325527
fbshipit-source-id: b0a81d6eb9d1375b74cbf10466f947e8a2de3b98
Summary: It may not be immediately obvious how this works, so adding comments.
Reviewed By: passy
Differential Revision: D9333321
fbshipit-source-id: 79740b3d2a9589b3ba48c47b0068afdaf26f35a3
Summary:
Add a method to add error messages into failed steps. This will be surfaced in the diagnostic screen, to help the user
troubleshoot.
Reviewed By: passy
Differential Revision: D9333322
fbshipit-source-id: 5f1e55c3d71b19292dbc428aaecfbd41e7a75125
Summary:
It's expected that whenever not connected to a desktop, or when the sonar desktop app isn't running, we'll get
errors connecting. Isolate these so we can treat all other exceptions properly.
Reviewed By: passy
Differential Revision: D9333323
fbshipit-source-id: c9853ca84d1a04827ebf7bae0fe87859ca6110d1
Summary:
Adds a more structured representation of state updates than a multiline string.
Also changes the string form to omit [started] records.
Reviewed By: danielbuechele
Differential Revision: D9315503
fbshipit-source-id: 55b8f9572091fd42fe852c8d26a8f2a53f76c82a
Summary:
NOTE: Second push of the same commit. The original was reverted because of an incompatibility with
the rsocket version used in the OSS build, which is now fixed.
[Step 2 of a protocol change between desktop app and agent]
The flipper agent periodically tries to connect.
When it doesn't have the required certs, instead of trying to connect, it requests them from the desktop.
After requesting, it just continues the loop, trying to request.
The problem with that is
a) the desktop can take longer than one cycle to generate and provide the certs, meaning the agent will make overlapping requests, causing confusion and it to take longer than necessary.
b) the desktop can take less time than a retry cycle, but the agent will still wait before trying to connect.
Fixing a) by making the agent wait for a response from the desktop before continuing attempting to reconnect.
This means on the next connection attempt, it's guaranteed that the desktop is finished processing the CSR.
b) remains unfixed for now, but can be dealt with separately.
This changes the agent to use requestResponse, instead of fireAndForget and wait for a response from Flipper before continuing.
Also added a fallback to detect old versions of Flipper/Sonar and use the oldFireAndForget method in those cases.
Reviewed By: danielbuechele
Differential Revision: D9315946
fbshipit-source-id: 8058f7d43690ba609f16a61c0a9b40991e9e83cc
Summary:
This breaks in open source due to a missing rsocket symbol and
blocks our legocastle task.
Closes https://github.com/facebook/flipper/issues/224
Original commit changeset: e782b303b5e4
Reviewed By: jknoxville, danielbuechele
Differential Revision: D9289450
fbshipit-source-id: b780c300394f5793e95ef2fb6b0e6ba0150caf9a
Summary: I noticed from the diagnostics screen that onDisconnected was never being called when sonar disconnects.
Reviewed By: danielbuechele
Differential Revision: D9265562
fbshipit-source-id: afd070126c6ef02a98c8dbc6589b6f9b8b83a730
Summary:
[Step 2 of a protocol change between desktop app and agent]
The flipper agent periodically tries to connect.
When it doesn't have the required certs, instead of trying to connect, it requests them from the desktop.
After requesting, it just continues the loop, trying to request.
The problem with that is
a) the desktop can take longer than one cycle to generate and provide the certs, meaning the agent will make overlapping requests, causing confusion and it to take longer than necessary.
b) the desktop can take less time than a retry cycle, but the agent will still wait before trying to connect.
Fixing a) by making the agent wait for a response from the desktop before continuing attempting to reconnect.
This means on the next connection attempt, it's guaranteed that the desktop is finished processing the CSR.
b) remains unfixed for now, but can be dealt with separately.
This changes the agent to use requestResponse, instead of fireAndForget and wait for a response from Flipper before continuing.
Also added a fallback to detect old versions of Flipper/Sonar and use the oldFireAndForget method in those cases.
Reviewed By: passy
Differential Revision: D9179393
fbshipit-source-id: e782b303b5e441f7d6c7faa3e5acdcbfb51e5e9c
Summary: These will be displayed in the sonar diagnostics screen, for troubleshooting connection issues.
Reviewed By: danielbuechele
Differential Revision: D9150552
fbshipit-source-id: c6d65fba86e7564fbb004aaa7b0303a1d5952e5d