From 86ebea5b96f0e77f65cb28c32dc7998a9e740a41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:35:54 +0000 Subject: [PATCH 1/2] build(deps): bump github.com/k0sproject/dig from 0.2.0 to 0.3.1 Bumps [github.com/k0sproject/dig](https://github.com/k0sproject/dig) from 0.2.0 to 0.3.1. - [Release notes](https://github.com/k0sproject/dig/releases) - [Commits](https://github.com/k0sproject/dig/compare/v0.2.0...v0.3.1) --- updated-dependencies: - dependency-name: github.com/k0sproject/dig dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9e5d85cd6ed4..f6c2a240702f 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/go-playground/validator/v10 v10.23.0 github.com/google/go-cmp v0.6.0 github.com/k0sproject/bootloose v0.9.0 - github.com/k0sproject/dig v0.2.0 + github.com/k0sproject/dig v0.3.1 github.com/k0sproject/version v0.6.0 github.com/kardianos/service v1.2.2 github.com/logrusorgru/aurora/v3 v3.0.0 diff --git a/go.sum b/go.sum index e9352b303c99..ff66bc91a99a 100644 --- a/go.sum +++ b/go.sum @@ -353,8 +353,8 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/k0sproject/bootloose v0.9.0 h1:Ae45gF0jfS7ND6z1EotWs4qWAwqTRahvET91Y2+GMwo= github.com/k0sproject/bootloose v0.9.0/go.mod h1:4NkBMQoJ5ZZCGNWjiiEBOxn4ciEo1mBQVOmCYYglGmM= -github.com/k0sproject/dig v0.2.0 h1:cNxEIl96g9kqSMfPSZLhpnZ0P8bWXKv08nxvsMHop5w= -github.com/k0sproject/dig v0.2.0/go.mod h1:rBcqaQlJpcKdt2x/OE/lPvhGU50u/e95CSm5g/r4s78= +github.com/k0sproject/dig v0.3.1 h1:/QK40lXQ/HEE3LMT3r/kST1ANhMVZiajNDXI+spbL9o= +github.com/k0sproject/dig v0.3.1/go.mod h1:rlZ7N7ZEcB4Fi96TPXkZ4dqyAiDWOGLapyL9YpZ7Qz4= github.com/k0sproject/version v0.6.0 h1:Wi8wu9j+H36+okIQA47o/YHbzNpKeIYj8IjGdJOdqsI= github.com/k0sproject/version v0.6.0/go.mod h1:5/7Js62gDCLBP6mEs0mUcYEEkYneM5qXDKN/hyFlQTM= github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX60= From 450b5b21842794a712dfcc6e191b89eb81ee68f1 Mon Sep 17 00:00:00 2001 From: Kimmo Lehto Date: Wed, 13 Nov 2024 13:45:06 +0200 Subject: [PATCH 2/2] Manual fix to test for using k0sproject/dig v0.3.1 Signed-off-by: Kimmo Lehto --- pkg/component/controller/kuberouter_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/component/controller/kuberouter_test.go b/pkg/component/controller/kuberouter_test.go index e6e6e62030e0..7a9bceed6fb0 100644 --- a/pkg/component/controller/kuberouter_test.go +++ b/pkg/component/controller/kuberouter_test.go @@ -253,8 +253,8 @@ func getKubeRouterPlugin(cm corev1.ConfigMap, pluginType string) (dig.Mapping, e return data, errors.New("failed to dig plugins") } for _, p := range plugins { - plugin := dig.Mapping(p.(map[string]interface{})) - if plugin.DigString("type") == pluginType { + plugin, ok := p.(dig.Mapping) + if ok && plugin.DigString("type") == pluginType { return plugin, nil } }