getredash/redash

Can't delete a data source if one of the queries references query result from it but uses a different data source

Open

#3843 aperta il 29 mag 2019

Vedi su GitHub
 (6 commenti) (1 reazione) (1 assegnatario)Python (4236 fork)batch import
BackendBughelp wanted

Metriche repository

Star
 (24.845 star)
Metriche merge PR
 (Merge medio 9g 5h) (3 PR mergiate in 30 g)

Descrizione

Issue Summary

When you have the following situation:

Query A references query result from data source A, but itself references data source B.

You will not be able to delete data source A, because it will fail to delete the query results using it.

Steps to Reproduce

The way the above can happen is if:

  1. You execute query A while it uses data source A and update it to use data source B.
  2. If the data source update happens right after this query was executed but before we actually update the query result reference.

It's an edge case, but happened already twice for people who reported it.

The correct solution here is to update the latest_query_data_id reference to get nullified if the query result is deleted.

Technical details:

  • Redash Version: 7

Guida contributor