regression_without_regressed_by: consider unaccessible bugs as invalid (#612)

This commit is contained in:
calixteman 2019-04-26 16:14:28 +02:00 коммит произвёл GitHub
Родитель e14a7606c0
Коммит 5241de50b0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -54,6 +54,7 @@ class RegressionWithoutRegressedBy(BzCleaner):
def history_handler(bug, data):
bugid = bug['id']
treated.add(bugid)
resolved_before = False
for h in bug['history']:
if resolved_before:
@ -68,6 +69,7 @@ class RegressionWithoutRegressedBy(BzCleaner):
data.add(bugid)
invalids = set()
treated = set()
Bugzilla(
bugids=list(all_deps),
include_fields=['id', 'keywords', 'cf_last_resolved'],
@ -77,6 +79,10 @@ class RegressionWithoutRegressedBy(BzCleaner):
historydata=invalids,
).get_data().wait()
# Some bugs aren't accessible so they won't appear in treated (all_deps - treated)
# Since we don't have any info about them, then we consider them as invalid
invalids |= all_deps - treated
for bugid, info in bugs.items():
info['deps'] -= invalids

Просмотреть файл

@ -1,4 +1,4 @@
<p>The following {{ plural('bug is', data, pword='bugs are') }} a regression and some dependencies:
<p>The following {{ plural('bug is', data, pword='bugs are') }} a regression and {{ plural('has', data, pword='have') }} some dependencies but regressed_by is empty:
<table {{ table_attrs }}>
<thead>
<tr>