f4lco / libyear-gradle-plugin

A simple measure of dependency freshness.
https://github.com/f4lco/libyear-gradle-plugin
23 stars 3 forks source link

Add retry on server errror 502 #16

Open koppor opened 4 months ago

koppor commented 4 months ago

In case of large projects, maven central response with 502.

See https://github.com/koppor/jabref/pull/686 for a non-MWE.

Cannot determine dependency age for "com.vladsch.flexmark:flexmark-util-html:0.64.8" and repository "MavenRepo" (reason: IOException: Response for URL https://search.maven.org/solrsearch/select?q=g%3A%22com.vladsch.flexmark%22%20AND%20a%3A%22flexmark-util-html%22 returned 502).

I think, a "simply" retry after 3 seconds should be done in the case if 502 is returned.

f4lco commented 4 months ago

Hello @koppor, thank you for your feedback. This project is accepting contributions, and your suggestion seems worthwhile. Would you feel confident implementing a retry for a status code of 502?

koppor commented 4 months ago

@f4lco Yeah, I feel confident. I put it on my TODO list after the (unrelated) issue https://github.com/openrewrite/rewrite/issues/4054 :)