Skip to content

Commit

Permalink
Create symbolic link on the client-go package to avoid duplication
Browse files Browse the repository at this point in the history
This commit will replace duplication of the client-go module under
the vendor on the symbolic link.

The replacement will take place each time after dependencies update.
  • Loading branch information
Artyom Lukianov committed Jun 19, 2019
1 parent db76f4a commit 4e1ed56
Show file tree
Hide file tree
Showing 137 changed files with 301 additions and 16,275 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ distclean: clean
rm -rf vendor/

deps-update:
SYNC_VENDOR=true hack/dockerized "GO111MODULE=on go mod tidy && GO111MODULE=on go mod vendor && ./hack/bazel-generate.sh"
SYNC_VENDOR=true hack/dockerized "GO111MODULE=on go mod tidy && GO111MODULE=on go mod vendor && ./hack/dep-prune.sh && ./hack/bazel-generate.sh"

check:
hack/dockerized "./hack/check.sh"
Expand Down
4 changes: 2 additions & 2 deletions cmd/example-cloudinit-hook-sidecar/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ go_library(
"//pkg/hooks:go_default_library",
"//pkg/hooks/info:go_default_library",
"//pkg/hooks/v1alpha2:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"@org_golang_google_grpc//:go_default_library",
],
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/example-hook-sidecar/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ go_library(
"//pkg/hooks/v1alpha1:go_default_library",
"//pkg/hooks/v1alpha2:go_default_library",
"//pkg/virt-launcher/virtwrap/api:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"@org_golang_google_grpc//:go_default_library",
],
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/subresource-access-test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ go_library(
importpath = "kubevirt.io/kubevirt/cmd/subresource-access-test",
visibility = ["//visibility:private"],
deps = [
"//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
"//vendor/k8s.io/client-go/rest:go_default_library",
"//vendor/kubevirt.io/client-go/kubecli:go_default_library",
],
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/virt-api/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ go_library(
"//pkg/monitoring/workqueue/prometheus:go_default_library",
"//pkg/service:go_default_library",
"//pkg/virt-api:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
],
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/virt-handler/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ go_library(
"//pkg/virt-handler/cache:go_default_library",
"//pkg/virt-launcher:go_default_library",
"//pkg/virt-launcher/virtwrap/api:go_default_library",
"//vendor/github.com/golang/glog:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
Expand All @@ -33,9 +35,7 @@ go_library(
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
"//vendor/k8s.io/client-go/tools/record:go_default_library",
"//vendor/k8s.io/client-go/util/cert:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/kubecli:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"@com_github_golang_glog//:go_default_library",
],
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/virt-launcher/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ go_library(
"//pkg/virt-launcher/virtwrap/cmd-server:go_default_library",
"//pkg/virt-launcher/virtwrap/util:go_default_library",
"//pkg/watchdog:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/libvirt/libvirt-go:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)

Expand Down
7 changes: 6 additions & 1 deletion hack/dep-prune.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env bash
for file in $(find vendor/ -name "*_test.go"); do rm ${file}; done

rm -rf vendor/github.com/golang/glog
mkdir -p vendor/github.com/golang/
ln -s ../../../pkg/staging/glog/ vendor/github.com/golang/glog

# create symbolic link on client-go package to avoid duplication
rm -rf vendor/kubevirt.io/client-go
mkdir -p vendor/kubevirt.io
ln -s ../../staging/src/kubevirt.io/client-go/ vendor/kubevirt.io/client-go
2 changes: 1 addition & 1 deletion pkg/certificates/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)
16 changes: 8 additions & 8 deletions pkg/cloud-init/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ go_library(
deps = [
"//pkg/ephemeral-disk-utils:go_default_library",
"//pkg/util/net/dns:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//staging/src/kubevirt.io/client-go/precond:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/kubecli:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"//vendor/kubevirt.io/client-go/precond:go_default_library",
],
)

Expand All @@ -25,15 +25,15 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//staging/src/kubevirt.io/client-go/precond:go_default_library",
"//vendor/github.com/golang/mock/gomock:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/fake:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/kubecli:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"//vendor/kubevirt.io/client-go/precond:go_default_library",
],
)
6 changes: 3 additions & 3 deletions pkg/config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ go_library(
],
importpath = "kubevirt.io/kubevirt/pkg/config",
visibility = ["//visibility:public"],
deps = ["//vendor/kubevirt.io/client-go/api/v1:go_default_library"],
deps = ["//staging/src/kubevirt.io/client-go/api/v1:go_default_library"],
)

