← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] lp:~stevenk/launchpad/remove-unused-sharing-garbo into lp:launchpad

 

Review: Needs Fixing code

122	+ allowed_bug_policies = set(
123	+ BUG_POLICY_ALLOWED_TYPES.get(product.bug_sharing_policy, []))
124	+ allowed_branch_policies = set(
125	+ BRANCH_POLICY_ALLOWED_TYPES.get(
126	+ product.branch_sharing_policy, []))

You'll need to either exclude those with *_sharing_policy unset, or default to FREE_INFORMATION_TYPES, otherwise all legacy-configured projects will have their builtin APs reaped.

127	+ access_polices = set(

Does it really?

131	+ apas = getUtility(IAccessPolicyArtifactSource).findByPolicy(
132	+ candidate_aps)
133	+ used_aps = set([apa.policy for apa in apas])

This is going to load potentially hundreds of thousands of objects, which is probably not what you want.
-- 
https://code.launchpad.net/~stevenk/launchpad/remove-unused-sharing-garbo/+merge/120698
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.


References