Update Neutrino from v4 to v7

ASSIGNED
Assigned to

Status

Tree Management
Treeherder: Frontend
P1
normal
ASSIGNED
6 months ago
27 days ago

People

(Reporter: emorley, Assigned: emorley)

Tracking

(Depends on: 1 bug, Blocks: 2 bugs)

Details

Attachments

(3 attachments)

(Assignee)

Description

6 months ago
Broken out of bug 1353014.

PR in progress:
https://github.com/mozilla/treeherder/pull/2309

Comment 1

6 months ago
Created attachment 8867693 [details] [review]
[treeherder] eliperelman:neutrino-v5 > mozilla:master

Comment 2

6 months ago
Created attachment 8870558 [details] [review]
[treeherder] mozilla:neutrino-v5 > mozilla:master
I'm going to see if I can finish this up.  I have a lot to learn about Webpack and Neutrino to do so, though.  :)

Updated

6 months ago
Assignee: nobody → cdawson
Ed--  Is it ok to assign this back to you?
Assignee: cdawson → emorley
(Assignee)

Comment 5

4 months ago
Yup :-)
(Assignee)

Updated

3 months ago
Summary: Update from Neutrino 4.x to 5.x → Update from Neutrino 4.x to 6.x
(Assignee)

Updated

3 months ago
Blocks: 1351907
Hey Ed--  I'm hoping to merge the test-group UI into the main repo at some point before too long.  I still have one feature to add, but was wondering if this is on your soon-to-do list and/or if us tag-teaming would help move this along.

Thanks!  :)

Updated

3 months ago
Blocks: 1366909
(Assignee)

Comment 7

3 months ago
Yeah will return to this in the next week or two :-)
(Assignee)

Updated

2 months ago
Priority: P2 → P1
(Assignee)

Updated

2 months ago
Depends on: 1402532
(Assignee)

Updated

2 months ago
Depends on: 1403195

Comment 8

2 months ago
Created attachment 8914280 [details] [review]
[treeherder] mozilla:eslint-fixes > mozilla:master
(Assignee)

Updated

2 months ago
Attachment #8914280 - Flags: review?(cdawson)
(Assignee)

Comment 9

2 months ago
An update on work so far...

Neutrino v7 has now been released, which brings with it webpack 3 as well as a number of changes that reduce the amount of custom config we need (for example switching away from svg-url-loader, disabling babel-polyfill, ...). Updating my local branch to use it instead of v6 was very painless, so I'm now targeting v7.

I also wrote a POC for merging the manifest prototype into this repo with Neutrino v4 (bug 1366909 comment 3), so the Neutrino upgrade is no longer technically blocking that bug.

I've opened upstream PRs to fix a few things:
https://github.com/mozilla-neutrino/neutrino-dev/pull/333
https://github.com/mozilla-neutrino/neutrino-dev/pull/325
https://github.com/mozilla-neutrino/neutrino-dev/pull/335
https://github.com/mozilla-neutrino/neutrino-dev/pull/291
https://github.com/mozilla-neutrino/neutrino-dev/pull/337
https://github.com/mozilla-neutrino/neutrino-dev/pull/338
https://github.com/mozilla-neutrino/webpack-chain/pull/40
https://github.com/mozilla-neutrino/webpack-chain/pull/41

Debugging the inline SVG issue (introduced in Neutrino v6, resolved in v7) took quite a while, see:
https://github.com/mozilla-neutrino/neutrino-dev/issues/272#issuecomment-332283598
https://github.com/mozilla-neutrino/neutrino-dev/issues/272#issuecomment-332885244
https://github.com/bhovhannes/svg-url-loader/issues/126
https://github.com/webpack-contrib/css-loader/issues/615

And I opened issues for a few other things that I encountered:
https://github.com/mozilla-neutrino/neutrino-dev/issues/326
https://github.com/mozilla-neutrino/neutrino-dev/issues/327
https://github.com/mozilla-neutrino/neutrino-dev/issues/328
https://github.com/mozilla-neutrino/neutrino-dev/issues/332
https://github.com/mozilla-neutrino/neutrino-dev/issues/330
https://github.com/mozilla-neutrino/neutrino-dev/issues/329

Working on the upgrade has also exposed several existing issues in Treeherder's build process:
* Several of the .gif and .svg image assets (eg `dancing_cat.gif`, `logviewerIcon.svg`) were not being caught by the old custom Neutrino config, since it uses file-loader not html-loader so doesn't replace the references. As part of upgrading, the paths to these assets from the partials have to be updated, since they are currently incorrect relative to the source directory.
* There are also .png assets (eg `line_chart.png` and `tree_closed.png`) that are not currently being included in the webpack build. Fixing these is more involved, so I'll save this to a followup bug.
* The vendored package list is incomplete, meaning several libraries are ending up in the main app bundles (eg `index.HASH.bundle.js`, `perf.HASH.bundle.js`, ...) rather than the vendor bundle (eg `vendor.HASH.bundle.js`). I won't fix this as part of this bug, but will file another for doing so later.
* The webpack-dev-server and react hot reload functionality is broken on any page but index. Though I'll also save this to a followup bug.
* (We knew this since it was deliberately disabled in bug 1373376, but for completeness..) The bundle hashes changed after every build, meaning that the vendor bundle would never be cached across deploys.

Things that are finished:
* neutrino build (the production build)
* neutrino lint
* neutrino test (the karma test run)
  -> though there's a require path bug I'm having to work around that would be good to figure out

Remaining:
* neutrino start (the dev server mode)
  -> Working, but need to re-wire up the API proxying
  -> Need to also resolve bug 1363722, to save having to re-implement `neutrino start:local`
* Running a final comparison of the generated build assets before/after
* Updating docs
Status: NEW → ASSIGNED
Depends on: 1363722
Summary: Update from Neutrino 4.x to 6.x → Update Neutrino from v4 to v7
Comment on attachment 8914280 [details] [review]
[treeherder] mozilla:eslint-fixes > mozilla:master

This is truly awesome.  I really prefer strict linting and styling.  :)  I almost don't care what it is, as long as our code is consistent.  Thanks for doing this!!

Updated

2 months ago
Attachment #8914280 - Flags: review?(cdawson) → review+

Comment 11

2 months ago
Commits pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/40f10280bcf5e819c50bfe99925054f53a34bc97
Bug 1364894 - eslint --fix for array-bracket-spacing

https://eslint.org/docs/rules/array-bracket-spacing
https://github.com/airbnb/javascript#whitespace--in-brackets

https://github.com/mozilla/treeherder/commit/1b1ea0cfec63e8c99dcb7224932608de9fef0883
Bug 1364894 - eslint --fix for brace-style

https://eslint.org/docs/rules/brace-style
https://github.com/airbnb/javascript#blocks--cuddled-elses

https://github.com/mozilla/treeherder/commit/ba32cbca3d75dcfbaf7b44b574361d75eff5d236
Bug 1364894 - eslint --fix for computed-property-spacing

https://eslint.org/docs/rules/computed-property-spacing

https://github.com/mozilla/treeherder/commit/4db01dfab4d2027ef341c377acfab46be0f4bdd9
Bug 1364894 - eslint --fix for dot-location

https://eslint.org/docs/rules/dot-location

https://github.com/mozilla/treeherder/commit/cc94bfd835a5c04b54a26f28a2b39408af9b0d0a
Bug 1364894 - eslint --fix for dot-notation

https://eslint.org/docs/rules/dot-notation
https://github.com/airbnb/javascript#properties--dot

https://github.com/mozilla/treeherder/commit/b11aecd5410d0887fa9025f588678c06ab7a781e
Bug 1364894 - eslint --fix for lines-around-directive

https://eslint.org/docs/rules/lines-around-directive

https://github.com/mozilla/treeherder/commit/02135f71f37c6848d41a1724bb49d745ec4a4a68
Bug 1364894 - eslint --fix for newline-per-chained-call

https://eslint.org/docs/rules/newline-per-chained-call
https://github.com/airbnb/javascript#whitespace--chains

https://github.com/mozilla/treeherder/commit/da8295083db71edf4aed107c195094dc13937d04
Bug 1364894 - eslint --fix for no-confusing-arrow

https://eslint.org/docs/rules/no-confusing-arrow
https://github.com/airbnb/javascript#arrows--confusing

https://github.com/mozilla/treeherder/commit/830c5df0f8f757141bdddceffd990a42f38e29ea
Bug 1364894 - eslint --fix for no-multi-spaces

https://eslint.org/docs/rules/no-multi-spaces

https://github.com/mozilla/treeherder/commit/ebf3d809d2fd6e45297285b3f2dcb3c2c53e53af
Bug 1364894 - eslint --fix for no-tabs

https://eslint.org/docs/rules/no-tabs

https://github.com/mozilla/treeherder/commit/d5800c2e5abe648878c3479023e98517fe26355d
Bug 1364894 - eslint --fix for no-unneeded-ternary

https://eslint.org/docs/rules/no-unneeded-ternary
https://github.com/airbnb/javascript#comparison--unneeded-ternary

https://github.com/mozilla/treeherder/commit/ff63391397cff9aba4e6c85b1f37b18bb841a055
Bug 1364894 - eslint --fix for no-useless-concat

https://eslint.org/docs/rules/no-useless-concat

https://github.com/mozilla/treeherder/commit/6cd4ddfc1eab5d2288673a3a20e2ff15e0d8d40f
Bug 1364894 - eslint --fix for object-property-newline

https://eslint.org/docs/rules/object-property-newline

https://github.com/mozilla/treeherder/commit/889d4d4ba624101be7dbc64c83386923d6d2bb5c
Bug 1364894 - eslint --fix for operator-assignment

https://eslint.org/docs/rules/operator-assignment

https://github.com/mozilla/treeherder/commit/79c17914f9540ad987cb99dc045f8123c4c271e8
Bug 1364894 - eslint --fix for semi-spacing

https://eslint.org/docs/rules/semi-spacing

https://github.com/mozilla/treeherder/commit/d3f273cb49d2b2e3a4bf25c334016b0d6ebb2195
Bug 1364894 - eslint --fix for space-in-parens

https://eslint.org/docs/rules/space-in-parens
https://github.com/airbnb/javascript#whitespace--in-parens

https://github.com/mozilla/treeherder/commit/27813ff53423770b6d3ad89c240196db2f573340
Bug 1364894 - eslint --fix for space-unary-ops

https://eslint.org/docs/rules/space-unary-ops

https://github.com/mozilla/treeherder/commit/7233dfd46f63c8d478c1ddbdebe608023d3d32e5
Bug 1364894 - eslint --fix for wrap-iife

https://eslint.org/docs/rules/wrap-iife
https://github.com/airbnb/javascript#functions--iife
(Assignee)

Updated

a month ago
Depends on: 1408776
(Assignee)

Updated

a month ago
No longer blocks: 1364010
(Assignee)

Updated

27 days ago
Component: Treeherder → Treeherder: Frontend
You need to log in before you can comment on or make changes to this bug.