kubernetes/pkg/util/coverage
Davanum Srinivas e4ed3aa73b
pkg/util/coverage: add ModulePath() to fakeTestDeps
Go 1.26's testing.testDeps interface added a ModulePath() string method.
Without it, fakeTestDeps no longer satisfies the interface and any build
with -tags=coverage (KUBE_BUILD_WITH_COVERAGE=true) fails to compile at
pkg/util/coverage/coverage.go:84 (testing.MainStart):

    pkg/util/coverage/coverage.go:84:32: cannot use deps (variable of
    struct type fakeTestDeps) as testing.testDeps value in argument to
    testing.MainStart: fakeTestDeps does not implement testing.testDeps
    (missing method ModulePath)

This restores the two coverage jobs that have been failing for ~65 days:

  ci-kubernetes-coverage-conformance
    history:  https://prow.k8s.io/job-history/gs/kubernetes-ci-logs/logs/ci-kubernetes-coverage-conformance
    sample:   https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/ci-kubernetes-coverage-conformance/2053245547074031616

  ci-kubernetes-coverage-e2e-gci-gce
    history:  https://prow.k8s.io/job-history/gs/kubernetes-ci-logs/logs/ci-kubernetes-coverage-e2e-gci-gce
    sample:   https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/ci-kubernetes-coverage-e2e-gci-gce/2053247811943665664

The build image kube-cross:v1.36.0-go1.26.2-bullseye.0 is what surfaced
this once kube-cross moved to Go 1.26.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-05-09 19:40:33 -04:00
..
coverage.go build: remove deprecated '// +build' tag 2025-12-18 12:16:21 +01:00
coverage_disabled.go build: remove deprecated '// +build' tag 2025-12-18 12:16:21 +01:00
fake_test_deps.go pkg/util/coverage: add ModulePath() to fakeTestDeps 2026-05-09 19:40:33 -04:00
OWNERS emeritus spiffxp 2025-06-10 20:05:40 -07:00