Environment variables that are JSON values are not displayed as defined in Admin > Settings #18864
Labels
Administration/Settings
Operation/Environment variables
Priority:P2
Average run of the mill bug
Type:Bug
Product defects
Describe the bug
When setting environment variables, which are JSON blobs, then it's correct applied, but the interface shows Metabase defaults instead, which can lead to confusion about which settings are applied. And the input fields are not locked, which makes it even more difficult to understand that the value comes from envvars.
Applies to
MB_APPLICATION_COLORS
,MB_CUSTOM_FORMATTING
,MB_JWT_GROUP_MAPPINGS
,MB_LDAP_GROUP_MAPPINGS
andMB_SAML_GROUP_MAPPINGS
And likely
MB_CUSTOM_GEOJSON
too, but it has it's own problems #18862Workaround: Set it directly in the application database table
setting
or set it via the API with key, eg.custom-formatting
, with value, eg.{"type/Currency":{"currency":"DKK"}}
https://github.com/metabase/metabase/blob/master/docs/api-documentation.md#put-apisettingkey
To Reproduce
java -DMB_APPLICATION_COLORS='{"brand":"#ff0080"}' -DMB_CUSTOM_FORMATTING='{"type/Temporal":{"date_style":"YYYY/M/D","time_style":"HH:mm"},"type/Number":{"number_separators":",."},"type/Currency":{"currency":"DKK"}}' -jar metabase.jar
Expected behavior
The input fields should be locked, similar to defining other non-JSON-blob envvars like
MB_SITE_NAME
, so it's clear that it cannot be modified within Metabase.Information about your Metabase Installation:
Tested 1.41.1 (versions pre-40.0 would not error, but would not apply the envvar, when there was keys in
setting
table)Additional context
Related to #13166 and #14790
The text was updated successfully, but these errors were encountered: