Merge lp:~michael.nelson/rnr-server/731736-other-origins into lp:rnr-server
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Michael Nelson | ||||
Approved revision: | 154 | ||||
Merged at revision: | 151 | ||||
Proposed branch: | lp:~michael.nelson/rnr-server/731736-other-origins | ||||
Merge into: | lp:rnr-server | ||||
Diff against target: |
571 lines (+277/-103) 9 files modified
django_project/config_dev/config/main.cfg (+8/-0) django_project/config_dev/schema.py (+1/-0) src/reviewsapp/api/handlers.py (+3/-1) src/reviewsapp/forms.py (+45/-38) src/reviewsapp/models/reviews.py (+6/-0) src/reviewsapp/tests/test_handlers.py (+42/-3) src/reviewsapp/tests/test_rnrclient.py (+8/-3) src/reviewsapp/tests/test_utilities.py (+120/-43) src/reviewsapp/utilities.py (+44/-15) |
||||
To merge this branch: | bzr merge lp:~michael.nelson/rnr-server/731736-other-origins | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Danny Tamez (community) | Approve | ||
Review via email: mp+53007@code.launchpad.net |
Commit message
[r=zematynnad][bug=731376] Enable reviews of packages in partner and extras.
Description of the change
Overview
========
This branch is fixing bug 731376 by enabling reviews for origins other than 'ubuntu'.
To test: follow the README and then `make test`
This branch will not land until the next one, dealing with the issue identified below, is ready.
Details for the next branch
=======
The main issue is verifying the origin for a new review when we don't yet have a record of that origin.
For 'ubuntu' and 'canonical' it is simple enough - we can use the LP API to verify that a binary with the given package name is published in the repository for the distroseries and arch. For extras it's also possible to verify (differently) using the API.
But we cannot generalise the origin for public PPAs currently, as the published origin is ambiguous (I created bug 733170). So I've just left that for the moment.
For the commercial PPAs, we cannot verify that the specified origin is correct, as LP doesn't let us query private PPAs for binaries :). So currently (in this branch) submitting a review for 'linux' in the fluendo-dvd origin would work, as would submitting a review for 'vendetta-online' in the fluendo-dvd origin, as would 'fluendo-dvd' in the correct origin, but with 'hoary' as the distroseries etc.
Sooo, we need a solution. The solutions I can think of are:
1) Pull and cache the staging/production sca available apps to get the data (currently this will also pull the icons, but we could later add a separate url on sca for just the data we need, if necessary)
2) (Temporary solution): Encode the binary publishings (ie. ppa-name, arch, distroseries) for each of the commercial apps in the settings (and update settings each time a new app is added).
...
So I'll probably go ahead with 1 (Update: checked with achuni and he agrees).
Michael - great works as always. Approved but what would you think of adding a test that is the negative test for "test_create_ repository_ and_software_ item"? As it would be good to also test that when lp returns False that the item and repo are not created.