Remove ginkgo/gomega dependency from root module#579
Remove ginkgo/gomega dependency from root module#579k8s-ci-robot merged 1 commit intokubernetes:masterfrom
Conversation
Migrate proto and proto/validation tests from ginkgo/gomega to stdlib testing with t.Run subtests. This removes ginkgo/gomega and their transitive dependencies (slim-sprig, google/pprof) from go.mod, which in turn allows downstream consumers like k8s.io/apimachinery to have a cleaner dependency tree. Only 4 test files in the root module used ginkgo (the other 95% of tests already use stdlib testing). The test/integration submodule retains its own ginkgo dependency independently. All 51 tests pass across the 3 affected packages. Ref: kubernetes/kubernetes#127888
|
Welcome @bryantbiggs! |
|
great /assign @Jefftree |
Jefftree
left a comment
There was a problem hiding this comment.
/lgtm
/approve
Do you also want to create the k/k bump PR?
| schema = models.LookupModel(model) | ||
| Expect(schema).ToNot(BeNil()) | ||
| // loadV18Models loads the v1.8 swagger schema and returns proto.Models. | ||
| func loadV18Models(t *testing.T) proto.Models { |
There was a problem hiding this comment.
Didn't realize that we're still using Kubernetes v1.8 models. Not blocking for this PR but can we create an issue to update these?
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryantbiggs, Jefftree The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which removed ginkgo/gomega from the root module's test dependencies. This drops ginkgo/gomega as indirect dependencies from apimachinery, client-go, and other staging modules. Also removes transitive indirect deps that were only needed by ginkgo/gomega (Masterminds/semver, google/pprof, golang.org/x/tools) from several staging modules.
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes#127888
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes#127888
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes#127888 Signed-off-by: Arnaud Meukam <ameukam@gmail.com>
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which moved the last ginkgo/gomega tests to stdlib testing and ran go mod tidy, removing ginkgo/gomega from kube-openapi's go.mod. This drops ginkgo/gomega as indirect deps from apimachinery. It also prunes Masterminds/semver, google/pprof, and golang.org/x/tools from client-go and other staging modules where they were only needed through kube-openapi's ginkgo/gomega chain. Contributes to kubernetes/kubernetes#127888 Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
Summary
pkg/util/protoandpkg/util/proto/validationtests from ginkgo/gomega to stdlibtestingwitht.Runsubtests_suite_test.go) filesgo mod tidyto removegithub.com/onsi/ginkgo/v2,github.com/onsi/gomega, and their transitive deps (slim-sprig,google/pprof) fromgo.modOnly 4 test files in the root module used ginkgo — the other 95% of tests already use stdlib
testing. Thetest/integrationsubmodule retains its own independent ginkgo dependency.Motivation
k8s.io/apimachinerydepends onk8s.io/kube-openapi, which transitively pulls ginkgo/gomega into apimachinery'sgo.modas indirect deps. Removing them from kube-openapi's root module cleans up the dependency tree for all downstream consumers, contributing to the goal of making client-go lighter (kubernetes/kubernetes#127888).This follows the pattern of recent Kubernetes dependency cleanup work:
Test plan
go test ./pkg/util/proto/... -count=1— all 51 tests pass across 3 packages/area dependency