-
Notifications
You must be signed in to change notification settings - Fork 86
Remove USE_GO_VERSION_FROM_WEBSITE flag from dockerfile #2376
Remove USE_GO_VERSION_FROM_WEBSITE flag from dockerfile #2376
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2376 +/- ##
==========================================
- Coverage 69.84% 67.57% -2.27%
==========================================
Files 171 182 +11
Lines 17054 17859 +805
==========================================
+ Hits 11911 12069 +158
- Misses 3972 4615 +643
- Partials 1171 1175 +4
Continue to review full report at Codecov.
|
We should not use go from website in our builds. It's OK to use it for tests though. |
Yes agreed. We will fix that separately. The intent of this PR is to get rid of the flag in dockerfile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need two different ways of installing golang.
Just as an explanation for why we have that flag: We wanted to have a way to use the go test cache which wasn't available at that time from the version that centos provided. That is why I've added the flag so we can make use of a newer golang version when we run our coverage builds. That was the only place in which we've used it.
@jarifibrahim please confirm that we have a version of Go available in CentOS that supports the go test cache. Otherwise our coverage builds will be much slower if we remove that flag now.
See this PR for more information about the time improvements:
Apart from the above concern for why we added the flag initially, I would like to keep it because we never know what bits will be there that need testing only in a special case, that's why the flag was explicitly kept so generic. Just because we might no longer need it now, I would still like to keep the flag so we can have a smooth transitions to Go modules (@sbose78 @alexeykazakov @xcoulon ).
As far as I know, this flag doesn't hurt anybody, does it?
@kwk +1 |
@alexeykazakov @kwk some background: openshiftio/openshift.io#4631 (comment) Btw, we haven't decided on removing this yet - we are experimenting. |
@kwk @alexeykazakov We decided (see https://chat.openshift.io/developers/pl/d9m8pheuhpywzpyo5qd91nuf7h) to remove the flag because we have two builds
both of them are using different versions of golang. Interestingly, if you look at all the builds before build 612, we were installing golang 1.10 (via the website) but golang 1.9.4 was being used to build/test (Search for
@kwk This PR changes nothing. We have been installing golang from the website all this time and after the flag is removed we will still be installing golang from the website. I have only removed the flag. Everything else remains the same.
@kwk the flag isn't adding any value right now. Removing it would mean we don't have any confusion about where/what version of golang is being installed. If we need to use a different version of golang, we could change it. It won't be that |
[test] |
Yes, you always install golang 1.10 from website (due to bug in docke builder file) but when golang was available in centos (it was when 612 was built) it was installed first and you ended up having two go binaries in PATH. But go 1.9 was first so it was used. By the time 614 was built golang package had been removed from centos. So, only go from website (1.10) was installed. This is why you see go 1.10 in 614. |
So the installation of both, go 1.10 and go 1.9 in the builder container was intentional? I thought we were installing only one of those. |
No, it was not intentional. It's a bug. Incorrect usage of Look at fabric8-services/fabric8-cluster#47 for example as an option for fixing that. |
@alexeykazakov thanks for pointing to that PR. @jarifibrahim can you make a fix according to that one instead? I object to remove the flag entirely! |
Closing this PR in favour of #2378. |
This PR removes the
USE_GO_VERSION_FROM_WEBSITE
flag from the dockerfile. We don't need two different ways of installing golang.