-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Should CLI tool wrapper scripts enforce locale env variables expected by Elixir? #1573
Comments
Filed it here and not in https://github.com/rabbitmq/rabbitmq-cli because the wrappers are in this repo at the moment. |
Sorry, what I meant is (in terms of it being drastic), is just concern about causing an unintended consequence to the user when we start mucking around with default env in modules. For Puppet, at least, it should be only in the calls related to the module, but still I worried that it could cause unpredictable behavior (not to mention the political issue of what specific locale would be the default). Either way, it's good to have confirmation that setting it to en_US.UTF-8 shouldn't cause an issue -- I didn't know whether users could create resources for which this might cause a problem in certain corner cases. |
We understand that there will be tension about whether this is a good idea and what default should be used. IIRC this is exactly why we didn't do it before. Requiring every user to configure locale settings would also suck. FWIW our CLI tools are currently not localised and it's unlikely to change in the medium term, so there's less potential for breakage. |
@gerhard might have an opinion on this :) |
Forcing the locale to IMHO, the caller (whether it is an interactive shell session or a configuration management tool) is responsible for setting an appropriate locale because only it knows about the environment/session. Another minor issue would be that the forced locale is unavailable. But Erlang/Elixir may not call
If Elixir does that at some point, we are back to square 1. |
Closing in favor of rabbitmq/rabbitmq-website#512. We'll update the Chef cookbook as well. Thank you for bringing this up, @wyardley. |
Thank you for the ping @michaelklishin, great resolution, fully agree with @dumbbell |
in CLI, Debian, RPM, generic UNIX guides References rabbitmq/rabbitmq-server#1573
See #1572 and elixir-lang/elixir#3548.
TL;DR: Elixir unconditionally emits a warning (as of elixir-lang/elixir@3ec0d20) when running in an environment where locale variables are set to a non-UTF-8 value. The warning can trip up tools such as Puppet that parse CLI tool output (we will not debate whether that's a good idea here).
While I don't buy into the argument that
we can easily force it in a way that Elixir requires in our wrapper scripts.
@dumbbell @hairyhum I recall we had this discussion before but the conclusion was never explicitly stated publicly.
Should we force locale/language variables for CLI tool invocations or does the potential downsides outweigh the gains for provisioning tools that have to parse CLI output?
Since we don't localise CLI tool output, I can't think of any potential confusing/breaking behaviour.
The text was updated successfully, but these errors were encountered: