Skip to content

Commit ee40683

Browse files
authored
Merge pull request #739 from tobiasgiese/remove-vendor
chore: remove vendor directory
2 parents 73fbca2 + 25585da commit ee40683

File tree

7,953 files changed

+29
-2219736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,953 files changed

+29
-2219736
lines changed

Makefile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ WEBHOOK_IMAGE_TAG?=$(IMAGE_REPO)/$(APP_NAME)-webhook:latest
2727
MAIN_PKG=cmd/manager/main.go
2828
export NAMESPACE?=openshift-sriov-network-operator
2929
export WATCH_NAMESPACE?=openshift-sriov-network-operator
30-
export GOFLAGS+=-mod=vendor
30+
export HOME?=$(PWD)
31+
export GOPATH?=$(shell go env GOPATH)
3132
export GO111MODULE=on
3233
PKGS=$(shell go list ./... | grep -v -E '/vendor/|/test|/examples')
3334
TESTPKGS?=./...
@@ -162,12 +163,16 @@ GOMOCK = $(shell pwd)/bin/mockgen
162163
gomock:
163164
$(call go-install-tool,$(GOMOCK),github.com/golang/mock/[email protected])
164165

166+
GINKGO = $(BIN_DIR)/ginkgo
167+
ginkgo:
168+
$(call go-install-tool,$(GINKGO),github.com/onsi/ginkgo/v2/ginkgo)
169+
165170
# go-install-tool will 'go install' any package $2 and install it to $1.
166171
define go-install-tool
167172
@[ -f $(1) ] || { \
168173
set -e ;\
169174
echo "Downloading $(2)" ;\
170-
GOBIN=$(BIN_DIR) go install -mod=mod $(2) ;\
175+
GOBIN=$(BIN_DIR) go install $(2) ;\
171176
}
172177
endef
173178

@@ -193,25 +198,25 @@ deploy-setup-k8s: export OPERATOR_EXEC=kubectl
193198
deploy-setup-k8s: export CLUSTER_TYPE=kubernetes
194199
deploy-setup-k8s: deploy-setup
195200

196-
test-e2e-conformance:
201+
test-e2e-conformance: ginkgo
197202
SUITE=./test/conformance ./hack/run-e2e-conformance.sh
198203

199-
test-e2e-conformance-virtual-k8s-cluster-ci:
204+
test-e2e-conformance-virtual-k8s-cluster-ci: ginkgo
200205
./hack/run-e2e-conformance-virtual-cluster.sh
201206

202-
test-e2e-conformance-virtual-k8s-cluster:
207+
test-e2e-conformance-virtual-k8s-cluster: ginkgo
203208
SKIP_DELETE=TRUE ./hack/run-e2e-conformance-virtual-cluster.sh
204209

205-
test-e2e-conformance-virtual-ocp-cluster-ci:
210+
test-e2e-conformance-virtual-ocp-cluster-ci: ginkgo
206211
./hack/run-e2e-conformance-virtual-ocp.sh
207212

208-
test-e2e-conformance-virtual-ocp-cluster:
213+
test-e2e-conformance-virtual-ocp-cluster: ginkgo
209214
SKIP_DELETE=TRUE ./hack/run-e2e-conformance-virtual-ocp.sh
210215

211216
redeploy-operator-virtual-cluster:
212217
./hack/virtual-cluster-redeploy.sh
213218

214-
test-e2e-validation-only:
219+
test-e2e-validation-only: ginkgo
215220
SUITE=./test/validation ./hack/run-e2e-conformance.sh
216221

217222
test-e2e: generate manifests skopeo envtest
@@ -249,11 +254,10 @@ undeploy-k8s: export OPERATOR_EXEC=kubectl
249254
undeploy-k8s: undeploy
250255

251256
deps-update:
252-
go mod tidy && \
253-
go mod vendor
257+
go mod tidy
254258

