Skip to content

Commit

Permalink
Merge pull request vmware-tanzu#543 from akutz/feature/go-mod-updates
Browse files Browse the repository at this point in the history
✨ Go mod updates
  • Loading branch information
akutz authored May 30, 2024
2 parents 853bde8 + 9f5219c commit d84b156
Show file tree
Hide file tree
Showing 38 changed files with 497 additions and 915 deletions.
31 changes: 27 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
run:
timeout: 5m
skip-files:
- ".*generated.*\\.go"
- external/
- pkg/util/cloudinit/schema/

# override defaults
linters-settings:
Expand Down Expand Up @@ -81,6 +77,25 @@ linters-settings:
- alias: proberctx
pkg: github.com/vmware-tanzu/vm-operator/pkg/prober/context

depguard:
rules:
main:
list-mode: lax # allow unless explicitly denied
files:
- $all
- "!$test"
deny:
- pkg: io/ioutil
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
test:
list-mode: lax # allow unless explicitly denied
files:
- $test
deny:
- pkg: io/ioutil
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"


linters:
disable-all: true
enable:
Expand Down Expand Up @@ -123,6 +138,11 @@ issues:
# reviewers focus on reviewing the most relevant changes in the PRs and avoid
# nitpicking.
exclude-use-default: false
exclude-dirs:
- external
- pkg/util/cloudinit/schema
exclude-files:
- ".*generated.*\\.go"
exclude:
# TODO: Remove the following exclusions over time once we have fixed those.
- "ST1000: at least one file in a package should have a package comment"
Expand Down Expand Up @@ -150,13 +170,16 @@ issues:
text: should not use dot imports
- path: test/builder/vcsim_test_context.go
text: should not use dot imports
- path: _test.go
text: should not use dot imports
# All of our webhooks follow the pattern of passing the webhook context which
# contains fields like the Client. Ignore the linter warnings for now.
- path: webhooks/
text: ".* `ctx` is unused"
- path: _test.go
linters:
- gosec
- depguard
- linters:
- revive
text: "unused-parameter: parameter"
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
CONVERSION_GEN := $(TOOLS_BIN_DIR)/conversion-gen
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/golangci-lint
KUSTOMIZE := $(TOOLS_BIN_DIR)/kustomize
GOCOVMERGE := $(TOOLS_BIN_DIR)/gocovmerge
GOCOV := $(TOOLS_BIN_DIR)/gocov
GOCOV_XML := $(TOOLS_BIN_DIR)/gocov-xml
GINKGO := $(TOOLS_BIN_DIR)/ginkgo
Expand Down Expand Up @@ -202,7 +201,7 @@ web-console-validator: prereqs generate lint-go web-console-validator-only ## Bu
TOOLING_BINARIES := $(CRD_REF_DOCS) $(CONTROLLER_GEN) $(CONVERSION_GEN) \
$(GOLANGCI_LINT) $(KUSTOMIZE) \
$(KUBE_APISERVER) $(KUBEBUILDER) $(KUBECTL) $(ETCD) \
$(GINKGO) $(GOCOVMERGE) $(GOCOV) $(GOCOV_XML) $(GOVULNCHECK)
$(GINKGO) $(GOCOV) $(GOCOV_XML) $(GOVULNCHECK)
tools: $(TOOLING_BINARIES) ## Build tooling binaries
$(TOOLING_BINARIES):
make -C $(TOOLS_DIR) $(@F)
Expand Down
45 changes: 22 additions & 23 deletions api/go.mod
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
module github.com/vmware-tanzu/vm-operator/api

go 1.21
go 1.22.0

toolchain go1.21.5
toolchain go1.22.3

replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => ../pkg/constants/testlabels

require (
github.com/google/go-cmp v0.6.0
github.com/google/gofuzz v1.2.0
github.com/google/uuid v1.3.0
github.com/onsi/ginkgo/v2 v2.15.0
github.com/onsi/gomega v1.31.0
github.com/google/uuid v1.6.0
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-00010101000000-000000000000

// https://github.com/vmware-tanzu/vm-operator/security/dependabot/39
google.golang.org/protobuf v1.34.1 // indirect
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/controller-runtime v0.17.2
k8s.io/api v0.30.0
k8s.io/apimachinery v0.30.0
sigs.k8s.io/controller-runtime v0.18.2
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand All @@ -50,16 +49,16 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.16.1 // indirect
golang.org/x/tools v0.21.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
k8s.io/apiextensions-apiserver v0.29.0 // indirect
k8s.io/client-go v0.29.0 // indirect
k8s.io/component-base v0.29.0 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/apiextensions-apiserver v0.30.0 // indirect
k8s.io/client-go v0.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
)

require (
Expand All @@ -73,13 +72,13 @@ require (
// * https://github.com/vmware-tanzu/vm-operator/security/dependabot/32
// * https://github.com/vmware-tanzu/vm-operator/security/dependabot/34
// * https://github.com/vmware-tanzu/vm-operator/security/dependabot/36
golang.org/x/net v0.23.0 // indirect
golang.org/x/net v0.25.0 // indirect
// * https://github.com/vmware-tanzu/vm-operator/security/dependabot/22
golang.org/x/text v0.14.0 // indirect; per
golang.org/x/text v0.15.0 // indirect; per
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
Loading

0 comments on commit d84b156

Please sign in to comment.