Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove vendor directory #739

Merged
merged 4 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
26 changes: 15 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ WEBHOOK_IMAGE_TAG?=$(IMAGE_REPO)/$(APP_NAME)-webhook:latest
MAIN_PKG=cmd/manager/main.go
export NAMESPACE?=openshift-sriov-network-operator
export WATCH_NAMESPACE?=openshift-sriov-network-operator
export GOFLAGS+=-mod=vendor
export HOME?=$(PWD)
export GOPATH?=$(shell go env GOPATH)
export GO111MODULE=on
PKGS=$(shell go list ./... | grep -v -E '/vendor/|/test|/examples')
TESTPKGS?=./...
Expand Down Expand Up @@ -162,12 +163,16 @@ GOMOCK = $(shell pwd)/bin/mockgen
gomock:
$(call go-install-tool,$(GOMOCK),github.com/golang/mock/[email protected])

GINKGO = $(BIN_DIR)/ginkgo
ginkgo:
$(call go-install-tool,$(GINKGO),github.com/onsi/ginkgo/v2/ginkgo)

# go-install-tool will 'go install' any package $2 and install it to $1.
define go-install-tool
@[ -f $(1) ] || { \
set -e ;\
echo "Downloading $(2)" ;\
GOBIN=$(BIN_DIR) go install -mod=mod $(2) ;\
GOBIN=$(BIN_DIR) go install $(2) ;\
}
endef

Expand All @@ -193,25 +198,25 @@ deploy-setup-k8s: export OPERATOR_EXEC=kubectl
deploy-setup-k8s: export CLUSTER_TYPE=kubernetes
deploy-setup-k8s: deploy-setup

test-e2e-conformance:
test-e2e-conformance: ginkgo
SUITE=./test/conformance ./hack/run-e2e-conformance.sh

test-e2e-conformance-virtual-k8s-cluster-ci:
test-e2e-conformance-virtual-k8s-cluster-ci: ginkgo
./hack/run-e2e-conformance-virtual-cluster.sh

test-e2e-conformance-virtual-k8s-cluster:
test-e2e-conformance-virtual-k8s-cluster: ginkgo
SKIP_DELETE=TRUE ./hack/run-e2e-conformance-virtual-cluster.sh

test-e2e-conformance-virtual-ocp-cluster-ci:
test-e2e-conformance-virtual-ocp-cluster-ci: ginkgo
./hack/run-e2e-conformance-virtual-ocp.sh

test-e2e-conformance-virtual-ocp-cluster:
test-e2e-conformance-virtual-ocp-cluster: ginkgo
SKIP_DELETE=TRUE ./hack/run-e2e-conformance-virtual-ocp.sh

redeploy-operator-virtual-cluster:
./hack/virtual-cluster-redeploy.sh

test-e2e-validation-only:
test-e2e-validation-only: ginkgo
SUITE=./test/validation ./hack/run-e2e-conformance.sh

test-e2e: generate manifests skopeo envtest
Expand Down Expand Up @@ -249,11 +254,10 @@ undeploy-k8s: export OPERATOR_EXEC=kubectl
undeploy-k8s: undeploy

deps-update:
go mod tidy && \
go mod vendor
go mod tidy

check-deps: deps-update
@set +e; git diff --quiet HEAD go.sum go.mod vendor; \
@set +e; git diff --quiet HEAD go.sum go.mod; \
if [ $$? -eq 1 ]; \
then echo -e "\ngo modules are out of date. Please commit after running 'make deps-update' command\n"; \
exit 1; fi
Expand Down
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ require (
github.com/vishvananda/netns v0.0.4
go.uber.org/zap v1.25.0
golang.org/x/time v0.3.0
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.28.3
k8s.io/apiextensions-apiserver v0.28.3
Expand Down Expand Up @@ -103,6 +104,8 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/k8snetworkplumbingwg/govdpa v0.1.4 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
Expand All @@ -124,6 +127,7 @@ require (
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/spf13/afero v1.9.4 // indirect
Expand Down
21 changes: 5 additions & 16 deletions hack/run-e2e-conformance.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
#!/bin/bash
set -x
which ginkgo
if [ $? -ne 0 ]; then
# we are moving to a temp folder as in go.mod we have a dependency that is not
# resolved if we are not using google's GOPROXY. That is not the case when building as
# we are using vendored dependencies
GINKGO_TMP_DIR=$(mktemp -d)
cd $GINKGO_TMP_DIR
go mod init tmp
go install -mod=readonly github.com/onsi/ginkgo/v2/[email protected]
rm -rf $GINKGO_TMP_DIR
echo "Downloading ginkgo tool"
cd -
fi

GOPATH="${GOPATH:-~/go}"
here="$(dirname "$(readlink --canonicalize "${BASH_SOURCE[0]}")")"
root="$(readlink --canonicalize "$here/..")"

GOPATH="${GOPATH:-$HOME/go}"
JUNIT_OUTPUT="${JUNIT_OUTPUT:-/tmp/artifacts}"
export PATH=$PATH:$GOPATH/bin

GOFLAGS=-mod=vendor ginkgo -output-dir=$JUNIT_OUTPUT --junit-report "unit_report.xml" -v "$SUITE" -- -report=$JUNIT_OUTPUT
${root}/bin/ginkgo -output-dir=$JUNIT_OUTPUT --junit-report "unit_report.xml" -v "$SUITE" -- -report=$JUNIT_OUTPUT
2 changes: 1 addition & 1 deletion hack/run-locally.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
EXCLUSIONS=(operator.yaml) hack/deploy-setup.sh ${NAMESPACE}
source hack/env.sh
go run -mod=vendor ./main.go
go run ./main.go
5 changes: 4 additions & 1 deletion hack/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
package tools

import _ "k8s.io/code-generator"
import (
_ "gopkg.in/check.v1"
_ "k8s.io/code-generator"
)
21 changes: 0 additions & 21 deletions vendor/github.com/Azure/go-ansiterm/LICENSE

This file was deleted.

12 changes: 0 additions & 12 deletions vendor/github.com/Azure/go-ansiterm/README.md

This file was deleted.

188 changes: 0 additions & 188 deletions vendor/github.com/Azure/go-ansiterm/constants.go

This file was deleted.

7 changes: 0 additions & 7 deletions vendor/github.com/Azure/go-ansiterm/context.go

This file was deleted.

Loading
Loading