-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 golang support to 1.10 - Fixing "cannot use nil as type _Ctype_CFDataRef in assignment" problem #2869
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: stantonxu Assign the PR to them by writing 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 |
Can one of the admins verify this patch? |
We can't make changes to the vendor directory directly like this. Can you try updating the dep instead of doing this? |
@dlorenc , thanks for quick review. Could you please give me more hints about how to update the dep? Where to check it? |
@dlorenc I spent whole afternoon, trying to figure out how to update dep for minikube. It looks that the code structure of google/certificate-transparency-go is different than the folder in minikube. How to update the dep, could you give some hint? |
The flow to update a dependency is basically the same as the one specified here: This one is a bit tricky since as you point out, certificate-transparency has changed quite a bit. You'd have to find whatever is calling the old version of it, and update that (recursively) until nothing is using that old package anymore. |
@dlorenc I see the difference about the "github.com/google/certificate-transparency..." vendor dep content in the Godeps.json files of the Kubernetes project and minikube project. In Kubernetes, it already uses the newest version (certificate-transparency-go), which handle the initialization of the CFDataRef type (which caused the original issue of this PR).
In minikube project, it still uses the old version (certificate-transparency),
Can I just simply replace the minikube vendor about it with the newest one of Kubernetes? Or maybe do a dep update in minikube for all the google/certificate-transparency deps? |
Yeah, you'll basically need to update all the deps in minikube that rely on google/certificate-transparency, then update google/certificate-transparency itself. |
@dlorenc is there a way (a command or so) to check if there are other deps rely on google/certificate-transparency? Or do I need to look into the Godeps.json files for each of the vendor dep and recursively to find it out? That will be huge amount of work. |
I just simply did search in whole minikube project, found out that only another dep "github.com/cloudflare/cfssl" is using "google/certificate-transparency/go". In the newest version of "github.com/cloudflare/cfssl", it is already using "google/certificate-transparency-go" instead. So I guess the task turns to update vendor dep "github.com/cloudflare/cfssl". Working on it now. |
@dlorenc , so basically it is a compatibility problem, due to google/certificate-transparency-go#131 I see that Kubernetes has already bump Do we have any plan when we will make minikube compatible with Go 1.10? I tried to update dep
General question, is it safe just update all vendor deps of minikube, instead of investigating each of them one by one? That's huge amount of work. |
It looks like that PR to kubernetes was merged after 1.10, so we'll need to wait until Minikube either stops vendor kubernetes (#2870) or until we update to k8s 1.11. |
@dlorenc although we are wait until Minikube either stops vendor kubernetes (#2870) or until we update to k8s 1.11 per your suggestion, I am trying to update the However
Could you please help give me some hints? My godep is at v79, and go is at 1.9.6 |
@dlorenc , do you have some time to look at my latest comment above? I could use some help here to move forward. Thanks. |
Hey, I think I mentioned this earlier somewhere, but I don't think you're going to be able to update the cfssl dependency. Minikube currently vendors k8s 1.10, which is pinned to the older version of the library. We'd need to patch k8s 1.10, updated to 1.11 or just delete the vendored code. |
Thanks, @dlorenc . When we have the plan to upgrade to 1.11 or delete the vendored code, please let me know. I would like to continue and follow upon this PR, either commit corresponding changes or close it. |
Golang version bump up being addressed by #2777, closing this PR. |
'make test' failed on the HEAD of Jun 4, 2018, due to issue #2860
Fixed the problem here by removing "nil" from the assignment to CFDataRef