Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Issue 24578004: Client side implementation of new /content-gs isolate protocol. (Closed)

Created:
7 years, 2 months ago by Vadim Sh.
Modified:
7 years, 2 months ago
Reviewers:
M-A Ruel
CC:
chromium-reviews, csharp+cc_chromium.org, vadimsh+cc_chromium.org, maruel+cc_chromium.org
Visibility:
Public.

Description

Client side implementation of new /content-gs isolate protocol. Replaces existing /content protocol. BUG=289670 DO NOT SUBMIT Abandoned.

Patch Set 1 #

Total comments: 11

Patch Set 2 : quote token #

Patch Set 3 : rebase #

Patch Set 4 : Remove previous implementation #

Patch Set 5 : decompress by chunks, test for zip/unzip #

Total comments: 1

Patch Set 6 : calls to net.url_open use same form #

Patch Set 7 : unit tests for IsolateServerGS class #

Patch Set 8 : Rietveld!!!111 #

Patch Set 9 : rename IsolateServerGS -> IsolateServer #

Patch Set 10 : #

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+498 lines, -327 lines) Patch
isolateserver.py View 1 2 3 4 5 6 7 8 9 chunks +201 lines, -166 lines 0 comments Download
tests/isolateserver_smoke_test.py View 1 chunk +4 lines, -0 lines 0 comments Download
tests/isolateserver_test.py View 1 2 3 4 5 6 7 8 5 chunks +286 lines, -161 lines 0 comments Download
tests/swarming_smoke_test.py View 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Vadim Sh.
It's a work in progress. I'm writing unit tests for IsolateServerGS class now. It's difficult ...
7 years, 2 months ago (2013-09-26 01:14:19 UTC) #1
M-A Ruel
https://codereview.chromium.org/24578004/diff/1/isolateserver.py File isolateserver.py (right): https://codereview.chromium.org/24578004/diff/1/isolateserver.py#newcode33 isolateserver.py:33: ENABLE_GS_ISOLATE_API = False On 2013/09/26 01:14:19, Vadim Sh. wrote: ...
7 years, 2 months ago (2013-09-26 01:21:47 UTC) #2
Vadim Sh.
7 years, 2 months ago (2013-09-27 20:28:11 UTC) #3
This CL is done.
But due to rietveld issues it's in a weird state right now.
I'll abandon this CL and reupload it as a new one, with clean diff.

https://codereview.chromium.org/24578004/diff/1/isolateserver.py
File isolateserver.py (right):

https://codereview.chromium.org/24578004/diff/1/isolateserver.py#newcode33
isolateserver.py:33: ENABLE_GS_ISOLATE_API = False
On 2013/09/26 01:21:47, M-A Ruel wrote:
> On 2013/09/26 01:14:19, Vadim Sh. wrote:
> > I need your advice on how to deal with conditional switching to new
> > IsolateServerGS protocol.
> > 
> > Possible solutions:
> > 1) Use global switch, like it is done now. Test both implementations in unit
> > tests. That way we can at least revert fast, but setting
ENABLE_GS_ISOLATE_API
> =
> > False.
> > 2) Add command line option to isolate.py, isolateserver.py and
run_isolated.py
> > (--use-gs-api). But then we need to change buildbot side to conditionally
> enable
> > it :(
> > 3) Just always use new IsolateServerGS and forget about IsolateServer.
> 
> 3)
> 
> Let it bake on the canary, then roll deps and monitor.

Sweet. It simplifies a lot.

https://codereview.chromium.org/24578004/diff/1/isolateserver.py#newcode260
isolateserver.py:260: decompressed = decompressor.decompress(chunk)
On 2013/09/26 01:21:47, M-A Ruel wrote:
> You should create an inner loop here, so that if a compressed block generates
> 2gb of data, it doesn't blow python up.
> 
> See how the isolate server does it.

Done.

https://codereview.chromium.org/24578004/diff/1/isolateserver.py#newcode764
isolateserver.py:764: if "error" in caps:
On 2013/09/26 01:21:47, M-A Ruel wrote:
> 'error'

Done.

https://codereview.chromium.org/24578004/diff/1/isolateserver.py#newcode839
isolateserver.py:839: # Testing seems to show that if a few machines are trying
to download
On 2013/09/26 01:21:47, M-A Ruel wrote:
> This likely doesn't apply here.

Done.

https://codereview.chromium.org/24578004/diff/1/isolateserver.py#newcode917
isolateserver.py:917: if push_urls is not None
On 2013/09/26 01:21:47, M-A Ruel wrote:
> is "if push_urls" sufficient?

Done.

https://codereview.chromium.org/24578004/diff/20001/isolateserver.py
File isolateserver.py (right):

https://codereview.chromium.org/24578004/diff/20001/isolateserver.py#newcode185
isolateserver.py:185: |content_generator| should yield an entire zipped stream,
this function will
I wrote a test to check that (incomplete stream -> zlib.error). In fact it's not
true :( Zlib can not figure out by itself that stream is truncated.

Powered by Google App Engine
This is Rietveld 408576698