kubernetes-sigs/cluster-api-provider-gcp

code coverage ci job doesn't work

fiunchinho opened this issue · 1 comments

/kind bug

What steps did you take and what happened:
[A clear and concise description of what the bug is.]

The code coverage ci job fails, for example here https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-gcp/677/pull-cluster-api-provider-gcp-coverage/1561635872573493248

bash: line 1: ./scripts/ci-test-coverage.sh: Permission denied
bash: line 2: cd: ../test-infra/gopherage: No such file or directory
go: downloading k8s.io/client-go v0.24.2
go: downloading k8s.io/apimachinery v0.24.2
go: downloading github.com/spf[13](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-gcp/677/pull-cluster-api-provider-gcp-coverage/1561635872573493248#1:build-log.txt%3A13)/pflag v1.0.5
go: downloading k8s.io/klog/v2 v2.70.1
go: downloading sigs.k8s.io/cluster-api v1.2.1
go: downloading sigs.k8s.io/controller-runtime v0.12.3
go: downloading k8s.io/api v0.24.2
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/GoogleCloudPlatform/k8s-cloud-provider v1.20.0
go: downloading github.com/go-logr/logr v1.2.0
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading sigs.k8s.io/structured-merge-diff/v4 v4.2.1
go: downloading github.com/google/gofuzz v1.2.0
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
go: downloading gomodules.xyz/jsonpatch/v2 v2.2.0
go: downloading google.golang.org/api v0.93.0
go: downloading golang.org/x/mod v0.6.0-dev.0.2022010619[14](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-gcp/677/pull-cluster-api-provider-gcp-coverage/1561635872573493248#1:build-log.txt%3A14)[15](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-gcp/677/pull-cluster-api-provider-gcp-coverage/1561635872573493248#1:build-log.txt%3A15)-9b9b3d81d5e3
go: downloading golang.org/x/text v0.3.7
go: downloading k8s.io/apiextensions-apiserver v0.24.2
go: downloading k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42
go: downloading github.com/evanphx/json-patch v4.12.0+incompatible
go: downloading github.com/google/go-cmp v0.5.8
go: downloading github.com/onsi/gomega v1.19.0
go: downloading github.com/blang/semver v3.5.1+incompatible
go: downloading github.com/gobuffalo/flect v0.2.5
go: downloading golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
go: downloading sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2
go: downloading github.com/prometheus/client_golang v1.12.1
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e
go: downloading github.com/fsnotify/fsnotify v1.5.4
go: downloading github.com/json-iterator/go v1.1.12
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/emicklei/go-restful v2.15.0+incompatible
go: downloading github.com/go-openapi/jsonreference v0.19.5
go: downloading github.com/go-openapi/swag v0.19.14
go: downloading k8s.io/component-base v0.24.2
go: downloading github.com/imdario/mergo v0.3.12
go: downloading golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
go: downloading github.com/google/uuid v1.3.0
go: downloading sigs.k8s.io/yaml v1.3.0
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/google/gnostic v0.5.7-v3refs
go: downloading gopkg.in/yaml.v3 v3.0.0
go: downloading golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/common v0.32.1
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/prometheus/procfs v0.7.3
go: downloading google.golang.org/protobuf v1.28.0
go: downloading golang.org/x/sys v0.0.0-20220624220833-87e55d714810
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/modern-go/reflect2 v1.0.2
go: downloading github.com/PuerkitoBio/purell v1.1.1
go: downloading github.com/go-openapi/jsonpointer v0.19.5
go: downloading github.com/mailru/easyjson v0.7.6
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369
go: downloading github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
go: downloading github.com/josharian/intern v1.0.0
go: downloading github.com/munnerz/goautoneg v0.0.0-201910100834[16](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-gcp/677/pull-cluster-api-provider-gcp-coverage/1561635872573493248#1:build-log.txt%3A16)-a7dc8b61c822
go: downloading go.opencensus.io v0.23.0
go: downloading google.golang.org/grpc v1.47.0
go: downloading github.com/googleapis/enterprise-certificate-proxy v0.1.0
go: downloading cloud.google.com/go/compute v1.7.0
go: downloading github.com/googleapis/gax-go/v2 v2.4.0
go: downloading google.golang.org/genproto v0.0.0-[20](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-gcp/677/pull-cluster-api-provider-gcp-coverage/1561635872573493248#1:build-log.txt%3A20)22062414[21](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-gcp/677/pull-cluster-api-provider-gcp-coverage/1561635872573493248#1:build-log.txt%3A21)45-8cd45d7dbd1f
bash: line 5: ./gopherage: No such file or directory
bash: line 6: ./gopherage: No such file or directory
+ EXIT_VALUE=1[27](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-gcp/677/pull-cluster-api-provider-gcp-coverage/1561635872573493248#1:build-log.txt%3A27)
+ set +o xtrace

Comparing to the job defined for CAPZ in the test-infra repo there is small differences that may be causing the issue. It sounds like this block is relevant and it's missing on the gcp job.

extra_refs:
    - org: kubernetes
      repo: test-infra
      base_ref: master
      path_alias: k8s.io/test-infra

Also, the indentation for the security context is wrong. It's

securityContext:
privileged: true

when it should be

securityContext:
        privileged: true

What did you expect to happen:

The job finishes successfully and reports are shown.

/assign