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
I was looking at this code as an example for how to load the custom config, and noticed that this just doesn't seem right. It needs to be checked further.
Mostly around why it is loading the aliasesConfigKey
Agreed this incorrect. But it is still working for most part because the passed in key is only used to checking for existence in Consul. It uses the passed in struct to un-marshal the TOML. What we'll see is it always pushes config to Consul, which I just confirmed.
level=INFO ts=2022-06-21T19:26:02.7648941Z app=app-rfid-llrp-inventory source=config.go:229 msg="Checking if custom configuration ('Aliases') exists in Configuration Provider"
level=INFO ts=2022-06-21T19:26:02.7708223Z app=app-rfid-llrp-inventory source=config.go:391 msg="Loaded custom configuration from ./res/configuration.toml"
level=INFO ts=2022-06-21T19:26:02.8095057Z app=app-rfid-llrp-inventory source=config.go:270 msg="Custom Config loaded from file and pushed to Configuration Provider "
The result of this is any changes made to existing custom setting in Consul will be overwritten when the service restarts, :-(
But since Aliases is empty in the TOML file, they don't get overridden. Just the values in [AppCustom.AppSettings]
I was looking at this code as an example for how to load the custom config, and noticed that this just doesn't seem right. It needs to be checked further.
Mostly around why it is loading the
aliasesConfigKey
app-rfid-llrp-inventory/internal/inventory/app/app.go
Lines 81 to 91 in 993cf3e
The text was updated successfully, but these errors were encountered: