-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] New versions of viper breaks config loading #5469
Comments
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.
|
Hi @Sovietaced, I can't reproduce the issue just after upgrading the viper version. Is there any other package had been changed? go version: |
Here is my diff, which fails: 75e8170 I'm curious to see what you did.. |
I just run the Then this is the diff after upgrading the viper: Terryhung@6a440cb. I found the viper version in your diff is: |
I did 1.18.2 as well. The issue is you're updating the global go mod but flyteplugins has its own go mod, and that's where the failing unit test is. |
@Sovietaced After reviewing the code in viper, I found that it case insensitive problem can't be fix in flyte. The code in viper. Moreover, viper already has an old issue.... |
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/[email protected]
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?
The text was updated successfully, but these errors were encountered: