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

Add caching of downloaded plugins + remove -plugin retry hack + fix master #94

Merged
merged 5 commits into from
Jun 3, 2020

Conversation

timja
Copy link
Member

@timja timja commented May 17, 2020

No description provided.

@timja timja requested review from slide and stopalopa May 17, 2020 11:06
@timja timja added bug Something isn't working enhancement New feature or request labels May 17, 2020
}

try (CloseableHttpClient httpclient = HttpClients.custom().useSystemProperties()
.addInterceptorLast((HttpRequestInterceptor) (request, context) -> {
throw new IOException("Retry on any failure");
Copy link
Member Author

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

try {
Files.createDirectories(refDir.toPath());
FileUtils.deleteDirectory(refDir);
Copy link
Member

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.

Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR #173

Copy link
Member

@jetersen jetersen left a 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 👍

@timja timja merged commit a5b9fc5 into jenkinsci:master Jun 3, 2020
@timja timja deleted the add-caching branch June 3, 2020 10:12
@oleg-nenashev oleg-nenashev changed the title Add caching + remove -plugin retry hack + fix master Add caching of downloaded plugins + remove -plugin retry hack + fix master Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants