Merge lp:~vorlon/lp-ftbfs-report/report-only-regressions into lp:~wgrant/lp-ftbfs-report/production

Proposed by Steve Langasek
Status: Merged
Merged at revision: 64
Proposed branch: lp:~vorlon/lp-ftbfs-report/report-only-regressions
Merge into: lp:~wgrant/lp-ftbfs-report/production
Diff against target: 68 lines (+44/-0) (has conflicts)
1 file modified
source/build_status.py (+44/-0)
Text conflict in source/build_status.py
To merge this branch: bzr merge lp:~vorlon/lp-ftbfs-report/report-only-regressions
Reviewer Review Type Date Requested Status
Matthias Klose Pending
William Grant Pending
Review via email: mp+343232@code.launchpad.net

Commit message

Currently the archive rebuild reports list build failures that are not regressions vs the main archive. This is pointless redundancy and makes it difficult to identify which results should actually receive attention. The test archive rebuild reports should be focused on doing one thing well, namely identifying packages in the main archive that are not currently maintainable because they fail to build.

If someone feels these build failures should still be shown in the report, then I would at least want to categorize these separately in the output. But I don't think they belong here at all.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

As a data point, a test run of the report for test-rebuild-20180408-bionic resulted in a 16% reduction in packages reported for main (45->36), and a 22% reduction for universe (1285->1002).

Revision history for this message
Steve Langasek (vorlon) wrote :

However, I also have at least one bug here, because the brltty build failure is only reported for armhf when it affects all architectures (http://qa.ubuntuwire.org/ftbfs/rebuilds/test-rebuild-20180408-bionic.html).

Revision history for this message
Steve Langasek (vorlon) wrote :

ok, the "only reported for armhf" is because (not obviously to me) the results of previous runs are cached in a way that means if you change the list of architectures you're running it for, it doesn't properly update the results.

So the only remaining thing I'm looking at is to check the runtime impact of the added checks.

62. By Steve Langasek

cache the walking of build results for the main archive to speed up the report

Revision history for this message
Steve Langasek (vorlon) wrote :

New commit speeds up a full report run to where we pay only a ~2.5x runtime penalty for the added processing, instead of ~3.3x. I don't see an obvious way to eke out much more.

Saw some failures incorrectly go missing from the report earlier in testing which I can now no longer reproduce. But this may be worth spot-checking a few more runs before landing.

Presently, the amended results are 40->38 packages for main (only firefox and thunderbird now dropped out), but 1424->1152 for universe.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'source/build_status.py'
2--- source/build_status.py 2018-04-13 08:43:59 +0000
3+++ source/build_status.py 2018-04-16 19:53:26 +0000
4@@ -149,6 +149,7 @@
5 else:
6 return list(self.packagesets.difference((name,)))
7
8+<<<<<<< TREE
9 def getTeams(self, name=None):
10 '''Return the list of teams without the team `name`.'''
11 if name is None:
12@@ -156,6 +157,36 @@
13 else:
14 return list(self.teams.difference((name,)))
15
16+=======
17+class BuildsForMain(object):
18+ _cache = dict()
19+
20+ def __new__(cls, source, version):
21+ try:
22+ return cls._cache["%s,%s" % (source, version)]
23+ except KeyError:
24+ bfm = super(BuildsForMain, cls).__new__(cls)
25+ results = {}
26+ main_archive = launchpad.distributions['ubuntu'].main_archive
27+ sourcepubs = main_archive.getPublishedSources(
28+ exact_match=True, source_name=source, version=version)
29+ for pub in sourcepubs:
30+ for build in pub.getBuilds():
31+ # assumes sourcepubs are sorted latest release to oldest,
32+ # so first record wins
33+ if build.arch_tag not in results:
34+ results[build.arch_tag] = build.buildstate
35+ bfm.results = results
36+ # add to cache
37+ cls._cache["%s,%s" % (source, version)] = bfm
38+
39+ return bfm
40+
41+ @classmethod
42+ def clear(cls):
43+ cls._cache.clear()
44+
45+>>>>>>> MERGE-SOURCE
46 class SPPH(object):
47 _cache = dict() # dict with all SPPH objects
48
49@@ -298,6 +329,19 @@
50
51 if not spph.current:
52 print " superseded"
53+
54+ if main_archive:
55+ # If this build failure is not a regression versus the
56+ # main archive, do not report it.
57+ main_builds = BuildsForMain(spph._lp.source_package_name,
58+ spph._lp.source_package_version)
59+ try:
60+ if main_builds.results[arch] != 'Successfully built':
61+ print " Skipping %s" % build.title
62+ continue
63+ except KeyError:
64+ pass
65+
66 SPPH(csp_link).addBuildLog(build)
67
68 return cur_last_published

Subscribers

People subscribed via source and target branches

to all changes: