You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2024/03/21 22:06:21 UTC

(superset) branch master updated: fix: Volatile datasource ordering in dashboard export (#19595)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new bfe55b9ded fix: Volatile datasource ordering in dashboard export (#19595)
bfe55b9ded is described below

commit bfe55b9ded5d7efdcb7919d70d5dc14c97126afd
Author: Pat Nadolny <pa...@gmail.com>
AuthorDate: Thu Mar 21 17:06:15 2024 -0500

    fix: Volatile datasource ordering in dashboard export (#19595)
    
    Co-authored-by: Michael S. Molina <70...@users.noreply.github.com>
---
 superset/models/dashboard.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/superset/models/dashboard.py b/superset/models/dashboard.py
index 5570e892ff..0a0d789c7a 100644
--- a/superset/models/dashboard.py
+++ b/superset/models/dashboard.py
@@ -365,8 +365,11 @@ class Dashboard(AuditMixinNullable, ImportExportMixin, Model):
             copied_dashboard.alter_params(remote_id=dashboard_id)
             copied_dashboards.append(copied_dashboard)
 
+        datasource_id_list = list(datasource_ids)
+        datasource_id_list.sort()
+
         eager_datasources = []
-        for datasource_id, _ in datasource_ids:
+        for datasource_id, _ in datasource_id_list:
             eager_datasource = SqlaTable.get_eager_sqlatable_datasource(datasource_id)
             copied_datasource = eager_datasource.copy()
             copied_datasource.alter_params(