Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Move data apps back under data-apps token feature (#82855)

Timofey Kachalov0a6efc66ff44
diff --git a/e2e/test/scenarios/data-apps/admin.cy.spec.ts b/e2e/test/scenarios/data-apps/admin.cy.spec.ts
index 8bf5f99c8c4..53cd10f5c01 100644
--- a/e2e/test/scenarios/data-apps/admin.cy.spec.ts
+++ b/e2e/test/scenarios/data-apps/admin.cy.spec.ts
@@ -162,57 +162,28 @@ describe("scenarios > data apps > admin management", () => {
});
});
-// TODO(v65): data apps launch in v65 — replace the "no token" suite below with
-// these upsell tests once the nav item + page are un-gated.
-// describe("scenarios > data apps > upsell (OSS)", { tags: "@OSS" }, () => {
-// beforeEach(() => {
-// H.restore();
-// cy.signInAsAdmin();
-// // No token: on the OSS build the `data-apps` feature is unavailable, so the
-// // settings page shows the upsell instead of the management UI.
-// });
-//
-// it("shows the data-apps upsell instead of the management UI", () => {
-// cy.visit("/admin/settings/apps");
-//
-// H.main().within(() => {
-// cy.findByText("Build custom data apps").should("be.visible");
-// cy.findByText("Try for free").should("be.visible");
-// });
-// });
-//
-// it("marks the Data apps settings nav item with an upsell gem", () => {
-// cy.visit("/admin/settings/apps");
-//
-// cy.findByRole("link", { name: /Data apps/ }).within(() => {
-// cy.findByTestId("upsell-gem").should("exist");
-// });
-// });
-// });
-
-describe("scenarios > data apps > no token (OSS)", { tags: "@OSS" }, () => {
+describe("scenarios > data apps > upsell (OSS)", { tags: "@OSS" }, () => {
beforeEach(() => {
H.restore();
cy.signInAsAdmin();
- // No token: data apps launch in v65, so without the `data-apps` feature the
- // admin UI must not mention them at all — no nav item, no upsell, no page.
+ // No token: on the OSS build the `data-apps` feature is unavailable, so the
+ // settings page shows the upsell instead of the management UI.
});
- it("hides the Data apps settings nav item", () => {
- cy.visit("/admin/settings/general");
+ it("shows the data-apps upsell instead of the management UI", () => {
+ cy.visit("/admin/settings/apps");
- cy.findByRole("heading", { name: "General" }).should("be.visible");
- cy.findByRole("link", { name: /Data apps/ }).should("not.exist");
+ H.main().within(() => {
+ cy.findByText("Build custom data apps").should("be.visible");
+ cy.findByText("Try for free").should("be.visible");
+ });
});
- it("404s the data apps settings page instead of showing an upsell", () => {
+ it("marks the Data apps settings nav item with an upsell gem", () => {
cy.visit("/admin/settings/apps");
- H.main().within(() => {
- cy.findByText("The page you asked for couldn't be found.").should(
- "be.visible",
- );
- cy.findByText("Build custom data apps").should("not.exist");
+ cy.findByRole("link", { name: /Data apps/ }).within(() => {
+ cy.findByTestId("upsell-gem").should("be.visible");
});
});
});
diff --git a/enterprise/backend/src/metabase_enterprise/api_routes/routes.clj b/enterprise/backend/src/metabase_enterprise/api_routes/routes.clj
index 37880a3b7ef..cc85aa06e17 100644
--- a/enterprise/backend/src/metabase_enterprise/api_routes/routes.clj
+++ b/enterprise/backend/src/metabase_enterprise/api_routes/routes.clj
@@ -62,7 +62,7 @@
:collection-cleanup (deferred-tru "Collection Cleanup")
:content-translation (deferred-tru "Content translation")
:custom-viz (deferred-tru "Custom Visualizations")
- :data-apps-preview (deferred-tru "Data Apps")
+ :data-apps (deferred-tru "Data Apps")
:library (deferred-tru "Library")
:dependencies (deferred-tru "Dependency Tracking")
:schema-viewer (deferred-tru "Schema Viewer")
@@ -99,7 +99,7 @@
;; Data-app bundle hosting. Naughty because the FE route lives at `/apps/:slug`
;; (and `/api/apps/...`), NOT `/api/ee/...` — `/app/*` is reserved for static
;; assets, so we keep the public path stable here. Superuser-only inside the handler.
- (str "/" request/data-app-url-segment) (premium-handler metabase-enterprise.data-apps.api/routes :data-apps-preview)
+ (str "/" request/data-app-url-segment) (premium-handler metabase-enterprise.data-apps.api/routes :data-apps)
"/mt" metabase-enterprise.sandbox.api.routes/sandbox-routes
"/table" metabase-enterprise.sandbox.api.routes/sandbox-table-routes})
diff --git a/enterprise/backend/src/metabase_enterprise/data_apps/csp.clj b/enterprise/backend/src/metabase_enterprise/data_apps/csp.clj
index 34a941220d9..fb49d3dd750 100644
--- a/enterprise/backend/src/metabase_enterprise/data_apps/csp.clj
+++ b/enterprise/backend/src/metabase_enterprise/data_apps/csp.clj
@@ -10,7 +10,7 @@
"Origins the enabled data app with `slug` may reach (its `allowed_hosts`), or
`[]` when there is no such enabled app. Drives the data-app iframe document's
CSP `connect-src` so the sandboxed bundle can fetch/XHR those origins."
- :feature :data-apps-preview
+ :feature :data-apps
[slug]
(or (:allowed_hosts (data-apps.db/enabled-non-blob-data-app-by-slug slug))
[]))
diff --git a/enterprise/backend/src/metabase_enterprise/data_apps/sync.clj b/enterprise/backend/src/metabase_enterprise/data_apps/sync.clj
index f984fcf01d1..05855ef571b 100644
--- a/enterprise/backend/src/metabase_enterprise/data_apps/sync.clj
+++ b/enterprise/backend/src/metabase_enterprise/data_apps/sync.clj
@@ -280,7 +280,7 @@
its app simply doesn't appear. Returns the [[import-from-snapshot!]] result, or
nil if the sync threw.
- A no-op returning nil when the `:data-apps-preview` feature is absent: without
+ A no-op returning nil when the `:data-apps` feature is absent: without
it an instance behaves exactly as if data apps did not exist — no rows,
collections, or permission groups are materialized, and nothing is pruned."
[snapshot]
diff --git a/enterprise/backend/test/metabase_enterprise/api/session_test.clj b/enterprise/backend/test/metabase_enterprise/api/session_test.clj
index ff6d5bf3636..f2da7ea8bdd 100644
--- a/enterprise/backend/test/metabase_enterprise/api/session_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/api/session_test.clj
@@ -25,7 +25,7 @@
:config-text-file
:content-translation
:content-verification
- :data-apps-preview
+ :data-apps
:data-complexity-score
:dashboard-subscription-filters
:disable-password-login
diff --git a/enterprise/backend/test/metabase_enterprise/data_apps/api_test.clj b/enterprise/backend/test/metabase_enterprise/data_apps/api_test.clj
index 6f8761b2a83..e7621111f0a 100644
--- a/enterprise/backend/test/metabase_enterprise/data_apps/api_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_apps/api_test.clj
@@ -59,11 +59,11 @@
;;; ---------------------------------------------- Permissions ----------------------------------------------
(deftest data-app-access-requires-read-access-to-its-resource-collection-test
- ;; global mode so the `:data-apps-preview` premium feature is visible to the real-HTTP
+ ;; global mode so the `:data-apps` premium feature is visible to the real-HTTP
;; `user-real-request` calls below (which run on Jetty threads that don't inherit
;; a thread-local `binding`).
(mt/test-helpers-set-global-values!
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [app (t2/select-one :model/DataApp :name "demo")
@@ -90,7 +90,7 @@
(deftest data-app-without-a-resource-collection-is-not-published-test
(mt/test-helpers-set-global-values!
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(is (nil? (t2/select-one-fn :resource_collection_id :model/DataApp :name "demo"))
@@ -105,7 +105,7 @@
(deftest superuser-can-manage-and-view-test
(mt/test-helpers-set-global-values!
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [app (t2/select-one :model/DataApp :name "demo")
@@ -127,7 +127,7 @@
(testing "removing a data app through the admin API — clearing out one left behind after its
repo was disconnected or a remote-sync branch switch — deletes its server-managed
permission group and resource collection along with the row"
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [app (t2/select-one :model/DataApp :name "demo")
@@ -147,7 +147,7 @@
(is (empty? (closed-schemas/findings ::query-definition/query-definition))))
(deftest superuser-can-resolve-a-query-definition-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [response (mt/user-http-request
@@ -175,7 +175,7 @@
response))))))
(deftest query-definition-normalizes-nested-binning-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(doseq [[field-name field-id binning]
@@ -194,7 +194,7 @@
response)))))))
(deftest query-definition-rejects-unknown-nested-binning-options-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [response (mt/user-http-request
@@ -206,7 +206,7 @@
response))))))
(deftest query-definition-resolves-an-aggregation-with-sdk-metadata-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [response (mt/user-http-request
@@ -222,7 +222,7 @@
response))))))
(deftest query-definition-ignores-the-enabled-option-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [table-id (mt/id :venues)
@@ -234,7 +234,7 @@
response))))))
(deftest query-definition-rejects-unsupported-fields-over-http-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(doseq [[path expected-errors]
@@ -251,7 +251,7 @@
(is (= {:errors expected-errors} response))))))))
(deftest query-definition-resolves-a-metric-with-sdk-metadata-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [metadata-provider (mt/metadata-provider)
@@ -278,7 +278,7 @@
(testing "sync copies a referenced metric but rewrites nothing inside the copy, so a metric that
itself reads another card would publish and then fail for viewers without access to that
card's collection -- resolving the query has to refuse it"
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [metadata-provider (mt/metadata-provider)
@@ -337,7 +337,7 @@
(app-query question-metric-id)))))))))))))
(deftest resolved-query-includes-implicitly-joined-tables-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [orders-id (mt/id :orders)
@@ -355,7 +355,7 @@
(deftest saved-query-table-dependencies-include-implicitly-joined-tables-test
(testing "sync copies models, actions and metrics whose queries never pass through /query, and the
table an implicit join reaches is named nowhere in such a query -- only this lookup finds it"
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [metadata-provider (mt/metadata-provider)
@@ -379,7 +379,7 @@
(set (:table_ids response)))))))))))
(deftest superuser-can-store-table-dependencies-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp]
(create-app!)
(let [table-ids [(mt/id :venues) (mt/id :orders)]]
@@ -395,7 +395,7 @@
{:table_ids []}))))))))
(deftest non-superuser-cannot-store-table-dependencies-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp]
(create-app!)
(is (= "You don't have permissions to do that."
@@ -403,7 +403,7 @@
{:table_ids [(mt/id :venues)]}))))))
(deftest table-dependencies-validates-table-ids-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp]
(create-app!)
(is (= "One or more tables do not exist."
@@ -412,7 +412,7 @@
(is (= [] (t2/select-one-fn :table_ids :model/DataApp :name "demo"))))))
(deftest user-permission-warnings-test
- (mt/with-premium-features #{:data-apps-preview :advanced-permissions :sandboxes}
+ (mt/with-premium-features #{:data-apps :advanced-permissions :sandboxes}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup :model/Sandbox]
(mt/with-no-data-perms-for-all-users!
(create-app!)
@@ -462,7 +462,7 @@
{:user_ids [user-id]}))))))))))
(deftest permission-warning-lookups-are-batched-test
- (mt/with-premium-features #{:data-apps-preview :advanced-permissions :sandboxes}
+ (mt/with-premium-features #{:data-apps :advanced-permissions :sandboxes}
(mt/with-no-data-perms-for-all-users!
(let [table-ids [(mt/id :venues) (mt/id :orders)]
users [{:id (mt/user->id :rasta) :is_superuser false}
@@ -477,7 +477,7 @@
"permission warning query count must not grow with the number of users")))))
(deftest data-app-list-warning-lookups-are-batched-test
- (mt/with-premium-features #{:data-apps-preview :advanced-permissions :sandboxes}
+ (mt/with-premium-features #{:data-apps :advanced-permissions :sandboxes}
(mt/with-no-data-perms-for-all-users!
(mt/with-temp [:model/PermissionsGroup {first-group-id :id} {}
:model/PermissionsGroup {second-group-id :id} {}]
@@ -498,7 +498,7 @@
"warning status query count must not grow with the number of apps"))))))
(deftest data-app-list-includes-user-permission-warning-status-test
- (mt/with-premium-features #{:data-apps-preview :advanced-permissions :sandboxes}
+ (mt/with-premium-features #{:data-apps :advanced-permissions :sandboxes}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(mt/with-no-data-perms-for-all-users!
(create-app!)
@@ -521,7 +521,7 @@
(is (false? (warning?))))))))
(deftest data-app-list-warning-status-ignores-deactivated-members-test
- (mt/with-premium-features #{:data-apps-preview :advanced-permissions :sandboxes}
+ (mt/with-premium-features #{:data-apps :advanced-permissions :sandboxes}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(mt/with-no-data-perms-for-all-users!
(create-app!)
@@ -539,7 +539,7 @@
:has_user_permission_warnings)))))))))
(deftest deactivated-users-cannot-be-added-to-data-apps-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [{app-group-id :permission_group_id}
@@ -554,7 +554,7 @@
{:user_ids [user-id]}))))))))
(deftest user-permission-warnings-validates-users-test
- (mt/with-premium-features #{:data-apps-preview :tenants}
+ (mt/with-premium-features #{:data-apps :tenants}
(mt/with-model-cleanup [:model/DataApp]
(create-app!)
(testing "unknown users"
@@ -569,7 +569,7 @@
{:user_ids [user-id]}))))))))
(deftest non-superuser-cannot-read-user-permission-warnings-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp]
(create-app!)
(is (= "You don't have permissions to do that."
@@ -629,21 +629,21 @@
(is (not (t2/exists? :model/PermissionsGroupMembership :group_id group-id)))))))
(deftest query-definition-must-use-a-table-source-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp]
(create-app!)
(is (some? (mt/user-http-request :crowberto :post 400 "apps/demo/query"
{:stages [{:source {:type "card" :id 1}}]}))))))
(deftest query-definition-source-must-be-valid-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp]
(create-app!)
(is (some? (mt/user-http-request :crowberto :post 400 "apps/demo/query"
{:stages [{:source {:type 1 :id (mt/id :venues)}}]}))))))
(deftest non-superuser-cannot-resolve-a-query-definition-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(is (= "You don't have permissions to do that."
@@ -651,7 +651,7 @@
{:stages [{:source {:type "table" :id (mt/id :venues)}}]}))))))
(deftest superuser-can-create-or-reuse-a-data-app-draft-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(let [first-response (mt/user-http-request :crowberto :post 200 "apps/draft-app/draft")
second-response (mt/user-http-request :crowberto :post 200 "apps/draft-app/draft")]
@@ -665,14 +665,14 @@
(t2/select-one :model/DataApp :name "draft-app")))))))
(deftest non-superuser-cannot-create-a-data-app-draft-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(is (= "You don't have permissions to do that."
(mt/user-http-request :rasta :post 403 "apps/draft-app/draft")))
(is (not (t2/exists? :model/DataApp :name "draft-app"))))))
(deftest data-app-draft-must-have-a-valid-slug-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp]
(is (= "Data app draft slugs must use lowercase letters, numbers, and dashes."
(mt/user-http-request :crowberto :post 400 "apps/Draft/draft")))
@@ -680,7 +680,7 @@
(deftest data-app-group-reaches-only-copied-actions-test
(testing "an action is reachable exactly when its model lives in the data app collection"
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(mt/with-non-admin-groups-no-root-collection-perms
;; Its own slug: the `Data App: <slug>` group outlives other tests in
@@ -717,7 +717,7 @@
(mt/user-http-request :crowberto :get 200 (str "action/" source-id)))))))))))))
(deftest list-available-apps-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(t2/insert! :model/DataApp :name "ready" :display_name "Ready" :bundle_path "data_apps/ready/index.js")
(t2/insert! :model/DataApp :name "disabled" :display_name "Disabled" :bundle_path "data_apps/disabled/index.js"
@@ -729,7 +729,7 @@
(deftest outdated-apps-are-hidden-from-users-and-badged-for-admins-test
(mt/test-helpers-set-global-values!
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(t2/insert! :model/DataApp :name "old" :display_name "Old" :bundle_path "data_apps/old/index.js"
:bundle (.getBytes "BUNDLE" "UTF-8") :bundle_hash "abc123" :version 1)
@@ -772,7 +772,7 @@
(mt/user-http-request :crowberto :put 200 "apps/old" {:enabled false})))))))))
(deftest bundle-includes-allowed-hosts-header-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(t2/insert! :model/DataApp
:name "demo"
@@ -803,7 +803,7 @@
(get-in resp [:headers "X-Metabase-Data-App-Allowed-Hosts"])))))))))
(deftest list-includes-allowed-hosts-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(t2/insert! :model/DataApp
:name "withhosts" :display_name "With"
@@ -867,7 +867,7 @@
(deftest delete-endpoint-test
(mt/test-helpers-set-global-values!
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(let [{:keys [resource_collection_id permission_group_id]}
@@ -943,7 +943,7 @@
"the bad config neither aborts nor prunes its sibling apps, and doesn't materialize itself")))))
(deftest sync-from-snapshot!-never-throws-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(testing "a malformed data_app.yaml is isolated into :config-errors; the app just doesn't appear, the sync doesn't throw"
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(let [result (data-app.sync/sync-from-snapshot!
@@ -961,7 +961,7 @@
(deftest list-and-bundle-endpoints-test
(mt/test-helpers-set-global-values!
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(data-app.sync/import-from-snapshot!
(snapshot (app-files "demo" {:name "Demo app" :path "dist/index.js" :bundle "DEMOBUNDLE"})))
@@ -975,7 +975,7 @@
"DEMOBUNDLE")))))))
(deftest repo-status-endpoint-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(testing "reports no repository when none is connected"
(mt/with-dynamic-fn-redefs [data-app.sync/repo-url (constantly nil)]
(is (=? {:configured false :url nil}
@@ -987,7 +987,7 @@
(deftest enable-disable-endpoint-test
(mt/test-helpers-set-global-values!
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(data-app.sync/import-from-snapshot!
(snapshot (app-files "demo" {:name "Demo" :path "index.js" :bundle "BUNDLE"})))
@@ -1003,7 +1003,7 @@
(is (=? {:name "demo"} (mt/user-http-request :crowberto :get 200 "apps/demo"))))))))
(deftest sandbox-host-endpoint-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(let [resp (mt/user-http-request-full-response :crowberto :get 200 "apps/sandbox-host")
headers (:headers resp)]
(testing "serves a minimal HTML document"
@@ -1030,7 +1030,7 @@
;; `slug-regex` must exclude this literal, or `/apps/sandbox-host` would be
;; routed as a data app named "sandbox-host" and 404.
(testing "the route is not shadowed by the /:slug route"
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(create-app!)
(is (= 200 (:status (mt/user-http-request-full-response
diff --git a/enterprise/backend/test/metabase_enterprise/data_apps/csp_test.clj b/enterprise/backend/test/metabase_enterprise/data_apps/csp_test.clj
index 16801a2fd62..ad4b9ccaadc 100644
--- a/enterprise/backend/test/metabase_enterprise/data_apps/csp_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_apps/csp_test.clj
@@ -24,7 +24,7 @@
first)))))
(deftest data-app-connect-src-allowed-hosts-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-temp [:model/DataApp _ {:name "boba"
:display_name "Boba"
:bundle_path "data_apps/boba/dist/index.js"
@@ -53,14 +53,14 @@
:bundle_path "x"
:enabled true
:allowed_hosts ["https://api.example.com"]}]
- (testing "with the :data-apps-preview feature the EE impl returns the app's allowed_hosts"
- (mt/with-premium-features #{:data-apps-preview}
+ (testing "with the :data-apps feature the EE impl returns the app's allowed_hosts"
+ (mt/with-premium-features #{:data-apps}
(is (= ["https://api.example.com"] (mw.security/data-app-connect-src-hosts "boba")))))
(testing "without the feature it falls back to []"
(mt/with-premium-features #{}
(is (= [] (mw.security/data-app-connect-src-hosts "boba")))))
(testing "a disabled app contributes nothing"
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-temp [:model/DataApp _ {:name "off"
:display_name "Off"
:bundle_path "x"
diff --git a/enterprise/backend/test/metabase_enterprise/data_apps/sync_test.clj b/enterprise/backend/test/metabase_enterprise/data_apps/sync_test.clj
index abc222093f0..97b73fa380b 100644
--- a/enterprise/backend/test/metabase_enterprise/data_apps/sync_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/data_apps/sync_test.clj
@@ -35,7 +35,7 @@
(format "data_apps/%s/%s" dir path) bundle})
(deftest sync-from-snapshot-is-gated-by-the-data-apps-feature-test
- (testing "the remote-sync entry point does nothing without the :data-apps-preview feature —
+ (testing "the remote-sync entry point does nothing without the :data-apps feature —
an instance then behaves exactly as if data apps did not exist"
(let [files (app-files "a" {:name "A" :path "index.js" :bundle "V1"})]
(mt/with-premium-features #{}
@@ -44,7 +44,7 @@
"returns nil rather than a sync result")
(is (not (t2/exists? :model/DataApp :name "a"))
"materializes no data app")))
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(is (=? {:synced 1 :changed 1}
(data-app.sync/sync-from-snapshot! (snapshot files)))
@@ -366,7 +366,7 @@
(is (= "NEW" (String. ^bytes (t2/select-one-fn :bundle :model/DataApp :name "working") "UTF-8")))))))
(deftest pruning-failure-does-not-roll-back-synced-apps-test
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(let [working-files (app-files "working" {:name "Working" :path "index.js" :bundle "OLD"})
files (merge working-files (app-files "removed" {:name "Removed" :path "index.js" :bundle "OLD"}))
diff --git a/enterprise/backend/test/metabase_enterprise/remote_sync/data_app_pull_test.clj b/enterprise/backend/test/metabase_enterprise/remote_sync/data_app_pull_test.clj
index 6f68dcc8017..f882240b4cc 100644
--- a/enterprise/backend/test/metabase_enterprise/remote_sync/data_app_pull_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/remote_sync/data_app_pull_test.clj
@@ -57,7 +57,7 @@
(deftest data-app-only-pull-counts-app-changes-test
(testing "a pull whose only change is a data app is reported as a real pull, not pull-skipped / 0 changes"
(search.tu/with-index-disabled
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-temporary-setting-values [remote-sync-type :read-write remote-sync-transforms false]
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(let [outcome (pull-outcome! (app-tree! "sales" "BUNDLE-V1")
@@ -68,7 +68,7 @@
(deftest data-only-pull-excludes-unchanged-apps-test
(testing "a serdes-only pull counts serdes content; unchanged data apps add nothing"
(search.tu/with-index-disabled
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-temporary-setting-values [remote-sync-type :read-write remote-sync-transforms false]
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
;; v1 adds a collection; the data app is byte-for-byte the same as v0.
@@ -80,7 +80,7 @@
(deftest mixed-pull-counts-serdes-and-apps-test
(testing "a mixed pull counts serdes content AND the changed data apps"
(search.tu/with-index-disabled
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-temporary-setting-values [remote-sync-type :read-write remote-sync-transforms false]
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
;; v1 adds a collection AND changes the data app's bundle.
@@ -92,7 +92,7 @@
(deftest data-apps-land-with-the-version-test
(testing "a pull records the data apps at the snapshot version it commits as the sync base"
(search.tu/with-index-disabled
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-temporary-setting-values [remote-sync-type :read-write remote-sync-transforms false]
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(let [src (rs.test/versioned-source :trees {"v0" (app-tree! "sales" "BUNDLE-V1")
@@ -107,7 +107,7 @@
(testing "a crash while materializing data apps rolls the version back, so the next pull redoes the import
instead of skipping a version whose data apps never landed"
(search.tu/with-index-disabled
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(mt/with-temporary-setting-values [remote-sync-type :read-write remote-sync-transforms false]
(mt/with-model-cleanup [:model/DataApp :model/Collection :model/PermissionsGroup]
(let [src (rs.test/versioned-source :trees {"v0" (app-tree! "sales" "BUNDLE-V1")
diff --git a/enterprise/backend/test/metabase_enterprise/remote_sync/data_apps_test.clj b/enterprise/backend/test/metabase_enterprise/remote_sync/data_apps_test.clj
index ea81e16d3c0..f223099455a 100644
--- a/enterprise/backend/test/metabase_enterprise/remote_sync/data_apps_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/remote_sync/data_apps_test.clj
@@ -16,8 +16,8 @@
(comment metabase-enterprise.data-apps.models.data-app/keep-me)
(defn- import! [files]
- ;; the import's data-app materialization is gated on :data-apps-preview; enable it so apps sync.
- (mt/with-premium-features #{:data-apps-preview}
+ ;; the import's data-app materialization is gated on :data-apps; enable it so apps sync.
+ (mt/with-premium-features #{:data-apps}
(let [source (test-helpers/create-mock-source :initial-files files)
task-id (t2/insert-returning-pk! :model/RemoteSyncTask
{:sync_task_type "import" :initiated_by (mt/user->id :rasta)})
diff --git a/frontend/src/metabase/admin/settings/components/SettingsNav/SettingsNav.tsx b/frontend/src/metabase/admin/settings/components/SettingsNav/SettingsNav.tsx
index 1c18aa2b1d6..3578fb2a2bb 100644
--- a/frontend/src/metabase/admin/settings/components/SettingsNav/SettingsNav.tsx
+++ b/frontend/src/metabase/admin/settings/components/SettingsNav/SettingsNav.tsx
@@ -4,11 +4,7 @@ import { AdminNavWrapper } from "metabase/admin/components/AdminNav";
import { UpsellGem } from "metabase/common/components/upsells/components/UpsellGem";
import { useHasTokenFeature } from "metabase/common/hooks";
import { getUserIsAdmin } from "metabase/current-user";
-import {
- PLUGIN_DATA_APPS,
- PLUGIN_REMOTE_SYNC,
- PLUGIN_SECURITY_CENTER,
-} from "metabase/plugins";
+import { PLUGIN_REMOTE_SYNC, PLUGIN_SECURITY_CENTER } from "metabase/plugins";
import { useSelector } from "metabase/redux";
import { getPlan, isProPlan, useSetting } from "metabase/settings";
import { Box, Divider, Flex } from "metabase/ui";
@@ -85,9 +81,8 @@ export function SettingsNav() {
/>
{/* do not allow users with "Settings access" permissions to access custom viz pages */}
{isAdmin && <CustomVisualizationsNav />}
- {/* TODO(v65): data apps launch in v65 — drop the isEnabled gate then so
- the nav item (and its upsell gem) shows without the token feature */}
- {isAdmin && PLUGIN_DATA_APPS.isEnabled && <DataAppsNav />}
+ {/* do not allow users with "Settings access" permissions to access data apps pages */}
+ {isAdmin && <DataAppsNav />}
<SettingsNavItem path="maps" label={t`Maps`} icon="map" />
<SettingsNavItem
path={!hasWhitelabel ? "whitelabel" : undefined}
diff --git a/frontend/src/metabase/admin/settings/components/SettingsPages/DataAppsSettingsPage.tsx b/frontend/src/metabase/admin/settings/components/SettingsPages/DataAppsSettingsPage.tsx
index 9f940b12c89..2bd41fbf844 100644
--- a/frontend/src/metabase/admin/settings/components/SettingsPages/DataAppsSettingsPage.tsx
+++ b/frontend/src/metabase/admin/settings/components/SettingsPages/DataAppsSettingsPage.tsx
@@ -1,30 +1,24 @@
-// TODO(v65): data apps launch in v65 — uncomment these imports together with
-// the upsell branch below.
-// import { t } from "ttag";
-//
-// import { SettingsPageWrapper } from "metabase/settings-components";
-// import { UpsellDataApps } from "metabase/admin/upsells";
-// import { useHasTokenFeature } from "metabase/common/hooks";
+import { t } from "ttag";
+
+import { UpsellDataApps } from "metabase/admin/upsells";
+import { useHasTokenFeature } from "metabase/common/hooks";
import { PLUGIN_DATA_APPS } from "metabase/plugins";
+import { SettingsPageWrapper } from "metabase/settings-components";
/**
- * Admin page at /admin/settings/apps. Until the v65 launch the route + nav item
- * only mount when the enterprise plugin has the `data-apps` token feature, so
- * instances without it get no mention of data apps.
+ * Admin page at /admin/settings/apps. Shows the upsell on instances without the
+ * `data-apps` token feature; the enterprise plugin provides the management UI.
*/
export function DataAppsManagePage() {
- // TODO(v65): uncomment to bring back the upsell for instances without the
- // `data-apps` token feature (see the other TODO(v65) markers for the nav item
- // and route gates that hide this page until then).
- // const hasDataApps = useHasTokenFeature("data-apps");
- //
- // if (!hasDataApps) {
- // return (
- // <SettingsPageWrapper title={t`Data apps`}>
- // <UpsellDataApps source="settings-data-apps" />
- // </SettingsPageWrapper>
- // );
- // }
+ const hasDataApps = useHasTokenFeature("data-apps");
+
+ if (!hasDataApps) {
+ return (
+ <SettingsPageWrapper title={t`Data apps`}>
+ <UpsellDataApps source="settings-data-apps" />
+ </SettingsPageWrapper>
+ );
+ }
return <PLUGIN_DATA_APPS.ManageDataAppsPage />;
}
diff --git a/frontend/src/metabase/admin/settingsRoutes.tsx b/frontend/src/metabase/admin/settingsRoutes.tsx
index 4be71747924..95b00b69fba 100644
--- a/frontend/src/metabase/admin/settingsRoutes.tsx
+++ b/frontend/src/metabase/admin/settingsRoutes.tsx
@@ -247,19 +247,17 @@ export const getSettingsRoutes = (
<Route path="development" lazy={customVisualizationsDevelopment} />
)}
</Route>
- {/* TODO(v65): data apps launch in v65 — drop the isEnabled gate then so the
- page shows the upsell without the token feature instead of 404ing */}
- {PLUGIN_DATA_APPS.isEnabled && (
- <Route
- path={
- Urls.DATA_APP_URL_SEGMENT
- } /* do not allow users with "Settings access" permissions to access data apps pages */
- element={<IsAdmin />}
- >
- <Route index lazy={dataAppsManage} />
+ <Route
+ path={
+ Urls.DATA_APP_URL_SEGMENT
+ } /* do not allow users with "Settings access" permissions to access data apps pages */
+ element={<IsAdmin />}
+ >
+ <Route index lazy={dataAppsManage} />
+ {PLUGIN_DATA_APPS.isEnabled && (
<Route path=":slug/users" lazy={dataAppUsersManage} />
- </Route>
- )}
+ )}
+ </Route>
<Route path="uploads" lazy={uploadSettings} />
<Route
path="python-runner"
diff --git a/src/metabase/permissions_rest/api.clj b/src/metabase/permissions_rest/api.clj
index 7ebc06bec94..fb924c0bf5c 100644
--- a/src/metabase/permissions_rest/api.clj
+++ b/src/metabase/permissions_rest/api.clj
@@ -295,7 +295,7 @@
(defn- check-data-app-group-feature!
[group-id]
(when (permissions-rest.db/data-app-group? group-id)
- (premium-features/assert-has-feature :data-apps-preview (tru "Data Apps"))
+ (premium-features/assert-has-feature :data-apps (tru "Data Apps"))
true))
;; TODO (Cam 2025-11-25) please add a response schema to this API endpoint, it makes it easier for our customers to
diff --git a/src/metabase/premium_features/settings.clj b/src/metabase/premium_features/settings.clj
index 9d4303746c2..15daa264ea2 100644
--- a/src/metabase/premium_features/settings.clj
+++ b/src/metabase/premium_features/settings.clj
@@ -294,9 +294,9 @@
"Does this instance support remote syncing collections."
:remote-sync)
-(define-premium-feature ^{:added "0.65.0"} enable-data-apps?
+(define-premium-feature ^{:added "0.57.0"} enable-data-apps?
"Should we allow users to publish and run data apps?"
- :data-apps-preview)
+ :data-apps)
(define-premium-feature ^{:added "0.59.0"} enable-basic-transforms?
"Should we allow users to use transforms? Replacement for transforms"
diff --git a/src/metabase/server/middleware/security.clj b/src/metabase/server/middleware/security.clj
index 5e7771b8d9e..c866b57f161 100644
--- a/src/metabase/server/middleware/security.clj
+++ b/src/metabase/server/middleware/security.clj
@@ -236,9 +236,8 @@
(defenterprise data-app-connect-src-hosts
"Origins the data app identified by `slug` may reach (its `allowed_hosts`),
added to the data-app iframe document's CSP `connect-src` so the sandboxed
- bundle can `fetch`/XHR them. Returns `[]` in OSS, when the
- `:data-apps-preview` feature is absent, or when there's no enabled app for
- `slug`. EE
+ bundle can `fetch`/XHR them. Returns `[]` in OSS, when the `:data-apps`
+ feature is absent, or when there's no enabled app for `slug`. EE
implementation: [[metabase-enterprise.data-apps.csp]]."
metabase-enterprise.data-apps.csp
[_slug]
diff --git a/src/metabase/server/routes/index.clj b/src/metabase/server/routes/index.clj
index ca8d0d5b6e9..5cf0c73941e 100644
--- a/src/metabase/server/routes/index.clj
+++ b/src/metabase/server/routes/index.clj
@@ -145,7 +145,7 @@
(response/redirect (str (system/site-url) "/auth/login?redirect=" (codec/url-encode target)))))
(defn data-app
- "`/embed/apps/:name` iframe entrypoint. Served only when the `:data-apps-preview` feature is
+ "`/embed/apps/:name` iframe entrypoint. Served only when the `:data-apps` feature is
enabled; without it, responds nil so routing falls through to the generic embed handler — the
instance then behaves exactly as if data apps did not exist, keeping the feature gate with the
data-app entrypoint rather than in the top-level route table. A signed-out visitor is sent to
diff --git a/test/metabase/analytics/stats_test.clj b/test/metabase/analytics/stats_test.clj
index 28ef1aeda3a..02f269371fa 100644
--- a/test/metabase/analytics/stats_test.clj
+++ b/test/metabase/analytics/stats_test.clj
@@ -543,7 +543,7 @@
or to this set, so that [[every-feature-is-accounted-for-test]] passes."
#{:audit-app ;; tracked under :mb-analytics
:collection-cleanup
- :data-apps-preview
+ :data-apps
:data-complexity-score
:development-mode
:library
diff --git a/test/metabase/server/routes_test.clj b/test/metabase/server/routes_test.clj
index c796a85fa6a..a82ece867b3 100644
--- a/test/metabase/server/routes_test.clj
+++ b/test/metabase/server/routes_test.clj
@@ -34,7 +34,7 @@
@p))
(deftest data-app-entrypoint-is-gated-by-the-data-apps-feature-test
- (testing "the /embed/apps/:name entrypoint is served only with :data-apps-preview; without it it
+ (testing "the /embed/apps/:name entrypoint is served only with :data-apps; without it it
responds nil so routing falls through to the generic embed handler — exactly as if data
apps did not exist"
;; Stub the raw shell so the test needs no built frontend HTML; the feature gate lives in
@@ -44,7 +44,7 @@
;; `enable-data-apps?` also requires the EE code to be present (`config/ee-available?`), so the
;; served path exists only on EE; on OSS the entrypoint always falls through.
(mt/when-ee-evailable
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(is (= "DATA-APP" (:body (serve-data-app request))) "with the feature, serves the data-app shell")))
(mt/with-premium-features #{}
(is (nil? (serve-data-app request)) "without the feature, responds nil so routing falls through"))))))
@@ -53,7 +53,7 @@
(testing "a signed-out visitor is redirected to the login page instead of getting the iframe document,
whose CSP carries the app's allowed_hosts; the redirect returns them to the top-level page"
(mt/when-ee-evailable
- (mt/with-premium-features #{:data-apps-preview}
+ (mt/with-premium-features #{:data-apps}
(with-redefs [index/data-app-shell (fn [_req respond _raise] (respond {:status 200 :body "DATA-APP"}))]
(let [response (serve-data-app {:uri "/embed/apps/sales/sub/route" :query-string "tab=1"})]
(is (= 302 (:status response)))