Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions master/custom/release_dashboard.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import contextlib
import datetime
import inspect
import os
import re
import time
Expand All @@ -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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include_total does not currently exist in the buildbot/buildbot repo; which version is it from?



# 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
Expand Down Expand Up @@ -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):
Expand Down