From 0f131a77a650421cf8672badfcc39c9a64e7d47f Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Tue, 20 Apr 2021 13:05:02 -0700 Subject: [PATCH] chore: make codegen more consistent across environments (#1095) Signed-off-by: Jesse Suen --- .github/workflows/go.yml | 1 + Makefile | 142 +++++++++++++++++-------------- docs/CONTRIBUTING.md | 38 ++++----- go.mod | 5 +- go.sum | 31 ------- hack/install-codegen-go-tools.sh | 9 -- hack/tools.go | 12 +-- hack/update-codegen.sh | 5 -- hack/update-mocks.sh | 8 +- hack/update-openapigen.sh | 20 ----- tools.go | 14 --- 11 files changed, 102 insertions(+), 183 deletions(-) delete mode 100755 hack/install-codegen-go-tools.sh delete mode 100755 hack/update-openapigen.sh delete mode 100644 tools.go diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5f47443d1a..0c63f0558e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -133,5 +133,6 @@ jobs: run: | make codegen make manifests + - name: Ensure nothing changed run: git diff --exit-code diff --git a/Makefile b/Makefile index 72d494b53c..8f05e7899e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ PACKAGE=github.com/argoproj/argo-rollouts CURRENT_DIR=$(shell pwd) DIST_DIR=${CURRENT_DIR}/dist +PATH := $(DIST_DIR):$(PATH) PLUGIN_CLI_NAME?=kubectl-argo-rollouts TEST_TARGET ?= ./... @@ -20,8 +21,7 @@ E2E_PARALLEL ?= 1 # go_install,path define go_install - [ -e ./vendor ] || go mod vendor - go install -mod=vendor ./vendor/$(1) + cd /tmp && GOBIN=${DIST_DIR} go get $(1) endef override LDFLAGS += \ @@ -57,8 +57,7 @@ endif # protoc,my.proto define protoc # protoc $(1) - [ -e vendor ] || go mod vendor - protoc \ + PATH=${DIST_DIR}:$$PATH protoc \ -I /usr/local/include \ -I . \ -I ./vendor \ @@ -71,81 +70,106 @@ define protoc $(1) endef -PROTO_BINARIES := $(GOPATH)/bin/protoc-gen-gogo $(GOPATH)/bin/protoc-gen-gogofast $(GOPATH)/bin/goimports $(GOPATH)/bin/protoc-gen-grpc-gateway $(GOPATH)/bin/protoc-gen-swagger -TYPES := $(shell find pkg/apis/rollouts/v1alpha1 -type f -name '*.go' -not -name openapi_generated.go -not -name '*generated*' -not -name '*test.go') - .PHONY: all all: controller image -.PHONY: codegen -codegen: protogen mocks - ./hack/update-codegen.sh - ./hack/update-openapigen.sh - PATH=${DIST_DIR}:$$PATH go run ./hack/gen-crd-spec/main.go - -LEGACY_PATH=$(GOPATH)/src/github.com/argoproj/argo-rollouts - -install-codegen-tools: - sudo ./hack/install-codegen-go-tools.sh - -.PHONY: ensure-gopath -ensure-gopath: -ifneq ("$(PWD)","$(LEGACY_PATH)") - @echo "Due to legacy requirements for codegen, repository needs to be checked out within \$$GOPATH" - @echo "Location of this repo should be '$(LEGACY_PATH)' but is '$(PWD)'" - @exit 1 -endif - -UI_PROTOGEN_CMD=yarn --cwd ui run protogen -.PHONY: protogen -protogen: pkg/apis/rollouts/v1alpha1/generated.proto pkg/apiclient/rollout/rollout.swagger.json - rm -Rf vendor +# downloads vendor files needed by tools.go (i.e. gen-k8scodegen) +.PHONY: go-mod-vendor +go-mod-vendor: go mod tidy - ${UI_PROTOGEN_CMD} + go mod vendor -$(GOPATH)/bin/controller-gen: - $(call go_install,sigs.k8s.io/controller-tools/cmd/controller-gen) +.PHONY: $(DIST_DIR)/controller-gen +$(DIST_DIR)/controller-gen: + $(call go_install,sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1) -$(GOPATH)/bin/go-to-protobuf: - $(call go_install,k8s.io/code-generator/cmd/go-to-protobuf) +.PHONY: $(DIST_DIR)/go-to-protobuf +$(DIST_DIR)/go-to-protobuf: + $(call go_install,k8s.io/code-generator/cmd/go-to-protobuf@v0.20.5-rc.0) -$(GOPATH)/bin/protoc-gen-gogo: - $(call go_install,github.com/gogo/protobuf/protoc-gen-gogo) +.PHONY: $(DIST_DIR)/protoc-gen-gogo +$(DIST_DIR)/protoc-gen-gogo: + $(call go_install,github.com/gogo/protobuf/protoc-gen-gogo@v1.3.1) -$(GOPATH)/bin/protoc-gen-gogofast: - $(call go_install,github.com/gogo/protobuf/protoc-gen-gogofast) +.PHONY: $(DIST_DIR)/protoc-gen-gogofast +$(DIST_DIR)/protoc-gen-gogofast: + $(call go_install,github.com/gogo/protobuf/protoc-gen-gogofast@v1.3.1) -$(GOPATH)/bin/protoc-gen-grpc-gateway: - $(call go_install,github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway) +.PHONY: $(DIST_DIR)/protoc-gen-grpc-gateway +$(DIST_DIR)/protoc-gen-grpc-gateway: + $(call go_install,github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v1.16.0) -$(GOPATH)/bin/protoc-gen-swagger: - $(call go_install,github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger) +.PHONY: $(DIST_DIR)/protoc-gen-swagger +$(DIST_DIR)/protoc-gen-swagger: + $(call go_install,github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v1.16.0) -$(GOPATH)/bin/openapi-gen: +.PHONY: $(DIST_DIR)/openapi-gen +$(DIST_DIR)/openapi-gen: $(call go_install,k8s.io/kube-openapi/cmd/openapi-gen) -$(GOPATH)/bin/swagger: - $(call go_install,github.com/go-swagger/go-swagger/cmd/swagger) - -$(GOPATH)/bin/goimports: - $(call go_install,golang.org/x/tools/cmd/goimports) +.PHONY: $(DIST_DIR)/mockery +$(DIST_DIR)/mockery: + $(call go_install,github.com/vektra/mockery/v2@v2.6.0) +TYPES := $(shell find pkg/apis/rollouts/v1alpha1 -type f -name '*.go' -not -name openapi_generated.go -not -name '*generated*' -not -name '*test.go') APIMACHINERY_PKGS=k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1,k8s.io/api/batch/v1 -pkg/apis/rollouts/v1alpha1/generated.proto: $(GOPATH)/bin/go-to-protobuf $(PROTO_BINARIES) $(TYPES) - [ -e vendor ] || go mod vendor - ${GOPATH}/bin/go-to-protobuf \ +.PHONY: install-toolchain +install-toolchain: $(DIST_DIR)/controller-gen $(DIST_DIR)/go-to-protobuf $(DIST_DIR)/protoc-gen-gogo $(DIST_DIR)/protoc-gen-gogofast $(DIST_DIR)/protoc-gen-grpc-gateway $(DIST_DIR)/protoc-gen-swagger + +# generates all auto-generated code +.PHONY: codegen +codegen: gen-proto gen-k8scodegen gen-openapi gen-mocks gen-crd manifests + +# generates all files related to proto files +.PHONY: gen-proto +protogen: k8s-proto rollout-proto ui-proto + +# generates the .proto files affected by changes to types.go +.PHONY: k8s-proto +k8s-proto: go-mod-vendor install-toolchain $(TYPES) + PATH=${DIST_DIR}:$$PATH go-to-protobuf \ --go-header-file=./hack/custom-boilerplate.go.txt \ --packages=github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1 \ --apimachinery-packages=${APIMACHINERY_PKGS} \ --proto-import $(CURDIR)/vendor touch pkg/apis/rollouts/v1alpha1/generated.proto -pkg/apiclient/rollout/rollout.swagger.json: $(PROTO_BINARIES) $(TYPES) pkg/apiclient/rollout/rollout.proto +# generates *.pb.go, *.pb.gw.go, swagger from .proto files +.PHONY: api-proto +api-proto: go-mod-vendor install-toolchain k8s-proto $(call protoc,pkg/apiclient/rollout/rollout.proto) +# generates ui related proto files +.PHONY: ui-proto + yarn --cwd ui run protogen + +# generates k8s client, informer, lister, deepcopy from types.go +.PHONY: gen-k8scodegen +gen-k8scodegen: go-mod-vendor + ./hack/update-codegen.sh + +# generates ./manifests/crds/ +.PHONY: gen-crd +gen-crd: $(DIST_DIR)/controller-gen + go run ./hack/gen-crd-spec/main.go + +# generates mock files from interfaces +.PHONY: gen-mocks +gen-mocks: $(DIST_DIR)/mockery + ./hack/update-mocks.sh + +# generates openapi_generated.go +.PHONY: gen-openapi +gen-openapi: $(DIST_DIR)/openapi-gen + PATH=${DIST_DIR}:$$PATH openapi-gen \ + --go-header-file ${CURRENT_DIR}/hack/custom-boilerplate.go.txt \ + --input-dirs github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1 \ + --output-package github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1 \ + --report-filename pkg/apis/api-rules/violation_exceptions.list + .PHONY: controller -controller: clean-debug +controller: CGO_ENABLED=0 go build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/rollouts-controller ./cmd/rollouts-controller .PHONY: plugin @@ -211,22 +235,14 @@ coverage: test go tool cover -html=coverage.out -o coverage.html open coverage.html -.PHONY: mocks -mocks: - ./hack/update-mocks.sh - .PHONY: manifests manifests: ./hack/update-manifests.sh -# Cleans VSCode debug.test files from sub-dirs to prevent them from being included in packr boxes -.PHONY: clean-debug -clean-debug: - -find ${CURRENT_DIR} -name debug.test | xargs rm -f - .PHONY: clean clean: clean-debug -rm -rf ${CURRENT_DIR}/dist + -rm -rf ${CURRENT_DIR}/ui/dist .PHONY: precheckin precheckin: test lint diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 45decf2d34..99befcb413 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -11,7 +11,10 @@ Install: * [kustomize](https://github.com/kubernetes-sigs/kustomize/releases) * [minikube](https://kubernetes.io/docs/setup/minikube/) or Docker for Desktop -Argo Rollout additionally uses `golangci-lint` to lint the project. +Argo Rollout additionally uses the following tools +* `golangci-lint` to lint the project. +* `protoc` and `swagger-codegen` to generate proto related files +* `yarn` to build the UI Run the following commands to install them: @@ -26,7 +29,7 @@ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint Brew users can quickly install the lot: ```bash -brew install go kubectl kustomize +brew install go kubectl kustomize golangci-lint protobuf swagger-codegen ``` Set up environment variables (e.g. is `~/.bashrc`): @@ -43,25 +46,24 @@ go get -u github.com/argoproj/argo-rollouts cd ~/go/src/github.com/argoproj/argo-rollouts ``` -Run the following command to download all the dependencies: - -``` -go mod download -``` - - ## Building `go.mod` is used, so the `go build/test` commands automatically install the needed dependencies - The `make controller` command will build the controller. -* `make codegen` - Runs the code generator that creates the informers, client, lister, and deepcopies from the types.go -and modifies the open-api spec. This command fails if the user has not run `go mod download` to download all the -dependencies of the project. +* `make codegen` - Runs the code generator that creates the informers, client, lister, and deepcopies from the types.go and modifies the open-api spec. +## Running Controller Locally + +It is much easier to run and debug if you run Argo Rollout in your local machine than in the Kubernetes cluster. + +```bash +cd ~/go/src/github.com/argoproj/argo-rollouts +go run ./cmd/rollouts-controller/main.go +``` + ## Running Unit Tests To run unit tests: @@ -104,7 +106,7 @@ make test-e2e E2E_TEST_OPTIONS="-testify.m ^TestRolloutRestart$" 3. The e2e tests are designed to run as quickly as possible, eliminating readiness and termination delays. However, it is often desired to artificially slow down the tests for debugging purposes, as well as to understand what the test is doing. To delay startup and termination of pods, set the -`E2E_POD_DELAY` to a integer value in seconds. This environment variable is often coupled with +`E2E_POD_DELAY` to an integer value in seconds. This environment variable is often coupled with `E2E_TEST_OPTIONS` to debug and slow down a specific test. ```shell @@ -137,14 +139,6 @@ Alternatively, the e2e tests can be run against the system controller (i.e. with make start-e2e E2E_INSTANCE_ID='' ``` -## Running Locally - -It is much easier to run and debug if you run Argo Rollout in your local machine than in the Kubernetes cluster. - -```bash -cd ~/go/src/github.com/argoproj/argo-rollouts -go run ./cmd/rollouts-controller/main.go -``` ## Running Local Containers diff --git a/go.mod b/go.mod index fe52912cdc..91fb06bb96 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,6 @@ require ( github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/jstemmer/go-junit-report v0.9.1 github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a github.com/lunixbochs/vtclean v1.0.0 // indirect github.com/newrelic/newrelic-client-go v0.49.0 @@ -32,8 +31,7 @@ require ( github.com/tj/assert v0.0.3 github.com/undefinedlabs/go-mpatch v1.0.6 github.com/valyala/fasttemplate v1.2.1 - github.com/vektra/mockery/v2 v2.6.0 - golang.org/x/tools v0.1.0 + golang.org/x/tools v0.1.0 // indirect google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a google.golang.org/grpc v1.33.1 google.golang.org/grpc/examples v0.0.0-20210331235824-f6bb3972ed15 // indirect @@ -53,7 +51,6 @@ require ( k8s.io/kubectl v0.19.4 k8s.io/kubernetes v1.20.4 k8s.io/utils v0.0.0-20201110183641-67b214c5f920 - sigs.k8s.io/controller-tools v0.4.1 ) replace ( diff --git a/go.sum b/go.sum index bab8aa3022..2c66f255c5 100644 --- a/go.sum +++ b/go.sum @@ -308,7 +308,6 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZM github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= @@ -422,8 +421,6 @@ github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslW github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/gobuffalo/flect v0.2.0 h1:EWCvMGGxOjsgwlWaP+f4+Hh6yrrte7JeFL2S6b+0hdM= -github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= @@ -435,7 +432,6 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -536,7 +532,6 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i github.com/gookit/color v1.2.5/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= github.com/gookit/color v1.3.1/go.mod h1:R3ogXq2B9rTbXoSHJ1HyUVAZ3poOJHpd9nQmyGZsfvQ= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/goreleaser/chglog v0.1.1/go.mod h1:xSDa/73C0TxBcLvoT2JHh47QyXpCx5rrNVzJKyeFGPw= github.com/goreleaser/chglog v0.1.2/go.mod h1:tTZsFuSZK4epDXfjMkxzcGbrIOXprf0JFp47BjIr3B8= @@ -593,7 +588,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= @@ -639,9 +633,7 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU= github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= @@ -700,7 +692,6 @@ github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -756,7 +747,6 @@ github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -833,7 +823,6 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -861,7 +850,6 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= -github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -933,9 +921,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.18.0 h1:CbAm3kP2Tptby1i9sYy2MGRg0uxIN9cyDb59Ys7W8z8= -github.com/rs/zerolog v1.18.0/go.mod h1:9nvC1axdVrAHcu/s9taAVfBuIdTZLVQmKQyvrUjF5+I= github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= @@ -970,11 +955,9 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= @@ -993,14 +976,12 @@ github.com/spf13/afero v1.3.2/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY52 github.com/spf13/afero v1.4.1 h1:asw9sl74539yqavKaglDM5hFpdJVK0Y5Dr/JOgQ89nQ= github.com/spf13/afero v1.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1009,7 +990,6 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/ssgreg/nlreturn/v2 v2.0.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= @@ -1031,7 +1011,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= @@ -1079,8 +1058,6 @@ github.com/valyala/quicktemplate v1.6.2/go.mod h1:mtEJpQtUiBV0SHhMX6RtiJtqxncgrf github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -github.com/vektra/mockery/v2 v2.6.0 h1:yVqYLShwENx8CB3IR3Jl2mC4mDfgVK9YaBP3tjYAxtI= -github.com/vektra/mockery/v2 v2.6.0/go.mod h1:rBZUbbhMbiSX1WlCGsOgAi6xjuJGxB7KKbnoL0XNYW8= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= @@ -1098,7 +1075,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -1365,7 +1341,6 @@ golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1394,7 +1369,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200317043434-63da46f3035e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200321224714-0d839f3cf2ed/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= @@ -1411,7 +1385,6 @@ golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200606014950-c42cb6316fb6/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200608174601-1b747fd94509/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1547,7 +1520,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kyokomi/emoji.v1 v1.5.1/go.mod h1:N9AZ6hi1jHOPn34PsbpufQZUcKftSD7WgS2pgpmH4Lg= gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U= @@ -1568,7 +1540,6 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= @@ -1659,8 +1630,6 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w= -sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU= sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= diff --git a/hack/install-codegen-go-tools.sh b/hack/install-codegen-go-tools.sh deleted file mode 100755 index ddec370479..0000000000 --- a/hack/install-codegen-go-tools.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -eux -o pipefail - -GO111MODULE=on go get github.com/gogo/protobuf/gogoproto@v1.3.1 -GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1 -GO111MODULE=on go get github.com/golang/protobuf/protoc-gen-go@v1.4.2 -GO111MODULE=on go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v1.12.2 -GO111MODULE=on go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v1.12.2 -GO111MODULE=on go get golang.org/x/tools/cmd/goimports@v0.0.0-20190627203933-19ff4fff8850 \ No newline at end of file diff --git a/hack/tools.go b/hack/tools.go index 74f2010e40..72471ffe24 100644 --- a/hack/tools.go +++ b/hack/tools.go @@ -3,19 +3,11 @@ package tools import ( - _ "github.com/gogo/protobuf/protoc-gen-gogo" - _ "github.com/gogo/protobuf/protoc-gen-gogofast" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger" - _ "golang.org/x/tools/cmd/goimports" + // used in `update-codegen.sh` _ "k8s.io/code-generator/cmd/client-gen" _ "k8s.io/code-generator/cmd/deepcopy-gen" _ "k8s.io/code-generator/cmd/defaulter-gen" - _ "k8s.io/code-generator/cmd/go-to-protobuf" - _ "k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo" _ "k8s.io/code-generator/cmd/informer-gen" _ "k8s.io/code-generator/cmd/lister-gen" _ "k8s.io/code-generator/pkg/util" - _ "k8s.io/code-generator/third_party/forked/golang/reflect" - _ "k8s.io/kube-openapi/cmd/openapi-gen" -) \ No newline at end of file +) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index a884284aea..6b1294143f 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -31,8 +31,3 @@ ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ cp -r "${TEMP_DIR}/github.com/argoproj/argo-rollouts/." "${SCRIPT_ROOT}/" # To use your own boilerplate text use: # --go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt - -CONTROLLERGEN_VERSION=$(go list -m sigs.k8s.io/controller-tools | awk '{print $2}' | head -1) -CONTROLLERGEN_PKG=$(echo `go env GOPATH`"/pkg/mod/sigs.k8s.io/controller-tools@${CONTROLLERGEN_VERSION}") -go build -o dist/controller-gen $CONTROLLERGEN_PKG/cmd/controller-gen/ -./dist/controller-gen --version diff --git a/hack/update-mocks.sh b/hack/update-mocks.sh index 2758133976..a24467c103 100755 --- a/hack/update-mocks.sh +++ b/hack/update-mocks.sh @@ -6,20 +6,18 @@ set -o nounset set -o pipefail PROJECT_ROOT=$(cd $(dirname "$0")/.. ; pwd) -MOCKERY_VERSION=$(go list -m github.com/vektra/mockery/v2 | awk '{print $2}' | head -1) -MOCKERY_PKG=$(echo `go env GOPATH`"/pkg/mod/github.com/vektra/mockery/v2@${MOCKERY_VERSION}") -go run "${MOCKERY_PKG}"/main.go \ +mockery \ --dir "${PROJECT_ROOT}"/metricproviders \ --name Provider \ --output "${PROJECT_ROOT}"/metricproviders/mocks -go run "${MOCKERY_PKG}"/main.go \ +mockery \ --dir "${PROJECT_ROOT}"/utils/aws \ --name ELBv2APIClient \ --output "${PROJECT_ROOT}"/utils/aws/mocks -go run "${MOCKERY_PKG}"/main.go \ +mockery \ --dir "${PROJECT_ROOT}"/rollout \ --name TrafficRoutingReconciler \ --output "${PROJECT_ROOT}"/rollout/mocks diff --git a/hack/update-openapigen.sh b/hack/update-openapigen.sh deleted file mode 100755 index 0e0cfd6466..0000000000 --- a/hack/update-openapigen.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -x -set -o errexit -set -o nounset -set -o pipefail - -export GOPATH=$(go env GOPATH) # export gopath do generator output goes to the correct location -PROJECT_ROOT=$(cd $(dirname "$0")/.. ; pwd) -CODEGEN_VERSION=$(go list -m k8s.io/kube-openapi | awk '{print $2}' | head -1) -CODEGEN_PKG="${GOPATH}/pkg/mod/k8s.io/kube-openapi@${CODEGEN_VERSION}" -VERSION="v1alpha1" - -go run ${CODEGEN_PKG}/cmd/openapi-gen/openapi-gen.go \ - --go-header-file ${PROJECT_ROOT}/hack/custom-boilerplate.go.txt \ - --input-dirs github.com/argoproj/argo-rollouts/pkg/apis/rollouts/${VERSION} \ - --output-package github.com/argoproj/argo-rollouts/pkg/apis/rollouts/${VERSION} \ - --report-filename pkg/apis/api-rules/violation_exceptions.list \ - $@ - diff --git a/tools.go b/tools.go deleted file mode 100644 index 122fd59131..0000000000 --- a/tools.go +++ /dev/null @@ -1,14 +0,0 @@ -// +build tools - -// Package tools contains code generation and build utilities -// This package imports things required by build scripts, to force `go mod` to see them as dependencies -package tools - -import ( - _ "github.com/jstemmer/go-junit-report" - _ "github.com/vektra/mockery/v2" - _ "k8s.io/code-generator/cmd/client-gen" - _ "k8s.io/kube-openapi/cmd/openapi-gen/args" - _ "k8s.io/kube-openapi/pkg/generators" - _ "sigs.k8s.io/controller-tools/cmd/controller-gen" -)