Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
chutten opened this issue Jan 15, 2019 · 3 comments · Fixed by #624

Comments

@chutten
Copy link
Contributor

chutten commented Jan 15, 2019

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
Copy link
Contributor

@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:

if (histograms.length === 0) {

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

Also, how could I test my fixes?

Thanks!

@chutten
Copy link
Contributor Author

chutten commented Mar 18, 2019

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 chutten removed the assigned label Apr 11, 2019
@chutten
Copy link
Contributor Author

chutten commented Apr 11, 2019

Unassigning due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants