airflow-on-k8s-operator
airflow-on-k8s-operator copied to clipboard
Potential import collision: import path should be "sigs.k8s.io/application", not "github.com/kubernetes-sigs/application".
Background
The application
has already renamed it’s import path from "github.com/kubernetes-sigs/application" to "sigs.k8s.io/application" in version v0.8.1.
But apache/airflow-on-k8s-operator
still used the old path:
https://github.com/apache/airflow-on-k8s-operator/blob/master/go.mod#L8
github.com/kubernetes-sigs/application v0.8.1
When you use the old path "github.com/kubernetes-sigs/application" to import the application
, it will be very easy to reintroduce application
through the import statements "import sigs.k8s.io/application" in the go source file of application
.
https://github.com/kubernetes-sigs/application/blob/v0.8.1/controllers/application_controller.go#L24
package controllers
import (
…
appv1beta1 "sigs.k8s.io/application/api/v1beta1"
)
…
The "sigs.k8s.io/application" and "github.com/kubernetes-sigs/application" 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/kubernetes-sigs/application", use "sigs.k8s.io/application" instead.
Solution
Replace all the old import paths, change "github.com/kubernetes-sigs/application"
to "sigs.k8s.io/application"
.
Where did you import it: https://github.com/apache/airflow-on-k8s-operator/search?q=kubernetes-sigs%2Fapplication&unscoped_q=kubernetes-sigs%2Fapplication
@turbaszek @barney-s Could you help me review this issue? Thx :p