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/ (+44/-0)
Text conflict in source/
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:

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 (

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
=== modified file 'source/'
--- source/ 2018-04-13 08:43:59 +0000
+++ source/ 2018-04-16 19:53:26 +0000
@@ -149,6 +149,7 @@
149 else:149 else:
150 return list(self.packagesets.difference((name,)))150 return list(self.packagesets.difference((name,)))
152<<<<<<< TREE
152 def getTeams(self, name=None):153 def getTeams(self, name=None):
153 '''Return the list of teams without the team `name`.'''154 '''Return the list of teams without the team `name`.'''
154 if name is None:155 if name is None:
@@ -156,6 +157,36 @@
156 else:157 else:
157 return list(self.teams.difference((name,)))158 return list(self.teams.difference((name,)))
161class BuildsForMain(object):
162 _cache = dict()
164 def __new__(cls, source, version):
165 try:
166 return cls._cache["%s,%s" % (source, version)]
167 except KeyError:
168 bfm = super(BuildsForMain, cls).__new__(cls)
169 results = {}
170 main_archive = launchpad.distributions['ubuntu'].main_archive
171 sourcepubs = main_archive.getPublishedSources(
172 exact_match=True, source_name=source, version=version)
173 for pub in sourcepubs:
174 for build in pub.getBuilds():
175 # assumes sourcepubs are sorted latest release to oldest,
176 # so first record wins
177 if build.arch_tag not in results:
178 results[build.arch_tag] = build.buildstate
179 bfm.results = results
180 # add to cache
181 cls._cache["%s,%s" % (source, version)] = bfm
183 return bfm
185 @classmethod
186 def clear(cls):
187 cls._cache.clear()
189>>>>>>> MERGE-SOURCE
159class SPPH(object):190class SPPH(object):
160 _cache = dict() # dict with all SPPH objects191 _cache = dict() # dict with all SPPH objects
@@ -298,6 +329,19 @@
299 if not spph.current:330 if not spph.current:
300 print " superseded"331 print " superseded"
333 if main_archive:
334 # If this build failure is not a regression versus the
335 # main archive, do not report it.
336 main_builds = BuildsForMain(spph._lp.source_package_name,
337 spph._lp.source_package_version)
338 try:
339 if main_builds.results[arch] != 'Successfully built':
340 print " Skipping %s" % build.title
341 continue
342 except KeyError:
343 pass
301 SPPH(csp_link).addBuildLog(build)345 SPPH(csp_link).addBuildLog(build)
303 return cur_last_published347 return cur_last_published


People subscribed via source and target branches

to all changes: