Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add support for Pluggable Discoveries (#1333)
* [skip changelog] Add DiscoveryManager to PackageManager * Add loading of PluggableDiscoveries when loading a platform release * Added compatibility layer for non-pluggable platforms * Implemented board list with discoveries * Implemented discovery loading after initialization * Implemented board watch with discoveries * Fix load discoveries tests * Fix some issues with board list watcher * Fix FindToolsRequiredFromPlatformRelease not returning discoveries * Enhanced handling of some discoveries states * Fix PackageManager reset * Add function to convert discovery.Port to rpc.Port * Moved reference argument parsing to new package * Fix functions docstrings * Remove duplicated code to initialize Sketch path * Add property conversion for platform not supporting pluggable discovery * Fix board list watch not working * Fix crash when converting Port to rpc struct * Add generic Port argument * Change gRPC upload functions to use new Port message * Add support for upload user fields * Fix upload unit tests * Fix code naming issues * Added builtin:mdns-discovery * Do not panic if discovery tool is not installed * Implemented port/protocol detection at CLI startup time * Perform 1200bps-touch only on serial ports * Added missing properties for pluggable upload * Correctly implemented 'board list' timeout option * Updated mdns-discovery to 0.9.2 * Add documentation * Add board properties to board list command and gRPC function * Fix documentation and code comments Co-authored-by: per1234 <[email protected]> * Fix crash when attempting upload without specifying port address * Fix unit tests * Update go-properties-orderedmap to fix discovery properties issues * Fix more documentation Co-authored-by: per1234 <[email protected]> * Clarify pluggable discovery specification * More documentation fixes * Add upload_port properties docs in platform specification * Change links from pluggable discovery RFC to official docs * Add more upload mock integration tests * Fix integration tests * Change property to declare pluggable discoveries * Change property to declare pluggable discoveries * Fix documentation Co-authored-by: per1234 <[email protected]> * Fix loading of platform not supporting pluggable discovery * Fix more documentation Co-authored-by: per1234 <[email protected]> * Add pluggable discovery states documentation * Enhanced handling of pluggable discoveries states * Discoveries processes are now killed if the HELLO command fails * Add pluggable discovery logging * Enhanced handling of failing pluggable discoveries * Fix pluggable discoveries parallelization * Discoveries event channels are now created when start sync is called * Cached ports are now reset on discovery stop * Renamed ListSync methods to ListCachedPorts * Pluggable discovery upload user fields are now limited to 50 chars * Fix i18n strings * Fix failing integration tests * Fix i18n data * Fix integration tests again * [skip changelog] Internationalize strings added for pluggable discovery support (#1384) * Update docs/pluggable-discovery-specification.md Co-authored-by: per1234 <[email protected]> * Fix failing workflows * Updated upload-mock tests for generation * Added a lot of mock upload test (also with programmer option) * test_upload_mock: Handle '{' and '}' in recipes * network ota: autoconvert network_patter from legacy * Automatically add port detection properties for network discovery * Slightly improved 'board list' text output * Default 'board list' timeout to 1s * Added some code review fixes * Added unit test for legacy-package conversion to pluggable discovery Co-authored-by: Cristian Maglie <[email protected]> Co-authored-by: per1234 <[email protected]>
- Loading branch information
Showing
with
13,916 additions
and 6,213 deletions.
- +2 −0 .flake8
- +191 −9 arduino/cores/packagemanager/loader.go
- +143 −0 arduino/cores/packagemanager/loader_test.go
- +56 −0 arduino/cores/packagemanager/package_manager.go
- +115 −2 arduino/cores/packagemanager/package_manager_test.go
- +0 −4,821 arduino/cores/packagemanager/testdata/data_dir_1/packages/esp8266/hardware/esp8266/2.4.2/boards.txt
- +0 −21 ...ino/cores/packagemanager/testdata/data_dir_1/packages/esp8266/hardware/esp8266/2.4.2/keywords.txt
- +0 −134 ...ino/cores/packagemanager/testdata/data_dir_1/packages/esp8266/hardware/esp8266/2.4.2/platform.txt
- +8,877 −0 arduino/cores/packagemanager/testdata/data_dir_1/packages/esp8266/hardware/esp8266/3.0.2/boards.txt
- +170 −0 ...ino/cores/packagemanager/testdata/data_dir_1/packages/esp8266/hardware/esp8266/3.0.2/platform.txt
- 0 ...kagemanager/testdata/data_dir_1/packages/esp8266/hardware/esp8266/{2.4.2 → 3.0.2}/programmers.txt
- +126 −57 arduino/discovery/discovery.go
- +13 −2 arduino/discovery/discovery_client/go.sum
- +5 −4 arduino/discovery/discovery_client/main.go
- +2 −2 arduino/discovery/discovery_test.go
- +259 −0 arduino/discovery/discoverymanager/discoverymanager.go
- +20 −0 cli/arguments/arguments.go
- +125 −0 cli/arguments/port.go
- +12 −12 cli/{globals/args.go → arguments/reference.go}
- +10 −10 cli/{globals/args_test.go → arguments/reference_test.go}
- +41 −0 cli/arguments/sketch.go
- +51 −0 cli/arguments/user_fields.go
- +5 −22 cli/board/attach.go
- +20 −25 cli/board/list.go
- +11 −3 cli/burnbootloader/burnbootloader.go
- +56 −42 cli/compile/compile.go
- +2 −2 cli/core/download.go
- +2 −2 cli/core/install.go
- +2 −2 cli/core/uninstall.go
- +2 −2 cli/core/upgrade.go
- +4 −20 cli/debug/debug.go
- +35 −23 cli/upload/upload.go
- +1 −1 client_example/go.sum
- +10 −7 client_example/main.go
- +60 −38 commands/board/list.go
- +0 −2 commands/board/list_test.go
- +109 −0 commands/bundled_tools_mdns_discovery.go
- +0 −68 commands/bundled_tools_serial_discovery.go
- +1 −1 commands/daemon/daemon.go
- +1 −1 commands/daemon/term_example/go.sum
- +20 −1 commands/instances.go
- +1 −0 commands/upload/burnbootloader.go
- +133 −44 commands/upload/upload.go
- +119 −18 commands/upload/upload_test.go
- +60 −0 docs/UPGRADING.md
- +20 −0 docs/img/pluggable-discovery-state-machine.dot
- BIN docs/img/pluggable-discovery-state-machine.png
- +9 −0 docs/package_index_json-specification.md
- +280 −12 docs/platform-specification.md
- +379 −0 docs/pluggable-discovery-specification.md
- +2 −2 docsgen/go.sum
- +1 −1 go.mod
- +2 −2 go.sum
- +385 −299 i18n/data/en.po
- +7 −7 i18n/rice-box.go
- +2 −0 mkdocs.yml
- +265 −300 rpc/cc/arduino/cli/commands/v1/board.pb.go
- +7 −14 rpc/cc/arduino/cli/commands/v1/board.proto
- +1 −1 rpc/cc/arduino/cli/commands/v1/commands.pb.go
- +24 −28 rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go
- +1 −1 rpc/cc/arduino/cli/commands/v1/common.pb.go
- +1 −1 rpc/cc/arduino/cli/commands/v1/compile.pb.go
- +1 −1 rpc/cc/arduino/cli/commands/v1/compile.proto
- +1 −1 rpc/cc/arduino/cli/commands/v1/core.pb.go
- +1 −1 rpc/cc/arduino/cli/commands/v1/lib.pb.go
- +1 −1 rpc/cc/arduino/cli/commands/v1/port.pb.go
- +444 −100 rpc/cc/arduino/cli/commands/v1/upload.pb.go
- +49 −3 rpc/cc/arduino/cli/commands/v1/upload.proto
- +1 −1 rpc/cc/arduino/cli/debug/v1/debug.pb.go
- +4 −8 rpc/cc/arduino/cli/debug/v1/debug_grpc.pb.go
- +1 −1 rpc/cc/arduino/cli/monitor/v1/monitor.pb.go
- +4 −8 rpc/cc/arduino/cli/monitor/v1/monitor_grpc.pb.go
- +1 −1 rpc/cc/arduino/cli/settings/v1/settings.pb.go
- +3 −7 rpc/cc/arduino/cli/settings/v1/settings_grpc.pb.go
- +1,147 −14 test/test_upload_mock.py
Oops, something went wrong.

