|
|
Description[Telemetry] Add test to prevents adding new dependencies to telemetry.
BUG=472672
Committed: https://crrev.com/e2ff83b4c95cbd9c0df8fd338c9afa39b861cb14
Cr-Commit-Position: refs/heads/master@{#325490}
Patch Set 1 #Patch Set 2 : Add benchmark_runner.py to the targets in FindDependencies #
Total comments: 2
Patch Set 3 : Address Annie's nit #
Total comments: 4
Patch Set 4 : Add telemetry_dependencies_unittest to check for dependencies instead of PRESUBMIT #Patch Set 5 : Add pexpect dependency #Patch Set 6 : Update comment in TELEMETRY_DEPS #
Messages
Total messages: 30 (8 generated)
nednguyen@google.com changed reviewers: + aiolos@chromium.org, dtu@chromium.org, sullivan@chromium.org
On 2015/04/14 17:38:30, nednguyen wrote: Actually this may not work as I expect. I add a simple third_party dependency but find_dependencies script fails to list that one.
On 2015/04/14 17:50:38, nednguyen wrote: > On 2015/04/14 17:38:30, nednguyen wrote: > > Actually this may not work as I expect. I add a simple third_party dependency > but find_dependencies script fails to list that one. Ok, this is not the fault of find_dependencies script but my fault for not setting target_paths to the cover more path. I will update the patch shortly.
On 2015/04/14 18:01:44, nednguyen wrote: > On 2015/04/14 17:50:38, nednguyen wrote: > > On 2015/04/14 17:38:30, nednguyen wrote: > > > > Actually this may not work as I expect. I add a simple third_party dependency > > but find_dependencies script fails to list that one. > > Ok, this is not the fault of find_dependencies script but my fault for not > setting target_paths to the cover more path. I will update the patch shortly. Adding 'benchmark_runner.py' helps discover "third_party/webdriver/pylib/selenium/". Chat offline with Dave, 'benchmark_runner.py's dependencies probably should be enough to cover all dependencies in telemetry. *shrug*
lgtm https://codereview.chromium.org/1057553003/diff/20001/tools/telemetry/PRESUBM... File tools/telemetry/PRESUBMIT.py (right): https://codereview.chromium.org/1057553003/diff/20001/tools/telemetry/PRESUBM... tools/telemetry/PRESUBMIT.py:60: ' dtu@, or nednguyen@ on how to proceeds with this change.')) nit: s/proceeds/proceed/
https://codereview.chromium.org/1057553003/diff/20001/tools/telemetry/PRESUBM... File tools/telemetry/PRESUBMIT.py (right): https://codereview.chromium.org/1057553003/diff/20001/tools/telemetry/PRESUBM... tools/telemetry/PRESUBMIT.py:60: ' dtu@, or nednguyen@ on how to proceeds with this change.')) On 2015/04/14 19:20:34, sullivan wrote: > nit: s/proceeds/proceed/ Done.
Dave, Kari: do you want to take a look at this?
On 2015/04/14 20:57:20, nednguyen wrote: > Dave, Kari: do you want to take a look at this? lgtm
The CQ bit was checked by nednguyen@google.com
The patchset sent to the CQ was uploaded after l-g-t-m from sullivan@chromium.org Link to the patchset: https://codereview.chromium.org/1057553003/#ps40001 (title: "Address Annie's nit")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1057553003/40001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
The CQ bit was checked by nednguyen@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1057553003/40001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
On 2015/04/15 16:52:22, I haz the power (commit-bot) wrote: > Try jobs failed on following builders: > chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, > http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) Hm... I don't think you're allowed to import anything in a PRESUBMIT.py. Path and stuff are provided by input_api, for example. I believe json is as well. Is is possible that telemetry.util ends up importing something else transitively which tries to load libdc1394? R
On 2015/04/15 21:53:12, iannucci wrote: > On 2015/04/15 16:52:22, I haz the power (commit-bot) wrote: > > Try jobs failed on following builders: > > chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, > > > http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) > > Hm... I don't think you're allowed to import anything in a PRESUBMIT.py. Path > and stuff are provided by input_api, for example. I believe json is as well. > > Is is possible that telemetry.util ends up importing something else transitively > which tries to load libdc1394? > > R Thanks Robbie. I will leave the PRESUBMIT script alone and rewrite this check as a "unittest" in telemetry.
https://chromiumcodereview.appspot.com/1057553003/diff/40001/tools/telemetry/... File tools/telemetry/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/1057553003/diff/40001/tools/telemetry/... tools/telemetry/PRESUBMIT.py:26: telemetry_deps = {} nit: Not needed. https://chromiumcodereview.appspot.com/1057553003/diff/40001/tools/telemetry/... tools/telemetry/PRESUBMIT.py:52: any(dep_path.startswith(d) for d in telemetry_deps['directory_deps'])) Not quite right. Use path.IsSubpath()
PTAL again since I move the check to telemetry_dependencies_unittest https://codereview.chromium.org/1057553003/diff/40001/tools/telemetry/PRESUBM... File tools/telemetry/PRESUBMIT.py (right): https://codereview.chromium.org/1057553003/diff/40001/tools/telemetry/PRESUBM... tools/telemetry/PRESUBMIT.py:26: telemetry_deps = {} On 2015/04/15 22:25:00, dtu wrote: > nit: Not needed. Done. https://codereview.chromium.org/1057553003/diff/40001/tools/telemetry/PRESUBM... tools/telemetry/PRESUBMIT.py:52: any(dep_path.startswith(d) for d in telemetry_deps['directory_deps'])) On 2015/04/15 22:25:00, dtu wrote: > Not quite right. Use path.IsSubpath() Done.
On 2015/04/15 22:50:00, nednguyen wrote: > PTAL again since I move the check to telemetry_dependencies_unittest > > https://codereview.chromium.org/1057553003/diff/40001/tools/telemetry/PRESUBM... > File tools/telemetry/PRESUBMIT.py (right): > > https://codereview.chromium.org/1057553003/diff/40001/tools/telemetry/PRESUBM... > tools/telemetry/PRESUBMIT.py:26: telemetry_deps = {} > On 2015/04/15 22:25:00, dtu wrote: > > nit: Not needed. > > Done. > > https://codereview.chromium.org/1057553003/diff/40001/tools/telemetry/PRESUBM... > tools/telemetry/PRESUBMIT.py:52: any(dep_path.startswith(d) for d in > telemetry_deps['directory_deps'])) > On 2015/04/15 22:25:00, dtu wrote: > > Not quite right. Use path.IsSubpath() > > Done. For some reason, a new dependency file chromium/src/third_party/pexpect/pexpect.py is added since the start of this patch. I think this is probably because some dependency of telemetry adds a new dependency. I will need to update the test so that it ignore dependencies of telemetry's direct dependencies.
On 2015/04/16 16:51:48, nednguyen wrote: > On 2015/04/15 22:50:00, nednguyen wrote: > > PTAL again since I move the check to telemetry_dependencies_unittest > > > > > https://codereview.chromium.org/1057553003/diff/40001/tools/telemetry/PRESUBM... > > File tools/telemetry/PRESUBMIT.py (right): > > > > > https://codereview.chromium.org/1057553003/diff/40001/tools/telemetry/PRESUBM... > > tools/telemetry/PRESUBMIT.py:26: telemetry_deps = {} > > On 2015/04/15 22:25:00, dtu wrote: > > > nit: Not needed. > > > > Done. > > > > > https://codereview.chromium.org/1057553003/diff/40001/tools/telemetry/PRESUBM... > > tools/telemetry/PRESUBMIT.py:52: any(dep_path.startswith(d) for d in > > telemetry_deps['directory_deps'])) > > On 2015/04/15 22:25:00, dtu wrote: > > > Not quite right. Use path.IsSubpath() > > > > Done. > > For some reason, a new dependency file > chromium/src/third_party/pexpect/pexpect.py is added since the start of this > patch. I think this is probably because some dependency of telemetry adds a new > dependency. I will need to update the test so that it ignore dependencies of > telemetry's direct dependencies. It's not simple to ignore the dependencies of telemetry's direct dependencies, and I think we should also be worried about those cases as well. If too many people complain to us that telemetry blocking them from landing patches, we can modify the "directory_deps" in TELEMETRY_DEPS to "third_party/", which I suspect will be the majority of cases.
lgtm. One nit before landing: this is now a unit test and not a presubmit, correct? If so, please update the CL description before landing.
The CQ bit was checked by nednguyen@google.com
The patchset sent to the CQ was uploaded after l-g-t-m from aiolos@chromium.org Link to the patchset: https://codereview.chromium.org/1057553003/#ps100001 (title: "Update comment in TELEMETRY_DEPS")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1057553003/100001
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/e2ff83b4c95cbd9c0df8fd338c9afa39b861cb14 Cr-Commit-Position: refs/heads/master@{#325490} |