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

Issue 2671693002: [Telemetry] Validate args in js_template rendering (Closed)

Created:
3 years, 10 months ago by perezju
Modified:
3 years, 10 months ago
Reviewers:
nednguyen
CC:
catapult-reviews_chromium.org, telemetry-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

[Telemetry] Validate args in js_template rendering Check that all arguments passed to the template rendering are actually used, thus helping to catch misspellings. A TypeError is raised for any unexpected arguments not used in the template. Additionally, the `timeout` and `context_id` arguments on JS evaluate APIs are no longer passed down to template rendering. Trying to use these keywords in the template will now raise a KeyError. BUG=catapult:#3028 Review-Url: https://codereview.chromium.org/2671693002 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/a28b8398067e93f8f49fe422436459c13b6d7a34

Patch Set 1 #

Patch Set 2 : fix old api #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -9 lines) Patch
M telemetry/telemetry/internal/actions/action_runner.py View 1 1 chunk +1 line, -1 line 0 comments Download
M telemetry/telemetry/internal/backends/chrome_inspector/inspector_backend.py View 3 chunks +6 lines, -6 lines 0 comments Download
M telemetry/telemetry/util/js_template.py View 2 chunks +10 lines, -2 lines 2 comments Download
M telemetry/telemetry/util/js_template_unittest.py View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (10 generated)
perezju
3 years, 10 months ago (2017-02-02 11:11:29 UTC) #4
nednguyen
https://codereview.chromium.org/2671693002/diff/20001/telemetry/telemetry/util/js_template.py File telemetry/telemetry/util/js_template.py (right): https://codereview.chromium.org/2671693002/diff/20001/telemetry/telemetry/util/js_template.py#newcode61 telemetry/telemetry/util/js_template.py:61: ', '.join(repr(str(k)) for k in sorted(unused)))) On another hand, ...
3 years, 10 months ago (2017-02-02 14:33:50 UTC) #9
perezju
https://codereview.chromium.org/2671693002/diff/20001/telemetry/telemetry/util/js_template.py File telemetry/telemetry/util/js_template.py (right): https://codereview.chromium.org/2671693002/diff/20001/telemetry/telemetry/util/js_template.py#newcode61 telemetry/telemetry/util/js_template.py:61: ', '.join(repr(str(k)) for k in sorted(unused)))) On 2017/02/02 14:33:50, ...
3 years, 10 months ago (2017-02-02 14:42:44 UTC) #10
nednguyen
On 2017/02/02 14:42:44, perezju wrote: > https://codereview.chromium.org/2671693002/diff/20001/telemetry/telemetry/util/js_template.py > File telemetry/telemetry/util/js_template.py (right): > > https://codereview.chromium.org/2671693002/diff/20001/telemetry/telemetry/util/js_template.py#newcode61 > ...
3 years, 10 months ago (2017-02-02 14:45:13 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2671693002/20001
3 years, 10 months ago (2017-02-02 14:46:52 UTC) #13
commit-bot: I haz the power
3 years, 10 months ago (2017-02-02 14:48:32 UTC) #16
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/external/github.com/catapult-project/catapu...

Powered by Google App Engine
This is Rietveld 408576698