Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use testgrid config from github.com/GoogleCloudPlatform #930

Open
wants to merge 1 commit into
base: master
from

Conversation

@hoegaarden
Copy link
Member

hoegaarden commented Nov 12, 2019

The testgrid config moved from k/test-infra to a GoogleCloudPlatform
repo. In order to stay up to date and be able to parse the config, be
also need to move over.

The commit which removed this from k/test-infra:
kubernetes/test-infra#14370

/kind cleanup
/milestone v1.17
/assign @justaugustus @saschagrunert
/priority important-soon

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 12, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hoegaarden

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@saschagrunert

This comment has been minimized.

Copy link
Member

saschagrunert commented Nov 13, 2019

I'm not sure if the proto generation works with bazel, but this semms to be the root cause of the compile problems. I saw that test-infra exludes the proto generation:
https://github.com/kubernetes/test-infra/blob/master/BUILD.bazel#L2

Maybe we have to build the protos before the actual bazel build step... 🤔

@hoegaarden

This comment has been minimized.

Copy link
Member Author

hoegaarden commented Nov 13, 2019

I'm not sure if the proto generation works with bazel, but this semms to be the root cause of the compile problems. I saw that test-infra exludes the proto generation:
https://github.com/kubernetes/test-infra/blob/master/BUILD.bazel#L2

Not sure if we care, because we actually need to move away from k/test-infra/testgrid/... and to GoogkeCloudPlatform/testgrid/.... FWIF it always just worked™️ when we used the types from k/test-infra, however we didn't update those deps in a while.

Maybe we have to build the protos before the actual bazel build step... 🤔

Didn't need to do that, AFAICT, when we depended on k/test-infra. But fine, happy to generate the proto files -- how would I do this with bazel?

@hoegaarden

This comment has been minimized.

Copy link
Member Author

hoegaarden commented Nov 13, 2019

I just learned, that if I run gazelle fix in the bazel cache (is this the bazel cache?) for the testgrid package, there are quiet some changes and, more interestingly, bazel test //... does work afterwards:

shell session
$ pushd /private/var/tmp/_bazel_pivotal/cace4742cb87e28f91b96c03ae35e6d0/external/com_github_googlecloudplatform_testgrid/ ; gazelle fix ; git status --short ; popd
/private/var/tmp/_bazel_pivotal/cace4742cb87e28f91b96c03ae35e6d0/external/com_github_googlecloudplatform_testgrid ~/workspace/kubernetes-playground/go/src/k8s.io/release
 M cmd/summarizer/BUILD.bazel
 M cmd/summarizer/example/BUILD.bazel
 M cmd/summarizer/summary/BUILD.bazel
 M cmd/updater/BUILD.bazel
 M config/BUILD.bazel
 M config/yamlcfg/BUILD.bazel
 M pb/config/BUILD.bazel
 M pb/custom_evaluator/BUILD.bazel
 M pb/issue_state/BUILD.bazel
 M pb/response/BUILD.bazel
 M pb/state/BUILD.bazel
 M pb/summary/BUILD.bazel
 M pb/test_status/BUILD.bazel
~/workspace/kubernetes-playground/go/src/k8s.io/release
$ bazel test //...
INFO: Writing tracer profile to '/private/var/tmp/_bazel_pivotal/cace4742cb87e28f91b96c03ae35e6d0/command.profile.gz'
DEBUG: /private/var/tmp/_bazel_pivotal/cace4742cb87e28f91b96c03ae35e6d0/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:125:9: rbe_default not using checked in configs; Bazel version 1.1.0 was picked/selected but no checked in config was found in map {"0.20.0": ["8.0.0"], "0.21.0": ["8.0.0"], "0.22.0": ["8.0.0", "9.0.0"], "0.23.0": ["8.0.0", "9.0.0"], "0.23.1": ["8.0.0", "9.0.0"], "0.23.2": ["9.0.0"], "0.24.0": ["9.0.0"], "0.24.1": ["9.0.0"], "0.25.0": ["9.0.0"], "0.25.1": ["9.0.0"], "0.25.2": ["9.0.0"], "0.26.0": ["9.0.0"], "0.26.1": ["9.0.0"], "0.27.0": ["9.0.0"], "0.27.1": ["9.0.0"], "0.28.0": ["9.0.0"], "0.28.1": ["9.0.0"], "0.29.0": ["9.0.0"], "0.29.1": ["9.0.0"]}
INFO: Analyzed 45 targets (9 packages loaded, 120 targets configured).
INFO: Found 35 targets and 10 test targets...
INFO: Elapsed time: 76.504s, Critical Path: 20.60s
INFO: 245 processes: 245 darwin-sandbox.
INFO: Build completed successfully, 255 total actions
//build/debs:go_default_test                                             PASSED in 0.1s
//lib:common                                                             PASSED in 0.9s
//lib:gitlib                                                             PASSED in 0.9s
//lib:releaselib                                                         PASSED in 1.1s
//pkg/command:go_default_test                                            PASSED in 0.2s
//pkg/notes:go_default_test                                              PASSED in 0.2s
@io_k8s_repo_infra//hack:verify-bazel                                    PASSED in 0.3s
@io_k8s_repo_infra//hack:verify-boilerplate                              PASSED in 1.1s
@io_k8s_repo_infra//hack:verify-deps                                     PASSED in 18.5s
@io_k8s_repo_infra//hack:verify-gofmt                                    PASSED in 0.2s

Executed 10 out of 10 tests: 10 tests pass.
INFO: Build completed successfully, 255 total actions
$  

This, of course, is not a solution but maybe brings me a bit closer to fixing the issue and maybe even understand a tad more about bazel.

@justaugustus

This comment has been minimized.

Copy link
Member

justaugustus commented Nov 27, 2019

