Commit graph

23 commits

Author SHA1 Message Date
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
Patrick Ohly
ad79e479c2 build: remove deprecated '// +build' tag
This has been replaced by `//build:...` for a long time now.

Removal of the old build tag was automated with:

    for i in $(git grep -l '^// +build' | grep -v -e '^vendor/'); do if ! grep -q '^// Code generated' "$i"; then sed -i -e '/^\/\/ +build/d' "$i"; fi; done
2025-12-18 12:16:21 +01:00
Benjamin Elder
ad68a4b4cd emeritus spiffxp
spiffxp moved on from the project years ago, he is still missed
2025-06-10 20:05:40 -07:00
Mauri de Souza Meneguzzo
b8e5a3ed32 pkg/util/coverage: update fakeTestDeps methods
Go 1.23 changed the signature of the testDeps interface so we need to
add a blank implementation for InitRuntimeCoverage to fakeTestDeps.
2024-05-29 12:31:22 -03:00
Aaron Crickenberger
cb98449156 pkg/util/coverage: update fakeTestDeps impl
testing.testDeps has had more methods added so fakeTestDeps needs to
follow suit
2022-08-25 17:23:49 -07:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Benjamin Elder
830456e027 correct coverage MainStart argument order 2022-05-05 14:00:21 -07:00
Benjamin Elder
5d8f6f1213 fix e2e coverage package for go 1.18 2022-04-27 10:05:51 -07:00
Antonio Ojea
d126b14838 migrate nolint coments to golangci-lint 2021-11-17 13:58:53 +01:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Benjamin Elder
d1ec9b3f9c fix pkg/util/coverage staticcheck 2020-06-23 18:30:32 -07:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Zhou Peng
31daeed3b2 [pkg/util/coverage]: group imports for readability
Signed-off-by: Zhou Peng <p@ctriple.cn>
2019-05-23 21:38:12 +08:00
Roy Lenferink
b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Katharine Berry
9390847bd5 Change owners. 2018-08-31 18:01:02 -07:00
Katharine Berry
c3e08bec7a Add owners. 2018-08-31 17:51:42 -07:00
Katharine Berry
13d1961d2b Improve error behaviour of package coverage. 2018-08-31 17:06:20 -07:00
Katharine Berry
2d36e9e874 Add KUBE_COVERAGE_FLUSH_INTERVAL to set flush interval. 2018-08-31 15:52:48 -07:00
Katharine Berry
0fb4b920b5 Address review comments. 2018-08-31 10:49:36 -07:00
Katharine Berry
6afc130340 Add autogenerated BUILD files. 2018-08-29 14:48:24 -07:00
Katharine Berry
da4bbd421c Add runtime coverage support. 2018-08-29 14:48:24 -07:00