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
Backend module detangling pre Clojure/conj 2025 edition (#65681)
Cam Saul94d2daaafd91
diff --git a/.clj-kondo/config.edn b/.clj-kondo/config.ednindex 4483a28172d..b8fd9e59537 100644--- a/.clj-kondo/config.edn+++ b/.clj-kondo/config.edn@@ -536,11 +536,11 @@metabase.channel.template.handlebars-test/with-temp-template! hooks.common/with-vec-first-bindingmetabase.classloader.core/require hooks.clojure.core.require/lint-requiremetabase.classloader.impl/require hooks.clojure.core.require/lint-require- metabase.collections.api-test/with-french-user-and-personal-collection! hooks.common/with-two-top-level-bindings+ metabase.collections-rest.api-test/with-french-user-and-personal-collection! hooks.common/with-two-top-level-bindingsmetabase.collections.models.collection-test/with-collection-hierarchy! hooks.common/let-one-with-optional-valuemetabase.collections.models.collection-test/with-personal-and-impersonal-collections hooks.common/with-two-bindings- metabase.dashboards.api-test/with-chain-filter-fixtures hooks.common/let-one-with-optional-value- metabase.dashboards.api-test/with-simple-dashboard-with-tabs hooks.common/with-one-binding+ metabase.dashboards-rest.api-test/with-chain-filter-fixtures hooks.common/let-one-with-optional-value+ metabase.dashboards-rest.api-test/with-simple-dashboard-with-tabs hooks.common/with-one-bindingmetabase.dashboards.models.dashboard-tab-test/with-dashtab-in-personal-collection hooks.common/with-one-top-level-bindingmetabase.dashboards.models.dashboard-test/with-dash-in-collection! hooks.common/with-three-bindingsmetabase.driver.bigquery-cloud-sdk-test/calculate-bird-scarcity hooks.metabase.query-processor-test.expressions-test/calculate-bird-scarcity@@ -548,10 +548,10 @@metabase.driver.oracle-test/with-temp-user hooks.common/let-one-with-optional-valuemetabase.driver/register! hooks.metabase.driver/register!metabase.driver-api/defenterprise hooks.metabase.premium-features.defenterprise/defenterprise- metabase.embedding.api.embed-test/do-response-formats hooks.common/with-two-bindings- metabase.embedding.api.embed-test/with-chain-filter-fixtures! hooks.common/let-one-with-optional-value- metabase.embedding.api.embed-test/with-temp-card hooks.common/let-one-with-optional-value- metabase.embedding.api.embed-test/with-temp-dashcard hooks.common/let-one-with-optional-value+ metabase.embedding-rest.api.embed-test/do-response-formats hooks.common/with-two-bindings+ metabase.embedding-rest.api.embed-test/with-chain-filter-fixtures! hooks.common/let-one-with-optional-value+ metabase.embedding-rest.api.embed-test/with-temp-card hooks.common/let-one-with-optional-value+ metabase.embedding-rest.api.embed-test/with-temp-dashcard hooks.common/let-one-with-optional-valuemetabase.legacy-mbql.schema.macros/defclause hooks.metabase.legacy-mbql.schemas.macros/defclausemetabase.legacy-mbql.schema.macros/defclause* hooks.metabase.legacy-mbql.schemas.macros/defclause*metabase.legacy-mbql.schema.macros/one-of hooks.metabase.legacy-mbql.schemas.macros/one-of@@ -571,10 +571,10 @@metabase.permissions.core/disable-perms-cache hooks.common/do*metabase.premium-features.core/defenterprise hooks.metabase.premium-features.defenterprise/defenterprisemetabase.premium-features.defenterprise/defenterprise hooks.metabase.premium-features.defenterprise/defenterprise- metabase.public-sharing.api-test/with-required-param-card! hooks.common/with-one-binding- metabase.public-sharing.api-test/with-temp-public-card hooks.common/let-one-with-optional-value- metabase.public-sharing.api-test/with-temp-public-dashboard hooks.common/let-one-with-optional-value- metabase.public-sharing.api-test/with-temp-public-dashboard-and-card hooks.common/with-three-bindings+ metabase.public-sharing-rest.api-test/with-required-param-card! hooks.common/with-one-binding+ metabase.public-sharing-rest.api-test/with-temp-public-card hooks.common/let-one-with-optional-value+ metabase.public-sharing-rest.api-test/with-temp-public-dashboard hooks.common/let-one-with-optional-value+ metabase.public-sharing-rest.api-test/with-temp-public-dashboard-and-card hooks.common/with-three-bindingsmetabase.pulse.api.alert-test/with-alert-in-collection! hooks.common/with-four-bindingsmetabase.pulse.dashboard-subscription-test/with-link-card-fixture-for-dashboard hooks.common/let-secondmetabase.pulse.models.pulse-test/with-dashboard-subscription-in-collection! hooks.common/with-four-bindings@@ -636,7 +636,7 @@metabase.test/with-temp hooks.toucan2.tools.with-temp/with-tempmetabase.test/with-temp-file hooks.metabase.test.util/with-temp-filemetabase.test/with-temporary-setting-values hooks.metabase.test.util/with-temporary-setting-values- metabase.users.api-test/with-temp-user-email! hooks.common/with-one-binding+ metabase.users-rest.api-test/with-temp-user-email! hooks.common/with-one-bindingmetabase.util.i18n/deferred-trs hooks.metabase.util.i18n/deferred-trsmetabase.util.i18n/deferred-tru hooks.metabase.util.i18n/deferred-trumetabase.util.i18n/trs hooks.metabase.util.i18n/trs@@ -660,43 +660,43 @@metabase.xrays.api.automagic-dashboards-test/with-indexed-model! hooks.metabase.xrays.api.automagic-dashboards-test/with-indexed-model!}:macroexpand- {clojurewerkz.quartzite.jobs/build macros.quartz/build-job- clojurewerkz.quartzite.schedule.calendar-interval/build macros.quartz/build-job- clojurewerkz.quartzite.schedule.cron/schedule macros.quartz/schedule- clojurewerkz.quartzite.schedule.simple/schedule macros.quartz/simple-schedule- clojurewerkz.quartzite.triggers/build macros.quartz/build-trigger- metabase-enterprise.database-routing.e2e-test/with-temp-dbs! macros.metabase-enterprise.database-routing.e2e-test/with-temp-dbs!- metabase-enterprise.impersonation.util-test/with-impersonations! macros.metabase-enterprise.impersonation.util-test/with-impersonations!- metabase-enterprise.query-reference-validation.api-test/with-test-setup! macros.metabase-enterprise.query-reference-validation.api-test/with-test-setup!- metabase-enterprise.sandbox.test-util/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!- metabase-enterprise.sandbox.test-util/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!- metabase-enterprise.serialization.test-util/with-world macros.metabase-enterprise.serialization.test-util/with-world- metabase-enterprise.test/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!- metabase-enterprise.test/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!- metabase.collections.api-test/with-collection-hierarchy! macros.metabase.collections.api-test/with-collection-hierarchy!- metabase.collections.api-test/with-some-children-of-collection! macros.metabase.collections.api-test/with-some-children-of-collection!- metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-card-referencing! macros.metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-card-referencing!- metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing! macros.metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing!- metabase.lib.common/defop macros.metabase.lib.common/defop- metabase.lib.filter/deffilter macros.metabase.lib.filter/deffilter- metabase.parameters.chain-filter-test/chain-filter macros.metabase.parameters.chain-filter-test/chain-filter- metabase.parameters.chain-filter-test/chain-filter-search macros.metabase.parameters.chain-filter-test/chain-filter- metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing! macros.metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing!- metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing! macros.metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing!- metabase.queries.api.card-test/with-ordered-items macros.metabase.queries.api.card-test/with-ordered-items- metabase.query-analysis.models.query-analysis-test/with-test-setup macros.metabase.query-analysis.models.query-analysis-test/with-test-setup- metabase.query-analysis.task.test-setup/with-test-setup! macros.metabase.query-analysis.task.test-setup/with-test-setup!- metabase.query-processor.streaming/streaming-response macros.metabase.query-processor.streaming/streaming-response- metabase.server.statistics-handler-test/with-server macros.metabase.server.statistics-handler-test/with-server- metabase.test.data.users/with-group-for-user macros.metabase.test.data.users/with-group-for-user- metabase.test.util/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!- metabase.test.util/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values- metabase.test/with-group-for-user macros.metabase.test.data.users/with-group-for-user- metabase.test/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!- metabase.test/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values- metabase.users.models.user-test/with-groups! macros.metabase.users.models.user-test/with-groups!- metabase.util.namespaces/import-fn macros.metabase.util.namespaces/import-fn- metabase.xrays.related-test/with-world macros.metabase.xrays.related-test/with-world}}+ {clojurewerkz.quartzite.jobs/build macros.quartz/build-job+ clojurewerkz.quartzite.schedule.calendar-interval/build macros.quartz/build-job+ clojurewerkz.quartzite.schedule.cron/schedule macros.quartz/schedule+ clojurewerkz.quartzite.schedule.simple/schedule macros.quartz/simple-schedule+ clojurewerkz.quartzite.triggers/build macros.quartz/build-trigger+ metabase-enterprise.database-routing.e2e-test/with-temp-dbs! macros.metabase-enterprise.database-routing.e2e-test/with-temp-dbs!+ metabase-enterprise.impersonation.util-test/with-impersonations! macros.metabase-enterprise.impersonation.util-test/with-impersonations!+ metabase-enterprise.query-reference-validation.api-test/with-test-setup! macros.metabase-enterprise.query-reference-validation.api-test/with-test-setup!+ metabase-enterprise.sandbox.test-util/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!+ metabase-enterprise.sandbox.test-util/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!+ metabase-enterprise.serialization.test-util/with-world macros.metabase-enterprise.serialization.test-util/with-world+ metabase-enterprise.test/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!+ metabase-enterprise.test/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!+ metabase.collections-rest.api-test/with-collection-hierarchy! macros.metabase.collections-rest.api-test/with-collection-hierarchy!+ metabase.collections-rest.api-test/with-some-children-of-collection! macros.metabase.collections-rest.api-test/with-some-children-of-collection!+ metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-card-referencing! macros.metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-card-referencing!+ metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing! macros.metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing!+ metabase.lib.common/defop macros.metabase.lib.common/defop+ metabase.lib.filter/deffilter macros.metabase.lib.filter/deffilter+ metabase.parameters.chain-filter-test/chain-filter macros.metabase.parameters.chain-filter-test/chain-filter+ metabase.parameters.chain-filter-test/chain-filter-search macros.metabase.parameters.chain-filter-test/chain-filter+ metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-card-referencing! macros.metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-card-referencing!+ metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-dashcard-referencing! macros.metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-dashcard-referencing!+ metabase.queries.api.card-test/with-ordered-items macros.metabase.queries.api.card-test/with-ordered-items+ metabase.query-analysis.models.query-analysis-test/with-test-setup macros.metabase.query-analysis.models.query-analysis-test/with-test-setup+ metabase.query-analysis.task.test-setup/with-test-setup! macros.metabase.query-analysis.task.test-setup/with-test-setup!+ metabase.query-processor.streaming/streaming-response macros.metabase.query-processor.streaming/streaming-response+ metabase.server.statistics-handler-test/with-server macros.metabase.server.statistics-handler-test/with-server+ metabase.test.data.users/with-group-for-user macros.metabase.test.data.users/with-group-for-user+ metabase.test.util/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!+ metabase.test.util/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values+ metabase.test/with-group-for-user macros.metabase.test.data.users/with-group-for-user+ metabase.test/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!+ metabase.test/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values+ metabase.users.models.user-test/with-groups! macros.metabase.users.models.user-test/with-groups!+ metabase.util.namespaces/import-fn macros.metabase.util.namespaces/import-fn+ metabase.xrays.related-test/with-world macros.metabase.xrays.related-test/with-world}}:config-in-comment{:linters {:unresolved-symbol {:level :off}}}diff --git a/.clj-kondo/config/modules/config.edn b/.clj-kondo/config/modules/config.ednindex ee6b2b459ae..b025fbdf6c2 100644--- a/.clj-kondo/config/modules/config.edn+++ b/.clj-kondo/config/modules/config.edn@@ -47,14 +47,13 @@{:metabase/modules{actions{:team "Gadget"- :api #{metabase.actions.api- metabase.actions.args+ :api #{metabase.actions.argsmetabase.actions.coremetabase.actions.init+ metabase.actions.schemametabase.actions.types}:uses #{analyticsapi- collectionsdrivereventslegacy-mbql@@ -63,8 +62,6 @@model-persistencemodelsparameters- permissions- public-sharingqueriesquery-processorsearch@@ -72,6 +69,19 @@utilwarehouses}}+ actions-rest+ {:team "Gadget"+ :api #{metabase.actions-rest.api}+ :uses #{actions+ analytics+ api+ collections+ lib+ permissions+ public-sharing+ queries+ util}}+activity-feed{:team "UX West":api #{metabase.activity-feed.api@@ -340,8 +350,7 @@collections{:team "UX West"- :api #{metabase.collections.api- metabase.collections.core+ :api #{metabase.collections.coremetabase.collections.models.collectionmetabase.collections.models.collection.root}:uses #{api@@ -349,6 +358,21 @@app-dbaudit-appconfig+ events+ models+ permissions+ premium-features+ remote-sync+ search+ util}}++ collections-rest+ {:team "UX West"+ :api #{metabase.collections-rest.api}+ :uses #{api+ app-db+ collections+ configeid-translationeventslib-be@@ -357,10 +381,8 @@permissionspremium-featuresqueries- remote-syncrequestrevisions- searchuploadutil}}@@ -398,22 +420,43 @@dashboards{:team "UX West"- :api #{metabase.dashboards.api- metabase.dashboards.autoplace+ :api #{metabase.dashboards.autoplacemetabase.dashboards.constantsmetabase.dashboards.initmetabase.dashboards.models.dashboardmetabase.dashboards.models.dashboard-cardmetabase.dashboards.models.dashboard-tab- metabase.dashboards.schema}+ metabase.dashboards.schema+ metabase.dashboards.settings}+ :uses #{api+ app-db+ audit-app+ collections+ config+ events+ lib+ models+ parameters+ permissions+ public-sharing+ queries+ query-processor+ search+ settings+ util+ warehouse-schema}}++ dashboards-rest+ {:team "UX West"+ :api #{metabase.dashboards-rest.api}:uses #{actionsanalyticsapiapp-db- audit-appchannelcollections- config+ collections-rest+ dashboardseid-translationembeddingevents@@ -429,10 +472,7 @@query-processorrequestrevisions- search- settingsutil- warehouse-schemaxrays}}database-routing@@ -518,8 +558,7 @@embedding{:team "Embedding"- :api #{metabase.embedding.api- metabase.embedding.init+ :api #{metabase.embedding.initmetabase.embedding.jwtmetabase.embedding.settingsmetabase.embedding.util@@ -527,19 +566,26 @@:uses #{analyticsapiconfig+ premium-features+ server+ settings+ util}}++ embedding-rest+ {:team "Embedding"+ :api #{metabase.embedding-rest.api}+ :uses #{apidashboardseid-translation+ embeddingeventsmodelsnotificationparameters- premium-features- public-sharing+ public-sharing-restqueriesquery-processorrequest- server- settingstilesutil}}@@ -885,22 +931,29 @@public-sharing{:team "UX West"- :api #{metabase.public-sharing.api- metabase.public-sharing.core+ :api #{metabase.public-sharing.coremetabase.public-sharing.initmetabase.public-sharing.validation}+ :uses #{api+ settings+ util}}++ public-sharing-rest+ {:team "UX West"+ :api #{metabase.public-sharing-rest.api}:uses #{actionsanalyticsapidashboards+ dashboards-resteventslibmodelsparameters+ public-sharingqueriesquery-processorrequest- settingstilesutil}}@@ -1217,18 +1270,24 @@setup{:team "UX West"- :api #{metabase.setup.api- metabase.setup.core+ :api #{metabase.setup.coremetabase.setup.init}+ :uses #{app-db+ config+ settings+ util}}++ setup-rest+ {:team "UX West"+ :api #{metabase.setup-rest.api}:uses #{analyticsapi- app-dbappearanceauth-identity- configeventsrequestsettings+ setupsystemutil}}@@ -1387,17 +1446,31 @@users{:team "UX West"- :api #{metabase.users.api- metabase.users.init+ :api #{metabase.users.initmetabase.users.models.usermetabase.users.models.user-parameter-value- metabase.users.schema}+ metabase.users.schema+ metabase.users.settings}+ :uses #{api+ batch-processing+ channel+ config+ events+ models+ permissions+ premium-features+ settings+ setup+ system+ util}}++ users-rest+ {:team "UX West"+ :api #{metabase.users-rest.api}:uses #{analyticsapiappearanceauth-identity- batch-processing- channelcollectionsconfigevents@@ -1405,10 +1478,8 @@permissionspremium-featuresrequest- settings- setupsso- system+ usersutilenterprise/advanced-permissions}}@@ -1447,8 +1518,7 @@warehouse-schema{:team "UX West"- :api #{metabase.warehouse-schema.api- metabase.warehouse-schema.field+ :api #{metabase.warehouse-schema.fieldmetabase.warehouse-schema.metadata-from-qpmetabase.warehouse-schema.metadata-queriesmetabase.warehouse-schema.models.field@@ -1456,14 +1526,11 @@metabase.warehouse-schema.models.field-valuesmetabase.warehouse-schema.models.tablemetabase.warehouse-schema.table}- :uses #{analytics- analyze+ :uses #{analyzeapiapp-dbaudit-app- database-routingdriver- eventsliblib-bemodels@@ -1471,25 +1538,58 @@permissionspremium-featuresquery-processor- requestsearch+ util+ warehouses}}++ warehouse-schema-rest+ {:team "UX West"+ :api #{metabase.warehouse-schema-rest.api}+ :uses #{analytics+ api+ app-db+ database-routing+ driver+ events+ lib+ models+ parameters+ query-processor+ requestsynctypesuploadutil- warehouses+ warehouse-schema+ warehouses-restxrays}}warehouses{:team "UX West"- :api #{metabase.warehouses.api- metabase.warehouses.core+ :api #{metabase.warehouses.coremetabase.warehouses.initmetabase.warehouses.models.database}:uses #{analyticsapiapp-dbaudit-app+ driver+ lib+ models+ permissions+ premium-features+ search+ secrets+ settings+ sync+ util}}++ warehouses-rest+ {:team "UX West"+ :api #{metabase.warehouses-rest.api}+ :uses #{analytics+ api+ app-dbclassloadercollectionsconfig@@ -1504,15 +1604,16 @@queriesrequestsample-data- searchsecretssettingssyncuploadutilwarehouse-schema+ warehousesenterprise/advanced-permissions}}+xrays{:team "Querying":api #{metabase.xrays.api@@ -1650,7 +1751,7 @@query-processorsettingssync- users+ users-restutilenterprise/serialization}}@@ -1708,6 +1809,7 @@modelsrequestusers+ users-restutil}}enterprise/content-translation@@ -1764,7 +1866,7 @@settingsutilwarehouse-schema- warehouses}}+ warehouses-rest}}enterprise/dependencies{:team "Querying"@@ -1917,10 +2019,10 @@syncsystemtask- users+ users-restutilwarehouse-schema- warehouses+ warehouses-restenterprise/dependenciesenterprise/documentsenterprise/transforms@@ -1949,6 +2051,7 @@eventspremium-featurespublic-sharing+ public-sharing-restquery-processorutil}}@@ -2090,6 +2193,7 @@:uses #{analyticsapicollections+ collections-restembeddingpremium-featuresqueriesdiff --git a/.clj-kondo/config/test-helpers/config.edn b/.clj-kondo/config/test-helpers/config.ednindex 763c00643c7..c10e3c43276 100644--- a/.clj-kondo/config/test-helpers/config.edn+++ b/.clj-kondo/config/test-helpers/config.edn@@ -100,7 +100,7 @@metabase.permissions.models.permissions/update-data-perms-graph!metabase.permissions.models.permissions/update-group-permissions!metabase.permissions.test-util/with-restored-perms!- metabase.public-sharing.api-test/add-card-to-dashboard!+ metabase.public-sharing-rest.api-test/add-card-to-dashboard!metabase.pulse.send/send-notifications!metabase.pulse.send/send-pulse!metabase.query-processor.streaming.interface/begin!diff --git a/.clj-kondo/macros/metabase/collections/api_test.clj b/.clj-kondo/macros/metabase/collections_rest/api_test.cljsimilarity index 89%rename from .clj-kondo/macros/metabase/collections/api_test.cljrename to .clj-kondo/macros/metabase/collections_rest/api_test.cljindex 742e0a3e69c..445f37d37d5 100644--- a/.clj-kondo/macros/metabase/collections/api_test.clj+++ b/.clj-kondo/macros/metabase/collections_rest/api_test.clj@@ -1,4 +1,4 @@-(ns macros.metabase.collections.api-test)+(ns macros.metabase.collections-rest.api-test)(defmacro with-collection-hierarchy! [bindings & body]`(let [~'a nildiff --git a/.clj-kondo/macros/metabase/embedding/api/embed_test.clj b/.clj-kondo/macros/metabase/embedding/embedding_rest/embed_test.cljsimilarity index 89%rename from .clj-kondo/macros/metabase/embedding/api/embed_test.cljrename to .clj-kondo/macros/metabase/embedding/embedding_rest/embed_test.cljindex 33521b25708..e0f3be9c553 100644--- a/.clj-kondo/macros/metabase/embedding/api/embed_test.clj+++ b/.clj-kondo/macros/metabase/embedding/embedding_rest/embed_test.clj@@ -1,4 +1,4 @@-(ns macros.metabase.embedding.api.embed-test)+(ns macros.metabase.embedding-rest.api.embed-test)(defmacro with-embedding-enabled-and-temp-card-referencing![table-kw field-kw [card-binding] & body]diff --git a/.clj-kondo/macros/metabase/public_sharing/api_test.clj b/.clj-kondo/macros/metabase/public_sharing_rest/api_test.cljsimilarity index 90%rename from .clj-kondo/macros/metabase/public_sharing/api_test.cljrename to .clj-kondo/macros/metabase/public_sharing_rest/api_test.cljindex bb2c6097d91..4c1b02a7b25 100644--- a/.clj-kondo/macros/metabase/public_sharing/api_test.clj+++ b/.clj-kondo/macros/metabase/public_sharing_rest/api_test.clj@@ -1,4 +1,4 @@-(ns macros.metabase.public-sharing.api-test)+(ns macros.metabase.public-sharing-rest.api-test)(defmacro with-sharing-enabled-and-temp-card-referencing![table-kw field-kw [card-binding] & body]diff --git a/.cljfmt.edn b/.cljfmt.ednindex 1bb00592a20..3a46935f4a4 100644--- a/.cljfmt.edn+++ b/.cljfmt.edn@@ -38,321 +38,321 @@;; zero get indented 2 spaces if not on the first line regardless of number of elements on the first line.:extra-indents{;; clojure.core stuff- fn* [[:inner 0]]- let* [[:block 1]]- with-meta [[:default]]+ fn* [[:inner 0]]+ let* [[:block 1]]+ with-meta [[:default]];; library stuff. Libraries that specify their own `:style/indent` specs are included in the section after this;; since it is generated automatically.- clojure.core.logic/fresh [[:block 1]]- clojure.core.logic/matcha [[:block 1]]- clojure.core.logic/run [[:block 2]]- clojure.core.match/match [[:block 1]]- clojure.test.check.properties/for-all [[:block 1]]- clojure.test.check.properties/for-all* [[:block 1]]- clojure.test.check/quick-check [[:block 1]]- clojure.tools.macro/macrolet [[:block 1] [:inner 2 0]]- clojurewerkz.quartzite.jobs/build [[:default]]- clojurewerkz.quartzite.jobs/with-description [[:default]]- clojurewerkz.quartzite.jobs/with-identity [[:default]]- clojurewerkz.quartzite.schedule.cron/schedule [[:default]]- clojurewerkz.quartzite.schedule.cron/with-misfire-handling-instruction-do-nothing [[:default]]- clojurewerkz.quartzite.triggers/build [[:default]]- clojurewerkz.quartzite.triggers/with-description [[:default]]- clojurewerkz.quartzite.triggers/with-identity [[:default]]- clojurewerkz.quartzite.triggers/with-priority [[:default]]- clojurewerkz.quartzite.triggers/with-schedule [[:default]]- def-map-type [[:block 2] [:inner 1]]- defprotocol+ [[:block 1] [:inner 1]]- defrecord+ [[:block 2] [:inner 1]]- deftype+ [[:block 2] [:inner 1]]- net.cgrand.macrovich/case [[:block 0]]- potemkin.namespaces/import-vars [[:default]]- potemkin.types/def-map-type [[:block 2] [:inner 1]]- potemkin.types/defprotocol+ [[:block 1] [:inner 1]]- potemkin.types/defrecord+ [[:block 2] [:inner 1]]- potemkin.types/deftype+ [[:block 2] [:inner 1]]- potemkin/def-map-type [[:block 2] [:inner 1]]- potemkin/defprotocol+ [[:block 1] [:inner 1]]- potemkin/defrecord+ [[:block 2] [:inner 1]]- potemkin/deftype+ [[:block 2] [:inner 1]]- potemkin/import-vars [[:default]]- taoensso.nippy/extend-freeze [[:inner 0]]- taoensso.nippy/extend-thaw [[:inner 0]]- throttle.core/with-throttling [[:block 1]]+ clojure.core.logic/fresh [[:block 1]]+ clojure.core.logic/matcha [[:block 1]]+ clojure.core.logic/run [[:block 2]]+ clojure.core.match/match [[:block 1]]+ clojure.test.check.properties/for-all [[:block 1]]+ clojure.test.check.properties/for-all* [[:block 1]]+ clojure.test.check/quick-check [[:block 1]]+ clojure.tools.macro/macrolet [[:block 1] [:inner 2 0]]+ clojurewerkz.quartzite.jobs/build [[:default]]+ clojurewerkz.quartzite.jobs/with-description [[:default]]+ clojurewerkz.quartzite.jobs/with-identity [[:default]]+ clojurewerkz.quartzite.schedule.cron/schedule [[:default]]+ clojurewerkz.quartzite.schedule.cron/with-misfire-handling-instruction-do-nothing [[:default]]+ clojurewerkz.quartzite.triggers/build [[:default]]+ clojurewerkz.quartzite.triggers/with-description [[:default]]+ clojurewerkz.quartzite.triggers/with-identity [[:default]]+ clojurewerkz.quartzite.triggers/with-priority [[:default]]+ clojurewerkz.quartzite.triggers/with-schedule [[:default]]+ def-map-type [[:block 2] [:inner 1]]+ defprotocol+ [[:block 1] [:inner 1]]+ defrecord+ [[:block 2] [:inner 1]]+ deftype+ [[:block 2] [:inner 1]]+ net.cgrand.macrovich/case [[:block 0]]+ potemkin.namespaces/import-vars [[:default]]+ potemkin.types/def-map-type [[:block 2] [:inner 1]]+ potemkin.types/defprotocol+ [[:block 1] [:inner 1]]+ potemkin.types/defrecord+ [[:block 2] [:inner 1]]+ potemkin.types/deftype+ [[:block 2] [:inner 1]]+ potemkin/def-map-type [[:block 2] [:inner 1]]+ potemkin/defprotocol+ [[:block 1] [:inner 1]]+ potemkin/defrecord+ [[:block 2] [:inner 1]]+ potemkin/deftype+ [[:block 2] [:inner 1]]+ potemkin/import-vars [[:default]]+ taoensso.nippy/extend-freeze [[:inner 0]]+ taoensso.nippy/extend-thaw [[:inner 0]]+ throttle.core/with-throttling [[:block 1]];; the rest of the stuff in this list is generated automatically based on `:style/indent` specs;; by running [[dev.generate-cljfmt-config/specs]]... use that code to update this list- metabase-enterprise.cache.config-test/with-temp-persist-models [[:block 1]]- metabase-enterprise.impersonation.util-test/with-impersonations! [[:inner 0]]- metabase-enterprise.sandbox.test-util/with-gtaps! [[:inner 0]]- metabase-enterprise.sandbox.test-util/with-gtaps-for-user! [[:inner 0]]- metabase-enterprise.sandbox.test-util/with-user-attributes [[:block 2]]- metabase-enterprise.serialization.test-util/with-dbs [[:inner 0]]- metabase-enterprise.serialization.test-util/with-random-dump-dir [[:block 1]]- metabase-enterprise.serialization.test-util/with-world [[:block 0]]- metabase-enterprise.sso.integrations.jwt-test/with-users-with-email-deleted [[:block 1]]- metabase-enterprise.test/with-gtaps! [[:inner 0]]- metabase-enterprise.test/with-gtaps-for-user! [[:inner 0]]- metabase-enterprise.test/with-user-attributes [[:block 2]]- metabase.actions.actions-test/with-actions-test-data-and-actions-permissively-enabled [[:block 0]]- metabase.actions.test-util/with-actions [[:block 1]]- metabase.actions.test-util/with-actions-disabled [[:block 0]]- metabase.actions.test-util/with-actions-enabled [[:block 0]]- metabase.actions.test-util/with-actions-test-data [[:inner 0]]- metabase.actions.test-util/with-actions-test-data-and-actions-enabled [[:block 0]]- metabase.actions.test-util/with-actions-test-data-tables [[:block 1]]- metabase.actions.test-util/with-empty-db [[:inner 0]]- metabase.actions.test-util/with-temp-test-data [[:inner 0]]- metabase.api.common/check [[:default]]- metabase.api.common/define-routes [[:block 0]]- metabase.api.common/let-404 [[:block 1]]- metabase.app-db.core/with-application-db [[:inner 0]]- metabase.app-db.liquibase/with-liquibase [[:block 1]]- metabase.app-db.liquibase/with-scope-locked [[:block 1]]- metabase.app-db.schema-migrations-test.impl/test-migrations [[:block 2]]- metabase.cmd.copy/step [[:block 1]]- metabase.cmd.copy/with-connection-rollback-only [[:block 1]]- metabase.cmd.copy/with-disabled-db-constraints [[:block 2]]- metabase.collections.api-test/with-collection-hierarchy [[:block 1]]- metabase.collections.api-test/with-french-user-and-personal-collection [[:block 2]]- metabase.collections.api-test/with-some-children-of-collection [[:block 1]]- metabase.collections.models.collection-test/with-collection-hierarchy [[:block 1]]- metabase.collections.models.collection-test/with-current-user-perms-for-collections [[:block 1]]- metabase.collections.models.collection-test/with-personal-and-impersonal-collections [[:block 1]]- metabase.config/build-type-case [[:block 0]]- metabase.dashboards.models.dashboard-test/with-dash-in-collection [[:inner 0]]- metabase.driver-api.core/match [[:inner 0]]- metabase.driver-api.core/match-one [[:inner 0]]- metabase.driver-api.core/replace [[:inner 0]]- metabase.driver-api.core/replace-in [[:inner 0]]- metabase.driver.bigquery-cloud-sdk.query-processor/with-temporal-type [[:default]]- metabase.driver.druid.client/DELETE [[:default]]- metabase.driver.druid.client/GET [[:default]]- metabase.driver.druid.client/POST [[:default]]- metabase.driver.druid.query-processor-test/druid-query [[:block 0]]- metabase.driver.druid.query-processor-test/druid-query-returning-rows [[:block 0]]- metabase.driver.mongo.query-processor/mongo-let [[:block 1]]- metabase.driver.sql-jdbc.actions/with-jdbc-transaction [[:block 1]]- metabase.driver.sql-jdbc.connection/with-connection-spec-for-testing-connection [[:block 1]]- metabase.driver.sql-jdbc.execute.diagnostic/capturing-diagnostic-info [[:block 1]]- metabase.driver.sql.query-processor/apply-top-level-clause [[:default]]- metabase.driver/with-driver [[:block 1]]- metabase.embedding.api.embed-test/do-response-formats [[:block 1]]- metabase.embedding.api.embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]- metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-card-referencing [[:block 3]]- metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing [[:block 3]]- metabase.embedding.api.embed-test/with-new-secret-key [[:block 0]]- metabase.embedding.api.embed-test/with-temp-card [[:block 1]]- metabase.embedding.api.embed-test/with-temp-dashcard [[:block 1]]- metabase.embedding.api.preview-embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]- metabase.embedding.api.preview-embed-test/with-new-secret-key [[:block 0]]- metabase.lib.binning/with-binning [[:default]]- metabase.lib.core/with-binning [[:default]]- metabase.lib.core/with-join-alias [[:default]]- metabase.lib.core/with-join-conditions [[:default]]- metabase.lib.join/with-join-alias [[:default]]- metabase.lib.join/with-join-conditions [[:default]]- metabase.lib.test-util.macros/$ids [[:inner 0]]- metabase.lib.test-util.macros/mbql-5-query [[:inner 0]]- metabase.lib.test-util.macros/mbql-query [[:inner 0]]- metabase.lib.util.match/match [[:inner 0]]- metabase.lib.util.match/match-one [[:inner 0]]- metabase.lib.util.match/match-lite [[:inner 0]]- metabase.lib.util.match/match-lite-recursive [[:inner 0]]- metabase.lib.util.match/replace [[:inner 0]]- metabase.lib.util.match/replace-in [[:inner 0]]- metabase.models.interface/define-batched-hydration-method [[:inner 0]]- metabase.models.interface/define-simple-hydration-method [[:inner 0]]- metabase.parameters.chain-filter-test/with-clean-field-values-for-field [[:block 1]]- metabase.parameters.chain-filter-test/with-fk-field-to-field-remapping! [[:block 0]]- metabase.parameters.chain-filter-test/with-human-readable-values-remapping! [[:block 0]]- metabase.permissions.core/allow-changing-all-users-group-members [[:block 0]]- metabase.permissions.core/disable-perms-cache [[:block 0]]- metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing [[:block 3]]- metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing [[:block 3]]- metabase.public-sharing.api-test/with-temp-public-card [[:block 1]]- metabase.public-sharing.api-test/with-temp-public-dashboard [[:block 1]]- metabase.public-sharing.api-test/with-temp-public-dashboard-and-card [[:block 1]]- metabase.pulse.api.alert-test/with-alert-in-collection [[:block 1]]- metabase.pulse.dashboard-subscription-test/with-link-card-fixture-for-dashboard [[:block 2]]- metabase.pulse.models.pulse-test/with-dashboard-subscription-in-collection [[:block 1]]- metabase.pulse.models.pulse-test/with-pulse-in-collection [[:inner 0]]- metabase.queries.api.card-test/with-cards-in-readable-collection [[:block 1]]- metabase.queries.api.card-test/with-cards-in-writeable-collection [[:block 1]]- metabase.queries.api.card-test/with-ordered-items [[:inner 0]]- metabase.queries.api.card-test/with-temp-native-card [[:block 1]]- metabase.queries.api.card-test/with-temp-native-card-with-params [[:block 1]]- metabase.query-processor-test.pipeline-queries-test/pmbql-query [[:block 1]]- metabase.query-processor-test.pipeline-queries-test/run-pmbql-query [[:block 1]]- metabase.query-processor.debug/debug> [[:block 0]]- metabase.query-processor.error-type/deferror [[:block 1]]- metabase.query-processor.middleware.cache-backend.interface/with-cached-results [[:block 4]]- metabase.query-processor.middleware.process-userland-query-test/with-query-execution [[:block 1]]- metabase.query-processor.store/cached [[:block 1]]- metabase.query-processor.store/with-metadata-provider [[:inner 0]]- metabase.query-processor.streaming/streaming-response [[:block 1]]- metabase.query-processor.test-util/format-rows-by [[:default]]- metabase.request.core/as-admin [[:block 0]]- metabase.request.core/with-current-request [[:inner 0]]- metabase.request.core/with-current-user [[:inner 0]]- metabase.request.core/with-limit-and-offset [[:inner 0]]- metabase.request.session/as-admin [[:block 0]]- metabase.request.session/with-current-user [[:inner 0]]- metabase.sample-data.impl-test/with-temp-sample-database-db [[:block 1]]- metabase.search.api-test/do-test-users [[:block 1]]- metabase.server.middleware.session/as-admin [[:block 0]]- metabase.server.middleware.session/with-current-user [[:inner 0]]- metabase.server.streaming-response-test/with-streaming-response-thread-pool [[:block 0]]- metabase.server.streaming-response-test/with-test-driver-db! [[:block 0]]- metabase.server.streaming-response/streaming-response [[:block 2]]- metabase.session.api/http-401-on-error [[:block 0]]- metabase.settings.core/define-multi-setting [[:inner 0]]- metabase.settings.core/defsetting [[:block 1]]- metabase.settings.models.setting.multi-setting/define-multi-setting [[:inner 0]]- metabase.settings.models.setting/defsetting [[:block 1]]- metabase.sync.fetch-metadata/log-if-error [[:block 1]]- metabase.sync.sync-metadata.fields-test/with-test-db [[:block 0]]- metabase.sync.util/do-with-start-and-finish-debug-logging [[:default]]- metabase.sync.util/sum-for [[:block 1]]- metabase.sync.util/sync-operation [[:block 3]]- metabase.sync.util/with-db-logging-disabled [[:default]]- metabase.sync.util/with-duplicate-ops-prevented [[:default]]- metabase.sync.util/with-emoji-progress-bar [[:block 1]]- metabase.sync.util/with-error-handling [[:block 1]]- metabase.sync.util/with-start-and-finish-logging [[:default]]- metabase.sync.util/with-start-and-finish-logging* [[:default]]- metabase.sync.util/with-sync-events [[:default]]- metabase.task-history.models.task-history/with-task-history [[:block 1]]- metabase.task.core/rerun-on-error [[:block 1]]- metabase.task.impl/rerun-on-error [[:block 1]]- metabase.test.data.datasets/test-driver [[:inner 0]]- metabase.test.data.datasets/test-drivers [[:inner 0]]- metabase.test.data.one-off-dbs/with-blank-db [[:block 0]]- metabase.test.data.one-off-dbs/with-blueberries-db [[:block 0]]- metabase.test.data.users/with-test-user [[:inner 0]]- metabase.test.data/$ids [[:inner 0]]- metabase.test.data/dataset [[:inner 0]]- metabase.test.data/mbql-query [[:inner 0]]- metabase.test.data/query [[:block 1]]- metabase.test.data/run-mbql-query [[:inner 0]]- metabase.test.data/with-empty-h2-app-db! [[:block 0]]- metabase.test.data/with-temp-copy-of-db [[:block 0]]- metabase.test.util.public-settings/with-additional-premium-features [[:block 1]]- metabase.test.util.public-settings/with-premium-features [[:block 1]]- metabase.test.util.thread-local/test-helpers-set-global-values! [[:block 0]]- metabase.test.util/discard-setting-changes [[:block 1]]- metabase.test.util/let-url [[:block 1]]- metabase.test.util/throw-if-called! [[:block 1]]- metabase.test.util/with-temp-scheduler [[:block 0]]- metabase.test.util/with-temp-vals-in-db [[:block 3]]- metabase.test.util/with-user-in-groups [[:inner 0]]- metabase.test/$ids [[:inner 0]]- metabase.test/as-admin [[:inner 0]]- metabase.test/dataset [[:inner 0]]- metabase.test/discard-setting-changes [[:block 1]]- metabase.test/format-rows-by [[:default]]- metabase.test/let-url [[:block 1]]- metabase.test/mbql-query [[:inner 0]]- metabase.test/query [[:block 1]]- metabase.test/run-mbql-query [[:inner 0]]- metabase.test/test-driver [[:inner 0]]- metabase.test/test-drivers [[:inner 0]]- metabase.test/test-helpers-set-global-values! [[:block 0]]- metabase.test/throw-if-called! [[:block 1]]- metabase.test/with-actions [[:block 1]]- metabase.test/with-actions-disabled [[:block 0]]- metabase.test/with-actions-enabled [[:block 0]]- metabase.test/with-actions-test-data [[:inner 0]]- metabase.test/with-actions-test-data-and-actions-enabled [[:block 0]]- metabase.test/with-actions-test-data-tables [[:block 1]]- metabase.test/with-additional-premium-features [[:block 1]]- metabase.test/with-current-user [[:inner 0]]- metabase.test/with-driver [[:block 1]]- metabase.test/with-empty-db [[:inner 0]]- metabase.test/with-empty-h2-app-db! [[:block 0]]- metabase.test/with-metadata-provider [[:inner 0]]- metabase.test/with-premium-features [[:block 1]]- metabase.test/with-temp [[:inner 0]]- metabase.test/with-temp-copy-of-db [[:block 0]]- metabase.test/with-temp-scheduler [[:block 0]]- metabase.test/with-temp-test-data [[:inner 0]]- metabase.test/with-temp-vals-in-db [[:block 3]]- metabase.test/with-test-user [[:inner 0]]- metabase.test/with-user-in-groups [[:inner 0]]- metabase.timeseries-query-processor-test.util/test-timeseries-drivers [[:block 0]]- metabase.timeseries-query-processor-test/run-mbql-query [[:inner 0]]- metabase.upload.impl-test/with-upload-table! [[:inner 0]]- metabase.upload.types/with-currency [[:default]]- metabase.upload.types/with-parens [[:default]]- metabase.util/for-map [[:block 1]]- metabase.util.async/cancelable-thread [[:block 0]]- metabase.util.date-2/with-time-zone-same-instant [[:default]]- metabase.util.encryption-test/with-secret-key [[:block 1]]- metabase.util.honey-sql-2/with-database-type-info [[:default]]- metabase.util.i18n/deferred-trs [[:default]]- metabase.util.i18n/deferred-tru [[:default]]- metabase.util.i18n/trs [[:default]]- metabase.util.i18n/trsn [[:default]]- metabase.util.i18n/tru [[:default]]- metabase.util.i18n/trun [[:default]]- metabase.util.jvm/auto-retry [[:block 1]]- metabase.util.jvm/varargs [[:block 1]]- metabase.util.jvm/with-us-locale [[:block 0]]- metabase.util.malli/disable-enforcement [[:block 0]]- metabase.util.malli/with [[:default]]- metabase.util.malli/with-api-error-message [[:default]]- metabase.util.namespaces/import-fns [[:default]]- metabase.util.queue-test/await-test-while [[:block 1]]- metabase.util/auto-retry [[:block 1]]- metabase.util/case-enum [[:block 1]]- metabase.util/ignore-exceptions [[:block 0]]- metabase.util/or-with [[:block 1]]- metabase.util/profile [[:block 1]]- metabase.util/prog1 [[:inner 0]]- metabase.util/varargs [[:inner 0]]- metabase.util/with-us-locale [[:block 0]]- metabuild-common.core/exit-when-finished-nonzero-on-exception [[:block 0]]- metabuild-common.core/step [[:block 1]]- metabuild-common.entrypoint/exit-when-finished-nonzero-on-exception [[:block 0]]- metabuild-common.steps/step [[:block 1]]- methodical.core/defmethod [[:inner 0]]- methodical.core/defmulti [[:inner 0]]- methodical.core/with-dispatcher [[:default]]- methodical.core/with-method-table [[:default]]- methodical.core/with-prefers [[:default]]- methodical.interface/with-dispatcher [[:default]]- methodical.interface/with-method-table [[:default]]- methodical.interface/with-prefers [[:default]]- methodical.macros/defmethod [[:inner 0]]- methodical.macros/defmulti [[:inner 0]]- saml20-clj.sp.response/validate-confirmation-datas [[:block 1]]- toucan2.connection/with-transaction [[:block 1]]- toucan2.core/build [[:block 0]]- toucan2.core/compile [[:block 0]]- toucan2.core/debug [[:block 0]]- toucan2.core/define-after-insert [[:inner 0]]- toucan2.core/define-after-select [[:inner 0]]- toucan2.core/define-after-update [[:inner 0]]- toucan2.core/define-before-delete [[:inner 0]]- toucan2.core/define-before-insert [[:inner 0]]- toucan2.core/define-before-select [[:inner 0]]- toucan2.core/define-default-fields [[:inner 0]]- toucan2.core/define-named-query [[:block 1]]- toucan2.core/deftransforms [[:block 1]]- toucan2.core/with-transaction [[:block 1]]- toucan2.tools.after-insert/define-after-insert [[:inner 0]]- toucan2.tools.after-select/define-after-select [[:inner 0]]- toucan2.tools.after-update/define-after-update [[:inner 0]]- toucan2.tools.after/define-after-impl [[:default]]- toucan2.tools.before-delete/define-before-delete [[:inner 0]]- toucan2.tools.before-insert/define-before-insert [[:inner 0]]- toucan2.tools.before-select/define-before-select [[:inner 0]]- toucan2.tools.compile/build [[:block 0]]- toucan2.tools.compile/compile [[:block 0]]- toucan2.tools.compile/resolved [[:block 0]]- toucan2.tools.debug/debug [[:block 0]]- toucan2.tools.default-fields/define-default-fields [[:inner 0]]- toucan2.tools.named-query/define-named-query [[:block 1]]- toucan2.tools.simple-out-transform/define-out-transform [[:inner 0]]- toucan2.tools.transformed/deftransforms [[:block 1]]- toucan2.tools.with-temp/with-temp [[:inner 0]]- toucan2.util/try-with-error-context [[:inner 0]]}}+ metabase-enterprise.cache.config-test/with-temp-persist-models [[:block 1]]+ metabase-enterprise.impersonation.util-test/with-impersonations! [[:inner 0]]+ metabase-enterprise.sandbox.test-util/with-gtaps! [[:inner 0]]+ metabase-enterprise.sandbox.test-util/with-gtaps-for-user! [[:inner 0]]+ metabase-enterprise.sandbox.test-util/with-user-attributes [[:block 2]]+ metabase-enterprise.serialization.test-util/with-dbs [[:inner 0]]+ metabase-enterprise.serialization.test-util/with-random-dump-dir [[:block 1]]+ metabase-enterprise.serialization.test-util/with-world [[:block 0]]+ metabase-enterprise.sso.integrations.jwt-test/with-users-with-email-deleted [[:block 1]]+ metabase-enterprise.test/with-gtaps! [[:inner 0]]+ metabase-enterprise.test/with-gtaps-for-user! [[:inner 0]]+ metabase-enterprise.test/with-user-attributes [[:block 2]]+ metabase.actions.actions-test/with-actions-test-data-and-actions-permissively-enabled [[:block 0]]+ metabase.actions.test-util/with-actions [[:block 1]]+ metabase.actions.test-util/with-actions-disabled [[:block 0]]+ metabase.actions.test-util/with-actions-enabled [[:block 0]]+ metabase.actions.test-util/with-actions-test-data [[:inner 0]]+ metabase.actions.test-util/with-actions-test-data-and-actions-enabled [[:block 0]]+ metabase.actions.test-util/with-actions-test-data-tables [[:block 1]]+ metabase.actions.test-util/with-empty-db [[:inner 0]]+ metabase.actions.test-util/with-temp-test-data [[:inner 0]]+ metabase.api.common/check [[:default]]+ metabase.api.common/define-routes [[:block 0]]+ metabase.api.common/let-404 [[:block 1]]+ metabase.app-db.core/with-application-db [[:inner 0]]+ metabase.app-db.liquibase/with-liquibase [[:block 1]]+ metabase.app-db.liquibase/with-scope-locked [[:block 1]]+ metabase.app-db.schema-migrations-test.impl/test-migrations [[:block 2]]+ metabase.cmd.copy/step [[:block 1]]+ metabase.cmd.copy/with-connection-rollback-only [[:block 1]]+ metabase.cmd.copy/with-disabled-db-constraints [[:block 2]]+ metabase.collections-rest.api-test/with-collection-hierarchy [[:block 1]]+ metabase.collections-rest.api-test/with-french-user-and-personal-collection [[:block 2]]+ metabase.collections-rest.api-test/with-some-children-of-collection [[:block 1]]+ metabase.collections.models.collection-test/with-collection-hierarchy [[:block 1]]+ metabase.collections.models.collection-test/with-current-user-perms-for-collections [[:block 1]]+ metabase.collections.models.collection-test/with-personal-and-impersonal-collections [[:block 1]]+ metabase.config/build-type-case [[:block 0]]+ metabase.dashboards.models.dashboard-test/with-dash-in-collection [[:inner 0]]+ metabase.driver-api.core/match [[:inner 0]]+ metabase.driver-api.core/match-one [[:inner 0]]+ metabase.driver-api.core/replace [[:inner 0]]+ metabase.driver-api.core/replace-in [[:inner 0]]+ metabase.driver.bigquery-cloud-sdk.query-processor/with-temporal-type [[:default]]+ metabase.driver.druid.client/DELETE [[:default]]+ metabase.driver.druid.client/GET [[:default]]+ metabase.driver.druid.client/POST [[:default]]+ metabase.driver.druid.query-processor-test/druid-query [[:block 0]]+ metabase.driver.druid.query-processor-test/druid-query-returning-rows [[:block 0]]+ metabase.driver.mongo.query-processor/mongo-let [[:block 1]]+ metabase.driver.sql-jdbc.actions/with-jdbc-transaction [[:block 1]]+ metabase.driver.sql-jdbc.connection/with-connection-spec-for-testing-connection [[:block 1]]+ metabase.driver.sql-jdbc.execute.diagnostic/capturing-diagnostic-info [[:block 1]]+ metabase.driver.sql.query-processor/apply-top-level-clause [[:default]]+ metabase.driver/with-driver [[:block 1]]+ metabase.embedding-rest.api.embed-test/do-response-formats [[:block 1]]+ metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]+ metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-card-referencing [[:block 3]]+ metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing [[:block 3]]+ metabase.embedding-rest.api.embed-test/with-new-secret-key [[:block 0]]+ metabase.embedding-rest.api.embed-test/with-temp-card [[:block 1]]+ metabase.embedding-rest.api.embed-test/with-temp-dashcard [[:block 1]]+ metabase.embedding-rest.api.preview-embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]+ metabase.embedding-rest.api.preview-embed-test/with-new-secret-key [[:block 0]]+ metabase.lib.binning/with-binning [[:default]]+ metabase.lib.core/with-binning [[:default]]+ metabase.lib.core/with-join-alias [[:default]]+ metabase.lib.core/with-join-conditions [[:default]]+ metabase.lib.join/with-join-alias [[:default]]+ metabase.lib.join/with-join-conditions [[:default]]+ metabase.lib.test-util.macros/$ids [[:inner 0]]+ metabase.lib.test-util.macros/mbql-5-query [[:inner 0]]+ metabase.lib.test-util.macros/mbql-query [[:inner 0]]+ metabase.lib.util.match/match [[:inner 0]]+ metabase.lib.util.match/match-one [[:inner 0]]+ metabase.lib.util.match/match-lite [[:inner 0]]+ metabase.lib.util.match/match-lite-recursive [[:inner 0]]+ metabase.lib.util.match/replace [[:inner 0]]+ metabase.lib.util.match/replace-in [[:inner 0]]+ metabase.models.interface/define-batched-hydration-method [[:inner 0]]+ metabase.models.interface/define-simple-hydration-method [[:inner 0]]+ metabase.parameters.chain-filter-test/with-clean-field-values-for-field [[:block 1]]+ metabase.parameters.chain-filter-test/with-fk-field-to-field-remapping! [[:block 0]]+ metabase.parameters.chain-filter-test/with-human-readable-values-remapping! [[:block 0]]+ metabase.permissions.core/allow-changing-all-users-group-members [[:block 0]]+ metabase.permissions.core/disable-perms-cache [[:block 0]]+ metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-card-referencing [[:block 3]]+ metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-dashcard-referencing [[:block 3]]+ metabase.public-sharing-rest.api-test/with-temp-public-card [[:block 1]]+ metabase.public-sharing-rest.api-test/with-temp-public-dashboard [[:block 1]]+ metabase.public-sharing-rest.api-test/with-temp-public-dashboard-and-card [[:block 1]]+ metabase.pulse.api.alert-test/with-alert-in-collection [[:block 1]]+ metabase.pulse.dashboard-subscription-test/with-link-card-fixture-for-dashboard [[:block 2]]+ metabase.pulse.models.pulse-test/with-dashboard-subscription-in-collection [[:block 1]]+ metabase.pulse.models.pulse-test/with-pulse-in-collection [[:inner 0]]+ metabase.queries.api.card-test/with-cards-in-readable-collection [[:block 1]]+ metabase.queries.api.card-test/with-cards-in-writeable-collection [[:block 1]]+ metabase.queries.api.card-test/with-ordered-items [[:inner 0]]+ metabase.queries.api.card-test/with-temp-native-card [[:block 1]]+ metabase.queries.api.card-test/with-temp-native-card-with-params [[:block 1]]+ metabase.query-processor-test.pipeline-queries-test/pmbql-query [[:block 1]]+ metabase.query-processor-test.pipeline-queries-test/run-pmbql-query [[:block 1]]+ metabase.query-processor.debug/debug> [[:block 0]]+ metabase.query-processor.error-type/deferror [[:block 1]]+ metabase.query-processor.middleware.cache-backend.interface/with-cached-results [[:block 4]]+ metabase.query-processor.middleware.process-userland-query-test/with-query-execution [[:block 1]]+ metabase.query-processor.store/cached [[:block 1]]+ metabase.query-processor.store/with-metadata-provider [[:inner 0]]+ metabase.query-processor.streaming/streaming-response [[:block 1]]+ metabase.query-processor.test-util/format-rows-by [[:default]]+ metabase.request.core/as-admin [[:block 0]]+ metabase.request.core/with-current-request [[:inner 0]]+ metabase.request.core/with-current-user [[:inner 0]]+ metabase.request.core/with-limit-and-offset [[:inner 0]]+ metabase.request.session/as-admin [[:block 0]]+ metabase.request.session/with-current-user [[:inner 0]]+ metabase.sample-data.impl-test/with-temp-sample-database-db [[:block 1]]+ metabase.search.api-test/do-test-users [[:block 1]]+ metabase.server.middleware.session/as-admin [[:block 0]]+ metabase.server.middleware.session/with-current-user [[:inner 0]]+ metabase.server.streaming-response-test/with-streaming-response-thread-pool [[:block 0]]+ metabase.server.streaming-response-test/with-test-driver-db! [[:block 0]]+ metabase.server.streaming-response/streaming-response [[:block 2]]+ metabase.session.api/http-401-on-error [[:block 0]]+ metabase.settings.core/define-multi-setting [[:inner 0]]+ metabase.settings.core/defsetting [[:block 1]]+ metabase.settings.models.setting.multi-setting/define-multi-setting [[:inner 0]]+ metabase.settings.models.setting/defsetting [[:block 1]]+ metabase.sync.fetch-metadata/log-if-error [[:block 1]]+ metabase.sync.sync-metadata.fields-test/with-test-db [[:block 0]]+ metabase.sync.util/do-with-start-and-finish-debug-logging [[:default]]+ metabase.sync.util/sum-for [[:block 1]]+ metabase.sync.util/sync-operation [[:block 3]]+ metabase.sync.util/with-db-logging-disabled [[:default]]+ metabase.sync.util/with-duplicate-ops-prevented [[:default]]+ metabase.sync.util/with-emoji-progress-bar [[:block 1]]+ metabase.sync.util/with-error-handling [[:block 1]]+ metabase.sync.util/with-start-and-finish-logging [[:default]]+ metabase.sync.util/with-start-and-finish-logging* [[:default]]+ metabase.sync.util/with-sync-events [[:default]]+ metabase.task-history.models.task-history/with-task-history [[:block 1]]+ metabase.task.core/rerun-on-error [[:block 1]]+ metabase.task.impl/rerun-on-error [[:block 1]]+ metabase.test.data.datasets/test-driver [[:inner 0]]+ metabase.test.data.datasets/test-drivers [[:inner 0]]+ metabase.test.data.one-off-dbs/with-blank-db [[:block 0]]+ metabase.test.data.one-off-dbs/with-blueberries-db [[:block 0]]+ metabase.test.data.users/with-test-user [[:inner 0]]+ metabase.test.data/$ids [[:inner 0]]+ metabase.test.data/dataset [[:inner 0]]+ metabase.test.data/mbql-query [[:inner 0]]+ metabase.test.data/query [[:block 1]]+ metabase.test.data/run-mbql-query [[:inner 0]]+ metabase.test.data/with-empty-h2-app-db! [[:block 0]]+ metabase.test.data/with-temp-copy-of-db [[:block 0]]+ metabase.test.util.public-settings/with-additional-premium-features [[:block 1]]+ metabase.test.util.public-settings/with-premium-features [[:block 1]]+ metabase.test.util.thread-local/test-helpers-set-global-values! [[:block 0]]+ metabase.test.util/discard-setting-changes [[:block 1]]+ metabase.test.util/let-url [[:block 1]]+ metabase.test.util/throw-if-called! [[:block 1]]+ metabase.test.util/with-temp-scheduler [[:block 0]]+ metabase.test.util/with-temp-vals-in-db [[:block 3]]+ metabase.test.util/with-user-in-groups [[:inner 0]]+ metabase.test/$ids [[:inner 0]]+ metabase.test/as-admin [[:inner 0]]+ metabase.test/dataset [[:inner 0]]+ metabase.test/discard-setting-changes [[:block 1]]+ metabase.test/format-rows-by [[:default]]+ metabase.test/let-url [[:block 1]]+ metabase.test/mbql-query [[:inner 0]]+ metabase.test/query [[:block 1]]+ metabase.test/run-mbql-query [[:inner 0]]+ metabase.test/test-driver [[:inner 0]]+ metabase.test/test-drivers [[:inner 0]]+ metabase.test/test-helpers-set-global-values! [[:block 0]]+ metabase.test/throw-if-called! [[:block 1]]+ metabase.test/with-actions [[:block 1]]+ metabase.test/with-actions-disabled [[:block 0]]+ metabase.test/with-actions-enabled [[:block 0]]+ metabase.test/with-actions-test-data [[:inner 0]]+ metabase.test/with-actions-test-data-and-actions-enabled [[:block 0]]+ metabase.test/with-actions-test-data-tables [[:block 1]]+ metabase.test/with-additional-premium-features [[:block 1]]+ metabase.test/with-current-user [[:inner 0]]+ metabase.test/with-driver [[:block 1]]+ metabase.test/with-empty-db [[:inner 0]]+ metabase.test/with-empty-h2-app-db! [[:block 0]]+ metabase.test/with-metadata-provider [[:inner 0]]+ metabase.test/with-premium-features [[:block 1]]+ metabase.test/with-temp [[:inner 0]]+ metabase.test/with-temp-copy-of-db [[:block 0]]+ metabase.test/with-temp-scheduler [[:block 0]]+ metabase.test/with-temp-test-data [[:inner 0]]+ metabase.test/with-temp-vals-in-db [[:block 3]]+ metabase.test/with-test-user [[:inner 0]]+ metabase.test/with-user-in-groups [[:inner 0]]+ metabase.timeseries-query-processor-test.util/test-timeseries-drivers [[:block 0]]+ metabase.timeseries-query-processor-test/run-mbql-query [[:inner 0]]+ metabase.upload.impl-test/with-upload-table! [[:inner 0]]+ metabase.upload.types/with-currency [[:default]]+ metabase.upload.types/with-parens [[:default]]+ metabase.util/for-map [[:block 1]]+ metabase.util.async/cancelable-thread [[:block 0]]+ metabase.util.date-2/with-time-zone-same-instant [[:default]]+ metabase.util.encryption-test/with-secret-key [[:block 1]]+ metabase.util.honey-sql-2/with-database-type-info [[:default]]+ metabase.util.i18n/deferred-trs [[:default]]+ metabase.util.i18n/deferred-tru [[:default]]+ metabase.util.i18n/trs [[:default]]+ metabase.util.i18n/trsn [[:default]]+ metabase.util.i18n/tru [[:default]]+ metabase.util.i18n/trun [[:default]]+ metabase.util.jvm/auto-retry [[:block 1]]+ metabase.util.jvm/varargs [[:block 1]]+ metabase.util.jvm/with-us-locale [[:block 0]]+ metabase.util.malli/disable-enforcement [[:block 0]]+ metabase.util.malli/with [[:default]]+ metabase.util.malli/with-api-error-message [[:default]]+ metabase.util.namespaces/import-fns [[:default]]+ metabase.util.queue-test/await-test-while [[:block 1]]+ metabase.util/auto-retry [[:block 1]]+ metabase.util/case-enum [[:block 1]]+ metabase.util/ignore-exceptions [[:block 0]]+ metabase.util/or-with [[:block 1]]+ metabase.util/profile [[:block 1]]+ metabase.util/prog1 [[:inner 0]]+ metabase.util/varargs [[:inner 0]]+ metabase.util/with-us-locale [[:block 0]]+ metabuild-common.core/exit-when-finished-nonzero-on-exception [[:block 0]]+ metabuild-common.core/step [[:block 1]]+ metabuild-common.entrypoint/exit-when-finished-nonzero-on-exception [[:block 0]]+ metabuild-common.steps/step [[:block 1]]+ methodical.core/defmethod [[:inner 0]]+ methodical.core/defmulti [[:inner 0]]+ methodical.core/with-dispatcher [[:default]]+ methodical.core/with-method-table [[:default]]+ methodical.core/with-prefers [[:default]]+ methodical.interface/with-dispatcher [[:default]]+ methodical.interface/with-method-table [[:default]]+ methodical.interface/with-prefers [[:default]]+ methodical.macros/defmethod [[:inner 0]]+ methodical.macros/defmulti [[:inner 0]]+ saml20-clj.sp.response/validate-confirmation-datas [[:block 1]]+ toucan2.connection/with-transaction [[:block 1]]+ toucan2.core/build [[:block 0]]+ toucan2.core/compile [[:block 0]]+ toucan2.core/debug [[:block 0]]+ toucan2.core/define-after-insert [[:inner 0]]+ toucan2.core/define-after-select [[:inner 0]]+ toucan2.core/define-after-update [[:inner 0]]+ toucan2.core/define-before-delete [[:inner 0]]+ toucan2.core/define-before-insert [[:inner 0]]+ toucan2.core/define-before-select [[:inner 0]]+ toucan2.core/define-default-fields [[:inner 0]]+ toucan2.core/define-named-query [[:block 1]]+ toucan2.core/deftransforms [[:block 1]]+ toucan2.core/with-transaction [[:block 1]]+ toucan2.tools.after-insert/define-after-insert [[:inner 0]]+ toucan2.tools.after-select/define-after-select [[:inner 0]]+ toucan2.tools.after-update/define-after-update [[:inner 0]]+ toucan2.tools.after/define-after-impl [[:default]]+ toucan2.tools.before-delete/define-before-delete [[:inner 0]]+ toucan2.tools.before-insert/define-before-insert [[:inner 0]]+ toucan2.tools.before-select/define-before-select [[:inner 0]]+ toucan2.tools.compile/build [[:block 0]]+ toucan2.tools.compile/compile [[:block 0]]+ toucan2.tools.compile/resolved [[:block 0]]+ toucan2.tools.debug/debug [[:block 0]]+ toucan2.tools.default-fields/define-default-fields [[:inner 0]]+ toucan2.tools.named-query/define-named-query [[:block 1]]+ toucan2.tools.simple-out-transform/define-out-transform [[:inner 0]]+ toucan2.tools.transformed/deftransforms [[:block 1]]+ toucan2.tools.with-temp/with-temp [[:inner 0]]+ toucan2.util/try-with-error-context [[:inner 0]]}}diff --git a/CLAUDE.md b/CLAUDE.mdindex d1297c45615..b57dfeffe20 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -459,7 +459,7 @@ Review pull requests with a focus on:- An OSS follows the pattern `metabase.<module>.*` (for the Clojure namespace) and `src/metabase/<module>/**`(for thesource files) with tests inside the corresponding `test/metabase/<module>/` directory, e.g. the `dashboards` moduleis everything inside `src/metabase/dashboards/` and `test/metabase/dashboards/`; it might have a- `metabase.dashboards.api` namespace that corresponds to the file `src/metabase/dashboards/api.clj`.+ `metabase.dashboards-rest.api` namespace that corresponds to the file `src/metabase/dashboards/api.clj`.- An EE module follows the pattern `metabase-enterprise.<module>.*` (for the Clojure namespaces) and`enterprise/backend/src/metabase_enterprise/<module>/**` (for the source files). The module name uses thediff --git a/bin/build/test/i18n/create_artifacts/backend_test.clj b/bin/build/test/i18n/create_artifacts/backend_test.cljindex a42ae679a7e..4feca11108e 100644--- a/bin/build/test/i18n/create_artifacts/backend_test.clj+++ b/bin/build/test/i18n/create_artifacts/backend_test.clj@@ -44,7 +44,7 @@["target/classes/metabase/request/util.clj"] true;; Both a FE and a BE path["frontend/src/metabase/browse/components/TableBrowser/TableBrowser.jsx:145"- "metabase/warehouses/api.clj:178"] true+ "metabase/warehouses_rest/api.clj:178"] true;; FE-only paths["frontend/src/metabase/components/ActionButton.jsx:31"] false["frontend/src/metabase/entities/collections/forms.js:22"] falsediff --git a/dev/src/dev/deps_graph.clj b/dev/src/dev/deps_graph.cljindex 58e8e1c96d9..8a14af16898 100644--- a/dev/src/dev/deps_graph.clj+++ b/dev/src/dev/deps_graph.clj@@ -433,10 +433,10 @@ddiff/minimize)))(defn print-kondo-config-diff- "Print the diff between how the config would look if regenerated with [[generate-config]] versus how it looks in+ "Print the diff between how the config would look if regenerated with [[generate-config]] versus how it looks inreality ([[kondo-config]]). Use this to suggest updates to make to the config file."- []- (ddiff/pretty-print (kondo-config-diff)))+ []+ (ddiff/pretty-print (kondo-config-diff)))(comment(external-usages 'core)@@ -461,12 +461,12 @@([deps module](all-module-deps-paths deps module (sorted-map) (atom #{}) []))([deps module acc already-seen path]- (let [module-deps (module-dependencies deps module)- new-deps (remove @already-seen module-deps)- acc (into acc- (map (fn [dep]- [dep path]))- new-deps)]+ (let [module-deps (module-dependencies deps module)+ new-deps (remove @already-seen module-deps)+ acc (into acc+ (map (fn [dep]+ [dep path]))+ new-deps)](swap! already-seen into new-deps)(reduce(fn [acc new-dep]@@ -532,7 +532,46 @@affect `module`."[module](let [deps (dependencies)- all-modules (into (sorted-set) (map :module) deps)]- (set/difference- all-modules- (set (keys (all-module-deps-paths deps module))))))+ all-modules (into (sorted-set) (map :module) deps)+ module-deps (set (keys (all-module-deps-paths deps module)))]+ (printf "Module %s depends on %d/%d (%.1f%%) other modules.\n"+ module+ (count module-deps)+ (count all-modules)+ (double (* (/ (count module-deps) (count all-modules)) 100)))+ (flush)+ (set/difference all-modules module-deps)))++(defn- simulate-rename+ "Create a new version of `deps` as they would appear if you renamed namespace(s).++ (simulate-rename (dependencies) '{metabase.users.api metabase.users-rest.api})"+ ([deps old-namespace new-namespace]+ (for [dep deps]+ (-> dep+ (cond-> (= (:namespace dep) old-namespace)+ (assoc :namespace new-namespace))+ (update :deps (fn [deps]+ (for [dep deps]+ (if (= (:namespace dep) old-namespace)+ {:namespace new-namespace, :module (module new-namespace)}+ dep)))))))++ ([deps old-namespace->new-namespace]+ (reduce+ (fn [deps [old-namespace new-namespace]]+ (simulate-rename deps old-namespace new-namespace))+ deps+ old-namespace->new-namespace)))++(defn dependencies-eliminated-by-renaming-namespaces+ "Calculate the set of dependencies of `module` (both explicit and transient) that would be eliminated by renaming+ `old-namespaces->new-namespaces`.++ (dependencies-eliminated-by-renaming-namespaces 'users '{metabase.users.api metabase.users-rest.api})"+ [module old-namespace->new-namespace]+ (let [deps (dependencies)+ old-module-deps (into (sorted-set) (keys (all-module-deps-paths deps module)))+ new-deps (simulate-rename deps old-namespace->new-namespace)+ new-module-deps (into (sorted-set) (keys (all-module-deps-paths new-deps module)))]+ (set/difference old-module-deps new-module-deps)))diff --git a/e2e/support/helpers/api/createDashboard.ts b/e2e/support/helpers/api/createDashboard.tsindex 4498d26a970..955e46040a8 100644--- a/e2e/support/helpers/api/createDashboard.ts+++ b/e2e/support/helpers/api/createDashboard.ts@@ -41,7 +41,7 @@ export const createDashboard = (cy.log(`Create a dashboard: ${name}`);- // For all the possible keys, refer to `src/metabase/dashboards/api.clj`+ // For all the possible keys, refer to `src/metabase/dashboards_rest/api.clj`return cy.request<Dashboard>("POST", "/api/dashboard", {name,diff --git a/enterprise/backend/src/metabase_enterprise/audit_app/api/user.clj b/enterprise/backend/src/metabase_enterprise/audit_app/api/user.cljindex 7007669e0ae..74160e8f522 100644--- a/enterprise/backend/src/metabase_enterprise/audit_app/api/user.clj+++ b/enterprise/backend/src/metabase_enterprise/audit_app/api/user.clj@@ -6,7 +6,7 @@[metabase.api.macros :as api.macros][metabase.audit-app.core :as audit][metabase.models.interface :as mi]- [metabase.users.api :as api.user]+ [metabase.users-rest.api :as api.user][metabase.util :as u][metabase.util.malli.schema :as ms][toucan2.core :as t2]))diff --git a/enterprise/backend/src/metabase_enterprise/comments/api.clj b/enterprise/backend/src/metabase_enterprise/comments/api.cljindex 65cb36e6fba..1bbbd8b65ef 100644--- a/enterprise/backend/src/metabase_enterprise/comments/api.clj+++ b/enterprise/backend/src/metabase_enterprise/comments/api.clj@@ -11,7 +11,7 @@[metabase.channel.render.core :as channel.render][metabase.events.core :as events][metabase.request.core :as request]- [metabase.users.api :as api.user]+ [metabase.users-rest.api :as api.user][metabase.users.models.user :as user][metabase.util :as u][metabase.util.i18n :refer [deferred-tru]]diff --git a/enterprise/backend/src/metabase_enterprise/database_routing/api.clj b/enterprise/backend/src/metabase_enterprise/database_routing/api.cljindex f69dbe0c0a9..dbea32600c1 100644--- a/enterprise/backend/src/metabase_enterprise/database_routing/api.clj+++ b/enterprise/backend/src/metabase_enterprise/database_routing/api.clj@@ -8,7 +8,7 @@[metabase.settings.core :as setting][metabase.util :as u][metabase.util.malli.schema :as ms]- [metabase.warehouses.api :as api.database]+ [metabase.warehouses-rest.api :as api.database][toucan2.core :as t2]));; TODO (Cam 10/28/25) -- fix this endpoint so it uses kebab-case for query parameters for consistency with the restdiff --git a/enterprise/backend/src/metabase_enterprise/metabot_v3/api/document.clj b/enterprise/backend/src/metabase_enterprise/metabot_v3/api/document.cljindex c4b88898d57..4c79698c8aa 100644--- a/enterprise/backend/src/metabase_enterprise/metabot_v3/api/document.clj+++ b/enterprise/backend/src/metabase_enterprise/metabot_v3/api/document.clj@@ -10,7 +10,7 @@[metabase.query-processor :as qp][metabase.util.malli.schema :as ms][metabase.util.retry :as retry]- [metabase.warehouses.api :as warehouses]))+ [metabase.warehouses-rest.api :as warehouses]))(set! *warn-on-reflection* true)diff --git a/enterprise/backend/src/metabase_enterprise/metabot_v3/tools/invite_user.clj b/enterprise/backend/src/metabase_enterprise/metabot_v3/tools/invite_user.cljindex a483de97b7f..4404aaacb78 100644--- a/enterprise/backend/src/metabase_enterprise/metabot_v3/tools/invite_user.clj+++ b/enterprise/backend/src/metabase_enterprise/metabot_v3/tools/invite_user.clj@@ -1,6 +1,6 @@(ns metabase-enterprise.metabot-v3.tools.invite-user(:require- [metabase.users.api :as api.user]))+ [metabase.users-rest.api :as api.user]))(defn invite-user"Send a Metabase invitation to the address `email`."diff --git a/enterprise/backend/src/metabase_enterprise/public_sharing/api.clj b/enterprise/backend/src/metabase_enterprise/public_sharing/api.cljindex 1c1c74f74b7..efb99c33e0c 100644--- a/enterprise/backend/src/metabase_enterprise/public_sharing/api.clj+++ b/enterprise/backend/src/metabase_enterprise/public_sharing/api.clj@@ -8,7 +8,7 @@[metabase.api.macros :as api.macros][metabase.events.core :as events][metabase.premium-features.core :as premium-features]- [metabase.public-sharing.api :as public-sharing.api]+ [metabase.public-sharing-rest.api :as public-sharing.api][metabase.public-sharing.validation :as public-sharing.validation][metabase.query-processor.middleware.constraints :as qp.constraints][metabase.query-processor.schema :as qp.schema]diff --git a/enterprise/backend/src/metabase_enterprise/stale/api.clj b/enterprise/backend/src/metabase_enterprise/stale/api.cljindex f60d6a72352..6913c9d7475 100644--- a/enterprise/backend/src/metabase_enterprise/stale/api.clj+++ b/enterprise/backend/src/metabase_enterprise/stale/api.clj@@ -8,7 +8,7 @@[metabase.api.common :as api][metabase.api.macros :as api.macros][metabase.api.routes.common :refer [+auth]]- [metabase.collections.api :as api.collection]+ [metabase.collections-rest.api :as api.collection][metabase.collections.models.collection :as collection][metabase.premium-features.core :as premium-features][metabase.queries.core :as queries]diff --git a/enterprise/backend/test/metabase_enterprise/advanced_permissions/common_test.clj b/enterprise/backend/test/metabase_enterprise/advanced_permissions/common_test.cljindex e93b43da22e..f7c6995fef3 100644--- a/enterprise/backend/test/metabase_enterprise/advanced_permissions/common_test.clj+++ b/enterprise/backend/test/metabase_enterprise/advanced_permissions/common_test.clj@@ -14,7 +14,7 @@[metabase.util :as u][metabase.util.quick-task :as quick-task][metabase.warehouse-schema.models.field-values :as field-values]- [metabase.warehouses.api :as api.database]+ [metabase.warehouses-rest.api :as api.database][metabase.warehouses.models.database :as database][toucan2.core :as t2]))diff --git a/enterprise/backend/test/metabase_enterprise/sandbox/api/dashboard_test.clj b/enterprise/backend/test/metabase_enterprise/sandbox/api/dashboard_test.cljindex ef657793b24..81e8b8f7d0a 100644--- a/enterprise/backend/test/metabase_enterprise/sandbox/api/dashboard_test.clj+++ b/enterprise/backend/test/metabase_enterprise/sandbox/api/dashboard_test.clj@@ -3,7 +3,7 @@(:require[clojure.test :refer :all][metabase-enterprise.test :as met]- [metabase.dashboards.api-test :as api.dashboard-test]+ [metabase.dashboards-rest.api-test :as api.dashboard-test][metabase.parameters.chain-filter][metabase.parameters.chain-filter-test :as chain-filter-test][metabase.permissions.models.data-permissions :as data-perms]diff --git a/enterprise/backend/test/metabase_enterprise/sandbox/api/user_test.clj b/enterprise/backend/test/metabase_enterprise/sandbox/api/user_test.cljindex 07128c18d39..584e2bb050e 100644--- a/enterprise/backend/test/metabase_enterprise/sandbox/api/user_test.clj+++ b/enterprise/backend/test/metabase_enterprise/sandbox/api/user_test.clj@@ -1,5 +1,5 @@(ns metabase-enterprise.sandbox.api.user-test- "Tests that would logically be included in [[metabase.users.api-test]] but are separate as they are enterprise only."+ "Tests that would logically be included in [[metabase.users-rest.api-test]] but are separate as they are enterprise only."(:require[clojure.set :as set][clojure.test :refer :all]diff --git a/enterprise/backend/test/metabase_enterprise/upload_management/api_test.clj b/enterprise/backend/test/metabase_enterprise/upload_management/api_test.cljindex d2abc04a85b..204c1732673 100644--- a/enterprise/backend/test/metabase_enterprise/upload_management/api_test.clj+++ b/enterprise/backend/test/metabase_enterprise/upload_management/api_test.clj@@ -5,7 +5,7 @@[metabase.test :as mt][metabase.upload.core :as upload][metabase.upload.impl-test :as upload-test]- [metabase.warehouse-schema.api.table-test :as oss-test]))+ [metabase.warehouse-schema-rest.api.table-test :as oss-test]))(def list-url "ee/upload-management/tables")diff --git a/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/completers.tsx b/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/completers.tsxindex 8538b55ff01..50e38023caa 100644--- a/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/completers.tsx+++ b/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/completers.tsx@@ -17,7 +17,7 @@ import { source } from "./language";import { getCardAutocompleteResultMeta, matchTagAtCursor } from "./util";// Keep this in sync with the limit in the backend code at-// `autocomplete-suggestions` in src/metabase/warehouses/api.clj+// `autocomplete-suggestions` in src/metabase/warehouses_rest/api.cljconst AUTOCOMPLETE_SUGGESTIONS_LIMIT = 50;type SchemaCompletionOptions = {@@ -148,7 +148,7 @@ export function useSnippetCompletion() {}// Keep this in sync with the limit in the backend code at-// `autocomplete-cards` in src/metabase/warehouses/api.clj+// `autocomplete-cards` in src/metabase/warehouses_rest/api.cljconst AUTOCOMPLETE_CARD_SUGGESTIONS_LIMIT = 50;type CardTagCompletionOptions = {diff --git a/mage/src/mage/codespell.clj b/mage/src/mage/codespell.cljindex c8b3df0a31f..5fd4b946765 100644--- a/mage/src/mage/codespell.clj+++ b/mage/src/mage/codespell.clj@@ -1,7 +1,7 @@(ns mage.codespell(:require- [mage.shell :as shell]- [clojure.string :as str]))+ [clojure.string :as str]+ [mage.shell :as shell]))(set! *warn-on-reflection* true)@@ -53,5 +53,4 @@"frontend/src/metabase/querying/expressions/tokenizer/lezer.js""frontend/src/metabase/static-viz/constants/char-sizes.ts""frontend/src/metabase/visualizations/lib/mapping_codes.ts"- "modules/drivers/mongo/src/metabase/driver/mongo/operators.clj"- ])))+ "modules/drivers/mongo/src/metabase/driver/mongo/operators.clj"])))diff --git a/modules/drivers/presto-jdbc/test/metabase/driver/presto_jdbc_test.clj b/modules/drivers/presto-jdbc/test/metabase/driver/presto_jdbc_test.cljindex 15ced83036b..5305fbb2878 100644--- a/modules/drivers/presto-jdbc/test/metabase/driver/presto_jdbc_test.clj+++ b/modules/drivers/presto-jdbc/test/metabase/driver/presto_jdbc_test.clj@@ -16,7 +16,7 @@[metabase.test :as mt][metabase.test.data.presto-jdbc :as data.presto-jdbc][metabase.test.fixtures :as fixtures]- [metabase.warehouses.api :as api.database]+ [metabase.warehouses-rest.api :as api.database][toucan2.core :as t2])(:import(java.io File)))diff --git a/modules/drivers/starburst/test/metabase/driver/starburst_test.clj b/modules/drivers/starburst/test/metabase/driver/starburst_test.cljindex 706f1c30957..1df15365eb7 100644--- a/modules/drivers/starburst/test/metabase/driver/starburst_test.clj+++ b/modules/drivers/starburst/test/metabase/driver/starburst_test.clj@@ -18,7 +18,7 @@[metabase.test.data.interface :as tx][metabase.test.data.sql-jdbc :as sql-jdbc.tx][metabase.test.fixtures :as fixtures]- [metabase.warehouses.api :as api.database]+ [metabase.warehouses-rest.api :as api.database][toucan2.core :as t2][toucan2.tools.with-temp :as t2.with-temp])(:importdiff --git a/src/metabase/actions/core.clj b/src/metabase/actions/core.cljindex 279518131fd..95c0d5be859 100644--- a/src/metabase/actions/core.clj+++ b/src/metabase/actions/core.clj@@ -23,6 +23,7 @@[metabase.actions.actionscached-valuecheck-actions-enabled!+ check-actions-enabled-for-database!check-data-editing-enabled-for-database!cached-databasecached-database-via-table-id@@ -53,8 +54,10 @@apply-json-query][metabase.actions.modelsdashcard->action+ insert!select-action- select-actions]+ select-actions+ update!][metabase.actions.eventspublish-action-success!][metabase.actions.scopediff --git a/src/metabase/actions/api.clj b/src/metabase/actions_rest/api.cljsimilarity index 87%rename from src/metabase/actions/api.cljrename to src/metabase/actions_rest/api.cljindex e06bf6e8926..ebde5a8fc1e 100644--- a/src/metabase/actions/api.clj+++ b/src/metabase/actions_rest/api.clj@@ -1,9 +1,7 @@-(ns metabase.actions.api+(ns metabase.actions-rest.api"`/api/action/` endpoints."(:require- [metabase.actions.actions :as actions]- [metabase.actions.execution :as actions.execution]- [metabase.actions.models :as actions.models]+ [metabase.actions.core :as actions][metabase.actions.schema :as actions.schema][metabase.analytics.core :as analytics][metabase.api.common :as api]@@ -29,9 +27,9 @@[:model-id {:optional true} [:maybe ::lib.schema.id/card]]]](letfn [(actions-for [models](if (seq models)- (t2/hydrate (actions.models/select-actions models- :model_id [:in (map :id models)]- :archived false)+ (t2/hydrate (actions/select-actions models+ :model_id [:in (map :id models)]+ :archived false):creator)[]))];; We don't check the permissions on the actions, we assume they are readable if the model is readable.@@ -56,7 +54,7 @@"Fetch an Action."[{:keys [action-id]} :- [:map[:action-id ms/PositiveInt]]]- (-> (actions.models/select-action :id action-id :archived false)+ (-> (actions/select-action :id action-id :archived false)(t2/hydrate :creator)api/read-check))@@ -92,17 +90,17 @@(doseq [db-id (cond-> [(:database_id model)] database_id (conj database_id))](actions/check-actions-enabled-for-database!(t2/select-one :model/Database :id db-id))))- (let [action-id (actions.models/insert! (assoc action :creator_id api/*current-user-id*))]+ (let [action-id (actions/insert! (assoc action :creator_id api/*current-user-id*))](analytics/track-event! :snowplow/action{:event :action-created:type action-type:action_id action-id:num_parameters (count parameters)})(if action-id- (actions.models/select-action :id action-id)+ (actions/select-action :id action-id);; t2/insert! does not return a value when used with h2;; so we return the most recently updated http action.- (last (actions.models/select-actions nil :type action-type)))))+ (last (actions/select-actions nil :type action-type)))))(api.macros/defendpoint :put "/:id""Update an Action."@@ -112,8 +110,8 @@action :- ::actions.schema/action.for-update](actions/check-actions-enabled! id)(let [existing-action (api/write-check :model/Action id)]- (actions.models/update! (assoc action :id id) existing-action))- (let [{:keys [parameters type] :as action} (actions.models/select-action :id id)]+ (actions/update! (assoc action :id id) existing-action))+ (let [{:keys [parameters type] :as action} (actions/select-action :id id)](analytics/track-event! :snowplow/action{:event :action-updated:type type@@ -160,9 +158,9 @@{:keys [parameters]} :- [:map[:parameters ms/JSONString]]](actions/check-actions-enabled! action-id)- (-> (actions.models/select-action :id action-id :archived false)+ (-> (actions/select-action :id action-id :archived false)api/read-check- (actions.execution/fetch-values (json/decode parameters))))+ (actions/fetch-values (json/decode parameters))))(api.macros/defendpoint :post "/:id/execute""Execute the Action.@@ -173,10 +171,10 @@_query-params{:keys [parameters], :as _body} :- [:maybe [:map[:parameters {:optional true} [:maybe [:map-of :keyword any?]]]]]]- (let [{:keys [type] :as action} (api/check-404 (actions.models/select-action :id id :archived false))]+ (let [{:keys [type] :as action} (api/check-404 (actions/select-action :id id :archived false))](analytics/track-event! :snowplow/action{:event :action-executed:source :model_detail:type type:action_id id})- (actions.execution/execute-action! action (update-keys parameters name))))+ (actions/execute-action! action (update-keys parameters name))))diff --git a/src/metabase/api/common.clj b/src/metabase/api/common.cljindex cbf427bc374..6249985c555 100644--- a/src/metabase/api/common.clj+++ b/src/metabase/api/common.clj@@ -3,7 +3,7 @@;; We use a custom macro called `defendpoint` for defining all endpoints. It's best illustrated with an example:;;;; <pre><code>-;; (ns metabase.dashboards.api ...)+;; (ns metabase.dashboards-rest.api ...);;;; (api/defendpoint :get "/";; "Get `Dashboards`. With filter option `f`..."diff --git a/src/metabase/api/open_api.clj b/src/metabase/api/open_api.cljindex 61970c6c0b2..55686f2cec6 100644--- a/src/metabase/api/open_api.clj+++ b/src/metabase/api/open_api.clj@@ -18,7 +18,7 @@(open-api-spec [this prefix]"Get the OpenAPI spec base object (as a Clojure data structure) associated with a Ring handler. `prefix` is theroute prefix in the Compojure `context` sense, e.g. `/api/` for [[metabase.api-routes.core/routes]], or- `/api/user/` by the time we get to [[metabase.users.api]], etc."))+ `/api/user/` by the time we get to [[metabase.users-rest.api]], etc."))(extend-protocol OpenAPISpecnildiff --git a/src/metabase/api_routes/routes.clj b/src/metabase/api_routes/routes.cljindex 734a8598e1c..fce2465fd17 100644--- a/src/metabase/api_routes/routes.clj+++ b/src/metabase/api_routes/routes.clj@@ -1,7 +1,7 @@(ns metabase.api-routes.routes(:require[compojure.route :as route]- [metabase.actions.api]+ [metabase.actions-rest.api][metabase.activity-feed.api][metabase.analytics.api][metabase.api-keys.api]@@ -16,11 +16,11 @@[metabase.cache.api][metabase.channel.api][metabase.cloud-migration.api]- [metabase.collections.api]+ [metabase.collections-rest.api][metabase.config.core :as config]- [metabase.dashboards.api]+ [metabase.dashboards-rest.api][metabase.eid-translation.api]- [metabase.embedding.api]+ [metabase.embedding-rest.api][metabase.geojson.api][metabase.glossary.api][metabase.indexed-entities.api]@@ -32,7 +32,7 @@[metabase.permissions-rest.api][metabase.premium-features.api][metabase.product-feedback.api]- [metabase.public-sharing.api]+ [metabase.public-sharing-rest.api][metabase.pulse.api][metabase.queries.api][metabase.query-processor.api]@@ -41,7 +41,7 @@[metabase.segments.api][metabase.session.api][metabase.settings-rest.api]- [metabase.setup.api]+ [metabase.setup-rest.api][metabase.sso.api][metabase.sync.api][metabase.task-history.api]@@ -51,13 +51,13 @@[metabase.timeline.api][metabase.upload.api][metabase.user-key-value.api]- [metabase.users.api]+ [metabase.users-rest.api][metabase.util.i18n :refer [deferred-tru]]- [metabase.warehouse-schema.api]- [metabase.warehouses.api]+ [metabase.warehouse-schema-rest.api]+ [metabase.warehouses-rest.api][metabase.xrays.api]))-(comment metabase.actions.api/keep-me+(comment metabase.actions-rest.api/keep-memetabase.activity-feed.api/keep-memetabase.analytics.api/keep-memetabase.api-keys.api/keep-me@@ -66,8 +66,8 @@metabase.bug-reporting.api/keep-memetabase.cache.api/keep-memetabase.cloud-migration.api/keep-me- metabase.collections.api/keep-me- metabase.dashboards.api/keep-me+ metabase.collections-rest.api/keep-me+ metabase.dashboards-rest.api/keep-memetabase.eid-translation.api/keep-memetabase.geojson.api/keep-memetabase.glossary.api/keep-me@@ -78,19 +78,19 @@metabase.native-query-snippets.api/keep-memetabase.permissions-rest.api/keep-memetabase.product-feedback.api/keep-me- metabase.public-sharing.api/keep-me+ metabase.public-sharing-rest.api/keep-memetabase.query-processor.api/keep-memetabase.revisions.api/keep-memetabase.segments.api/keep-memetabase.settings-rest.api/keep-me- metabase.setup.api/keep-me+ metabase.setup-rest.api/keep-memetabase.task-history.api/keep-memetabase.testing-api.api/keep-memetabase.tiles.api/keep-memetabase.upload.api/keep-memetabase.user-key-value.api/keep-me- metabase.users.api/keep-me- metabase.warehouses.api/keep-me)+ metabase.users-rest.api/keep-me+ metabase.warehouses-rest.api/keep-me)(def ^:private ^{:arglists '([request respond raise])} pass-thru-handler"Always 'falls thru' to the next handler."@@ -128,7 +128,7 @@;;; ↓↓↓ KEEP THIS SORTED OR ELSE! ↓↓↓(def ^:private route-map- {"/action" (+auth 'metabase.actions.api)+ {"/action" (+auth 'metabase.actions-rest.api)"/activity" (+auth 'metabase.activity-feed.api)"/alert" (+auth metabase.pulse.api/alert-routes)"/analytics" (+auth 'metabase.analytics.api)@@ -141,15 +141,15 @@"/cards" (+auth metabase.queries.api/cards-routes)"/channel" (+auth metabase.channel.api/channel-routes)"/cloud-migration" (+auth 'metabase.cloud-migration.api)- "/collection" (+auth 'metabase.collections.api)- "/dashboard" (+auth 'metabase.dashboards.api)- "/database" (+auth 'metabase.warehouses.api)+ "/collection" (+auth 'metabase.collections-rest.api)+ "/dashboard" (+auth 'metabase.dashboards-rest.api)+ "/database" (+auth 'metabase.warehouses-rest.api)"/dataset" (+auth 'metabase.query-processor.api)"/docs" (metabase.api.docs/make-routes #'routes)"/eid-translation" 'metabase.eid-translation.api"/email" metabase.channel.api/email-routes- "/embed" (+message-only-exceptions metabase.embedding.api/embedding-routes)- "/field" (+auth metabase.warehouse-schema.api/field-routes)+ "/embed" (+message-only-exceptions metabase.embedding-rest.api/embedding-routes)+ "/field" (+auth metabase.warehouse-schema-rest.api/field-routes)"/geojson" 'metabase.geojson.api"/glossary" (+auth 'metabase.glossary.api)"/google" (+auth metabase.sso.api/google-auth-routes)@@ -163,25 +163,25 @@"/permissions" (+auth 'metabase.permissions-rest.api)"/persist" (+auth 'metabase.model-persistence.api)"/premium-features" (+auth metabase.premium-features.api/routes)- "/preview_embed" (+auth metabase.embedding.api/preview-embedding-routes)+ "/preview_embed" (+auth metabase.embedding-rest.api/preview-embedding-routes)"/product-feedback" 'metabase.product-feedback.api- "/public" (+public-exceptions 'metabase.public-sharing.api)+ "/public" (+public-exceptions 'metabase.public-sharing-rest.api)"/pulse" metabase.pulse.api/pulse-routes"/revision" (+auth 'metabase.revisions.api)"/search" (+auth metabase.search.api/routes)"/segment" (+auth 'metabase.segments.api)"/session" metabase.session.api/routes"/setting" (+auth 'metabase.settings-rest.api)- "/setup" 'metabase.setup.api+ "/setup" 'metabase.setup-rest.api"/slack" (+auth metabase.channel.api/slack-routes)- "/table" (+auth metabase.warehouse-schema.api/table-routes)+ "/table" (+auth metabase.warehouse-schema-rest.api/table-routes)"/task" (+auth 'metabase.task-history.api)"/testing" (if metabase.testing-api.core/enable-testing-routes? 'metabase.testing-api.api pass-thru-handler)"/tiles" (+auth 'metabase.tiles.api)"/timeline" (+auth metabase.timeline.api/timeline-routes)"/timeline-event" (+auth metabase.timeline.api/timeline-event-routes)"/upload" (+auth 'metabase.upload.api)- "/user" (+auth 'metabase.users.api)+ "/user" (+auth 'metabase.users-rest.api)"/user-key-value" (+auth 'metabase.user-key-value.api)"/util" 'metabase.api.util});;; ↑↑↑ KEEP THIS SORTED OR ELSE ↑↑↑diff --git a/src/metabase/collections/api.clj b/src/metabase/collections_rest/api.cljsimilarity index 99%rename from src/metabase/collections/api.cljrename to src/metabase/collections_rest/api.cljindex 3a6e9b805ce..3339f53b7b4 100644--- a/src/metabase/collections/api.clj+++ b/src/metabase/collections_rest/api.clj@@ -1,4 +1,4 @@-(ns metabase.collections.api+(ns metabase.collections-rest.api"`/api/collection` endpoints. By default, these endpoints operate on Collections in the 'default' namespace, which isthe namespace that has things like Dashboards and Cards. Other namespaces of Collections exist as well, such as the`:snippet` namespace, ('Snippet folders' in the UI). These namespaces are independent hierarchies. To use thesediff --git a/src/metabase/dashboards/api.clj b/src/metabase/dashboards_rest/api.cljsimilarity index 99%rename from src/metabase/dashboards/api.cljrename to src/metabase/dashboards_rest/api.cljindex 9ccde6a2ee1..c0cf02cfd51 100644--- a/src/metabase/dashboards/api.clj+++ b/src/metabase/dashboards_rest/api.clj@@ -1,4 +1,4 @@-(ns metabase.dashboards.api+(ns metabase.dashboards-rest.api"/api/dashboard endpoints."(:require[clojure.core.cache :as cache]@@ -11,7 +11,7 @@[metabase.api.macros :as api.macros][metabase.app-db.core :as app-db][metabase.channel.email.messages :as messages]- [metabase.collections.api :as api.collection]+ [metabase.collections-rest.api :as api.collection][metabase.collections.core :as collections][metabase.collections.models.collection :as collection][metabase.collections.models.collection.root :as collection.root]diff --git a/src/metabase/embedding/api.clj b/src/metabase/embedding/api.cljdeleted file mode 100644index cc6eaf47111..00000000000--- a/src/metabase/embedding/api.clj+++ /dev/null@@ -1,16 +0,0 @@-(ns metabase.embedding.api- (:require- [metabase.api.macros :as api.macros]- [metabase.embedding.api.embed]- [metabase.embedding.api.preview-embed]))--(comment metabase.embedding.api.embed/keep-me- metabase.embedding.api.preview-embed/keep-me)--(def ^{:arglists '([request respond raise])} embedding-routes- "`/api/embed` routes"- (api.macros/ns-handler 'metabase.embedding.api.embed))--(def ^{:arglists '([request respond raise])} preview-embedding-routes- "`/api/preview_embed` routes"- (api.macros/ns-handler 'metabase.embedding.api.preview-embed))diff --git a/src/metabase/embedding_rest/api.clj b/src/metabase/embedding_rest/api.cljnew file mode 100644index 00000000000..841ab553a49--- /dev/null+++ b/src/metabase/embedding_rest/api.clj@@ -0,0 +1,16 @@+(ns metabase.embedding-rest.api+ (:require+ [metabase.api.macros :as api.macros]+ [metabase.embedding-rest.api.embed]+ [metabase.embedding-rest.api.preview-embed]))++(comment metabase.embedding-rest.api.embed/keep-me+ metabase.embedding-rest.api.preview-embed/keep-me)++(def ^{:arglists '([request respond raise])} embedding-routes+ "`/api/embed` routes"+ (api.macros/ns-handler 'metabase.embedding-rest.api.embed))++(def ^{:arglists '([request respond raise])} preview-embedding-routes+ "`/api/preview_embed` routes"+ (api.macros/ns-handler 'metabase.embedding-rest.api.preview-embed))diff --git a/src/metabase/embedding/api/common.clj b/src/metabase/embedding_rest/api/common.cljsimilarity index 99%rename from src/metabase/embedding/api/common.cljrename to src/metabase/embedding_rest/api/common.cljindex f27165e0690..9e6af63e5b5 100644--- a/src/metabase/embedding/api/common.clj+++ b/src/metabase/embedding_rest/api/common.clj@@ -1,4 +1,4 @@-(ns metabase.embedding.api.common+(ns metabase.embedding-rest.api.common(:require[clojure.set :as set][clojure.string :as str]@@ -12,7 +12,7 @@[metabase.notification.payload.core :as notification.payload][metabase.parameters.dashboard :as parameters.dashboard][metabase.parameters.params :as params]- [metabase.public-sharing.api :as api.public]+ [metabase.public-sharing-rest.api :as api.public][metabase.queries.core :as queries][metabase.query-processor.card :as qp.card][metabase.query-processor.middleware.constraints :as qp.constraints]@@ -109,8 +109,8 @@(mu/defn- resolve-dashboard-parameters :- [:sequential [:map[:id ms/NonBlankString]]]"Given a `dashboard-id` and parameters map in the format `slug->value`, return a sequence of parameters with `:id`s- that can be passed to various functions in the [[metabase.dashboards.api]] namespace such as- [[metabase.dashboards.api/process-query-for-dashcard]]."+ that can be passed to various functions in the [[metabase.dashboards-rest.api]] namespace such as+ [[metabase.dashboards-rest.api/process-query-for-dashcard]]."[dashboard-id :- ms/PositiveIntslug->value :- :map](let [parameters (t2/select-one-fn :parameters :model/Dashboard :id dashboard-id)diff --git a/src/metabase/embedding/api/embed.clj b/src/metabase/embedding_rest/api/embed.cljsimilarity index 99%rename from src/metabase/embedding/api/embed.cljrename to src/metabase/embedding_rest/api/embed.cljindex a97ac2af397..fde9d9ae861 100644--- a/src/metabase/embedding/api/embed.clj+++ b/src/metabase/embedding_rest/api/embed.clj@@ -1,4 +1,4 @@-(ns metabase.embedding.api.embed+(ns metabase.embedding-rest.api.embed"Various endpoints that use [JSON web tokens](https://jwt.io/introduction/) to fetch Cards and Dashboards.The endpoints are the same as the ones in `api/public/`, and differ only in the way they are authorized.@@ -18,7 +18,7 @@[metabase.api.common :as api][metabase.api.macros :as api.macros][metabase.eid-translation.core :as eid-translation]- [metabase.embedding.api.common :as api.embed.common]+ [metabase.embedding-rest.api.common :as api.embed.common][metabase.embedding.jwt :as embedding.jwt][metabase.events.core :as events][metabase.query-processor.card :as qp.card]diff --git a/src/metabase/embedding/api/preview_embed.clj b/src/metabase/embedding_rest/api/preview_embed.cljsimilarity index 98%rename from src/metabase/embedding/api/preview_embed.cljrename to src/metabase/embedding_rest/api/preview_embed.cljindex 739b188c60b..f9b5cfc18c7 100644--- a/src/metabase/embedding/api/preview_embed.clj+++ b/src/metabase/embedding_rest/api/preview_embed.clj@@ -1,4 +1,4 @@-(ns metabase.embedding.api.preview-embed+(ns metabase.embedding-rest.api.preview-embed"Endpoints for previewing how Cards and Dashboards will look when embedding them.These endpoints are basically identical in functionality to the ones in `/api/embed`, but:@@ -11,7 +11,7 @@(:require[metabase.api.common :as api][metabase.api.macros :as api.macros]- [metabase.embedding.api.common :as api.embed.common]+ [metabase.embedding-rest.api.common :as api.embed.common][metabase.embedding.jwt :as embed][metabase.embedding.validation :as embedding.validation][metabase.query-processor.pivot :as qp.pivot]diff --git a/src/metabase/lib/card.cljc b/src/metabase/lib/card.cljcindex 816dae2cd48..2e2aaae8d50 100644--- a/src/metabase/lib/card.cljc+++ b/src/metabase/lib/card.cljc@@ -103,7 +103,7 @@(merge (when card-id{:lib/source :source/card, :lib/card-id card-id}));; :effective-type is required, but not always set, see e.g.,- ;; [[metabase.warehouse-schema.api.table/card-result-metadata->virtual-fields]]+ ;; [[metabase.warehouse-schema-rest.api.table/card-result-metadata->virtual-fields]](u/assoc-default :effective-type (:base-type col));; add original display name IF not already present AND we have a value(->> (lib.normalize/normalize ::lib.schema.metadata/column)))))diff --git a/src/metabase/lib/native.cljc b/src/metabase/lib/native.cljcindex 7127d6865e2..593f9e2b980 100644--- a/src/metabase/lib/native.cljc+++ b/src/metabase/lib/native.cljc@@ -362,7 +362,7 @@(mu/defn has-write-permission :- :boolean"Returns whether the database has native write permissions.- This is only filled in by [[metabase.warehouses.api/add-native-perms-info]]+ This is only filled in by [[metabase.warehouses-rest.api/add-native-perms-info]]and added to metadata when pulling a database from the list of dbs in js."[query :- ::lib.schema/query](assert-native-query (lib.util/query-stage query 0))diff --git a/src/metabase/lib/schema/parameter.cljc b/src/metabase/lib/schema/parameter.cljcindex 6c318de7ec8..65391cd9ac8 100644--- a/src/metabase/lib/schema/parameter.cljc+++ b/src/metabase/lib/schema/parameter.cljc@@ -95,7 +95,7 @@;;;; TODO FIXME -- actually, it turns out the the FE client passes parameter type `:category` for parameters in;; public Cards. Who knows why! For now, we'll continue allowing it. But we should fix it soon. See- ;; [[metabase.public-sharing.api-test/execute-public-card-with-parameters-test]]+ ;; [[metabase.public-sharing-rest.api-test/execute-public-card-with-parameters-test]]:id {:allowed-for #{:id}}:category {:allowed-for #{:category #_FIXME :number :text :date :boolean}}diff --git a/src/metabase/parameters/params.clj b/src/metabase/parameters/params.cljindex f7dde438f2e..4b9e0c7a01e 100644--- a/src/metabase/parameters/params.clj+++ b/src/metabase/parameters/params.clj@@ -224,7 +224,7 @@(def ^:dynamic *field-id-context*"Conext for effective computation of field ids for parameters. Bound in- the [[metabase.dashboards.api/hydrate-dashboard-details]]. Meant to be used in the [[field-id-into-context-rf]], to+ the [[metabase.dashboards-rest.api/hydrate-dashboard-details]]. Meant to be used in the [[field-id-into-context-rf]], tore-use values of previous `filterable-columns` computations (during the reduction itself and hydration of`:param_fields` and `:param_values` at the time of writing)."nil)diff --git a/src/metabase/public_sharing/api.clj b/src/metabase/public_sharing_rest/api.cljsimilarity index 99%rename from src/metabase/public_sharing/api.cljrename to src/metabase/public_sharing_rest/api.cljindex a4e2a8021c9..5437a812a86 100644--- a/src/metabase/public_sharing/api.clj+++ b/src/metabase/public_sharing_rest/api.clj@@ -1,4 +1,4 @@-(ns metabase.public-sharing.api+(ns metabase.public-sharing-rest.api"Metabase API endpoints for viewing publicly-accessible Cards and Dashboards."(:require[hiccup.core :as hiccup]@@ -7,7 +7,7 @@[metabase.analytics.core :as analytics][metabase.api.common :as api][metabase.api.macros :as api.macros]- [metabase.dashboards.api :as api.dashboard]+ [metabase.dashboards-rest.api :as api.dashboard][metabase.dashboards.schema :as dashboards.schema][metabase.events.core :as events][metabase.lib.schema.id :as lib.schema.id]diff --git a/src/metabase/queries/events/cards_notification_deleted_on_card_save.clj b/src/metabase/queries/events/cards_notification_deleted_on_card_save.cljindex 99aabb6c1b8..f75df11e18d 100644--- a/src/metabase/queries/events/cards_notification_deleted_on_card_save.clj+++ b/src/metabase/queries/events/cards_notification_deleted_on_card_save.clj@@ -12,7 +12,7 @@(methodical/defmethod events/publish-event! ::event"When a Card is saved and associated Alerts are deleted send email notifications to recipients of that alert. At thetime of this writing this is triggered by [[metabase.queries.models.card/delete-alerts-if-needed!]] and- by [[metabase.collections.api/maybe-send-archived-notifications!]]."+ by [[metabase.collections-rest.api/maybe-send-archived-notifications!]]."[topic {:keys [notifications card actor], :as _event}](try(let [send-message! (case topicdiff --git a/src/metabase/queries/metadata.clj b/src/metabase/queries/metadata.cljindex a86e1bfbd24..7d89e13d873 100644--- a/src/metabase/queries/metadata.clj+++ b/src/metabase/queries/metadata.clj@@ -16,9 +16,8 @@[metabase.warehouse-schema.table :as schema.table][toucan2.core :as t2]))-;; This is similar to the function in src/metabase/warehouses/api.clj, but we want to-;; allow filtering the DBs in case of audit database, we don't want to allow users to modify-;; its queries.+;; This is similar to the function in [[metabase.warehouses-rest.api]], but we want to allow filtering the DBs in case+;; of audit database, we don't want to allow users to modify its queries.(mu/defn- get-native-perms-info :- [:enum :write :none]"Calculate `:native_permissions` field for the passed database describing the current user's permissions for runningnative (e.g. SQL) queries. Will be either `:write` or `:none`. `:write` means you can run ad-hoc native queries,diff --git a/src/metabase/setup/README.md b/src/metabase/setup/README.mdindex 1dc31590a92..e5ccc155196 100644--- a/src/metabase/setup/README.md+++ b/src/metabase/setup/README.md@@ -1,4 +1,4 @@# `setup` ModuleThis module has code for setting up a Metabase instance on **first launch**. It contains the `/api/setup` API endpoints in-`metabase.setup.api`.+`metabase.setup-rest.api`.diff --git a/src/metabase/setup/api.clj b/src/metabase/setup_rest/api.cljsimilarity index 99%rename from src/metabase/setup/api.cljrename to src/metabase/setup_rest/api.cljindex 729a334314a..7ac7e4020fd 100644--- a/src/metabase/setup/api.clj+++ b/src/metabase/setup_rest/api.clj@@ -1,4 +1,4 @@-(ns metabase.setup.api+(ns metabase.setup-rest.api(:require[java-time.api :as t][metabase.analytics.core :as analytics]diff --git a/src/metabase/sync/sync_metadata/tables.clj b/src/metabase/sync/sync_metadata/tables.cljindex bc8f2f685b3..fedb0f95378 100644--- a/src/metabase/sync/sync_metadata/tables.clj+++ b/src/metabase/sync/sync_metadata/tables.clj@@ -105,8 +105,8 @@(let [is-crufty? (if (and (= sync-stage ::update)(not (:is_attached_dwh database)));; TODO: we should add an updated_by column to metabase_table in- ;; [[metabase.warehouse-schema.api.table/update-table!*]] to track occasions where the table was- ;; updated by an admin, and respect their choices during an update.+ ;; [[metabase.warehouse-schema-rest.api.table/update-table!*]] to track occasions where the table+ ;; was updated by an admin, and respect their choices during an update.;;;; This will fix the issue where a table is marked as visible, but cruftiness settings keep re-hiding it;; during update steps. This is also how we handled this before the addition of auto-cruft-tables.diff --git a/src/metabase/users/api.clj b/src/metabase/users_rest/api.cljsimilarity index 99%rename from src/metabase/users/api.cljrename to src/metabase/users_rest/api.cljindex b423e54c342..4863ae448fa 100644--- a/src/metabase/users/api.clj+++ b/src/metabase/users_rest/api.clj@@ -1,4 +1,4 @@-(ns metabase.users.api+(ns metabase.users-rest.api"/api/user endpoints"(:require[honey.sql.helpers :as sql.helpers]diff --git a/src/metabase/warehouse_schema/api.clj b/src/metabase/warehouse_schema/api.cljdeleted file mode 100644index 62dcf982c1a..00000000000--- a/src/metabase/warehouse_schema/api.clj+++ /dev/null@@ -1,16 +0,0 @@-(ns metabase.warehouse-schema.api- (:require- [metabase.api.macros :as api.macros]- [metabase.warehouse-schema.api.field]- [metabase.warehouse-schema.api.table]))--(comment metabase.warehouse-schema.api.field/keep-me- metabase.warehouse-schema.api.table/keep-me)--(def ^{:arglists '([request respond raise])} field-routes- "`/api/field` routes."- (api.macros/ns-handler 'metabase.warehouse-schema.api.field))--(def ^{:arglists '([request respond raise])} table-routes- "`/api/table` routes."- (api.macros/ns-handler 'metabase.warehouse-schema.api.table))diff --git a/src/metabase/warehouse_schema_rest/api.clj b/src/metabase/warehouse_schema_rest/api.cljnew file mode 100644index 00000000000..c97dc444ceb--- /dev/null+++ b/src/metabase/warehouse_schema_rest/api.clj@@ -0,0 +1,16 @@+(ns metabase.warehouse-schema-rest.api+ (:require+ [metabase.api.macros :as api.macros]+ [metabase.warehouse-schema-rest.api.field]+ [metabase.warehouse-schema-rest.api.table]))++(comment metabase.warehouse-schema-rest.api.field/keep-me+ metabase.warehouse-schema-rest.api.table/keep-me)++(def ^{:arglists '([request respond raise])} field-routes+ "`/api/field` routes."+ (api.macros/ns-handler 'metabase.warehouse-schema-rest.api.field))++(def ^{:arglists '([request respond raise])} table-routes+ "`/api/table` routes."+ (api.macros/ns-handler 'metabase.warehouse-schema-rest.api.table))diff --git a/src/metabase/warehouse_schema/api/field.clj b/src/metabase/warehouse_schema_rest/api/field.cljsimilarity index 99%rename from src/metabase/warehouse_schema/api/field.cljrename to src/metabase/warehouse_schema_rest/api/field.cljindex e16533f4af7..1baddb25048 100644--- a/src/metabase/warehouse_schema/api/field.clj+++ b/src/metabase/warehouse_schema_rest/api/field.clj@@ -1,4 +1,4 @@-(ns metabase.warehouse-schema.api.field+(ns metabase.warehouse-schema-rest.api.field(:require[metabase.analytics.core :as analytics][metabase.api.common :as api]diff --git a/src/metabase/warehouse_schema/api/table.clj b/src/metabase/warehouse_schema_rest/api/table.cljsimilarity index 99%rename from src/metabase/warehouse_schema/api/table.cljrename to src/metabase/warehouse_schema_rest/api/table.cljindex 4fd1f66eb1a..f95a820e384 100644--- a/src/metabase/warehouse_schema/api/table.clj+++ b/src/metabase/warehouse_schema_rest/api/table.clj@@ -1,4 +1,4 @@-(ns metabase.warehouse-schema.api.table+(ns metabase.warehouse-schema-rest.api.table"/api/table endpoints."(:require[clojure.java.io :as io]@@ -28,7 +28,7 @@[metabase.util.quick-task :as quick-task][metabase.warehouse-schema.models.table :as table][metabase.warehouse-schema.table :as schema.table]- [metabase.warehouses.api :as warehouses]+ [metabase.warehouses-rest.api :as warehouses][metabase.xrays.core :as xrays][steffan-westcott.clj-otel.api.trace.span :as span][toucan2.core :as t2]))diff --git a/src/metabase/warehouses/api.clj b/src/metabase/warehouses_rest/api.cljsimilarity index 99%rename from src/metabase/warehouses/api.cljrename to src/metabase/warehouses_rest/api.cljindex 71cd86fc2cc..e95d9c0a0b6 100644--- a/src/metabase/warehouses/api.clj+++ b/src/metabase/warehouses_rest/api.clj@@ -1,4 +1,4 @@-(ns metabase.warehouses.api+(ns metabase.warehouses-rest.api"/api/database endpoints."(:require[clojure.string :as str]diff --git a/test/metabase/actions/api_test.clj b/test/metabase/actions_rest/api_test.cljsimilarity index 99%rename from test/metabase/actions/api_test.cljrename to test/metabase/actions_rest/api_test.cljindex 8d814eeb817..6ff324bdc11 100644--- a/test/metabase/actions/api_test.clj+++ b/test/metabase/actions_rest/api_test.clj@@ -1,9 +1,9 @@-(ns ^:mb/driver-tests metabase.actions.api-test+(ns ^:mb/driver-tests metabase.actions-rest.api-test(:require[clojure.set :as set][clojure.test :refer :all][medley.core :as m]- [metabase.actions.api :as api.action]+ [metabase.actions-rest.api :as api.action][metabase.analytics.snowplow-test :as snowplow-test][metabase.collections.models.collection :as collection][metabase.lib.core :as lib]diff --git a/test/metabase/app_db/custom_migrations_test.clj b/test/metabase/app_db/custom_migrations_test.cljindex 2550d2081da..ff6e30624fe 100644--- a/test/metabase/app_db/custom_migrations_test.clj+++ b/test/metabase/app_db/custom_migrations_test.clj@@ -41,7 +41,7 @@[metabase.util.encryption :as encryption][metabase.util.encryption-test :as encryption-test][metabase.util.json :as json]- [metabase.warehouses.api-test :as api.database-test]+ [metabase.warehouses-rest.api-test :as api.database-test][metabase.warehouses.models.database :as database][toucan2.core :as t2])(:importdiff --git a/test/metabase/auth_provider/impl_test.clj b/test/metabase/auth_provider/impl_test.cljindex d30f4e48726..ad720c390c5 100644--- a/test/metabase/auth_provider/impl_test.clj+++ b/test/metabase/auth_provider/impl_test.clj@@ -7,7 +7,7 @@[metabase.test.data.interface :as tx][metabase.test.http-client :as client][metabase.util.json :as json]- [metabase.warehouses.api :as api.database]))+ [metabase.warehouses-rest.api :as api.database]))(deftest auth-integration-test(mt/test-drivers #{:postgres :mysql}diff --git a/test/metabase/collections/api_test.clj b/test/metabase/collections_rest/api_test.cljsimilarity index 99%rename from test/metabase/collections/api_test.cljrename to test/metabase/collections_rest/api_test.cljindex a340d8f2e56..4f2cc0fb5c3 100644--- a/test/metabase/collections/api_test.clj+++ b/test/metabase/collections_rest/api_test.clj@@ -1,10 +1,10 @@-(ns metabase.collections.api-test+(ns metabase.collections-rest.api-test"Tests for /api/collection endpoints."(:require[clojure.set :as set][clojure.string :as str][clojure.test :refer :all]- [metabase.collections.api :as api.collection]+ [metabase.collections-rest.api :as api.collection][metabase.collections.models.collection :as collection][metabase.collections.models.collection-test :as collection-test][metabase.notification.api.notification-test :as api.notification-test]diff --git a/test/metabase/dashboards/api_test.clj b/test/metabase/dashboards_rest/api_test.cljsimilarity index 99%rename from test/metabase/dashboards/api_test.cljrename to test/metabase/dashboards_rest/api_test.cljindex 744e0a66fbd..5fc5ac965b2 100644--- a/test/metabase/dashboards/api_test.clj+++ b/test/metabase/dashboards_rest/api_test.clj@@ -1,4 +1,4 @@-(ns ^:mb/driver-tests metabase.dashboards.api-test+(ns ^:mb/driver-tests metabase.dashboards-rest.api-test"Tests for /api/dashboard endpoints."(:require[clojure.data.csv :as csv]@@ -12,7 +12,7 @@[metabase.api.test-util :as api.test-util][metabase.collections.models.collection :as collection][metabase.config.core :as config]- [metabase.dashboards.api :as api.dashboard]+ [metabase.dashboards-rest.api :as api.dashboard][metabase.dashboards.models.dashboard-card :as dashboard-card][metabase.dashboards.models.dashboard-test :as dashboard-test][metabase.lib-be.metadata.jvm :as lib.metadata.jvm]diff --git a/test/metabase/driver/h2_test.clj b/test/metabase/driver/h2_test.cljindex f17d788e3bd..776ca7b943a 100644--- a/test/metabase/driver/h2_test.clj+++ b/test/metabase/driver/h2_test.clj@@ -376,7 +376,7 @@(t2/delete! :model/Database :is_audit true)(when original-audit-db (mbc/ensure-audit-db-installed!))))))))-;; API tests are in [[metabase.actions.api-test]]+;; API tests are in [[metabase.actions-rest.api-test]](deftest ^:parallel actions-maybe-parse-sql-error-test(testing "violate not null constraint"(is (= {:type :metabase.actions.error/violate-not-null-constraintdiff --git a/test/metabase/driver/mysql_test.clj b/test/metabase/driver/mysql_test.cljindex dbb28eba227..66e8d2150ee 100644--- a/test/metabase/driver/mysql_test.clj+++ b/test/metabase/driver/mysql_test.clj@@ -589,7 +589,7 @@;;; ------------------------------------------------ Actions related -------------------------------------------------;; API tests are in [[metabase.actions.api-test]]+;; API tests are in [[metabase.actions-rest.api-test]](deftest ^:parallel actions-maybe-parse-sql-error-test(testing "violate not null constraint"(is (=? {:type :metabase.actions.error/violate-not-null-constraintdiff --git a/test/metabase/driver/postgres_test.clj b/test/metabase/driver/postgres_test.cljindex a7a450b40f8..aac847bcd63 100644--- a/test/metabase/driver/postgres_test.clj+++ b/test/metabase/driver/postgres_test.clj@@ -1041,7 +1041,7 @@(is (=? {:data {:rows [["Rasta" "good bird" "sad bird" "toucan"]]}}(qp/process-query query))))))))))))))-;; API tests are in [[metabase.actions.api-test]]+;; API tests are in [[metabase.actions-rest.api-test]](deftest ^:parallel actions-maybe-parse-sql-violate-not-null-constraint-test(testing "violate not null constraint"(is (=? {:type :metabase.actions.error/violate-not-null-constraint,diff --git a/test/metabase/driver/sql_jdbc/actions_test.clj b/test/metabase/driver/sql_jdbc/actions_test.cljindex 46c79366b6b..2811fee173b 100644--- a/test/metabase/driver/sql_jdbc/actions_test.clj+++ b/test/metabase/driver/sql_jdbc/actions_test.clj@@ -1,6 +1,6 @@(ns ^:mb/driver-tests metabase.driver.sql-jdbc.actions-test"Most of the tests for code in [[metabase.driver.sql-jdbc.actions]] are e2e tests that live- in [[metabase.actions.api-test]]."+ in [[metabase.actions-rest.api-test]]."(:require[clojure.test :refer :all][metabase.actions.actions :as actions]diff --git a/test/metabase/embedding/api/embed_test.clj b/test/metabase/embedding_rest/api/embed_test.cljsimilarity index 99%rename from test/metabase/embedding/api/embed_test.cljrename to test/metabase/embedding_rest/api/embed_test.cljindex 3c5b1b1379a..24fd500bfef 100644--- a/test/metabase/embedding/api/embed_test.clj+++ b/test/metabase/embedding_rest/api/embed_test.clj@@ -1,4 +1,4 @@-(ns ^:mb/driver-tests metabase.embedding.api.embed-test+(ns ^:mb/driver-tests metabase.embedding-rest.api.embed-test"Tests for /api/embed endpoints."(:require[buddy.sign.jwt :as jwt]@@ -12,11 +12,11 @@[java-time.api :as t][metabase.api.common :as api][metabase.config.core :as config]- [metabase.dashboards.api-test :as api.dashboard-test]- [metabase.embedding.api.common :as api.embed.common]+ [metabase.dashboards-rest.api-test :as api.dashboard-test]+ [metabase.embedding-rest.api.common :as api.embed.common][metabase.parameters.chain-filter-test :as chain-filer-test][metabase.parameters.custom-values :as custom-values]- [metabase.public-sharing.api-test :as public-test]+ [metabase.public-sharing-rest.api-test :as public-test][metabase.queries.api.card-test :as api.card-test][metabase.query-processor.middleware.constraints :as qp.constraints][metabase.query-processor.middleware.process-userland-query-test :as process-userland-query-test]diff --git a/test/metabase/embedding/api/preview_embed_test.clj b/test/metabase/embedding_rest/api/preview_embed_test.cljsimilarity index 99%rename from test/metabase/embedding/api/preview_embed_test.cljrename to test/metabase/embedding_rest/api/preview_embed_test.cljindex cdb3aea4ba7..c613b9b6b2d 100644--- a/test/metabase/embedding/api/preview_embed_test.clj+++ b/test/metabase/embedding_rest/api/preview_embed_test.clj@@ -1,11 +1,11 @@-(ns ^:mb/driver-tests metabase.embedding.api.preview-embed-test+(ns ^:mb/driver-tests metabase.embedding-rest.api.preview-embed-test(:require[buddy.sign.jwt :as jwt][clojure.test :refer :all][crypto.random :as crypto-random]- [metabase.dashboards.api-test :as api.dashboard-test]- [metabase.embedding.api.embed-test :as embed-test]- [metabase.embedding.api.preview-embed :as api.preview-embed]+ [metabase.dashboards-rest.api-test :as api.dashboard-test]+ [metabase.embedding-rest.api.embed-test :as embed-test]+ [metabase.embedding-rest.api.preview-embed :as api.preview-embed][metabase.query-processor.pivot.test-util :as api.pivots][metabase.test :as mt][metabase.tiles.api-test :as tiles.api-test]diff --git a/test/metabase/parameters/dashboard_test.clj b/test/metabase/parameters/dashboard_test.cljindex 5f5d63596d7..8e2d2934d9b 100644--- a/test/metabase/parameters/dashboard_test.clj+++ b/test/metabase/parameters/dashboard_test.clj@@ -2,7 +2,7 @@(:require[clojure.test :refer :all][metabase.api.common :as api]- [metabase.dashboards.api-test :as api.dashboard-test]+ [metabase.dashboards-rest.api-test :as api.dashboard-test][metabase.parameters.dashboard :as parameters.dashboard][metabase.permissions.models.data-permissions :as data-perms][metabase.permissions.models.permissions-group :as perms-group]diff --git a/test/metabase/parameters/params_test.clj b/test/metabase/parameters/params_test.cljindex 89ed6dfd797..ad182b13e31 100644--- a/test/metabase/parameters/params_test.clj+++ b/test/metabase/parameters/params_test.clj@@ -3,7 +3,7 @@(:require[clojure.test :refer :all][metabase.parameters.params :as params]- [metabase.public-sharing.api-test :as public-test]+ [metabase.public-sharing-rest.api-test :as public-test][metabase.test :as mt][metabase.util :as u][toucan2.core :as t2]))diff --git a/test/metabase/public_sharing/api_test.clj b/test/metabase/public_sharing_rest/api_test.cljsimilarity index 99%rename from test/metabase/public_sharing/api_test.cljrename to test/metabase/public_sharing_rest/api_test.cljindex e1cbcf45015..747eeb921be 100644--- a/test/metabase/public_sharing/api_test.clj+++ b/test/metabase/public_sharing_rest/api_test.clj@@ -1,4 +1,4 @@-(ns ^:mb/driver-tests metabase.public-sharing.api-test+(ns ^:mb/driver-tests metabase.public-sharing-rest.api-test"Tests for `api/public/` (public links) endpoints."(:require[clojure.data.csv :as csv]@@ -9,12 +9,12 @@[metabase.analytics.snowplow-test :as snowplow-test][metabase.analytics.stats :as stats][metabase.config.core :as config]- [metabase.dashboards.api-test :as api.dashboard-test]+ [metabase.dashboards-rest.api-test :as api.dashboard-test][metabase.parameters.chain-filter-test :as chain-filter-test][metabase.parameters.custom-values :as custom-values][metabase.permissions.models.permissions :as perms][metabase.permissions.models.permissions-group :as perms-group]- [metabase.public-sharing.api :as api.public]+ [metabase.public-sharing-rest.api :as api.public][metabase.queries.api.card-test :as api.card-test][metabase.query-processor.card-test :as qp.card-test][metabase.query-processor.middleware.process-userland-query-test :as process-userland-query-test]@@ -106,7 +106,7 @@:target [:dimension [:field (mt/id :venues :id) nil]]}])}kvs))))-;; TODO -- we can probably use [[metabase.dashboards.api-test/with-chain-filter-fixtures]] for mocking this stuff+;; TODO -- we can probably use [[metabase.dashboards-rest.api-test/with-chain-filter-fixtures]] for mocking this stuff;; instead since it does mostly the same stuff anyway(defmacro with-temp-public-dashboard-and-card{:style/indent 1}@@ -1421,7 +1421,7 @@(let [result (results)](is (=? {:status "completed"}result))- ;; [[metabase.public-sharing.api/transform-results]] should remove `row_count`+ ;; [[metabase.public-sharing-rest.api/transform-results]] should remove `row_count`(testing "row_count isn't included in public endpoints"(is (nil? (:row_count result))))(is (= 6 (count (get-in result [:data :cols]))))diff --git a/test/metabase/query_processor/api_test.clj b/test/metabase/query_processor/api_test.cljindex 5ccfa2b57a1..9f5fd1575a2 100644--- a/test/metabase/query_processor/api_test.clj+++ b/test/metabase/query_processor/api_test.clj@@ -5,7 +5,8 @@{:clj-kondo/config '{:linters;; allowing `with-temp` here for now since this tests the REST API which doesn't fully use;; metadata providers.- {:discouraged-var {metabase.test/with-temp {:level :off}}}}}+ {:discouraged-var {metabase.test/with-temp {:level :off}+ toucan2.tools.with-temp/with-temp {:level :off}}}}}(:require[clojure.data.csv :as csv][clojure.set :as set]diff --git a/test/metabase/query_processor/dashboard_test.clj b/test/metabase/query_processor/dashboard_test.cljindex 9211fa9af00..5d13d3987d0 100644--- a/test/metabase/query_processor/dashboard_test.clj+++ b/test/metabase/query_processor/dashboard_test.clj@@ -1,9 +1,10 @@(ns metabase.query-processor.dashboard-test- "There are more e2e tests in [[metabase.dashboards.api-test]]."- {:clj-kondo/config '{:linters {:discouraged-var {metabase.test/with-temp {:level :off}}}}}+ "There are more e2e tests in [[metabase.dashboards-rest.api-test]]."+ {:clj-kondo/config '{:linters {:discouraged-var {metabase.test/with-temp {:level :off}+ toucan2.tools.with-temp/with-temp {:level :off}}}}}(:require[clojure.test :refer :all]- [metabase.dashboards.api-test :as api.dashboard-test]+ [metabase.dashboards-rest.api-test :as api.dashboard-test][metabase.query-processor :as qp][metabase.query-processor.card-test :as qp.card-test][metabase.query-processor.dashboard :as qp.dashboard]diff --git a/test/metabase/query_processor/streaming_test.clj b/test/metabase/query_processor/streaming_test.cljindex 3bfb8c32551..700c0ff9656 100644--- a/test/metabase/query_processor/streaming_test.clj+++ b/test/metabase/query_processor/streaming_test.clj@@ -5,7 +5,7 @@[clojure.string :as str][clojure.test :refer :all][medley.core :as m]- [metabase.embedding.api.embed-test :as embed-test]+ [metabase.embedding-rest.api.embed-test :as embed-test][metabase.lib.test-util :as lib.tu][metabase.models.visualization-settings :as mb.viz][metabase.query-processor :as qp]diff --git a/test/metabase/sample_data/impl_test.clj b/test/metabase/sample_data/impl_test.cljindex abac64e5e95..97c7a75088b 100644--- a/test/metabase/sample_data/impl_test.clj+++ b/test/metabase/sample_data/impl_test.clj@@ -15,7 +15,7 @@[metabase.util :as u][metabase.util.files :as u.files][metabase.warehouse-schema.models.field-values :as field-values]- [metabase.warehouses.api-test :as api.database-test]+ [metabase.warehouses-rest.api-test :as api.database-test][toucan2.core :as t2]));;; ---------------------------------------------------- Tooling -----------------------------------------------------diff --git a/test/metabase/setup/api_test.clj b/test/metabase/setup_rest/api_test.cljsimilarity index 99%rename from test/metabase/setup/api_test.cljrename to test/metabase/setup_rest/api_test.cljindex 0b3af496910..b7e46550a28 100644--- a/test/metabase/setup/api_test.clj+++ b/test/metabase/setup_rest/api_test.clj@@ -1,4 +1,4 @@-(ns metabase.setup.api-test+(ns metabase.setup-rest.api-test"Tests for /api/setup endpoints."(:require[clojure.spec.alpha :as s]@@ -11,7 +11,7 @@[metabase.events.core :as events][metabase.settings.core :as setting][metabase.settings.models.setting.cache-test :as setting.cache-test]- [metabase.setup.api :as api.setup]+ [metabase.setup-rest.api :as api.setup][metabase.setup.core :as setup][metabase.system.core :as system][metabase.test :as mt]diff --git a/test/metabase/users/api_test.clj b/test/metabase/users_rest/api_test.cljsimilarity index 99%rename from test/metabase/users/api_test.cljrename to test/metabase/users_rest/api_test.cljindex cb5b05758e4..ca3cb22a99b 100644--- a/test/metabase/users/api_test.clj+++ b/test/metabase/users_rest/api_test.clj@@ -1,4 +1,4 @@-(ns metabase.users.api-test+(ns metabase.users-rest.api-test"Tests for /api/user endpoints."(:require[clojure.test :refer :all]@@ -11,7 +11,7 @@[metabase.test :as mt][metabase.test.fixtures :as fixtures][metabase.test.http-client :as client]- [metabase.users.api :as api.user]+ [metabase.users-rest.api :as api.user][metabase.users.models.user :as user][metabase.users.models.user-test :as user-test][metabase.users.settings :as users.settings]@@ -930,7 +930,7 @@mt/boolean-ids-and-timestamps)))))))(deftest ^:parallel updated-user-name-test- (testing "Test that `metabase.users.api/updated-user-name` works as intended."+ (testing "Test that `metabase.users-rest.api/updated-user-name` works as intended."(let [names {:first_name "Test" :last_name "User"} ;; in a real user map, `:first_name` and `:last_name` will always be presentnonames {:first_name nil :last_name nil}firstname {:first_name "Test" :last_name nil}diff --git a/test/metabase/view_log/events/view_log_test.clj b/test/metabase/view_log/events/view_log_test.cljindex c48d8d46d94..1147dfbb26d 100644--- a/test/metabase/view_log/events/view_log_test.clj+++ b/test/metabase/view_log/events/view_log_test.clj@@ -2,12 +2,12 @@(:require[clojure.test :refer :all][java-time.api :as t]- [metabase.dashboards.api-test :as api.dashboard-test]- [metabase.embedding.api.embed-test :as embed-test]+ [metabase.dashboards-rest.api-test :as api.dashboard-test]+ [metabase.embedding-rest.api.embed-test :as embed-test][metabase.events.core :as events][metabase.permissions.models.data-permissions :as data-perms][metabase.permissions.models.permissions-group :as perms-group]- [metabase.public-sharing.api-test :as public-test]+ [metabase.public-sharing-rest.api-test :as public-test][metabase.test :as mt][metabase.test.http-client :as client][metabase.util :as u]diff --git a/test/metabase/warehouse_schema/api/field_test.clj b/test/metabase/warehouse_schema_rest/api/field_test.cljsimilarity index 99%rename from test/metabase/warehouse_schema/api/field_test.cljrename to test/metabase/warehouse_schema_rest/api/field_test.cljindex f3e4d1783c8..e1869f904e1 100644--- a/test/metabase/warehouse_schema/api/field_test.clj+++ b/test/metabase/warehouse_schema_rest/api/field_test.clj@@ -1,4 +1,4 @@-(ns ^:mb/driver-tests metabase.warehouse-schema.api.field-test+(ns ^:mb/driver-tests metabase.warehouse-schema-rest.api.field-test"Tests for `/api/field` endpoints."(:require[clojure.test :refer :all]diff --git a/test/metabase/warehouse_schema/api/table_test.clj b/test/metabase/warehouse_schema_rest/api/table_test.cljsimilarity index 99%rename from test/metabase/warehouse_schema/api/table_test.cljrename to test/metabase/warehouse_schema_rest/api/table_test.cljindex 10fe0cc88da..06a3b246c12 100644--- a/test/metabase/warehouse_schema/api/table_test.clj+++ b/test/metabase/warehouse_schema_rest/api/table_test.clj@@ -1,4 +1,4 @@-(ns ^:mb/driver-tests metabase.warehouse-schema.api.table-test+(ns ^:mb/driver-tests metabase.warehouse-schema-rest.api.table-test"Tests for /api/table endpoints."(:require[clojure.set :as set]@@ -15,7 +15,7 @@[metabase.test.http-client :as client][metabase.upload.impl-test :as upload-test][metabase.util :as u]- [metabase.warehouse-schema.api.table :as api.table]+ [metabase.warehouse-schema-rest.api.table :as api.table][toucan2.core :as t2]))(set! *warn-on-reflection* true)diff --git a/test/metabase/warehouses/api_test.clj b/test/metabase/warehouses_rest/api_test.cljsimilarity index 99%rename from test/metabase/warehouses/api_test.cljrename to test/metabase/warehouses_rest/api_test.cljindex 410431ba333..7ec7afb9930 100644--- a/test/metabase/warehouses/api_test.clj+++ b/test/metabase/warehouses_rest/api_test.clj@@ -1,4 +1,4 @@-(ns ^:mb/driver-tests metabase.warehouses.api-test+(ns ^:mb/driver-tests metabase.warehouses-rest.api-test"Tests for /api/database endpoints."(:require[clojure.string :as str]@@ -39,7 +39,7 @@[metabase.util.quick-task :as quick-task][metabase.util.random :as u.random][metabase.warehouse-schema.table :as schema.table]- [metabase.warehouses.api :as api.database]+ [metabase.warehouses-rest.api :as api.database][ring.util.codec :as codec][toucan2.core :as t2])(:import