-
Notifications
You must be signed in to change notification settings - Fork 45
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
Possibly bad uuid generator in dependencies #13
Comments
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/108581258. |
hey @aarondl I'm looking at the V4 implementation in I'm also cross-posting this question to nu7hatch/gouuid#28 Thanks! |
@rosenhouse I'll admit I hadn't looked into the code directly. Now I have and there seems to be little difference in the v4 code. Having said that the other reasons I had opened this issue is that there are still a number of issues opened against that library as well as several pull requests (some dealing with spec compliance). The last commit was Dec 21, 2013 while the other package was updated as recently as 28 days ago. Some of the more serious open issues include:
This library doesn't use gofmt or go lint: I think there's a pretty strong case to discard this library (and I don't think smoke-tests is the only thing in CF to be using it, fairly sure I saw it elsewhere too). Both are licensed MIT so there shouldn't be any trouble switching. |
@aarondl Can you please submit a pull request with the library that fits the best? |
Can do. I probably should have done so from the start, but as a new contributor to CF I've been favoring opening discussions before PR's to make sure I'm not doing anything people would object to :) Expect PRs on gorouter, hm9000, statsd-injector and smoke-tests in the near future to remove this dependency from cloudfoundry. |
Hey @aarondl @ematpl brings up a good point, namely that the I believe your motivating concern here is licensing issues (the This PR: satori/go.uuid#12 introduced code to make it panic during |
After perusing the Go source code, it's clear that the only way Since we can't proceed in our program when we're unable to create a UUID in almost any situation the only solution then becomes to retry. And it feels so rare that /dev/urandom would fail, or that it could recover after a period of time if it were to fail. I think the library does the correct thing in using panic here. Sometimes you don't want your program to be able to continue, when /dev/urandom fails is probably one of them. In addition there are many other users of this library and performing a breaking change on their API so we could use it here doesn't seem appropriate. I'd prefer to use the library as is, as a panic is certainly better than a silent error that will occur in the current library being used in these CF components. |
Argh. I have to retract the previous comment as I had read the wrong chunk of code, there is no silent error. Even so I can't really break the API of the other library, so we can go ahead and close this issue. Sorry for the noise! |
I would argue to
If you don't feel comfortable suggesting that change to |
I somewhat agree. But I definitely won't be the one to suggest breaking API changes in order to get it in. Once I realized my mistake and that there's no silent error, I'm much less concerned about getting the library switched out. As unmaintained and potentially bad as gouuid is, it looks like for the small chunk of what CF uses it for, it might be good enough! |
gouuid is being used by this package but there's an open issue against it claiming that it doesn't correctly generate uuids.
See: nu7hatch/gouuid#28
Apart from that it seems like it's a generally unmaintained piece of software with the latest commit being 2 years ago.
The issue suggests moving to: https://github.com/satori/go.uuid
The text was updated successfully, but these errors were encountered: