Skip to content
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

Double check SNAPSHOT version plugins are the latests #74

Open
greenwoodma opened this issue Mar 20, 2019 · 6 comments
Open

Double check SNAPSHOT version plugins are the latests #74

greenwoodma opened this issue Mar 20, 2019 · 6 comments

Comments

@greenwoodma
Copy link
Contributor

Currently, a new SNAPSHOT of a plugin can be available via (say) repo.g.a.u but not get loaded into GATE because it's not been 24 hours since GATE last checked for a new version. Should we force a check to make sure we have the latest version, but only when we actually are asked to load the plugin.

@johann-petrak
Copy link
Contributor

Why not? What would be the disadvantage of always making sure the user gets the latest version?
On the other hand, there are severe disadvantages of having that 24 hours limit for a snapshot version, most importantly that it makes it very difficult to let users test changes. Especially users who are not familiar with deleting their maven cache etc.
In my opinion, snapshot versions from our repo should always be used at their latest version at the moment of use.

@ianroberts
Copy link
Member

Nice idea in theory but it means that every installation of GATE (Developer and Embedded) would have to contact repo.g.a.u every time it attempts to query any snapshot version of any plugin. The standard Maven defaults are a compromise between freshness for users and bandwidth for the repository.

@greenwoodma
Copy link
Contributor Author

A compromise, might be a button in the plugin manager allowing you to flush the maven cache of a given plugin. This would allow the user to hit a button before loading the plugin to ensure they got the latest version.

It would also solve the related problem that occurs if a jar gets corrupted on download (and yes I've seen this a few times) which stops the plugin loading. Currently the only way to fix that is to manually delete the maven cache files.

@johann-petrak
Copy link
Contributor

johann-petrak commented Jul 10, 2019

I still do not see the problem. We are talking about snapshot versions only, or actually snapshot versions of plugins from the uk.ac.gate group only and contacting means querying for a hash.
We discourage (I think) using snapshot version, we do not offer them in the plugin manager of GATE releases, so how big an impact would that actually be? My suggestion would be to simply allow checking every time now, look at the logs and if this actually ever becomes a problem the work to implement the button and tell people about this can still be done then.

But having that button to deal with a corrupted jar would definitely be useful, apparently this is something maven (or whichever library is responsible) oddly does allow to happen, many decades after people figured out how to deal with transactions and make sure that something is downloaded completely or not at all.

@greenwoodma
Copy link
Contributor Author

Given we need the button to clear out the cached copy for the more problematic situation of corrupt plugins, I think it makes more sense to just make it clear the same button can be used to force the latest snapshot version.

To be honest both cases are rather rare, and forcing the extra check in every time we load a snapshot plugun seems like taking a sledgehammer to a nut.

@johann-petrak
Copy link
Contributor

Still cannot see why checking the hash for a rare snapshot version would be a sledgehammer, do we have any data about how often anyone outside the GATE team actually uses uk.ac.gate.plugins plugin snapshots? This is essentially the same strategy as used for checking the browser cache for a larg part of web pages.
In my opinion, making stuff just work as expected should be the default, rather than having to tell people about cache-clearing and other technical details which they should not be aware of in most cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants