RFR: 1295: CSRBot throws intermittent exception when looking up JiraIssue links [v2]
Erik Joelsson
erikj at openjdk.java.net
Mon Jan 3 21:52:10 UTC 2022
On Mon, 3 Jan 2022 18:32:54 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> 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.
>
> Erik Joelsson has updated the pull request incrementally with two additional commits since the last revision:
>
> - Merge branch 'SKARA-1295-csr-exception' of https://github.com/erikj79/skara into SKARA-1295-csr-exception
> - Overwrite old auth headers on retry
I believe I have it working now. Before retrying, the auth headers need to be explicitly overwritten. The currently used headers method just adds more values to the same headers, which the server will most likely not accept.
-------------
PR: https://git.openjdk.java.net/skara/pull/1268
More information about the skara-dev
mailing list