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

Can't change chart data source if the new source has same schema as the old one #23289

Closed
zhaorui2022 opened this issue Mar 7, 2023 · 3 comments

Comments

@zhaorui2022
Copy link
Contributor

Summary

When trying to change the dataset/data source of a chart, after saving, the dataset keeps changing back to the old one.

Environments

  • Superset Version: This bug was originally discovered by our user in Production which runs Superset 2.0. But I can also reproduce the error in 2.0.1 using docker-compose.
  • We are using Python 3.9 but Python version should not matter here.
  • Chrome was used to reproduce the error but the browser should not matter

How to reproduce the bug

Here is how I reproduced the bug in 2.0.1:

  • Choose any chart, find the data source
  • Create another data source which has the same schema and dataset configuration (I did a SELECT and then created a view based on the results)
  • Copy all the metrics, fns configured in the original dataset to make sure they are the same
  • Go back to the chart, update the data source to the new one, follow the prompt and then save
  • After saving, the chart's data source changes back to the old one

Videos / Screenshots

  • Here is a video of how to reproduce the bug
Google.Chrome.-.Superset.2023-03-06.at.4.39.27.PM.mp4
  • On the backend DB, it seems the chart has been updated (See datasource_name)

Screenshot 2023-03-06 at 4 41 46 PM

@zhaorui2022
Copy link
Contributor Author

zhaorui2022 commented Mar 7, 2023

I just switched to master branch and tested with latest commit using docker-compose, and it seems no longer an issue there.

@zhaorui2022
Copy link
Contributor Author

zhaorui2022 commented Mar 8, 2023

This one seems like the fix. Will try to cherry-pick and verify. #20448

@zhaorui2022
Copy link
Contributor Author

Verified locally the commit contains the fix for this issue.

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

No branches or pull requests

1 participant