-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(deps): upgrade github.com/spf13/viper to v1.20.1 #3064
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
Conversation
ae1fbd3
to
1301dd6
Compare
@tuunit Rebased. |
0e17dae
to
47e9993
Compare
The remaining test failure is due to a behaviour change between go1.23 and go1.24: this cause a little difference in error output for embedded structs. Here is the field for which the issue is triggered: oauth2-proxy/pkg/apis/options/load_test.go Line 366 in 1225d61
The change required to make the test pass on Go 1.24 (but triggers failure on 1.23): deccea8#diff-e0441f424d3ef336366a50166b308954ebd83d417448de015ae4243f1aab8387R474 I suppose that the go1.24 change comes from CL 606956. @tuunit Any suggestion on how to handle this? |
See also #2628 which was started long ago but got recent commits related to mapstructure. |
@dolmen lets use this PR to upgrade to go1.24 as well. As it now has been out a couple months and has seen its third patch. We should be able to upgrade to go1.24 without unexpected issues. |
We could instead just disable go 1.23 in CI. |
Note that this upgrade also implied to upgrade github.com/mitchellh/mapstructure (nowadays unmaintained: https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc) to github.com/go-viper/mapstructure/v2.
Add a compile guard for Go < 1.24 for the pkg/apis/options/load_test.go because the LoadYAML test depends on error messages produced by encoding/json that changed slightly (names of embedded structs are now reported). As we updated the test for go1.24, the test now fails on 1.23, but just for a slight difference, so we disable the test there.
2557550
to
4b4b540
Compare
Replaced by #3116 I added you as a Co-Author |
Prerequisite: fix CI to run also on Go 1.24. See #3080.
Description
Upgrade module
github.com/spf13/viper
to v1.20.1Note that this upgrade also implied to upgrade github.com/mitchellh/mapstructure (nowadays unmaintained: see https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc) to
github.com/go-viper/mapstructure/v2
.Motivation and Context
Dependency cleanup.
Module github.com/mitchellh/mapstructure is nowadays unmaintained. See https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc
How Has This Been Tested?
Checklist: