-
-
Notifications
You must be signed in to change notification settings - Fork 403
Split daemon mode configs from core configs #1622
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
Split daemon mode configs from core configs #1622
Conversation
925cf83
to
47a2fff
Compare
This PR also adds the possibility to customize the IP used in |
0eab1ba
to
d1e4956
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. Maybe it's worth opening a feature branch?
d1e4956
to
23fa167
Compare
Co-authored-by: per1234 <[email protected]>
@per1234 docs updated. Thanks for the great suggestions. 👍 |
Co-authored-by: per1234 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Silvano!
My only remaining concern is whether the [breaking]
prefix should be added to the PR/commit title as specified in the contributor guide:
https://arduino.github.io/arduino-cli/dev/CONTRIBUTING/#breaking
@per1234 I added it after merging, in any case for the time being this lives on a feature branch. |
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)This PR reworks how
daemon
settings are handled.Currently the settings used by the Arduino CLI when running in
daemon
or command line mode are shared and stored in the same file, usually~/.arduino15/arduino-cli.yaml
depending on the OS.This causes some problems since it's not possible to use a single
daemon
process for multiple users with different settings because they are shared for all the internal instances. Thedaemon
mode settings are strictly tied to the command line mode settings in other terms.The
daemon.*
settings have been removed from the config read by thearduino-cli
when running in command line mode.The
arduino-cli daemon
now doesn't read the same config file as the other commands, the--config-file
flag is stillpresent but reads a file with the following keys:
ip
: IP used to listen for gRPC connectionsport
: Port used listen for gRPC connectionsdaemonize
: True to run daemon process in backgrounddebug
: True to enable debug logging of gRPC callsdebug-filter
: List of gRPC calls to log when in debug modeverbose
: True to print logs in stdoutformat
: Stdout output formatno-color
: True to disable color output to stdout and stderrlog-level
: Messages with this level and above will be loggedlog-file
: Path to the file where logs will be writtenlog-format
: Output format for the logsThe format of the file can be
yaml
,json
,hcl
,toml
orini
. An exampledaemon-config.yaml
file could looklike this:
All the settings in the config file can be override with the following flags:
--ip
--port
--daemonize
--debug
--debug-filter
--verbose
,-v
--format
--no-color
--log-level
--log-file
--log-format
None of those settings will be read from the default
arduino-cli.yaml
file stored in the.arduino15
orArduino15
folder anymore when running the
arduino-cli daemon
command.Those that start the
daemon
process will be tasked to manage the config file used by it.titled accordingly?
Yes.
This is the first PR of a series of breaking changes to enhance how the configs are handled internally by the
arduino-cli
.This PR breaks the handling of configs when running the
arduino-cli
indaemon
mode since we're changing the behaviour of the--config-file
flag for that command.This will be fixed in a subsequent PR that move the internal storaging of configs from a global variable to the
CoreInstance
struct.This PR closes #1620.
See how to contribute