Closed Bug 1364891 Opened 7 years ago Closed 7 years ago

Update from React 15.3 to 15.6

Categories

(Tree Management :: Treeherder: Frontend, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: camd)

References

Details

Attachments

(1 file)

We're currently using 15.3.2.

The new releases include some improvements to the ability to interpret performance profiles. 

Release notes:
https://facebook.github.io/react/blog/2016/11/16/react-v15.4.0.html
https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html

Note that enzyme will also need updating, which will mean updating the enzyme deps:
https://github.com/airbnb/enzyme#installation
Since comment 0, there's also been:
https://facebook.github.io/react/blog/2017/06/13/react-v15.6.0.html
https://facebook.github.io/react/blog/2017/09/25/react-v15.6.2.html

(Plus React 16, but let's ignore that for now)

Also, the test based view prototype is using React 15.4, so updating to a newer React likely blocks bug 1366909.

Unless there are major roadblocks, I'd suggest we update both Treeherder and the test based UI repo to React 15.6.2, prior to merging them.
Blocks: 1366909
Priority: P3 → P1
Summary: Update from React 15.3 to 15.5 → Update from React 15.3 to 15.6
Agreed, yeah.  I'll work on that this week.
Assignee: nobody → cdawson
No longer blocks: 1364010
I think it makes sense to include the Enzyme upgrade as part of this work.

In fact, as part of bug 1364894 I started getting obscure module resolution errors in the JSX parts of our karma config. After several hours of not getting anywhere with Enzyme 2.x.x, I tried the new Enzyme 3.x.x release since it looked promising to fix it.

I did hit one hurdle with Enzyme 3.x and React 15.3, which was:
https://github.com/airbnb/enzyme/issues/1277

Plus Enzyme 3 requires a few changes to the existing JSX tests we have, since they inadvertently are using private APIs.

For now I think I have a way to make the Neutrino v7 upgrade work with Enzyme 2.x, but I've saved the progress I made with Enzyme 3, which can be used to save some time in this bug:
https://github.com/mozilla/treeherder/compare/enzyme3-wip
Component: Treeherder → Treeherder: Frontend
(In reply to Ed Morley [:emorley] from comment #3)
> I did hit one hurdle with Enzyme 3.x and React 15.3, which was:
> https://github.com/airbnb/enzyme/issues/1277

They've now fixed that issue:
https://github.com/airbnb/enzyme/pull/1301
Attachment #8927468 - Flags: review?(emorley)
Comment on attachment 8927468 [details] [review]
[treeherder] mozilla:react-15.6 > mozilla:master

Nice work!
Attachment #8927468 - Flags: review?(emorley) → review+
Commit pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/97076b338da92e1393ba55b09f06ca571cec0f60
Bug 1364891 - Update from React 15.3 to 15.6

Also upgrade Enzyme from 2.7.1 to 3.1.1

Most notable change here is that React.PropTypes is now
moved to a separate package and referenced just by
PropTypes.  So this needed some import and linting changes.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Blocks: 1426902
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: