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

[Explore] Single metric selector is inoperable if the referenced metric no longer exists #14034

Closed
3 tasks done
john-bodley opened this issue Apr 8, 2021 · 11 comments · Fixed by #17503
Closed
3 tasks done
Assignees
Labels
#bug Bug report explore:dataset Related to the dataset of Explore good first issue Good first issues for new contributors

Comments

@john-bodley
Copy link
Member

john-bodley commented Apr 8, 2021

If a metric is removed from a datasource the single metric widget is inoperable if saved slice or URL references the previously defined metric. Note this isn't a problem for visualization types which support multiple metrics.

Expected results

The metric widget to render correctly.

Actual results

The metric widget in inoperable (see attached screenshot).

Screenshots

Screen Shot 2021-04-09 at 8 24 04 AM

How to reproduce the bug

  1. Using the example data visit the "Number of Girls" chart.
  2. Edit the datasource by deleting the sum_num metric and then clicking SAVE.
  3. Reload the page.
  4. Verify the METRIC widget is inoperable (see screenshot).

Environment

(please complete the following information):

  • superset version: master
  • python version: 3.7
  • node.js version: 14

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@john-bodley john-bodley added the #bug Bug report label Apr 8, 2021
@junlincc junlincc changed the title Single metric selector is inoperable if the referenced metric no longer exists [Explore]Single metric selector is inoperable if the referenced metric no longer exists Apr 8, 2021
@junlincc junlincc added good first issue Good first issues for new contributors explore:dataset Related to the dataset of Explore labels Apr 8, 2021
@Bonifacio2
Copy link
Contributor

I'll take a look at this over the weekend.

@Bonifacio2
Copy link
Contributor

I wasn't able to reproduce the error. After deleting the metric the save button is disabled and I get the following warning:

supersetbug

@john-bodley
Copy link
Member Author

@Bonifacio2 I was missing a step (now updated). After deleting the metric you'll need to reload the page and then the metric selector will be inoperable.

@Bonifacio2
Copy link
Contributor

Thank you for the update. I'll take a second look at it tomorrow.

@Bonifacio2
Copy link
Contributor

Still unable to reproduce. :(
I'm guessing the change is only persisted to the database when you click the save button and not right when you remove the metric. After reloading the page it looks exactly like the first time it was loaded.
Are you using superset's latest code?

@john-bodley
Copy link
Member Author

john-bodley commented Jun 4, 2021

@Bonifacio2 this is reproducible using the latest code (cut from master on/around the 2nd of June) and was also reported by #14151.

@john-bodley
Copy link
Member Author

@Bonifacio2 I was wondering whether there was any update on this? I rebased from master today and rebuilt my environment from scratch and was able to reproduce the issue as outlined in the description.

@junlincc
Copy link
Member

@john-bodley did you have any feature flag enabled?

@Bonifacio2
Copy link
Contributor

Hello, everyone. Sorry, but I no longer have the time to take care of this issue. I guess this it is up for grabs again.

@john-bodley
Copy link
Member Author

@junlincc no—I was using the out-of-the-box configuration.

@john-bodley john-bodley changed the title [Explore]Single metric selector is inoperable if the referenced metric no longer exists [Explore] Single metric selector is inoperable if the referenced metric no longer exists Sep 21, 2021
@rusackas
Copy link
Member

@kgabryje said he'd be willing to do a little investigation here, so I'm (at least temporarily) sticking his name on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report explore:dataset Related to the dataset of Explore good first issue Good first issues for new contributors
Projects
None yet
5 participants