The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
add transform-basic feature flag for transforms (#70442)
Uladzimir Havenchyk0e9fd4c48c44
diff --git a/enterprise/backend/src/metabase_enterprise/cloud_add_ons/api.clj b/enterprise/backend/src/metabase_enterprise/cloud_add_ons/api.cljindex 7dd9f519926..fd8190de53f 100644--- a/enterprise/backend/src/metabase_enterprise/cloud_add_ons/api.clj+++ b/enterprise/backend/src/metabase_enterprise/cloud_add_ons/api.clj@@ -132,11 +132,11 @@response-not-eligible(and (= product-type "transforms")- (premium-features/enable-transforms?))+ (premium-features/enable-basic-transforms?))response-not-eligible(and (= product-type "transforms-basic")- (premium-features/enable-transforms?))+ (premium-features/enable-basic-transforms?))response-not-eligible(and (= product-type "transforms-advanced")diff --git a/enterprise/backend/src/metabase_enterprise/transforms/core.clj b/enterprise/backend/src/metabase_enterprise/transforms/core.cljindex 627eae57e13..92c1bc4cf62 100644--- a/enterprise/backend/src/metabase_enterprise/transforms/core.clj+++ b/enterprise/backend/src/metabase_enterprise/transforms/core.clj@@ -24,7 +24,7 @@[:= :r.status "succeeded"][:= [:cast :r.end_time :date] [:cast date :date]]]}))0))- advanced? (and (premium-features/has-feature? :transforms)+ advanced? (and (premium-features/has-feature? :transforms-basic)(premium-features/has-feature? :transforms-python))yesterday-runs (count-all-runs yesterday-utc)today-runs (count-all-runs today-utc)]diff --git a/enterprise/backend/test/metabase_enterprise/api/session_test.clj b/enterprise/backend/test/metabase_enterprise/api/session_test.cljindex 2f069f3c172..fb04d07a49b 100644--- a/enterprise/backend/test/metabase_enterprise/api/session_test.clj+++ b/enterprise/backend/test/metabase_enterprise/api/session_test.clj@@ -50,7 +50,7 @@:sso-saml:sso-slack:support-users- :transforms+ :transforms-basic:transforms-python:upload-management:whitelabel@@ -101,7 +101,7 @@:sso_slack true:support-users true:table_data_editing false- :transforms true+ :transforms-basic true:transforms-python true:upload_management true:whitelabel truediff --git a/enterprise/backend/test/metabase_enterprise/cloud_add_ons/api_test.clj b/enterprise/backend/test/metabase_enterprise/cloud_add_ons/api_test.cljindex c027df17011..25e522e5a15 100644--- a/enterprise/backend/test/metabase_enterprise/cloud_add_ons/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/cloud_add_ons/api_test.clj@@ -113,7 +113,7 @@(is (=? "Can only access Store API for Metabase Cloud instances."(mt/user-http-request :crowberto :post 400 "ee/cloud-add-ons/transforms" {})))))(testing "not eligible if already has 'transforms'"- (mt/with-premium-features #{:hosting :transforms}+ (mt/with-premium-features #{:hosting :transforms-basic}(is (=? "Can only purchase add-ons for eligible subscriptions."(mt/user-http-request :crowberto :post 400 "ee/cloud-add-ons/transforms" {})))))(testing "requires current user being a store user"@@ -140,7 +140,7 @@(is (=? "Can only access Store API for Metabase Cloud instances."(mt/user-http-request :crowberto :post 400 "ee/cloud-add-ons/transforms-basic" {})))))(testing "not eligible if already has 'transforms'"- (mt/with-premium-features #{:hosting :transforms}+ (mt/with-premium-features #{:hosting :transforms-basic}(is (=? "Can only purchase add-ons for eligible subscriptions."(mt/user-http-request :crowberto :post 400 "ee/cloud-add-ons/transforms-basic" {})))))(testing "requires current user being a store user"diff --git a/enterprise/backend/test/metabase_enterprise/dependencies/api_test.clj b/enterprise/backend/test/metabase_enterprise/dependencies/api_test.cljindex a5e66cf7b50..fe53b9422d5 100644--- a/enterprise/backend/test/metabase_enterprise/dependencies/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/dependencies/api_test.clj@@ -319,7 +319,7 @@(deftest check-transform-test(testing "POST /api/ee/dependencies/check-transform"- (mt/with-premium-features #{:dependencies :transforms}+ (mt/with-premium-features #{:dependencies :transforms-basic}(mt/with-temp [:model/Transform {_transform-id :id :as transform} {}](let [response (mt/user-http-request :crowberto :post 200 "ee/dependencies/check-transform" transform)](is (= {:bad_cards [], :bad_transforms [], :success true}@@ -410,7 +410,7 @@(deftest graph-transform-hydrates-creator-test(testing "GET /api/ee/dependencies/graph hydrates creator for transforms"- (mt/with-premium-features #{:dependencies :transforms}+ (mt/with-premium-features #{:dependencies :transforms-basic}(mt/with-temp [:model/Transform {transform-id :id} {:name "Test Transform":creator_id (mt/user->id :crowberto)}](let [response (mt/user-http-request :crowberto :get 200 "ee/dependencies/graph"@@ -666,7 +666,7 @@(deftest check-transform-permissions-test(testing "POST /api/ee/dependencies/check-transform requires read permissions on the input transform"- (mt/with-premium-features #{:dependencies :transforms}+ (mt/with-premium-features #{:dependencies :transforms-basic}(mt/with-temp [:model/Transform transform {:name "test transform"}](testing "Returns 403 when user is not an admin (only admins can read transforms)"(is (= "You don't have permissions to do that."@@ -684,7 +684,7 @@(deftest check-card-bad-transforms-filtered-by-can-read-test(testing "POST /api/ee/dependencies/check-card filters bad_transforms by mi/can-read?"(mt/dataset test-data- (mt/with-premium-features #{:dependencies :transforms}+ (mt/with-premium-features #{:dependencies :transforms-basic}(mt/with-temp [:model/User user {:email "[email protected]"}:model/Transform transform {}](mt/with-model-cleanup [:model/Card :model/Dependency]diff --git a/enterprise/backend/test/metabase_enterprise/dependencies/calculation_test.clj b/enterprise/backend/test/metabase_enterprise/dependencies/calculation_test.cljindex 5238f8f0dbd..2b3dee503f4 100644--- a/enterprise/backend/test/metabase_enterprise/dependencies/calculation_test.clj+++ b/enterprise/backend/test/metabase_enterprise/dependencies/calculation_test.clj@@ -126,7 +126,7 @@(calculation/upstream-deps:card card))))))(deftest ^:parallel upstream-deps-transform-implicit-join-fields-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [mp (mt/metadata-provider)checkins-id (mt/id :checkins)venues-id (mt/id :venues)@@ -149,7 +149,7 @@(calculation/upstream-deps:transform transform)))))))(deftest ^:parallel upstream-deps-transform-implicit-join-breakout-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [mp (mt/metadata-provider)checkins-id (mt/id :checkins)venues-id (mt/id :venues)@@ -172,7 +172,7 @@(calculation/upstream-deps:transform transform)))))))(deftest ^:parallel upstream-deps-transform-implicit-join-aggregation-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [mp (mt/metadata-provider)checkins-id (mt/id :checkins)venues-id (mt/id :venues)@@ -194,7 +194,7 @@(calculation/upstream-deps:transform transform)))))))(deftest ^:parallel upstream-deps-python-transform-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [products-id (mt/id :products)orders-id (mt/id :orders)](mt/with-temp [:model/Transform transform {:name "Test Transform"diff --git a/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/api_test.clj b/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/api_test.cljindex e3553f054d7..9a83561c08e 100644--- a/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/api_test.clj@@ -1271,7 +1271,7 @@(is (= "PRODUCT_ID" (:related_by products-table))))))))(deftest get-transforms-test- (mt/with-premium-features #{:metabot-v3 :transforms :transforms-python}+ (mt/with-premium-features #{:metabot-v3 :transforms-basic :transforms-python}(let [conversation-id (str (random-uuid))rasta-ai-token (ai-session-token)crowberto-ai-token (ai-session-token :crowberto (str (random-uuid)))]@@ -1316,7 +1316,7 @@(sort-by :id))))))))))))(deftest get-transform-test- (mt/with-premium-features #{:metabot-v3 :transforms :transforms-python}+ (mt/with-premium-features #{:metabot-v3 :transforms-basic :transforms-python}(let [conversation-id (str (random-uuid))rasta-ai-token (ai-session-token)crowberto-ai-token (ai-session-token :crowberto (str (random-uuid)))]@@ -1360,7 +1360,7 @@:conversation_id conversation-id}))))))))))(deftest get-transform-python-library-details-test- (mt/with-premium-features #{:metabot-v3 :python-transforms :transforms}+ (mt/with-premium-features #{:metabot-v3 :python-transforms :transforms-basic}(let [conversation-id (str (random-uuid))rasta-ai-token (ai-session-token)crowberto-ai-token (ai-session-token :crowberto (str (random-uuid)))@@ -1475,7 +1475,7 @@(deftest check-transform-dependencies-test;; This is just a quick sanity check for the API endpoint. The function powering this endpoint is tested more;; thoroughly in metabase-enterprise.metabot-v3.tools.dependencies-test.- (mt/with-premium-features #{:metabot-v3 :transforms :dependencies :transforms-python}+ (mt/with-premium-features #{:metabot-v3 :transforms-basic :dependencies :transforms-python}(let [conversation-id (str (random-uuid))rasta-ai-token (ai-session-token)crowberto-ai-token (ai-session-token :crowberto (str (random-uuid)))diff --git a/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/dependencies_test.clj b/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/dependencies_test.cljindex 0c42a2c1831..1bf99934ec7 100644--- a/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/dependencies_test.clj+++ b/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/dependencies_test.clj@@ -46,7 +46,7 @@~@body)))(deftest check-transform-dependencies-test- (mt/with-premium-features [:transforms]+ (mt/with-premium-features [:transforms-basic](testing "removing total field from transform1 breaks transform2"(mt/as-admin(with-dependent-transforms! [transform1-id transform2-id]@@ -64,7 +64,7 @@(deftest check-transform-dependencies-limit-test(testing "max-reported-broken-transforms limit"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/as-admin(with-dependent-transforms! [transform1-id _](mt/with-temp@@ -97,7 +97,7 @@(deftest check-transform-dependencies-with-cards-test(testing "removing field from transform breaks dependent card"- (mt/with-premium-features [:transforms]+ (mt/with-premium-features [:transforms-basic](mt/as-admin(with-dependent-transforms! [transform1-id _](mt/with-temp@@ -125,7 +125,7 @@(is (some? (:errors (first bad-questions))))))))))))(deftest check-transform-dependencies-card-limit-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(testing "max-reported-broken-transforms limit applies to cards"(mt/as-admin(with-dependent-transforms! [transform1-id _]@@ -180,7 +180,7 @@(deftest check-transform-dependencies-permission-filtering-test(testing "Broken cards in inaccessible collections are filtered from results"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(with-dependent-transforms! [transform1-id _](mt/with-temp[:model/Collection {restricted-collection-id :id} {:name "Restricted Collection"}@@ -243,7 +243,7 @@(is (not (contains? broken-question-ids restricted-card-id)))))))))))))(deftest check-transform-dependencies-python-bypass-test- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(testing "Python transforms bypass dependency checking"(mt/with-test-user :crowberto(mt/with-temp [:model/Transform {python-transform-id :id}diff --git a/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/search_test.clj b/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/search_test.cljindex e44609a7621..5450a5d6eaf 100644--- a/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/search_test.clj+++ b/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/search_test.clj@@ -319,7 +319,7 @@(deftest remove-unreadable-transforms-test(testing "remove-unreadable-transforms correctly filters transforms based on source database access"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Database {db-id :id} {}](let [mp (lib-be/application-database-metadata-provider db-id)](mt/with-temp [:model/Transform {transform-id :id}diff --git a/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/transforms_test.clj b/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/transforms_test.cljindex 9aa5053f59e..7d820f3b014 100644--- a/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/transforms_test.clj+++ b/enterprise/backend/test/metabase_enterprise/metabot_v3/tools/transforms_test.clj@@ -9,7 +9,7 @@(deftest get-transforms-test(testing "get-transforms correctly returns transform when the user has access to the source database"- (mt/with-premium-features #{:metabot-v3 :transforms}+ (mt/with-premium-features #{:metabot-v3 :transforms-basic}(mt/with-temp [:model/Database {db-id :id} {}](let [mp (lib-be/application-database-metadata-provider db-id)](mt/with-temp [:model/Transform transform@@ -31,7 +31,7 @@(deftest get-transform-details-test(testing "get-transform-details returns transform when user can query the source database"- (mt/with-premium-features #{:metabot-v3 :transforms}+ (mt/with-premium-features #{:metabot-v3 :transforms-basic}(mt/with-temp [:model/Transform transform{:name "Test Transform":source {:type "query"@@ -43,7 +43,7 @@(deftest get-transform-details-blocked-test(testing "get-transform-details throws when user cannot query the source database"- (mt/with-premium-features #{:metabot-v3 :transforms}+ (mt/with-premium-features #{:metabot-v3 :transforms-basic}(mt/with-temp [:model/Database {db-id :id} {}](let [mp (lib-be/application-database-metadata-provider db-id)](mt/with-temp [:model/Transform transformdiff --git a/enterprise/backend/test/metabase_enterprise/remote_sync/impl_test.clj b/enterprise/backend/test/metabase_enterprise/remote_sync/impl_test.cljindex b73a1a7c72c..dd41a618b2c 100644--- a/enterprise/backend/test/metabase_enterprise/remote_sync/impl_test.clj+++ b/enterprise/backend/test/metabase_enterprise/remote_sync/impl_test.clj@@ -1053,7 +1053,7 @@(deftest import!-auto-enables-transforms-setting-when-transforms-detected-test(testing "import! auto-enables remote-sync-transforms setting only after successful import with transforms"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-model-cleanup [:model/RemoteSyncTask :model/Transform :model/RemoteSyncObject](mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true]@@ -1072,7 +1072,7 @@(deftest import!-auto-enables-transforms-setting-when-python-libraries-detected-test(testing "import! auto-enables remote-sync-transforms setting only after successful import with python-libraries"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-model-cleanup [:model/RemoteSyncTask :model/PythonLibrary :model/RemoteSyncObject](mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true]diff --git a/enterprise/backend/test/metabase_enterprise/remote_sync/permissions_test.clj b/enterprise/backend/test/metabase_enterprise/remote_sync/permissions_test.cljindex 72f52ca4666..4b4ac713931 100644--- a/enterprise/backend/test/metabase_enterprise/remote_sync/permissions_test.clj+++ b/enterprise/backend/test/metabase_enterprise/remote_sync/permissions_test.clj@@ -562,7 +562,7 @@(deftest transform-superuser-can-read-test(testing "can_read should be true for superusers"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-current-user (mt/user->id :crowberto)(mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection":namespace :transforms}@@ -581,7 +581,7 @@(deftest transform-non-superuser-cannot-read-test(testing "can_read should be false for non-superusers"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-current-user (mt/user->id :rasta)(mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection":namespace :transforms}@@ -600,7 +600,7 @@(deftest transform-globally-read-only-when-remote-sync-enabled-test(testing "can_write should be false for ALL transforms when remote-sync is enabled and type is read-only"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-current-user (mt/user->id :crowberto)(mt/with-temporary-setting-values [settings/remote-sync-url "https://github.com/test/repo.git"settings/remote-sync-type :read-only]@@ -621,7 +621,7 @@(deftest transform-writable-when-remote-sync-read-write-test(testing "can_write should be true for transforms when remote-sync-type is read-write"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-current-user (mt/user->id :crowberto)(mt/with-temporary-setting-values [settings/remote-sync-url "https://github.com/test/repo.git"settings/remote-sync-type :read-write]@@ -642,7 +642,7 @@(deftest transform-writable-when-remote-sync-disabled-test(testing "can_write should be true for transforms when remote-sync is not enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-current-user (mt/user->id :crowberto);; remote-sync-url is not set, so remote-sync-enabled returns false(mt/with-temporary-setting-values [settings/remote-sync-url nil@@ -664,7 +664,7 @@(deftest transform-creation-blocked-in-read-only-mode-test(testing "can_create should be false for transforms when remote-sync is enabled and type is read-only"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-current-user (mt/user->id :crowberto)(mt/with-temporary-setting-values [settings/remote-sync-url "https://github.com/test/repo.git"settings/remote-sync-type :read-only]@@ -684,7 +684,7 @@(deftest transform-creation-allowed-in-read-write-mode-test(testing "can_create should be true for transforms when remote-sync-type is read-write"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-current-user (mt/user->id :crowberto)(mt/with-temporary-setting-values [settings/remote-sync-url "https://github.com/test/repo.git"settings/remote-sync-type :read-write]@@ -704,7 +704,7 @@(deftest transform-non-superuser-cannot-write-test(testing "can_write should be false for non-superusers even when remote-sync-type is read-write"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-current-user (mt/user->id :rasta)(mt/with-temporary-setting-values [settings/remote-sync-type :read-write](mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection"@@ -724,7 +724,7 @@(deftest transform-non-superuser-cannot-create-test(testing "can_create should be false for non-superusers even when remote-sync-type is read-write"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-current-user (mt/user->id :rasta)(mt/with-temporary-setting-values [settings/remote-sync-type :read-write](mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection"diff --git a/enterprise/backend/test/metabase_enterprise/remote_sync/transforms_test.clj b/enterprise/backend/test/metabase_enterprise/remote_sync/transforms_test.cljindex ef0a65f75a6..efb6ad6cb34 100644--- a/enterprise/backend/test/metabase_enterprise/remote_sync/transforms_test.clj+++ b/enterprise/backend/test/metabase_enterprise/remote_sync/transforms_test.clj@@ -28,7 +28,7 @@(deftest transform-event-creates-sync-object-when-setting-enabled-test(testing "Creating a transform creates a RemoteSyncObject entry when remote-sync-transforms is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection" :namespace collection/transforms-ns}@@ -41,7 +41,7 @@(deftest transform-event-ignored-when-setting-disabled-test(testing "Transform events are ignored when remote-sync-transforms is disabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection" :namespace collection/transforms-ns}@@ -54,7 +54,7 @@(deftest transform-event-updates-sync-object-test(testing "Updating a transform updates the RemoteSyncObject entry when setting is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection" :namespace collection/transforms-ns}@@ -74,7 +74,7 @@(deftest transform-tag-event-creates-sync-object-test(testing "Creating a transform tag creates a RemoteSyncObject entry when transform sync is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/TransformTag tag {:name "Test Tag"}]@@ -86,7 +86,7 @@(deftest transform-tag-event-ignored-when-disabled-test(testing "TransformTag events are ignored when transform sync is disabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-temp [:model/TransformTag tag {:name "Test Tag"}]@@ -98,7 +98,7 @@(deftest transforms-namespace-collection-tracked-when-setting-enabled-test(testing "Transforms-namespace collection creates RemoteSyncObject entry when setting is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/Collection coll {:name "Transforms Collection" :namespace collection/transforms-ns :location "/"}]@@ -110,7 +110,7 @@(deftest transforms-namespace-collection-ignored-when-setting-disabled-test(testing "Transforms-namespace collection is NOT tracked when setting is disabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-temp [:model/Collection coll {:name "Transforms Collection" :namespace collection/transforms-ns :location "/"}]@@ -122,7 +122,7 @@(deftest enable-transform-sync-marks-all-transforms-test(testing "Enabling transform sync creates a single Transforms RSO with model_id=-1 and status 'create'"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-enabled true];; Clean up any existing Transforms root RSO first(t2/delete! :model/RemoteSyncObject@@ -149,7 +149,7 @@(deftest disable-transform-sync-removes-all-tracking-test(testing "Disabling transform sync creates a Transforms RSO with status 'delete'"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection" :namespace collection/transforms-ns}@@ -170,7 +170,7 @@(deftest transforms-included-in-dirty-check-when-enabled-test(testing "Transforms are included in dirty check when setting is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection" :namespace collection/transforms-ns}@@ -185,7 +185,7 @@(deftest transforms-excluded-from-dirty-check-when-disabled-test(testing "Transforms are excluded from dirty check when setting is disabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection" :namespace collection/transforms-ns}@@ -200,7 +200,7 @@(deftest transform-tags-included-in-dirty-check-when-enabled-test(testing "TransformTags are included in dirty check when transform sync is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/TransformTag tag {:name "Dirty Tag"}@@ -214,7 +214,7 @@(deftest transform-tags-excluded-from-dirty-check-when-disabled-test(testing "TransformTags are excluded from dirty check when transform sync is disabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-temp [:model/TransformTag tag {:name "Dirty Tag"}@@ -228,7 +228,7 @@(deftest export-includes-transforms-namespace-collections-test(testing "Export includes transforms-namespace collections when setting is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-type :read-writeremote-sync-transforms trueremote-sync-enabled true]@@ -257,7 +257,7 @@(deftest export-excludes-transforms-when-setting-disabled-test(testing "Export excludes transforms when setting is disabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-type :read-writeremote-sync-transforms falseremote-sync-enabled true]@@ -308,7 +308,7 @@ is_sample: false(deftest import-transforms-from-transforms-namespace-collection-test(testing "Import brings in transforms located inside a transforms-namespace collection"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-enabled true](mt/with-model-cleanup [:model/Transform :model/Collection](let [task-id (t2/insert-returning-pk! :model/RemoteSyncTask {:sync_task_type "import" :initiated_by (mt/user->id :rasta)})@@ -328,7 +328,7 @@ is_sample: false(deftest import-python-transform-with-legacy-map-source-tables-test(testing "Import of a python transform with old map-format source-tables converts to vec format"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-enabled true](mt/with-model-cleanup [:model/Transform :model/Collection](let [task-id (t2/insert-returning-pk! :model/RemoteSyncTask {:sync_task_type "import" :initiated_by (mt/user->id :rasta)})@@ -361,7 +361,7 @@ is_sample: false(deftest archived-transforms-namespace-collection-excluded-from-export-test(testing "When a transforms-namespace collection is archived, it and its children are excluded from export"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-type :read-writeremote-sync-transforms trueremote-sync-enabled true]@@ -421,7 +421,7 @@ is_sample: false(deftest transforms-collections-included-in-all-syncable-collection-ids-test(testing "Transforms collections are included in all-syncable-collection-ids when setting is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/Collection {transforms-coll-id :id} {:name "Transforms Collection"@@ -431,7 +431,7 @@ is_sample: false"Transforms-namespace collection should be included when setting is enabled")))))(testing "Transforms collections are NOT included when setting is disabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-temp [:model/Collection {transforms-coll-id :id} {:name "Transforms Collection"@@ -442,7 +442,7 @@ is_sample: false(deftest import-removes-empty-transforms-collection-not-on-remote-test(testing "Import removes empty transforms-namespace collections that don't exist on the remote"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask :model/Collection]@@ -467,7 +467,7 @@ is_sample: false(deftest import-removes-transform-not-on-remote-test(testing "Import removes transforms that don't exist on the remote but keeps the collection"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](let [task-id (t2/insert-returning-pk! :model/RemoteSyncTask {:sync_task_type "import" :initiated_by (mt/user->id :rasta)})@@ -502,7 +502,7 @@ is_sample: false(deftest import-removes-transforms-and-collection-not-on-remote-test(testing "Import removes transforms and their collection when neither exist on remote"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask :model/Collection]@@ -553,7 +553,7 @@ serdes/meta:(deftest python-library-event-creates-sync-object-when-setting-enabled-test(testing "Creating a PythonLibrary creates a RemoteSyncObject entry when remote-sync-transforms is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](let [library (t2/insert-returning-instance! :model/PythonLibrary {:path "common.py" :source "# test"})]@@ -564,7 +564,7 @@ serdes/meta:(deftest python-library-event-ignored-when-setting-disabled-test(testing "PythonLibrary events are ignored when remote-sync-transforms is disabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](let [library (t2/insert-returning-instance! :model/PythonLibrary {:path "common.py" :source "# test"})]@@ -575,7 +575,7 @@ serdes/meta:(deftest python-library-event-updates-sync-object-test(testing "Updating a PythonLibrary updates the RemoteSyncObject entry when setting is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](let [library (t2/insert-returning-instance! :model/PythonLibrary {:path "common.py" :source "# test"})]@@ -590,7 +590,7 @@ serdes/meta:(deftest export-includes-python-library-when-setting-enabled-test(testing "Export includes PythonLibrary when remote-sync-transforms is enabled"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-type :read-writeremote-sync-transforms trueremote-sync-enabled true]@@ -609,7 +609,7 @@ serdes/meta:(deftest import-python-library-from-yaml-test(testing "Import brings in PythonLibrary from YAML files"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask]@@ -630,7 +630,7 @@ serdes/meta:(deftest import-removes-python-library-not-on-remote-test(testing "Import removes local PythonLibrary that doesn't exist on the remote"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask]@@ -648,7 +648,7 @@ serdes/meta:(deftest import-preserves-builtin-python-library-test(testing "Import does NOT delete the built-in PythonLibrary even when it's not on remote"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask]@@ -670,7 +670,7 @@ serdes/meta:(deftest import-replaces-python-library-with-remote-version-test(testing "Import updates local PythonLibrary when remote has same entity_id"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask]@@ -694,7 +694,7 @@ serdes/meta:(deftest import-preserves-local-transforms-when-setting-disabled-and-remote-has-none-test(testing "When remote-sync-transforms is disabled and remote has no transforms, local transforms are preserved"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask :model/Transform :model/TransformTag]@@ -731,7 +731,7 @@ serdes/meta:(deftest import-replaces-local-transforms-when-remote-has-transforms-test(testing "When remote has transforms, local transforms are replaced with remote content (setting auto-enabled)"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask :model/Transform :model/TransformTag]@@ -777,7 +777,7 @@ serdes/meta:(deftest import-removes-all-local-transforms-when-setting-enabled-and-remote-has-none-test(testing "When remote-sync-transforms is enabled and remote has no transforms, all local transforms are removed"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask :model/Transform :model/TransformTag]@@ -815,7 +815,7 @@ serdes/meta:(deftest import-auto-enables-setting-when-remote-has-transforms-test(testing "When setting is disabled and remote has transforms, setting is auto-enabled and transforms are synced"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms falseremote-sync-enabled true](mt/with-model-cleanup [:model/RemoteSyncTask :model/Transform]@@ -852,7 +852,7 @@ serdes/meta:(deftest build-all-removal-paths-includes-all-transforms-on-setting-disable-test(testing "build-all-removal-paths returns paths for all transforms content when sentinel RSO has 'delete' status"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/Collection {coll-id :id} {:name "Transforms Collection"@@ -887,7 +887,7 @@ serdes/meta:(deftest build-all-removal-paths-excludes-builtin-transform-tags-test(testing "build-all-removal-paths respects :conditions and excludes built-in tags"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/TransformTag {custom-tag-id :id custom-tag-eid :entity_id} {:name "Custom Tag"@@ -911,7 +911,7 @@ serdes/meta:(deftest export-excludes-builtin-transform-tags-test(testing "Export excludes built-in transform tags based on :conditions"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temporary-setting-values [remote-sync-transforms trueremote-sync-enabled true](mt/with-temp [:model/TransformTag {custom-tag-id :id} {:name "Custom Tag"diff --git a/enterprise/backend/test/metabase_enterprise/search/scoring_test.clj b/enterprise/backend/test/metabase_enterprise/search/scoring_test.cljindex 5768d922e79..602ab7d6c76 100644--- a/enterprise/backend/test/metabase_enterprise/search/scoring_test.clj+++ b/enterprise/backend/test/metabase_enterprise/search/scoring_test.clj@@ -185,7 +185,7 @@(appdb.scoring-test/search-results* "card")))))))(deftest transforms-user-recency-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [user-id (mt/user->id :crowberto)now (Instant/now)recent-view (fn [model-id timestamp]diff --git a/enterprise/backend/test/metabase_enterprise/serialization/v2/extract_test.clj b/enterprise/backend/test/metabase_enterprise/serialization/v2/extract_test.cljindex b3bd10d2955..f33217dcfdc 100644--- a/enterprise/backend/test/metabase_enterprise/serialization/v2/extract_test.clj+++ b/enterprise/backend/test/metabase_enterprise/serialization/v2/extract_test.clj@@ -2191,7 +2191,7 @@(deftest transform-tag-extraction-test(testing "TransformTag extraction and serialization"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-empty-h2-app-db!;; Delete the existing built-in transform tags(t2/delete! :model/TransformTag)@@ -2239,7 +2239,7 @@(deftest transform-extraction-test(testing "Transform extraction and serialization"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-empty-h2-app-db!;; Delete the existing built-in transform tags(t2/delete! :model/TransformTag)@@ -2349,7 +2349,7 @@(deftest transform-job-extraction-test(testing "TransformJob extraction and serialization"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-empty-h2-app-db!;; Delete the existing built-in transform tags and jobs(t2/delete! :model/TransformTag)diff --git a/enterprise/backend/test/metabase_enterprise/transforms/api_test.clj b/enterprise/backend/test/metabase_enterprise/transforms/api_test.cljindex 28e0ce4aec4..597cd52393f 100644--- a/enterprise/backend/test/metabase_enterprise/transforms/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms/api_test.clj@@ -88,7 +88,7 @@(deftest list-transforms-excludes-python-without-python-feature-test(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/dataset transforms-dataset/transforms-test(mt/with-temp [:model/Transform {query-id :id} {}:model/Transform {python-id :id} (python-transform-map (str "python_transform_" (u/generate-nano-id)))]@@ -99,14 +99,14 @@(deftest get-python-transform-403-without-python-feature-test(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/dataset transforms-dataset/transforms-test(mt/with-temp [:model/Transform {python-id :id} (python-transform-map (str "python_transform_" (u/generate-nano-id)))](mt/user-http-request :crowberto :get 403 (format "transform/%d" python-id)))))))(deftest get-python-transform-200-with-python-feature-test(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(mt/with-temp [:model/Transform {python-id :id} (python-transform-map (str "python_transform_" (u/generate-nano-id)))](let [response (mt/user-http-request :crowberto :get 200 (format "transform/%d" python-id))]@@ -114,7 +114,7 @@(deftest create-transform-with-routing-fails-test(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (mt/with-premium-features #{:transforms :database-routing}+ (mt/with-premium-features #{:transforms-basic :database-routing}(mt/dataset transforms-dataset/transforms-test(mt/with-db-perm-for-group! (perms-group/all-users) (mt/id) :perms/transforms :yes(mt/with-data-analyst-role! (mt/user->id :lucky)@@ -130,7 +130,7 @@(deftest update-transform-with-routing-fails-test(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (mt/with-premium-features #{:transforms :database-routing}+ (mt/with-premium-features #{:transforms-basic :database-routing}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [table-name "gadget_products"](mt/with-temp [:model/Database _destination {:engine driver/*driver*@@ -161,10 +161,10 @@(mt/with-premium-features #{:hosting}(is (empty? (search-transform-ids search-term)))))(testing "transforms only"- (mt/with-premium-features #{:transforms :hosting}+ (mt/with-premium-features #{:transforms-basic :hosting}(is (= #{query-id} (search-transform-ids search-term)))))(testing "transforms and transforms-python"- (mt/with-premium-features #{:transforms :transforms-python :hosting}+ (mt/with-premium-features #{:transforms-basic :transforms-python :hosting}(is (= #{query-id python-id} (search-transform-ids search-term)))))))))))(deftest search-filtering-updates-with-feature-flips-without-reindex-test@@ -178,9 +178,9 @@:model/Transform {python-id :id} (assoc (python-transform-map (str "target_" (u/generate-nano-id))):name python-name)](search.tu/with-new-search-and-legacy-search- (mt/with-premium-features #{:transforms :transforms-python :hosting}+ (mt/with-premium-features #{:transforms-basic :transforms-python :hosting}(is (= #{query-id python-id} (search-transform-ids search-term))))- (mt/with-premium-features #{:transforms :hosting}+ (mt/with-premium-features #{:transforms-basic :hosting}(is (= #{query-id} (search-transform-ids search-term))))(mt/with-premium-features #{:hosting}(is (empty? (search-transform-ids search-term))))@@ -206,7 +206,7 @@(deftest get-runs-sort-by-transform-name-test(testing "GET /api/transform/run - sort by transform-name"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Transform {transform-b-id :id} {:name "Transform B"}:model/Transform {transform-a-id :id} {:name "Transform A"}:model/TransformRun {run-b-id :id} {:transform_id transform-b-id}@@ -223,7 +223,7 @@(deftest get-runs-sort-stable-test(testing "GET /api/transform/run - sorting is stable when values are equal (tiebreaker by :id)"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Transform {transform-1-id :id} {:name "Same Name"}:model/Transform {transform-2-id :id} {:name "Same Name"}:model/TransformRun {run-1-id :id} {:transform_id transform-1-id}@@ -240,7 +240,7 @@(deftest get-runs-sort-by-start-time-test(testing "GET /api/transform/run - sort by start-time"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Transform {transform-id :id} {}:model/TransformRun {earlier-run-id :id} {:transform_id transform-id:start_time (parse-instant "2025-01-01T00:00:00")}@@ -258,7 +258,7 @@(deftest get-runs-sort-by-end-time-test(testing "GET /api/transform/run - sort by end-time"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Transform {transform-id :id} {}:model/TransformRun {earlier-run-id :id} {:transform_id transform-id:end_time (parse-instant "2025-01-01T00:00:00")}@@ -276,7 +276,7 @@(deftest get-runs-sort-by-run-method-test(testing "GET /api/transform/run - sort by run-method (translated names)"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Transform {transform-id :id} {};; "Manual" < "Schedule":model/TransformRun {manual-run-id :id} {:transform_id transform-id :run_method "manual"}@@ -293,7 +293,7 @@(deftest get-runs-sort-by-status-test(testing "GET /api/transform/run - sort by status (translated names)"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Transform {transform-id :id} {};; Sorted by translated name: "Canceled" < "Canceling" < "Failed" < "In progress" < "Success" < "Timeout":model/TransformRun {canceled-run-id :id} {:transform_id transform-id :status "canceled"}@@ -316,7 +316,7 @@(deftest get-runs-sort-by-transform-tags-test(testing "GET /api/transform/run - sort by transform-tags (first tag name)"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/TransformTag {tag-a-id :id} {:name "Tag A"}:model/TransformTag {tag-b-id :id} {:name "Tag B"}:model/TransformTag {tag-ignored-id :id} {:name "Tag Ignored"}@@ -341,7 +341,7 @@(deftest get-runs-sort-by-built-in-transform-tags-test(testing "GET /api/transform/run - sort by built-in transform-tags (translated names)"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic};; Translated names alphabetically: "daily" < "hourly" < "monthly" < "weekly"(mt/with-temp [:model/TransformTag {tag-daily-id :id}{:name "daily" :built_in_type "daily"}@@ -399,7 +399,7 @@(deftest get-runs-hydrate-collection-test(testing "GET /api/transform/run - hydrates collection on transform"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Collection {collection-id :id} {:name "Subfolder" :namespace :transforms}:model/Transform {transform-in-collection-id :id} {:collection_id collection-id}:model/Transform {transform-in-root-id :id} {:collection_id nil}diff --git a/enterprise/backend/test/metabase_enterprise/transforms/core_test.clj b/enterprise/backend/test/metabase_enterprise/transforms/core_test.cljindex 550ab517d74..725aee39eac 100644--- a/enterprise/backend/test/metabase_enterprise/transforms/core_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms/core_test.clj@@ -46,7 +46,7 @@(is (= advanced-before (:transform-advanced-runs stats)))))))(testing "with advanced add-on, all runs go to advanced-runs"- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python};; run a python transform(let [{run-id :id} (transform-run/start-run! python-id {:run_method "manual"})](transform-run/succeed-started-run! run-id)diff --git a/enterprise/backend/test/metabase_enterprise/transforms/incremental_test.clj b/enterprise/backend/test/metabase_enterprise/transforms/incremental_test.cljindex 5957224e89d..9e3bff06006 100644--- a/enterprise/backend/test/metabase_enterprise/transforms/incremental_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms/incremental_test.clj@@ -246,7 +246,7 @@:let [transform-type :native]](testing (format "with %s checkpoint on %s transform" (name checkpoint-type) (name transform-type))(mt/test-drivers (test-drivers)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table (target-table-gen "incremental_test")](let [checkpoint-config (get checkpoint-configs checkpoint-type)@@ -281,7 +281,7 @@:when (valid-checkpoint-transform-combo? checkpoint-type transform-type)](testing (format "with %s checkpoint on %s transform" (name checkpoint-type) (name transform-type))(mt/test-drivers (test-drivers)- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table (target-table-gen "incremental_twice")](let [checkpoint-config (get checkpoint-configs checkpoint-type)@@ -318,7 +318,7 @@:when (valid-checkpoint-transform-combo? checkpoint-type transform-type)](testing (format "with %s checkpoint on %s transform" (name checkpoint-type) (name transform-type))(mt/test-drivers (test-drivers)- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table (target-table-gen "switch_incr_to_non_incr")](let [checkpoint-config (get checkpoint-configs checkpoint-type)@@ -374,7 +374,7 @@:when (valid-checkpoint-transform-combo? checkpoint-type transform-type)](testing (format "with %s checkpoint on %s transform" (name checkpoint-type) (name transform-type))(mt/test-drivers (test-drivers)- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table (target-table-gen "switch_non_incr_to_incr")](let [checkpoint-config (get checkpoint-configs checkpoint-type)@@ -437,7 +437,7 @@(doseq [checkpoint-type [:integer :float :temporal]](testing (format "with %s checkpoint" (name checkpoint-type))(mt/test-drivers (test-drivers)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table (target-table-gen "native_no_template")](let [checkpoint-config (get checkpoint-configs checkpoint-type)@@ -490,7 +490,7 @@(deftest unsupported-checkpoint-column-type-test(testing "Transform fails at runtime with unsupported checkpoint column type"(mt/test-drivers #{:h2 :postgres}- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table "unsupported_type_test"](let [schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))@@ -514,7 +514,7 @@(testing "Native query with temporal checkpoint";; we test only in postgres because it's easy to cast to ::timestamp(mt/test-drivers [:postgres]- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table (target-table-gen "native_temporal_cast")](let [checkpoint-config (get checkpoint-configs :temporal)@@ -588,7 +588,7 @@(deftest empty-table-test(mt/test-drivers #{:postgres} ; no db specifics- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(with-transform-cleanup! [target-table "empty_table_target"](let [db-id (mt/id)db-spec (sql-jdbc.conn/db->pooled-connection-spec db-id)@@ -613,7 +613,7 @@(deftest checkpoint-field-does-not-exist-test(mt/test-drivers #{:postgres} ; no db specifics- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(with-transform-cleanup! [target-table "missing_field_target"](let [db-id (mt/id)db-spec (sql-jdbc.conn/db->pooled-connection-spec db-id)@@ -647,7 +647,7 @@(deftest changing-query-keeps-checkpoint-test(mt/test-drivers #{:postgres} ; no db specifics- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(with-transform-cleanup! [target-table "change_table_target"](let [db-id (mt/id)db-spec (sql-jdbc.conn/db->pooled-connection-spec db-id)@@ -686,7 +686,7 @@:when (valid-checkpoint-transform-combo? checkpoint-type transform-type)](testing (format "with %s checkpoint on %s transform" (name checkpoint-type) (name transform-type))(mt/test-drivers (set/intersection (test-drivers) (mt/normal-drivers-with-feature :transforms/index-ddl))- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table (target-table-gen "incremental_index")](let [checkpoint-config (get checkpoint-configs checkpoint-type)@@ -718,7 +718,7 @@:when (valid-checkpoint-transform-combo? checkpoint-type transform-type)](testing (format "with %s checkpoint on %s transform" (name checkpoint-type) (name transform-type))(mt/test-drivers (set/intersection (test-drivers) (mt/normal-drivers-with-feature :transforms/index-ddl))- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table (target-table-gen "index_cleanup_non_incr")](let [checkpoint-config (get checkpoint-configs checkpoint-type)@@ -746,7 +746,7 @@(deftest index-cleanup-on-checkpoint-column-change-test(testing "Changing checkpoint column removes old index and creates new one"(mt/test-drivers (set/intersection (test-drivers) (mt/normal-drivers-with-feature :transforms/index-ddl))- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target-table (target-table-gen "icchange")](let [integer-config (get checkpoint-configs :integer)diff --git a/enterprise/backend/test/metabase_enterprise/transforms/util_test.clj b/enterprise/backend/test/metabase_enterprise/transforms/util_test.cljindex 27d8ece4dca..6392269b988 100644--- a/enterprise/backend/test/metabase_enterprise/transforms/util_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms/util_test.clj@@ -17,11 +17,11 @@(mt/with-premium-features #{}(is (transforms.u/is-temp-transform-table? table-without-schema))(is (transforms.u/is-temp-transform-table? table-with-schema)))- (mt/with-premium-features #{:hosting :transforms}+ (mt/with-premium-features #{:hosting :transforms-basic}(is (transforms.u/is-temp-transform-table? table-without-schema))(is (transforms.u/is-temp-transform-table? table-with-schema)))))(testing "Ignores non-transform tables"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(is (false? (transforms.u/is-temp-transform-table? {:name :orders})))(is (false? (transforms.u/is-temp-transform-table? {:name :public/orders}))))))diff --git a/enterprise/backend/test/metabase_enterprise/transforms_python/api_test.clj b/enterprise/backend/test/metabase_enterprise/transforms_python/api_test.cljindex 293d281f987..d67d887922f 100644--- a/enterprise/backend/test/metabase_enterprise/transforms_python/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms_python/api_test.clj@@ -13,7 +13,7 @@(deftest get-library-path-test(testing "GET /api/ee/transforms-python/library/:path"- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(testing "requires transform permissions"(is (= "You don't have permissions to do that."(mt/user-http-request :rasta :get 403 "ee/transforms-python/library/common"))))@@ -36,7 +36,7 @@(deftest put-library-path-test(testing "PUT /api/ee/transforms-python/library/:path"- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(testing "requires transform permissions"(is (= "You don't have permissions to do that."(mt/user-http-request :rasta :put 403 "ee/transforms-python/library/common"@@ -88,7 +88,7 @@{:source "def test(): pass"}))))))))))(deftest test-run-test- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(let [program ["import pandas as pd""import sys""def transform():"@@ -107,7 +107,7 @@:or {program ["import pandas as pd" "def transform():" " return pd.DataFrame()"]user :crowbertosource-tables {:test (t2/select-one-pk :model/Table :db_id (mt/id) :active true)}- features #{:transforms :transforms-python}}}]+ features #{:transforms-basic :transforms-python}}}](let [body (merge {:source_tables source-tables, :code (str/join "\n" program)} extra-opts)](mt/with-premium-features features(mt/user-http-request-full-response user :post "ee/transforms-python/test-run" body))))@@ -142,8 +142,8 @@(deftest test-run-feature-test(is (=? {:status 402} (test-run :features #{})))(testing "transforms alone is not enough"- (is (=? {:status 402} (test-run :features #{:transforms}))))- (is (=? {:status 200} (test-run :features #{:transforms :transforms-python}))))+ (is (=? {:status 402} (test-run :features #{:transforms-basic}))))+ (is (=? {:status 200} (test-run :features #{:transforms-basic :transforms-python}))))(deftest test-run-permissions-test(mt/test-drivers (mt/normal-drivers-with-feature :transforms/python)diff --git a/enterprise/backend/test/metabase_enterprise/transforms_python/drivers_test.clj b/enterprise/backend/test/metabase_enterprise/transforms_python/drivers_test.cljindex 7fbba9b52f6..1407c6e2ca3 100644--- a/enterprise/backend/test/metabase_enterprise/transforms_python/drivers_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms_python/drivers_test.clj@@ -421,7 +421,7 @@;; we sometimes get I/O error in CI due to it taking too long. it's too slow, too flakey to keep enabled:redshift)(mt/with-empty-db- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(with-test-table [source-table-id source-table-name] [base-type-test-data (:data base-type-test-data)](let [table-name (mt/random-name)exotic-config (get driver-exotic-types driver/*driver*)diff --git a/enterprise/backend/test/metabase_enterprise/transforms_python/e2e_test.clj b/enterprise/backend/test/metabase_enterprise/transforms_python/e2e_test.cljindex b164884b271..8dda61aa7e3 100644--- a/enterprise/backend/test/metabase_enterprise/transforms_python/e2e_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms_python/e2e_test.clj@@ -15,7 +15,7 @@(deftest transforms-python-with-library-test(testing "Python transform execution with common library"(mt/test-drivers #{:postgres}- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(mt.util/with-discard-model-updates! [:model/PythonLibrary];; Create or update the python library@@ -62,7 +62,7 @@(deftest execute-transforms-python-test(testing "transform execution with :transforms/table target"(mt/test-drivers #{:postgres}- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(let [schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))](with-transform-cleanup! [{table-name :name :as target} {:type "table"diff --git a/enterprise/backend/test/metabase_enterprise/transforms_python/execute_test.clj b/enterprise/backend/test/metabase_enterprise/transforms_python/execute_test.cljindex fd036fe1d1a..219c88b40f0 100644--- a/enterprise/backend/test/metabase_enterprise/transforms_python/execute_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms_python/execute_test.clj@@ -17,7 +17,7 @@(deftest atomic-python-transform-swap-test(testing "Python transform execution with atomic table swap"(mt/test-drivers #{:mysql :postgres}- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(mt/dataset transforms-dataset/transforms-test(let [schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))](with-transform-cleanup! [{table-name :name :as target} {:type "table"@@ -69,7 +69,7 @@(deftest python-transform-temp-table-cleanup-test(testing "Python transform cleans up temp tables on success"(mt/test-drivers #{:mysql :postgres}- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(mt/dataset transforms-dataset/transforms-test(let [schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))](with-transform-cleanup! [{table-name :name :as target} {:type "table"@@ -101,7 +101,7 @@(deftest python-transform-timeout-status-test(testing "Python transform execution sets correct timeout status when script times out"(mt/test-drivers #{:postgres}- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(mt/dataset transforms-dataset/transforms-test(let [schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))](with-transform-cleanup! [target {:type "table"@@ -136,7 +136,7 @@(deftest python-transform-unresolved-source-table-test(testing "Python transform execution throws when source table cannot be resolved"(mt/test-drivers #{:postgres}- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(mt/dataset transforms-dataset/transforms-test(let [schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))](with-transform-cleanup! [target {:type "table"@@ -160,7 +160,7 @@(deftest python-transform-unresolved-source-table-no-schema-test(testing "Python transform error message omits schema when nil"(mt/test-drivers #{:postgres}- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target {:type "table":schema nildiff --git a/enterprise/backend/test/metabase_enterprise/transforms_python/job_test.clj b/enterprise/backend/test/metabase_enterprise/transforms_python/job_test.cljindex 473dd057f83..3cf81e7f0fe 100644--- a/enterprise/backend/test/metabase_enterprise/transforms_python/job_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms_python/job_test.clj@@ -19,7 +19,7 @@(mt/with-temp-scheduler!(task/init! ::transforms.schedule/RunTransform)(mt/test-drivers #{:postgres}- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(mt/dataset transforms-dataset/transforms-test(transforms.tu/with-transform-cleanup! [target {:type "table":schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))@@ -53,7 +53,7 @@(deftest run-transform-feature-flag-test(testing "Python transforms are skipped without :transforms-python feature"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [python-transform {:id 2:source python-source:name "Test Python Transform"}diff --git a/enterprise/backend/test/metabase_enterprise/transforms_python/python_runner_test.clj b/enterprise/backend/test/metabase_enterprise/transforms_python/python_runner_test.cljindex e6532cb20a8..f5daedf29b3 100644--- a/enterprise/backend/test/metabase_enterprise/transforms_python/python_runner_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms_python/python_runner_test.clj@@ -498,7 +498,7 @@(deftest python-runner-timeout-test(testing "Python script execution respects timeout setting"- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(tu/with-temporary-setting-values [python-runner-timeout-seconds 5](let [long-running-code (str "import time\n""import pandas as pd\n"diff --git a/enterprise/backend/test/metabase_enterprise/transforms_python/s3_test.clj b/enterprise/backend/test/metabase_enterprise/transforms_python/s3_test.cljindex a894293733f..c159d9100dc 100644--- a/enterprise/backend/test/metabase_enterprise/transforms_python/s3_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms_python/s3_test.clj@@ -64,7 +64,7 @@(deftest open-s3-shared-storage-test(testing "open-s3-shared-storage! returns closeable derefable"- (mt/with-premium-features #{:transforms-python :transforms}+ (mt/with-premium-features #{:transforms-python :transforms-basic}(let [table-name->id {"users" 1}storage-ref (s3/open-shared-storage! table-name->id){:keys [s3-client bucket-name objects]} @storage-ref]diff --git a/enterprise/backend/test/metabase_enterprise/transforms_python/transforms_api_test.clj b/enterprise/backend/test/metabase_enterprise/transforms_python/transforms_api_test.cljindex b55d23c7673..8c8746b42e7 100644--- a/enterprise/backend/test/metabase_enterprise/transforms_python/transforms_api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/transforms_python/transforms_api_test.clj@@ -56,8 +56,8 @@:name "gadget_products":database (mt/id)}}))))))- (testing "with only transforms feature flag (no transforms-python)"- (mt/with-premium-features #{:transforms}+ (testing "with only transforms-basic feature flag (no transforms-python)"+ (mt/with-premium-features #{:transforms-basic}(testing "creating python transform without transforms-python feature fails"(is (= "Premium features required for this transform type are not enabled."(mt/user-http-request :lucky :post 402 "transform"@@ -72,7 +72,7 @@:database (mt/id)}}))))))(testing "with transforms-python feature flag"- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(with-transform-cleanup! [table-name "gadget_products"](let [transform (create-transform!)](is (= "print('hello chris')"@@ -89,9 +89,9 @@:source :body)))))))))))))(deftest update-python-transform-feature-flag-test- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (testing "Updating a python transform requires both :transforms and :transforms-python features"+ (testing "Updating a python transform requires both :transforms-basic and :transforms-python features"(mt/with-temp [:model/Transform {id :id:as transform} {:name "Original Python Transform":source {:type "python"@@ -110,10 +110,10 @@"Should return 403 without any features"))))))))(deftest run-python-transform-feature-flag-test- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (testing "Running a python transform requires both :transforms and :transforms-python features"- (mt/with-premium-features #{:transforms :transforms-python}+ (testing "Running a python transform requires both :transforms-basic and :transforms-python features"+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [table-name "test_run_python"](let [schema (get-test-schema)@@ -131,7 +131,7 @@(let [response (mt/user-http-request :crowberto :post 403(format "transform/%d/run" (:id created)))](is (= "You don't have permissions to do that." response))))- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [response (mt/user-http-request :crowberto :post(format "transform/%d/run" (:id created)))](is (= "You don't have permissions to do that." response)@@ -140,7 +140,7 @@(deftest execute-python-transform-test(testing "transform execution with :transforms/table target"(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(let [schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))](with-transform-cleanup! [{table-name :name :as target} {:type "table"@@ -208,7 +208,7 @@(assert (not= :timeout (try (deref fut 1000 :timeout) (catch Throwable _))) "Observation thread did not exit!")))))(deftest python-transform-logging-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(letfn [(program->source [program](->> (concat ["import pandas as pd""def transform():"]@@ -290,7 +290,7 @@(mt/test-drivers (-> (mt/normal-drivers-with-feature :transforms/table);; certain drivers are slow/unpredictable enough that the generous timings in this test are not enough(disj :snowflake :redshift :bigquery-cloud-sdk))- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(let [schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))](doseq [{:keys [expected@@ -319,7 +319,7 @@(deftest get-python-transform-with-different-target-database-test(testing "GET /api/transform/:id correctly fetches target table from different database"- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/with-temp [:model/Database target-db {:engine :h2:details {:db "mem:target-db"}}:model/Table target-table {:db_id (:id target-db)@@ -468,7 +468,7 @@(mt/test-drivers (-> (mt/normal-drivers-with-feature :transforms/python); these drivers cause timing issues, could be fixed if we change timeout / time variables in test(disj :snowflake :bigquery-cloud-sdk :redshift :mongo))- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(let [schema (t2/select-one-fn :schema :model/Table (mt/id :transforms_products))](with-redefs [transforms-python.execute/python-message-loop-sleep-duration (Duration/ofMillis fast-log-polling-ms)]@@ -516,7 +516,7 @@(mt/test-drivers (disj (mt/normal-drivers-with-feature :transforms/python);; takes too long on CI:bigquery-cloud-sdk)- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(let [schema (get-test-schema)](with-transform-cleanup! [{table-name :name :as target} {:type "table"@@ -567,7 +567,7 @@(deftest create-python-transform-with-table-ref-source-test(testing "Creating a Python transform with name-based source table refs is allowed"(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/dataset transforms-dataset/transforms-test(with-transform-cleanup! [target {:type "table":schema (get-test-schema)diff --git a/enterprise/backend/test/metabase_enterprise/workspaces/api_test.clj b/enterprise/backend/test/metabase_enterprise/workspaces/api_test.cljindex b8fac806d40..8463e7935fd 100644--- a/enterprise/backend/test/metabase_enterprise/workspaces/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/workspaces/api_test.clj@@ -510,7 +510,7 @@(is (not= :archived (:status ws-after))))))))))(deftest merge-history-endpoint-test- (mt/with-premium-features #{:transforms :transforms-python :workspaces}+ (mt/with-premium-features #{:transforms-basic :transforms-python :workspaces}(testing "GET /api/transform/:id/merge-history"(mt/with-temp [:model/Table _table {:schema "public" :name "merge_history_test_table"}:model/Transform x1 {:name "Transform for history"@@ -1698,7 +1698,7 @@(deftest external-transforms-test(testing "GET /api/ee/workspace/id/external/transform"- (mt/with-premium-features #{:transforms :workspaces}+ (mt/with-premium-features #{:transforms-basic :workspaces}(let [db-1 (mt/id)](ws.tu/with-workspaces! [ws1 {:name "Our Workspace"}ws2 {:name "Their Workspace"}]diff --git a/enterprise/backend/test/metabase_enterprise/workspaces/dag_test.clj b/enterprise/backend/test/metabase_enterprise/workspaces/dag_test.cljindex a20ea51cbd6..36e7e98ae83 100644--- a/enterprise/backend/test/metabase_enterprise/workspaces/dag_test.clj+++ b/enterprise/backend/test/metabase_enterprise/workspaces/dag_test.clj@@ -12,7 +12,7 @@(use-fixtures:once(fn [f]- (mt/with-premium-features [:dependencies :transforms :workspaces]+ (mt/with-premium-features [:dependencies :transforms-basic :workspaces](mt/with-model-cleanup [:model/Dependency :model/Transform :model/Table :model/Workspace](f)))))diff --git a/enterprise/backend/test/metabase_enterprise/workspaces/test_util.clj b/enterprise/backend/test/metabase_enterprise/workspaces/test_util.cljindex dd2c3a9eb8b..b2dd0c90bc2 100644--- a/enterprise/backend/test/metabase_enterprise/workspaces/test_util.clj+++ b/enterprise/backend/test/metabase_enterprise/workspaces/test_util.clj@@ -368,7 +368,7 @@[](use-fixtures :each (fn [tests](mt/test-drivers (mt/normal-drivers-with-feature :workspace)- (mt/with-premium-features [:workspaces :dependencies :transforms :transforms-python]+ (mt/with-premium-features [:workspaces :dependencies :transforms-basic :transforms-python](search.tu/with-index-disabled(mt/with-model-cleanup [:model/Collection:model/Transformdiff --git a/enterprise/frontend/src/metabase-enterprise/transforms/index.ts b/enterprise/frontend/src/metabase-enterprise/transforms/index.tsindex 4cb656fbb9e..3f3ea2aee72 100644--- a/enterprise/frontend/src/metabase-enterprise/transforms/index.ts+++ b/enterprise/frontend/src/metabase-enterprise/transforms/index.ts@@ -6,5 +6,5 @@ import { TransformsUpsellPage } from "./upsells/pages/TransformsUpsellPage";// transforms is not a regular plugin, but a set of addons - basic transforms + python transformsexport function initializePlugin() {PLUGIN_TRANSFORMS.TransformsUpsellPage = TransformsUpsellPage;- PLUGIN_TRANSFORMS.isEnabled = !!hasPremiumFeature("transforms");+ PLUGIN_TRANSFORMS.isEnabled = !!hasPremiumFeature("transforms-basic");}diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/upsells/components/TransformsSettingUpModal.tsx b/enterprise/frontend/src/metabase-enterprise/transforms/upsells/components/TransformsSettingUpModal.tsxindex eb85bd8d17f..0f63cb9b10e 100644--- a/enterprise/frontend/src/metabase-enterprise/transforms/upsells/components/TransformsSettingUpModal.tsx+++ b/enterprise/frontend/src/metabase-enterprise/transforms/upsells/components/TransformsSettingUpModal.tsx@@ -25,7 +25,7 @@ export const TransformsSettingUpModal = ({opened,isPython = false,}: TransformsSettingUpModalProps) => {- const featureToCheck = isPython ? "transforms-python" : "transforms";+ const featureToCheck = isPython ? "transforms-python" : "transforms-basic";useTokenRefreshUntil(featureToCheck, { intervalMs: 1000, skip: !opened });const isSettingUp = !hasPremiumFeature(featureToCheck);diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/upsells/hooks/useTransformsBilling.ts b/enterprise/frontend/src/metabase-enterprise/transforms/upsells/hooks/useTransformsBilling.tsindex feba45e3248..6fbfd54389e 100644--- a/enterprise/frontend/src/metabase-enterprise/transforms/upsells/hooks/useTransformsBilling.ts+++ b/enterprise/frontend/src/metabase-enterprise/transforms/upsells/hooks/useTransformsBilling.ts@@ -6,12 +6,12 @@ import {useListAddOnsQuery,} from "metabase-enterprise/api";-const TRANSFORMS_PRODUCT_TYPES = ["transforms"] as const;+const TRANSFORMS_PRODUCT_TYPES = ["transforms-basic"] as const;export function useTransformsBilling() {const tokenStatus = useSetting("token-status");const isHosted = useSelector(getIsHosted);- const hasTransforms = useHasTokenFeature("transforms");+ const hasTransforms = useHasTokenFeature("transforms-basic");const hasPythonTransforms = useHasTokenFeature("transforms-python");const {diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/upsells/hooks/useTransformsBilling.unit.spec.ts b/enterprise/frontend/src/metabase-enterprise/transforms/upsells/hooks/useTransformsBilling.unit.spec.tsindex 7075036b532..bb504f0c8b5 100644--- a/enterprise/frontend/src/metabase-enterprise/transforms/upsells/hooks/useTransformsBilling.unit.spec.ts+++ b/enterprise/frontend/src/metabase-enterprise/transforms/upsells/hooks/useTransformsBilling.unit.spec.ts@@ -38,7 +38,7 @@ function setup({const settings = createMockSettings({"is-hosted?": isHosted,"token-features": createMockTokenFeatures({- transforms: hasBasicTransforms,+ "transforms-basic": hasBasicTransforms,"transforms-python": hasPythonTransforms,}),});@@ -47,7 +47,7 @@ function setup({settings: mockSettings({"is-hosted?": isHosted,"token-features": createMockTokenFeatures({- transforms: hasBasicTransforms,+ "transforms-basic": hasBasicTransforms,"transforms-python": hasPythonTransforms,}),}),@@ -152,7 +152,9 @@ describe("useTransformsBilling", () => {it("should return hadTransforms=true when previous add-ons include a self-service transforms product", async () => {const { result } = setup({- previousAddOns: [{ product_type: "transforms", self_service: true }],+ previousAddOns: [+ { product_type: "transforms-basic", self_service: true },+ ],});await waitFor(() => {@@ -164,7 +166,9 @@ describe("useTransformsBilling", () => {it("should return hadTransforms=false when previous transforms add-on is not self-service", async () => {const { result } = setup({- previousAddOns: [{ product_type: "transforms", self_service: false }],+ previousAddOns: [+ { product_type: "transforms-basic", self_service: false },+ ],});await waitFor(() => {diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/upsells/pages/TransformsUpsellPage/TransformsUpsellPage.setup.spec.tsx b/enterprise/frontend/src/metabase-enterprise/transforms/upsells/pages/TransformsUpsellPage/TransformsUpsellPage.setup.spec.tsxindex f1a9ce6f12e..cd0ba38ae29 100644--- a/enterprise/frontend/src/metabase-enterprise/transforms/upsells/pages/TransformsUpsellPage/TransformsUpsellPage.setup.spec.tsx+++ b/enterprise/frontend/src/metabase-enterprise/transforms/upsells/pages/TransformsUpsellPage/TransformsUpsellPage.setup.spec.tsx@@ -45,7 +45,7 @@ export const setup = ({trial: isOnTrial,},"token-features": createMockTokenFeatures({- transforms: !!hasBasicTransforms,+ "transforms-basic": !!hasBasicTransforms,}),});const state = createMockState({diff --git a/frontend/src/metabase-types/api/mocks/settings.ts b/frontend/src/metabase-types/api/mocks/settings.tsindex 3b3c10c5c35..c3fbf4fbb73 100644--- a/frontend/src/metabase-types/api/mocks/settings.ts+++ b/frontend/src/metabase-types/api/mocks/settings.ts@@ -138,8 +138,8 @@ export const createMockTokenFeatures = (development_mode: false,table_data_editing: false,semantic_search: false,- transforms: false,remote_sync: false,+ "transforms-basic": false,"transforms-python": false,library: false,"support-users": false,diff --git a/frontend/src/metabase-types/api/settings.ts b/frontend/src/metabase-types/api/settings.tsindex 0cc2a991255..848989f6e20 100644--- a/frontend/src/metabase-types/api/settings.ts+++ b/frontend/src/metabase-types/api/settings.ts@@ -280,7 +280,7 @@ const tokenStatusFeatures = ["sso-ldap","sso-saml","sso",- "transforms",+ "transforms-basic","transforms-python","upload-management","whitelabel",@@ -357,8 +357,8 @@ export const tokenFeatures = ["remote_sync","dependencies","semantic_search",- "transforms","transforms-python",+ "transforms-basic","library","support-users","tenants",diff --git a/frontend/src/metabase/admin/permissions/selectors/data-permissions/permission-editor.tsx b/frontend/src/metabase/admin/permissions/selectors/data-permissions/permission-editor.tsxindex ecad4d19f96..4eccb473ccb 100644--- a/frontend/src/metabase/admin/permissions/selectors/data-permissions/permission-editor.tsx+++ b/frontend/src/metabase/admin/permissions/selectors/data-permissions/permission-editor.tsx@@ -174,7 +174,7 @@ export const getShouldShowTransformPermissions = createSelector((state: State) => getPlan(getSetting(state, "token-features")),getIsHosted,(state: State) => getSetting(state, "transforms-enabled"),- (state: State) => getTokenFeature(state, "transforms"),+ (state: State) => getTokenFeature(state, "transforms-basic"),(plan, isHosted, transformsSettingEnabled, transformsFeatureEnabled) => {// Never show in ossif (plan === "oss") {diff --git a/frontend/src/metabase/admin/permissions/selectors/data-permissions/permission-editor.unit.spec.tsx b/frontend/src/metabase/admin/permissions/selectors/data-permissions/permission-editor.unit.spec.tsxindex 2640f5fa0bf..d3bff78302b 100644--- a/frontend/src/metabase/admin/permissions/selectors/data-permissions/permission-editor.unit.spec.tsx+++ b/frontend/src/metabase/admin/permissions/selectors/data-permissions/permission-editor.unit.spec.tsx@@ -26,7 +26,9 @@ describe("getShouldShowTransformPermissions", () => {settings: createMockSettingsState({"is-hosted?": false,"transforms-enabled": true,- "token-features": createMockTokenFeatures({ transforms: true }),+ "token-features": createMockTokenFeatures({+ "transforms-basic": true,+ }),}),});@@ -38,7 +40,9 @@ describe("getShouldShowTransformPermissions", () => {settings: createMockSettingsState({"is-hosted?": false,"transforms-enabled": false,- "token-features": createMockTokenFeatures({ transforms: true }),+ "token-features": createMockTokenFeatures({+ "transforms-basic": true,+ }),}),});@@ -52,7 +56,9 @@ describe("getShouldShowTransformPermissions", () => {settings: createMockSettingsState({"is-hosted?": true,"transforms-enabled": false,- "token-features": createMockTokenFeatures({ transforms: true }),+ "token-features": createMockTokenFeatures({+ "transforms-basic": true,+ }),}),});@@ -64,7 +70,9 @@ describe("getShouldShowTransformPermissions", () => {settings: createMockSettingsState({"is-hosted?": true,"transforms-enabled": false,- "token-features": createMockTokenFeatures({ transforms: false }),+ "token-features": createMockTokenFeatures({+ "transforms-basic": false,+ }),}),});@@ -76,7 +84,9 @@ describe("getShouldShowTransformPermissions", () => {settings: createMockSettingsState({"is-hosted?": true,"transforms-enabled": true,- "token-features": createMockTokenFeatures({ transforms: false }),+ "token-features": createMockTokenFeatures({+ "transforms-basic": false,+ }),}),});diff --git a/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-path-from-value.unit.spec.tsx b/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-path-from-value.unit.spec.tsxindex 85082ef8e37..c9a860045ef 100644--- a/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-path-from-value.unit.spec.tsx+++ b/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-path-from-value.unit.spec.tsx@@ -106,7 +106,7 @@ const setup = ({const enterpriseTokenFeatures = {library: true,- transforms: true,+ "transforms-basic": true,tenants: true,};diff --git a/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-root-items.ts b/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-root-items.tsindex 97a86744e10..50bf9cf4d54 100644--- a/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-root-items.ts+++ b/frontend/src/metabase/common/components/Pickers/EntityPicker/hooks/use-get-root-items.ts@@ -49,7 +49,7 @@ export const useRootItems = () => {const { options, models, searchQuery, namespaces } = useOmniPickerContext();const isAdmin = useSelector(getUserIsAdmin);const hasTenants = useSetting("use-tenants");- const transformsEnabled = useHasTokenFeature("transforms");+ const transformsEnabled = useHasTokenFeature("transforms-basic");const dispatch = useDispatch();const { data: databaseData, isLoading: isLoadingDatabases } =diff --git a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/tests/common.unit.spec.tsx b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/tests/common.unit.spec.tsxindex dea479d8a29..6480b8a5de4 100644--- a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/tests/common.unit.spec.tsx+++ b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/tests/common.unit.spec.tsx@@ -70,7 +70,7 @@ describe("DataStudioLayout", () => {remoteSyncBranch: "main",tokenFeatures: {hosting: true, // Makes it a starter plan- transforms: false, // Transforms feature not available+ "transforms-basic": false, // Transforms feature not available},});@@ -99,7 +99,7 @@ describe("DataStudioLayout", () => {remoteSyncBranch: "main",tokenFeatures: {hosting: true, // Makes it a starter plan- transforms: true, // Transforms feature available+ "transforms-basic": true, // Transforms feature available},});diff --git a/frontend/src/metabase/data-studio/app/pages/TransformsSectionLayout/TransformsSectionLayout.unit.spec.tsx b/frontend/src/metabase/data-studio/app/pages/TransformsSectionLayout/TransformsSectionLayout.unit.spec.tsxindex f724370f59b..b4b999ceb8d 100644--- a/frontend/src/metabase/data-studio/app/pages/TransformsSectionLayout/TransformsSectionLayout.unit.spec.tsx+++ b/frontend/src/metabase/data-studio/app/pages/TransformsSectionLayout/TransformsSectionLayout.unit.spec.tsx@@ -30,7 +30,7 @@ const setup = ({} = {}) => {const settings = mockSettings({"token-features": createMockTokenFeatures({- transforms: hasTransformFeature,+ "transforms-basic": hasTransformFeature,hosting: isHosted,}),"transforms-enabled": transformsEnabled,diff --git a/frontend/src/metabase/transforms/selectors.ts b/frontend/src/metabase/transforms/selectors.tsindex aa2912ced8a..eb869aaa029 100644--- a/frontend/src/metabase/transforms/selectors.ts+++ b/frontend/src/metabase/transforms/selectors.ts@@ -16,7 +16,7 @@ export const canAccessTransforms = (state: State): boolean => {export const getTransformsFeatureAvailable = createSelector((state: State) => getPlan(getSetting(state, "token-features")),- (state: State) => getTokenFeature(state, "transforms"),+ (state: State) => getTokenFeature(state, "transforms-basic"),(plan, feature) => {if (plan === "oss") {return true;@@ -28,7 +28,7 @@ export const getTransformsFeatureAvailable = createSelector(export const getShouldShowTransformsUpsell = createSelector(getIsHosted,- (state: State) => getTokenFeature(state, "transforms"),+ (state: State) => getTokenFeature(state, "transforms-basic"),(isHosted, hasTransformsFeature) => isHosted && !hasTransformsFeature,);diff --git a/src/metabase/analytics/stats.clj b/src/metabase/analytics/stats.cljindex 71f344e670f..3a288308d8f 100644--- a/src/metabase/analytics/stats.clj+++ b/src/metabase/analytics/stats.clj@@ -938,9 +938,9 @@{:name :table-data-editing:available (premium-features/table-data-editing?):enabled (premium-features/table-data-editing?)}- {:name :transforms- :available (premium-features/enable-transforms?)- :enabled (premium-features/enable-transforms?)}+ {:name :transforms-basic+ :available (premium-features/enable-basic-transforms?)+ :enabled (premium-features/enable-basic-transforms?)}{:name :transforms-python:available (premium-features/enable-python-transforms?):enabled (premium-features/enable-python-transforms?)}diff --git a/src/metabase/premium_features/core.clj b/src/metabase/premium_features/core.cljindex 9656cfa8a38..1215e0815ce 100644--- a/src/metabase/premium_features/core.clj+++ b/src/metabase/premium_features/core.clj@@ -80,7 +80,7 @@enable-sso-saml?enable-sso-slack?enable-support-users?- enable-transforms?+ enable-basic-transforms?enable-python-transforms?enable-upload-management?enable-whitelabeling?diff --git a/src/metabase/premium_features/settings.clj b/src/metabase/premium_features/settings.cljindex aa7a9423c65..ce1c05875af 100644--- a/src/metabase/premium_features/settings.clj+++ b/src/metabase/premium_features/settings.clj@@ -297,9 +297,9 @@"Does this instance support remote syncing collections.":remote-sync)-(define-premium-feature ^{:added "0.57.0"} enable-transforms?- "Should we allow users to use transforms?"- :transforms)+(define-premium-feature ^{:added "0.59.0"} enable-basic-transforms?+ "Should we allow users to use transforms? Replacement for transforms"+ :transforms-basic)(define-premium-feature ^{:added "0.57.0"} enable-python-transforms?"Should we allow users to use Python transforms?"@@ -378,7 +378,7 @@:support-users (enable-support-users?):table_data_editing (table-data-editing?):tenants (enable-tenants?)- :transforms (enable-transforms?)+ :transforms-basic (enable-basic-transforms?):transforms-python (enable-python-transforms?):upload_management (enable-upload-management?):whitelabel (enable-whitelabeling?)diff --git a/src/metabase/sync/util.clj b/src/metabase/sync/util.cljindex df67b7dfe51..8e8c0aaffcf 100644--- a/src/metabase/sync/util.clj+++ b/src/metabase/sync/util.clj@@ -37,7 +37,7 @@"Whether any transforms are enabled."[](or (not (premium-features/is-hosted?))- (premium-features/has-feature? :transforms)))+ (premium-features/has-feature? :transforms-basic)))(defn is-temp-transform-table?"Return true when `table` matches the transform temporary table naming pattern and transforms are enabled."diff --git a/src/metabase/transforms/feature_gating.clj b/src/metabase/transforms/feature_gating.cljindex bb5186fb757..a3457ebe0c8 100644--- a/src/metabase/transforms/feature_gating.clj+++ b/src/metabase/transforms/feature_gating.clj@@ -3,16 +3,16 @@[metabase.premium-features.core :as premium-features]))(defn query-transforms-enabled?- "Query transforms: available in OSS, requires :transforms feature in EE.+ "Query transforms: available in OSS, requires :transforms-basic feature in EE.Note: OSS intentionally gets query transforms without a license."[](or (not (premium-features/is-hosted?))- (premium-features/has-feature? :transforms)))+ (premium-features/has-feature? :transforms-basic)))(defn python-transforms-enabled?- "Python transforms: EE only, requires both :transforms and :transforms-python."+ "Python transforms: EE only, requires both :transforms-basic and :transforms-python."[]- (and (premium-features/has-feature? :transforms)+ (and (premium-features/has-feature? :transforms-basic)(premium-features/has-feature? :transforms-python)))(defn enabled-source-typesdiff --git a/src/metabase/transforms/settings.clj b/src/metabase/transforms/settings.cljindex fc2d01e87ef..201f46e240b 100644--- a/src/metabase/transforms/settings.clj+++ b/src/metabase/transforms/settings.clj@@ -10,7 +10,7 @@:type :integer:visibility :internal:default (* 4 60)- :feature :transforms+ :feature :transforms-basic:doc false:export? false:encryption :nodiff --git a/src/metabase/warehouse_schema/table.clj b/src/metabase/warehouse_schema/table.cljindex eabfbeccea6..3b384ec1224 100644--- a/src/metabase/warehouse_schema/table.clj+++ b/src/metabase/warehouse_schema/table.clj@@ -48,7 +48,7 @@(api/check-403 (can-access-table-for-query-metadata? table)))(let [hydration-keys (cond-> [:db [:fields [:target :has_field_values] :has_field_values :dimensions :name_field][:segments :definition_description] [:measures :definition_description] :metrics :collection]- (premium-features/has-feature? :transforms) (conj :transform))]+ (premium-features/has-feature? :transforms-basic) (conj :transform))](-> table(update :collection nil-if-unreadable)(#(apply t2/hydrate % hydration-keys))diff --git a/src/metabase/warehouse_schema_rest/api/table.clj b/src/metabase/warehouse_schema_rest/api/table.cljindex 5593b2e4b61..a933ec12ca0 100644--- a/src/metabase/warehouse_schema_rest/api/table.clj+++ b/src/metabase/warehouse_schema_rest/api/table.clj@@ -115,7 +115,7 @@[:= :d.to_entity_type "table"]]}]))query {:where where, :order-by [[:name :asc]]}hydrations (cond-> [:db]- (premium-features/has-feature? :transforms) (conj :transform))]+ (premium-features/has-feature? :transforms-basic) (conj :transform))](as-> (t2/select :model/Table query) tables(apply t2/hydrate tables hydrations)(into [] (comp (filter mi/can-read?)diff --git a/src/metabase/warehouses_rest/api.clj b/src/metabase/warehouses_rest/api.cljindex 5ea75bd1ddb..505f14422d2 100644--- a/src/metabase/warehouses_rest/api.clj+++ b/src/metabase/warehouses_rest/api.clj@@ -1451,7 +1451,7 @@can-query? (filter mi/can-query?)can-write-metadata? (filter mi/can-write?))hydration-keys (cond-> []- (premium-features/has-feature? :transforms) (conj :transform))]+ (premium-features/has-feature? :transforms-basic) (conj :transform))](if (seq hydration-keys)(apply t2/hydrate filtered-tables hydration-keys)filtered-tables))))diff --git a/test/metabase/sync/sync_metadata/tables_test.clj b/test/metabase/sync/sync_metadata/tables_test.cljindex 1816ae1948b..4959181653b 100644--- a/test/metabase/sync/sync_metadata/tables_test.clj+++ b/test/metabase/sync/sync_metadata/tables_test.clj@@ -57,7 +57,7 @@(is (= #{normal-table temp-table}(#'sync-tables/table-set db-metadata)))))(testing "when hosted with `transforms` enabled, excludes the temp tables"- (mt/with-premium-features #{:hosting :transforms}+ (mt/with-premium-features #{:hosting :transforms-basic}(is (= #{normal-table}(#'sync-tables/table-set db-metadata)))))))diff --git a/test/metabase/transforms/jobs_test.clj b/test/metabase/transforms/jobs_test.cljindex a13f664e4c6..0156f0639bb 100644--- a/test/metabase/transforms/jobs_test.clj+++ b/test/metabase/transforms/jobs_test.clj@@ -163,7 +163,7 @@"Should not log warnings when feature is enabled")(is @run-called?"Should call run-mbql-transform! when feature is enabled")))))- (testing "Query transforms are skipped when hosted without :transforms feature"+ (testing "Query transforms are skipped when hosted without :transforms-basic feature"(mt/with-premium-features #{:hosting}(let [query-transform {:id 1:source query-source@@ -182,8 +182,8 @@(:message (first @logged-messages)))"Warning message should indicate transform was skipped due to missing features")))))- (testing "Query transforms run with :transforms feature"- (mt/with-premium-features #{:hosting :transforms}+ (testing "Query transforms run with :transforms-basic feature"+ (mt/with-premium-features #{:hosting :transforms-basic}(let [query-transform {:id 3:source query-source:name "Test Query Transform"}@@ -203,7 +203,7 @@"Should call run-mbql-transform! when feature is enabled"))))))(deftest job-run-boom-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)(mt/dataset transforms-dataset/transforms-test(mt/with-model-cleanup [:model/Notification@@ -252,7 +252,7 @@(is (mt/received-email-body? :crowberto #"Uncaught error")))))))))))))(deftest job-run-boom-manual-no-email-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)(mt/dataset transforms-dataset/transforms-test(mt/with-model-cleanup [:model/Notification@@ -299,7 +299,7 @@(is (zero? (count @mt/inbox))))))))))))))(deftest job-run-with-tranform-run-failure-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)(mt/dataset transforms-dataset/transforms-test(mt/with-model-cleanup [:model/Notification]@@ -393,7 +393,7 @@(deftest run-mbql-transform-anonymous-user-routing-error-test(mt/when-ee-evailable- (mt/with-premium-features #{:database-routing :transforms}+ (mt/with-premium-features #{:database-routing :transforms-basic}(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)(mt/dataset transforms-dataset/transforms-test(mt/with-model-cleanup [:model/Notification]@@ -446,7 +446,7 @@;; Because it is possible to set up transforms to run on overlapping schedules, such races are inevitable.;; On duplicate key error we should go back to the waiting loop until the is_active slot is available.(testing "Two concurrent run-transforms! that race on is_active state will both eventually run"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)(mt/dataset transforms-dataset/transforms-test(let [mp (mt/metadata-provider)diff --git a/test/metabase/transforms/models_test.clj b/test/metabase/transforms/models_test.cljindex f5d32c87492..e0bc81bc168 100644--- a/test/metabase/transforms/models_test.clj+++ b/test/metabase/transforms/models_test.clj@@ -107,7 +107,7 @@(deftest transform-tags-ordering-test(testing "Transform tags maintain specified order through updates"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Transform transform {}:model/TransformTag tag1 {:name "tag1"}:model/TransformTag tag2 {:name "tag2"}@@ -144,7 +144,7 @@(deftest job-tags-ordering-test(testing "Job tags maintain specified order through updates"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/TransformJob job {:name "test job" :schedule "0 0 * * *"}:model/TransformTag tag1 {:name "tag1"}:model/TransformTag tag2 {:name "tag2"}@@ -288,7 +288,7 @@(deftest deleted-transform-preserves-runs-test(testing "Deleting a transform sets transform_id to NULL but preserves the run"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Transform {transform-id :idtransform-name :nameentity-id :entity_id} {}@@ -307,7 +307,7 @@(deftest orphaned-run-hydration-test(testing "Hydrating :transform on orphaned runs returns {:name ... :deleted true}"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/TransformRun run {:transform_id nil:transform_name "Deleted Transform":transform_entity_id "test-entity-id-123"@@ -318,7 +318,7 @@(deftest start-run-captures-transform-info-test(testing "start-run! captures transform_name and transform_entity_id"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Transform {transform-id :idtransform-name :nameentity-id :entity_id} {}]diff --git a/test/metabase/transforms/search_test.clj b/test/metabase/transforms/search_test.cljindex 4b9adcec1b1..7e1211d3848 100644--- a/test/metabase/transforms/search_test.clj+++ b/test/metabase/transforms/search_test.clj@@ -150,7 +150,7 @@"Transform should be removed from the search index after deletion"))))))(deftest transform-search-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(search.tu/with-temp-index-table(mt/as-admin(testing "Transforms can be indexed and subsequently searched for"diff --git a/test/metabase/transforms/util_test.clj b/test/metabase/transforms/util_test.cljindex a14716343a7..b2b345376dc 100644--- a/test/metabase/transforms/util_test.clj+++ b/test/metabase/transforms/util_test.clj@@ -253,7 +253,7 @@(deftest source-tables-readable?-test(testing "source-tables-readable? function"- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)(mt/with-temp [:model/Database {db-id :id} {:engine driver/*driver*}:model/Table {table-id :id} {:db_id db-id :name "test_table"}]@@ -276,7 +276,7 @@(deftest source-tables-readable-permissions-test(testing "source-tables-readable? with various permission levels"- (mt/with-premium-features #{:transforms :transforms-python}+ (mt/with-premium-features #{:transforms-basic :transforms-python}(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)(mt/with-temp [:model/Database {db-id :id} {:engine driver/*driver*}:model/Table {table1-id :id} {:db_id db-id :name "test_table_1"}@@ -323,7 +323,7 @@(deftest execute-sets-transform-id-on-target-table-test(testing "Executing a query transform sets transform_id on the target table"(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [target {:type "table" :schema nil :name "test_output_table"}](mt/with-temp [:model/Transform {transform-id :id :as transform}{:target target@@ -345,7 +345,7 @@(deftest transform-hydration-test(testing "hydrating :transform on a table"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [target {:type "table" :schema nil :name "hydration_test_table"}](mt/with-temp [:model/Transform {transform-id :id} {:target target :name "Test Hydration Transform"}:model/Table table {:transform_id transform-id}]@@ -354,7 +354,7 @@(is (= transform-id (-> hydrated :transform :id))))))))(testing "hydrating :transform returns nil when transform_id is nil"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/Table table {:transform_id nil}](let [hydrated (t2/hydrate table :transform)](is (nil? (:transform hydrated))))))))@@ -369,7 +369,7 @@(deftest compile-source-no-limit-test(testing "compile-source produces SQL without a LIMIT clause"(mt/test-drivers (mt/normal-drivers-with-feature :transforms/table)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [transform {:source {:type "query":query (lib/query (mt/metadata-provider) (mt/mbql-query venues))}}{:keys [query]} (transforms-base.u/compile-source transform)]diff --git a/test/metabase/transforms_rest/api/transform_job_test.clj b/test/metabase/transforms_rest/api/transform_job_test.cljindex 1eca4c040ae..3ec0ff32816 100644--- a/test/metabase/transforms_rest/api/transform_job_test.clj+++ b/test/metabase/transforms_rest/api/transform_job_test.clj@@ -14,7 +14,7 @@(deftest create-job-test(testing "POST /api/transform-job"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/TransformTag tag1 {:name "test-tag-1"}:model/TransformTag tag2 {:name "test-tag-2"}](testing "Creates job with valid data"@@ -49,7 +49,7 @@(deftest get-job-test(testing "GET /api/transform-job/:id"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/TransformTag tag {:name "test-tag"}:model/TransformJob job {:name "Test Job":schedule "0 0 0 * * ?"}@@ -67,7 +67,7 @@(deftest get-job-transforms-test(testing "GET /api/transform-job/:id/transforms"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [lucky-id (mt/user->id :lucky)](mt/with-temp [:model/Transform {transform1-id :id} {:name "tr1" :creator_id lucky-id}:model/Transform {transform2-id :id} {:name "tr2" :creator_id lucky-id}@@ -91,7 +91,7 @@(deftest list-jobs-test(testing "GET /api/transform-job"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(let [at-5-second-schedule "5 * * * * ?"](mt/with-temp [:model/TransformTag {t1-id :id} {:name "test-tag"}:model/TransformTag {t2-id :id} {:name "second test-tag"}@@ -151,7 +151,7 @@(deftest update-job-test(testing "PUT /api/transform-job/:id"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/TransformTag tag1 {:name "tag-1"}:model/TransformTag tag2 {:name "tag-2"}](let [job (mt/user-http-request :lucky :post 200 "transform-job"@@ -176,7 +176,7 @@(deftest update-job-remove-tags-test(testing "PUT /api/transform-job/:id"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(testing "should be able to remove all tags from a job"(mt/with-temp [:model/TransformTag tag {}:model/TransformJob job {}@@ -188,7 +188,7 @@(deftest delete-job-test(testing "DELETE /api/transform-job/:id"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/TransformJob job {:name "To Delete" :schedule "0 0 0 * * ?"}](testing "Deletes job"(mt/user-http-request :lucky :delete 204 (str "transform-job/" (:id job)))@@ -200,7 +200,7 @@(deftest execute-job-test(testing "POST /api/transform-job/:id/execute"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/TransformJob job {:name "To Execute" :schedule "0 0 0 * * ?"}](testing "Returns stub run response"(let [response (mt/user-http-request :lucky :post 200 (str "transform-job/" (:id job) "/run"))]@@ -210,7 +210,7 @@(deftest permissions-test(testing "All endpoints require transform permissions"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-temp [:model/TransformJob job {:name "Test" :schedule "0 0 0 * * ?"}](mt/user-http-request :rasta :post 403 "transform-job"{:name "New" :schedule "0 0 0 * * ?"})diff --git a/test/metabase/transforms_rest/api/transform_tag_test.clj b/test/metabase/transforms_rest/api/transform_tag_test.cljindex b34ea230e8d..2645adf72ea 100644--- a/test/metabase/transforms_rest/api/transform_tag_test.clj+++ b/test/metabase/transforms_rest/api/transform_tag_test.clj@@ -12,7 +12,7 @@(deftest create-tag-test(testing "POST /api/transform-tag"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(mt/with-data-analyst-role! (mt/user->id :lucky)(testing "Creates a new tag with valid name"(let [tag-name (str "test-tag-" (u/generate-nano-id))@@ -42,7 +42,7 @@(is (:errors response) "Should return validation errors for blank name")))))))(deftest update-tag-test- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(testing "PUT /api/transform-tag/:tag-id"(mt/with-data-analyst-role! (mt/user->id :lucky)(testing "Updates tag name successfully"@@ -71,7 +71,7 @@(deftest delete-tag-test(testing "DELETE /api/transform-tag/:tag-id"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(testing "Deletes tag successfully"(mt/with-temp [:model/TransformTag tag {}](is (t2/exists? :model/TransformTag :id (:id tag)))@@ -86,7 +86,7 @@(deftest list-tags-test(testing "GET /api/transform-tag"(mt/with-data-analyst-role! (mt/user->id :lucky)- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(testing "Returns all tags ordered by name"(mt/with-temp [:model/TransformTag tag1 {:name "tag 1"}:model/TransformTag tag2 {:name "tag 3"}@@ -102,7 +102,7 @@(deftest permissions-test(testing "Transform tag endpoints require data-analyst permissions"- (mt/with-premium-features #{:transforms}+ (mt/with-premium-features #{:transforms-basic}(testing "POST /api/transform-tag"(is (string? (mt/user-http-request :rasta :post 403 "transform-tag"{:name "test"}))))