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

Issue 2438613002: Provide an API to dart:developer to control the web server hosting the Service Protocol (Closed)

Created:
4 years, 2 months ago by Cutch
Modified:
4 years, 1 month ago
Reviewers:
rmacnak, siva, kevmoo
CC:
reviews_dartlang.org, turnidge, rmacnak, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Provide an API to dart:developer to control the web server hosting the Service Protocol - [x] Add `ServiceProtocolnfo` class to dart:developer. - [x] Add `Service` class to dart:developer. - [x] Add `Service.getInfo` static method to dart:developer. - [x] Add `Service.controlWebServer` static method to dart:developer. API: ```dart /// Information about the service protocol. class ServiceProtocolInfo { /// The major version of the protocol. final int majorVersion; /// The minor version of the protocol. final int minorVersion; /// The Uri to access the service. If the web server is not running, this /// will be null. final Uri serverUri; } /// Access information about the service protocol and control the web server. class Service { /// Get information about the service protocol. static Future<ServiceProtocolInfo> getInfo(); /// Control the web server that the service protocol is accessed through. static Future<ServiceProtocolInfo> controlWebServer({bool enable: false}); } ``` ... and add a randomly generated authentication token path prefix that must be passed in to access the service protocol. Old base url: Observatory listening on http://127.0.0.1:54804/ New base url: Observatory listening on http://127.0.0.1:54804/<token>/ For example: Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/ Many tools will need to be updated. Fixes #23320 BUG= R=asiva@google.com, rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/63e4f69e5e363e13b193572acb74edc4de99c0e6

Patch Set 1 #

Patch Set 2 : self review #

Total comments: 1

Patch Set 3 : add authentication token path prefix #

Total comments: 2

Patch Set 4 : fix Observatory #

Patch Set 5 : updated CHANGELOG.md #

Total comments: 12

Patch Set 6 : disable the auth token until we announce the breaking change #

Total comments: 5

