Merge ~vorlon/britney/+git/britney2-ubuntu:optimize-srcarch-check into ~ubuntu-release/britney/+git/britney2-ubuntu:master

Proposed by Steve Langasek
Status: Merged
Merged at revision: 82fad57aa996cc8e4aacfe5995ee242602283299
Proposed branch: ~vorlon/britney/+git/britney2-ubuntu:optimize-srcarch-check
Merge into: ~ubuntu-release/britney/+git/britney2-ubuntu:master
Diff against target: 39 lines (+0/-17)
2 files modified
britney2/excusefinder.py (+0/-12)
britney2/policies/policy.py (+0/-5)
Reviewer Review Type Date Requested Status
Brian Murray Approve
Michael Hudson-Doyle (community) Approve
Steve Langasek Abstain
Review via email: mp+409703@code.launchpad.net

Description of the change

Related to https://bugs.launchpad.net/britney/+bug/1904880

In a test, reduces runtime of 'code/b2/britney.py -c code/b2/britney.conf.ubuntu.impish -v --distribution=ubuntu --series=impish', which ~100 source packages in -proposed, from 30-45 minutes to 12-15 minutes.

Baseline testing should allow us to substantially reduce the number of hints, but in the meantime this is worth carrying as an Ubuntu delta.

To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

It looks OK I guess. Given this is Ubuntu delta and we don't use remove hints in Ubuntu maybe we can just delete this block? But well a release team member can also think about that :)

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

Fair point; in that case, let's go for this updated branch, which drops the code here and also drops another call to hints.search('remove') in policy.py which lets us save another 12-16 minutes.

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

er, did not mean to self-approve this, re-requesting reviewers :)

Revision history for this message
Steve Langasek (vorlon) :
review: Abstain
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

LGTM but my vote doesn't count for everything :)

review: Approve
Revision history for this message
Brian Murray (brian-murray) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/britney2/excusefinder.py b/britney2/excusefinder.py
2index 75b7497..0395303 100644
3--- a/britney2/excusefinder.py
4+++ b/britney2/excusefinder.py
5@@ -97,18 +97,6 @@ class ExcuseFinder(object):
6 source_u.section and excuse.set_section(source_u.section)
7 excuse.set_distribution(self.options.distribution)
8
9- # if there is a `remove' hint and the requested version is the same as the
10- # version in testing, then stop here and return False
11- # (as a side effect, a removal may generate such excuses for both the source
12- # package and its binary packages on each architecture)
13- for hint in self.hints.search('remove', package=src, version=source_t.version):
14- excuse.add_hint(hint)
15- excuse.policy_verdict = PolicyVerdict.REJECTED_PERMANENTLY
16- excuse.add_verdict_info(excuse.policy_verdict, "Removal request by %s" % (hint.user))
17- excuse.add_verdict_info(excuse.policy_verdict, "Trying to remove package, not update it")
18- self.excuses[excuse.name] = excuse
19- return False
20-
21 # the starting point is that there is nothing wrong and nothing worth doing
22 anywrongver = False
23 anyworthdoing = False
24diff --git a/britney2/policies/policy.py b/britney2/policies/policy.py
25index 226ff50..a30f06d 100644
26--- a/britney2/policies/policy.py
27+++ b/britney2/policies/policy.py
28@@ -1523,11 +1523,6 @@ class ImplicitDependencyPolicy(BasePolicy):
29 # source for pkg not in unstable: candidate for removal
30 return True
31
32- source_t = target_suite.sources[src]
33- for hint in self.hints.search('remove', package=src, version=source_t.version):
34- # removal hint for the source in testing: candidate for removal
35- return True
36-
37 if target_suite.is_cruft(pkg):
38 # if pkg is cruft in testing, removal will be tried
39 return True

Subscribers

People subscribed via source and target branches