Merge lp:~stevenk/launchpad/auditor-for-packageupload into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Steve Kowalik on 2012-07-26 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15746 |
| Proposed branch: | lp:~stevenk/launchpad/auditor-for-packageupload |
| Merge into: | lp:launchpad |
| Diff against target: |
335 lines (+137/-49) 11 files modified
lib/lp/services/auditor/client.py (+43/-0) lib/lp/services/auditor/tests/test_client.py (+27/-0) lib/lp/services/config/schema-lazr.conf (+5/-0) lib/lp/services/enterpriseid.py (+7/-6) lib/lp/services/features/flags.py (+6/-0) lib/lp/soyuz/browser/queue.py (+1/-1) lib/lp/soyuz/interfaces/queue.py (+2/-1) lib/lp/soyuz/model/queue.py (+6/-1) lib/lp/testing/layers.py (+36/-38) setup.py (+1/-0) versions.cfg (+3/-2) |
| To merge this branch: | bzr merge lp:~stevenk/launchpad/auditor-for-packageupload |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| j.c.sackett (community) | 2012-07-23 | Approve on 2012-07-26 | |
|
Review via email:
|
|||
Commit Message
Add a feature flag 'auditor.enabled', write an AuditorClient class that will talk to the configured auditor instance and have PackageUpload call into it on accept.
Description of the Change
Write an AuditorClient class, which matches up to the AuditorServer test fixture. It will connect to the configured auditor instance and send or receive data. I have also added a feature flag 'auditor.enabled' which model/browser code can use to check if they should call into the auditor service.
| Robert Collins (lifeless) wrote : | # |
| j.c.sackett (jcsackett) wrote : | # |
> Surely auditorclient should be in its own package, not part of LP ?
> Other things than LP will want to use Auditor.
It is: see https:/
I assume the import changes in enterpiseid.py are b/c of a circular import issue. May be worth it to add a comment indicating such.
Otherwise, this looks good to me. Thanks, Steve.
| Robert Collins (lifeless) wrote : | # |
+ for entry in logs['log-
+ entry['actor'] = enterpriseid_
+ entry['object'] = enterpriseid_
- this is late evaluation pain waiting to happen. Depending on how
many entries you get back, of course. May need to make a multi-object
version of enterpriseid_
| Colin Watson (cjwatson) wrote : | # |
Would it be worth fixing the spelling of "receive" (not "recieve") before it gets baked into too many method names and becomes hard to change?
| Colin Watson (cjwatson) wrote : | # |
Oh, and would it be easy to audit rejections at the same time? We occasionally do get questions of the form "who rejected this upload? they didn't tell me why", and we have no way to tell.

Surely auditorclient should be in its own package, not part of LP ?
Other things than LP will want to use Auditor.