-
-
Notifications
You must be signed in to change notification settings - Fork 400
SettingsService#Merge
and SettingsService#Write
work incorrectly between daemon
sessions
#2275
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
Comments
SettingsService#Merge
and SettingsService#Write
works incorrectly between daemon
sessionsSettingsService#Merge
and SettingsService#Write
work incorrectly between daemon
sessions
Hello @kittaakos, thanks for reporting this! We actually fixed this issue in PR #2212, introducing a new command To delete the Preliminary steps:
Start daemon in
In
Please let me know if this process works for you or if you have any doubts! |
IDE2 does not know what has changed, that's why the |
Describe the problem
Originally from arduino/arduino-ide#2185 (review).
When IDE2 sets the
network#proxy
to manual proxy settings, then unsets it in another daemon session, it does not work. It works perfectly when setting and then unsettingnetwork#proxy
within the samedaemon
session.To reproduce
You need two shells.
In
shell #1
:In
shell 2
:network#proxy
config value with manual proxy settingsgrpcurl \ -plaintext \ -import-path ./rpc \ -proto cc/arduino/cli/settings/v1/settings.proto \ -d '{"jsonData": "{\n \"board_manager\": {\n \"additional_urls\": [\n \"https://www.pjrc.com/teensy/package_issue1588_index.json\"\n ]\n },\n \"build_cache\": {\n \"compilations_before_purge\": 10,\n \"ttl\": \"720h0m0s\"\n },\n \"daemon\": {\n \"port\": \"50051\"\n },\n \"directories\": {\n \"data\": \"/Users/a.kitta/Library/Arduino15\",\n \"user\": \"/Users/a.kitta/Documents/Arduino\"\n },\n \"library\": {\n \"enable_unsafe_install\": false\n },\n \"locale\": \"en\",\n \"logging\": {\n \"file\": \"\",\n \"format\": \"text\",\n \"level\": \"info\"\n },\n \"metrics\": {\n \"addr\": \":9090\",\n \"enabled\": true\n },\n \"output\": {\n \"no_color\": false\n },\n \"sketch\": {\n \"always_export_binaries\": false\n },\n \"updater\": {\n \"enable_notification\": true\n },\n \"network\": {\n \"proxy\": \"http://username:secret@hostename:1234/\"\n }\n}"}' \ 127.0.0.1:50051 \ cc.arduino.cli.settings.v1.SettingsService.Merge
grpcurl \ -plaintext \ -import-path ./rpc \ -proto cc/arduino/cli/settings/v1/settings.proto \ -d '{"filePath": "/Users/a.kitta/dev/git/arduino-cli/my-cli-config.yaml"}' \ 127.0.0.1:50051 \ cc.arduino.cli.settings.v1.SettingsService.Write
network#proxy
, manual proxy settings are configuredTerminate the CLI daemon process in
shell 1
and restart it with./arduino-cli daemon --config-file ./my-cli-config.yaml
.❗ The bug does not happen if you do not restart the daemon process but continue with the
grpcurl
commands inshell 2
.In
shell 2
:network#proxy
manual proxy configuration (using an empty object ({}
))grpcurl \ -plaintext \ -import-path ./rpc \ -proto cc/arduino/cli/settings/v1/settings.proto \ -d '{"jsonData": "{\n \"board_manager\": {\n \"additional_urls\": [\n \"https://www.pjrc.com/teensy/package_issue1588_index.json\"\n ]\n },\n \"build_cache\": {\n \"compilations_before_purge\": 10,\n \"ttl\": \"720h0m0s\"\n },\n \"daemon\": {\n \"port\": \"50051\"\n },\n \"directories\": {\n \"data\": \"/Users/a.kitta/Library/Arduino15\",\n \"user\": \"/Users/a.kitta/Documents/Arduino\"\n },\n \"library\": {\n \"enable_unsafe_install\": false\n },\n \"locale\": \"en\",\n \"logging\": {\n \"file\": \"\",\n \"format\": \"text\",\n \"level\": \"info\"\n },\n \"metrics\": {\n \"addr\": \":9090\",\n \"enabled\": true\n },\n \"output\": {\n \"no_color\": false\n },\n \"sketch\": {\n \"always_export_binaries\": false\n },\n \"updater\": {\n \"enable_notification\": true\n },\n \"network\": {}\n}"}' \ 127.0.0.1:50051 \ cc.arduino.cli.settings.v1.SettingsService.Merge
grpcurl \ -plaintext \ -import-path ./rpc \ -proto cc/arduino/cli/settings/v1/settings.proto \ -d '{"filePath": "/Users/a.kitta/dev/git/arduino-cli/my-cli-config.yaml"}' \ 127.0.0.1:50051 \ cc.arduino.cli.settings.v1.SettingsService.Write
network#proxy
, manual proxy is not set (it is 🐛)network#proxy
by reading the CLI config from the disk, manual proxy is not set (it is 🐛)Expected behavior
SettingsService#Merge
andSettingsService#Write
behaves deterministically independently how many daemon session I start.Arduino CLI version
0.34.0
Operating system
macOS
Operating system version
13.5
Additional context
Downstream ref: arduino/arduino-ide#2184
Issue checklist
The text was updated successfully, but these errors were encountered: