solo-io / service-mesh-extensions

A public registry of all service mesh extensions and other content for the Service Mesh Hub.
Apache License 2.0
14 stars 6 forks source link

Potential import collision: import path should be "k8s.io/helm", not "github.com/helm/helm". #104

Open KateGo520 opened 4 years ago

KateGo520 commented 4 years ago

Background

The helm/helm has already renamed it’s import path from "github.com/helm/helm" to "k8s.io/helm". But solo-io/service-mesh-extensions still used the old path: https://github.com/solo-io/service-mesh-extensions/blob/master/go.mod#L12

github.com/helm/helm v2.13.1+incompatible 

When you use the old path "github.com/helm/helm" to import the helm/helm, it will be very easy to reintroduce helm/helm through the import statements "import k8s.io/helm" in the go source file of helm/helm.

https://github.com/helm/helm/blob/v2.13.1/pkg/chartutil/values_test.go#L31

package chartutil
import (
    …
    "k8s.io/helm/pkg/proto/hapi/chart"
    "k8s.io/helm/pkg/timeconv"
    "k8s.io/helm/pkg/version"
)
…

The "k8s.io/helm" and "github.com/helm/helm" are the same repos. This will work in isolation, bring about potential risks and problems.

So, why not get rid of the old import path "github.com/helm/helm", use "k8s.io/helm" instead.

Solution

Replace all the old import paths, change "github.com/helm/helm" to "k8s.io/helm". Where did you import it: https://github.com/solo-io/service-mesh-extensions/search?q=%22github.com%2Fhelm%2Fhelm%22&unscoped_q=%22github.com%2Fhelm%2Fhelm%22

KateGo520 commented 4 years ago

@rickducott @joekelley Could you help me review this issue? Thx :p

joekelley commented 4 years ago

Hi @KateGo520, thank you for your interest in Service Mesh Hub! This is a good point, we should be using the k8s import everywhere.

However, this repository is no longer maintained and should have been archived earlier this year. For the latest on Service Mesh Hub and how we envision users will manage and extend their service meshes, take a look at https://github.com/solo-io/service-mesh-hub and https://github.com/solo-io/wasme.