Closed
Bug 1489497
Opened 6 years ago
Closed 6 years ago
Graph not showing in IFV (areas.transition is not a function)
Categories
(Tree Management :: Treeherder, defect)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dluca, Assigned: sclements)
Details
Attachments
(1 file)
There's a message saying "Something went wrong" instead of the usual graph.
https://irccloud.mozilla.com/file/Ydz16VsT/image.png
Updated•6 years ago
|
Flags: needinfo?(sclements)
Comment 1•6 years ago
|
||
on the main page https://treeherder.mozilla.org/intermittent-failures.html#/main?startday=2018-08-31&endday=2018-09-07&tree=trunk, I see in the console:
TypeError: "fr.transition is not a function"
followed by a huge stack trace of bundle and random goodness.
Comment 2•6 years ago
|
||
The prod deploy was rolled back a little bit ago, so this should now be resolved.
Reproducing locally in a non-minified build, I see:
```
TypeError: areas.transition is not a function (metricsgraphics.js:4363)
The above error occurred in the <Graph> component:
in Graph (created by GraphsContainer)
...
```
...which is this line:
https://github.com/metricsgraphics/metrics-graphics/blob/v2.15.6/dist/metricsgraphics.js#L4363
I also found a similar error mentioned in:
https://github.com/d3/d3-selection/issues/185
Bisecting locally shows it started as of:
https://github.com/mozilla/treeherder/commit/7c394515f8032cd2603615372af1ba765c0a948d
In that diff, there are duplicates of several of the d3-* sub-packages. This is due to the broken way that d3 v4 used to pin to exact sub-dependencies from the parent package, but yet the sub-packages themselves used tilde version ranges, leading to conflicting versions throughout.
I reported this to d3 a while ago (I'd link to the GitHub issue, but they've turned off issues on the main d3 repo, which hides all existing issues?!?) - and they thankfully fixed this in d3 v5, however we can't update to it, since the latest stable metrics-graphics requires d3 v4.
Anyway, to confirm it's the duplicate dependencies that are the issue, and since the bug seems to be about the `svg.selectAll()` not returning something expected, I tried adding this to Treeherder's package.json to override the versions specified by d3:
```
"resolutions": {
"d3-selection": "1.3.2"
},
```
With that, the issue no longer occurs.
As such to fix this issue, either:
1) The parent d3 package needs to release a 4.x point release that bumps the dependency on `d3-selection` from `1.3.0` to `1.3.2` (or ideally just `1`, ie 1.x)
2) A minor version of metrics graphics is released that switches it's d3 dependency from the parent package to the d3-* packages underneath (attempting to match versions, so it's not a breaking change, like d3 v5 would be)
3) A release of metrics-graphics that supports d3 v5 is released
4) We add a bunch of "resolutions" entries to our package.json to override the broken dependency tree from d3
Will - do you have any thoughts?
Flags: needinfo?(wlachance)
Summary: Graph not showing in IFV → Graph not showing in IFV (areas.transition is not a function)
Comment 3•6 years ago
|
||
I am planning a new release of metricsgraphics fairly soon (either this weekend of early next week), which will use d3 v5. Will let you know when I've done so.
Flags: needinfo?(wlachance)
Assignee | ||
Comment 4•6 years ago
|
||
Thanks for investigating Ed (explains why it looked fine when checking stage late last week). At least the error boundary prevented the entire page from breaking.
Flags: needinfo?(sclements)
Comment 5•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → sclements
Assignee | ||
Updated•6 years ago
|
Attachment #9008145 -
Flags: review?(emorley)
Comment 6•6 years ago
|
||
Comment on attachment 9008145 [details] [review]
Link to GitHub pull-request: https://github.com/mozilla/treeherder/pull/4020
Many thanks :-)
Attachment #9008145 -
Flags: review?(emorley) → review+
Comment 7•6 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/b5a6736f9b26ac7c6441fb5da3a95831933e7dd7
Bug 1489497 - Force metrics-graphics to use d3 5.x (#4020)
To resolve the conflicting package versions (due to d3 4.x's broken
dependency structure) that was causing exceptions in the intermittent
failures view ("areas.transition is not a function").
The `resolutions` entry can be removed with the next release of
`metrics-graphics`, which will depend on d3 5.x..
Also fixes #3367.
Comment 8•6 years ago
|
||
Looks good on stage :-)
Marking fixed since the metrics-graphics update will be handled via the Renovate PR when it gets opened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Component: Intermittent Failures View → TreeHerder
You need to log in
before you can comment on or make changes to this bug.
Description
•