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

[WIP] go1.15beta1 support #197

Closed
wants to merge 1 commit into from

Conversation

justaugustus
Copy link
Member

@justaugustus justaugustus commented Jul 20, 2020

Signed-off-by: Stephen Augustus saugustus@vmware.com

/hold testing go1.15beta1 release for kubernetes/kubernetes#93264
cc: @kubernetes/release-engineering

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 20, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus

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

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 20, 2020
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 21, 2020
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 21, 2020
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 21, 2020
@@ -29,6 +34,57 @@ def configure(minimum_bazel_version = None, rbe_name = "rbe_default", go_version
protobuf_deps() # No options

go_rules_dependencies() # No options

go_download_sdk(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this optional as I believe it forces everyone to use 1.15beta1.

For example:

EXTRA_VERSIONS = {"go1.15beta1": {
  "darwin_amd64": ("go1.15beta1.darwin-amd64.tar.gz", "4ee49...bd7e"),
  "freebsd_386": ("go1.15beta1.freebsd-386.tar.gz", "77bc...5c94"),
  ...
}}

def configure(... extra_version=None):
  ...
  if extra_version:   
      go_download_sdk(name="go_sdk", sdks=EXTRA_VERSIONS[extra_version])
      go_register_toolchains(go_version = extra_version, nogo = nogo)
  else 
      go_register_toolchains(go_version = go_version, nogo = nogo)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this! Will do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed up!

go.mod Outdated
k8s.io/klog/v2 v2.0.0
github.com/golangci/golangci-lint v1.29.0
golang.org/x/build v0.0.0-20200720211405-d0191c8228ec
k8s.io/klog/v2 v2.3.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move all these version bumps to their own PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! This was more so yak shaving in support of the k/k go1.15 bump.

I'll split it out.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deps bump in #198.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 21, 2020
@justaugustus
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 21, 2020
@justaugustus justaugustus changed the title Add go_download_sdk call to support go1.15 pre-release versions Support specifying additional go_sdk versions for pre-release testing Jul 21, 2020
@k8s-ci-robot k8s-ci-robot added the sig/release Categorizes an issue or PR as relevant to SIG Release. label Jul 21, 2020
@justaugustus
Copy link
Member Author

Hey @jayconrod, I'm trying out your fix in 5616130 (bazelbuild/rules_go#2579), but getting some errors.

Have you seen this before: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/repo-infra/197/pull-repo-infra-tests/1286073407053500416

Is it maybe related to the fact that we're using the rules_go 0.22.z patch series instead of 0.23.z?

@justaugustus
Copy link
Member Author

/hold this isn't in a happy state right now

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 23, 2020
@justaugustus justaugustus changed the title Support specifying additional go_sdk versions for pre-release testing [WIP] Support specifying additional go_sdk versions for pre-release testing Jul 23, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 23, 2020
@justaugustus justaugustus changed the title [WIP] Support specifying additional go_sdk versions for pre-release testing [WIP] go1.15 support Jul 23, 2020
@justaugustus
Copy link
Member Author

c695b31 pulls in bazelbuild/rules_go#2579.

I'm going to keep this PR roughly in this state and tackle the alternate go versions support in a separate PR (since that was causing kubernetes/kubernetes#93264 to fail).

Example:

 DEBUG: Rule 'io_k8s_repo_infra' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1595370464 -0400"
DEBUG: Call stack for the definition of repository 'io_k8s_repo_infra' which is a git_repository (rule definition at /bazel-scratch/.cache/bazel/_bazel_root/7989b31489f31aee54f32688da2f0120/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
 - <builtin>
 - /home/prow/go/src/github.com/kubernetes/kubernetes/WORKSPACE:20:1
Loading: 0 packages loaded
Loading: 0 packages loaded
ERROR: /bazel-scratch/.cache/bazel/_bazel_root/7989b31489f31aee54f32688da2f0120/external/io_bazel_rules_go/go/private/sdk.bzl:251:9: Traceback (most recent call last):
	File "/home/prow/go/src/github.com/kubernetes/kubernetes/WORKSPACE", line 36
		repo_infra_configure(<2 more arguments>)
	File "/bazel-scratch/.cache/bazel/_bazel_root/7989b31489f31aee54f32688da2f0120/external/io_k8s_repo_infra/repos.bzl", line 91, in repo_infra_configure
		go_register_toolchains(<2 more arguments>)
	File "/bazel-scratch/.cache/bazel/_bazel_root/7989b31489f31aee54f32688da2f0120/external/io_bazel_rules_go/go/private/sdk.bzl", line 251, in go_register_toolchains
		fail(<1 more arguments>)
go_version set after go sdk rule declared (go_sdk)
ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': error loading package 'external': Could not load //external package
ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': error loading package 'external': Could not load //external package 

@jayconrod
Copy link

Is it maybe related to the fact that we're using the rules_go 0.22.z patch series instead of 0.23.z?

@justaugustus Yes, that looks like the problem. In @io_k8s.repo_infra//:repos.bzl, a the repository org_golang_x_tools is declared at a specific version, and the patch @io_bazel_rules_go//third_party:org_golang_x_tools.patch is applied. That patch changes with the newer version of rules_go, and it no longer applies cleanly to this version.

I'll backport this fix and tag a 0.22.x point release today, so hopefully you won't need to update anything else.

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
@justaugustus
Copy link
Member Author

(Rebased to pull in rules_go@v0.22.9 --> #201)

@justaugustus
Copy link
Member Author

Superseded by #202.
go1.15beta1 support available in https://github.com/kubernetes/repo-infra/releases/tag/v0.0.9 (via override_go_version)
/close

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2020
@k8s-ci-robot
Copy link
Contributor

@justaugustus: PR needs rebase.

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.

@k8s-ci-robot
Copy link
Contributor

@justaugustus: Closed this PR.

In response to this:

Superseded by #202.
go1.15beta1 support available in https://github.com/kubernetes/repo-infra/releases/tag/v0.0.9 (via override_go_version)
/close

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.

@justaugustus justaugustus changed the title [WIP] go1.15 support [WIP] go1.15beta1 support Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/release Categorizes an issue or PR as relevant to SIG Release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants