New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642046 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

DevTools: adopt node.js build tools

Project Member Reported by chenwilliam@chromium.org, Aug 29 2016

Issue description

Background: Our build and dev workflow (e.g. minifying, bundling, and linting) currently relies on a set of Python scripts.

Goal: Adopt javascript/node.js build and testing tools.

Benefits:
- Take advantage of better tooling developed by the JS community. For example, instead of relying on rjsmin.py, we can use a more powerful tool like UglifyJS to minify our code.
- Reduce maintenance of python scripts.
- Make the project more friendly for external contributors. Javascript developers who are not familiar with Python may find it easier to contribute. Even developers familiar with Python can benefit as they may have used popular open-source JS tools.

Steps:
1. Create a buildbot recipe that installs a local copy of node.js/npm and copy npm modules from our npm repo[1] to run eslint and closure compiler (available as an npm module). Initially run this on the FYI waterfall (i.e. won't block any builds).
2. Once the recipe has been confirmed to be running smoothly, adopt it for the main waterfall. At this point, we should make eslint mandatory in our presubmit check (currently it's skipped if eslint is not installed).
3. Work with infra team to get node.js LTS version installed on the build bot.
4. Investigate additional node.js tooling that devtools can benefit from (e.g. unit testing, minifying).

[1] https://chromium.googlesource.com/deps/third_party/npm_modules
 
Description: Show this description
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 31 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/143336315cef6bf3f72826479af55a4f1f78c266

commit 143336315cef6bf3f72826479af55a4f1f78c266
Author: chenwilliam <chenwilliam@chromium.org>
Date: Wed Aug 31 00:33:16 2016

DevTools: Add scripts for buildbot to use node.js/npm

I'm working on improving our build process so we can use npm modules
on buildbots (e.g. linting, type checking).

I copied these two python scripts from the infra team which will be used
by our buildbot recipe to install and run a local installation of node.js.

Original code here:
https://cs.chromium.org/chromium/infra/node/

BUG= 642046 

Review-Url: https://codereview.chromium.org/2278803004
Cr-Commit-Position: refs/heads/master@{#415515}

[modify] https://crrev.com/143336315cef6bf3f72826479af55a4f1f78c266/third_party/WebKit/Source/devtools/package.json
[add] https://crrev.com/143336315cef6bf3f72826479af55a4f1f78c266/third_party/WebKit/Source/devtools/scripts/buildbot/node.py
[add] https://crrev.com/143336315cef6bf3f72826479af55a4f1f78c266/third_party/WebKit/Source/devtools/scripts/buildbot/npm.py

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra.git/+/33bd604e014e6c59f15e83023e618b2af7ceca95

commit 33bd604e014e6c59f15e83023e618b2af7ceca95
Author: recipe-roller <recipe-roller@chromium.org>
Date: Fri Sep 02 21:38:18 2016

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug
(or complain)

build:
  https://crrev.com/356a3d2a273a3ce2872a92d90f4ed1ef46fadf6e DevTools: Create recipe and builder for devtools (chenwilliam@chromium.org)

TBR=martiniss@chromium.org,phajdan.jr@chromium.org
BUG= 642046 

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Review-Url: https://codereview.chromium.org/2300373003

[modify] https://crrev.com/33bd604e014e6c59f15e83023e618b2af7ceca95/infra/config/recipes.cfg

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/514c78a4d9a668fc2d9d77eefa6ea703252b1696

commit 514c78a4d9a668fc2d9d77eefa6ea703252b1696
Author: recipe-roller <recipe-roller@chromium.org>
Date: Fri Sep 02 22:21:08 2016

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug
(or complain)

build:
  https://crrev.com/fd84bceb95ee0faa25983d71d8692e8917e2e04d libyuv: refactor recipes (kjellander@chromium.org)
  https://crrev.com/6d096635a1b647787b1f58fc41ce68268e079b22 Adding low end windows laptops to the fyi waterfall. (eyaich@chromium.org)
  https://crrev.com/a13d2ccffdaef849e672f47ceba21d30045c19ae Revert of Add step to show goma stat in goma module (patchset #1 id:1 of https://codereview.chromium.org/2300933002/ ) (tandrii@chromium.org)
  https://crrev.com/5036526e4c165e54379d3fc00e85a9f3bf6187a5 Add step to show goma stat in goma module (tikuta@chromium.org)
  https://crrev.com/535b5520fae83162b46eb6ba9fa8d9b487ac4849 Fix a small typo in chromium_libfuzzer_clang_tot (ochang@chromium.org)
  https://crrev.com/28fb0ce5c14fe54c9372a3726b629928afc5bd79 Infra setup for Hoverboard test slave (bsheedy@chromium.org)
  https://crrev.com/05fb8c52d06b8c3892175979f3760f8116a4cfea Clean up some discrepancies in the perf recipe configs (dtu@chromium.org)
  https://crrev.com/0aba2c2011d7bf00bd42b42a5b68c3aa19b4e883 Merge method_counts into resource_sizes (agrieve@chromium.org)
  https://crrev.com/96ea629c493fd72cb420d5e42432636e06dad8f2 Roll recipe dependencies (trivial). (recipe-roller@chromium.org)
  https://crrev.com/43e8e62babe46692b9ae6f40b0600ac0068ec91d chromium_libfuzzer_clang_tot: Set LLVM_FORCE_HEAD_REVISION during runhooks. (ochang@chromium.org)
  https://crrev.com/394f77709c13c2001ce67169355bfdaee649405e Revert of Merge method_counts into resource_sizes (patchset #2 id:20001 of https://codereview.chromium.org/2238243003/ ) (agrieve@chromium.org)
  https://crrev.com/356a3d2a273a3ce2872a92d90f4ed1ef46fadf6e DevTools: Create recipe and builder for devtools (chenwilliam@chromium.org)
depot_tools:
  https://crrev.com/ba1b0f37956143b9b53c8b0f9b21dc4703645e8f git_cl: Enable updating description from local. (dnj@chromium.org)

TBR=martiniss@chromium.org,phajdan.jr@chromium.org
BUG=None,643144,643640,635952,642046,640287,544330,609365

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Review-Url: https://codereview.chromium.org/2308643003
Cr-Commit-Position: refs/heads/master@{#416365}

[modify] https://crrev.com/514c78a4d9a668fc2d9d77eefa6ea703252b1696/infra/config/recipes.cfg

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c16a24066b7ea861e6f2b562b19565ddd6cb059

commit 7c16a24066b7ea861e6f2b562b19565ddd6cb059
Author: chenwilliam <chenwilliam@chromium.org>
Date: Fri Sep 02 23:49:46 2016

DevTools: Bump node.js version for buildbot

I uploaded the latest LTS node.js version to a google storage bucket
and updated the buildbot/node.py script.

Hopefully since this is LTS, we won't need to bump this node version too often.

BUG= 642046 

Review-Url: https://codereview.chromium.org/2303273003
Cr-Commit-Position: refs/heads/master@{#416396}

[modify] https://crrev.com/7c16a24066b7ea861e6f2b562b19565ddd6cb059/third_party/WebKit/Source/devtools/scripts/buildbot/node.py

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c16a24066b7ea861e6f2b562b19565ddd6cb059

commit 7c16a24066b7ea861e6f2b562b19565ddd6cb059
Author: chenwilliam <chenwilliam@chromium.org>
Date: Fri Sep 02 23:49:46 2016

DevTools: Bump node.js version for buildbot

I uploaded the latest LTS node.js version to a google storage bucket
and updated the buildbot/node.py script.

Hopefully since this is LTS, we won't need to bump this node version too often.

BUG= 642046 

Review-Url: https://codereview.chromium.org/2303273003
Cr-Commit-Position: refs/heads/master@{#416396}

[modify] https://crrev.com/7c16a24066b7ea861e6f2b562b19565ddd6cb059/third_party/WebKit/Source/devtools/scripts/buildbot/node.py

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 4 2016

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build.git/+/f9c6f0966908f1d125ea8f519cf31b8a84aff886

commit f9c6f0966908f1d125ea8f519cf31b8a84aff886
Author: chenwilliam <chenwilliam@chromium.org>
Date: Wed Sep 07 17:39:32 2016

DevTools: Update devtools recipe with tryserver logic

I realized my current recipe isn't working as intended because
get_files_affected_by_patch() is only intended for tryservers.

For try jobs: this will skip checks if there's no devtools file in the patch.
For other jobs (e.g. main / FYI): this will always run the devtools checks.

I will open another CL to add the tryserver experiment.

BUG= 642046 

Review-Url: https://codereview.chromium.org/2315983002

[copy] https://crrev.com/f9c6f0966908f1d125ea8f519cf31b8a84aff886/scripts/slave/recipes/devtools.expected/devtools_fyi_main.json
[rename] https://crrev.com/f9c6f0966908f1d125ea8f519cf31b8a84aff886/scripts/slave/recipes/devtools.expected/devtools_fyi_tryserver_no_devtools.json
[rename] https://crrev.com/f9c6f0966908f1d125ea8f519cf31b8a84aff886/scripts/slave/recipes/devtools.expected/devtools_fyi_tryserver_with_devtools.json
[modify] https://crrev.com/f9c6f0966908f1d125ea8f519cf31b8a84aff886/scripts/slave/recipes/devtools.py

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/32aa0a6e62530c42a2c12c8a56f5caa116025e92

commit 32aa0a6e62530c42a2c12c8a56f5caa116025e92
Author: recipe-roller <recipe-roller@chromium.org>
Date: Wed Sep 07 17:56:47 2016

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug
(or complain)

build:
  https://crrev.com/f9c6f0966908f1d125ea8f519cf31b8a84aff886 DevTools: Update devtools recipe with tryserver logic (chenwilliam@chromium.org)

TBR=martiniss@chromium.org,phajdan.jr@chromium.org
BUG= 642046 

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Review-Url: https://codereview.chromium.org/2319723002
Cr-Commit-Position: refs/heads/master@{#416992}

[modify] https://crrev.com/32aa0a6e62530c42a2c12c8a56f5caa116025e92/infra/config/recipes.cfg

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra.git/+/7761fc03d8cb1d604f9a58af630194e7633228c4

commit 7761fc03d8cb1d604f9a58af630194e7633228c4
Author: recipe-roller <recipe-roller@chromium.org>
Date: Wed Sep 07 22:34:24 2016

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug
(or complain)

build:
  https://crrev.com/8373aa1227eccc13db3b1c14e3699d4282b9ff1f Convert commandline to str in recipe_modules/goma (tikuta@chromium.org)
  https://crrev.com/191bb2bd43d119b86f82d72a34dd65c86f0caa55 Fix GYP-based closure try bots while they continue getting ported to GN (dbeam@chromium.org)
  https://crrev.com/11785fb7f116f51bb6442bbbe5b4096055448e57 Add counting the number of CPU's in goma module (tikuta@chromium.org)
  https://crrev.com/a29ebd495ab583c49bc8b0d1954c536e9eb48b10 goma canary; should fail when goma start failed. (yyanagisawa@chromium.org)
  https://crrev.com/383c08f181a0bd59c5c34628be1042c05a88727a WebRTC: Change Google Storage bucket for logcat dumps (kjellander@chromium.org)
  https://crrev.com/13856309f4dff0281657c5f282c5c99e55096947 chromium_android: fix dangerous default value (phajdan.jr@chromium.org)
  https://crrev.com/b9d0b44a84c7dc24fe9f69367fe8a05cfbb70d01 Delete android/perf recipe (phajdan.jr@chromium.org)
  https://crrev.com/cf533954eb5866ebdd425f81806d30264e79021c V8: Switch on MB on older branches (machenbach@chromium.org)
  https://crrev.com/1b0324b4e3dfad7455edaf416134848245331167 Convert Site Isolation Win layout tests to run with --site-per-process. (alexmos@chromium.org)
  https://crrev.com/378036a294f1ead296e09284dc83387dcacedd1f Revert of Fix GYP-based closure try bots while they continue getting ported to GN (patchset #6 id:100001 of https://codereview.chromium.org/2315123002/ ) (dbeam@chromium.org)
  https://crrev.com/f9c6f0966908f1d125ea8f519cf31b8a84aff886 DevTools: Update devtools recipe with tryserver logic (chenwilliam@chromium.org)
  https://crrev.com/ece649094b8b366432846b994819eca89d790cf9 Roll recipe dependencies (trivial). (recipe-roller@chromium.org)
  https://crrev.com/b6837ba5832ef4b25103a9e9680e7cd0c275ef41 [Android] Enable USB reset on perf bots. (jbudorick@chromium.org)
  https://crrev.com/239067c0b2b9d9f905d8a0925cd13439edead8ae [Android] Set up continuous builder + trybot for cronet. (jbudorick@chromium.org)
  https://crrev.com/8e6fcd316b9f3551ec6618e39adb516accd0b0f9 Re-add perf-id and results-url. (dtu@chromium.org)
depot_tools:
  https://crrev.com/f0b0378318a0bca451dc05303ba3c0971b249103 Remove gerrit_rebase_patch_ref flag from bot_update API (andybons@chromium.org)

TBR=martiniss@chromium.org,phajdan.jr@chromium.org
BUG=none,634350,chromium:616035,642046,644563,644721,477150,544330,637806,584079,417518,644370,612417,642194

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Review-Url: https://codereview.chromium.org/2319333002

[modify] https://crrev.com/7761fc03d8cb1d604f9a58af630194e7633228c4/infra/config/recipes.cfg

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 8 2016

Project Member

Comment 15 by bugdroid1@chromium.org, Sep 8 2016

Project Member

Comment 16 by bugdroid1@chromium.org, Sep 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41f725484babc76cbda92eae9366e74a681db769

commit 41f725484babc76cbda92eae9366e74a681db769
Author: recipe-roller <recipe-roller@chromium.org>
Date: Thu Sep 08 18:34:11 2016

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug
(or complain)

build:
  https://crrev.com/395b994270c26b85198b4ab921880d21b6fc4d9d Fix "chromium.infra" LogDog canarying. (dnj@chromium.org)
  https://crrev.com/156cd97e26e5aaca148b26fcf70371e30eac4ebf DevTools: Add devtools for tryserver.chromium.linux (chenwilliam@chromium.org)
  https://crrev.com/44ac4f64965b436b43201bfe7e359f73ec073b82 Updating the low end bots to a vm that triggers the job. (eyaich@chromium.org)

TBR=martiniss@chromium.org,phajdan.jr@chromium.org
BUG= chromium:643243 , 642046 ,chromium:633253

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Review-Url: https://codereview.chromium.org/2322773003
Cr-Commit-Position: refs/heads/master@{#417350}

[modify] https://crrev.com/41f725484babc76cbda92eae9366e74a681db769/infra/config/recipes.cfg

Project Member

Comment 17 by bugdroid1@chromium.org, Sep 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra.git/+/9aeef928a7bb3b1deee7628b6f78dbd129559048

commit 9aeef928a7bb3b1deee7628b6f78dbd129559048
Author: recipe-roller <recipe-roller@chromium.org>
Date: Thu Sep 08 19:57:01 2016

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug
(or complain)

build:
  https://crrev.com/156cd97e26e5aaca148b26fcf70371e30eac4ebf DevTools: Add devtools for tryserver.chromium.linux (chenwilliam@chromium.org)
  https://crrev.com/44ac4f64965b436b43201bfe7e359f73ec073b82 Updating the low end bots to a vm that triggers the job. (eyaich@chromium.org)

TBR=martiniss@chromium.org,phajdan.jr@chromium.org
BUG=chromium:633253, 642046 

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Review-Url: https://codereview.chromium.org/2323533004

[modify] https://crrev.com/9aeef928a7bb3b1deee7628b6f78dbd129559048/infra/config/recipes.cfg

Project Member

Comment 18 by bugdroid1@chromium.org, Sep 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f755fc8d329167818a804a9225a32b9a389c5e50

commit f755fc8d329167818a804a9225a32b9a389c5e50
Author: chenwilliam <chenwilliam@chromium.org>
Date: Fri Sep 09 23:19:20 2016

DevTools: add devtools builder as CQ experiment

I added a builder for devtools on tryserver.chromium.linux here:
https://codereview.chromium.org/2319213002/

I've tried a few builds for the builder on the tryserver
and it seems to be working OK:
https://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_devtools

BUG= 642046 

Review-Url: https://codereview.chromium.org/2324573003
Cr-Commit-Position: refs/heads/master@{#417756}

[modify] https://crrev.com/f755fc8d329167818a804a9225a32b9a389c5e50/infra/config/cq.cfg

Description: Show this description
Project Member

Comment 20 by bugdroid1@chromium.org, Sep 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0becd9796f403d230751840a5c21b9a3e81d3bcf

commit 0becd9796f403d230751840a5c21b9a3e81d3bcf
Author: chenwilliam <chenwilliam@chromium.org>
Date: Tue Sep 20 02:49:03 2016

DevTools: Build release mode using JS and Python

Enables users to build release mode with only a frontend checkout
and without using GN or Ninja.

Instructions:
- Go to devtools/scripts/js_build
- Run "npm install"
- Run "npm run build"
- Release mode generated in devtools/release

BUG= 642046 

Review-Url: https://codereview.chromium.org/2344353004
Cr-Commit-Position: refs/heads/master@{#419660}

[modify] https://crrev.com/0becd9796f403d230751840a5c21b9a3e81d3bcf/third_party/WebKit/Source/devtools/.gitignore
[modify] https://crrev.com/0becd9796f403d230751840a5c21b9a3e81d3bcf/third_party/WebKit/Source/devtools/scripts/hosted_mode/server.js
[add] https://crrev.com/0becd9796f403d230751840a5c21b9a3e81d3bcf/third_party/WebKit/Source/devtools/scripts/js_build/ConcatenateProtocols.js
[add] https://crrev.com/0becd9796f403d230751840a5c21b9a3e81d3bcf/third_party/WebKit/Source/devtools/scripts/js_build/gulpfile.js
[add] https://crrev.com/0becd9796f403d230751840a5c21b9a3e81d3bcf/third_party/WebKit/Source/devtools/scripts/js_build/package.json
[add] https://crrev.com/0becd9796f403d230751840a5c21b9a3e81d3bcf/third_party/WebKit/Source/devtools/scripts/js_build/release_mode_diff.txt
[add] https://crrev.com/0becd9796f403d230751840a5c21b9a3e81d3bcf/third_party/WebKit/Source/devtools/scripts/js_build/test.sh
[add] https://crrev.com/0becd9796f403d230751840a5c21b9a3e81d3bcf/third_party/WebKit/Source/devtools/scripts/utils.js

Project Member

Comment 21 by bugdroid1@chromium.org, Sep 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0f2a721bf18b8b96d9f9a964520b46fdd248fa0d

commit 0f2a721bf18b8b96d9f9a964520b46fdd248fa0d
Author: chenwilliam <chenwilliam@chromium.org>
Date: Fri Sep 23 01:03:17 2016

Revert of DevTools: add devtools builder as CQ experiment (patchset #1 id:1 of https://codereview.chromium.org/2324573003/ )

Reason for revert:
No longer need devtools experiment.

Original issue's description:
> DevTools: add devtools builder as CQ experiment
>
> I added a builder for devtools on tryserver.chromium.linux here:
> https://codereview.chromium.org/2319213002/
>
> I've tried a few builds for the builder on the tryserver
> and it seems to be working OK:
> https://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_devtools
>
> BUG= 642046 
>
> Committed: https://crrev.com/f755fc8d329167818a804a9225a32b9a389c5e50
> Cr-Commit-Position: refs/heads/master@{#417756}

TBR=sergiyb@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 642046 

Review-Url: https://codereview.chromium.org/2350533002
Cr-Commit-Position: refs/heads/master@{#420520}

[modify] https://crrev.com/0f2a721bf18b8b96d9f9a964520b46fdd248fa0d/infra/config/cq.cfg

Project Member

Comment 22 by bugdroid1@chromium.org, Oct 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6d7f23b089bcfd951446564995916395b579140d

commit 6d7f23b089bcfd951446564995916395b579140d
Author: chenwilliam <chenwilliam@chromium.org>
Date: Mon Oct 17 21:05:37 2016

DevTools: Make eslint mandatory and check node.js/npm modules in presubmit

- Adds presubmit step to ensure users are running on node.js v4 or later
and installs node_modules using 'npm install'. If 'npm install' fails
(e.g. npm registry has an outage), it's a soft warning that doesn't fail
the presubmit check. Most likely, the user already has node_modules installed.

- Automatically installs local node.js for Linux users; Windows and Mac users
have official node.js installers

- Even though this runs 'npm install' with every presubmit, if it has been
installed once, running 'npm install' is a quick check (<1 sec to run)

- Makes eslint a mandatory presubmit step (before if it wasn't installed,
it would skip the step with a soft warning).

BUG= 642046 

Review-Url: https://codereview.chromium.org/2338753003
Cr-Commit-Position: refs/heads/master@{#425777}

[modify] https://crrev.com/6d7f23b089bcfd951446564995916395b579140d/third_party/WebKit/Source/devtools/.gitignore
[modify] https://crrev.com/6d7f23b089bcfd951446564995916395b579140d/third_party/WebKit/Source/devtools/PRESUBMIT.py
[modify] https://crrev.com/6d7f23b089bcfd951446564995916395b579140d/third_party/WebKit/Source/devtools/package.json
[add] https://crrev.com/6d7f23b089bcfd951446564995916395b579140d/third_party/WebKit/Source/devtools/scripts/install_node_deps.py
[modify] https://crrev.com/6d7f23b089bcfd951446564995916395b579140d/third_party/WebKit/Source/devtools/scripts/lint_javascript.py
[add] https://crrev.com/6d7f23b089bcfd951446564995916395b579140d/third_party/WebKit/Source/devtools/scripts/local_node/__init__.py
[rename] https://crrev.com/6d7f23b089bcfd951446564995916395b579140d/third_party/WebKit/Source/devtools/scripts/local_node/node.py
[rename] https://crrev.com/6d7f23b089bcfd951446564995916395b579140d/third_party/WebKit/Source/devtools/scripts/local_node/npm.py

Project Member

Comment 23 by bugdroid1@chromium.org, Oct 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58659ab4948e42c2ad11763bd3da735962cab400

commit 58659ab4948e42c2ad11763bd3da735962cab400
Author: chenwilliam <chenwilliam@chromium.org>
Date: Thu Oct 20 20:26:10 2016

DevTools: add devtools builder as CQ experiment

I added a builder for devtools on tryserver.chromium.linux here:
https://codereview.chromium.org/2319213002/

I've tried a few builds for the builder on the tryserver
and it seems to be working OK:
https://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_devtools

BUG= 642046 

Committed: https://crrev.com/f755fc8d329167818a804a9225a32b9a389c5e50
Review-Url: https://chromiumcodereview.appspot.com/2324573003
Cr-Original-Commit-Position: refs/heads/master@{#417756}
Cr-Commit-Position: refs/heads/master@{#426581}

[modify] https://crrev.com/58659ab4948e42c2ad11763bd3da735962cab400/infra/config/cq.cfg

Project Member

Comment 24 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/92d8ddfd17928ad494f7164393314f318486e9bc

commit 92d8ddfd17928ad494f7164393314f318486e9bc
Author: chenwilliam <chenwilliam@chromium.org>
Date: Wed Oct 26 21:16:37 2016

Revert of DevTools: add devtools builder as CQ experiment (patchset #1 id:1 of https://codereview.chromium.org/2324573003/ )

Reason for revert:
No longer need CQ experiment

Original issue's description:
> DevTools: add devtools builder as CQ experiment
>
> I added a builder for devtools on tryserver.chromium.linux here:
> https://codereview.chromium.org/2319213002/
>
> I've tried a few builds for the builder on the tryserver
> and it seems to be working OK:
> https://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_devtools
>
> BUG= 642046 
>
> Committed: https://crrev.com/f755fc8d329167818a804a9225a32b9a389c5e50
> Committed: https://crrev.com/58659ab4948e42c2ad11763bd3da735962cab400
> Cr-Original-Commit-Position: refs/heads/master@{#417756}
> Cr-Commit-Position: refs/heads/master@{#426581}

TBR=sergiyb@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 642046 

Review-Url: https://codereview.chromium.org/2458463002
Cr-Commit-Position: refs/heads/master@{#427795}

[modify] https://crrev.com/92d8ddfd17928ad494f7164393314f318486e9bc/infra/config/cq.cfg

Project Member

Comment 25 by bugdroid1@chromium.org, Oct 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f5cf2be3e760df7129ad164948c5ebd6772b70c7

commit f5cf2be3e760df7129ad164948c5ebd6772b70c7
Author: chenwilliam <chenwilliam@chromium.org>
Date: Thu Oct 27 23:21:42 2016

DevTools: Install local node.js for Mac

BUG= 642046 

Review-Url: https://codereview.chromium.org/2455673003
Cr-Commit-Position: refs/heads/master@{#428202}

[modify] https://crrev.com/f5cf2be3e760df7129ad164948c5ebd6772b70c7/third_party/WebKit/Source/devtools/scripts/install_node_deps.py

Project Member

Comment 26 by bugdroid1@chromium.org, Dec 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/56a90381f4d44cefeb5edb83a6227ebfa02fb885

commit 56a90381f4d44cefeb5edb83a6227ebfa02fb885
Author: chenwilliam <chenwilliam@chromium.org>
Date: Fri Dec 09 02:16:28 2016

DevTools: Add support for installing node and running eslint over devtools.

This CL adds a step to the 'Linux Tests' builder that will run
a step (under swarming) that runs eslint over the devtools frontend
code. eslint uses node.js, so this CL also adds a hook to gclient
to download node if CHROME_HEADLESS is present in the
environment.

R=iannucci@chromium.org, dpranke@chromium.org
BUG= 642046 

Review-Url: https://codereview.chromium.org/2486903002
Cr-Commit-Position: refs/heads/master@{#437431}

[modify] https://crrev.com/56a90381f4d44cefeb5edb83a6227ebfa02fb885/DEPS
[modify] https://crrev.com/56a90381f4d44cefeb5edb83a6227ebfa02fb885/testing/buildbot/chromium.linux.json
[modify] https://crrev.com/56a90381f4d44cefeb5edb83a6227ebfa02fb885/testing/buildbot/gn_isolate_map.pyl
[rename] https://crrev.com/56a90381f4d44cefeb5edb83a6227ebfa02fb885/testing/scripts/run_devtools_check.py
[modify] https://crrev.com/56a90381f4d44cefeb5edb83a6227ebfa02fb885/third_party/WebKit/Source/devtools/.gitignore
[modify] https://crrev.com/56a90381f4d44cefeb5edb83a6227ebfa02fb885/third_party/WebKit/Source/devtools/BUILD.gn
[add] https://crrev.com/56a90381f4d44cefeb5edb83a6227ebfa02fb885/third_party/WebKit/Source/devtools/scripts/buildbot/run_eslint.py
[modify] https://crrev.com/56a90381f4d44cefeb5edb83a6227ebfa02fb885/third_party/WebKit/Source/devtools/scripts/local_node/node.py

Status: Fixed (was: Started)

Sign in to add a comment