Files
metabase/deps.edn
2026-10-02 14:29:29 -04:00

1060 lines
62 KiB
Clojure

;; -*- comment-column: 80; -*-
{:deps
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;; !! PLEASE KEEP THESE ORGANIZED ALPHABETICALLY !!
;; !! AND ADD A COMMENT EXPLAINING THEIR PURPOSE !!
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
{amalloy/ring-gzip-middleware {:mvn/version "0.1.4"} ; Ring middleware to GZIP responses if client can handle it
babashka/fs {:mvn/version "0.5.27"} ; Portable filesystem operations
buddy/buddy-core {:mvn/version "1.12.0-430" ; various cryptographic functions
:exclusions [commons-codec/commons-codec
org.bouncycastle/bcpkix-jdk15on
org.bouncycastle/bcprov-jdk15on
org.bouncycastle/bcpkix-jdk18on
org.bouncycastle/bcprov-jdk18on]}
buddy/buddy-sign {:mvn/version "3.6.1-359"} ; JSON Web Tokens; High-Level message signing library
camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.3"} ; util functions for converting between camel, snake, and kebob case
cheshire/cheshire {:mvn/version "6.2.0"} ; fast JSON encoding (used by Ring JSON middleware)
clj-bom/clj-bom {:mvn/version "0.1.2"} ; handle BOMs in imported CSVs
clj-commons/clj-yaml {:mvn/version "1.0.29"} ; Clojure wrapper for YAML library SnakeYAML
clj-commons/iapetos {:mvn/version "0.1.14"} ; prometheus metrics
clj-http/clj-http {:mvn/version "3.13.1" ; HTTP client
:exclusions [commons-codec/commons-codec
commons-io/commons-io
slingshot/slingshot]}
clojure.java-time/clojure.java-time {:mvn/version "1.4.3"} ; java.time utilities
clojurewerkz/quartzite {:mvn/version "2.2.0" ; scheduling library
:exclusions [com.mchange.c3p0/c3p0
com.zaxxer/HikariCP-java7]}
colorize/colorize {:mvn/version "0.1.1" ; string output with ANSI color codes (for logging)
:exclusions [org.clojure/clojure]}
com.clojure-goes-fast/jvm-alloc-rate-meter {:mvn/version "0.1.4"} ; Monitor heap allocation rate.
com.clojure-goes-fast/jvm-hiccup-meter {:mvn/version "0.1.1"} ; Monitor GC pauses and other system-induced pauses.
com.draines/postal {:mvn/version "2.0.5" ; SMTP library
:exclusions [com.sun.mail/jakarta.mail]}
com.fasterxml.jackson.core/jackson-core {:mvn/version "2.21.7"} ; pinned: cheshire pulls 2.21.1 which has resource exhaustion vuln
com.fasterxml.jackson.core/jackson-databind {:mvn/version "2.21.7"} ; pinned: snowplow pulls 2.13.3 which has DoS vulns
com.fasterxml.woodstox/woodstox-core {:mvn/version "7.1.1"} ; trans dep of commons-codec
; Detect the charset in uploaded CSV files
com.github.albfernandez/juniversalchardet {:mvn/version "2.5.0"}
com.github.blagerweij/liquibase-sessionlock {:mvn/version "1.6.9"} ; session lock for liquibase migrations
com.github.jknack/handlebars {:mvn/version "4.5.3"} ; templating engine
com.github.oliyh/martian-clj-http {:mvn/version "0.2.1"} ; openapi client
com.github.seancorfield/honeysql {:mvn/version "2.7.1437"} ; Honey SQL 2. SQL generation from Clojure data maps. SECURITY FLOOR: >= 2.7.1392 fixes CVE-2026-61620 (unchecked entity names -> SQL injection). Do not drop below 2.7.1392; do not remove this direct pin (Toucan2 pulls a strictly-worse transitive 2.6.1147).
com.github.seancorfield/next.jdbc {:mvn/version "1.3.1070"} ; Talk to JDBC DBs
com.github.steffan-westcott/clj-otel-api {:mvn/version "0.2.10"} ; Telemetry library
com.github.steffan-westcott/clj-otel-exporter-otlp {:mvn/version "0.2.10"} ; OTLP span exporter (gRPC and HTTP)
com.github.steffan-westcott/clj-otel-sdk {:mvn/version "0.2.10"} ; OpenTelemetry SDK for programmatic configuration
com.github.vertical-blank/sql-formatter {:mvn/version "2.0.5"} ; Java SQL formatting library https://github.com/vertical-blank/sql-formatter
com.google.auth/google-auth-library-credentials {:mvn/version "1.40.0"} ; dep for BigQuery, Databricks, and Snowflake. Require here rather than letting different dep versions stomp on each other — see #70908
com.google.auth/google-auth-library-oauth2-http {:mvn/version "1.40.0"} ; Token refresh for the Metabot Google provider. Also a dep for BigQuery. Keep the version in step with google-auth-library-credentials
com.google.code.gson/gson {:mvn/version "2.12.1"} ; dep for BigQuery, Databricks, and Snowflake. Pin here so driver plugin JARs all use the same version — see #73736
com.google.guava/guava {:mvn/version "33.5.0-jre"} ; dep for BigQuery, Spark, and GA. Require here rather than letting different dep versions stomp on each other — see comments on #9697
com.h2database/h2 ^:antq/exclude ; https://metaboat.slack.com/archives/CKZEMT1MJ/p1727191010259979
{:mvn/version "2.1.214"} ; embedded SQL database
com.ibm.icu/icu4j {:mvn/version "78.1"} ; Used to transliterate Unicode characters into Latin characters
com.knuddels/jtokkit {:mvn/version "1.1.0"} ; Java tokenizer library for OpenAI models, used for token counting in semantic search
com.mchange/c3p0 {:mvn/version "0.14.1"} ; DB connection pool
com.snowplowanalytics/snowplow-java-tracker ^:antq/exclude ; 2+ depend on apache httpclient 5.x, but saml and clj-http depend on 4.x
{:mvn/version "1.0.1"} ; Snowplow analytics
com.sun.mail/jakarta.mail ^:antq/exclude ; 2+ changes imports from javax.mail to jakarta.mail
{:mvn/version "1.6.8"} ; SMTP lib, required by postal
com.taoensso/encore {:mvn/version "3.160.1"} ; Utilities library (used by Nippy)
com.taoensso/nippy {:mvn/version "3.6.2"} ; Fast serialization (i.e., GZIP) library for Clojure
com.vladsch.flexmark/flexmark {:mvn/version "0.64.8"} ; Markdown parsing
com.vladsch.flexmark/flexmark-ext-autolink
{:mvn/version "0.64.8"} ; Flexmark extension for auto-linking bare URLs
commons-codec/commons-codec {:mvn/version "1.19.0"} ; Apache Commons -- useful codec util fns
commons-io/commons-io {:mvn/version "2.20.0"} ; Apache Commons -- useful IO util fns
commons-net/commons-net {:mvn/version "3.12.0"} ; Apache Commons -- useful network utils. Transitive dep of Snowplow, pinned due to CVE-2021-37533
commons-validator/commons-validator {:mvn/version "1.10.0" ; Apache Commons -- useful validation util fns
:exclusions [commons-beanutils/commons-beanutils
commons-digester/commons-digester
commons-logging/commons-logging]}
compojure/compojure {:mvn/version "1.7.2" ; HTTP Routing library built on Ring
:exclusions [ring/ring-codec]}
diehard/diehard {:mvn/version "0.12.0"}
dk.ative/docjure {:mvn/version "1.22.0" ; excel export
:exclusions [org.apache.poi/poi
org.apache.poi/poi-ooxml]}
environ/environ {:mvn/version "1.2.0"} ; env vars/Java properties abstraction
hiccup/hiccup {:mvn/version "2.0.0"} ; HTML templating
inflections/inflections {:mvn/version "0.15.0"} ; Clojure/Script library used for prularizing words
instaparse/instaparse {:mvn/version "1.5.0"} ; Make your own parser
io.github.camsaul/toucan2 {:mvn/version "1.0.575"}
io.github.eerohele/pp {#_#_:git/tag "2024-11-13.77" ; super fast pretty-printing library
:git/sha "ffc4edc482c057cd9412c62f018a41e9140c618b"
:git/url "https://github.com/eerohele/pp"}
io.github.metabase/macaw {:mvn/version "0.2.36"} ; Parse native SQL queries
io.opentelemetry/opentelemetry-api {:mvn/version "1.62.0"} ; pinned: clj-otel-api 0.2.10 pulls 1.54.1 (W3CBaggagePropagator DoS vuln)
io.prometheus/simpleclient_hotspot {:mvn/version "0.16.0"} ; prometheus jvm collector
junegunn/grouper {:mvn/version "0.1.1"} ; Batch processing helper
kixi/stats {:mvn/version "0.5.9" ; Various statistic measures implemented as transducers
:exclusions [org.clojure/data.avl]}
medley/medley {:mvn/version "1.4.0"} ; lightweight lib of useful functions
metabase/connection-pool {:mvn/version "1.2.0"} ; simple wrapper around C3P0. JDBC connection pools
metabase/saml20-clj {:mvn/version "4.3.0"
:exclusions [; EE SAML integration TODO: bump version when we release the library
org.bouncycastle/bcpkix-jdk15on
org.bouncycastle/bcprov-jdk15on
org.bouncycastle/bcpkix-jdk18on
org.bouncycastle/bcprov-jdk18on]}
metabase/throttle {:mvn/version "1.0.2"} ; Tools for throttling access to API endpoints and other code pathways
methodical/methodical {:mvn/version "1.0.127"} ; drop-in replacements for Clojure multimethods and adds several advanced features
metosin/malli {:git/url "https://github.com/metabase/malli" ; Data-driven Schemas for Clojure/Script and babashka
:git/sha "b4a2d78647a049870b316753d7aae7fb4ade3ae5"} ; patched to resolve an issue causing OOM
net.carcdr/oidc-provider {:mvn/version "0.6.2"} ; OAuth/OIDC server abstract implementation
net.cgrand/macrovich {:mvn/version "0.2.2"} ; utils for writing macros for both Clojure & ClojureScript
net.redhogs.cronparser/cron-parser-core {:mvn/version "3.5" ; describe Cron schedule in human-readable language
:exclusions [org.slf4j/slf4j-api]}
net.sf.cssbox/cssbox {:mvn/version "5.0.2" ; HTML / CSS rendering
:exclusions [org.slf4j/slf4j-api
junit/junit]}
org.apache.commons/commons-compress {:mvn/version "1.28.0"} ; compression utils
org.apache.commons/commons-lang3 {:mvn/version "3.20.0"} ; helper methods for working with java.lang stuff
org.apache.datasketches/datasketches-java ^:antq/exclude ; Sketching algorithms (used for fingerprinting)
{:mvn/version "7.0.1"} ; version is fixed to ensure JDK21 compatibility.
org.apache.httpcomponents.client5/httpclient5 {:mvn/version "5.6.4"} ; pinned: must pair with httpcore5 5.4.x (upstream pairing); ClickHouse JDBC needs httpcore5 5.3.4+
org.apache.httpcomponents.core5/httpcore5 {:mvn/version "5.4.3"} ; pinned: 5.4.2+
org.apache.httpcomponents.core5/httpcore5-h2 {:mvn/version "5.4.3"} ; pinned: must match httpcore5 version
org.apache.logging.log4j/log4j-1.2-api {:mvn/version "2.26.1"} ; apache logging framework
org.apache.logging.log4j/log4j-api {:mvn/version "2.26.1"} ; add compatibility with log4j 1.2
org.apache.logging.log4j/log4j-core {:mvn/version "2.26.1"} ; apache logging framework
org.apache.logging.log4j/log4j-jcl {:mvn/version "2.26.1"} ; allows the commons-logging API to work with log4j 2
org.apache.logging.log4j/log4j-jul {:mvn/version "2.26.1"} ; java.util.logging (JUL) -> Log4j2 adapter
org.apache.logging.log4j/log4j-layout-template-json
{:mvn/version "2.26.1"} ; allows the custom json logging format
org.apache.logging.log4j/log4j-slf4j2-impl
{:mvn/version "2.26.1"} ; allows the slf4j2 API to work with log4j 2
org.apache.pdfbox/pdfbox {:mvn/version "3.0.8"} ; PDF generation (backend dashboard PDF prototype)
org.apache.poi/poi {:mvn/version "5.5.1"} ; Work with Office documents (e.g. Excel spreadsheets) -- newer version than one specified by Docjure
org.apache.poi/poi-ooxml {:mvn/version "5.5.1"
:exclusions [org.bouncycastle/bcpkix-jdk15on
org.bouncycastle/bcprov-jdk15on]}
org.apache.poi/poi-ooxml-full {:mvn/version "5.5.1"}
org.apache.sshd/sshd-core {:mvn/version "2.19.0" ; ssh tunneling and test server
:exclusions [org.slf4j/slf4j-api
org.slf4j/jcl-over-slf4j]}
org.apache.tika/tika-core {:mvn/version "3.2.3"}
org.apache.xmlgraphics/batik-all {:mvn/version "1.19"} ; SVG -> image
org.bouncycastle/bcpkix-jdk18on {:mvn/version "1.85"} ; Bouncy Castle crypto library -- explicit version of BC specified to resolve illegal reflective access errors
org.bouncycastle/bcprov-jdk18on {:mvn/version "1.85.2"}
org.clj-commons/claypoole {:mvn/version "1.2.2"} ; Threadpool tools for Clojure
org.clj-commons/dirigiste {:mvn/version "1.0.4"} ; Instrumented object pooling
org.clj-commons/hickory {:mvn/version "0.7.7" ; Parse HTML into Clojure data structures
:exclusions [org.jsoup/jsoup]}
org.clojars.pntblnk/clj-ldap {:mvn/version "0.0.17"} ; LDAP client
org.clojure/clojure {:mvn/version "1.12.3"}
org.clojure/core.async {:mvn/version "1.7.701"
:exclusions [org.clojure/tools.reader]}
org.clojure/core.memoize {:mvn/version "1.1.266"} ; useful FIFO, LRU, etc. caching mechanisms
org.clojure/data.csv {:mvn/version "1.1.0"} ; CSV parsing / generation
org.clojure/java.classpath {:mvn/version "1.1.0"} ; examine the Java classpath from Clojure programs
org.clojure/java.jdbc {:mvn/version "0.7.12"} ; basic JDBC access from Clojure
org.clojure/java.jmx {:mvn/version "1.1.0"} ; JMX bean library, for exporting diagnostic info
org.clojure/math.combinatorics {:mvn/version "0.3.0"} ; combinatorics functions
org.clojure/math.numeric-tower {:mvn/version "0.1.0"} ; math functions like `ceil`
org.clojure/tools.cli {:mvn/version "1.2.245"} ; command-line argument parsing
org.clojure/tools.logging {:mvn/version "1.3.0"} ; logging framework
org.clojure/tools.macro {:mvn/version "0.2.1"} ; local macros
org.clojure/tools.namespace {:mvn/version "1.5.0"}
org.clojure/tools.reader {:mvn/version "1.5.2"}
org.clojure/tools.trace {:mvn/version "0.8.0"} ; function tracing
org.eclipse.jetty/jetty-server {:mvn/version "12.1.13"}
org.eclipse.jetty/jetty-unixdomain-server {:mvn/version "12.1.13"}
org.eclipse.jetty.ee9/jetty-ee9-servlet {:mvn/version "12.1.13"}
org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server {:mvn/version "12.1.13"}
org.eclipse.jgit/org.eclipse.jgit {:mvn/version "7.3.0.202506031305-r"}; Java implementation of Git version control system
org.flatland/ordered {:mvn/version "1.15.12"} ; ordered maps & sets
org.graalvm.polyglot/js-community {:mvn/version "25.0.1" :extension "pom"} ; JavaScript engine
org.graalvm.polyglot/polyglot {:mvn/version "25.0.1"} ; GraalVM platform, required by JS engine
org.graalvm.polyglot/python {:mvn/version "25.0.1"
:extension "pom"}
org.jsoup/jsoup {:mvn/version "1.23.2"} ; required by hickory
org.liquibase/liquibase-core {:mvn/version "4.33.0" ; migration management (Java lib)
:exclusions [ch.qos.logback/logback-classic]}
org.mariadb.jdbc/mariadb-java-client ^:antq/exclude ; 3.x only support jdbc:mariadb, so using 2.x for now
{:mvn/version "2.7.15"} ; MySQL/MariaDB driver
org.mindrot/jbcrypt {:mvn/version "0.4"} ; Crypto library
org.postgresql/postgresql {:mvn/version "42.7.12"} ; Postgres driver
org.semver4j/semver4j {:mvn/version "6.0.0"} ; Semantic versioning parsing & comparison
org.slf4j/slf4j-api {:mvn/version "2.0.17"} ; abstraction for logging frameworks -- allows end user to plug in desired logging framework at deployment time
org.tcrawley/dynapath {:mvn/version "1.1.0"} ; Dynamically add Jars (e.g. Oracle or Vertica) to classpath
org.threeten/threeten-extra {:mvn/version "1.8.0"} ; extra Java 8 java.time classes like DayOfMonth and Quarter
org.xerial/sqlite-jdbc {:mvn/version "3.50.3.0"} ; SQLite driver -- ships in core because the bundled Sample Database runs on it
potemkin/potemkin {:mvn/version "0.4.8" ; utility macros & fns
:exclusions [riddley/riddley]}
pretty/pretty {:mvn/version "1.0.5"} ; protocol for defining how custom types should be pretty printed
;; Dependency below is our fork of redux - utility functions for building and composing transducers. The
;; group/artifact name is the same as with the upstream so that it overrides the original dependency everywhere.
redux/redux {:git/url "https://github.com/metabase/redux"
:sha "4a37feaf817a2a6b5ef688c927f6fd4375964433"}
riddley/riddley {:mvn/version "0.2.0"} ; code walking lib -- used interally by Potemkin, manifold, etc.
ring/ring-core {:mvn/version "1.15.3"} ; HTTP abstraction
ring/ring-jetty-adapter {:mvn/version "1.15.3" ; Ring adapter for Jetty
:exclusions [org.eclipse.jetty/jetty-server
org.eclipse.jetty/jetty-unixdomain-server
org.eclipse.jetty.ee9/jetty-ee9-servlet
org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server]}
selmer/selmer {:mvn/version "1.12.70"} ; Jinja-like templates for Clojure
slingshot/slingshot {:mvn/version "0.12.2"} ; enhanced throw/catch, used by other deps
software.amazon.awssdk/s3 {:mvn/version "2.40.13" ; AWS SDK v2 for S3
;; Metabase uses only sync S3Client (Apache HttpClient) + S3Presigner;
;; excluding the async Netty HTTP client removes all transitive netty
;; from the main uberjar and avoids version conflicts with driver-bundled netty.
:exclusions [software.amazon.awssdk/netty-nio-client]}
software.amazon.awssdk/sts {:mvn/version "2.36.2" ; Required for S3 client to use service account
:exclusions [software.amazon.awssdk/netty-nio-client]}
software.amazon.jdbc/aws-advanced-jdbc-wrapper {:mvn/version "2.6.5"} ; AWS JDBC wrapper for IAM authentication
stencil/stencil {:mvn/version "0.5.0"} ; Mustache templates for Clojure
techascent/tech.ml.dataset {:mvn/version "8.003"} ; Tabular data processing for chart statistics
user-agent/user-agent {:mvn/version "0.1.1"} ; User-Agent string parser, for Login History page & elsewhere
weavejester/dependency {:mvn/version "1.0.0"} ; Dependency graphs and topological sorting
xerces/xercesImpl {:mvn/version "2.12.2"}} ; SAX2 parser, transient dependency of batik
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;; !! PLEASE KEEP NEW DEPENDENCIES ABOVE ALPHABETICALLY ORGANIZED AND ADD COMMENTS EXPLAINING THEM. !!
;; !! *PLEASE DO NOT* ADD NEW ONES TO THE BOTTOM OF THE LIST. !!
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
:paths
["src" "resources"]
;; These are needed for the Athena and Redshift drivers if you are developing against them locally. If those drivers'
;; dependencies are not included (i.e., if we don't have the `:drivers` profile), these repos are effectively
;; ignored.
;;
;; 1. Maven repos from subprojects do not get copied over -- see
;; https://ask.clojure.org/index.php/10726/deps-manifest-dependencies-respect-repos-dependent-project
;;
;; 2. You cannot include `:mvn/repos` inside of an alias -- see
;; https://ask.clojure.org/index.php/12367/support-mvn-repos-inside-an-alias -- if we could, this could go in the
;; `:drivers` alias instead.
:mvn/repos
{"metabase-maven-downloads" {:url "https://s3.amazonaws.com/metabase-maven-downloads"}
"redshift" {:url "https://s3.amazonaws.com/redshift-maven-repository/release"}
;; for metabase/saml20-clj
"opensaml" {:url "https://build.shibboleth.net/nexus/content/repositories/releases/"}}
:aliases
{;;; Local Dev & test profiles
;; for local development: start a REPL with
;;
;; clojure -A:dev (basic dev REPL that includes test namespaces)
;; clojure -A:dev:drivers:drivers-dev (dev REPL w/ drivers + tests)
;; clojure -A:dev:ee:ee-dev (dev REPL w/ EE code including tests)
;;
;; You can start a web server from this REPL with
;;
;; (require 'dev)
;; (dev/start!)
:dev
{:extra-deps
{cider/cider-nrepl {:mvn/version "0.58.0"} ; nREPL server for CIDER
clj-http-fake/clj-http-fake {:mvn/version "1.0.4"
:exclusions [slingshot/slingshot]}
clj-kondo/clj-kondo {:mvn/version "2026.07.24"} ; included here mainly to facilitate working on the stuff in `.clj-kondo/src`
cloverage/cloverage {:mvn/version "1.2.4"}
com.clojure-goes-fast/clj-async-profiler
{:mvn/version "1.6.2"} ; Enables local profiling and heat map generation
com.clojure-goes-fast/clj-memory-meter
{:mvn/version "0.4.0"} ; Enables easy memory measurement
com.gfredericks/test.chuck {:mvn/version "0.2.15"} ; generating strings from regexes (useful with malli)
com.github.erosb/json-sKema {:mvn/version "0.25.0"} ; validating MBQL JSON Schema
com.google.jimfs/jimfs {:mvn/version "1.3.2"} ; in-memory NIO filesystems (e.g. Windows) for testing path handling
criterium/criterium {:mvn/version "0.4.6"} ; benchmarking library
djblue/portal {:mvn/version "0.62.0"} ; ui for inspecting values
integrant/integrant {:mvn/version "1.0.1"} ; component lifecycle management
io.github.camsaul/humane-are {:mvn/version "1.0.2"} ; cleaner test output
io.github.metabase/hawk {:mvn/version "1.0.19"} ; test runner
io.opentelemetry/opentelemetry-sdk-testing {:mvn/version "1.54.1"} ; InMemorySpanExporter for tracing tests; matches sdk impl (clj-otel-sdk 0.2.10 → 1.54.1); api is separately pinned to 1.62.0
io.zonky.test/embedded-postgres {:mvn/version "2.2.2"} ; In-process postgres for dev and testing
;; Native postgres binaries for every OS/arch we're likely to run on in
;; dev or CI. Without these Zonky falls back to x86_64 under Rosetta on
;; Apple Silicon and prints a warning. Versions should be pinned to the
;; latest version shipped by Zonky.
io.zonky.test.postgres/embedded-postgres-binaries-darwin-amd64 {:mvn/version "18.3.0"} ; macOS Intel
io.zonky.test.postgres/embedded-postgres-binaries-darwin-arm64v8 {:mvn/version "18.3.0"} ; macOS Apple Silicon
io.zonky.test.postgres/embedded-postgres-binaries-linux-amd64 {:mvn/version "18.3.0"} ; Linux x86_64 (covers ubuntu-latest GH Actions runner)
io.zonky.test.postgres/embedded-postgres-binaries-linux-arm64v8 {:mvn/version "18.3.0"} ; Linux arm64
io.zonky.test.postgres/embedded-postgres-binaries-windows-amd64 {:mvn/version "18.3.0"} ; Windows x86_64
jonase/eastwood {:mvn/version "1.4.3" ; inspects namespaces and reports possible problems using tools.analyzer
:exclusions
[org.ow2.asm/asm-all]}
lambdaisland/deep-diff2 {:mvn/version "2.12.219"} ; way better diffs
net.solovyov/hashp {:mvn/version "0.4.0-1"} ; debugging/spying utility
nrepl/nrepl {:mvn/version "1.5.1"} ; nREPL server
pjstadig/humane-test-output {:mvn/version "0.11.0"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.11.0"} ; refactoring helpers for cider
reifyhealth/specmonstah {:mvn/version "2.1.0"
:exclusions [org.clojure/clojure
org.clojure/clojurescript]} ; lets you write test fixtures that are clear, concise, and easy to maintain (clojure.spec)
rewrite-clj/rewrite-clj {:mvn/version "1.2.54"} ; clojure source parsing and rewriting
ring/ring-devel {:mvn/version "1.15.3"} ; reload clojure files on the fly
ring/ring-mock {:mvn/version "0.6.2"} ; creating Ring request maps for testing purposes
talltale/talltale {:mvn/version "0.5.14"}} ; generates fake data, useful for prototyping or load testing
:extra-paths ["dev/src" "local/src" "test" "test_resources" ".clj-kondo/src" ".clj-kondo/test" "dev/resources"]
:jvm-opts ["-Dmb.run.mode=dev"
"-Dmb.field.filter.operators.enabled=true"
"-Dmb.test.env.setting=ABCDEFG"
"-Dmb.warehouse.allowed.networks=allow-all"
"-Dmacaw.run.mode=dev"
"-Duser.timezone=UTC"
"-Dfile.encoding=UTF-8"
"-Duser.language=en"
"-Duser.country=US"
;; Allow clojure goes fast tooling to work
"-Djdk.attach.allowAttachSelf"
;; have core.async report usages of blocking operations in go blocks
"-Dclojure.core.async.go-checking=true"
;; This will suppress the warning about dynamically loaded agents (like clj-memory-meter)
"-XX:+EnableDynamicAgentLoading"
;; set the logging properties set in `metabase.core.bootstrap`. calling (dev) will load it but
;; putting here to be sure
"-Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector"
"-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory"
;; If Clojure fails to start (e.g. because of a compilation error somewhere) print the error
;; report/stacktrace to stderr rather than to a random EDN file in /tmp/
"-Dclojure.main.report=stderr"
;; Exceptions that get thrown repeatedly are created without stacktraces as a performance
;; optimization in newer Java versions. This makes debugging pretty hard when working on stuff
;; locally -- prefer debuggability over performance for local dev work.
"-XX:-OmitStackTraceInFastThrow"
;; prevent Java icon from randomly popping up in macOS dock
"-Djava.awt.headless=true"
;; ignore options that aren't present in older versions of Java, like the one below:
"-XX:+IgnoreUnrecognizedVMOptions"
;; include more details for debugging NPEs (Java 14+)
"-XX:+ShowCodeDetailsInExceptionMessages"
;; test self-signed certificates for testing
"-Dmail.smtps.ssl.trust=*"
;; Support Snowflake in Java 17+. See https://github.com/metabase/metabase/pull/47997 and
;; https://community.snowflake.com/s/article/JDBC-Driver-Compatibility-Issue-With-JDK-16-and-Later
"--add-opens"
"java.base/java.nio=ALL-UNNAMED"]}
;; This is probably the best way to start the app for dev mode.
;; 1. Runs (dev) (start!) for you
;; 2. This starts the repl too: just like the :nrepl alias below. (see [[user/-main]])
;; clj -M:dev:dev-start:drivers:drivers-dev:ee:ee-dev
:dev-start {:main-opts ["-m" "user"]
:jvm-opts ["-Dmb.run.mode=dev"
"-Dmb.warehouse.allowed.networks=allow-all"
"-Dmacaw.run.mode=dev"
"-Djava.awt.headless=true"]}
;; includes test code as source paths. Run tests with clojure -X:dev:test
:test
{:extra-paths ["test_config"]
:exec-fn metabase.test-runner/find-and-run-tests-cli
:exec-args {}
:jvm-opts ["-Dmb.run.mode=test"
"-Dmacaw.run.mode=test"
"-Dmb.db.in.memory=true"
"-Dmb.jetty.join=false"
"-Dmb.field.filter.operators.enabled=true"
"-Dmb.api.key=test-api-key"
;; Test warehouses live on localhost, so the network policy has to be off by default or every test
;; that creates one breaks.
"-Dmb.warehouse.allowed.networks=allow-all"
;; Port 0 tells the OS to assign a random free port, allowing parallel test runs.
;; The actual port is read from the running Jetty server via server.instance/server-port.
"-Dmb.jetty.port=0"]}
;; Includes the small generator tests that validate development-only repository configuration.
:dev/test
{:extra-paths ["dev/test"]}
;; run the dev server with
;; clojure -M:run
;; clojure -M:run:drivers (include all drivers)
;; clojure -M:run:ee (include EE code)
:run
{:main-opts ["-m" "metabase.core.bootstrap"]
:jvm-opts ["-Dmb.run.mode=dev"
"-Dmb.warehouse.allowed.networks=allow-all"
"-Dmacaw.run.mode=dev"
"-Djava.awt.headless=true"]} ; prevent Java icon from randomly popping up in macOS dock
;; Cypress end-to-end tests require a highly specific setup, which includes both the environment and the H2 database
;; initialized with the correct set of settings. This alias orchestrates those pieces.
;; Prefer using it when running local backend for Cypress end-to-end tests.
;; Two things you can still control via env vars: MB_JETTY_PORT and MB_DB_FILE
;;
;; clojure -M:dev:drivers:(oss|ee):run:e2e
:e2e
{:jvm-opts ["-Dmb.run.mode=e2e"
"-Dmb.warehouse.allowed.networks=allow-all"
"-Dmetastore.dev.server.url=https://token-check.staging.metabase.com"
;; prevent Java icon from randomly popping up in macOS dock
"-Djava.awt.headless=true"
;; ignore options that aren't recognized by older versions of Java
"-XX:+IgnoreUnrecognizedVMOptions"
;; test self-signed certificates for testing
"-Dmail.smtps.ssl.trust=*"
;; Writes all logs to a file logs/test.log
"-Dlog4j.configurationFile=file:frontend/test/__runner__/log4j2.xml"
"-Duser.timezone=US/Pacific"
"-Dmb.db.type=h2"
"-Dmb.enable.test.endpoints=true"
;; Use the in-memory queue backend in e2e. The persistent Quartz backend keeps its
;; durable-job state in the app DB's QRTZ_* tables, but e2e restores app-db snapshots
;; between tests (`H.restore`), which drops those tables out from under the running
;; scheduler while the per-process `ensured-jobs` cache still thinks the jobs exist —
;; so post-restore publishes target a non-existent job and never deliver. e2e is a
;; single node, so the in-memory backend (no app-db state, unaffected by restore) is
;; the correct fit.
"-Dmb.queue.backend=memory"
"-Dmb.dangerous.unsafe.enable.testing.h2.connections.do.not.enable=true"
;; Ignore connection URI in favor of the MB_DB_FILE
"-Dmb.db.connection.uri="
;; Unset the premium token so that tests can set it programmatically
"-Dmb.premium.embedding.token="
;; Ignore config.yml
"-Dmb.config.file.path=__cypress__"
;; We use Snowplow micro in e2e tests
"-Dmb.snowplow.available=true"
"-Dmb.snowplow.url=http://localhost:9090"
;; See: https://github.com/metabase/metabase/pull/38280
"-Dmb.last.analytics.checksum=-1"
"-Dmb.experimental.search.block.on.queue=true"
"-Dmb.search.engine=appdb"
;; We use a local webhook service for testing
"-Dmb.http.channel.allowed.networks=allow-all"]}
;; run the prod server when generating docs
;; as some default values differ between dev and prod
;;
;; clojure -M:ee:doc api-documentation
:doc
{:main-opts ["-m" "metabase.core.bootstrap"]
:jvm-opts ["-Dmb.run.mode=prod"
"-Dmb.warehouse.allowed.networks=allow-all"
"-Djava.awt.headless=true"]} ; prevent Java icon from randomly popping up in macOS dock
;; alias for CI-specific options.
:ci
{:jvm-opts ["-Xmx12g"
"-Xms12g"
;; normally CircleCI sets `CI` as an env var, so this is mostly to replicate that locally. Hawk will not
;; print the progress bar in output when this is set. Progress bars aren't very CI friendly
"-Dci=TRUE"]}
;; include EE source code.
:ee
{:extra-paths ["enterprise/backend/src"]
;; make sure these stay in lockstep with their respective modules
:extra-deps {com.oracle.database.jdbc/ojdbc17 {:mvn/version "23.9.0.25.07"}
com.vertica.jdbc/vertica-jdbc
^:antq/exclude {:mvn/version "23.4.0-0"}}}
;; Include EE tests.
;; for EE dev: `clojure -X:dev:ee:ee-dev`
;; for EE tests: `clojure -X:dev:ee:ee-dev:test`
:ee-dev
{:extra-paths ["enterprise/backend/test"]}
;; these aliases exist for symmetry with the ee aliases. Empty for now.
:oss
{}
:oss-dev
{}
;; Generate BE documentation with
;; clojure -M:marginalia
:marginalia
{:extra-deps
{marginalia/marginalia {:mvn/version "0.9.2"}}
:main-opts ["-m" "marginalia.main" "-n" "Metabase" "-d" "backend-docs" "-D"
"The simplest, fastest way to get business intelligence and analytics to everyone in your company 😋"
"dev" "src" "enterprise/backend/src"]}
;; Generate a single file's docs with
;; clojure -M:marginalia/one src/metabase/some/namespace.clj
;; which creates `backend-docs/metabase.some.namespace.html`
:marginalia/one
{:extra-deps
{marginalia/marginalia {:mvn/version "0.9.2"}}
:main-opts ["-m" "marginalia.main" "-m" "-n" "Metabase" "-d" "backend-docs" "-D"
"The simplest, fastest way to get business intelligence and analytics to everyone in your company 😋"]}
;; Find outdated versions of dependencies. Run with `clojure -M:outdated`
:outdated {;; Note that it is `:deps`, not `:extra-deps`
:deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
:main-opts ["-m" "antq.core" "--skip=github-action"]}
:cljs
{:extra-paths ["test"]
:jvm-opts ["-Dmb.run.mode=dev"
"-Dmb.warehouse.allowed.networks=allow-all"]
:extra-deps
{binaryage/devtools {:mvn/version "1.0.7"}
cider/cider-nrepl {:mvn/version "0.58.0"}
cider/piggieback {:mvn/version "0.6.1"}
cljs-bean/cljs-bean {:mvn/version "1.9.0"}
com.lambdaisland/glogi {:mvn/version "1.3.169"}
io.github.metabase/hawk {:mvn/version "1.0.19"}
org.clojars.mmb90/cljs-cache {:mvn/version "0.1.4"}
org.clojure/clojurescript {:mvn/version "1.12.134"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.11.0"}
;; keep it in sync with package.json
thheller/shadow-cljs {:mvn/version "3.3.5"}}}
;; for local dev -- include the drivers locally with :dev:drivers
:drivers
{:extra-deps
{metabase/driver-modules {:local/root "modules/drivers"}}}
;; for local dev: include drivers as well as their tests.
;;
;; clojure -X:dev:drivers:drivers-dev:test
;;
;; or
;;
;; clojure -X:dev:ee:ee-dev:drivers:drivers-dev:test (for EE)
:drivers-dev
{:extra-paths
["modules/drivers/athena/test"
"modules/drivers/bigquery-cloud-sdk/test"
"modules/drivers/clickhouse/test"
"modules/drivers/databricks/test"
"modules/drivers/druid-jdbc/test"
"modules/drivers/hive-like/test"
"modules/drivers/mongo/test"
"modules/drivers/oracle/test"
"modules/drivers/presto-jdbc/test"
"modules/drivers/redshift/test"
"modules/drivers/snowflake/test"
"modules/drivers/sparksql/test"
"modules/drivers/sqlserver/test"
"modules/drivers/starburst/test"
"modules/drivers/vertica/test"]}
;;; Linters
;; clojure -M:kondo --lint src test
;;
;; clojure -M:kondo --version
;;
;; clojure -M:kondo --copy-configs --dependencies --lint "$(clojure -A:dev -Spath)" --skip-lint --parallel
;;
;; Run Kondo from the JVM using the pinned version. Preferable to running the installed command since we can pin the
;; version here which may be different from the version installed on your computer.
;;
;; Use this to only run Kondo against specific files.
:kondo
{:replace-deps
{clj-kondo/clj-kondo {:mvn/version "2026.07.24"}}
:main-opts
["-m" "clj-kondo.main"]}
;; clojure -M:kondo:kondo/all
;;
;; Like the command above but includes arguments so it lints everything.
:kondo/all
{:main-opts
["-m" "clj-kondo.main"
;; disabled for now since this seems to cause random failures -- see https://github.com/clj-kondo/clj-kondo/issues/2218
#_"--parallel"
;; enable this if Kondo isn't working as expected or if LSP jump-to-definition is being fussy
#_"--debug"
"--lint"
"src"
"test"
"enterprise/backend/src"
"enterprise/backend/test"
"dev/test/metabase"
"bin/build/src"
"bin/build/test"
"bin/lint-migrations-file/src"
"bin/lint-migrations-file/test"
"bin/load-namespaces/src"
"bin/load-namespaces/test"
"bin/release-list/src"
"bin/release-list/test"
"modules/drivers/athena/src"
"modules/drivers/athena/test"
"modules/drivers/bigquery-cloud-sdk/src"
"modules/drivers/bigquery-cloud-sdk/test"
"modules/drivers/clickhouse/src"
"modules/drivers/clickhouse/test"
"modules/drivers/databricks/src"
"modules/drivers/databricks/test"
"modules/drivers/druid-jdbc/src"
"modules/drivers/druid-jdbc/test"
"modules/drivers/hive-like/src"
"modules/drivers/hive-like/test"
"modules/drivers/mongo/src"
"modules/drivers/mongo/test"
"modules/drivers/oracle/src"
"modules/drivers/oracle/test"
"modules/drivers/presto-jdbc/src"
"modules/drivers/presto-jdbc/test"
"modules/drivers/redshift/src"
"modules/drivers/redshift/test"
"modules/drivers/snowflake/src"
"modules/drivers/snowflake/test"
"modules/drivers/sparksql/src"
"modules/drivers/sparksql/test"
"modules/drivers/sqlserver/src"
"modules/drivers/sqlserver/test"
"modules/drivers/starburst/src"
"modules/drivers/starburst/test"
"modules/drivers/vertica/src"
"modules/drivers/vertica/test"]}
;; clojure -M:ee:drivers:load-namespaces
;;
;; checks that all the namespaces we actually ship can be loaded, without any dependencies that we don't
;; ship (such as `:dev` dependencies). See #27009 for more context.
:load-namespaces
{:extra-paths ["bin/load-namespaces/src"]
:main-opts ["-m" "load-namespaces.core"
"src"
"enterprise/backend/src"
"modules/drivers/athena/src"
"modules/drivers/bigquery-cloud-sdk/src"
"modules/drivers/clickhouse/src"
"modules/drivers/databricks/src"
"modules/drivers/druid-jdbc/src"
"modules/drivers/hive-like/src"
"modules/drivers/mongo/src"
"modules/drivers/oracle/src"
"modules/drivers/presto-jdbc/src"
"modules/drivers/redshift/src"
"modules/drivers/snowflake/src"
"modules/drivers/sparksql/src"
"modules/drivers/sqlserver/src"
"modules/drivers/starburst/src"
"modules/drivers/vertica/src"]
:jvm-opts ["-Dclojure.main.report=stderr"]}
;; clojure -X:dev:ee:ee-dev:drivers:drivers-dev:test:eastwood
:eastwood
{:exec-fn metabase.linters.eastwood/eastwood
:exec-args {;; manually specify the source paths for the time being (exclude test paths) until we fix Eastwood
;; errors in the test paths (once PR #17193 is merged)
:source-paths ["src"
"enterprise/backend/src"
"modules/drivers/athena/src"
"modules/drivers/bigquery-cloud-sdk/src"
"modules/drivers/clickhouse/src"
"modules/drivers/databricks/src"
"modules/drivers/druid-jdbc/src"
"modules/drivers/hive-like/src"
"modules/drivers/mongo/src"
"modules/drivers/oracle/src"
"modules/drivers/presto-jdbc/src"
"modules/drivers/redshift/src"
"modules/drivers/snowflake/src"
"modules/drivers/sparksql/src"
"modules/drivers/sqlserver/src"
"modules/drivers/starburst/src"
"modules/drivers/vertica/src"]
:exclude-linters [;; Turn this off temporarily until we finish removing
;; self-deprecated functions & macros
:deprecations
;; this has a fit in libs that use Potemkin `import-vars` such
;; as `java-time`
:implicit-dependencies
;; too many false positives for now
:unused-ret-vals
;; hard to clear on for metabase.util.match macros, and disabling the linter just
;; there doesn't seem to work
:unused-meta-on-macro
;; Kondo lints this for us anyway, and this isn't as easy to configure.
:wrong-arity
;; Kondo lints this for us anyway, and this isn't as easy to configure.
:suspicious-expression]
;; Snowplow has a dynamic dependency on okhttp3.CookieJar that we
;; don't use but eastwood detects. This is discussed in Slack here
;; https://clojurians.slack.com/archives/C03S1KBA2/p1667925853699669
;; An issue has been filed here https://github.com/jonase/eastwood/issues/444
;; and a simple reproduction repo can be found here https://github.com/metabase/snowplow-eastwood-issue
;;
;; The two Quartz queue-affinity DriverDelegate shims are `gen-class` namespaces whose
;; only body is a `(.superRtp this ...)` call to their own exposed super method. That
;; method exists only on the class the namespace itself generates, so `this` can't be
;; type-hinted with it at compile time (the class isn't defined yet) — the reflective
;; call is unavoidable. Eastwood also can't reliably analyze these gen-class shims.
:exclude-namespaces [metabase.analytics.snowplow
metabase.mq.quartz-affinity-delegate-std
metabase.mq.quartz-affinity-delegate-postgres]}}
;; Test counterpart of :eastwood. Starts with :reflection only; add more linters as we fix other eastwood
;; issues in tests.
;;
;; clojure -X:dev:ee:ee-dev:drivers:drivers-dev:test:eastwood/test
:eastwood/test
{:exec-fn metabase.linters.eastwood/eastwood-tests
:exec-args {:linters [:reflection]
:exclude-namespaces
[;; byte/1 dispatch value trips up Eastwood's reader
metabase.test.http-client
;; Cookie/.getName qualified method trips up Eastwood's analyzer
metabase.server.middleware.settings-cache-test
;; .cljc syntax error during Eastwood's analyze+eval phase
metabase.lib.query-test
;; "count not supported on this type: Symbol" in Eastwood's analyzer
metabase.query-processor.parameters.temporal-units-test
;; Syntax error compiling fn* in Eastwood's analyzer
metabase.sql-tools.macaw.references-test
;; Method too large for Eastwood's analyzer
metabase.sql-tools.sqlglot.references-test
;; dev/test namespaces that no longer load; nothing runs them
dev.deps-graph-test
dev.migrate-test
dev.model-tracking-test]}}
;; clojure -T:whitespace-linter
:whitespace-linter
{:deps {com.github.camsaul/whitespace-linter {:sha "e35bc252ccf5cc74f7d543ef95ad8a3e5131f25b"}}
:ns-default whitespace-linter
:exec-fn whitespace-linter/lint
:exec-args {:paths ["./.dir-locals.el"
"./deps.edn"
"./package.json"
"./shadow-cljs.edn"
".clj-kondo"
".github"
"bin"
"enterprise"
"frontend"
"resources"
"src"
"test"]
:include-patterns ["\\.clj.?$"
"\\.edn$"
"\\.el$"
"\\.html$"
"\\.json$"
"\\.jsx?$"
"\\.sh$"
"\\.yaml$"
"\\.yml$"]
:exclude-patterns [".clj-kondo/better-cond/.*"
".clj-kondo/com.github.seancorfield/.*"
"resources/i18n/.*\\.edn$"
"resources/frontend_client"
"resources/frontend_shared"
"resources/html-entities.edn"
"resources/openapi/.*"
"frontend/src/cljs"
"frontend/src/metabase/urls\\.unit\\.spec\\.js$"
"frontend/src/metabase/utils/formatting\\.unit\\.spec\\.js$"
"src/metabase/util/currency\\.cljc$"
"test/metabase/channel/render/png_test.clj"
"#.+#$"
"\\.transit\\.json$"
"frontend/src/metabase/documents/components/Editor/data/data\\.json$"]}}
;; clojure -X:dev:ee:ee-dev:test:cloverage
:cloverage
{:exec-fn metabase.test.cloverage-runner/run-project
:exec-args {:fail-threshold 69
:codecov? true
;; don't instrument logging forms, since they won't get executed as part of tests anyway
;; log calls expand to these
:exclude-call
[clojure.tools.logging/logf
clojure.tools.logging/logp
metabase.util.log/logf
metabase.util.log/logp]
:src-ns-path
["src" "enterprise/backend/src"]
:test-ns-path
["test" "enterprise/backend/test"]
:ns-regex
["^metabase\\..*" "^metabase-enterprise\\..*"]
;; don't instrument Postgres/MySQL driver namespaces, because we don't currently run tests for them
;; as part of recording test coverage, which means they can give us false positives.
;;
;; regex literals aren't allowed in EDN. We parse them in `./test/cloverage.clj`
:ns-exclude-regex
["metabase\\.driver\\.mysql.*"
"metabase\\.driver\\.postgres.*"]}
;; different port from `:test` so you can run it at the same time as `:test`.
:jvm-opts ["-Dmb.jetty.port=3002"]}
;; To fix indentation in all source files
;;
;; ./bin/mage cljfmt-all
;;
;; to fix errors in specific source files:
;;
;; ./bin/mage cljfmt-file file1.clj file2.clj
;;
;; - and you can mix in directories:
;;
;; ./bin/mage cljfmt-file test file1.clj
;;
;; to check for errors without fixing them:
;;
;; ./bin/mage cljfmt-all
;;
;; ./bin/mage cljfmt-all -h for more info
;;
;; (this doc was here because we previously had a `:cljfmt` alias here, now specified in `bb.edn`, but leaving these
;; dox here in case anyone comes looking for it -- Cam
;;; building Uberjar, build and release scripts
:build
{:extra-paths
["bin/build/resources"
"bin/build/src"]
:extra-deps
{com.bhauman/spell-spec {:mvn/version "0.1.2"} ; used to find misspellings in YAML files
expound/expound {:mvn/version "0.9.0"} ; better output of spec validation errors
io.github.borkdude/grasp {:mvn/version "0.1.4"}
io.github.clojure/tools.build {:mvn/version "0.10.11"}
io.github.seancorfield/build-uber-log4j2-handler
{:git/tag "v2.25.1" :git/sha "1cfab45"} ; collect binary files for log4j2
org.clojure/data.xml {:mvn/version "0.2.0-alpha10"}
org.clojure/tools.deps.alpha {:mvn/version "0.15.1254"}
org.fedorahosted.tennera/jgettext {:mvn/version "0.15.1"}}
:jvm-opts
["-Dclojure.main.report=stderr"
"-XX:-OmitStackTraceInFastThrow"
"-XX:+IgnoreUnrecognizedVMOptions"
"-XX:+ShowCodeDetailsInExceptionMessages"]}
;; Build everything:
;;
;; clojure -X:drivers:build:build/all
;; clojure -X:drivers:build:build/all :edition :ee
;;
;; Run just a specific build step:
;;
;; clojure -X:drivers:build:build/all :steps '[:version]'
;;
;; the various steps available are:
;;
;; :version :translations :frontend :licenses :drivers :python :uberjar
:build/all
{:exec-fn build/build-cli}
;; build just the uberjar (without i18n, drivers, etc.)
;;
;; clojure -X:build:build/uberjar
;; clojure -X:build:build/uberjar :edition :ee
:build/uberjar
{:exec-fn build.uberjar/uberjar}
;; List dependencies without a license. Not really 100% sure why this needs `:dev`
;;
;; clojure -X:build:build/list-without-license
:build/list-without-license
{:exec-fn build/list-without-license}
;; Build a single driver.
;;
;; clojure -X:build:drivers:build/driver :driver :sqlserver :edition :oss
:build/driver
{:exec-fn build-driver/build-driver}
;; Build all of the drivers.
;;
;; clojure -X:build:drivers:build/drivers
;; clojure -X:build:drivers:build/drivers :edition :ee
:build/drivers
{:exec-fn build-drivers/build-drivers}
;; Verify that a driver JAR looks correct.
;;
;; clojure -X:build:build/verify-driver :driver :mongo
:build/verify-driver
{:exec-fn verify-driver/verify-driver}
;; Build the separately installed in-process embedder plugin jar.
;;
;; clojure -X:build:build/embedder-plugin
:build/embedder-plugin
{:exec-fn build-embedder-plugin/build-plugin!}
;; Build i18n artifacts.
;;
;; clojure -X:build:build/i18n
:build/i18n
{:exec-fn i18n.create-artifacts/create-all-artifacts!}
;; extra paths and deps for working on build scripts, or running the tests.
:build-dev
{:extra-paths ["bin/build/test"]
:extra-deps
{org.clojure/data.json {:mvn/version "2.5.1"}}}
;; Run tests for the build scripts:
;;
;; clj -X:dev:drivers:build:build-dev:build-test
:build-test
{:exec-fn mb.hawk.core/find-and-run-tests-cli
:exec-args {:only ["bin/build/test"]}}
;;; Other misc convenience aliases
;; Profile Metabase start time with clojure -M:profile
:profile
{:main-opts ["-m" "metabase.core.bootstrap" "profile"]
:jvm-opts ["-XX:+CITime" ; print time spent in JIT compiler
"-Xlog:gc"]}
;; Run tests under clj-async-profiler; writes a flamegraph to target/clj-async-profiler/results.
;; Must come after `:test`, whose `:exec-fn` it overrides:
;; clojure -X:dev:ci:ee:ee-dev:drivers:drivers-dev:test:profile-tests :only '[metabase.some-test]'
:profile-tests
{;; `dev.profile-tests` lives in dev/src and clj-async-profiler is otherwise a `:dev`-only dep;
;; declared here too so the alias stands on its own instead of failing at exec time when `:dev`
;; happens to be absent. Keep the version in step with the one in `:dev`.
:extra-paths ["dev/src"]
:extra-deps {com.clojure-goes-fast/clj-async-profiler {:mvn/version "1.6.2"}}
:exec-fn dev.profile-tests/run
:jvm-opts ["-Dclj-async-profiler.output-dir=target"
;; without these, inlined frames are attributed to the wrong method
"-XX:+UnlockDiagnosticVMOptions"
"-XX:+DebugNonSafepoints"]}
;; get the H2 shell with clojure -X:dev:h2
:h2
{:extra-paths ["dev/src"]
:exec-fn dev.h2/shell
:jvm-opts ["-Dfile.encoding=UTF-8"]}
:generate-automagic-dashboards-pot
{:main-opts ["-m" "metabase.xrays.automagic-dashboards.dashboard-templates"]}
;; Start a Network REPL (nrepl) that you can connect your editor to.
;;
;; clojure -M:dev:nrepl (etc.)
:nrepl
{:extra-deps {nrepl/nrepl {:mvn/version "1.5.1"}}
:main-opts ["-m" "nrepl.cmdline" "-p" "50605"]}
;; - start a Socket REPL on port 50505 that you can connect your editor to. Bound to loopback: it has no
;; authentication, so exposing it on a network interface is remote code execution. dev/docker-compose.yml
;; overrides the address for the containerized dev app, where the published port is the boundary.
:socket {:jvm-opts ["-Dclojure.server.repl={:address,\"127.0.0.1\",:port,50505,:accept,clojure.core.server/repl}"]}
;; Liquibase CLI:
;;
;; clojure -M:liquibase <command>
;;
;; e.g.
;;
;; clojure -M:liquibase dbDoc target/liquibase
:liquibase
{:extra-deps {ch.qos.logback/logback-classic {:mvn/version "1.5.20"}}
:extra-paths ["dev/src"]
:main-opts ["-m" "dev.liquibase"]}
;; Migrate CLI:
;; clojure -M:migrate <command>
;; E.g.
;; clojure -M:migrate up ;; migrate up to the latest
;; clojure -M:migrate rollback count 2 ;; rollback 2 migrations
;; clojure -M:migrate rollback id "v40.00.001" ;; rollback to a specific migration with id
;; clojure -M:migrate status ;; print the latest migration id
:migrate
{:extra-deps {io.github.camsaul/humane-are {:mvn/version "1.0.2"}}
:extra-paths ["dev/src"]
:main-opts ["-m" "dev.migrate"]}
;; run tests against Lib. Very fast since this is almost all ^:parallel
:test/lib
{:exec-args {:only ["test/metabase/lib"
"test/metabase/lib_be"]}}
;; test the Query Processor
;;
;; clj -X:dev:ee:ee-dev:test:test/qp
:test/qp
{:exec-args {:only ["test/metabase/query_processor"
metabase.driver.sql.query-processor-test
metabase-enterprise.advanced-permissions.models.permissions.block-permissions-test
metabase-enterprise.advanced-permissions.query-processor.middleware.permissions-test
metabase-enterprise.sandbox.query-processor.middleware.sandboxing-test]}}
;; test the notification system
;; clj -X:dev:ee:ee-dev:test:test/notification
:test/notification
{:exec-args {:only ["test/metabase/notification"
"test/metabase/channel"]}}
;; test the transforms feature
;; clj -X:dev:ee:ee-dev:test:test/transforms
:test/transforms
{:exec-args {:only ["enterprise/backend/test/metabase_enterprise/transforms"
"enterprise/backend/test/metabase_enterprise/transforms_python"]}}
;; test all MBQL related stuff: Lib, the legacy shared `metabase.legacy-mbql` code, and the QP
;;
;; clj -X:dev:ee:ee-dev:test:test/mbql
:test/mbql
{:exec-args {:only ["test/metabase/lib"
"test/metabase/lib_be"
"test/metabase/legacy_mbql"
"test/metabase/query_processor"
metabase.driver.sql.query-processor-test
metabase-enterprise.advanced-permissions.models.permissions.block-permissions-test
metabase-enterprise.advanced-permissions.query-processor.middleware.permissions-test
metabase-enterprise.sandbox.query-processor.middleware.sandboxing-test]}}
;; test search-related stuff.
;;
;; clj -X:dev:ee:ee-dev:test:test/search
:test/search
{:exec-args {:only ["test/metabase/search"]}}
;; test custom clj-kondo linters and hooks.
;;
;; clj -X:dev:test:test/kondo
:test/kondo
{:exec-args {:only [".clj-kondo/test"]}}
;; DB configs -- start DBs with:
;; ./bin/mage start-db postgres oldest
:db/postgres-oldest
{:jvm-opts
["-Dmb.db.type=postgres"
"-Dmb.db.connection.uri=jdbc:postgresql://localhost:5432/metabase?user=metabase&password=password"]}
;; ./bin/mage start-db postgres latest
:db/postgres-latest
{:jvm-opts
["-Dmb.db.type=postgres"
"-Dmb.db.connection.uri=jdbc:postgresql://localhost:5433/metabase?user=metabase&password=password"]}
;; ./bin/mage start-db mysql oldest
:db/mysql-oldest
{:jvm-opts
["-Dmb.db.type=mysql"
"-Dmb.db.connection.uri=jdbc:mysql://localhost:3308/metabase_test?user=root&password="]}
;; ./bin/mage start-db mysql latest
:db/mysql-latest
{:jvm-opts
["-Dmb.db.type=mysql"
"-Dmb.db.connection.uri=jdbc:mysql://localhost:3309/metabase_test?user=root&password="]}
;; ./bin/mage start-db mariadb oldest
:db/mariadb-oldest
{:jvm-opts
["-Dmb.db.type=mysql"
"-Dmb.db.connection.uri=jdbc:mysql://localhost:3306/metabase_test?user=root&password="]}
;; ./bin/mage start-db mariadb latest
:db/mariadb-latest
{:jvm-opts
["-Dmb.db.type=mysql"
"-Dmb.db.connection.uri=jdbc:mysql://localhost:3307/metabase_test?user=root&password="]}}}
;; TODO -- consider creating an alias that includes the `./bin` build-drivers & release code as well so we can work
;; on them all from a single REPL process.