@hoegaarden -- do we have an update on this one?
It would be good to close the loop on it soon, so we don't drift too far from k/test-infra.

@hoegaarden

This comment has been minimized.

Copy link
Member Author

hoegaarden commented Nov 27, 2019

@justaugustus

There is not really an update. Help appreciated. See also: https://kubernetes.slack.com/messages/CJH2GBF7Y/p1574786882248800.

@justaugustus

This comment has been minimized.

Copy link
Member

justaugustus commented Nov 27, 2019

/retest

@hoegaarden hoegaarden force-pushed the pivotal-k8s:go-deps-testgrid-no-moar branch from f13686c to 50b0644 Nov 28, 2019
The testgrid config moved from k/test-infra to a GoogleCloudPlatform
repo. In order to stay up to date and be able to parse the config, be
also need to move over.

The commit which removed this from k/test-infra:
kubernetes/test-infra#14370
@hoegaarden hoegaarden force-pushed the pivotal-k8s:go-deps-testgrid-no-moar branch from 50b0644 to 3a84d7c Nov 28, 2019
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Nov 28, 2019

@hoegaarden: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-release-test 3a84d7c link /test pull-release-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@justaugustus

This comment has been minimized.

Copy link
Member

justaugustus commented Nov 29, 2019

@ixdy @BenTheElder @Katharine @cblecker -- Any ideas on this bazel failure?

go_repository(
name = "com_github_googlecloudplatform_testgrid",
build_file_generation = "on",
build_file_proto_mode = "disable",

This comment has been minimized.

Copy link
@cblecker

cblecker Nov 29, 2019

Member

This is the problematic line. We aren't generating build files for protobufs, which is causing issues in dependency resolution inside the bazel sandbox. It looks like this is being set by the repo infra bits to update dependencies.

@fejta Thoughts on this?

This comment has been minimized.

Copy link
@ixdy

ixdy Dec 9, 2019

Member

We aren't generating BUILD files for protobufs, but that shouldn't be an issue, since the generated protobuf Go code is checked in: https://github.com/GoogleCloudPlatform/testgrid/blob/v0.0.1-alpha.3/pb/config/config.pb.go

I'm not sure why there is a missing Bazel dependency on github.com/GoogleCloudPlatform/testgrid/pb/custom_evaluator (used here: https://github.com/GoogleCloudPlatform/testgrid/blob/v0.0.1-alpha.3/pb/config/config.pb.go#L24).

This comment has been minimized.

Copy link
@ixdy

ixdy Dec 9, 2019

Member

... though setting this to default does work. I wonder if the BUILD files that are being autogenerated are wrong somehow.

This comment has been minimized.

Copy link
@ixdy

ixdy Dec 9, 2019

Member

these lines seem somewhat suspicious:

DEBUG: /root/.cache/bazel/_bazel_root/92c657af61c81ec6a823dc4627a93ca5/external/bazel_gazelle/internal/go_repository.bzl:182:13: gazelle: gazelle: rule @com_github_googlecloudplatform_testgrid//cmd/summarizer:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//cmd/summarizer:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/state" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/state:state_go_proto and @com_github_googlecloudplatform_testgrid//pb/state:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//cmd/summarizer:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/summary" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/summary:summary_go_proto and @com_github_googlecloudplatform_testgrid//pb/summary:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//cmd/summarizer:go_default_test imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//cmd/summarizer:go_default_test imports "github.com/GoogleCloudPlatform/testgrid/pb/state" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/state:state_go_proto and @com_github_googlecloudplatform_testgrid//pb/state:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//cmd/summarizer:go_default_test imports "github.com/GoogleCloudPlatform/testgrid/pb/summary" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/summary:summary_go_proto and @com_github_googlecloudplatform_testgrid//pb/summary:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//cmd/updater:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//cmd/updater:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/state" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/state:state_go_proto and @com_github_googlecloudplatform_testgrid//pb/state:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//cmd/updater:go_default_test imports "github.com/GoogleCloudPlatform/testgrid/pb/state" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/state:state_go_proto and @com_github_googlecloudplatform_testgrid//pb/state:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//config/yamlcfg:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//config/yamlcfg:go_default_test imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//config:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//config:go_default_test imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//pb/config:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/custom_evaluator" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/custom_evaluator:custom_evaluator_go_proto and @com_github_googlecloudplatform_testgrid//pb/custom_evaluator:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//pb/custom_evaluator:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/test_status" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/test_status:test_status_go_proto and @com_github_googlecloudplatform_testgrid//pb/test_status:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//pb/response:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//pb/response:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/summary" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/summary:summary_go_proto and @com_github_googlecloudplatform_testgrid//pb/summary:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//pb/state:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//pb/updater:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/config" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/config:config_go_proto and @com_github_googlecloudplatform_testgrid//pb/config:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//pb/updater:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/state" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/state:state_go_proto and @com_github_googlecloudplatform_testgrid//pb/state:go_default_library. # gazelle:resolve may be used to disambiguate
gazelle: rule @com_github_googlecloudplatform_testgrid//pb/updater:go_default_library imports "github.com/GoogleCloudPlatform/testgrid/pb/summary" which matches multiple rules: @com_github_googlecloudplatform_testgrid//pb/summary:summary_go_proto and @com_github_googlecloudplatform_testgrid//pb/summary:go_default_library. # gazelle:resolve may be used to disambiguate

This comment has been minimized.

This comment has been minimized.

Copy link
@hoegaarden

This comment has been minimized.

Copy link
@fejta
@justaugustus justaugustus modified the milestones: v1.17, v1.18 Dec 7, 2019
@justaugustus

This comment has been minimized.

Copy link
Member

justaugustus commented Dec 9, 2019

For bazel brilliance:
/assign @fejta @ixdy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.