#Unused Configuration Value prevents startup

1 messages · Page 1 of 1 (latest)

lone warren
#

Can someone help me understand why its beneficial for the application to fail startup if theres an unused variable name? Is this configurable to make it Warn instead of prevent startup?

clear seal
#

This is by design. You can assign a default value to configurable variable to prevent failure at startup.

wicked sky
#

What about environmental variables?

If we create an environmental variable BAL_CONFIG_VAR_TEST but don’t use it for now, the application shows an error during startup

lone warren
#

Hmm. We do have defaults to our 3 vars. The bal build works fine, we know the variables are injected into helm chart at deployment time, but then when the service tried to start in k8s, we get
error: [BAL_CONFIG_VAR_varName] unused environment variable variable.

buoyant granite
#

Looping in @signal fable

signal fable
#

This is a feature by design, as the failure helps to identify the invalid configurations such as typos. When starting the program we ensure all the provided configurations are read by the program despite the default values.
https://github.com/ballerina-platform/ballerina-spec/issues/980

GitHub

Description: The configurable feature provides toml file validations to find any unused values (Eg. : values that don't match with the available configurable variables.) in the configuration fi...