go_test(
Expand All @@ -24,10 +24,10 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)
8 changes: 4 additions & 4 deletions pkg/container-disk/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/ephemeral-disk-utils:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/precond:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/precond:go_default_library",
],
)

Expand All @@ -22,11 +22,11 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)
12 changes: 6 additions & 6 deletions pkg/controller/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/testutils:go_default_library",
"//vendor/github.com/golang/glog:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/openshift/api/security/v1:go_default_library",
"//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library",
"//vendor/k8s.io/api/apps/v1:go_default_library",
Expand All @@ -39,11 +41,9 @@ go_library(
"//vendor/k8s.io/client-go/rest:go_default_library",
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
"//vendor/k8s.io/client-go/util/workqueue:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/kubecli:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library",
"//vendor/kubevirt.io/containerized-data-importer/pkg/client/informers/externalversions:go_default_library",
"@com_github_golang_glog//:go_default_library",
],
)

Expand All @@ -56,6 +56,8 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
Expand All @@ -68,8 +70,6 @@ go_test(
"//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library",
],
)
6 changes: 3 additions & 3 deletions pkg/emptydisk/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go_library(
srcs = ["emptydisk.go"],
importpath = "kubevirt.io/kubevirt/pkg/emptydisk",
visibility = ["//visibility:public"],
deps = ["//vendor/kubevirt.io/client-go/api/v1:go_default_library"],
deps = ["//staging/src/kubevirt.io/client-go/api/v1:go_default_library"],
)

go_test(
Expand All @@ -16,10 +16,10 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)
4 changes: 2 additions & 2 deletions pkg/ephemeral-disk-utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go_library(
importpath = "kubevirt.io/kubevirt/pkg/ephemeral-disk-utils",
visibility = ["//visibility:public"],
deps = [
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
],
)
6 changes: 3 additions & 3 deletions pkg/ephemeral-disk/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/ephemeral-disk-utils:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
],
)

Expand All @@ -19,10 +19,10 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)
2 changes: 1 addition & 1 deletion pkg/healthz/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ go_library(
importpath = "kubevirt.io/kubevirt/pkg/healthz",
visibility = ["//visibility:public"],
deps = [
"//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
"//vendor/github.com/emicklei/go-restful:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library",
"//vendor/kubevirt.io/client-go/kubecli:go_default_library",
],
)
8 changes: 4 additions & 4 deletions pkg/hooks/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ go_library(
"//pkg/hooks/v1alpha2:go_default_library",
"//pkg/util/net/grpc:go_default_library",
"//pkg/virt-launcher/virtwrap/api:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)

Expand All @@ -29,10 +29,10 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)
12 changes: 6 additions & 6 deletions pkg/host-disk/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/util/types:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/kubecli:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)

Expand All @@ -22,6 +22,9 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/golang/mock/gomock:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library",
Expand All @@ -30,8 +33,5 @@ go_test(
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/fake:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/kubecli:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)
10 changes: 5 additions & 5 deletions pkg/ignition/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/ephemeral-disk-utils:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
"//vendor/kubevirt.io/client-go/precond:go_default_library",
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//staging/src/kubevirt.io/client-go/precond:go_default_library",
],
)

Expand All @@ -21,9 +21,9 @@ go_test(
],
embed = [":go_default_library"],
deps = [
"//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
"//staging/src/kubevirt.io/client-go/log:go_default_library",
"//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/kubevirt.io/client-go/api/v1:go_default_library",
"//vendor/kubevirt.io/client-go/log:go_default_library",
],
)
Loading

0 comments on commit 4e1ed56

Please sign in to comment.