255259
check-deps: deps-update
256-
@set +e; git diff --quiet HEAD go.sum go.mod vendor; \
260+
@set +e; git diff --quiet HEAD go.sum go.mod; \
257261
if [ $$? -eq 1 ]; \
258262
then echo -e "\ngo modules are out of date. Please commit after running 'make deps-update' command\n"; \
259263
exit 1; fi

go.mod

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ require (
3535
github.com/vishvananda/netns v0.0.4
3636
go.uber.org/zap v1.25.0
3737
golang.org/x/time v0.3.0
38+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
3839
gopkg.in/yaml.v3 v3.0.1
3940
k8s.io/api v0.28.3
4041
k8s.io/apiextensions-apiserver v0.28.3
@@ -103,6 +104,8 @@ require (
103104
github.com/josharian/intern v1.0.0 // indirect
104105
github.com/json-iterator/go v1.1.12 // indirect
105106
github.com/k8snetworkplumbingwg/govdpa v0.1.4 // indirect
107+
github.com/kr/pretty v0.3.1 // indirect
108+
github.com/kr/text v0.2.0 // indirect
106109
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
107110
github.com/mailru/easyjson v0.7.7 // indirect
108111
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
@@ -124,6 +127,7 @@ require (
124127
github.com/prometheus/common v0.45.0 // indirect
125128
github.com/prometheus/procfs v0.12.0 // indirect
126129
github.com/robfig/cron v1.2.0 // indirect
130+
github.com/rogpeppe/go-internal v1.10.0 // indirect
127131
github.com/russross/blackfriday/v2 v2.1.0 // indirect
128132
github.com/shopspring/decimal v1.2.0 // indirect
129133
github.com/spf13/afero v1.9.4 // indirect

hack/run-e2e-conformance.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#!/bin/bash
2-
set -x
3-
which ginkgo
4-
if [ $? -ne 0 ]; then
5-
# we are moving to a temp folder as in go.mod we have a dependency that is not
6-
# resolved if we are not using google's GOPROXY. That is not the case when building as
7-
# we are using vendored dependencies
8-
GINKGO_TMP_DIR=$(mktemp -d)
9-
cd $GINKGO_TMP_DIR
10-
go mod init tmp
11-
go install -mod=readonly github.com/onsi/ginkgo/v2/[email protected]
12-
rm -rf $GINKGO_TMP_DIR
13-
echo "Downloading ginkgo tool"
14-
cd -
15-
fi
162

17-
GOPATH="${GOPATH:-~/go}"
3+
here="$(dirname "$(readlink --canonicalize "${BASH_SOURCE[0]}")")"
4+
root="$(readlink --canonicalize "$here/..")"
5+
6+
GOPATH="${GOPATH:-$HOME/go}"
187
JUNIT_OUTPUT="${JUNIT_OUTPUT:-/tmp/artifacts}"
198
export PATH=$PATH:$GOPATH/bin
209

21-
GOFLAGS=-mod=vendor ginkgo -output-dir=$JUNIT_OUTPUT --junit-report "unit_report.xml" -v "$SUITE" -- -report=$JUNIT_OUTPUT
10+
${root}/bin/ginkgo -output-dir=$JUNIT_OUTPUT --junit-report "unit_report.xml" -v "$SUITE" -- -report=$JUNIT_OUTPUT

hack/run-locally.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
EXCLUSIONS=(operator.yaml) hack/deploy-setup.sh ${NAMESPACE}
33
source hack/env.sh
4-
go run -mod=vendor ./main.go
4+
go run ./main.go

hack/tools.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
55
package tools
66

7-
import _ "k8s.io/code-generator"
7+
import (
8+
_ "gopkg.in/check.v1"
9+
_ "k8s.io/code-generator"
10+
)

vendor/github.com/Azure/go-ansiterm/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

vendor/github.com/Azure/go-ansiterm/README.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

vendor/github.com/Azure/go-ansiterm/constants.go

Lines changed: 0 additions & 188 deletions
This file was deleted.

vendor/github.com/Azure/go-ansiterm/context.go

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)