launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #09476
[Merge] lp:~cjwatson/launchpad/queue-api-get-package-uploads into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/queue-api-get-package-uploads into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1006173 in Launchpad itself: "Queue tool requires direct DB access"
https://bugs.launchpad.net/launchpad/+bug/1006173
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/queue-api-get-package-uploads/+merge/113068
== Summary ==
Next stage of an API-based upload queue client: allow limiting DS.getPackageUploads queries by name/version/exact_match in the usual way. This was already possible internally but was not exported.
== Pre-implementation notes ==
Broken out from https://code.launchpad.net/~cjwatson/launchpad/queue-api/+merge/108967 at Benji's suggestion.
== LOC Rationale ==
+20. As noted in https://code.launchpad.net/~cjwatson/launchpad/queue-api/+merge/108967, this arc will be LoC-negative.
== Tests ==
bin/test -vvct xx-packageupload.txt
== Demo and Q/A ==
I have a prototype client, currently http://paste.ubuntu.com/1071514/; 'queue info some-package-name-substring' and 'queue -e info some-package-name' should be enough to test this.
--
https://code.launchpad.net/~cjwatson/launchpad/queue-api-get-package-uploads/+merge/113068
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/queue-api-get-package-uploads into lp:launchpad.
=== modified file 'lib/lp/registry/interfaces/distroseries.py'
--- lib/lp/registry/interfaces/distroseries.py 2012-06-19 03:26:57 +0000
+++ lib/lp/registry/interfaces/distroseries.py 2012-07-02 16:06:32 +0000
@@ -527,6 +527,13 @@
description=_("Return only items with custom files of this "
"type."),
required=False),
+ name=TextLine(title=_("Package or file name"), required=False),
+ version=TextLine(title=_("Package version"), required=False),
+ exact_match=Bool(
+ title=_("Exact match"),
+ description=_("Whether to filter name and version by exact "
+ "matching."),
+ required=False),
)
# Really IPackageUpload, patched in _schema_circular_imports.py
@operation_returns_collection_of(Interface)
=== modified file 'lib/lp/soyuz/stories/webservice/xx-packageupload.txt'
--- lib/lp/soyuz/stories/webservice/xx-packageupload.txt 2012-05-30 14:12:44 +0000
+++ lib/lp/soyuz/stories/webservice/xx-packageupload.txt 2012-07-02 16:06:32 +0000
@@ -31,6 +31,19 @@
self_link: u'http://.../ubuntu/warty/+upload/11'
status: u'Done'
+getPackageUploads can filter on package names.
+
+ >>> uploads = webservice.named_get(
+ ... warty['self_link'], 'getPackageUploads',
+ ... name='mozilla').jsonBody()
+ >>> len(uploads['entries'])
+ 1
+ >>> uploads = webservice.named_get(
+ ... warty['self_link'], 'getPackageUploads',
+ ... name='missing').jsonBody()
+ >>> len(uploads['entries'])
+ 0
+
Retrieving Static Translation Files
===================================
Follow ups