Skip to content

Check for golang 1.8. - #15367

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
adelton:check-go-1.8
Aug 15, 2017
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
adelton:check-go-1.8

Conversation

@adelton

@adelton adelton commented Jul 20, 2017 •

Copy link
Copy Markdown
Contributor

Fixes #15270

Addressing

[INFO] Detected go version: go version go1.8.3 linux/amd64.
[ERROR] Please install Go version 1.7 or use PERMISSIVE_GO=y to bypass this check.

with

$ rpm -q golang
golang-1.8.3-2.fc26.x86_64
$ go version
go version go1.8.3 linux/amd64

@tiran

tiran commented Jul 20, 2017

Copy link
Copy Markdown
Contributor

You might want to update hack/verify-gofmt.sh, too. The script contains the comment TODO skip the version check until we update for 1.8.

@enj

enj commented Jul 20, 2017

Copy link
Copy Markdown
Contributor

@stevekuznetsov

@stevekuznetsov

Copy link
Copy Markdown
Contributor

Fixes #15270

Would love to see this DRYed out into a common function. You might find you need to update the CI AMIs as well. The alternative is to remove all checking (which David meant to do).

@adelton

adelton commented Jul 20, 2017

Copy link
Copy Markdown
Contributor Author

The #15270 says "fix disable go version checking" which I read as "bring the go version checking back".

So are we to bring it back or remove the version checks completely?

local go_version
go_version=($(go version))
if [[ "${go_version[2]}" != go1.7* ]]; then
if [[ "${go_version[2]}" != go1.8* ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

have the vendored builds been updated to work with go1.8? I know there was fixup work in kube that was needed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also disregard my comment about a common utility. I misread the diff and thought all these changes were in Origin. NACK to changing these vendored files - we should let them change as we rebase newer versions of the dependencies.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed changes from cmd/cluster-capacity/go/src/github.com/kubernetes-incubator/cluster-capacity/hack/lib/util/golang.sh and cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog/hack/lib/util/golang.sh, only changing hack/lib/util/golang.sh.

@stevekuznetsov

Copy link
Copy Markdown
Contributor

We disabled the check as we didn't have a way to update it on one set of AMIs to be at 1.7 for master and 1.8 for the rebase. If this is not an immediately pressing issue for you, please let me handle it when I'm back from PTO next week.

@adelton

adelton commented Jul 24, 2017

Copy link
Copy Markdown
Contributor Author

Rebased on master, only changing hack/lib/util/golang.sh now -> ef5233f.

@adelton

adelton commented Jul 24, 2017

Copy link
Copy Markdown
Contributor Author

We disabled the check

I came across the error when running make check, so presumably in that code path it did not get disabled.

@openshift-merge-robot openshift-merge-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 24, 2017
@openshift-merge-robot openshift-merge-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 28, 2017
soltysh
soltysh previously requested changes Aug 4, 2017

@soltysh soltysh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You need to update here as well. The check you've fixed is only used in verification scripts, but build needs update as well.

@adelton
adelton dismissed soltysh’s stale review August 7, 2017 08:18

I don't claim this change is all that is needed. I've hit issue when running make check. I never hit that binaries.sh code path, that's why I'm not proposing change there.

@adelton

adelton commented Aug 7, 2017

Copy link
Copy Markdown
Contributor Author

Another question is, why are there two distinct check codes (and values) there for seemingly the same thing? Shouldn't hack/lib/build/binaries.sh be using the code from hack/lib/util/golang.sh.

@soltysh

soltysh commented Aug 8, 2017

Copy link
Copy Markdown
Contributor

You're free to fix it that way :)

@adelton

adelton commented Aug 14, 2017

Copy link
Copy Markdown
Contributor Author

Actually, one check is about equality and the other checks "less than", so I just bumped the version value in both places.

Plus rebased on master -> a0ff440.

@soltysh

soltysh commented Aug 14, 2017

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 14, 2017
@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 14, 2017
@adelton

adelton commented Aug 14, 2017

Copy link
Copy Markdown
Contributor Author

/retest

Comment thread hack/lib/util/golang.sh Outdated
os::log::info "Detected go version: ${go_version[*]}."
if [[ -z "${PERMISSIVE_GO:-}" ]]; then
os::log::error "Please install Go version 1.7 or use PERMISSIVE_GO=y to bypass this check."
os::log::error "Please install Go version 1.8 or use PERMISSIVE_GO=y to bypass this check."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs to be os::log::fatal -- the conversation earlier was re: the fact that David made this check a no-op in the reabse (see the return 0 below).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added revert of 715e2f6 to this pull request -> 988a8db.

The original approach used os::log::error + return 1 so I did stick to that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please use os::log::fatal. The original impl was correct when it was written, before os::log::fatal existed, but is not now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed to os::log:fatal, rebased -> cc3b0b0.

@openshift-merge-robot openshift-merge-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 14, 2017
@adelton

adelton commented Aug 15, 2017

Copy link
Copy Markdown
Contributor Author

/retest

@stevekuznetsov

Copy link
Copy Markdown
Contributor

Please squash before we label to merge

@adelton

adelton commented Aug 15, 2017

Copy link
Copy Markdown
Contributor Author

Squashed into ad2f005.

Comment thread hack/lib/util/golang.sh Outdated
os::log::error "Please install Go version 1.7 or use PERMISSIVE_GO=y to bypass this check."
return 0
os::log::fatal "Please install Go version 1.8 or use PERMISSIVE_GO=y to bypass this check."
return 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nix this line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed, rebased on master -> d5ed80b.

* Addressing
[INFO] Detected go version: go version go1.8.3 linux/amd64.
[ERROR] Please install Go version 1.7 or use PERMISSIVE_GO=y to bypass this check.

with

$ rpm -q golang
golang-1.8.3-2.fc26.x86_64
$ go version
go version go1.8.3 linux/amd64

* Revert "disable go version checking"

This reverts commit 715e2f6.

* Using os::log::fatal -- the original impl was correct when it was
written, before os::log::fatal existed, but is not now.
@stevekuznetsov

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2017
@openshift-merge-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adelton, soltysh, stevekuznetsov

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

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 15, 2017
@adelton

adelton commented Aug 15, 2017

Copy link
Copy Markdown
Contributor Author

/test extended_conformance_gce

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

Automatic merge from submit-queue

@openshift-merge-robot
openshift-merge-robot merged commit 3b97f2c into openshift:master Aug 15, 2017
@adelton
adelton deleted the check-go-1.8 branch September 8, 2017 06:55
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. lgtm Indicates that a PR is ready to be merged. retest-not-required size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants