mozilla / telemetry-dashboard

Web-frontend for aggregated telemetry data
telemetry.mozilla.org
Other
89 stars 113 forks source link

When selecting a metric that has no data the Dashboard shows the previous data (histogramList[0] is undefined) #606

Closed chutten closed 5 years ago

chutten commented 5 years ago

In the event that a metric has no data to show (like Nightly 66's DEVTOOLS_FLEXBOX_HIGHLIGHTER_TIME_ACTIVE_SECONDS when "sanitize data" is true), then we error to the log

TypeError: histogramsList[0] is undefined[Learn More] dist.js:813:11
    displayHistograms https://telemetry.mozilla.org/new-pipeline/src/dist.js:813
    <anonymous> https://telemetry.mozilla.org/new-pipeline/src/dist.js:380
dispatch7jQuery gFilterChangeTimeout https://telemetry.mozilla.org/new-pipeline/src/dist.js:347
    calculateHistograms https://telemetry.mozilla.org/new-pipeline/src/dist.js:570
    updateDateRange https://telemetry.mozilla.org/new-pipeline/src/dist.js:648
    calculateHistograms https://telemetry.mozilla.org/new-pipeline/src/dist.js:568
    Telemetry_getEvolution https://telemetry.mozilla.org/v2/telemetry.js:569
    populateEntriesMap https://telemetry.mozilla.org/v2/telemetry.js:498
    onload https://telemetry.mozilla.org/v2/telemetry.js:380

And the view remains on the previous data, whatever it was. We -do- have the ability to show "no data for these options" views via metricsgraphics, so we should probably do that instead of silently throwing a fit.

hardik25 commented 5 years ago

@chutten

I would like to work on this issue. From initial triaging, I could locate the part of code which will display the "no data" message. Below is the part of code that I found in the function displaySingleHistogramSet in dist.js:

https://github.com/mozilla/telemetry-dashboard/blob/7d7c4a00e0756ae80723f9be1a0540d914986d7c/new-pipeline/src/dist.js#L1065

Could you please confirm if I am on the right track?

Also, how could I test my fixes?

Thanks!

chutten commented 5 years ago

Sorry for the delay, I was out for the week.

Yes, that is exactly the "no data" message we hope to trigger! You can test your fix by loading the Measurement Dashboard and choosing DEVTOOLS_FLEXBOX_HIGHLIGHTER_TIME_ACTIVE_SECONDS as the metric you'd like to display. Check the devtools console for a TypeError. If there is one, the problem persists.

chutten commented 5 years ago

Unassigning due to inactivity.