RFR: 1295: CSRBot throws intermittent exception when looking up JiraIssue links

Erik Joelsson erikj at openjdk.java.net
Thu Dec 23 22:27:19 UTC 2021


This patch adds another retry condition for rest requests. When a rest call uses authentication but fails with 401 "unauthorized", we need to give it at least one more try. The authentication mechanism for JBS works with time limited tokens that sometimes need to be renewed. This can only be detected through failing with 401. On the retry, the dynamic authorization provider (authGen.getAuthHeaders()) will get to run again and will detect the stale token.

I'm currently running with this patch live for the affected bot and so far it's looking good, but I will leave it running a while more to make sure.

-------------

Commit messages:
 - Update RestRequest.java
 - Better retry
 - Add logging on retry
 - Retry on failed authorization. Tidy up logging.
 - Adding logging when JiraProject::issue fails
 - Add info to exception to better understand when things go wrong

Changes: https://git.openjdk.java.net/skara/pull/1268/files
 Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1268&range=00
  Issue: https://bugs.openjdk.java.net/browse/SKARA-1295
  Stats: 12 lines in 2 files changed: 10 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/skara/pull/1268.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/1268/head:pull/1268

PR: https://git.openjdk.java.net/skara/pull/1268


More information about the skara-dev mailing list