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

⚠️ Bump to Go 1.13 #606

Merged
merged 5 commits into from
Feb 5, 2020
Merged

Conversation

joelanford
Copy link
Member

@joelanford joelanford commented Sep 17, 2019

This PR builds on #598 by completing more of the tasks listed in #590:

  • Prune any uses of xerrors (8932099)
  • Use %w instead of %v in Errorf (fc42a0a)
  • Prune uses of GO111MODULE=on from our scripts (e0a1fbb)

(note: we already did a soft-bump to 1.13 the previous release, this just starts using the features)

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 17, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @joelanford. Thanks for your PR.

I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 17, 2019
@alvaroaleman
Copy link
Member

/ok-to-test

In order for the tests to use go 1.13, the image needs to be bumped here: https://github.com/kubernetes/test-infra/blob/e0a1e8e0d0f947087e7b8295f49b21d772f7a070/config/jobs/kubernetes-sigs/controller-runtime/controller-runtime-presubmits.yaml#L13

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 17, 2019
@DirectXMan12
Copy link
Contributor

(removed my at-mention from the PR description -- that causes all sorts of issues when it merges)

hack/check-everything.sh Outdated Show resolved Hide resolved
@@ -70,7 +70,7 @@ function fetch_go_tools {
header_text "Checking for gometalinter.v2"
if ! is_installed golangci-lint; then
header_text "Installing golangci-lint"
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/[email protected]
go get github.com/golangci/golangci-lint/cmd/[email protected]
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this isn't changing current behavior, but maybe this tool should be installed with GO111MODULE=off? The current version will add this as a dependency to go.mod cluttering the file. We don't really want to carry a lint tool as a dependency and someone might accidentally commit it.

Related golang/go#30515

Copy link
Member Author

@joelanford joelanford Sep 18, 2019

Choose a reason for hiding this comment

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

I agree that it isn't great to clutter and inadvertantly change go.mod. The GO111MODULE=off approach doesn't work though:

$ ./hack/check-everything.sh
using tools
Checking for golangci-lint
Installing golangci-lint
go: cannot use path@version syntax in GOPATH mode

Instead, I updated ./hack/check-everything.sh to use the curl/goreleaser installation method that's used elsewhere. Was there some reason we weren't using that here?

Copy link
Contributor

Choose a reason for hiding this comment

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

The GO111MODULE=off approach doesn't work though

Ah, yes, because of the version. Got it.

Was there some reason we weren't using that here?

If I have to guess, it was done before go modules were introduced and it never changed.

@joelanford
Copy link
Member Author

No huge rush here, but this is still waiting on kubernetes/test-infra#14373.

I think that should pass CI and be able to be merged without breaking master on controller-runtime, but I'm not positive.

@DirectXMan12 can you add ok-to-test to kubernetes/test-infra#14373 when you get a chance?

@alvaroaleman
Copy link
Member

@joelanford Does it make sense to have two presubmits, one with go 1.12 for the release-0.2 branch and one with go 1.13 for the master branch or can we safely assume that the presubmit with go 1.13 will work on both?

@joelanford
Copy link
Member Author

@alvaroaleman I see no reason it would not work on both. But the question in my mind is whether this PR will necessitate moving to v0.3.0 (I think not, but I'm not sure).

If we jump to v0.3.0 after this merges, it would probably make sense to continue using go1.12 for the release-0.2 branch.

If we just continue to v0.2.3 after this merges, then the next commit on release-0.2 will need go1.13, so I think there would be no reason to have a separate presubmit, unless there's a chance that we backport a bug fix to release-0.2 without releasing everything else on master.

@DirectXMan12
Copy link
Contributor

We probably want to make sure we don't break go1.12 on release-0.2 -- IMO, we'll want to go to v0.3.0 for go1.13, but I'm not certain exactly how we want to deal with language version bumps.

@DirectXMan12
Copy link
Contributor

What do other people think, especially end consumers of CR? Is go-1.13 in all the major distros at this point yet?

@joelanford joelanford force-pushed the go-1.13 branch 2 times, most recently from 5081bf2 to 070701a Compare October 17, 2019 04:48
@joelanford
Copy link
Member Author

Just updated kubernetes/test-infra#14373 to have separate builds for each branch and to bump master to use go 1.13.

I also updated this PR to move from xerrors (which we introduced in the DynamicRESTMapper PR) to errors.

Anything else we should handle here?

DirectXMan12 added a commit to DirectXMan12/controller-runtime that referenced this pull request Nov 15, 2019
This soft-bumps to Go 1.13.  Mandatory Go 1.13 changes may follow in
future point releases (e.g. kubernetes-sigs#606).
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 15, 2020
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jan 22, 2020

@joelanford: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-controller-runtime-test 070701a link /test pull-controller-runtime-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.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 28, 2020
@DirectXMan12 DirectXMan12 self-assigned this Feb 5, 2020
@DirectXMan12
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 5, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12, joelanford

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2020
@k8s-ci-robot k8s-ci-robot merged commit b97ebda into kubernetes-sigs:master Feb 5, 2020
@joelanford joelanford deleted the go-1.13 branch March 16, 2020 17:32
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

6 participants