Merge lp:~sinzui/launchpad/dsp-vocab-fixes into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Curtis Hovey on 2012-01-20 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 14711 |
| Proposed branch: | lp:~sinzui/launchpad/dsp-vocab-fixes |
| Merge into: | lp:launchpad |
| Diff against target: |
75 lines (+26/-11) 2 files modified
lib/lp/registry/tests/test_dsp_vocabularies.py (+15/-2) lib/lp/registry/vocabularies.py (+11/-9) |
| To merge this branch: | bzr merge lp:~sinzui/launchpad/dsp-vocab-fixes |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brad Crittenden (community) | code | 2012-01-20 | Approve on 2012-01-20 |
|
Review via email:
|
|||
Description of the Change
Allow users to find official unpublished packages in the target picker.
Launchpad bug: https:/
Pre-
On qastaging, where the DSP vocabulary is enabled, I expect to search
for charms/mysql and get an exact match when choosing a package affected
by a bug. The picker says there are no matches.
The problem is obvious looking at the implementation, the SQL joins to
DistributionSou
unpublished packages will never appear in the table. This is a
palm-in-face moment for me because 1. I insisted we extend DSP to do
searches because official packages may never be published, yet 2, I
wrote the SQL query that joins to a table predicated on publishing. The
query/scoring of results should use SourcePackageNa
dspc.name because the former is guaranteed to exist
-------
RULES
* Join on spn, left join to dspc.
* Use the spn.name in scoring
QA
* Visit https:/
* Expand the affects row.
* Choose to pick a package.
* Search for 'charms/mysql' (this is an official unpublished package)
* Verify the results show a match, but there is no binary packages
listed in the description
LINT
lib/
lib/
TEST
./bin/test -vv -t lp.registry.
IMPLEMENTATION
The addition of spn and changing dspc was near trivial. The test passed
after a fix of a few typos. The second test fix took much longer because
I was certain the test was correct and my SQL changes were bad. The test
was flawed. It created *two* packages, on official unpublished package
and a second unofficial package in a PPA. It was passing because of the
joins, but it should have failed because there was a matching official
package. The correction is to ensure that only one unofficial package is
created.
lib/
lib/

Looks nice Curtis. You have a typo in your test method name: offcial.