Open Sovietaced opened 2 weeks ago
Thank you for opening your first issue here! 🛠
This appears to be related to some custom decoding which turns slices into maps: https://github.com/flyteorg/flyte/blob/master/flytestdlib/config/viper/viper.go#L177-L203
Fixing this includes all the key/values but unfortunately the keys are lowercased.
Instead of dumping more time into this I ended up just forcing the old version of viper.
replace github.com/spf13/viper v1.18.2 => github.com/spf13/viper v1.11.0
Describe the bug
My custom Flyte plugin has a depenency that pulls in a more recent version of viper v1.11.0 -> v1.18.2 and this appears to break config loading since flyteplugins
config_load_test
fails. I realize that this is not a present bug but I figured I would open this up in case anyone has an issue and in the event that Flyte eventually updates viper to a more recent version.It appears that the latest entry in defined in a YAML map will be the only entry in the map that is parsed. For example:
It appears the error happens in decoding the custom config into the root config. From what I've seen there is a different in the typing of the configuration that is parsed by viper. Notably, map entries used to be parsed as
map[interface{}]interface{}
and are now parsed asmap[string]interface{}
. The code is bit hair but I figured I'd file a ticket before I dig deeper here.Expected behavior
I would expect config loading to work correctly and unit tests to pass.
Additional context to reproduce
go get github.com/spf13/viper@v1.18.2
proceed to run unit tests in
flyteplugins
Screenshots
v1.11.0
v.1.18.2
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?