An analytics capture agent for lotus daemon which is forked from Telegraf (https://github.com/influxdata/telegraf) to support custom input/output plugins.
MIT License
6
stars
4
forks
source link
Potential import collision: import path should be "k8s.io/apimachinery", not "github.com/kubernetes/apimachinery" #17
That’s because the apimachinery has already renamed it’s import path from "github.com/kubernetes/apimachinery" to "k8s.io/apimachinery",in this version. When you use the old path "github.com/kubernetes/apimachinery" to import the apimachinery, will reintroduces apimachinery through the import statements "import k8s.io/apimachinery" in the go source file of apimachinery.
"k8s.io/apimachinery" and "github.com/kubernetes/apimachinery" are the same repos. This will work in isolation, bring about potential risks and problems.
Solution
Replace all the old import paths, change "github.com/kubernetes/apimachinery" to "k8s.io/apimachinery".
Background
I find that
k8s.io/apimachinery
andgithub.com/kubernetes/apimachinery
coexist in this repo: https://github.com/filecoin-shipyard/telegraf-lotus/blob/master/go.mod (Line 81 & 139)That’s because the
apimachinery
has already renamed it’s import path from "github.com/kubernetes/apimachinery" to "k8s.io/apimachinery",in this version. When you use the old path "github.com/kubernetes/apimachinery" to import theapimachinery
, will reintroducesapimachinery
through the import statements "import k8s.io/apimachinery" in the go source file ofapimachinery
.https://github.com/kubernetes/apimachinery/blob/d41becfba9ee9bf8e55cec1dd3934cd7cfc04b99/pkg/api/resource/quantity_example_test.go
"k8s.io/apimachinery" and "github.com/kubernetes/apimachinery" are the same repos. This will work in isolation, bring about potential risks and problems.
Solution
Replace all the old import paths, change
"github.com/kubernetes/apimachinery"
to"k8s.io/apimachinery"
.Where did you import it: https://github.com/filecoin-shipyard/telegraf-lotus/search?q=kubernetes%2Fapimachinery&unscoped_q=kubernetes%2Fapimachinery