apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.87k stars 13.55k forks source link

After upgrade to v3.13, all data sources and other chart properties are missing #30329

Open bill-tulskie opened 2 days ago

bill-tulskie commented 2 days ago

Bug description

We had to migrate a Superset installation to a new server while upgrading from v1.3 to v3.13. We also moved the database (PostgreSQL 15) containing the datasets for many (150) charts to a new server. We updated the connection for the database. Now when we open a dashboard containing the charts, they show as expected on the dashboard but when we edit any of the charts, the dataset for the chart and all the other chart properties are missing. The charts show in the charts list with the correct title and dataset but when we edit a chart both the dataset is shown as missing with a warning window and even the title is blank. Any ideas for what's wrong / how to fix?

We have tried to copy the dashboards while copying the charts. The copied charts have missing datasets too. We have tried resaving the database connection information. We have tried debug logging. There are no entries posted in the log when we edit any of the charts. We have tried resaving the datasets with no changes and resaving after forcing refreshes of the schema and the table. Nothing that we tried reestablished the datasets for the charts.

How to reproduce the bug

Edit a chart after upgrading to v3.13

Screenshots/recordings

image shows dashboard rendering correctly

image shows when editing chart, all chart setting are missing

image shows that the chart list correctly shows titles and datasets

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Firefox

Additional context

No response

Checklist

dosubot[bot] commented 2 days ago

Hey @bill-tulskie! I'm here to help you with your Superset issue. I can assist with bug fixes, answer questions, and guide you on becoming a contributor. Let's work together to resolve this issue.

I found a similar open issue that might be relevant to your problem: apache/superset latest 7502beb92ce5, load_examples -> dashboards not creating for me. The suggested solution there was to re-setup everything with a MySQL backend and run the following commands:

  1. superset upgrade db
  2. superset init
  3. superset load-examples

Although this issue is slightly different, the steps might help in resolving your problem as well [1].

Additionally, to fix the issue of missing datasets and chart properties after upgrading to v3.13 and migrating the database, you should apply the migration that fixes the out-of-sync schema_perm in charts and datasets. This migration is included in the changelog for version 3.0.0:

Applying this migration should resolve the issue with missing datasets and chart properties.

To continue talking to Dosu, mention @dosu.

bill-tulskie commented 1 day ago

Dosu, (@dosu)

Thanks for the reply. We can't switch to MySQL because the Postgres DB contains a great deal of existing work. We will try the migration for v3.0.0 mentioned in #24884. Thanks for that reference.

dosubot[bot] commented 1 day ago

You're welcome! If you encounter any issues while applying the migration or need further assistance, feel free to reach out. Good luck with the migration, and I hope it resolves the problem with your datasets and chart properties.

To continue talking to Dosu, mention @dosu.

bill-tulskie commented 1 day ago

Dosu, (@dosu)

Based on your recommendation, we ran 'superset upgrade db' and then 'superset init' which produced the output in the attachment. This fixed our problem.

Thanks for your help.

Bill photo_2024-09-19 16 17 44