You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filter init args from defaults in rabbit_prelaunch_conf
This change fixes a case in the `config_SUITE` for `rabbitmq_mqtt`
which asserts that tuning mnesia environment values through
`RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS` takes precedence over the default
values set in `rabbit_prelaunch_conf:setup/1`.
Application environment specified through CLI flags is inserted when
the application is loaded and loading the application overwrites
any existing values. The test passes on the main branch because
the mnesia application is loaded after `rabbitmq_prelaunch` has
fully started and `rabbit_prelaunch_conf:setup/1` has run. On the
Khepri branch though, the khepri application is a dependency of
`rabbitmq_prelaunch` and khepri loads the mnesia application on startup
in `khepri_utils:init_list_of_modules_to_skip/0`. So the application
environment specified through the `-mnesia key value` CLI arguments
is inserted and then `rabbit_prelaunch_conf:setup/1` overwrites those
values.
To fix this, we filter the default application environment values
for ones that have already been set through init flags by looking
at `init:get_argument/1` for each application and filtering any keys
explicitly set on the CLI.
0 commit comments