Patch Set 7 : CHANGELOG.md merge and fatal error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+495 lines, -179 lines) Patch
M CHANGELOG.md View 1 2 3 4 5 6 1 chunk +7 lines, -3 lines 0 comments Download
M runtime/bin/vmservice/server.dart View 1 2 3 4 5 6 chunks +51 lines, -24 lines 0 comments Download
M runtime/bin/vmservice/vmservice_io.dart View 2 chunks +23 lines, -0 lines 0 comments Download
M runtime/bin/vmservice_dartium.h View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M runtime/bin/vmservice_dartium.cc View 1 2 1 chunk +2 lines, -7 lines 0 comments Download
M runtime/bin/vmservice_impl.h View 1 2 3 4 5 6 2 chunks +6 lines, -12 lines 0 comments Download
M runtime/bin/vmservice_impl.cc View 1 2 3 4 5 6 5 chunks +19 lines, -24 lines 0 comments Download
M runtime/lib/developer.cc View 1 2 3 4 5 2 chunks +58 lines, -0 lines 0 comments Download
M runtime/lib/developer.dart View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/observatory/lib/src/app/application.dart View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M runtime/observatory/lib/src/elements/vm_connect.dart View 1 2 3 5 chunks +12 lines, -7 lines 0 comments Download
M runtime/observatory/lib/src/repositories/target.dart View 1 2 3 3 chunks +6 lines, -13 lines 0 comments Download
A runtime/observatory/tests/service/developer_server_control_test.dart View 1 chunk +34 lines, -0 lines 0 comments Download
M runtime/observatory/tests/service/test_helper.dart View 1 2 9 chunks +42 lines, -80 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/service.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/service.cc View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M runtime/vm/service_isolate.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/service_isolate.cc View 3 chunks +45 lines, -0 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/developer_patch.dart View 1 1 chunk +20 lines, -0 lines 0 comments Download
M sdk/lib/developer/developer.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/developer/developer_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download
A sdk/lib/developer/service.dart View 1 2 3 4 5 1 chunk +81 lines, -0 lines 0 comments Download
M sdk/lib/vmservice/constants.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/vmservice/vmservice.dart View 1 2 3 4 5 9 chunks +59 lines, -5 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
Cutch
4 years, 2 months ago (2016-10-19 18:34:00 UTC) #4
kevmoo
Excited to see this. Just one doc nit. https://codereview.chromium.org/2438613002/diff/20001/sdk/lib/developer/service.dart File sdk/lib/developer/service.dart (right): https://codereview.chromium.org/2438613002/diff/20001/sdk/lib/developer/service.dart#newcode46 sdk/lib/developer/service.dart:46: /// ...
4 years, 2 months ago (2016-10-19 18:51:52 UTC) #6
nweiz
On 2016/10/19 18:34:00, Cutch wrote: Where are the tests? Are they coming in a future ...
4 years, 2 months ago (2016-10-19 19:19:08 UTC) #7
kevmoo
Also: please add an entry to the README
4 years, 2 months ago (2016-10-19 19:19:50 UTC) #8
kevmoo
er, CHANGLOG.md
4 years, 2 months ago (2016-10-19 19:19:59 UTC) #9
Cutch
On 2016/10/19 19:19:08, nweiz wrote: > On 2016/10/19 18:34:00, Cutch wrote: > > Where are ...
4 years, 2 months ago (2016-10-19 19:25:55 UTC) #10
kevmoo
https://codereview.chromium.org/2438613002/diff/40001/CHANGELOG.md File CHANGELOG.md (right): https://codereview.chromium.org/2438613002/diff/40001/CHANGELOG.md#newcode7 CHANGELOG.md:7: ### Service protocol changes Thanks! https://codereview.chromium.org/2438613002/diff/40001/CHANGELOG.md#newcode26 CHANGELOG.md:26: * The ...
4 years, 2 months ago (2016-10-19 22:26:56 UTC) #13
rmacnak
lgtm https://chromiumcodereview.appspot.com/2438613002/diff/80001/runtime/bin/vmservice/server.dart File runtime/bin/vmservice/server.dart (right): https://chromiumcodereview.appspot.com/2438613002/diff/80001/runtime/bin/vmservice/server.dart#newcode166 runtime/bin/vmservice/server.dart:166: bool _originCheck(HttpRequest request) { Not in this CL, ...
4 years, 2 months ago (2016-10-20 17:12:32 UTC) #14
kevmoo
one more changelog nit https://chromiumcodereview.appspot.com/2438613002/diff/80001/CHANGELOG.md File CHANGELOG.md (right): https://chromiumcodereview.appspot.com/2438613002/diff/80001/CHANGELOG.md#newcode31 CHANGELOG.md:31: ### Core library changes Forgive ...
4 years, 2 months ago (2016-10-20 17:21:55 UTC) #15
Cutch
https://codereview.chromium.org/2438613002/diff/80001/CHANGELOG.md File CHANGELOG.md (right): https://codereview.chromium.org/2438613002/diff/80001/CHANGELOG.md#newcode31 CHANGELOG.md:31: ### Core library changes On 2016/10/20 17:21:55, kevmoo wrote: ...
4 years, 2 months ago (2016-10-20 23:31:51 UTC) #16
kevmoo
Oops https://codereview.chromium.org/2438613002/diff/100001/CHANGELOG.md File CHANGELOG.md (right): https://codereview.chromium.org/2438613002/diff/100001/CHANGELOG.md#newcode2 CHANGELOG.md:2: ### Core library changes Weird! I think this ...
4 years, 2 months ago (2016-10-20 23:57:54 UTC) #17
siva
lgtm https://codereview.chromium.org/2438613002/diff/100001/CHANGELOG.md File CHANGELOG.md (right): https://codereview.chromium.org/2438613002/diff/100001/CHANGELOG.md#newcode8 CHANGELOG.md:8: I am wondering about whether we need to ...
4 years, 2 months ago (2016-10-21 16:15:06 UTC) #18
Cutch
4 years, 1 month ago (2016-10-31 19:32:29 UTC) #20
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
63e4f69e5e363e13b193572acb74edc4de99c0e6 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698