Merge lp:~thumper/launchpad/claim-review-into-model into lp:launchpad/db-devel
Proposed by
Tim Penhey
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~thumper/launchpad/claim-review-into-model |
Merge into: | lp:launchpad/db-devel |
Diff against target: |
96 lines (+53/-3) 3 files modified
database/schema/patch-2207-17-0.sql (+13/-0) lib/lp/code/model/branchmergeproposal.py (+8/-3) lib/lp/code/model/tests/test_branchmergeproposals.py (+32/-0) |
To merge this branch: | bzr merge lp:~thumper/launchpad/claim-review-into-model |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Hudson-Doyle | Approve | ||
Jonathan Lange (community) | db | Approve | |
Stuart Bishop (community) | db | Approve | |
Guilherme Salgado | release-critical | Pending | |
Review via email: mp+15524@code.launchpad.net |
Commit message
Add db-patch to remove the restriction of only having one team review of a particular type.
To post a comment you must log in.
The branch name came about because I wanted to move the claim review logic into the model code - and I still do, but the minimal fix needed for the release critical is this. Moving the logic will happen shortly (along with deleting pending reviews).
The way things are written at the moment, it is expected that there are only going to be one review of any particular type by any person or team. This means that if a project was wanting two team reviews, then they'd have to artificially give them different review types. This is no longer the case.
The particular problem this is solving is the case where a person ends up with to rows in the code review vote table when they should only have one. The use of the storm result set ".one()" method was causing this. There is still the possibility of an individual having two vote references if they are using multiple windows and claiming reviews in stale windows - that is to be fixed by moving the code into the model. This will reduce the window of opportunity for it to happen to simultaneous transactions. It is also possible for an individual to get two entries due to a person merge.