-
-
Notifications
You must be signed in to change notification settings - Fork 398
Daemon mode (GRPC) + pluggable discovery #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
All the arduino-cli commands implementation has been moved from package `command` to package `cli`. The `board details` command has been choosen as a 'tracing bullet' to reimplement all the cli command using grpc/protoc to generate Request/Response (input/output) structures. We should probably abandon the idea to use a generic `formatter` module since it seems that it doesn't help to reduce boilerplate code (for example in the `board details` command there is no need for the `formatter` module nor it's clear how it can improve things). The `output` module now has only functions for pretty-printing data.
Normal errors are automatically wrapped into GRPC errors with code equals to "Unknown".
With this patch we correctly forward output messages (to the CLI terminal or to the GRPC client).
serial-discovery must be moved from commands/board to commands
It now correctly closes zombie processes.
@cmaglie all the test build URLs are giving 404 errors. That's no problem for me because it's easy enough for me to build from source, but if this indicates a problem with the build system it would be nice to get it fixed to make it easy for anyone to do beta testing. |
Hi @per1234 , |
✅ Build completed. ⬇️ Linux 64: ⬇️ Linux 32: ⬇️ Linux ARM: ⬇️ Windows: ⬇️ OSX: ℹ️ To test this build:
|
Daemon mode (GRPC) + pluggable discovery
Sync installation assets from template
This (quite big) PR adds a "daemonized" mode to arduino-cli. When the cli is launched with the command
arduino-cli daemon
it starts to listen to the TCP port:50051
waiting for gRPC commands.rpc/*.proto
files.commands
folder) have been ported to use the gRPC request/response structures (generated from the.proto
files) as input/output.commands
and isolated intocli
folder.daemon
folder. The gRPC server can now just directly forward the incoming rpc calls toward the cli commands implementation in thecommands
folder.daemon/client
folder.