diff --git a/master/custom/release_dashboard.py b/master/custom/release_dashboard.py index 3f0c024d..7fb0f92f 100644 --- a/master/custom/release_dashboard.py +++ b/master/custom/release_dashboard.py @@ -1,5 +1,6 @@ import contextlib import datetime +import inspect import os import re import time @@ -19,11 +20,14 @@ import humanize from buildbot.data.resultspec import Filter +from buildbot.data.connector import DataConnector import buildbot.process.results N_BUILDS = 200 MAX_CHANGES = 50 +SUPPORTS_INCLUDE_TOTAL = 'include_total' in inspect.signature(DataConnector.get).parameters + # Cache result for 6 minutes. Generating the page is slow and a Python build # takes at least 5 minutes, a common build takes 10 to 30 minutes. There is a @@ -98,6 +102,8 @@ def dataGet(self, *args, **kwargs): """Call Buildbot API""" # Buildbot sets `buildbot_api` as an attribute on the WSGI app, # a bit later than we'd like. Get to it dynamically. + if SUPPORTS_INCLUDE_TOTAL: + kwargs['include_total'] = False return self._root._app.flask_app.buildbot_api.dataGet(*args, **kwargs) def __repr__(self):