Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

dcgm-exporter unit test depends on k8s.io/kubernetes directly as a library #172

Open
shatil opened this issue Mar 30, 2021 · 0 comments
Open

Comments

@shatil
Copy link

shatil commented Mar 30, 2021

As of tag 2.2.0, this test dependency in pkg:

% git grep k8s.io/kubernetes/pkg/kubelet/util
kubernetes_test.go:     "k8s.io/kubernetes/pkg/kubelet/util"

Breaks go mod:

% go mod why
go: finding module for package github.com/NVIDIA/gpu-monitoring-tools/bindings/go/nvml/nvsmi
go: finding module for package k8s.io/kubernetes/pkg/kubelet/apis/podresources/v1alpha1
go: finding module for package k8s.io/kubernetes/pkg/kubelet/util
go: found k8s.io/kubernetes/pkg/kubelet/util in k8s.io/kubernetes v1.20.5
go: found github.com/NVIDIA/gpu-monitoring-tools/bindings/go/nvml/nvsmi in github.com/NVIDIA/gpu-monitoring-tools v0.0.0-20210325210537-29b4f1784f18
go: k8s.io/kubernetes@v1.20.5 requires
	k8s.io/api@v0.0.0: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0

We're not supposed to reference k8s.io/kubernetes directly: https://pkg.go.dev/k8s.io/kubernetes

To use Kubernetes code as a library in other applications, see the list of published components. Use of the k8s.io/kubernetes module or k8s.io/kubernetes/... packages as libraries is not supported.

Related:

@shatil shatil changed the title pkg depends on k8s.io/kubernetes directly as a library dcgm-exporter unit test depends on k8s.io/kubernetes directly as a library Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant