Skip to content

Commit a7d66b8

Browse files
committed
[NEP-18619]: Version changes
1 parent df8c349 commit a7d66b8

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## Change Log
22

3+
## 0.2.3 - 2024-11-15
4+
5+
* modifies the `Superset::Dashboard::Datasets::List.new(id).dataset_details` and `Superset::Dashboard::Datasets::List.new(id).list` to optionally include filter datasets as well to duplicate those during the dashboard duplication process. It also add a new column "Filter only" in the result which shows if a dataset is used only on filters
6+
* This also adds an additional check in source dataset duplication that if any dataset already exists with the new name in the target schema we can use the existing dataset itself for the new dashboard also.
7+
38
## 0.2.2 - 2024-10-10
49

510
* add ImportDashboardAcrossEnvironments class for transfering between superset environments

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ GIT
1414
PATH
1515
remote: .
1616
specs:
17-
superset (0.2.2)
17+
superset (0.2.3)
1818
dotenv (~> 2.7)
1919
enumerate_it (~> 1.7.0)
2020
faraday (~> 1.0)

lib/superset/services/duplicate_dashboard.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ def validate_params
204204
raise ValidationError, "The source dashboard datasets are required to point to one schema only. Actual schema list is #{source_dashboard_schemas.join(',')}" if source_dashboard_has_more_than_one_schema?
205205
raise ValidationError, "One or more source dashboard filters point to a different schema than the dashboard charts. Identified Unpermittied Filter Dataset Ids are #{unpermitted_filter_dataset_ids.to_s}" if unpermitted_filter_dataset_ids.any?
206206

207-
# new dataset validations - Need to remove this as we are using the existing datasets for the new dashboard
208-
# raise ValidationError, "DATASET NAME CONFLICT: The Target Schema #{target_schema} already has existing datasets named: #{target_schema_matching_dataset_names.join(',')}" unless target_schema_matching_dataset_names.empty?
207+
# new dataset validations - Need to be commented for EU dashboard duplication as we are using the existing datasets for the new dashboard
208+
raise ValidationError, "DATASET NAME CONFLICT: The Target Schema #{target_schema} already has existing datasets named: #{target_schema_matching_dataset_names.join(',')}" unless target_schema_matching_dataset_names.empty?
209209
validate_source_dashboard_datasets_sql_does_not_hard_code_schema
210210

211211
# embedded allowed_domain validations
@@ -246,7 +246,7 @@ def source_dashboard_dataset_names
246246
# here we will need to decide if we want to use the existing dataset or not see NEP-????
247247
# for now we will exit with an error if we find any existing datasets of the same name
248248
def target_schema_matching_dataset_names
249-
source_dashboard_dataset_names.map do |source_dataset_name|
249+
@target_schema_matching_dataset_names ||= source_dashboard_dataset_names.map do |source_dataset_name|
250250
existing_names = Superset::Dataset::List.new(title_contains: source_dataset_name, schema_equals: target_schema).result.map{|t|t['table_name']}.uniq # contains match to cover with suffix as well
251251
unless existing_names.flatten.empty?
252252
logger.error " HALTING PROCESS: Schema #{target_schema} already has Dataset called #{existing_names}"

lib/superset/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Superset
4-
VERSION = "0.2.2"
4+
VERSION = "0.2.3"
55
end

0 commit comments

Comments
 (0)