-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Include version number in extracted path #78
Conversation
Friendly ping. This PR would help to make sure you are always using the version you think you are using. |
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.
This is pretty neat! Code looks good to me.
@Ardesco I think this is worth adding. |
The code used to do this ages ago. It was removed because you ended up with loads of different driver versions downloaded to your file path that never got cleared out. They weren't cleared out because when the RepositoryMap.xml is updated people rarely keep the old driver version in there so you don't have any history. You can't just delete the directory/parent directory you are downloading to because it's not guaranteed to only be used by this plugin because it can be configured to point anywhere. It also adds more complexity to the code to try and be a good citizen and clear out old driver versions you are aware about but no longer want to have. There are more problems:
The more sensible solution will be something along the lines of writing a version.txt showing what you think the version is based on the version in the RepositoryMap.xml |
Alright. I don't see why it is a problem though that old versions would be kept around unless you go and delete them manually. My |
Assuming we don't care about cleanup you still have the rest of the problems noted above. Remember there is no guarantee that the version number used actually relates to the version of the binary you are downloading. We could save the binaries to a folder that matches the hash of the file, that would guarantee that the binary in the folder is the expected one, but a file hash isn't very meaningful. I find that giving people wrong information is worse than not providing information at all, this PR will provide people with information that can quite easily be wrong. You will know what version of a driver binary is used when you run your tests anyway, thanks to output like this:
I agree that your solution would work in a happy path scenario. However I think it would cause more confusion in the long run and I would expect to see bugs raised along the lines of:
If you can convince me otherwise and provide code to mitigate the listed problems I'll happily look at it again, we are in danger of adding complex code into the codebase that provides very little utility though. |
Whatever goes in the extracted path, I would like to be able to propagate this to Java/Selenium when it is executing. Currently I am setting And already this is hard to make OS independent, as the Java code needs to know about the path choices of this plugin here. Better to propagate it somehow, e.g. use |
Discussion for the extracted path is in comments for #89 |
Fixes #26