|
|
Created:
4 years, 10 months ago by Sergey Berezin Modified:
4 years, 10 months ago Reviewers:
M-A Ruel CC:
chromium-reviews, infra-reviews+luci-py_chromium.org Base URL:
https://chromium.googlesource.com/external/github.com/luci/luci-py@master Target Ref:
refs/heads/master Project:
luci-py Visibility:
Public. |
Descriptionisolateserver: add checkbox to enable ts_mon
R=maruel@chromium.org
BUG=408424
TEST= ran unit tests, and tested on dev_appserver instance.
Committed: https://github.com/luci/luci-py/commit/50b5ee37a0f23143dd71028676cbc4c36abe797d
Patch Set 1 #
Total comments: 6
Patch Set 2 : Addressed comments #
Total comments: 4
Patch Set 3 : More comments addressed #
Messages
Total messages: 15 (3 generated)
Description was changed from ========== isolateserver: add checkbox to enable ts_mon R=maruel@chromium.org BUG=408424 ========== to ========== isolateserver: add checkbox to enable ts_mon R=maruel@chromium.org BUG=408424 TEST= ran unit tests, and tested on dev_appserver instance. ==========
PTAL
Uploaded a demo to isolateserver-dev, and toggled the box. At some point, metrics should begin to show up (when instances restart): http://shortn/_nqq4nGzuh9
https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/config.py File appengine/isolate/config.py (right): https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/config.py... appengine/isolate/config.py:58: @classmethod This code belongs to the frontend in my opinion, not here. https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/handlers_... File appengine/isolate/handlers_frontend.py (right): https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/handlers_... appengine/isolate/handlers_frontend.py:65: you can add the function here as a @staticmethod, not a classmethod.
https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/config.py File appengine/isolate/config.py (right): https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/config.py... appengine/isolate/config.py:58: @classmethod On 2016/02/19 02:44:40, M-A Ruel wrote: > This code belongs to the frontend in my opinion, not here. IMHO, keeping the type conversion closer to the definition of the parameters is more intuitive. You only need to modify one class (and one file) when updating the types, and the cast can be reused in other places, not just in the handler. But the way it's set up now, the handler still needs to know all the parameters anyway, so I don't feel strongly about it. Your call.
https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/config.py File appengine/isolate/config.py (right): https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/config.py... appengine/isolate/config.py:58: @classmethod On 2016/02/19 20:35:32, Sergey Berezin wrote: > On 2016/02/19 02:44:40, M-A Ruel wrote: > > This code belongs to the frontend in my opinion, not here. > > IMHO, keeping the type conversion closer to the definition of the parameters is > more intuitive. You only need to modify one class (and one file) when updating > the types, and the cast can be reused in other places, not just in the handler. > > But the way it's set up now, the handler still needs to know all the parameters > anyway, so I don't feel strongly about it. Your call. Yes but this function is purely related to form like behavior. If it were an API for example, the format would be different. Because it is about a web form, this is leaking the abstraction layer too low, that's why it should be in handlers_frontend.
https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/config.py File appengine/isolate/config.py (right): https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/config.py... appengine/isolate/config.py:58: @classmethod On 2016/02/19 20:37:26, M-A Ruel wrote: > On 2016/02/19 20:35:32, Sergey Berezin wrote: > > On 2016/02/19 02:44:40, M-A Ruel wrote: > > > This code belongs to the frontend in my opinion, not here. > > > > IMHO, keeping the type conversion closer to the definition of the parameters > is > > more intuitive. You only need to modify one class (and one file) when updating > > the types, and the cast can be reused in other places, not just in the > handler. > > > > But the way it's set up now, the handler still needs to know all the > parameters > > anyway, so I don't feel strongly about it. Your call. > > Yes but this function is purely related to form like behavior. If it were an API > for example, the format would be different. Because it is about a web form, this > is leaking the abstraction layer too low, that's why it should be in > handlers_frontend. OK, done. https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/handlers_... File appengine/isolate/handlers_frontend.py (right): https://codereview.chromium.org/1708283003/diff/1/appengine/isolate/handlers_... appengine/isolate/handlers_frontend.py:65: On 2016/02/19 02:44:40, M-A Ruel wrote: > you can add the function here as a @staticmethod, not a classmethod. Done.
https://codereview.chromium.org/1708283003/diff/20001/appengine/isolate/handl... File appengine/isolate/handlers_frontend.py (right): https://codereview.chromium.org/1708283003/diff/20001/appengine/isolate/handl... appengine/isolate/handlers_frontend.py:73: def to_str(value): Remove. https://codereview.chromium.org/1708283003/diff/20001/appengine/isolate/handl... appengine/isolate/handlers_frontend.py:78: }.get(param_name, to_str) s/to_str/str/
https://codereview.chromium.org/1708283003/diff/20001/appengine/isolate/handl... File appengine/isolate/handlers_frontend.py (right): https://codereview.chromium.org/1708283003/diff/20001/appengine/isolate/handl... appengine/isolate/handlers_frontend.py:73: def to_str(value): On 2016/02/19 20:51:49, M-A Ruel wrote: > Remove. Done. https://codereview.chromium.org/1708283003/diff/20001/appengine/isolate/handl... appengine/isolate/handlers_frontend.py:78: }.get(param_name, to_str) On 2016/02/19 20:51:49, M-A Ruel wrote: > s/to_str/str/ Good catch, thx! done.
lgtm
The CQ bit was checked by sergeyberezin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708283003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1708283003/40001
Message was sent while issue was closed.
Description was changed from ========== isolateserver: add checkbox to enable ts_mon R=maruel@chromium.org BUG=408424 TEST= ran unit tests, and tested on dev_appserver instance. ========== to ========== isolateserver: add checkbox to enable ts_mon R=maruel@chromium.org BUG=408424 TEST= ran unit tests, and tested on dev_appserver instance. Committed: https://github.com/luci/luci-py/commit/50b5ee37a0f23143dd71028676cbc4c36abe797d ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://github.com/luci/luci-py/commit/50b5ee37a0f23143dd71028676cbc4c36abe797d
Message was sent while issue was closed.
(posted this comment on the wrong CL :-) Deployed it on isolateserver-dev; will check with you on Monday for pushing to the production version. Thanks! |