From f4abfb79611a784be95e648d2264ae105b90fb6d Mon Sep 17 00:00:00 2001 From: Simon Westphahl Date: Tue, 4 Aug 2020 11:15:33 +0200 Subject: [PATCH] Expire Github installation key 5 minutes earlier With the previous margin of 3min we were still seeing token expire exceptions during reporting or when moving Github events. Change-Id: Ifaa602e7cd9f81f8c57599d6e015a6a234f13682 --- zuul/driver/github/githubconnection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py index 33799aa54d..df3cb50406 100644 --- a/zuul/driver/github/githubconnection.py +++ b/zuul/driver/github/githubconnection.py @@ -951,7 +951,7 @@ class GithubClientManager: data = response.json() expiry = iso8601.parse_date(data['expires_at']) - expiry -= datetime.timedelta(minutes=3) + expiry -= datetime.timedelta(minutes=5) token = data['token'] self.installation_token_cache[installation_id] = (token, expiry)