From 95e35dde90212e3b351369bcb14448a1f78f6650 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 13 Jan 2021 13:11:06 +0100 Subject: [PATCH] [IMP] runbot_merge: logging when bumping timeout I'd forgotten that in order to better handle cases where the CI is highly backed up (and / or slow for some reason), we actually update the CI timeout to really take the last "pending" status as the "true start" of the CI. This might explain why lots of stagings needed extra time: as of right now, out of 28835 stagings - 20086 had their timeout bumped by more than 15mn - 6967 had their timeout bumped by more than 30mn - 264 had their timeout bumped by more than 1h - 30 had their timeout bumped by more than 2h Add some logging every time the CI is bumped this way, so we have better visibility into that event. Closes #429 --- runbot_merge/models/pull_requests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/runbot_merge/models/pull_requests.py b/runbot_merge/models/pull_requests.py index 62319607..6e300d53 100644 --- a/runbot_merge/models/pull_requests.py +++ b/runbot_merge/models/pull_requests.py @@ -1670,6 +1670,7 @@ class Stagings(models.Model): vals = {'state': st} if update_timeout_limit: vals['timeout_limit'] = fields.Datetime.to_string(datetime.datetime.now() + datetime.timedelta(minutes=s.target.project_id.ci_timeout)) + _logger.debug("staging %s: got pending status, bumping timeout to %s (%s)", vals['timeout_limit'], cmap) s.write(vals) def action_cancel(self):