Merge lp:~wgrant/launchpad/export-das-chroot into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Julian Edwards on 2010-02-22 | ||||
| Approved revision: | not available | ||||
| Merged at revision: | not available | ||||
| Proposed branch: | lp:~wgrant/launchpad/export-das-chroot | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
92 lines (+42/-0) 4 files modified
lib/lp/soyuz/doc/distroarchseries.txt (+14/-0) lib/lp/soyuz/interfaces/distroarchseries.py (+7/-0) lib/lp/soyuz/model/distroarchseries.py (+8/-0) lib/lp/soyuz/stories/webservice/xx-distroarchseries.txt (+13/-0) |
||||
| To merge this branch: | bzr merge lp:~wgrant/launchpad/export-das-chroot | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Julian Edwards (community) | Approve on 2010-02-22 | ||
| Björn Tillenius (community) | 2010-02-20 | Approve on 2010-02-22 | |
| Leonard Richardson | 2010-02-22 | Pending | |
|
Review via email:
|
|||
Commit Message
Export DistroArchSeries chroot URLs on the webservice.
| William Grant (wgrant) wrote : | # |
| Björn Tillenius (bjornt) wrote : | # |
Why not export getChroot() instead? It seems more useful to get the actual librarian file, rather than just a URL.
| William Grant (wgrant) wrote : | # |
On Sat, 2010-02-20 at 08:11 +0000, Björn Tillenius wrote:
> Review: Needs Information
> Why not export getChroot() instead? It seems more useful to get the actual librarian file, rather than just a URL.
ILFA isn't exported at the moment. All other places I can find seem to
just export a URL, and Julian suggested doing that on the bug. It would
be really nice to have attributes like hashes visible, though.
| Björn Tillenius (bjornt) wrote : | # |
On Sat, Feb 20, 2010 at 12:50:33AM -0000, William Grant wrote:
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -344,6 +344,14 @@
> >>> print_architect
> The Hoary Hedgehog Release for hppa (hppa) (ppa)
>
> +The architecture also has a 'chroot_url' attribute directly referencing
> +the file.
> +
> + >>> print hoary.getDistro
> + http://
> + >>> print hoary.getDistro
> + None
When is chroot_url None? It'd be good to document this. Also, for test
correctness, I'd also (in addition to the current test) compare
chroot_url to getChroot(
returning just any URL.
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -108,6 +108,12 @@
> Interface, # Really IArchive, circular import fixed below.
> title=_('Main Archive'),
> description=_("The main archive of the distroarchserie
> + chroot_url = exported(
> + TextLine(
> + title=_("Build chroot URL"),
> + description=_(
> + "The URL to the current build chroot for this "
> + "distroarchseri
>
> def updatePackageCo
> """Update the cached binary package count for this distro arch
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -136,6 +136,13 @@
>
> return pocket_
>
> + @property
> + def chroot_url(self):
> + chroot = self.getChroot()
This should have a """See `IDistroArchSer
I'm approving this branch with these small comments resolved.
vote approve
--
Björn Tillenius | https:/
| Julian Edwards (julian-edwards) wrote : | # |
> Why not export getChroot() instead? It seems more useful to get the actual
> librarian file, rather than just a URL.
chroots are several hundred meg big - way too much to proxy through the webapp.
We return URLs as a matter of course for most objects now, Launchpad needs to be quicker, not slower when we tie up an app sever.
| Julian Edwards (julian-edwards) wrote : | # |
This bit should have some explanation text to say why this set up is needed. Otherwise, looks great, thanks for the fix William.
63 + >>> from zope.component import getUtility
64 + >>> from lp.registry.
65 +
66 + >>> login('<email address hidden>')
67 + >>> hoary = getUtility(
68 + >>> chroot = factory.
69 + >>> unused = hoary.getDistro
70 + >>> logout()
71 +
| Björn Tillenius (bjornt) wrote : | # |
On Mon, Feb 22, 2010 at 10:27:17AM -0000, Julian Edwards wrote:
> > Why not export getChroot() instead? It seems more useful to get the actual
> > librarian file, rather than just a URL.
>
> chroots are several hundred meg big - way too much to proxy through the webapp.
Why does this matter if ILibraryFileAlias is exported, exposing meta
data, including http_url?
--
Björn Tillenius | https:/
| Julian Edwards (julian-edwards) wrote : | # |
> On Mon, Feb 22, 2010 at 10:27:17AM -0000, Julian Edwards wrote:
> > > Why not export getChroot() instead? It seems more useful to get the actual
> > > librarian file, rather than just a URL.
> >
> > chroots are several hundred meg big - way too much to proxy through the
> webapp.
>
> Why does this matter if ILibraryFileAlias is exported, exposing meta
> data, including http_url?
Oh I see, expose the LFA. Yeah that would be ok, but I'd do it in addition to the other URL so that it's not yet another traversal to get the data you need. And LFA is not currently exported of course :)
| Francis J. Lacoste (flacoste) wrote : | # |
On February 22, 2010, Julian Edwards wrote:
> > On Mon, Feb 22, 2010 at 10:27:17AM -0000, Julian Edwards wrote:
> > > > Why not export getChroot() instead? It seems more useful to get the
> > > > actual librarian file, rather than just a URL.
> > >
> > > chroots are several hundred meg big - way too much to proxy through the
> >
> > webapp.
> >
> > Why does this matter if ILibraryFileAlias is exported, exposing meta
> > data, including http_url?
>
> Oh I see, expose the LFA. Yeah that would be ok, but I'd do it in addition
> to the other URL so that it's not yet another traversal to get the data
> you need. And LFA is not currently exported of course :)
We don't want to export LibraryFileAlias directly. These are mapped to
HostedFile in the web service implementation.
reviewer leonardr
Leonard, could you give us some pointers on how this should be mapped to a
HostedFile.
Thanks
--
Francis J. Lacoste
<email address hidden>
| William Grant (wgrant) wrote : | # |
So, this was discussed a bit on IRC, but no real consensus was reached. Should I change it to export an IBytes, or should I be consistent with most of the rest of the application and export a librarian URL until we can export LFA more sanely?
| Julian Edwards (julian-edwards) wrote : | # |
> So, this was discussed a bit on IRC, but no real consensus was reached. Should
> I change it to export an IBytes, or should I be consistent with most of the
> rest of the application and export a librarian URL until we can export LFA
> more sanely?
I would be consistent and land the change that exports the URL. I'll land it for you today.

This trivial branch adds and exports IDistroArchSeri es.chroot_ url. I think that just about says it all.