Bug 55723 - lazily autoinstall thirdparty python libraries
Summary: lazily autoinstall thirdparty python libraries
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Tony Chang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-03 16:24 PST by Tony Chang
Modified: 2011-04-27 13:44 PDT (History)
3 users (show)

See Also:


Attachments
Patch (18.32 KB, patch)
2011-03-03 16:26 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch (18.19 KB, patch)
2011-03-04 10:19 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch for landing (18.42 KB, patch)
2011-04-27 10:13 PDT, Tony Chang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chang 2011-03-03 16:24:17 PST
lazily autoinstall thirdparty python libraries
Comment 1 Tony Chang 2011-03-03 16:26:43 PST
Created attachment 84652 [details]
Patch
Comment 2 Tony Chang 2011-03-03 16:29:00 PST
I'm not super excited about this, but I think it's better than what we have currently.  I don't like how we have to move the imports to where the object is actually used, but I can't think of another way to make this work.
Comment 3 Eric Seidel (no email) 2011-03-03 16:40:04 PST
I'm not sure I understand what problem you're trying to solve.
Comment 4 Tony Chang 2011-03-03 16:42:16 PST
(In reply to comment #3)
> I'm not sure I understand what problem you're trying to solve.

About a month ago, the chromium waterfall moved to a new datacenter and > 100 bots were trying to autoinstall packages from sourceforge.net, effectively DOSing them.  By autoinstalling less, the bots will be more stable.
Comment 6 Eric Seidel (no email) 2011-03-03 17:11:34 PST
Comment on attachment 84652 [details]
Patch

I'm confused as to why the import hooks are needed if you're moving the import calls into the functions themselves.
Comment 7 Tony Chang 2011-03-03 17:16:14 PST
(In reply to comment #6)
> (From update of attachment 84652 [details])
> I'm confused as to why the import hooks are needed if you're moving the import calls into the functions themselves.

If we don't use import hooks, importing anything in thirdparty triggers the downloads.  For example, importing thirdparty.BeautifulSoup or thirdparty.mock triggers downloads.

I could try pushing all those imports down as well, but that seems a bit more fragile since it's less obvious that importing thirdparty.BeautifulSoup is going to trigger a download (at least thirdparty.autoinstalled.foo has autoinstalled in it).
Comment 8 Tony Chang 2011-03-04 10:19:34 PST
Created attachment 84776 [details]
Patch
Comment 9 Tony Chang 2011-04-27 10:13:06 PDT
Created attachment 91307 [details]
Patch for landing
Comment 10 Tony Chang 2011-04-27 13:44:24 PDT
Committed r85080: <http://trac.webkit.org/changeset/85080>