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
diff --git a/britney2/excusefinder.py b/britney2/excusefinder.py
index 75b7497..0395303 100644
--- a/britney2/excusefinder.py
+++ b/britney2/excusefinder.py
@@ -97,18 +97,6 @@ class ExcuseFinder(object):
97 source_u.section and excuse.set_section(source_u.section)97 source_u.section and excuse.set_section(source_u.section)
98 excuse.set_distribution(self.options.distribution)98 excuse.set_distribution(self.options.distribution)
9999
100 # if there is a `remove' hint and the requested version is the same as the
101 # version in testing, then stop here and return False
102 # (as a side effect, a removal may generate such excuses for both the source
103 # package and its binary packages on each architecture)
104 for hint in self.hints.search('remove', package=src, version=source_t.version):
105 excuse.add_hint(hint)
106 excuse.policy_verdict = PolicyVerdict.REJECTED_PERMANENTLY
107 excuse.add_verdict_info(excuse.policy_verdict, "Removal request by %s" % (hint.user))
108 excuse.add_verdict_info(excuse.policy_verdict, "Trying to remove package, not update it")
109 self.excuses[excuse.name] = excuse
110 return False
111
112 # the starting point is that there is nothing wrong and nothing worth doing100 # the starting point is that there is nothing wrong and nothing worth doing
113 anywrongver = False101 anywrongver = False
114 anyworthdoing = False102 anyworthdoing = False
diff --git a/britney2/policies/policy.py b/britney2/policies/policy.py
index 226ff50..a30f06d 100644
--- a/britney2/policies/policy.py
+++ b/britney2/policies/policy.py
@@ -1523,11 +1523,6 @@ class ImplicitDependencyPolicy(BasePolicy):
1523 # source for pkg not in unstable: candidate for removal1523 # source for pkg not in unstable: candidate for removal
1524 return True1524 return True
15251525
1526 source_t = target_suite.sources[src]
1527 for hint in self.hints.search('remove', package=src, version=source_t.version):
1528 # removal hint for the source in testing: candidate for removal
1529 return True
1530
1531 if target_suite.is_cruft(pkg):1526 if target_suite.is_cruft(pkg):
1532 # if pkg is cruft in testing, removal will be tried1527 # if pkg is cruft in testing, removal will be tried
1533 return True1528 return True

Subscribers

People subscribed via source and target branches