-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add caching of downloaded plugins + remove -plugin retry hack + fix master #94
Conversation
} | ||
|
||
try (CloseableHttpClient httpclient = HttpClients.custom().useSystemProperties() | ||
.addInterceptorLast((HttpRequestInterceptor) (request, context) -> { | ||
throw new IOException("Retry on any failure"); |
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 was always causing an exception to be thrown before, which meant every request was retried and then it failed after 3 times
plugin-management-library/src/main/java/io/jenkins/tools/pluginmanager/impl/PluginManager.java
Show resolved
Hide resolved
try { | ||
Files.createDirectories(refDir.toPath()); | ||
FileUtils.deleteDirectory(refDir); |
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.
What if there are already plugins in the ref dir? Some people copy plugins into the refDir and then run the install plugins to add additional ones from the update center. This would not allow that usage case.
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.
Do it after the install plugins runs?
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.
Its either that or we need to download plugins somewhere else and then move them when completed, but this is definitely the easiest fix on our side
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.
FTR #173
plugin-management-library/src/main/java/io/jenkins/tools/pluginmanager/impl/PluginManager.java
Outdated
Show resolved
Hide resolved
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.
LGTM this seems cleaner than providing hacks 👍
No description provided.