Compare commits

...

4691 Commits

Author SHA1 Message Date
Ngoc Khuat
1c4f90b340 WIP runner 2025-09-11 21:05:05 +07:00
Ngoc Khuat
cabf7483bc Merge branch 'proj-python/s01e03' into python-library 2025-09-11 20:53:32 +07:00
Nicola Mometto
e94c2b2c0c typo 2025-09-11 14:45:05 +01:00
Nicola Mometto
5317293228 bump 2025-09-11 14:45:05 +01:00
Ngoc Khuat
05438c94f8 update or insert 2025-09-11 20:18:11 +07:00
Ngoc Khuat
e086ee8615 are we transform team? 2025-09-11 20:16:11 +07:00
Ngoc Khuat
00cc5bd2d4 add path and change to /library/:path 2025-09-11 20:13:56 +07:00
Nicola Mometto
cbf30cdd64 typo 2025-09-11 13:53:55 +01:00
Nicola Mometto
0d5072d0c7 Merge remote-tracking branch 'origin/master' into proj-python/s01e03 2025-09-11 13:51:11 +01:00
lbrdnk
7a122eefd4 Better test isolation for semantic search and related refactor (#63164)
* Make with-index! use new, clean, separate database per test

* Add with-test-db! setup modes

* Comment

* Adjust with-test-db! and related

* Drop with-index! in favor of modal with-test-db! in first test

* semantic.tu/db removal

* Drop use of semantic.tu/db in favor of get-pgvector-datasource!

* Drop semantic.tu/db  from tu

* Remove once-fixture

* Remove ensure-no-migration-table-fixture

* Comment

* Comment

* Cleanup

* Make the rest of the query-test ns use with-test-db!

* Remove redundant test

* Remove remaining usage of with-index!

* Drop remnants of with-index! and make linter happy

* Cleanup

* Comment

* Remove with-mock-index-metadata! in favor of with-temp-db!

* Adjust with-index-contents!

* Fixture to avoid running app-db tests

* Fixture

* Require

* whitespace
2025-09-11 14:11:06 +02:00
Nicolò Maria Mezzopera
f74d718df9 Fix perf test workflow to build uberjar before running tests (#62106)
Problem: Perf tests were failing because they couldn't find the uberjar artifact.
The wait_for_uberjar mechanism was trying to wait for a job named 'build (ee)'
but the actual job name is 'Build MB ee'. Additionally, this wait mechanism was
unnecessary complexity.

Solution: Align with pr-env-labeled.yml pattern:
1. Build uberjar first when 'Run-perf' label is added
2. Run perf test after uberjar is built
3. Remove unnecessary wait_for_uberjar mechanism

Changes:
- perf-test-labeled.yml: Add uberjar build job before running perf test
- perf-test.yml: Remove wait_for_uberjar parameter and 56-line wait mechanism

This simplifies the workflow and ensures the uberjar artifact exists before
the perf test tries to fetch it, following the same proven pattern used by
pr-env-labeled.yml.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-11 13:55:21 +02:00
Dan Stone
fe35332a62 Remove unused import 2025-09-11 12:27:28 +01:00
Dan Stone
cc45389256 Interop with future task rather than doing old-school thread stuff on log process shutdown 2025-09-11 12:25:59 +01:00
Ngoc Khuat
415f711a5e PUT and GET python library 2025-09-11 17:56:03 +07:00
Sébastien
8ac41c5b91 Closes EMB-756 translations for static embedded visualizer cards (#63067)
* Closes EMB-756 translations for static embedded visualizer cards

* Closes EMB-757 content translated pie loses custom colors

* unit test

* types

* renaming

* better type guards
2025-09-11 12:49:30 +02:00
Nicola Mometto
4eac2ceba3 fix(ci): make run 2025-09-11 11:34:02 +01:00
Nicola Mometto
a8f5ff5193 sqlserver rename-table 2025-09-11 11:22:48 +01:00
Nicola Mometto
b8fef1a67f chore 2025-09-11 11:11:17 +01:00
Nicola Mometto
ce6420ebc7 missing require 2025-09-11 11:10:00 +01:00
Nicola Mometto
6f74fd4593 type conversion for mongo 2025-09-11 11:09:47 +01:00
Nicola Mometto
33593abd60 format datetimes for bigq 2025-09-11 10:52:48 +01:00
Nicola Mometto
702bd9a3f2 typo 2025-09-11 10:40:34 +01:00
Nicola Mometto
8284646d15 more parsing for bigq 2025-09-11 10:35:58 +01:00
Romeo Van Snick
1e0246d2f1 Use DataGrid for displaying results 2025-09-11 19:33:17 +10:00
Romeo Van Snick
d82c40a1db Swap buttons 2025-09-11 19:33:16 +10:00
Romeo Van Snick
e39983b3db Add pandas completions 2025-09-11 19:33:16 +10:00
Romeo Van Snick
01f4bcfb43 Allow extension to be passed to CodeEditor 2025-09-11 19:33:16 +10:00
Romeo Van Snick
cae08116f0 Increase indentUnit for python 2025-09-11 19:33:16 +10:00
Romeo Van Snick
a314bb587c Remove color in editor gutter 2025-09-11 19:33:16 +10:00
Romeo Van Snick
09731e48fa Move python execution to separate hook 2025-09-11 19:33:15 +10:00
Romeo Van Snick
cdba119297 Split up ExecutionResult component 2025-09-11 19:32:37 +10:00
Romeo Van Snick
5957b1f5df Add empty and loading state components 2025-09-11 19:32:37 +10:00
Romeo Van Snick
2357bea601 Split off results into separate component 2025-09-11 19:32:37 +10:00
Romeo Van Snick
32281e2096 Move parseCSV to utils 2025-09-11 19:32:36 +10:00
Romeo Van Snick
f17e329af5 Make python editor resizable 2025-09-11 19:32:36 +10:00
Romeo Van Snick
c481f1ceb6 Lay python editor out in two columns 2025-09-11 19:32:36 +10:00
Romeo Van Snick
f63e05fda1 Add first-class PythonTransformSource type 2025-09-11 19:32:36 +10:00
Oleksandr Solovyov
cffe9615c6 update athena driver to 3.6.0 (#63369) 2025-09-11 12:24:46 +03:00
Nicola Mometto
928f6f830b bump 2025-09-11 10:15:33 +01:00
Nicola Mometto
29e936e2f8 chore: Dictionary as root type 2025-09-11 10:15:21 +01:00
Nicola Mometto
802fe0fcfe fix: schema-exists? check 2025-09-11 10:15:21 +01:00
Nicola Mometto
0ae5027542 feat: decode json strings 2025-09-11 10:15:21 +01:00
Nicola Mometto
e64e7ec93b assoc table-schema to data-source 2025-09-11 10:15:21 +01:00
Chris Truter
fcb4ca1f80 Bump to latest submodule 2025-09-11 10:58:11 +02:00
Jakub Chodorowicz
4ba3309c4c update Metabot AI terms link (#63370) 2025-09-11 10:46:28 +02:00
Dan Stone
54695561ad Add a few comments regarding optimistic nature of s3 deletes 2025-09-11 09:41:07 +01:00
lbrdnk
9c712173ce Fix test issues in semantic search module (#63319)
* Make dataset-query->dimensions more robust

* *disable-updates*

* Add macro impls for easier debugging

* Make dataset-query->dimensions more resilient

* Whitespace
2025-09-11 10:14:39 +02:00
Nicola Mometto
e965057f1b fix for clickhouse driver 2025-09-11 08:53:07 +01:00
Nathan Voxland
71f2b73e51 Avoid null names in semantic search document (#63331) 2025-09-10 16:22:17 -05:00
Aleksandr Lesnenko
d5e806325e fix table search crash when pressing enter without any table selected (#63357) 2025-09-10 17:18:15 -04:00
Cam Saul
09b2346c6a Sweep #62591 under the rug (#63325)
* Another #62591 fix

* Fix conditional syntax

* Fix typo
2025-09-10 17:16:29 -04:00
Riley Thompson
cf5e3ed830 Upgrade clickhouse jdbc driver to 0.9.2 (#63349)
* upgrade clickhouse jdbc driver to 0.9.2

* remove comments

* update tls test details
2025-09-10 16:19:51 -04:00
Filipe Silva
51140fce2e fix: don't ignore db sync/rescan promise (#63301)
* fix: don't ignore db sync/rescan promise

When the call returns non-200, the button still says it's fine instead of showing a failure.

You can test this by trying to sync "Metabase Cloud Storage" DWH.

See https://metaboat.slack.com/archives/CKZEMT1MJ/p1749830993738189

* add unit tests

* fix mocks

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-09-10 19:14:18 +00:00
Ryan Laurie
7b5a4436e7 mark transform test flaky (#63343)
* mark transform test flaky

* quarantine the right test
2025-09-10 12:37:48 -06:00
Ryan Laurie
f85364f530 Fix stray bracket in version-info (#63342)
* fix stray bracket

* 🤦‍♀️
2025-09-10 12:17:58 -06:00
Nicola Mometto
7ed61da2df feat: json 2025-09-10 17:47:32 +01:00
Nicola Mometto
0fba1b34a9 fix support for clickhouse 2025-09-10 16:37:44 +01:00
Chris Truter
6ca68fc067 Pin to a fixed python-runner, with slightly changed logs 2025-09-10 17:36:27 +02:00
Cam Saul
63d6945498 optimize-temporal-filters middleware => Lib (#63275)
* optimize-temporal-filters middleware => Lib

* Fix circular dependencies

* Test fix 🔧

* Don't deprecate negate-filter-clause yet for drivers

* Oracle test fix 🔧

* cljs test fix 🔧
2025-09-10 08:15:53 -07:00
Dan Stone
93bcf2f1b8 Remove some commented out / dead code 2025-09-10 15:39:17 +01:00
Ngoc Khuat
c830ff5164 Start python runner with driver tests (#63335) 2025-09-10 20:51:56 +07:00
Konstantin Darutkin
e539ba98ce fix: do not display value in options when editing FKs (#63332) 2025-09-10 15:28:08 +03:00
Nicola Mometto
97296942ab fixes for bigq rename-table 2025-09-10 12:35:18 +01:00
Nicola Mometto
a9b58f9dd7 fixes for bigq insertion 2025-09-10 12:26:20 +01:00
Nicola Mometto
54d2a79a1a eh, array/dictionary for bigq 2025-09-10 11:43:37 +01:00
Nicola Mometto
4147277e28 kondo 2025-09-10 10:51:33 +01:00
Nicola Mometto
1815fb8afa feat: allow overriding base_type/db_type 2025-09-10 10:51:02 +01:00
Nicola Mometto
058e4b3bc5 wip: filter out nested fields 2025-09-10 10:51:02 +01:00
Dan Stone
8c5cd34ec9 Separate file / s3 lifetimes / writes / reads from http calls (#63294)
- python-runner no longer simulates a single http api that does
everything (incl s3 interaction)
- Separates file lifetimes (shared storage) from execution
- Easier to see how to avoid reading into strings (e.g. for piping into
tmp files, follow up)

Earlier on we had a service that managed much of the I/O, metabase now
coordinates it so it makes little sense pretending there is still
an overall http api.
2025-09-10 10:35:50 +01:00
Jeff Bruemmer
926b5ea393 update placeholder copy (#63311) 2025-09-09 23:42:08 +00:00
Maz Ameli
00aca4b873 add tooltip to clear-conversation action (#63309) 2025-09-09 16:15:12 -07:00
appleby
e4f11aba66 Ensure results are realized when falling back to in-place results in semantic search (#63254)
* Ensure results are realized when falling back to in-place results in semantic search

Unlike the semantic and appdb backends, the in-place backend returns a reducible result set from
search.engine/results. Make sure we realize the results before attempting to pass them to `m/indexed-by` to dedup
them. This avoid a "Don't know how to convert reducible to ISeq" exception when falling back to in-place results.

* Add comment
2025-09-09 15:49:34 -07:00
Cam Saul
70e31de9a0 add-default-temporal-unit => Lib (#63276) 2025-09-09 10:21:31 -07:00
Cam Saul
cd9ebca53a Don't add remaps from join columns that aren't in join :fields (#63193)
* Fix #63165

* Kondo

* Test fix 🔧
2025-09-09 09:04:20 -07:00
Timothy S. Dean
9dab171530 Adjust clj-kondo linter to allow keyword flags in require (#63277)
Clojure MCP runs the linter on all REPL code and aborts on any errors.
2025-09-09 08:51:46 -06:00
Nicola Mometto
eea9b658da fix: retrieve meta from appdb 2025-09-09 15:27:51 +01:00
Nicola Mometto
17fb99163f chore: bind cancel-chan 2025-09-09 14:58:37 +01:00
Timofey Kachalov
0e42be1914 feat(sdk): Use zod schemas to validate exposed from SDK bundle Components and their props (#63188) 2025-09-09 17:21:14 +04:00
dpsutton
e1f6606ba2 Faster sync when adding new table (#63268)
want to check that the new table exists before adding it into the
app-db. The old way worked for all databases but is pretty dumb: it
enumerates all tables in the db (as it would for regular sync) and then
checks if the new table is in there.

We can be better with the `driver/table-exists?` function.

The shape of data coming back from describe-data is the following:

```clojure
notify=> (let [database (toucan2.core/select-one :model/Database :id 1)]
           (driver/describe-database :h2 database))
{:tables #{{:name "ORDERS",
            :schema "PUBLIC",
            :description nil,
            :is_writable true}
           {:name "PEOPLE",
            :schema "PUBLIC",
            :description nil,
            :is_writable true}
           {:name "FEEDBACK",
            :schema "PUBLIC",
            :description nil,
            :is_writable true}
            ...
```

So we can create the same shape (i omit description and is_writable to
seemingly no deleterious effect).
2025-09-09 08:18:55 -05:00
Timofey Kachalov
a0243ff3a4 ci(sdk): Skip sdk-bundle test suite for backward-compat SDK tests (#63291) 2025-09-09 16:30:08 +04:00
Konstantin Darutkin
f2d1f9f93d fix: display error messages from BE in Editable Data settings (#63288) 2025-09-09 12:09:47 +00:00
Nicola Mometto
7257a4d1d2 only deal with schemas if schema exist 2025-09-09 11:59:23 +01:00
Nicola Mometto
0287e639b1 fix(mongo): guard against lack of cancel-chan 2025-09-09 11:59:23 +01:00
Nicola Mometto
0999cfab54 wip: DDL/DML for mongo 2025-09-09 11:59:23 +01:00
Konstantin Darutkin
71f02e8684 fix: disable row edit button when rows are selected (#63290) 2025-09-09 10:26:15 +00:00
Nicola Mometto
9e18d5b9f7 stub rename-table for bigquery 2025-09-09 10:49:01 +01:00
Nicola Mometto
9910f6d0ca kondo 2025-09-09 10:45:25 +01:00
Timofey Kachalov
7a90868ef9 refactor(sdk): Adjust logic of handling release-notes/changelogs for Embedding SDK (#63081) 2025-09-09 12:24:29 +04:00
Timofey Kachalov
48971b48eb feat(sdk): Add "start new conversation" button for MetabotQuestion and adjust its visuals (#63211) 2025-09-09 11:11:21 +04:00
Cam Saul
169f3f79e3 reconcile-breakout-and-order-by-bucketing middleware => Lib (#63267)
* reconcile-breakout-and-order-by-bucketing => Lib

* Fix test name 🔧
2025-09-08 17:25:30 -07:00
Romeo Van Snick
908eda55b5 Pass validation errors to create dashboard modal (#63241)
* Handle error when creating dashboard

* Add repro for metabase#63176

* Use unwrap
2025-09-08 23:49:03 +00:00
Romeo Van Snick
2365a169e4 Avoid losing work when closing custom expression from shortut (#63232)
* Pass initialClause to expression editor

* Reset initial to true when we are formatting the initial expression clause

* Add repro for metabase#63180
2025-09-09 08:56:09 +10:00
dpsutton
aca75bee72 partition field syncing by schemas (#63192)
reports that a customer has around 200k tables spread across 300
schemas. the fields query by default would just get a single cursor into
these fields, passing all schema into the query.

This can take quite a long time. Our own horror show schema would take
~45 minutes to sync. But holding a cursor open this long just seems to
invite bad times.

I've taken the logic and just called it multiple times, once per schema.
2025-09-08 13:34:45 -05:00
Chris Truter
6939615ce2 Merge branch 'master' into proj-python/s01e03 2025-09-08 20:24:26 +02:00
Chris Truter
b7bb799e14 Test for ordering across databasees, if we enable python support 2025-09-08 20:23:57 +02:00
github-automation-metabase
3eb696e22b Update generated docs (master) (#63229)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-08 13:35:50 -04:00
Alexander Polyankin
60da15bf27 Transform list cleanup (#63208) 2025-09-08 13:32:48 -04:00
Noah Moss
3b3e5f91d6 Fix semantic search repair test flake (#63195)
* Use unique doc IDs across semantic search repair tests to fix flakes

* clear gate table before test

* try switching out table name generation
2025-09-08 12:33:29 -04:00
Jeff Bruemmer
0fcff349d1 note on custom expressions (#63249) 2025-09-08 12:08:55 -04:00
Riley Thompson
f8a66a7470 remove use database from snowflake transforms (#63199) 2025-09-08 16:05:57 +00:00
Riley Thompson
4672ea6c34 handle dbrefs properly (#63244) 2025-09-08 10:05:18 -06:00
Konstantin Darutkin
73e4ba5bd8 test: refactor datetime table editing tests (#63239) 2025-09-08 18:47:54 +03:00
Ngoc Khuat
20d91af3a5 proper transform ordering 2025-09-08 22:16:23 +07:00
Ngoc Khuat
2d43e09f84 add tests and polishing 2025-09-08 21:40:26 +07:00
Ngoc Khuat
8cb6965fa7 Table swapping instead of delete then create 2025-09-08 21:40:26 +07:00
Nicola Mometto
1279c1f226 chore: kondo 2025-09-08 12:29:52 +01:00
Nicola Mometto
9efe8835fa typo 2025-09-08 12:22:53 +01:00
Nicola Mometto
23b4d7ece0 types for clickhouse 2025-09-08 12:18:43 +01:00
Nicola Mometto
40e71f4baa fix for redshift 2025-09-08 12:11:36 +01:00
Nicola Mometto
2dd76b303e add session-schema for snowflake 2025-09-08 11:45:37 +01:00
Nicola Mometto
f7eb4ca800 fix ddl for bigquery 2025-09-08 11:34:37 +01:00
Nicola Mometto
f3860aee72 fix bigquery types 2025-09-08 11:34:05 +01:00
Nicola Mometto
5d93b6fe71 fix roundtrip 2025-09-08 11:00:07 +01:00
Chris Truter
f09dbce65d Protect against nil search_vector (#63172)
Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-09-08 11:51:38 +02:00
Nicola Mometto
0783824721 Merge remote-tracking branch 'origin/master' into proj-python/s01e03 2025-09-08 10:46:17 +01:00
Chris Truter
e6d90444c2 delete old test file 2025-09-08 10:30:48 +02:00
Stas Gavrylov
dabaa3007e WRK-874: List view preview improvements (#63159)
* WRK-874: Populate preview for List View customization with sample values

* WRK-874: Set default and min size for list view on dashboard

* WRK-874: Fix List view card size on the dashboard

* WRK-874: Add e2e test for empty column placeholder

* Fix lint errors

* Add horizontal padding for List view

* Refactor generatePreviewSample
2025-09-08 07:58:43 +00:00
Fraser
00fb1c3841 Dev 780 Provide issue comments by employees to Claude Code (#62476) 2025-09-08 11:30:13 +12:00
Fraser
e7fd61a386 Ensure flaky tests are tagged as flaky (#63157) 2025-09-08 11:02:02 +12:00
github-automation-metabase
a17971e449 chore(sdk): Update published npm version to 0.57.0-alpha.2 (#63210) 2025-09-06 12:28:31 +00:00
Romeo Van Snick
02390555ba Fix join step alignment (#63120)
* Stretch join data sections when needed

* Tweak padding to avoid jump

* Center 'on' in join condition

* Make gap consistent

* Tighten margins to avoid jump

* Tweak padding to make all wells the same height
2025-09-06 15:17:36 +10:00
Riley Thompson
20577becba Include transform dependencies that have not been run yet (#62884) 2025-09-06 04:21:10 +00:00
Nicolò Pretto
4c3656a57b fix(embed-js): bar charts no longer change scale when props change (#63182)
* fix(embed-js): bar charts no longer change scale when props change

* spec

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-09-05 23:23:40 +00:00
appleby
cca17f5f4d BOT-310 lower the weight on the :rrf score for semantic search results (#63102)
* BOT-310 lower the weight on the :rrf score for semantic search results

This seems to give a better blend between the :rrf score coming from the semantic search hybrid query and the other
post-search metadata scorers.

* Add with-weights and with-only-semantic-weights test util macros

* Use semantic.tu/with-weights in scoring tests

* Update query tests to use semantic.tu/with-only-semantic-weights

This prevents other metadata scorers from overriding the expected rankings for these tests. The query tests are
largely focused on making sure the basic machinery of semantic queries are working. Tests exercising individual
scorers are in scoring_test.clj

* Add tests for :official_collection and :verified "premium" scorers
2025-09-05 15:49:18 -07:00
github-automation-metabase
f74de7e31e Bump com.google.cloud/google-cloud-bigquery from 2.54.1 to 2.54.2 (#62974)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.54.2/CHANGELOG.md
2025-09-05 15:17:21 -06:00
Jeff Bruemmer
cb946d095d Update development instance documentation for clarity (#63201) 2025-09-05 21:08:14 +00:00
github-automation-metabase
c4ed3cac1d Bump net.snowflake/snowflake-jdbc-thin from 3.26.0 to 3.26.1 (#62976)
Inspect dependency changes here:
2025-09-05 21:02:29 +00:00
github-automation-metabase
2e184e6c48 Bump org.clojure/clojure from 1.12.1 to 1.12.2 (#62973)
Inspect dependency changes here: https://github.com/clojure/clojure/blob/clojure-1.12.2/changes.md
2025-09-05 14:47:03 -06:00
github-actions[bot]
71f7fe60f1 Fix: No drill-thru to filter a table by clicking a NULL FK value (#62569)
Fixes #35561

We currently don't allow filtering on null foreign key values, but that is a reasonable thing to want to do.  This extends the foreign key drill to support null values.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: William Zimrin <william@metabase.com>
2025-09-05 20:31:44 +00:00
William
c80fea1587 Native Query Snippet Params (#62283)
Native query snippets get parameterization, using familiar `{{...}}` syntax. Snippets can use other snippets.
2025-09-05 20:05:57 +00:00
github-automation-metabase
50cb92e548 Bump org.apache.arrow/arrow-memory-core from 17.0.0 to 18.3.0 (#62654)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-09-05 19:50:54 +00:00
github-automation-metabase
b5f5624007 Bump io.netty/netty-common+buffer from 4.2.3.Final to 4.2.4.Final (#62262)
* Bump io.netty/netty-common from 4.2.3.Final to 4.2.4.Final

Inspect dependency changes here:

* typo

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-09-05 19:11:25 +00:00
github-automation-metabase
b514c93c50 Update generated docs (master) (#63153)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-05 15:05:21 -04:00
github-automation-metabase
f9614edfdf Bump djblue/portal from 0.60.2 to 0.61.0 (#62643)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.61.0/CHANGELOG.md
2025-09-05 18:52:29 +00:00
github-automation-metabase
21325c4366 Bump com.facebook.presto/presto-jdbc from 0.293 to 0.294 (#62975)
Inspect dependency changes here:
2025-09-05 12:28:17 -06:00
github-automation-metabase
b37c60a342 Bump org.apache.sshd/sshd-core from 2.15.0 to 2.16.0 (#62647)
Inspect dependency changes here:
2025-09-05 12:11:21 -06:00
lbrdnk
4a01316597 Ensure thread performing migration finishes first (#63184) 2025-09-05 16:55:55 +00:00
Sébastien
eb474fbf52 Closes EMB-779 content translation is now case insensitive (#63171) 2025-09-05 17:49:05 +02:00
Sébastien
d90fcce25b Closes EMB-780 selected cell color in embedding dark mode (#63163) 2025-09-05 17:48:41 +02:00
github-automation-metabase
9733cd683a Bump net.thisptr/jackson-jq from 1.4.0 to 1.5.0 (#62646)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-09-05 15:27:35 +00:00
github-automation-metabase
8462072dfd Bump io.github.metabase/hawk from 1.0.7 to 1.0.11 (#62644)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-09-05 15:27:18 +00:00
Riley Thompson
c482aa6f03 Create schemas if needed for transforms (#62786)
* Unpolished WIP hackathon code for additional driver support

* fix kondo

* add transforms/table featuer for supported drivers

* fix transforms for dbs with no schema

* rename transform datasets to prevent foreign key overlap

* Add clickhouse support

* fix clickhouse tests

* fix redshift tests

* fix bigquery failures

* kondo and filter tests by feature

* fix transform dataset for bigquery

* fix sqlserver transforms with joins

* fix clickhouse order by when no non nullable field is available

* add more complex test with join, filter, aggregation and ordering

* use different metadata provider

* filter for left join feature in test

* improve sqlserver compile-transform

* done use legacy mbql in test, refactor normalize-name

* clean up

* add sqlserver error test

* Squashed commit of the following:

commit a11b602e19
Author: Romeo Van Snick <romeo@romeovansnick.be>
Date:   Thu Aug 21 17:44:13 2025 +1000

    Add message when a new transform will be created

commit 2cfdbfaba3
Author: Romeo Van Snick <romeo@romeovansnick.be>
Date:   Thu Aug 21 17:37:36 2025 +1000

    Allow creating values in schema form select

commit 17ff4dcb3f
Author: Romeo Van Snick <romeo@romeovansnick.be>
Date:   Thu Aug 21 16:51:13 2025 +1000

    Allow selecting schemas always, not only when there are schemas

* create schemas

* fix redshift

* add snowflake

* add sqlserver

* add clickhouse

* add bigquery

* Add test

* add default impl

* fix redshift tests

* Move SchemaFormSelect to components folder

* Allow creating schemas in the target update modal

* Allow initial value in SchemaFormSelect

* Only render schema field when the database supports :schemas

* Do not render new schema item if value is empty

* Add unit tests for SchemaFormSelect

* Add e2e tests for schema creation

* check schema exists first

* fix sql jdbc schema exists and add create schema permissions test

* update changelog

* parse query and add into for sqlserver

* add type hints for linter

* Address comments

* realize bigquery execute-raw-queries

* Disable target schema link if it does not exists (yet)

* Add tooltip when schema is new

* Use hydrated table from transform

* Add e2e tests

* Allow existing schema link to render as enabled even when table does not exist yet

* Do not add default to databaseId

* Add tests for existing schema with new table

* Fix e2e test

* address comments

* rename connection-details to conn-spec

* Compare against null not empty string

* use find first

* Await request to avoid flakiness in hover

---------

Co-authored-by: Timothy Dean <timothy@timothydean.dev>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-09-05 11:17:51 -04:00
metamben
c621b64c2f Add last_run, next_run and tag id filters (#62993)
* Add last_run, next_run and tag id filters

Closes QUE-2156

* Placate kondo

* Test with scheduled jobs and filtering by tags

* Fix next_run_start_time test

* Return run timestamps as timezone localized strings

* Handle Zulu

* Prepare job list table for next_run and transforms

* Add JobListParams type and use it in getJobListUrl

* Add new parameters to listTransformJobs handler

* Parse params and pass them down on job list page

* Add filters to job list page

* Add tooltipPosition prop to Icon

* Add TimezoneIndicator component

* Allow rendering React nodes in table headers

* Add timezone indicators to job list and transform list

* Add timezoneToUTCOffset helper

* Add timezone to cron explanation

* Format timestamps as ISO-8601 strings with timezone

* Add next run timestamp

* Hide transform count in list for now

* Add next_run to TransformJob

* Add timezone indicators to run list

* Avoid wrapping timestamps in run list

* Move shared widgets to transforms/components

* Allow passing available shortcuts to filter picker

* Disable shortcuts that are in the past for Next run, which is always in the future

* Add e2e test for filters

* Add UTC offset in tests

* Report run timestamps in UTC and expose system timezone

The system timezone is exposed in /api/session/properties as "system-timezone".

* Expose system-timezone to admins only

* Fix setting docstring

* Fix serdes baseline-comparison-test

* Make transform_job API return run timestamps in UTC

* Placate kondo

* Timezone

* Use system-timezone instead of report-timezone

* Add tests

* Fix test string

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-09-05 15:11:26 +00:00
github-automation-metabase
9275b7fb84 Bump net.thisptr/jackson-jq from 1.4.0 to 1.6.0 (#62972)
Inspect dependency changes here:
2025-09-05 09:11:02 -06:00
Chris Truter
bda65e63db bump python-runner 2025-09-05 16:19:23 +02:00
Nicola Mometto
74d6c3f356 more fixes 2025-09-05 15:03:36 +01:00
Nicola Mometto
815d7a3186 fixes 2025-09-05 14:41:40 +01:00
Dennis Schridde
7e0f54bb73 Cache Store OpenAPI description only for 5min (#63168)
The Store API's OpenAPI description (OAD) can change over time, but
Metabase's Store client would not notice.  For example, the client
would fail a HTTP request, not because the server rejected it, but
because the client "believes" it needs to send a field that the server
no longer requires.

Instead of caching the client, and thus OAD, for the whole lifetime of
the Metabase instance, cache it only for 5min.

Fixes: 1dd56e5f14
References: https://metaboat.slack.com/archives/C010ZSXQY87/p1757002462314229
2025-09-05 15:37:19 +02:00
Nicola Mometto
92171ab506 fix: cleanup 2025-09-05 14:33:05 +01:00
Nicola Mometto
4fc51375be add test 2025-09-05 14:32:48 +01:00
Nicola Mometto
de8a48277f more generic types 2025-09-05 14:28:48 +01:00
Nicola Mometto
dad98c137d fix test 2025-09-05 14:08:43 +01:00
Nicola Mometto
68d9786697 Merge remote-tracking branch 'origin/master' into proj-python/s01e02 2025-09-05 13:59:54 +01:00
Nicola Mometto
db02774c9c for snoflake and sqlserver too 2025-09-05 13:52:17 +01:00
Phoomparin Mano
ef5e78f979 feat(embed-js): append entity-types=model to embed flow code snippet if the instance has over 2 models (#63068) 2025-09-05 19:49:50 +07:00
Nicola Mometto
3b955d9067 feat: per driver impl 2025-09-05 13:40:03 +01:00
Riley Thompson
f4d3359e33 Remove driver/set-use-database in favour of setting the DB in the jdbc spec (#63047) 2025-09-05 08:38:17 -04:00
Nicola Mometto
6b190fdcb1 unused 2025-09-05 11:43:31 +01:00
Nicola Mometto
d3d865dda9 fix tests 2025-09-05 11:42:58 +01:00
Nicola Mometto
558c69ee84 simpler 2025-09-05 11:41:31 +01:00
Nicola Mometto
86bc79d826 typo 2025-09-05 11:41:31 +01:00
Nicola Mometto
6739de6bfc bump 2025-09-05 11:41:31 +01:00
Nicola Mometto
f21fda68f1 feat: use new methods 2025-09-05 11:41:31 +01:00
Nicola Mometto
350561daf9 add new type->database-type 2025-09-05 11:41:31 +01:00
Nicola Mometto
cc99a79835 root-type instead of upload-type 2025-09-05 11:41:31 +01:00
Alexander Polyankin
9be149e22f Fix flaky e2e test (#63128)
* attempt to fix

* Try to fix a flaky test

* Try to fix a flaky test
2025-09-05 06:36:11 -04:00
Alexander Polyankin
a283c947aa Fix filtering on questions after dashboard drills when there are no perms to create queries (#63074)
* Pass cardId and dashboardId

* Pass cardId and dashboardId

* Pass cardId and dashboardId

* Fix flaky test

* E2E test

* E2E test
2025-09-05 06:35:47 -04:00
Timofey Kachalov
ab4e737c31 feat(sdk): Add disc/memory caching for hosted bundle on top of etag caching (#63014) 2025-09-05 14:32:34 +04:00
Phoomparin Mano
4a1ce5d04f Send CORS headers for localhost regardless of whether SDK is enabled or not (#61747) 2025-09-05 17:17:52 +07:00
Timofey Kachalov
34f1e6811f Add dev.md placeholder for embedding-sdk-bundle folder (#63160) 2025-09-05 14:05:25 +04:00
Ngoc Khuat
8a5c220e5c add scheduled job e2e tests 2025-09-05 16:59:07 +07:00
Nicola Mometto
daeb777e4d fix: sort data-rows 2025-09-05 10:57:16 +01:00
Nicola Mometto
708f4696ca move utils into transforms.util 2025-09-05 10:50:03 +01:00
Nicola Mometto
fc453f6bbc chore: move insert-from-source into! driver 2025-09-05 10:31:02 +01:00
Dan Stone
f50d99d709 Pass run-id to /logs endpoint 2025-09-05 09:29:03 +01:00
Chris Truter
c19e0fa75f Date times can roundtrip losslessly and custom metadata is supported 2025-09-05 09:53:44 +02:00
Ryan Laurie
805e5beb8b Add base color prohibition to stylelint (#63091)
* add base color rule to stylelint

* allow in colors file

* lint in CI

* better highlighting

* css fixes

* fix all improper color use

* Update frontend/lint/stylelint-rules/no-base-colors.js

Co-authored-by: Phoomparin Mano <poom@metabase.com>

* Update Loki Snapshots

* fix color name

* Update Loki Snapshots

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-04 16:45:59 -06:00
Fraser
246b6534a1 Run type check with increased space to avoid OOM (#63115) 2025-09-05 09:42:13 +12:00
bryan
a532fe0e28 put back the try to catch missing reload mw (#63142) 2025-09-04 21:23:59 +00:00
Robert Kosara
83dc4947f4 Add section about new connection string at top of db settings (#63143)
* Add section about new connection string at top of db settings

* Missed MariaDB…
2025-09-04 14:05:23 -07:00
Aleksandr Lesnenko
8d77a4f153 inline dashcard parameter can only be mapped to the card (#63051)
* inline dashcard parameter can only be mapped to the card, fix mapping mode hides other inline parameters

* update spec

* review
2025-09-04 15:36:46 -04:00
Jeff Bruemmer
92febb9f2b docs - clarify data collection for Metabase editions (#63138)
* Clarify data collection for Metabase editions

* Update docs/usage-and-performance-tools/usage-analytics.md
2025-09-04 15:03:55 -04:00
Phoomparin Mano
92267df836 fix(embed-js): copywriting improvements for embed flow (#63126) 2025-09-05 01:52:55 +07:00
eliotmetabase
7b4ed715ae Fix math to calculate scatter bubble diameter (#63104)
* Fix math and update comment

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-04 09:39:10 -07:00
Dan Stone
fe9b74f261 Remove stdout/err from clj side (single :events output is used now) 2025-09-04 17:38:30 +01:00
Dan Stone
3f720c9624 Read new events jsonl file and use that for the message 2025-09-04 17:34:57 +01:00
Jeff Bruemmer
207cbffc05 notes (#63097) 2025-09-04 12:06:25 -04:00
Ngoc Khuat
0f2d049daf CI for Python Runner (#63113) 2025-09-04 21:54:04 +07:00
github-automation-metabase
cd962a792e Update generated docs (master) (#63106)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-04 10:52:23 -04:00
metamben
55ab852f4b Add transform dependencies and job transforms endpoints (#62776)
* Add transform dependencies and job transforms endpoints

* Add API handler for /api/ee/transform/:id/dependencies

* Add API handler for /api/ee/transform-job/:id/transforms

* Add description to TitleSection

* Add Dependencies section to transform page

* Add transform order to job page

* Invalidate transform jobs when adding tags to transforms

* Add empty state for job transforms

* Add e2e test for transform and job dependencies

* Fix type for job dependencies component

* transform ordering is well defined

* don't sort whole list when we just need the first element

* make new function private

* Use neg?

* Remove unused require

* use a sorted map instead of scanning for the earliest transform each time

* extend docstring

* use ->

* update docstring again

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: William Zimrin <william@metabase.com>
2025-09-04 14:11:57 +00:00
Phoomparin Mano
1280bb454d feat(sdk): native questions should hide filter and summarize from toolbar (#63082) 2025-09-04 20:56:05 +07:00
Nicola Mometto
3d295d8025 unused 2025-09-04 14:40:34 +01:00
Nicola Mometto
456dc422fc don't go through qp for create-table/drop-table 2025-09-04 14:34:21 +01:00
Alexander Polyankin
500e039023 When navigating with browser back/forward buttons, re-run the query only when the existing query results are dirty (#63092) 2025-09-04 09:22:45 -04:00
Alexander Polyankin
3075c57bf4 Add CurrencyPicker to places where you can change the semantic type (#63032)
* Add CurrencyPicker

* Add currency picker

* Add currency picker

* Fix flaky test

* Fix flaky test

* E2E test

* E2E test

* E2E test
2025-09-04 08:56:14 -04:00
Alexander Polyankin
cd290b0daa Fix buttons focus state (#63089) 2025-09-04 08:55:32 -04:00
Abed Habli
7dceeb13b8 docs: Typo in Embedded JS (#63119)
* Typo

* quick fix
2025-09-04 14:53:10 +02:00
Abed Habli
686a52c702 docs: add browser embedding in JS and background-light theme token (#63012)
* Update embedded analytics JS docs to include browser

* small update

* new appearance setting

* Update docs/embedding/embedded-analytics-js.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* Apply suggestion from @jeff-bruemmer

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* Apply suggestion from @jeff-bruemmer

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* update on the browser

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-04 14:11:46 +02:00
Phoomparin Mano
788ef138b0 Add the "Enable to Continue" button to explicitly enable embedded analytics JS (#63054) 2025-09-04 18:45:12 +07:00
Filipe Silva
c5fbd85f0b fix: match filter names in metabase.driver.sync (#63114) 2025-09-04 12:34:58 +01:00
Nicola Mometto
008c87b572 automatically parse datetime fields 2025-09-04 12:18:02 +01:00
Nicola Mometto
b21d3365b7 wip: pass upload_type to manifest 2025-09-04 12:07:55 +01:00
Dan Stone
a639f6bbec Metrics for semantic search indexer/DLQ (#62915)
* WIP

* Use ee-search-gate-max-batch-size

* Gate metrics test

* Fix handling of pg 57014 error state

* Remove redundant require

* Unrelated cleanup

* dlq metrics test

* Indexer loop metric test

* Indexer metric tests

* Fix poll time

* Metric collector and test

* test name

* whitespace

* Fixture

* Suggestions

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-09-04 13:05:26 +02:00
Nicola Mometto
42b06a759f fix: timezone aware datetime 2025-09-04 12:00:14 +01:00
Nicola Mometto
b3088ecfe4 note 2025-09-04 11:38:13 +01:00
Nicola Mometto
a1d8b0650a an in/out type test 2025-09-04 11:37:26 +01:00
Chris Truter
9740c5fe74 Replace python-runner folder with git submodule 2025-09-04 12:12:32 +02:00
Chris Truter
bfdd0754ed Critical fix: docstring indentation 2025-09-04 12:02:50 +02:00
Nicola Mometto
df6404e2f5 hack 2025-09-04 10:46:17 +01:00
Nicola Mometto
22224b8304 simpler api 2025-09-04 10:26:32 +01:00
Nicola Mometto
11c83cab30 switch to delete-target-table 2025-09-04 10:04:15 +01:00
Timofey Kachalov
32f47019f0 Update SDK docs for Hosted Bundle (#63069) 2025-09-04 12:43:36 +04:00
Nicola Mometto
ee3c3ff237 fix hints 2025-09-04 09:22:13 +01:00
Nicola Mometto
467734b04e type hints 2025-09-04 09:12:31 +01:00
appleby
2c02a11a51 Update pgvector to pg17 in semantic search docker-compose.yml and CI workflow (#62967)
* Update pgvector to pg17 in semantic search docker-compose.yml

This matches the version that will be used in prod and staging deployments.

* Update to pg17 in semantic-search.yml CI workflow

* Remove enable-ssl-tests env var from semantic-search.yml workflow
2025-09-04 01:17:54 +00:00
Romeo Van Snick
28125c53b5 Type parameter value (#62804)
* Move validate.js to ts and remove unused validators

* Remove any and unknown for typing parameter values

* Use ParameterValuesMap where possible

* Fix parameter-parsing

* Fix tests

* Fix cast to empty string
2025-09-04 08:57:28 +10:00
dpsutton
bd01f49307 Ignore some test vars (#63078)
metabase.session.models.session-test/send-email-on-first-login-from-new-device-test
test is failing because sometimes there's an extra email in there.

metabase-enterprise.impersonation.driver-test/nested-do-with-connection-with-options-test
is failing because it deadlocks all the app-db connections
2025-09-03 17:44:05 -05:00
bryan
c77f693f51 :dev-start --hot can watch enterprise paths (#62961) 2025-09-03 22:40:48 +00:00
Fraser
6915d54e9f Mark tests as flaky (#63055) 2025-09-04 09:31:28 +12:00
appleby
4b99970499 Fix semantic search tests when running on mysql and enable all appdbs in CI (#62966)
* Also skip the :bookmarked scorer on mysql

MySQL does not like the CASTs in the search-index-query

* Fix appdb-available-with-semantic test for mysql appdb

When the appdb is :mysql, we should fallback to the in-place engine rather than appdb

* Move body of search.engine/results :search.engine/in-place into a func for easy mocking

* Fix api-engine-switching-test for mysql appdb

* Fix test-semantic-search-fallback-supplementation and test-semantic-search-max-combined-results-limit for mysql appdb

* Update semantic-search CI job to run against all supported appdbs
2025-09-03 14:21:37 -07:00
metamben
f13e579c26 Add transform run start/end time and run method filters to the list endpoint (#62835)
* Implement last_run_... filters for transform runs

* Change filters to start_time, end_time, run_method

* Use timestamp literals instead of strings in test

* Add start_time, end_time and run_method to transform run query params in api

* Parse start_time, end_time and run_method params on run list page

* Allow custom react elements in displayValue prop

* Add filters for start_time and end_time to run list page

* Allow filtering on multiple run methods

* Add run method filter widget

* Close time filter when changing value

* Add e2e test for start at, end at and run method filters

* Allow multiple values for run_method filter

* Add test with start_time=2025-08-22~2025-08-23

* Fix e2e test

* Rename the run_method parameter to run_methods

* Remove "local" timestamps

* Return transform run timestamps in the system timezone

* Stop expecting a last_run with a nil value

* Rename run_method to run_methods to match api

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-09-03 20:44:09 +00:00
Uladzimir Havenchyk
6b8e95a34f fix(qb): do not show view detail button in step preview (#63071) 2025-09-03 23:00:34 +03:00
Jakub Chodorowicz
94875789ca Create standalone add DB page (#62927)
* Create standalone add DB page

* Use full page view for editing db connection

* Fix title on edit database page

* fix dataspec  cypress test

* fix missing formLocation prop

* fix add initial data cypress test

* Fix add db test not waiting for db connected

* Fix default schedule cypress test

* Remove unnecessary nullish coalescing and route

* Extract common logic to use-database-connection hook

* Adjust Add DB page width

* Adjust padding for smaller devices

* Use FormLocation type in prop
2025-09-03 19:24:03 +00:00
Noah Moss
c5a14f7ec4 Add repair-index! API with temp table mechanism for detecting lost deletes (#62960)
* Add repair-index! API with temp table mechanism for detecting deletions

* Fix up tests, bug fixes

* Explicitly disable reindex! and reset-tracking

* Add repair index task, and cleanup job in case there are orphans

* fix tests

* Test - comment out new tests to see if it fixes CI failures

* switch with-index! macro to use init! instead of reindex

* try again to fix with-index

* fix kondo

* ensure drop table table names get quoted

* switch to using gate table for the anti-join

* add missing assertion in test

* add more error handling in find-lost-deletes, reorganize a function

* make sure index cleanup task is initialized

* make sure index repair task is initialized
2025-09-03 15:19:26 -04:00
Alex Yarosh
ec14b08b13 docs: new VPAT (#63087)
* docs: new VPAT

* Update docs/installation-and-operation/accessibility.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-03 19:08:15 +00:00
bryan
8d6e60df0f stabilize composed regex schemas (#61805) 2025-09-03 19:02:40 +00:00
Ryan Laurie
fd168103b8 set default time in create event modal (#63046) 2025-09-03 18:58:54 +00:00
bryan
f2ddc223b6 block prs coming from master (#61681) 2025-09-03 14:57:53 -04:00
Dan Stone
e1df9b5c14 Use timestamps to interleave python stdin/err output in msg 2025-09-03 17:54:28 +01:00
Dan Stone
e1083a25f7 Wrap stdin/stderr with timestamp prefixes for each line 2025-09-03 17:54:28 +01:00
Dan Stone
fe3ea7401d Increase max processes
For me 50 was exceeded today and I could not start transforms. I am
guessing these are starter numbers and we'll need to figure out values
anyway
2025-09-03 17:54:28 +01:00
Alex Yarosh
f0de6a74b6 docs links (#63084) 2025-09-03 16:34:21 +00:00
Nicola Mometto
1815a69384 chore: add error 2025-09-03 17:34:02 +01:00
Phoomparin Mano
cefa86ccea Apply the new upsell flow to interactive and embed js upsells (#63062) 2025-09-03 23:32:21 +07:00
Rodrigo López Dato
4d6426249a Suggest to upgrade drivers only for self-hosting (#63079) 2025-09-03 12:28:08 -04:00
Nicola Mometto
af7a73b5f7 chore: allow empty schemas 2025-09-03 17:26:05 +01:00
Nicola Mometto
9035fda953 fix: don't remove indentation before """ 2025-09-03 17:07:59 +01:00
Phoomparin Mano
2f34d06d53 feat(embed-js): throws when setting invalid metabaseConfig keys (#63064) 2025-09-03 23:01:01 +07:00
Nicola Mometto
b4df47d8c8 drop table instead of truncating 2025-09-03 17:00:35 +01:00
Ngoc Khuat
4d270c04d1 remove hashp 2025-09-03 22:30:35 +07:00
github-automation-metabase
245f9e5090 Update generated docs (master) (#63056)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-03 11:08:39 -04:00
Chris Truter
ea56586c04 Add default creds provider to pick up STS 2025-09-03 17:07:09 +02:00
Ryan Laurie
2b28d4e60f Stop pushing useless version info highlights (#62950)
* stop pushing useless version info

* fix dash
2025-09-03 09:06:43 -06:00
Arkadi Yaroslavtsev
ee1aa7620c adding sts dependency 2025-09-03 18:03:02 +03:00
dpsutton
128759d892 Fix time-interval filters (#62892)
* Fix time-interval filters

Reported on stats that the examples dashboard was breaking when you used
some relative timestamps. There it was a bit cryptic with

```
class java.lang.Integer cannot be cast to class
clojure.lang.IPersistentMap (java.lang.Integer is in module java.base of
loader 'bootstrap'; clojure.lang.IPersistentMap is in unnamed module of
loader 'app')
```

Locally in dev, we get:

```
 Error processing query: Invalid output: ["invalid tuple size 4, expected 5, got: [:time-interval [:field {:base-type :type/DateTime, :lib/uuid \"69655229-95a0-4bfb-9d3a-7675b1111ec4\"} 13] :current :day]"]
```

And it's a failure to have the time-interval options

before:
`[:time-interval field-clause :last (keyword unit)]`
after:
`[:time-interval interval-options field-clause :last (keyword unit)]`

spec:

```
(mbql-clause/define-mbql-clause :time-interval :- :type/Boolean
  ;; TODO -- we should probably further constrain this so you can't do weird stuff like
  ;;
  ;;    [:time-interval {} <time> :current :year]
  ;;
  ;; using units that don't agree with the expr type
  [:tuple
   [:= {:decode/normalize common/normalize-keyword} :time-interval]
   [:merge ::common/options ::time-interval-options]  ;; <---- missing bits
   #_expr [:ref ::expression/temporal]
   #_n    [:multi
           {:dispatch (some-fn keyword? string?)}
           [true  [:enum {:decode/normalize common/normalize-keyword} :current :last :next]]
           ;; I guess there's no reason you shouldn't be able to do something like 1 + 2 in here
           [false [:ref ::expression/integer]]]
   #_unit [:ref ::temporal-bucketing/unit.date-time.interval]])
```

Switching them to lib calls and then i noticed there were no tests.

With fix:

```clojure
dates=> (date-string->filter
          "lastmonth"
          [:field {:lib/uuid "00000000-0000-0000-0000-000000000000", :base-type :type/DateTime} "field"])
[:time-interval
 {:lib/uuid "bbca7a83-feb9-4259-a4db-bbb79687eb4e"}
 [:field
  {:lib/uuid "00000000-0000-0000-0000-000000000000",
   :base-type :type/DateTime}
  "field"]
 :last
 :month]
```

In a 56.3.4 repl:
```
user=> (metabase.driver.common.parameters.dates/date-string->filter "lastmonth" [:field {:lib/uuid "00000000-0000-0000-0000-000000000000", :base-type :type/DateTime} "field"])
[:time-interval [:field {:lib/uuid "00000000-0000-0000-0000-000000000000", :base-type :type/DateTime} "field"] :last :month]
user=> (pp)
[:time-interval
 [:field {:lib/uuid "00000000-0000-0000-0000-000000000000", :base-type :type/DateTime} "field"]
 :last
 :month]
nil
```

Note the missing options in the second position

* test e2e dashboard filters

takes a sampling of a few different parameter types and different
parsers. At one point i was doing something like:

```clojure
(concat (for [unit [:day :week :month :quarter :year]
              relative [:this :last]]
          (str (name relative) (name unit)))
        (for [unit '[days weeks months quarters years]
              include? [true false]
              relative '[past next]]
          (str relative "3" (name unit) (when include? "~"))))
```

But that seems overkill. This test is kinda seeing if the query
processor throws an error (or at least that's where most errors
happen). So those checks can be more exhaustive and against some
in-memory metadata providers
2025-09-03 09:43:33 -05:00
dpsutton
9f6acff3f5 two fixes, compaction and when to run (#63042)
* two fixes, compaction and when to run

Test logs are super, duper awesome. We upload them on failure since we
don't presumably need to see healthy logs.

There are two issues:
1. We upload them on `failure()`, but timeouts don't seem to trigger
this condition. So now upload on `always() && !success()` Why not just
`!success()`? An LLM suggests that timeouts are a bit special and go
into another mode. The always() will run and then we qualify it. Let's
see.

2. The logs are all on a single line.

We have a few axes here: compact and eventEol.
I have three files with these. If you want to grep for logs during a
particular test, here's what you get:

Compact: (current behavior)
```
❯ ag "metabase.util.queue-test/result-listener-test" logs/test-log.json.compact
<not reproducing here, because it's the whole file>
```

compact false
```
❯ ag "metabase.util.queue-test/result-listener-test" logs/test-log.json.not-compact
251:    "mb-test" : "metabase.util.queue-test/result-listener-test"
268:    "mb-test" : "metabase.util.queue-test/result-listener-test"
414:    "mb-test" : "metabase.util.queue-test/result-listener-test"
```

It's _too_ expanded.

```
{
  "instant" : {
    "epochSecond" : 1756844736,
    "nanoOfSecond" : 357005000
  },
  "thread" : "main",
  "level" : "INFO",
  "loggerName" : "metabase.util",
  "message" : "Maximum memory available to JVM: 8.0 GB",
  "contextMap" : { },
  "endOfBatch" : false,
  "loggerFqcn" : "org.apache.logging.log4j.spi.AbstractLogger",
  "threadId" : 1,
  "threadPriority" : 5
}
{
  "instant" : {
    "epochSecond" : 1756844739,
    "nanoOfSecond" : 802772000
  },
```

Compact true, eventEol (this PR sets this)
```
❯ ag "metabase.util.queue-test/result-listener-test" logs/test-log.json
17:{"instant":{"epochSecond":1756844991,"nanoOfSecond":537601000},"thread":"main","level":"INFO","loggerName":"metabase.util.queue","message":"Starting listener \u001B[32mtest-result-listener\u001B[0m with 1 threads 🎧","contextMap":{"mb-test":"metabase.util.queue-test/result-listener-test"},"endOfBatch":false,"loggerFqcn":"org.apache.logging.log4j.spi.AbstractLogger","threadId":1,"threadPriority":5}
18:{"instant":{"epochSecond":1756844991,"nanoOfSecond":572361000},"thread":"main","level":"INFO","loggerName":"metabase.util.queue","message":"Stopping listener test-result-listener...","contextMap":{"mb-test":"metabase.util.queue-test/result-listener-test"},"endOfBatch":false,"loggerFqcn":"org.apache.logging.log4j.spi.AbstractLogger","threadId":1,"threadPriority":5}
20:{"instant":{"epochSecond":1756844991,"nanoOfSecond":585407000},"thread":"main","level":"INFO","loggerName":"metabase.util.queue","message":"Stopping listener test-result-listener...done","contextMap":{"mb-test":"metabase.util.queue-test/result-listener-test"},"endOfBatch":false,"loggerFqcn":"org.apache.logging.log4j.spi.AbstractLogger","threadId":1,"threadPriority":5}
```

You get the whole log lines. super helpful. pipe these through a
processing pipeline, use jq, etc.

Also, these files are ~817MB when running in a test suite. I'm doing these with a single namespace

```
❯ clj -X:dev:test :only metabase.util.queue-test

❯ ls -lh logs
13K Sep  2 15:29 test-log.json
13K Sep  2 15:24 test-log.json.compact
16K Sep  2 15:26 test-log.json.not-compact
```

* stacktraces when we don't get returned connections
2025-09-03 09:37:23 -05:00
dpsutton
9191713854 Quick ci test disabling (#63030)
* use new hawk version. waiting on release

* quick checkin on CI stuff

* load file to ignore vars

```clojure
;; json file with a list of vars
test-runner=> (println (slurp "/tmp/config.json"))
{
  "ignored": {
    "vars": [
      "metabase.util.queue-test/bounded-transfer-queue-test",
      "metabase.util.queue-test/take-batch-test"
    ]
  }
}

nil
test-runner=> (find-tests (build-final-options {:ci-config-file "/tmp/config.json"
                                                :only 'metabase.util.queue-test}))
Running tests with options {:namespace-pattern #"^(?:(?:metabase.*)|(?:hooks\..*))", :exclude-directories [".clj-kondo/src" "classes" "dev" "enterprise/backend/src" "local" "resources" "resources-ee" "src" "target" "test_config" "test_resources"], :test-warn-time 3000, :ignored {:vars #{"metabase.util.queue-test/bounded-transfer-queue-test" "metabase.util.queue-test/take-batch-test"}}, :ci-config-file "/tmp/config.json", :only metabase.util.queue-test}
Running tests in metabase.util.queue-test
Finding tests took 1000.0 µs.
Running 4 tests
(#'metabase.util.queue-test/non-delayed-take-batch-test
 #'metabase.util.queue-test/result-listener-test
 #'metabase.util.queue-test/listener-handler-test
 #'metabase.util.queue-test/multithreaded-listener-test)

;; only found 4 tests
;; no ignored vars

test-runner=> (println (slurp "/tmp/empty-config.json"))
{
  "ignored": {
    "vars": []
  }
}

nil

;; finds 6 tests
test-runner=> (find-tests (build-final-options {:ci-config-file "/tmp/empty-config.json"
                                                :only 'metabase.util.queue-test}))
Running tests with options {:namespace-pattern #"^(?:(?:metabase.*)|(?:hooks\..*))", :exclude-directories [".clj-kondo/src" "classes" "dev" "enterprise/backend/src" "local" "resources" "resources-ee" "src" "target" "test_config" "test_resources"], :test-warn-time 3000, :ignored {}, :ci-config-file "/tmp/empty-config.json", :only metabase.util.queue-test}
Running tests in metabase.util.queue-test
Finding tests took 0.0 ns.
Running 6 tests
(#'metabase.util.queue-test/non-delayed-take-batch-test
 #'metabase.util.queue-test/take-batch-test
 #'metabase.util.queue-test/result-listener-test
 #'metabase.util.queue-test/listener-handler-test
 #'metabase.util.queue-test/bounded-transfer-queue-test
 #'metabase.util.queue-test/multithreaded-listener-test)
```

* Fetch ci-test-config.json from master on each test run

This affects all BE tests, driver and app-db. Don't pass an explicit arg
and just let the default pick it up.

```bash
❯ clj -X:dev:test :only metabase.util.queue-test
Running tests with options {:mode :cli/local, :namespace-pattern #"^(?:(?:metabase.*)|(?:hooks\..*))", :exclude-directories [".clj-kondo/src" "classes" "dev" "enterprise/backend/src" "local" "resources" "resources-ee" "src" "target" "test_config" "test_resources"], :test-warn-time 3000, :ignored {}, :exclude-tags [:metabot-v3/e2e], :only metabase.util.queue-test}
Running tests in metabase.util.queue-test
Finding tests took 7.5 s.
Running 6 tests
Running before-run hooks...

LONG TEST in metabase.util.queue-test/take-batch-test
Test took 4.720 seconds seconds to run

LONG TEST in metabase.util.queue-test/bounded-transfer-queue-test
Test took 7.518 seconds seconds to run

6/6   100% [==================================================]  ETA: 00:00

Ran 6 tests in 12.421 seconds
53 assertions, 0 failures, 0 errors.
{:test 6, :pass 53, :fail 0, :error 0, :type :summary, :duration 12421.435583, :single-threaded 6}
Ran 0 tests in parallel, 6 single-threaded.
Finding and running tests took 20.0 s.
All tests passed.
Running after-run hooks...
Running QP tests against these drivers: #{:h2}

metabase on  quick-CI-test-disabling [$!?] via ☕ v21.0.2 on ☁️  metabase-query took 48s
❯ clj -X:dev:test :only metabase.util.queue-test :ci-config-file '"/tmp/config.json"'
Loading CI config file from /tmp/config.json    # <------ new output
Running tests with options {:mode :cli/local, :namespace-pattern #"^(?:(?:metabase.*)|(?:hooks\..*))", :exclude-directories [".clj-kondo/src" "classes" "dev" "enterprise/backend/src" "local" "resources" "resources-ee" "src" "target" "test_config" "test_resources"], :test-warn-time 3000, :ignored {:vars #{"metabase.util.queue-test/bounded-transfer-queue-test" "metabase.util.queue-test/take-batch-test"}}, :exclude-tags [:metabot-v3/e2e], :only metabase.util.queue-test, :ci-config-file "/tmp/config.json"}
Running tests in metabase.util.queue-test
Finding tests took 6.9 s.
Running 4 tests
Running before-run hooks...

4/4   100% [==================================================]  ETA: 00:00

Ran 4 tests in 0.133 seconds
42 assertions, 0 failures, 0 errors.
{:test 4, :pass 42, :fail 0, :error 0, :type :summary, :duration 133.16525, :single-threaded 4}
Ran 0 tests in parallel, 4 single-threaded.
Finding and running tests took 7.1 s.
All tests passed.
Running after-run hooks...
Running QP tests against these drivers: #{:h2}
```

Note that it runs 4 tests instead of 6. The config passed here was:

``javascript
{
  "version": "1.0.0",
  "ignored": {
    "vars": [
      "metabase.util.queue-test/bounded-transfer-queue-test",
      "metabase.util.queue-test/take-batch-test"
    ]
  },
  "metadata": {
    "last_updated": "2025-08-02",
    "updated_by": "engineering-team",
    "reason": "Testing CI config implementation"
  }
}
```

* empty ci-test-config

this will be the file when this merges

* print config when it has vars that we are ignoring

* PR review feedback

typo in example json

set continue-on-error: true. if network fails, let's not fail our
build. it's just a little file. carry on soldier. worst case scenario a
test known to flake might flake. might not.
2025-09-03 09:33:11 -05:00
Ngoc Khuat
0c871cbd68 fix delete transform + table 2025-09-03 20:58:08 +07:00
Nicolò Pretto
8a71067f33 add eslint rule to catch missing key prop inside components passed to jt (#63063)
* add eslint rule to catch missing key prop inside components passed to jt

* fix errors found
2025-09-03 15:36:27 +02:00
Nicola Mometto
8f038a2476 note 2025-09-03 13:11:58 +01:00
Nicola Mometto
52dad58417 move to common ns 2025-09-03 13:10:36 +01:00
Nicola Mometto
97bbf28724 todo 2025-09-03 13:09:08 +01:00
Nicola Mometto
b06558f7fc with double dispatch 2025-09-03 13:03:14 +01:00
Nicola Mometto
9e4bb24349 creation tests 2025-09-03 12:53:09 +01:00
Nicola Mometto
2c269334ab chore: fix tests 2025-09-03 12:53:09 +01:00
Nicola Mometto
b594e954d8 relax schema 2025-09-03 12:53:09 +01:00
Nicola Mometto
de545a639e wip: move away from csv upload 2025-09-03 12:53:08 +01:00
Ngoc Khuat
cc9f0cc6da fix build error s3 v2 2025-09-03 18:49:33 +07:00
Ngoc Khuat
35588c7f9e switch s3 sdk to v2 2025-09-03 17:22:21 +07:00
Nicola Mometto
c5920c39e8 remove whitespaces 2025-09-03 10:48:03 +01:00
Nicola Mometto
1ffcaee719 add logging 2025-09-03 10:45:44 +01:00
Nicola Mometto
9f619f71cc fix args 2025-09-03 10:42:17 +01:00
Nicola Mometto
1e63d81675 fix import typo 2025-09-03 10:37:19 +01:00
Nicola Mometto
a13415c31f cleanup, remove csv metrics (as it's going to change), generic with-timing 2025-09-03 10:36:41 +01:00
Chris Truter
22554bed89 rough metadata transfer (just return raw dtype for now) 2025-09-03 11:30:09 +02:00
Ngoc Khuat
db1155d958 fix scheduled python run 2025-09-03 15:31:23 +07:00
Chris Truter
e0b446f108 more type check fixes - including some smelly optional override stuff 2025-09-03 09:48:36 +02:00
Chris Truter
ba51fad9d2 fix type errors 2025-09-03 09:42:49 +02:00
Kamil Mielnik
bf19cc9606 Fix flaky test (#63009) 2025-09-03 14:07:42 +07:00
Chris Truter
d4b7faa3ff solve more fe lints 2025-09-03 07:43:42 +02:00
Chris Truter
8c8fba1874 trouble with kms - support only region without custom endpoint 2025-09-03 07:34:38 +02:00
Romeo Van Snick
b53b8411c4 Wrap long question or dashboard names (#62980)
* Add repro for metabase#52872

* Wrap long titles without spaces in saved questions

* Add repro for metabase#52872 for dashboards

* Fix width of dashboard with long name

* Use max-width instead of width
2025-09-03 13:10:11 +10:00
Phoomparin Mano
c380541d30 Show loading indicator overlay immediately on embed flow preview (#63001) 2025-09-03 07:17:01 +07:00
Romeo Van Snick
6ce3e4b250 Show non-aggregation functions in aggregations (#62989)
* Show non-aggregation functions in aggragations

* Fix unit test

* Add repro for metabase#62987

* Lower fuzzing iterations
2025-09-03 09:55:58 +10:00
Chris Truter
ca970b80e7 fix unit test 2025-09-03 00:43:13 +02:00
bryan
f80fee03bd Make Usage Analytics work on mysql (#62357)
Co-authored-by: dan sutton <dan@dpsutton.com>
2025-09-02 22:19:59 +00:00
Chris Truter
2b9ead20f9 fix kondo 2025-09-03 00:15:53 +02:00
Chris Truter
f0f9b98f0f Fix build - oops 2025-09-03 00:13:48 +02:00
Chris Truter
1cccfd3c66 Don't need this negative comment 2025-09-03 00:05:09 +02:00
Chris Truter
79f2bc3a06 Various fixes for staging and general life
- Measure time properly
- Make endpoint config optional, so it's skipped in staging
- Make auth key config option, so it's skipped in staging
- Skip dev-only settings defaults in staging
- Add prefix, so staging permissions work
- Use short names for Java classes (Cursive lint)
- Remove trivial comments, answer some others
- Fix test-id that broke malli
2025-09-03 00:00:16 +02:00
Jeff Bruemmer
2970fc027f check doc links on PRs (#63041) 2025-09-02 17:04:42 -04:00
Ryan Laurie
a8fe573099 Fix Select Visual Bugs (#62466)
* fix double scroll + padding on select dropdown

* remove overrides for root overflow

* override inline style

* I think this is good

* less bad
2025-09-02 21:00:44 +00:00
Chris Truter
6171621ea3 lock down script permissions a bit more 2025-09-02 22:28:48 +02:00
Chris Truter
f6d0e32a02 Remove sharp hidden failures edges around bucket creation 2025-09-02 22:10:24 +02:00
Chris Truter
1697548096 Use system credentials for s3 2025-09-02 22:10:24 +02:00
Denis Berezin
8bd9ea4b3f Fix multiple datasource viz settings in visualizer (#63004)
* Fix multiple datasource viz settings in visualizer

* Add e2e test
2025-09-02 22:51:09 +03:00
Jeff Bruemmer
c9baddf99f update docs link checker (#62687) 2025-09-02 15:39:46 -04:00
Nick Fitzpatrick
bba0093d38 use container padding to provide space between items in entity picker lists (#62883) 2025-09-02 15:50:29 -03:00
Filipe Silva
bfd69205ef feat: Pg Replication Preview modal (#61522)
* etc: kickoff comments

* get quotas statuses from token-check (#61560)

* get quotas statuses from token-check
* Check quota and estimated-row-count of dbs before replication
* Evict token-check cache to get updated quotas

* Turn the MB pg replication button into a modal (#61701)

Closes: https://linear.app/metabase/issue/CLO-4308/turn-the-mb-pg-replication-button-into-a-modal

* Fix schema-filters-patterns split

* split token-check row estimates counts (#61783)

* Split token-check row estimates counts
* add preview endpoint

* Align replication schema-filters with HM

Fixes: 805f4cafcf
Depends-on: https://github.com/metabase/harbormaster/pull/6445

* preview endpoint changed

* temp frontend modal

* After pairing with Raimon

* Fix lint and fmt errors

* pg replication modal  (#61913)

* Success modal on starting replication
* Visual improvement to DatabaseReplicationForm
* made non-pk-tables list prettier

---------

Co-authored-by: Dennis Schridde <dennis@metabase.com>

* Run prettier and linter on DatabaseReplicationForm

* Turn DatabaseReplicationModal into a multi step thing and add backend API to support this

* Workaround broken dirty bit

* Call setFieldValue("schemaFields", "") when schemaSelect=all

* fix enabling of the replication button

* UI updates

* UI updates

* removed package-lock file

* Don't wait for replication to become "active" in "setting up" modal

The progression from "initializing" to "active" can take arbitrary
amounts of time.  Instead we should show the "setting up" modal while
creating the replication, which is synchronous and has an upper bound
of 40s.

Fixes: 6f2ba1852e
References: https://metaboat.slack.com/archives/C079ZS06ERJ/p1754940482733049

* Loading for preview method

* Error handling

* Modal padding and title updates

* Remove info about future email from form

* Misc

* Misc

* DatabaseReplicationStatusInfoProps cleanup

* Misc

* Status modal content padding

* Modal properties

* fix: throw harbormaster call error body in ex-data

* Show which tables are excluded from replication because of owner mismatch

Closes: https://linear.app/metabase/issue/CLO-4346/preview-should-also-include-schemas-that-cant-be-synced-due-to-owner

* Align text of replication modal more with Figma

* UI updates 1

* Replication stats spacing updates

* Misc

* Tables listing icons

* Alignment updates

* Layout updates for tables listing

* Misc

* Colours updates

* List updates

* Misc

* Misc text alignment

* Misc

* Scrollable tables list

* Fix tables listing

* Comma separated DB WIP

* Misc

* Fix margins

* Ui updates

* More on setting up and success layout

* Test for spinner

* More on spinner

* Colour update

* Box shadow for spinner

* Spinner size updated

* Spinner padding updated

* Spinner added to setting up step

* Misc

* Sizes updated

* Fix for unit tests

* Debounce for schema filters

* Schema filters onChange

* Remove loading in button is no schema filters

* Loader for preview

* Misc

* feat: check replication table ownership

Same as how HM does it.

* Moved laoder next to the submit button

* Make DatabaseReplicationForm look more "loading..." during preview

* Remove setFieldValue hack

Was obsoleted by 9cdbeaec7a

* Also show skeletons when data is not fresh (i.e. when loading)

* Fix linter: Change set IDs are not in order

* Build uberjar container also when pushing a PR branch

Before it would only build when the `build-docker-uberjar` label was
added.  So to build the latest branch head you'd have to remove and
re-add the label.

Fixes: 22507a963a

* Link to postgres docs

* SUrface "incorrect" errors from HM response to connection creation

* Misc

* Modal layout

* Error modal UI updates

* Misc

* More on layout + alignment fixed

* More on error layout

* Fix for modal closing

* rfct: use pg conn preview

* revert owner sync

* rfct: use existing schema filter format

* lint: fix fe

* feat: also show tables that will be replicated

* test: update be tests

* rfct: minor renames for consistency

* fix: cannot replicate 0 tables

* style: fix

* fix: copy

* test: update body prop

* test: add form tests

* fix: progress indicator on bottom

* fix: card styles

* fix: error message when no tables to replicate

* fix: easy stuff from jakub's review

* fix: error state for preview too

* claude: fast FE unit tests

* rfct: use fetchMock in FE test

* fix: remove small error step text

* fix: mocal close should reset setup step

* fix: translate noSyncReason

* fix: catch invalid schema pattern as 400

* rfct: use plain fn for onSubmit

* rfct: raise inline fn

* rfct: use correct token-check alias

* rfct: remove unused preview fields

* rfct: raise free-quota fn

* fix: throw on tunnel or certs

* rfct: remove silly when

* rfct: testable preview-replication and errors map

* test: granular fe error tests

* test: fix BE tests

* test: preview-replication unit tests

* fix: test redef name

* rfct: style and db as dbname

---------

Co-authored-by: Raimon Grau <raimon@metabase.com>
Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>
Co-authored-by: Dennis Schridde <dennis@metabase.com>
Co-authored-by: Raimon Grau <raimonster@gmail.com>
Co-authored-by: Arkadi Yaroslavtsev <arkadi@metabase.com>
Co-authored-by: losrebellos <ben@benoitvinay.com>
2025-09-02 17:51:28 +01:00
Filipe Silva
d6c7c03ebe feat: audit for cloud add on purchase (#63021)
Fix https://linear.app/metabase/issue/CLO-4380/pass-metabase-user-information-to-store-api-using-a-http-header
2025-09-02 16:57:27 +01:00
Nicola Mometto
32b49c788c snuck back in 2025-09-02 16:38:55 +01:00
Nicola Mometto
f447bdaa8f just use run-id 2025-09-02 16:36:16 +01:00
Vamsi Peri
1b468c92f9 Fix question download filenames to use question name instead of generic 'query_result' (#61710)
* Fix question download filenames to use question name instead of generic 'query_result'

Resolves: https://github.com/metabase/metabase/issues/61708

Previously, when downloading questions from the SDK (and public links), files were
named with a generic "query_result_{timestamp}.{format}" pattern even when the
question had a meaningful name.

This fix ensures that:
- Questions with valid names use the slugified question name as filename
- Questions with nil/empty/blank names fall back to "question" instead of "query_result"
- Both regular card downloads (/api/card/:id/query/:format) and public link downloads are fixed

Changes:
- Modified process-query-for-card-default-run-fn in query_processor/card.clj
- Modified process-query-for-card-with-id-run-fn in public_sharing/api.clj
- Added proper fallback logic using str/blank? to handle edge cases

Expected behavior:
- "My Awesome Question" → my_awesome_question_{timestamp}.csv
- nil/empty name → question_{timestamp}.csv

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Cleanup and added tests

* Make whitespace linter happy

* Fix silly oversight

* Set warn-on-reflection

* Fix issues

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Timothy Dean <timothy@timothydean.dev>
2025-09-02 09:33:39 -06:00
Stas Gavrylov
264ab81bd9 List View – Fixes for missed cases (#63013)
* WRK-867: Fix list display changing when duplicating model/turning into question

* Update e2e test for List View
2025-09-02 18:23:07 +03:00
Nicola Mometto
fbb2824944 simplify 2025-09-02 16:12:24 +01:00
Nicola Mometto
34331c5a79 instrument python execution 2025-09-02 16:04:07 +01:00
Nicola Mometto
935e458161 instrument the job 2025-09-02 16:04:07 +01:00
Nicola Mometto
31f5c10ffe chore: allow analytics for transforms 2025-09-02 16:04:07 +01:00
Nicola Mometto
c77efb4ba1 feat: add instrumentation util namespace 2025-09-02 16:04:07 +01:00
Nicola Mometto
e7510b606e wip: add transform metrics 2025-09-02 16:04:07 +01:00
Chris Truter
ff2dc465f7 more debugging stuff 2025-09-02 16:58:01 +02:00
Chris Truter
43de9c4f6a Some minor fixes around docstring rewriting 2025-09-02 16:30:06 +02:00
Dan Stone
126098289b Logs are viewable inline during execution of python transforms 2025-09-02 15:23:09 +01:00
Phoomparin Mano
087a69eb78 fix(sdk): prevent double scrollbars in sdk dashboards (#62962) 2025-09-02 21:20:02 +07:00
Phoomparin Mano
ad621ed1f0 Embed JS should show "Try it out" before docs in admin panel (#62954) 2025-09-02 21:19:15 +07:00
Phoomparin Mano
f4821a0935 feat(sdk): use entity ids directly in collection picker and browser (#60562) 2025-09-02 21:18:18 +07:00
Konstantin Darutkin
54bee8a76b feat: render link to table metadata editing in the error message (#63018) 2025-09-02 14:05:51 +00:00
github-automation-metabase
49080efe82 Update generated docs (master) (#62978)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-02 09:50:28 -04:00
dpsutton
5973b65a81 disable starburst (#62955) 2025-09-02 08:29:16 -05:00
Chris Truter
e0f8ed8415 Return explicit errors when trying to edit a table without a PK (#62893) 2025-09-02 15:51:31 +03:00
Dan Stone
fb808245e3 Logs endpoint vibes
Needs to be destroyed at some future point
2025-09-02 11:46:57 +01:00
Dan Stone
159462606f Tests include boto3 now, so add to venv 2025-09-02 11:46:57 +01:00
Nicola Mometto
7d1ba026db eh, rename to appease the munging 2025-09-02 11:21:06 +01:00
Nicola Mometto
18199cf553 remove placeholders 2025-09-02 11:21:05 +01:00
Nicola Mometto
1fd87edf97 use new settings 2025-09-02 11:21:05 +01:00
Nicola Mometto
76097a2c65 feat: split settings 2025-09-02 11:21:05 +01:00
Nicola Mometto
cc5eb4332c feat: settings page with s3 configs 2025-09-02 11:21:05 +01:00
Nicola Mometto
54ad1db5c8 remove old setting 2025-09-02 11:21:05 +01:00
Chris Truter
a3af25f5b0 Auto-update Python transform function signature when table aliases change
- Automatically updates def transform(...) signature when aliases are modified
- Updates docstring Args section with aligned descriptions and table names
- Adds reset button to restore default slugified aliases
- Validates alias input to only allow valid Python identifiers
- Handles multi-line signatures for many parameters (>80 chars)
- Shows visual distinction between custom and auto-generated aliases
- Fixes code editor layout to prevent overlap with Run button
2025-09-02 12:17:43 +02:00
Sébastien
ca9ebb9972 Closes EMB-716 publicly shared maps in dashboards (#62990)
* Closes EMB-716 publicly shared maps in dashboards

* string | number -> DashboardId
2025-09-02 11:23:21 +02:00
Chris Truter
6ec9182ad0 silly move, from demo #p 2025-09-02 11:22:49 +02:00
Phoomparin Mano
dbdf070383 fix(sdk): drills and go to dashcard does not work in dashboard with entity ids (#62953) 2025-09-02 16:21:54 +07:00
Nicola Mometto
efb033096e chore: docstrings in right position 2025-09-02 10:06:51 +01:00
Timofey Kachalov
85ab7c0184 refactor(sdk): Improve version-helpers and sdk bundle version injection (#63008) 2025-09-02 12:27:20 +04:00
Fraser
0c17daf51b Enable ts incremental builds (#62910) 2025-09-02 10:29:07 +12:00
Chris Truter
91bd482969 Fix for 404s 2025-09-01 18:48:40 +02:00
Chris Truter
010ab29959 Fix for find-replace breaking signed url 2025-09-01 18:48:40 +02:00
Chris Truter
3f897aa4f8 get rid of vestigial working_dir 2025-09-01 18:48:40 +02:00
Nicola Mometto
d17158db77 working button 2025-09-01 17:43:07 +01:00
Nicola Mometto
29c80be876 add cancel python test endpoing 2025-09-01 17:37:59 +01:00
Nicola Mometto
76dc608ed8 add cancel button to test python endpoint 2025-09-01 17:37:50 +01:00
Phoomparin Mano
88aaf24794 ci(sdk): version bump for Next.js for host apps e2e tests (#62994) 2025-09-01 22:46:57 +07:00
Nicola Mometto
ded4524241 better endpoint name 2025-09-01 16:31:02 +01:00
Nicola Mometto
65b3027992 fix /test error reporting 2025-09-01 16:14:47 +01:00
Nicolò Pretto
a99144ee23 fix: remove helpers from the types of cy (#62662) 2025-09-01 16:57:32 +02:00
Sébastien
022b84e40d Closes EMB-650 move download button to footer for title-less embed tables (#62917)
* Closes EMB-650 move download button to footer for title-less embed tables

* Also show download button in paginated tables

* screenshot

* Update frontend/src/metabase/public/containers/PublicOrEmbeddedQuestion/PublicOrEmbeddedQuestionView.tsx

Co-authored-by: Phoomparin Mano <poom@metabase.com>

* .

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-09-01 16:18:35 +02:00
Nicolò Maria Mezzopera
21125870c0 chore: removed not needed cy.wait (#61412) 2025-09-01 14:18:22 +00:00
Chris Truter
d72ca3c6cc Minor code and object cleanup 2025-09-01 15:13:39 +02:00
Chris Truter
0622b4004a writing to a tempfile first is a feature - we can close the dwh query faster 2025-09-01 15:12:08 +02:00
Nicola Mometto
8348a94edb Merge remote-tracking branch 'origin/proj-python/s01e02' into proj-python/s01e02 2025-09-01 13:59:30 +01:00
Nicola Mometto
c96bd66166 Merge remote-tracking branch 'origin/proj-python/s01e02' into proj-python/s01e02 2025-09-01 13:55:49 +01:00
Chris Truter
21a54d7591 s3 config setting 2025-09-01 14:48:51 +02:00
Chris Truter
b8fb092432 Linter stuff 2025-09-01 14:38:30 +02:00
Nicola Mometto
5f6d3ee14e leave async cancel for sql 2025-09-01 13:35:45 +01:00
Chris Truter
f6b143d489 Makefile creates bucket 2025-09-01 14:31:45 +02:00
Chris Truter
8e5d085924 Vile vibe verbiage - but it works (locally) 2025-09-01 14:30:29 +02:00
Nicola Mometto
e1b4627f33 cancel working e2e 2025-09-01 13:22:00 +01:00
Chris Truter
fd50372b5d Hacky as all hell - input files use s3 2025-09-01 14:14:23 +02:00
Nicola Mometto
322edf01ba immediately cancel run 2025-09-01 13:01:26 +01:00
Nicola Mometto
50059a9790 fix transform-run-cancelation 2025-09-01 12:57:19 +01:00
Dan Stone
1115e30d3b Add docker-compose.yml with localstack
Makefile/tests now uses docker-compose
2025-09-01 12:53:50 +01:00
Nicola Mometto
518877e2f6 fix running-run for transform-id 2025-09-01 12:52:34 +01:00
Jakub Chodorowicz
11f98faf74 Hide CSV panel with no meaningful uploadable dbs (#62854)
* Hide CSV panel with no meaningful uploadable dbs

* Hide add data when no meaningful actions can be performed

* Simplify conditional for shouldShowUploadPanel test

Co-authored-by: Anderson <ands.alves.nunes@gmail.com>

* Show CSV tab also when user can upload data

User with upload permissions, but without admin rights, cannot see uploadable dbs in the api response

* Add e2e test for hidden add data for regular users without upload permissions

---------

Co-authored-by: Anderson <ands.alves.nunes@gmail.com>
2025-09-01 13:50:52 +02:00
Nicola Mometto
b0749f1b2b add cancel button 2025-09-01 12:45:08 +01:00
Nicola Mometto
c7cba11e85 fix cancel endpoint 2025-09-01 12:45:02 +01:00
Nicola Mometto
a1bcd98682 pass run-id 2025-09-01 12:44:59 +01:00
Nicola Mometto
95b077f039 fix tests 2025-09-01 12:31:10 +01:00
Nicola Mometto
840a2b71e8 feat: cancel in python server 2025-09-01 12:30:23 +01:00
Nicola Mometto
8325bb3375 feat: interrupt request on cancel 2025-09-01 12:20:51 +01:00
Nicola Mometto
00e078cfa4 chore: pipe cancel-chan down to python-runner 2025-09-01 10:54:43 +01:00
Nicola Mometto
105039ee2f Merge remote-tracking branch 'origin/master' into proj-python/s01e02 2025-09-01 10:41:02 +01:00
Cam Saul
b3c3ce62ab Fix deselecting fields in joins with inactive implicitly joined remapped columns (#62846)
* Don't add inactive remaps

* Don't add inactive remaps

* cljfmt

* summer squash

* Fix equality

* Fix bug in field resolution with multiple remaps between Table A and Table B

# Conflicts:
#	test/metabase/lib/field/resolution_test.cljc

* Kondo

* Fix fix

* A very nice fix 🔧
2025-08-30 00:07:20 -07:00
Cam Saul
e0a501e35b Malli validator LRU cache (#62523)
* Malli validator LRU cache

* Remove comments

* Pull in the changes to legacy-MBQL schema to power changes to predicates
2025-08-29 19:56:02 -07:00
bryan
89403cd164 spit out the nrepl port (#62443) 2025-08-29 18:42:42 -07:00
Brad Anderson
6d1ad5ad65 Fix: Command palette layout shift on open (#62945)
* UXW-295 Fix command palette layout jump by moving `useCommandPalette` to the always-mounted Palette component

* UXW-295 Fix tests
2025-08-29 16:28:04 -06:00
appleby
41551f5654 semantic search: fallback to backup engine when search-string is nil (#62947)
* semantic search: fallback to backup engine when search-string is nil

* Add test-semantic-search-fallback-empty-or-nil-search-string
2025-08-29 21:17:28 +00:00
Cam Saul
3c6ae7d9c0 Don't add inactive remaps (#62949)
* Don't add inactive remaps

* Don't add inactive remaps

* cljfmt
2025-08-29 20:50:23 +00:00
Alexander Polyankin
46cf12e858 Show a special error screen when you don't have permissions to run the query (#62941)
* Show a special error screen when you don't have permissions to run the query

* Show a special error screen when you don't have permissions to run the query

* Fix tests
2025-08-29 20:48:05 +00:00
Riley Thompson
8bb7956042 Enable transforms support for more drivers (#62430)
* Unpolished WIP hackathon code for additional driver support

* fix kondo

* add transforms/table featuer for supported drivers

* fix transforms for dbs with no schema

* rename transform datasets to prevent foreign key overlap

* Add clickhouse support

* fix clickhouse tests

* fix redshift tests

* fix bigquery failures

* kondo and filter tests by feature

* fix transform dataset for bigquery

* fix sqlserver transforms with joins

* fix clickhouse order by when no non nullable field is available

* add more complex test with join, filter, aggregation and ordering

* use different metadata provider

* filter for left join feature in test

* improve sqlserver compile-transform

* done use legacy mbql in test, refactor normalize-name

* clean up

* add sqlserver error test

* parse query and add into for sqlserver

* add type hints for linter

* Address comments

---------

Co-authored-by: Timothy Dean <timothy@timothydean.dev>
2025-08-29 15:47:06 -04:00
Alexander Polyankin
d70f6dae3b E2E repro for "Error when using coalesce expression in question with joins" (#62923) 2025-08-29 15:31:11 -04:00
Alexander Polyankin
9b4da26149 Fix model sidebar for joined tables (#62936) 2025-08-29 15:31:05 -04:00
Aleksandr Lesnenko
c8fb2a8ff4 fix combining timeseries datasets (#62903)
* fix combining timeseries datasets

* review
2025-08-29 19:08:33 +00:00
William
a08cb0df7b Differentiate different geographic drills and don't show duplicates (#62778)
Previously, if you had city, state, latitude, and longitude breakouts, you'd get zoom in (city), zoom in (state), zoom in (lat/lon for lat), zoom in (default binning for lat), zoom in (lat/lon for lon), and zoom in (default binning for lon).  Those would all be called "zoom in", so you'd just see half a dozen drills with the same title.  This hides the default binning drills if we are showing lat/lon, and gives the assorted geographic zoom-ins different titles.
2025-08-29 17:28:06 +00:00
Nicolò Pretto
eeee70fd5f chore(sdk): limit what branch we can release when using the workflow (#62925)
from master
2025-08-29 17:11:44 +00:00
Jeff Bruemmer
e0615cb2b5 docs - metabot follow-ups (#62934)
* consolidate blockquotes

* edit
2025-08-29 13:08:11 -04:00
Oleksandr Yakushev
fe01932aad Fix conversion of grouped pivot values to consistent types (2nd attempt) (#62902) 2025-08-29 13:02:52 -04:00
Robert Kosara
90ef491973 Add Jeff's suggestions from #62929 (#62933)
Today's lesson: don't turn on auto-merge if you want to be able to respond to suggestions…
2025-08-29 16:30:20 +00:00
Cam Saul
eb8aad0e2c wrap-value-literals => Lib (#62619)
* `wrap-value-literals` => Lib

* Mostly working nicely

* Clean up other middleware + test fix

* Finish it up

* Code cleanup

* Kondo

* Fix test 🔧

* Work around https://github.com/clj-kondo/clj-kondo/issues/2610

* Test fixes; PR feedback

* Fix walk recursion into `:case` and `:if`

* code cleanup

* Oracle test fix 🔧

* Another test fix 🔧
2025-08-29 09:23:35 -07:00
Braden Shepherdson
e20f7e2382 [ClickHouse] Handle SSH tunneling when checking for :connection-impersonation support (#62743)
Fixes #62377.

Correctly get a connection to the database while checking the ClickHouse version
(used to check if it supports `:connection-impersonation`). The driver was using the
internal, raw form of getting a connection, which didn't apply the SSH tunnel properly.
2025-08-29 16:22:02 +00:00
Robert Kosara
925cfb5a64 Add Snowflake JDBC error troubleshooting section (#62929)
This addresses an issue people run into when running the JAR file and connecting to Snowflake
2025-08-29 16:20:24 +00:00
Eric Normand
d17734fd9b Reproduce error on duplicating blocked card (#61103) 2025-08-29 16:07:38 +00:00
Stas Gavrylov
0cf6547fed Models – List View (#62428)
* Boilerplate

* Add list view toggle control to ViewFooter

* Remove processRemappedColumns, add layout

* Navigation

* Back button,breadcrumbs

* TODO

* Layout

* Layout

* Refactor

* Column detection logic

* Inline

* Fix

* Extract Breadcrumb

* Fix

* Entity name in nav

* Condition

* Fix

* Header

* Style

* Remove

* Do not render header if no column can be used there

* Body

* Add empty list viz

* Update VizStyleToggle to use list display type

* Sidebar

* Style

* Add simple list view

* Add virtualization for ListViz view. Optimize rendering

* Copy

* Hover style

* Add object detail modal opening on list item click

* Remove back button

* Overflows

* a11y

* Redundant css

* Fix

* Fix rendering

* Style links

* Cleanup

* FK pill

* Render images

* Prevent showing old images while new are loading

* Take currency_in_header into account

* Extract `ColumnHeader`

* Cleanup

* Fix spacing, colors

* Refactor relationships

* Update PK drill

* PK drill

* Fix

* Fix

* Improve layout of list items

* Center cells content

* Add sorting

* Fix virtualized behavior

* Fix copy if row name is not available

* Max height for values

* Update ViewStyleToggle rendering rule to fix incorrect list view icon

* Styling fixes

* Make whole list view scrollable

* Hide truncated data warning for list view

* Fix PK drilll

* Don't memo formatted rows

* Fix virtualization

* Use drills for sorting

* Fix virtualization flickering

* Fix drills

* Disable viz settings for list view

* List view visual enhancements (#62124)

* spaecing and font styling

* add entity_type icons to listitems

* display 4 columns instead of 5

* change icon for transaction tables

* add circle for boolean fields

* add badge style to category columns

* add colors to badges, incl Score cols

* Save list questions as tables

* Footer

* Padding and scrolling

* Styling

* Styling

* Remove icon

* Fix useObjectDetail call for ListView

* Fix list view columns alignment

* Move detail view breadcrumbs to AppBar

* Style breadcrumbs

* Fix scrolling

* Show icon if avatar is missing

* Fix react key warning

* Align breadcrumbs with detail view page

* Remove arrow navigation and footer

* Styling

* Error handling

* Styling

* Make Detail View breadcrumbs preserve card settings

* Make DetailView breadcrumbs return to previous ListView state

* Add company, currency, and receipt icons (#62196)

* add company currency and receipt icons

* add new icons to IconName and Icons obj

* Remove duplicate 'currency' icon declaration

---------

Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>

* Update icons for TransactionTable and CompanyTable

* Make titleColumn always present. Update categoryValue styling

* ListView: Extract rendering logic to ColumnValue component

* Add tooltips for large column values

* Make list item grid always have at list 1 column

* Refactor DatasetEditorInner to typescript

* Rename DatasetEditor 'metadata' mode to 'columns'. Add new 'Metadata' tab for list view

* List view customization styling fixes (#62546)

* fix font sizes and spacing

* styling on ReorderableTagsInput

* make the viewsidebar 400px

* Make ReorderableTagsInput dropdown behave like multi-select

* Fix saving. Remove ViewStyleToggle

* Refactor List view to proper viz settings. Fix bugs. Remove TabHint popup

* Remove TabHintToast completely

* Fix container highlight when dragging between inputs

* Fix column settings in ListViz. Fix eslint

* Remove legacy DetailView code

* PR Cleanup

* Fix settings in list item preview

* Fix sorting. Replace custom column items with ColumnItem

* Fix saving models with list display type

* Fix incorrect condition to save list view models as tables

* Fix incorrect columns param in ListViewColumnsSidebar

* Fix list entity icon hover

* Tests – Models List View (#62836)

* Add storybook for ReorderableTagsInput

* wip

* Unit tests for ReorderableTagsInput

* Fix models-metadata related e2e tests

* e2e tests for List View

* Fix eslint

* Unit tests fixes

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-29 17:58:38 +03:00
Ngoc Khuat
35e712e21b fix permissions when running transform as background job 2025-08-29 21:58:22 +07:00
github-automation-metabase
4bfd392609 Update generated docs (master) (#62928)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-29 14:52:11 +00:00
Alexander Polyankin
ed9ed5b85f Fix the UI for partial between parameter values (#62614) 2025-08-29 10:40:49 -04:00
Brad Anderson
53958ef6fb UXW-57 Updates SmartScalar comparison text so it reuses existing, localizable strings (#62890) 2025-08-29 10:40:08 -04:00
Jeff Bruemmer
e263d6b598 don't document metabot env vars (#62919)
* don't document metabot env vars

* more settings

* another setting

* more settings
2025-08-29 14:21:27 +00:00
github-automation-metabase
41b42da633 chore(sdk): Update published npm version to 0.57.0-alpha.1 (#62920) 2025-08-29 14:00:29 +00:00
Nicola Mometto
5003a1e5ca explicitely pass cancel-chan 2025-08-29 14:10:20 +01:00
Nicola Mometto
949096259a style 2025-08-29 14:00:02 +01:00
Nicola Mometto
4feb3d4230 refactor: use common function for running python-transform 2025-08-29 13:58:01 +01:00
Nicola Mometto
4be8421fae chore: lift utility function 2025-08-29 13:06:02 +01:00
Nicola Mometto
652c2a1799 fix 2025-08-29 12:13:06 +01:00
Nicola Mometto
668289e248 run python transform within virtual thread, conform to async api
Closes QUE-2302
2025-08-29 12:08:31 +01:00
Nicola Mometto
37417f1e1f chore: make sure permission issues don't impact file deletion 2025-08-29 10:53:56 +01:00
Nicola Mometto
6901a209e2 dead code 2025-08-29 10:26:28 +01:00
Chris Truter
67e37c58b4 Remove unused python client 2025-08-29 10:52:28 +02:00
Kamil Mielnik
9319fb8ca6 Do not lock scroll behind detail view sidesheet (#62857) 2025-08-29 07:47:48 +00:00
Jakub Chodorowicz
75e51b4368 Prg 118 backfill provider name field on be side (#62420)
* Populate provider_name field on startup health check

* Serve provider patterns from BE side

* cleanup tests and expand clojure host provider detection

* Fix provider detection test

* Fix regexes for supabase and timescale

* adjust module api exports to standards

* mark private function ins provider-detection namespace

* extend provider values to null and empty, skip backfilling on empty provider_name

* Don't hardcode postgres in health check provider detection

* Make providers api dynamic and ready to support more engines

* Sort lines providers and engines

* Move hostname field tests to a test folder

* memoize detected provider

* Fix for tests for private functions

* Fix import of DatabaseProviderName type

* Use update function for setting provider_name on health check

* Fix typo in test case

* Remove duplicate entry

* simplify detect-provider-from-database call

* Move postgres extra-info to postgres driver module

* Simplify provider update check on startup, use null value for unidentified

* match provider also using engine

* bit of cleanup

- just move the regexes into the postgres driver namespace
- remove regexes and turn them into strings since most databases will put
  them in yaml
- just test the public api
- simplify all the host and details checks. Database is a very standard
  shape on the backend

* allowing setting null to provider match is null, cleanup unused imports

* move postgres tests to postgres driver; add a few tests for yaml

# Conflicts:
#	test/metabase/driver/postgres_test.clj

---------

Co-authored-by: dan sutton <dan@dpsutton.com>
2025-08-29 09:38:27 +02:00
Ngoc Khuat
65e54c1d17 fixex test run 2025-08-29 12:34:29 +07:00
Alexander Polyankin
894290024a Skip loading field values when possible in Table metadata (#62699) 2025-08-28 20:55:13 -04:00
Romeo Van Snick
c47c99e3af Add repro for metabase#46541 (#62719) 2025-08-29 10:02:37 +10:00
Fraser
549b72685e Fix for code scanning alert no. 512: Insecure randomness (#62852)
* Potential fix for code scanning alert no. 512: Insecure randomness

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Handle max = 1 case

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-08-29 11:40:38 +12:00
Tyler Plude
5c7bc9630e [METABOT] Do not apply update-keys to ai-service request state (#62137)
* Do not apply update-keys to state

* Add comment documenting the intentional order

* remove recursive snake case update

* apply fix to both streaming and non streaming

* adding kebab->snake helpers that ignore camelcase

* Fix kondo

---------

Co-authored-by: Thomas Schmidt <thomas@metabase.com>
2025-08-28 15:28:58 -07:00
Sloan Sparger
e591235f8a [Search] Fix schema version number for search snowplow event (#62897) 2025-08-28 22:27:27 +00:00
Robert Kosara
fde1fa7173 Update timezone troubleshooting guide (#62888)
This is based on this discussion with Marcos: https://metaboat.slack.com/archives/C01R1JY03J4/p1756173436062039

It appears that we do set a reporting time zone for SQL queries, but it did not have an effect in my own testing on my local MariaDB. However, it works just fine when running the "official" Docker version of MariaDB.
2025-08-28 20:33:47 +00:00
Tyler Plude
ebbe91df3c [BOT-316] Metabase BE support for dynamic agent profiles (#62544)
* dynamic profile support

* kondo fixes

* fixing tests by adding metabot premium feature flag

* profile-id-whitelist env var

* metabot-id-whitelist env var

* Revert "metabot-id-whitelist env var"

This reverts commit e46ef63242.

* Revert "profile-id-whitelist env var"

This reverts commit 4e579e96a3.
2025-08-28 13:30:17 -07:00
Anton Kulyk
69d55d3b84 Fix vertical legend position for cartesian charts (#62602) 2025-08-28 16:24:15 -04:00
Noah Moss
963bcc28fe Exclude other personal collections in search-app context (#62307)
* Exclude other personal collections in search-app context

* Fix up test assertions
2025-08-28 16:04:37 -04:00
ignacio
8e11381d68 typo in embedding js docs (#62878)
Mini typo
2025-08-28 15:47:21 -03:00
Alexander Polyankin
39107da5c3 Fix the default value for case-sensitive for string filter clauses (#62874) 2025-08-28 18:13:48 +00:00
Timofey Kachalov
101fb38bfc feat(sdk): Fix and improve Metabot for SDK (#62822) 2025-08-28 22:12:25 +04:00
Riley Thompson
65e2a389ca Allow specifying athena hostname (#62438)
* allow specifying athena hostname

* use hostname

* fix params

* add test and clarify hostname field

* update helper text

* Apply suggestion from @jeff-bruemmer

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* update hostname field

* apply suggestion

* improve test

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-28 17:24:42 +00:00
Chris Truter
57ef35fd81 Better default schema, better docstring 2025-08-28 19:11:21 +02:00
Dan Stone
2c8296bf53 BOT-319 Sem search dead letter queue (DLQ) (#62070)
* Add dead letter queue for the semantic search indexer

The DLQ system handles failed semantic search indexing operations if they are causing the indexer to stall.

- Applies back-off policies for retries (hard coded for now).
- Prevents batch poisoning from blocking indexer progress.

* Add the jitter factor I mistakenly deleted

* Doc fixes

* Slightly better stall recovery log

* Kondo

* Index attempt_at on DLQ table

* Add some more logging

* Init includes DLQ creation

* Fix some rebase collisions

* Formatting

* Add some asserts to show dlq creation during init

* Name test fixed with hashing

* Inline table-name-prefix

* Bump index meta version

* Prefer hex to b64 for table/index names they remain usable unescaped.

* Fix next-dlq-run test in on-indexing-idle

The test was backwards, so the loop only idled when `next-dlq-run` was due, rather than avoiding idle in that case.

* Ensure exit-early-due-to-cold-data? even if we have no last-seen-change

Ensure we still yield back to quartz if more than exit-early-cold-duration seconds have elapsed since the loop start
and we have no last-seen-change. This can happen in cases where no docs were updated since the loop start if our
watermark is already at the end of the gate table.

* Reduce log level to :trace for "nothing to do" case in indexing-step

* Whitespace cleanup

* Reduce ee-search-indexer-exit-early-cold-duration from 30s to 5s

30s is longer than the quartz interval for the indexer job, so we'll just get rescheduled immediately after yielding
control.

* Increase the run-frequency for the SemanticSearchIndexer job from every 10s to every 20s

* Move table-exists? into shared util ns and reuse

* Simplify honeysql qualified col reference in add-entries!

* Fix comment typo: s/indexes/indexer/

* Add missing seq in try-batch!

* Change ee-search-indexer-exit-early-cold-duration back to 30s

This value needs to be higher than the dlq-frequency, otherwise the dlq never runs.

---------

Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
2025-08-28 09:21:12 -07:00
Jeff Bruemmer
8413b6a841 docs - basic metabot docs (#62842) 2025-08-28 16:16:26 +00:00
dpsutton
1dff00b209 Fix store default value (#62873)
in dev, the default value was the staging store. When not in dev, the
default value of this url was "false"

```
❯ http get http://localhost:3056/api/session/properties Cookie:"metabase.SESSION=d10a4524-837e-4aaf-84a3-b2f99bc9ecb2" | jq '."store-url"'
"false"
```

In javascript, most of the store url stuff is through

```javascript
export function useStoreUrl(storePath: StorePaths = "") {
  return useSelector((state) => getStoreUrl(state, storePath));
}
```

which is based on `getStoreUrl` which is

```
const DEFAULT_STORE_URL = "https://store.metabase.com/";

...

export function getStoreUrl(state: State, path: StorePaths = "") {
  try {
    const storeUrl = getSetting(state, "store-url");
    const url = new URL(path, storeUrl);
    return url.toString();
  } catch {
    return DEFAULT_STORE_URL;
  }
}
```

So what happens normally is:
1. in dev, we usually have no setting set for this, so the `when-some`
hits nil. If you do have something there, it is honored.
2. In prod, we read false for the config/is-dev and we use that as the
setting value

```clojure
settings=> (with-redefs [config/is-dev? false]
             (store-url-default))
"false"
```

3. There are lots of usages of this on the frontend. But they are all
protected by the try/catch and returning the default store. This is LOAD
BEARING in production.

```javascript
new URL("false", null)
Uncaught TypeError: Failed to construct 'URL': Invalid base URL
```

4. Cloud migration does something slightly different and so fails to get
this load bearing try/catch. It takes a `checkoutUrl` in its props:

```javascript
export const MigrationSuccess = ({
  migration,
  restartMigration,
  isRestarting,
  checkoutUrl,
}: MigrationSuccessProps) => {
```

This manually constructs a url:

```javascript
  const checkoutUrl = useMemo(() => {
    return migration
      ? `${storeUrl}/checkout?migration-id=${migration.external_id}`
      : `${storeUrl}/checkout`;
  }, [migration, storeUrl]);
```

And now we don't have the benefit of the `URL(base, extension)` which
would have (dumbly) failed closed. So now we end up with
`false/checkout?...` and then get a "We're a bit lost" locally

So to recap:
we do the right thing in dev, and then production is broken. Most
pathways were just catching this error, one way constructed a url
fragment and therefore was susceptible.

```clojure
settings=> (with-redefs [config/is-dev? false]
             (store-url-default))
"false"
settings=> (store-url-default)
"https://store.staging.metabase.com"
```
2025-08-28 11:10:08 -05:00
Alexander Polyankin
b43945927a Do not allow mixed query and last used parameter values (#62672) 2025-08-28 11:44:14 -04:00
Sébastien
d2e66d0081 Closes GIT-7894 302 redirect should not affect /properties (#62664)
* Closes GIT-7894 302 redirect should not affect /properties

* .

* .
2025-08-28 17:27:23 +02:00
Chris Truter
576c774001 Demo guide for Nico 2025-08-28 17:21:48 +02:00
Chris Truter
07c8dfab7c Slightly less wonky readme 2025-08-28 17:15:15 +02:00
Nicola Mometto
fe26b3ba57 chore: simpler code 2025-08-28 16:12:05 +01:00
Ryan Laurie
a40beb072a Fix Admin Nested Navlink Behavior (#62771)
* fix navigating on folders

* fix types

* conditional path for whitelabeling
2025-08-28 14:21:51 +00:00
Jeff Bruemmer
720c8513c5 relative links (#62827) 2025-08-28 09:24:54 -04:00
Nicola Mometto
a7ab68a82a kondo 2025-08-28 14:21:26 +01:00
Nicola Mometto
8a5b76955d dead code 2025-08-28 14:18:03 +01:00
Ngoc Khuat
dd3e9ffb8d run test 2025-08-28 20:11:02 +07:00
Chris Truter
c1adff4357 Get rid of anemic proxy layer 2025-08-28 15:01:39 +02:00
Phoomparin Mano
8dc14759a1 Fix flaky test for metabase-browser custom element (#62633) 2025-08-28 19:58:17 +07:00
Nick Fitzpatrick
e6d4839ffc Only clear card defer if request was not already cancelled (#62833) 2025-08-28 09:33:28 -03:00
Nicola Mometto
b90e090fec wip: disable pyexec user for now 2025-08-28 13:08:34 +01:00
Uladzimir Havenchyk
33c3ef25dc ci: use openldap from legacy registry (#62859) 2025-08-28 11:23:51 +00:00
Sébastien
b7a16be235 Closes EMB-760 table columns translations (#62760)
* Closes EMB-760 table columns translations

* Update e2e/test/scenarios/admin/i18n/content-translation/dashboards.cy.spec.ts

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-08-28 13:05:07 +02:00
Nicola Mometto
b8d7c3fe1b re-enable auth 2025-08-28 11:40:29 +01:00
Nicola Mometto
74efddd5f4 feat: communicate via files in python runner/server 2025-08-28 11:39:40 +01:00
Nicola Mometto
945263e788 feat: use jsonl files as transport layer 2025-08-28 11:23:22 +01:00
Nicola Mometto
11cf0a20b7 fix: actually delete temp files 2025-08-28 11:11:30 +01:00
Ngoc Khuat
04027d1310 source alignments 2025-08-28 15:57:17 +07:00
Ngoc Khuat
fdc0cdeb8b ensure tables are unique in tables selector 2025-08-28 15:44:11 +07:00
Ngoc Khuat
10d46bb28e Ensure we have the right permission when execute python 2025-08-28 15:14:41 +07:00
Romeo Van Snick
da1637a882 Allow opening dashboard filters using keyboard (#62716)
* Do not pass Sortable attributes when element is not sortable

* Render parameter value trigger as button

* Add repro for metabase#52674

* Use UnstyledButton

* Do not render parameter widget as button when it does not have a popover

* Update Loki Snapshots

* Use UnstyledButton and Box

* Fix syntax error

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-28 16:06:24 +10:00
Chris Truter
02afe10001 Persistent container (#62839) 2025-08-27 23:22:05 +02:00
Brad Anderson
cbe38462e2 Fix: UXW-569 Add Error message for failed document saves (#62834)
* UXW-569 Displays error toast when saving or creating a document fails
2025-08-27 16:35:46 -04:00
Brad Anderson
66fff2949c Fix: UXW-204 don't show upsells to non-admins on paid plans (#62816)
* UXW-204 Prevents non-admins from seeing "Explore paid features" link

* UXW-204 Adds unit tests, removes unused prop
2025-08-27 16:35:14 -04:00
Brad Anderson
434a9bd053 Fix: #62732 Documents editor hijacks browser keyboard shortcuts (#62773)
* #62732 Prevent tiptap StarterKit from hijacking cmd/ctrl+shift+b
2025-08-27 16:34:19 -04:00
Brad Anderson
54e84ef141 Fix: UXW-564 CMD-Z on an existing Document removes all content (+ other edge case) (#62692)
* UXW-564 Resets document undo/redo history when a new one loads in

* UXW-564 Adds e2e test
2025-08-27 16:33:45 -04:00
Alexander Polyankin
79580a4fec Fix caret issue introduced by mantine 8.2.2 (#62751) 2025-08-27 19:56:34 +00:00
Noah Moss
680672d641 Add discouraged-namespace kondo rule for clj-time (#62764) 2025-08-27 14:48:53 -04:00
Oleksandr Solovyov
eb5c21f8b4 update jspdf to 3.0.2 (#62798) 2025-08-27 17:13:21 +00:00
Chris Truter
4d8a8e93fb Fix up last few multi-table things 2025-08-27 18:47:09 +02:00
Nick Fitzpatrick
a5e72d83c5 Use Flexbox container to avoid CLS when on Collection Items Page (#62813) 2025-08-27 13:40:41 -03:00
Chris Truter
7528f2f3b0 Makefile 2025-08-27 18:35:54 +02:00
Chris Truter
d1660dba51 Fix input type for PK on creation (#62794) 2025-08-27 16:33:53 +00:00
Ngoc Khuat
7755c56386 multiple tables 2025-08-27 23:33:09 +07:00
Konstantin Darutkin
ccd51b88fa feat(enterprise): table data editing plugin (#61908)
* Reapply "feature(enterprise): table editing frontend plugin (#61326)"

This reverts commit 6970110108.

* Reapply "feat: hide enable editing setting for unsupported database drivers (#61544)"

This reverts commit 30bb713240.

* Reapply "fix: admin check and more tests (#61594)"

This reverts commit 71df2022c1.

* Trigger Build

* fix: send correct data for type/Date columns (#62095)

* fix: show user-friendly error messages from server (#62096)

* fix: show user-friendly error messages from server

* fix: review fixes

* fix: update grid design #1 (#62153)

* fix: udpate bulk row deletion design (#62155)

* fix: update expand row icon (#62268)

* fix: update expand row icon

* fix: review fixes

* fix: update editing grid cell styles (#62274)

* fix: change editing modals to sidesheets (#62276)

* inform admin about insufficient user permissions (#62395)

* fix: tests

* feat: add boolean input type (#62333)

* fix: typecheck

* fix: error display

* fix: hide table editing admin setting in some cases (#62552)

* feat: add numeric input types to table editing (#62554)

* feat: show unsaved leave confirmation for table editing modals (#62555)

* feat: show unsaved leave confirmation for table editing modals

* fix: modal order

* fix: review issues

* feat: check if tables are is_writable (#62484)

* feat: snowplow events for table data editing (#61914)

* fix: date editing test

* fix: disable date test due to flakyness

* fix: visual blocker for table data editing (#62722)

* fix: visual blocker for table data editing

* fix: tests

* Refactor browse hover actions to use ActionIcon (#62769)

* refactor to use ActionIcon

* fix bolt test

* Fix input type for PK on creation (#62794)

* fix: table editing bugs (#62796)

* fix: table editing bugs

* fix: tests

---------

Co-authored-by: Chris Truter <chris@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-27 09:30:49 -07:00
Chris Truter
65978ae49a Better convention 2025-08-27 18:03:16 +02:00
Chris Truter
7875745bfe Fixups 2025-08-27 18:03:16 +02:00
Chris Truter
2f778b9dd9 Support multiple tables on the runner side 2025-08-27 18:03:15 +02:00
Jeff Bruemmer
b7ce1a1bd5 Fix markdown links in Debian installation guide (#62823) 2025-08-27 11:37:40 -04:00
Braden Shepherdson
d5a0face2b [Mongo] Fix type inference for columns returned by native queries (#62777)
This was working for `:base_type`s but not `:effective_type`s.
The `:result_metadata` for a native Mongo query always had
`:effective_type :type/*` even when we correctly inferred the
`:base_type`.

Fixes #62397.
2025-08-27 11:04:09 -04:00
Riley Thompson
0358ebe99d Enable DB routing for ClickHouse (#62090)
* initial commit

* enable multi db by default for tests

* multi db as default, set inclusion filters for tests

* update introspection tests

* enable routing

* set enable multi db true as default

* use redef for spec

* clean up

* add more generic test

* update tests

* remove unused code

* clean up

* handle encrypted migration

* fix test and migration id

* move created and updated at fields

* more tests

* mark tests parallel

* fix whitespace

* fix athena test
2025-08-27 14:59:40 +00:00
Nicola Mometto
3b3ec3e396 cleanup 2025-08-27 15:44:37 +01:00
Nicola Mometto
fa1946c7d9 wip: empty token rather than nil, else shell/sh args parsing gets confused 2025-08-27 15:37:54 +01:00
Nicola Mometto
decf483773 feat: don't go through QP, reducible-query 2025-08-27 15:37:54 +01:00
Filipe Silva
7866ca3e84 fix: ignore case when offering metabot purchase (#62808) 2025-08-27 15:22:43 +01:00
Ngoc Khuat
0a82070f27 FE select table when creating python transform 2025-08-27 20:43:14 +07:00
Nick Fitzpatrick
e77320ac9e Git 7934 legends are cut off on pie charts when in documents (#62772)
* render pie charts more like dashcards in documents

* updating ChoroplethMap for documents
2025-08-27 10:42:54 -03:00
Chris Truter
21486dd01b Assume exactly 1 source table, preselected 2025-08-27 15:41:18 +02:00
Chris Truter
4ce5db9db3 WIP get table passed in 2025-08-27 15:30:35 +02:00
Sloan Sparger
9ccb92ab46 [Metabot] Add capabilities to metabot context (#62464)
Expose Metabase instance capabilities in ai-service context for Metabot

---------

Co-authored-by: Thomas Schmidt <thomas.heinz.schmidt@gmail.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2025-08-27 13:18:02 +00:00
Alexander Polyankin
15e73ac7cf Reset parameter values if all parameters are equal to new values, not per parameter (#62757) 2025-08-27 09:12:23 -04:00
Nicolò Pretto
e5e2ff55fa chore(sdk e2e): make the "Invalid Host/Origin header" errors go away (#62803) 2025-08-27 14:32:13 +02:00
Ngoc Khuat
781045b019 TODO for python transform dependencies 2025-08-27 18:41:05 +07:00
Ngoc Khuat
fa2cbffbd5 python transforms now properly being scheduled 2025-08-27 18:39:55 +07:00
Jeff Bruemmer
e4e3f15eff Clarify JWT Identity Provider URI instructions (#62765)
Updated the instructions for the JWT Identity Provider URI to clarify the use of localhost and Cloud URL.
2025-08-27 07:34:22 -04:00
github-automation-metabase
66dbc98ff7 Update generated docs (master) (#62787)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-27 07:33:41 -04:00
Chris Truter
00a034905b Fix uploads not being immediately editable (#62795) 2025-08-27 08:37:01 +00:00
Sébastien
d8aa553a09 Closes EMB-650 statics embedded dashboard export icon overlapped with tab (#62685)
* Closes EMB-650 download button overlaps with tabs

* loki test

* addressed comments
2025-08-27 09:00:15 +02:00
Romeo Van Snick
1aad10c239 Avoid scrolling on autoconnected message (#62718)
* Avoid overflow when showing auto-connected label

* Add repro for metabase#46372
2025-08-27 05:26:23 +00:00
Nathan Voxland
1ae8ff82e5 Change driver/humanize-connection-error-message to be passed a list messages, not a single message (#62634) 2025-08-26 22:53:38 -05:00
Aleksandr Lesnenko
ecfa6ea920 add yarn storybook-pure command (#62768) 2025-08-27 02:18:07 +00:00
Noah Moss
de01ff004e Fix conversion of pivot value keys to consistent types (#62762) 2025-08-26 18:20:15 -04:00
Robert Kosara
a075a22dac Add documentation for password settings on Metabase Cloud (#62767)
* Update docs/people-and-groups/changing-password-complexity.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-26 21:09:50 +00:00
Uladzimir Havenchyk
7da39401a4 chore: upgrade vulnerable cipher-base package (#62559) 2025-08-26 20:33:10 +00:00
Jeff Bruemmer
b1a819ad57 note on pinning (#62774) 2025-08-26 16:28:14 -04:00
Nathan Voxland
6a0f4e8070 Improved SQL generation for document charts (#62548) 2025-08-26 15:23:29 -05:00
Cam Saul
a941f1d9c2 validate-temporal-bucketing middleware => Lib (#62632) 2025-08-26 16:03:16 -04:00
Timofey Kachalov
8717a4fc02 refactor(sdk): Move storybook SDK configs to the embedding-sdk-shared directory (#62675) 2025-08-26 23:57:51 +04:00
appleby
7227b7d97c Add bookmarked scorer to semantic search backend (#62709)
* Add bookmarked scorer to semantic search backend

* Update appdb backend to use shared bookmarked scorer in search.scoring

* Fix whitespace / alignment

* Review feedback: s/filtered-search-results/search-results-to-score/
2025-08-26 19:52:31 +00:00
Riley Thompson
ef1273e815 Handle nulls in arrays (#62756)
* handle nulls in arrays

* use suggestion
2025-08-26 19:27:08 +00:00
Rodrigo López Dato
76b863c7ea Update Debian/systemd docs (#62701)
* Update Debian/systemd docs

* Remove references to Debian

* Use H2 database in .env file by default

* Add journalctl command to follow logs

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-26 19:04:12 +00:00
Nick Fitzpatrick
849be9e037 Add border to top of Document page when sidebar is open (#62577)
* add border to top of page when sidebar is open

* do what metabot do
2025-08-26 15:29:11 -03:00
Ngoc Khuat
0695681d7c remove the hack of using local files as well 2025-08-27 00:49:55 +07:00
Ngoc Khuat
b5a67bf540 call api proxy instead of internal call, also have settings page for transform 2025-08-27 00:29:55 +07:00
Ngoc Khuat
83744d69a7 Transform life cycle macro and fix unable to run failed transform
repeatedly
2025-08-27 00:29:19 +07:00
Aleksandr Lesnenko
e5e2c767a0 fix overflowing text in tables (#62708)
* fix overflowing text in tables

* thanks cubic
2025-08-26 17:28:27 +00:00
Dan Stone
31650d2f87 Save message including stdout/err to the database on failure
Resolves QUE-2296
2025-08-26 18:05:36 +01:00
Dan Stone
c19a5dab9e Fix edit button not doing anything for python scripts
Closes QUE-2300
2025-08-26 17:44:52 +01:00
appleby
84763ca40d Refactor appdb-based scorers in the semantic search backend (#62690)
* Refactor appdb-based scorers in the semantic search backend

Refactor the appdb-based scorers in the semantic search backend in preparation for adding the bookmarked scorer in
BOT-312. This refactor has several benefits: (1) makes the appdb-based scorers work more like the existing index-based
scorers; (2) allows sharing the exact same honeysql expressions for the user-recency-expr and model-rank-expr between
the appdb and semantic backends, reducing code dup; (3) makes it easier to add the bookmarked scorer since it will be
able to reuse the appdb backend's honeysql expr for bookmarked scores as well.

* Move user-recency-expr into search.scoring and use it in appdb and semantic backends

* Move model-rank-expr into search.scoring and use it in appdb and semantic backends

* Move mysql check from with-appdb-scores into appdb-scorers

Again in preprartion for adding the appdb-based bookmarked scorer later.

* Fix whitespace
2025-08-26 09:33:08 -07:00
Maz Ameli
ffd615080b clarify text in new-transform menu (#62679)
* clarify text in new-transform menu

* update tests
2025-08-26 09:16:21 -07:00
dpsutton
bfcdbd2cda Better branch detection if relevant files are changed for CI (#62705)
I noticed that
https://github.com/metabase/metabase/pull/62513/files?file-filters%5B%5D=.clj&show-viewed-files=true
that the third tier drivers were running. Checking the action output
https://github.com/metabase/metabase/actions/runs/17220604727/job/48854867380?pr=62513
i see :

```
Is master or release: false
Has '.Team/Drivers' or '.Team/Querying' or '.Team/SemanticLayer' label: false
Checking for changes in relevant folders...
Changes detected in the following folders: src/metabase/lib src/metabase/query_processor.
Tier 3 driver tests will run.
```

So it thinks that something changed in src/metabase/lib/* and
src/metabase/query_processor/*

This branch
ds/clo-4370-button-in-metabase-admin-section-to-purchase-metabot-ai-add
targets master. And the diff is checking the diff of files between the
state of master and the PR. Which means if any changes have landed in
master affecting those areas this diff will report positive.

At the time of this writing this is:
```
❯ git diff --name-only c6a9193bff 462d83c5c2 | wc -l
    1259
```

Where c6a9 is master and 462 is the branch.

A better option is to find where the branch and the merge target share a
common ancestor and then check for changes from there.

```
❯ git diff --name-only $(git merge-base c6a9193bff 462d83c5c2) 462d83c5c2 | wc -l
      32
```

So we use `git merge-base <master> <branch>` and then diff that sha
against the branch.

```
git diff --name-only (git merge-base <base> <pr-branch>) <pr-branch>
```

And we get:

```
❯ git merge-base c6a9193bff 462d83c5c2
37e6eee311

❯ git show 37e6eee311
commit 37e6eee311
Author: Phoomparin Mano <poom@metabase.com>
Date:   Wed Aug 20 01:40:19 2025 +0700

    Add the metabase-browser custom element to Embed JS (#60828)

    Co-authored-by: cubic-dev-ai[bot]
    <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
```

Which is the common root. Then the diff from there:

```
❯  git diff --name-only $(git merge-base c6a9193bff 462d83c5c2) 462d83c5c2
.clj-kondo/config/modules/config.edn
enterprise/backend/src/metabase_enterprise/api/routes.clj
enterprise/backend/src/metabase_enterprise/cloud_add_ons/api.clj
enterprise/backend/src/metabase_enterprise/harbormaster/client.clj
enterprise/backend/test/metabase_enterprise/api/session_test.clj
enterprise/backend/test/metabase_enterprise/cloud_add_ons/api_test.clj
enterprise/frontend/src/metabase-enterprise/metabot/components/MetabotAdmin/MetabotPurchasePage.tsx
enterprise/frontend/src/metabase-enterprise/metabot/components/MetabotAdmin/MetabotPurchasePage.unit.spec.tsx
enterprise/frontend/src/metabase-enterprise/metabot/components/MetabotAdmin/MetabotPurchaseSettingUpModal.tsx
enterprise/frontend/src/metabase-enterprise/metabot/index.tsx
frontend/src/metabase-types/api/metabot.ts
frontend/src/metabase-types/api/mocks/settings.ts
frontend/src/metabase-types/api/settings.ts
frontend/src/metabase/admin/app/reducers.ts
frontend/src/metabase/admin/routes.jsx
frontend/src/metabase/api/metabot.ts
frontend/src/metabase/api/utils/use-token-refresh.ts
frontend/src/metabase/common/components/AdminLayout/AdminSettingsLayout.tsx
frontend/src/metabase/plugins/index.ts
resources/frontend_client/app/assets/img/metabot-cloud-96x96.svg
src/metabase/cloud_migration/core.clj
src/metabase/cloud_migration/models/cloud_migration.clj
src/metabase/cloud_migration/settings.clj
src/metabase/core/init.clj
src/metabase/premium_features/core.clj
src/metabase/premium_features/settings.clj
src/metabase/premium_features/token_check.clj
src/metabase/server/middleware/security.clj
src/metabase/store_api/core.clj
src/metabase/store_api/init.clj
src/metabase/store_api/settings.clj
test/metabase/analytics/stats_test.clj
```

And now we have a correct list of files changed in that PR, not just
files different between current master and current PR.
2025-08-26 11:09:05 -05:00
Dan Stone
b32310dad9 Revert "Fix wrong source field name used for showing script in transform view"
This reverts commit c7dfb541f3.
2025-08-26 16:31:47 +01:00
github-automation-metabase
6f461a78b5 chore(sdk): Update published npm version to 0.57.0-alpha.0 (#62749) 2025-08-26 15:16:41 +00:00
Nicola Mometto
e1e553e39c fix tests 2025-08-26 15:56:56 +01:00
Noah Moss
873f5830d0 Migrate remaining clj-time usages to clojure.java-time (#62696)
* Convert revision usage

* convert pivot test + metabot usages

* convert more tests

* migrate final clj-time usage in logger.core

* switch quartzite to a git sha to get most recent commit w/o clj-time

* Revert "switch quartzite to a git sha to get most recent commit w/o clj-time"

This reverts commit 393bc56aad.
2025-08-26 10:49:09 -04:00
Nicola Mometto
b6c062b365 fix test 2025-08-26 15:47:44 +01:00
Nicola Mometto
22a294c135 Merge branch 'QUE-2298' into proj-python/s01e01 2025-08-26 15:38:33 +01:00
Timofey Kachalov
e141921ac8 Use jq for getting the SDK release tag (#62748) 2025-08-26 18:38:00 +04:00
Nicola Mometto
012c0e5661 disable auth for now.. 2025-08-26 15:33:17 +01:00
Dan Stone
c7dfb541f3 Fix wrong source field name used for showing script in transform view 2025-08-26 15:30:00 +01:00
Nicola Mometto
1ea8c670f7 fix for docker/win 2025-08-26 15:29:52 +01:00
Nicola Mometto
7ed9553ee3 fix 2025-08-26 15:12:46 +01:00
Nicola Mometto
ba67bef0d2 remove connection string, pass metabase-url instead 2025-08-26 14:59:33 +01:00
Dan Stone
6902bb5020 Use :dbname if :db is not present for conn
For me this was the case
2025-08-26 14:54:05 +01:00
Timofey Kachalov
8442c3a3fd Prepare build scripts for determine-sdk-version job (#62740) 2025-08-26 17:42:01 +04:00
Nicola Mometto
e6cf33c740 query tables via api 2025-08-26 14:23:54 +01:00
Nicola Mometto
39daa3258a fix: docker compose 2025-08-26 14:13:16 +01:00
Nicola Mometto
ef60fa5ee5 wip: table/:id/data endpoint 2025-08-26 14:04:28 +01:00
Alexander Polyankin
9ec5f14c6b Make linking top-level parameters with inline parameters in dashboard work (#62691) 2025-08-26 09:00:52 -04:00
Alexander Polyankin
affd550c24 Ignore unsaved parameters when executing dashboard card queries in edit mode (#62680) 2025-08-26 09:00:27 -04:00
Alexander Polyankin
454598b4c0 E2E repro for "Model is being expanded to data sources after edit/distribute" (#62671) 2025-08-26 09:00:16 -04:00
Timofey Kachalov
c2016c28c8 Fix sdk pre-release version calculation and test-unit glob (#62729) 2025-08-26 16:42:40 +04:00
Kamil Mielnik
7dd4936c57 Detail view (#62011)
* Boilerplate

* Remove processRemappedColumns, add layout

* Navigation

* Back button,breadcrumbs

* TODO

* Layout

* Layout

* Refactor

* Column detection logic

* Inline

* Fix

* Extract Breadcrumb

* Fix

* Entity name in nav

* Condition

* Fix

* Header

* Style

* Remove

* Do not render header if no column can be used there

* Body

* Sidebar

* Style

* Copy

* Hover style

* Remove back button

* Overflows

* a11y

* Redundant css

* Fix

* Fix rendering

* Style links

* Cleanup

* FK pill

* Render images

* Prevent showing old images while new are loading

* Take currency_in_header into account

* Cleanup

* Refactor relationships

* Update PK drill

* PK drill

* Fix

* Fix

* Fix copy if row name is not available

* Max height for values

* Fix PK drilll

* Fix drills

* Footer

* Padding and scrolling

* Styling

* Styling

* Remove icon

* Move detail view breadcrumbs to AppBar

* Style breadcrumbs

* Fix scrolling

* Show icon if avatar is missing

* Fix react key warning

* Align breadcrumbs with detail view page

* Remove arrow navigation and footer

* Styling

* Error handling

* Styling

* Support models

* ESLint

* Types

* Types

* Make FK drill take user to the new page

* Update model-indexes.cy.spec.js

* Only consider PKs from the raw underlying source table

* Fix URL

* Revert "Only consider PKs from the raw underlying source table"

This reverts commit c408188fce.

* Revert filtering by source table

* Rename DetailView to DetailViewPage

* Add DetailViewSidesheet boilerplate

* Revert e2e changes

* Lift state

* Rename

* Bring back old drills

* Format code

* Use sidesheet

* Custom stylesheet component

* Styling

* Fix FKs

* Paddings

* Shadow

* Spacing

* Cleanup

* Prev/next buttons

* Add url buttons

* Implement url generation + update model page url

* Fix

* Highlight zoomed row

* Fix

* Memo

* Fix interactivity when object detail is open

* Remove autofocus

* Fix tooltip

* Consistent close button

* Aria

* Pixel-perfect

* Fix types

* Fix FK pill rendering

* Fix types

* Fix

* Fix

* Fix remapping

* Fix types

* Move test id

* Use proper cols

* Remove dead code

* Add testid

* Fix unit test

* Update unit test

* Lift qb redux state usage from TableInteractive to DatasetEditorInner

* Add ... button and separators

* Add object actions menu

* Move getObjectQuery

* Fetch row if missing, update tests

* Update tests

* Update tests

* Update tests

* Hide nav when not useful

* Update tests

* Update tests

* Fix Esc handling

* Arrange separators

* Make sidesheet work without table prop, which is the case in native questions

* Fix viz settings not being applied

* Refactor

* Handle 404s, do not show rows that do not belong to a question

* Fix actions fetching

* Add test for Esc

* change view detials icon to sidebar_open (#62471)

* Use new icon everywhere

* Fix row highlighting in questions

* Toggleable object detail

* Remove todo

* Fix test

* Make table viz settings affect the detail view

* Fix types

* Move filterByPk

* Fix types

* Use MLv2 to generate query

* Refactor

* Refactor

* Add keyboard navigation

* Fix types

* Fix

* Fix

* Update copy

* Style links

* Make selectors safe

* Responsive detail page

* Re-use Urls.tableRowsQuery

* Use Divider

* Fix pills

* Use palette colors

* Detail view - Tests (#62576)

* Take sidebar presence into rwd calculations

* Add test

* Add a test for toggling

* Add assertions

* Add unit tests for Header

* Add comment

* Add test

* Add tests

* Add tests

* Remove comments

* Add tests

* Add tests and extract helpers

* Fix model breadcrumbs

* Clean up

* Rename tests

* Add 404 tests

* Sort

* Format code

* Add tests

* Add Relationship unit tests

* Clean up

* Handle errors

* Add tests

* Add tests

* Add tests for images

* Proper model breadcrumbs

* Fix ellipsis

* Add assertions

* Add assertions

---------

Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-26 18:30:09 +07:00
github-automation-metabase
21fefa6115 Update generated docs (master) (#62712)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-26 07:09:47 -04:00
Nicola Mometto
386f8ce2ec fix: source-database-id for python transforms 2025-08-26 11:53:52 +01:00
Timofey Kachalov
21f673ccbb Fix release-embedding-sdk.yml syntax error (#62721) 2025-08-26 14:12:52 +04:00
Sébastien
f0448ada69 closes EMB-665 do not try to change embedding_params if dashboard is not embedded (#62496) 2025-08-26 11:14:49 +02:00
Nicola Mometto
34c3a5f9e6 quick fix for error detection 2025-08-26 09:57:14 +01:00
Nicolò Pretto
e1c0570dc5 feat(embed js flow): use widget for initial parameters (#62356)
* wip

* make parameter widget have the dropdown

* update tests

* cleanup

* slug -> id so that the parameter dropdowns on charts show the current
value

* remove deprecation message from addFields

https://metaboat.slack.com/archives/C063Q3F1HPF/p1755875062460719?thread_ts=1755874422.198989&cid=C063Q3F1HPF

* fix parmeters not really being set lol
2025-08-26 10:26:27 +02:00
Timofey Kachalov
1b89bf16ba ci(sdk): Adjust release CI workflow to release alpha versions from master branch (#62507) 2025-08-26 11:39:06 +04:00
Romeo Van Snick
43d2b9ac84 Make readOnly Notebook non-editable (#62388)
* Make readOnly notebook completely non-interactive

* Add readOnly prop to PopoverBackButton

* Add readOnly to FilterPickerHeader

* Add readOnly prop to FilterPickers

* Allow making filter body readOnly

* Pass readOnly to FilterPicker from FilterStep

* Add disabled prop to ClausePopover

* Disable step popovers when readOnly (except for filters)

* Do not disable pointer-events for notebook preview

* Disable popover when button is disabled

* Render readOnly expression popover in readOnly mode

* Make limit step readOnly when readOnly is set

* Add test for readonly notebook

* Disable tooltip on join picker when read-only

* Disable join picker popover when read-only

* Hide back button on date picker

* Simplify backbutton props

* Do not allow going back in readOnly ExpressionWidget

* Allow readOnly AggregationPicker

* Allow opening aggregation popover when it is an expression

* Render aggregation popover when it is a custom expression

* Fix types

* Remove renderPopoverWhenReadOnly flag

* Fix cursor logic on SortStep

* Do not render pointer cursor when step does not have popover

* Render custom expression popover for non-custom aggregations in read-only mode
2025-08-26 11:15:22 +10:00
William
c1a8102d17 Keep fields when adding aggregations, and ignore them when compiling (#62539)
What it says on the tin.  When we add an aggregation, don't drop :fields, but instead drop :fields when compiling a
stage with an aggregation.
2025-08-25 19:21:52 -05:00
Dennis Schridde
6bf6cb679d Button in Metabase Admin section to purchase Metabase AI add-on (#62513)
== Goal ==

In case the Metabase instance does not have the Metabot AI add-on, we
want to show a page in the admin section to purchase it.

== How to test ==

1. Pick a valid token from staging with the `offer-metabase-ai` feature, but without the `metabot-v3` feature (`metabase-ai` add-on)
2. Pick the token's instance's Metabase API key
3. Pick an email address that matches a store user of the token's organization
4. Spin up a Metabase instance with that API key, token and user
5. Navigate to the admin section, AI tab
6. See the new page to purchase the add-on and click the button

Closes: https://linear.app/metabase/issue/CLO-4370/button-in-metabase-admin-section-to-purchase-metabot-ai-add-on
2025-08-26 00:44:00 +02:00
Fraser
30c56819ca Use latest version for none available case (#62703) 2025-08-25 22:29:21 +00:00
Brad Anderson
52e84b6a7c Fix: UXW-503 Improve error handling for deleted embedded questions (#62618)
* UXW-503 Triggers error state when underlying card has been deleted

* UXW-503 Makes CardEmbed error state selectable, bordered

* UXW-503 Updates error state per design feedback (less of a jump between loading and error state, fewer different error visuals)

* UXW-503 Adds e2e test

* UXW-503 Removes useMemo per PR feedback

* UXW-503 Simplifies an e2e test, makes it less prone to flakiness
2025-08-25 17:48:53 -04:00
Noah Moss
c6a9193bff Add gate table tombstone cleanup to semantic search index cleanup task (#62605)
* Add gate table tombstone cleanup to index cleanup job

* add partial index on gated_at for just the tombstone rows

* fix up index creation syntax

* WIP - adding check that indexer ran within last 24 hours

* fix tests

* fix whitespace, adjust log/docstring

* kondo

* fix build, maybe broken from bad rebase?
2025-08-25 15:54:13 -04:00
Rodrigo López Dato
f1e4a05f67 Fix references to pre-56 Troubleshooting admin menu (#62695) 2025-08-25 16:31:35 -03:00
Nicola Mometto
7ea8fc3b61 convert mysql booleans to real booleans during semantic indexing (#62578)
* Ensure mysql booleans are treated as real booleans

* add tests

* Update enterprise/backend/src/metabase_enterprise/semantic_search/index.clj

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-08-25 19:18:11 +00:00
Nick Fitzpatrick
79cc5d8230 Update Command Suggestion selected index on MouseEnter (#62603)
* Update selected index on MouseEnter

* support mention extension

* PR Feedback
2025-08-25 15:41:11 -03:00
Cam Saul
f4da670b85 Remove dead dimension options code (#62630)
* Remove dead dimension options code

* Remove EVEN MORE dead code.
2025-08-25 17:47:22 +00:00
Cam Saul
d4a2e17537 Remove pre-alias-aggregations QP middleware (#62606)
* Remove pre-alias-aggregations QP middleware

* Kondo
2025-08-25 17:44:09 +00:00
Jeff Bruemmer
e7edd17483 Update version.md with pinning instructions (#62678)
* Update version.md with pinning instructions

Clarified instructions on pinning SDK versions for Metabase Cloud instances.

* Update docs/embedding/sdk/version.md
2025-08-25 16:22:45 +00:00
Timofey Kachalov
1dcee6ed85 fix(sdk): Properly calculate the dirty state for the InteractiveQuestion.SaveButton button (#62423) 2025-08-25 20:13:40 +04:00
Nick Fitzpatrick
4f1ff924a8 Update document cache with creation result (#62612)
* update document cache with creation result

* update test
2025-08-25 13:11:09 -03:00
Edward Paget
c9777da390 fix: handle more header names in translation csv (#62241)
* fix: handle more header names in translation csv

Handle the locale being specified as 'locale', 'locale code', 'language'
also make the check for header a little looser so we can report errors
in the header row more accurately.

* fixup! have sample CSV match copy
2025-08-25 10:48:00 -05:00
Timofey Kachalov
c7ae69b2d7 test(sdk): Add tests for remaining exported from SDK public hooks (#62536) 2025-08-25 19:43:34 +04:00
Anderson
4f24f5fe40 Fix invitation not being sent from /setup flow (#62320)
* Call createUser action when inviting new user on the /setup page

* Add e2e test case

* Add invite_sent event / Check user went to next step in e2e test

* Let the backend handle the invite_sent snowplow event

* Change approach to set source value

* Fix unit tests

* Add unwrap() to createUser dispatch

* Remove unused invite param from the /setup endpoint

* Remove unneeded frontend code

* Fix kondo issues
2025-08-25 12:26:11 -03:00
Chris Truter
ce0372fd73 fixes 2025-08-25 17:18:55 +02:00
Sloan Sparger
694fbaa5a2 [Search] Increase search reporting (#62200)
* track search_engine

* track request id

* record request id on search_query event

* fix bug with search_click position not factoring in pagination

* report offset on search_query

* report on the entity model

* move changes into new schema file and update referenced schema

* add back view_more event

* track hashed + salted search term on search_click + search_query events

* refactor trackSearchClick to accept object param instead of long list of args

* report search term for internal purposes only

* pr feedback

* add test coverage for new search reporting attributes

* maybe fix e2e in ci

* fix failing e2e
2025-08-25 10:15:19 -05:00
Timofey Kachalov
be2773de2b Make SDK backward-compatibility tests required (#62561) 2025-08-25 18:56:57 +04:00
Chris Truter
6df12e022a Extract util that we'll need for demo 2025-08-25 16:55:47 +02:00
Chris Truter
5e5ff95ef7 test with temp db 2025-08-25 16:54:59 +02:00
Chris Truter
c8c39cfeb1 kondo 2025-08-25 16:54:59 +02:00
Timofey Kachalov
15f7d3d20e refactor(sdk): Split embedding-sdk-bundle directory into 3 directories (#62613) 2025-08-25 18:36:56 +04:00
Ngoc Khuat
89056a9d5d placeholder connection string 2025-08-25 21:31:28 +07:00
Ngoc Khuat
db4f81cb38 wire up with upload 2025-08-25 21:27:34 +07:00
Riley Thompson
b39d5925b0 Enable specifying a database for Athena (#62183) 2025-08-25 10:14:41 -04:00
Chris Truter
2daba8f0b4 read frames 2025-08-25 16:14:04 +02:00
Chris Truter
4e1bb2a25a Inversion of control to hide output file 2025-08-25 16:14:03 +02:00
Nick Fitzpatrick
8879b09200 Fix Back Button for document questions and drill thrus (#62519)
* generalize back button

* update document back button

* test adjustments

* back button on document question drill thru
2025-08-25 11:11:57 -03:00
Alexander Polyankin
c7b3f9e02d Fix canceling queries on Cmd+Enter (#62600) 2025-08-25 13:43:01 +00:00
Ngoc Khuat
9fcc08fc3a Assume all h2 tables are writable (#62485) 2025-08-25 13:29:14 +00:00
Alexander Polyankin
81611988c3 Preserve viz settings when doing drills in the raw table mode (#62509) 2025-08-25 09:22:10 -04:00
github-automation-metabase
bfa2adc9ce Update generated docs (master) (#62658)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-25 09:18:13 -04:00
Alexander Polyankin
b4cc30dc29 E2E repro (#62588) 2025-08-25 09:11:37 -04:00
Alexander Polyankin
e236250e5b E2E repro for "Suggestion editor popover middle/right click closes the popover" (#62592) 2025-08-25 09:06:00 -04:00
Ngoc Khuat
7e9d0e6a2b wiring up with python executor 2025-08-25 19:44:15 +07:00
Ngoc Khuat
0e9f773d55 Integerate with FE 2025-08-25 19:24:42 +07:00
Ngoc Khuat
8ac019cefb CRUD python transform 2025-08-25 19:24:42 +07:00
Nick Fitzpatrick
0d677e4f51 analytics events for documents (#62447)
* analytics events for documents

* fixing unit test
2025-08-25 09:14:22 -03:00
Romeo Van Snick
aaf6c6c72e Allow entity picker skeleton to grow to top of container (#62659) 2025-08-25 12:03:25 +00:00
Chris Truter
ac78a328eb Stub python execution service api 2025-08-25 14:01:12 +02:00
Nicolo-Maria
0e915e0437 feat: add Python transform frontend pages 2025-08-25 12:42:08 +02:00
Chris Truter
d23bea5a3a Stub python container to execute user code 2025-08-25 12:30:30 +02:00
Uladzimir Havenchyk
4a2f553be7 chore: upgrade vulnerable sha.js package (#62558) 2025-08-25 12:42:20 +03:00
Timofey Kachalov
7337591710 Fix rspack library-related warning (#62660) 2025-08-25 13:01:25 +04:00
Oleksandr Yakushev
ed6ec28ab4 [pivot] Optimize pivot construction for both backend and frontend (#61477) 2025-08-25 01:36:42 +03:00
Aleksandr Lesnenko
250533e660 skip PreserveWhitespaceWrapped table flaky loki test (#62639) 2025-08-24 17:18:17 +00:00
Aleksandr Lesnenko
1c1b2ea9f4 hide edit visualization in view mode on visualizer cards (#62611) 2025-08-24 04:33:08 +00:00
Aleksandr Lesnenko
8cd9b383ad remove excessive font-weight from dashboard creation form (#62623) 2025-08-23 06:20:08 +00:00
Eric Normand
a673032d34 Localize rows of initial tags and initial jobs in db on setup or startup (#62301)
* Localize rows of initial tags and initial jobs in db on setup or startup

* Also translate job descriptions.

* Use fewer hits to the db on startup

* Use site locale

* kick ci

* Remove extraneous arg

* Remove extraneous strs

* Different translation model (on select)

* setup no longer needed from transforms

* Fix

* Test transform tag translation

* Test transform job initial translations
2025-08-22 18:00:38 -05:00
Denis Berezin
6829370337 Fix runtime crash on field visibility change with preview open (#62622)
* Fix runtime crash on field visibility change with preview open

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-23 01:19:46 +03:00
Denis Berezin
431cbbc6c3 Query builder breadcrumbs can link back to archived models (#62589)
* Query builder breadcrumbs can link back to archived models

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-23 00:28:22 +03:00
Aleksandr Lesnenko
29a312d9ef Fixes static row chart ignores custom series names in its legend (#62473)
* fix static row chart by reusing more visualizations code

* Update Loki Snapshots

* Update Loki Snapshots

* Revert "Update Loki Snapshots"

This reverts commit 0fc74e3e68.

* Revert "Update Loki Snapshots"

This reverts commit 438a00eaba.

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-22 17:30:31 -03:00
Braden Shepherdson
107dae72db [QP] Don't apply :coercion-strategy to joined fields twice (#62367)
Closes #62099

When a Field has a coercion strategy (say, `UnixSeconds->DateTime`) set in the `Table Metadata`,
and then that field is **joined**, it will get double-coerced. The first time in the inner query for the join,
the second at the top level `SELECT`.

Since after the first coercion it will be a `TIMESTAMP` instead of and `INTEGER`, the second coercion is a SQL error.

The solution is to add `:qp/ignore-coercion true` in the `resolve-joins` middleware, when the `:fields` of the outer
query are being populated with joined fields. That prevents the QP from re-applying type coercions and date truncations.
2025-08-22 15:43:54 -04:00
Aleksandr Lesnenko
acfc829c9e table viz should not collapse whitespaces (#62521)
* configurable white-space collapse in tables

* make it the new default

* snapshots
2025-08-22 15:11:22 -03:00
Alex Yarosh
ee8247ec03 docs: translations limitations (#62604)
* translations

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* markdown

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-22 18:05:48 +00:00
Aleksandr Lesnenko
b81fcbdfd5 skip flaky loki row chart tests (#62597) 2025-08-22 13:27:00 -03:00
Ryan Laurie
8b6e21c991 Flake Jail 🚓 (#62533)
* mark column click test flaky

* more flaky
2025-08-22 09:39:59 -06:00
appleby
109af9e274 Add user-recency scorer to the semantic search backend (#62474)
* Add user-recency scorer to the semantic search backend

* Only query the recent_views table for models it knows about

* Replace group-by with m/index-by in user-recency scorer

* Cleanup comments

* Improve prometheus metrics for user-recency and add tests

Permission filtering is already recorded in :metabase-search/permission-filtering-ms so no need for a new metric that
records it + collection filtering. Instead, add a new metric :metabase-search/semantic-collection-filter-ms so there
is no overlap.

Also remove embedding label from the collection filter and appdb scorer metrics, as these don't currently depend on
the embedding model in any meaningful way.

* Rename :metabase-search/permission-filtering-ms to :metabase-search/semantic-permission-filter-ms

To match the naming convention of other metrics exposed by the semantic search backend.
2025-08-22 08:35:50 -07:00
Alexander Polyankin
ff8e978614 Fix QB crashing for mongo (#62585) 2025-08-22 11:08:24 -04:00
Ryan Laurie
c6a894b633 use scrollable flexbox instead of sticky footer (#62531) 2025-08-22 08:58:28 -06:00
Marcos
34177f0205 Set minPoolSize to 0 to avoid periodically waking up serverless DBs (#62514)
* set warehouse minPoolSize to 0 to avoid periodically waking up serverless DBs

* fix whitespace

* fix whitespace

* fix whitespace
2025-08-22 11:56:39 -03:00
Edward Paget
1a61edcb1d fix: allow postgres downloads to use ddl sql (#62364)
Fixes a regression where making sure the autocommit was correctly set to
enable reading streaming result sets disallowed ddl and other
non-readonly changes in postgresql due to the interaction of the
'readOnly', 'readOnlyMode', and 'autoCommit' jdbc driver settings.
2025-08-22 09:53:20 -05:00
Timofey Kachalov
04f1216708 refactor(sdk): Rename embedding-sdk directory to embedding-sdk-bundle (#62579) 2025-08-22 18:16:48 +04:00
Chris Truter
3b516a576a Optimize search filtering for only personal collections (#61731) 2025-08-22 14:10:45 +00:00
Brad Anderson
c61282ef5b Fix: UXW-502 UXW-506 Documents styling tweaks (#62508)
* UXW-502 Makes sql error scrollable. Also makes it vertically centered when not scrollable.

* UXW-506 Hides some UI from Download as PDF

* UXW-506 Prevents metabot blocks from getting split across pages in generated PDF

* UXW-506 Adds print-only Metabot icon to Metabot blocks in documents
2025-08-22 10:06:33 -04:00
github-automation-metabase
b7c83570c2 Update generated docs (master) (#62547)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-22 10:05:31 -04:00
Brad Anderson
698f76a8b2 Feat: UXW-504 Missing 'New document' action in top nav search bar (#62450)
* UXW-504 Adds "New document" action in kbar menu (if feature is enabled)
2025-08-22 09:38:03 -04:00
Timofey Kachalov
607e704537 fix(sdk): Add background-light to derived colors for the new embed (#62522) 2025-08-22 17:31:56 +04:00
Timofey Kachalov
9806696566 Set EMBEDDING_SDK_CONFIG.isEmbeddingSdk to true for SDK storybook (#62584) 2025-08-22 17:30:21 +04:00
Denis Berezin
ff8a240aac Dashboard action warning text (#62511)
* Fix action parameters warning cut off

* Fix mapping parameters gap

* Fix usage analytics edit permissions button

* Add unit tests
2025-08-22 16:02:37 +03:00
Alexander Polyankin
7801a6da7c E2E repro "Data models do not update to reflect fields that have been removed from the parent table" (#62545) 2025-08-22 08:59:41 -04:00
Nick Fitzpatrick
f1a484e514 handle new document to new document nav (#62504)
* handle new document to new document nav

* PR Feedback
2025-08-22 09:55:21 -03:00
dpsutton
87555cfae7 exlucde apache commons lang3 (#61719)
solves https://github.com/metabase/metabase/security/code-scanning/493

but this is actually not an issue at all. When we build the driver jars
we remove deps provided by metabase itself. Metabase itself relies on

```
org.apache.commons/commons-lang3          {:mvn/version "3.18.0"}
```

```clojure
(defn- remove-provided-libs [basis driver edition]
  (let [provided-lib->provider (into {}
                                     (filter (fn [[lib]]
                                               (get-in basis [:libs lib])))
                                     (provided-libs driver edition))]
    ;; log which libs we're including and excluding.
    (doseq [lib (sort (keys (:libs basis)))]
      (u/announce (if-let [provider (get provided-lib->provider lib)]
                    (format "SKIP    %%s (provided by %s)" provider)
                    "INCLUDE %s")
                  (colorize/yellow lib)))
    ;; now remove the provide libs from `:classpath`, `:classpath-roots`, and `:libs`
    (let [provided-libs-set  (into #{} (keys provided-lib->provider))
          provided-paths-set (into #{} (mapcat #(get-in basis [:libs % :paths])) provided-libs-set)]
      (-> basis
          (update :classpath-roots #(vec (remove provided-paths-set %)))
          (update :libs            #(into {} (remove (fn [[lib]] (provided-libs-set lib))) %))
          (update :classpath       #(into {} (remove (fn [[path]] (provided-paths-set path))) %))))))
```

That output looks like:

```
    Write :clickhouse :ee uberjar -> /home/runner/work/metabase/metabase/resources/modules/clickhouse.metabase-driver.jar
         SKIP    org.clojure/clojure (provided by metabase-core)
          SKIP    org.clojure/core.specs.alpha (provided by metabase-core)
          SKIP    org.clojure/spec.alpha (provided by metabase-core)
          INCLUDE com.clickhouse/clickhouse-client
          INCLUDE com.clickhouse/clickhouse-data
          INCLUDE com.clickhouse/clickhouse-http-client
          INCLUDE com.clickhouse/clickhouse-jdbc
          INCLUDE com.clickhouse/client-v2
          INCLUDE com.clickhouse/jdbc-v2
          SKIP    com.fasterxml.jackson.core/jackson-core (provided by metabase-core)
          SKIP    com.google.errorprone/error_prone_annotations (provided by metabase-core)
          SKIP    com.google.guava/failureaccess (provided by metabase-core)
          SKIP    com.google.guava/guava (provided by metabase-core)
          SKIP    com.google.guava/listenablefuture (provided by metabase-core)
          SKIP    com.google.j2objc/j2objc-annotations (provided by metabase-core)
          SKIP    commons-codec/commons-codec (provided by metabase-core)
          SKIP    commons-io/commons-io (provided by metabase-core)
          SKIP    org.apache.commons/commons-compress (provided by metabase-core)
          SKIP    org.apache.commons/commons-lang3 (provided by metabase-core) <------------------
          SKIP    org.apache.httpcomponents.client5/httpclient5 (provided by metabase-core)
          SKIP    org.apache.httpcomponents.core5/httpcore5 (provided by metabase-core)
          SKIP    org.apache.httpcomponents.core5/httpcore5-h2 (provided by metabase-core)
          SKIP    org.clojure/clojure (provided by metabase-core)
          SKIP    org.clojure/core.specs.alpha (provided by metabase-core)
          SKIP    org.clojure/spec.alpha (provided by metabase-core)
          SKIP    org.jspecify/jspecify (provided by metabase-core)
          INCLUDE org.lz4/lz4-java
          SKIP    org.ow2.asm/asm (provided by metabase-core)
          INCLUDE org.roaringbitmap/RoaringBitmap
          INCLUDE org.roaringbitmap/shims
          SKIP    org.slf4j/slf4j-api (provided by metabase-core)
```

But this is included here in the hopes that it appeases snyk
2025-08-22 15:34:40 +03:00
Chris Truter
0fe45fd684 Improve disabled settings warnings (#62562) 2025-08-22 19:02:17 +07:00
appleby
92c90b9eff Add missing redefs for semantic.index/model-table-suffix semantic.tu/mock-table-suffix (#62549)
To fix some tests that fail due to (1) overlong index name, (2) assertions that fail due to expecting stable index
table names.
2025-08-22 10:36:01 +01:00
Romeo Van Snick
65434b299a Transform tags invalidations (#62475)
* Correctly invalidate transform tags

* Remove Undo button from toast when undoing a tag

* Avoid wrapping in certain columns for transform lists

* Add test for tag removal invalidation

* Fix unit tests

* Use helpers in test
2025-08-22 07:06:43 +00:00
Cam Saul
b11e39d2d9 Fix marking visible columns when joining Saved Questions with self-joins or native queries (#62381)
* Prove #27521 is fixed

* Fix the test from #60583

* Code cleanup

* I have fixed #39033

* Enable e2e test

* Add ref for #62383

* Ok so I guess I have fixed #47734 now too

* Test update 🔧

* Update the test again

* Test fix 🔧

* Test fix 🔧
2025-08-21 21:27:09 -07:00
Cam Saul
0aba0aaa50 QP preprocessor returns MBQL 5, update nearly all QP tests to use mock MP instead of with-temp and add Kondo rulez (#62386)
* QP limit middleware => Lib

* Preprocess returns MBQL 5

* Split off changes to limit middleware

* Fix Kondo warnings

* Revert changes from Limit PR

* Code cleanup

* Preprocess returns MBQL 5

* Kondo cleanup

* Rework some tests in `wrap-value-literals-test` to use mock metadata providers

* Update more tests to use mock metadata providers

* Use even less with-temp

* Remove with-temp in QP middleware viz settings tests

* Rework metrics-test to never use with-temp

* Remove more with-temps

* Update case-test to use mock metadata providers

* Even more with-temps

* Update even more tests

* Fix two more

* Nice

* Revert stricter schema for query-hash

* Finish rewriting tests to use Mock MPs instead of with-temp or add ignores

* cljfmt

* Test fix 🔧

* Fix permissions

* Split off malli improvements into #62523

* PR cleanup

* PR feedback

* PR feedback
2025-08-21 21:26:56 -07:00
Cam Saul
6f77396704 QP desugar middleware => Lib (#62319)
* QP desugar middleware => Lib

* Test fixes 🔧

* Test fixes and formatting

* Fix flaky tests

* Add clj-kondo ignores everywhere

* Bug fix 🔧

* PR feedback

* Fix if expressions with default values

* More test fixes 🔧

* Code cleanup

* cljfmt/kondo and delete old scripts
2025-08-21 18:46:50 -07:00
github-automation-metabase
dc19217a06 Bump com.nimbusds/nimbus-jose-jwt from 10.4.1 to 10.4.2 (#62263)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-22 00:00:16 +00:00
github-automation-metabase
e4e80b135b Bump com.microsoft.sqlserver/mssql-jdbc from 13.1.1.jre11-preview to 13.2.0.jre11 (#62265)
Inspect dependency changes here:

Co-authored-by: dpsutton <dan@dpsutton.com>
2025-08-21 23:31:18 +00:00
github-automation-metabase
c81937785a Bump com.google.cloud/google-cloud-bigquery from 2.54.0 to 2.54.1 (#62260)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.54.1/CHANGELOG.md
2025-08-21 16:17:17 -07:00
Dennis Schridde
d872c00600 Respond with HTTP status 500 when Store API request fails during Cloud migration (#62534)
`{:status 500}` is rendered as a response with status 200 and a body of
`{"status": 500}`, wheras `{:status 500 :body ""}` is rendered as a
response with status 500 with empty body.

Fixes: b7253af4f2
2025-08-21 22:42:39 +00:00
Aleksandr Lesnenko
142c5531b4 dashboard auto-ref should reload only dashcards (#62465) 2025-08-21 19:29:19 -03:00
Chris Truter
adc28afc97 Improve error messages for FK violations (#60065) 2025-08-21 21:58:46 +00:00
Fraser
034eed5529 Wait for metadata to load before waiting for query" (#62477)
"
2025-08-21 15:32:56 -06:00
Chris Truter
f8342709cb Add metabase_table.data_authority to distinguish derived data (#62416) 2025-08-21 21:17:01 +00:00
Jeff Bruemmer
eb3499678d docs - embed js edits (#62526)
* various edits

* edit

* various fixes

* links

* reinstate note

* chop
2025-08-21 20:21:00 +00:00
dpsutton
79383ca86f bump arrow to 17 for parquet issue (#62044) 2025-08-21 14:35:43 -05:00
Nicola Mometto
d0c625a30c Bot 337 (#62212)
* chore: don't run migrations on reindex!, just ensure index is initialised

* feat: support :force-reset?, to support `/re-init` endpoint

* fix test

* chore: check for index-created? in test

* undo

* feat: include index-created-at

* feat: support lazy gating + stale index behavior

* fix tests

* fix

* fix test

* return new index from record-new-index-table!

* chore: don't pipe opts to create-index-table

* feat: randomize index name

* force new index

* shorter name

* suffix as part of qualify

* re-init test

* rename find-best-index to find-compatible-index

* introduce create-new-index-spec, split out of find-compatible-index

* pick last index

* docstring

* add test

* split into determine-target-index/switch-to-index

* remove index-created? opt

* ensure table always exists

* back out including id/index_created_at in index

* move model-table-suffix out of qualify-index

* fix kondo warnings
2025-08-21 20:18:45 +01:00
Timofey Kachalov
49fe303eff test(sdk): Adjust SDK backward compatibility tests (#62346) 2025-08-21 23:03:12 +04:00
Nathan Voxland
1e82f4e558 Make reindex! an async call (#62316) 2025-08-21 13:54:38 -05:00
bryan
f6b907585b mage jar download fix version regex matching (#62510) 2025-08-21 17:22:57 +00:00
Chris Truter
f00d64699e Check table permissions for data editing (#62385) 2025-08-21 16:59:28 +00:00
Cam Saul
35522222e5 QP limit middleware => Lib (#62379)
* QP limit middleware => Lib

* Oops

* Fix circular deps

* Test fixes 🔧

* Page => cljc

* Test fix 🔧

* Add tests; Kondo fix

* Fix Kondo warning
2025-08-21 09:36:20 -07:00
Noah Moss
40627fc68e Semantic search stale index cleanup job (#62370)
* Stale index cleanup job

* Fix up tests, add orphan table handling

* Fix up conflict resolution

* address comment
2025-08-21 11:14:34 -04:00
Jakub Chodorowicz
d3add0b065 Add PostgreSQL provider icons to db form (#62057)
* Add PostgreSQL provider icons to db form

fix types and opacity

# Conflicts:
#	frontend/src/metabase/databases/components/DatabaseDetailField/DatabaseDetailField.tsx

* Store provider name field in form context and send it to the db create endpoint

* store provider name in the app db

* Use the non-deprecated form field for DB provider field

* Allow setting null value to provider name field

* Fix db tests

fix test

fix test

* Add db submit integration test

fix type error

* Rename mock file name

* Simplify postgesql json form mock

* Set provider_name in the same db update as rest of the fields

* Use select-keys-when for DB put update handler
2025-08-21 16:30:55 +02:00
Konstantin Darutkin
5f9d7bcff4 refactor: replace NumberInput component with Mantine component (#62488) 2025-08-21 14:14:43 +00:00
Ryan Laurie
34f15d4926 Bump mantine 8.0 > 8.2 (#60268)
* bump mantine 8.0 > 8.1

* upgrade to 8.2.2

* update types
2025-08-21 13:49:24 +00:00
Ngoc Khuat
c4ab9abd8b writable check for mysql (#62338) 2025-08-21 13:31:37 +00:00
Oleksandr Yakushev
7da7cc3d9f [perf] Implement optimized update-keys (#61993)
* [perf] Implement optimized update-keys

* [perf] Add clojure.core/update-keys to discouraged vars

* Fix filter-on-implicitly-joined-column-test
2025-08-21 16:06:08 +03:00
Nicolò Pretto
b98becc8b7 update embedding homepage to reference embed js (#62169)
* wip

* fix unit test and fix utm tags on link

* update docs link

* Update frontend/src/metabase/home/components/EmbedHomepage/tests/EmbedHomepage.unit.spec.tsx

Co-authored-by: Phoomparin Mano <poom@metabase.com>

* Update frontend/src/metabase/home/components/EmbedHomepage/EmbedJsContent.tsx

Co-authored-by: Phoomparin Mano <poom@metabase.com>

* address feedback

* swap static and sdk as per feedback in the pr

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-08-21 14:14:38 +02:00
Oleksandr Solovyov
60e4c4c75e update jakarta.mail to 1.6.8 (#62481) 2025-08-21 14:43:47 +03:00
Ngoc Khuat
cd5ca874ef relax action datetime validation a bit (#62401) 2025-08-21 17:30:29 +07:00
Oleksandr Solovyov
527685e5fd update bouncycastle versions for snowflake to shutdown complains (#62482) 2025-08-21 12:16:16 +02:00
Oleksandr Solovyov
46b91762c7 update athena to 3.5.1 (#62480) 2025-08-21 12:15:54 +02:00
Oleksandr Solovyov
c5c274646b update Tiptap (and linkifyjs by extension too) (#62479) 2025-08-21 11:27:26 +03:00
Chris Truter
c3b7b72437 Return default value if setting is disabled for the given database (#62330) 2025-08-21 09:06:01 +02:00
Phoomparin Mano
ec0f31eccb Add the metabase-browser experience to embed flow (#62366) 2025-08-21 06:45:42 +00:00
Fraser
f559614992 Fix flaky header popover test (#62324)
* Wait for metadata before waiting for dataset
2025-08-21 15:37:56 +12:00
Ngoc Khuat
75d6135498 Track whether each table can be written to (#62203) 2025-08-21 02:37:06 +00:00
Fraser
66f5f5845d Create workflow to automate Claude Code creating PR fixes (#62198) 2025-08-21 11:41:31 +12:00
Alex Yarosh
7e42d91bc9 docs -fix releases link (#62468) 2025-08-20 19:27:20 -04:00
Ryan Laurie
ac7c00caf4 support pin map views across the international date line (#62380)
* support pin map views across the international date line

* add e2e test

* fix tooltips

* fix tooltips for non-wrapped pins
2025-08-20 16:55:02 -06:00
Riley Thompson
c27e94d91a Skip running vertica tests entirely (#62452)
* disable vertica tests due to removed image

* dont require, and skip

* skip in stress test

* add todos

* comment out vertica

* add todo
2025-08-20 21:59:54 +00:00
Oleksandr Yakushev
814151c604 [perf] Merge the faster walk implementation back into metabase.util.performance (#61992) 2025-08-21 00:45:49 +03:00
Nicolò Maria Mezzopera
fa0d39183e fix(ci): fix JAR extraction and renaming logic in fetch-artifact to avoid losing commit-id (#62429) 2025-08-21 09:28:28 +12:00
Denis Berezin
c5e5f16faf Add RowChart labels truncation, #59899 (#62042)
* Add RowChart labels truncation, #59899

* Add e2e test

* Review fixes - deduplicate text truncation

* Add visual test

* Fix CI

* Fix label offset

* Update Loki Snapshots

* Fix issue with static viz

* Update Loki Snapshots

* Fix visual tests

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-20 23:57:35 +03:00
Eric Normand
71c08b48e6 Better handling of deleting used cancelations (#62368) 2025-08-20 15:50:40 -05:00
Brad Anderson
f9248c70ff Fix: UXW-42 Debounce on the visualization resize is causing layout jumping (#62293)
* UXW-42 Fixes issues related to visualization layout jumping

* UXW-42 Fix e2e test
2025-08-20 16:16:11 -04:00
Riley Thompson
fb5bfdcb7f disable vertica tests due to removed image (#62426) 2025-08-20 19:43:43 +00:00
Brad Anderson
68bdab6756 UXW-461 Re-fixes issue where menu dots jump as save button shows/hides (#62372) 2025-08-20 15:34:55 -04:00
Denis Berezin
367988575f Fix breadcrumb on navigation from a question to a document (#62378) 2025-08-20 22:33:33 +03:00
Rodrigo López Dato
237f028135 Add link to MB_PLUGINS_DIR reference (#62058)
* Consistent JAR capitalization

* Add link to env var docs
2025-08-20 15:24:51 -04:00
Jeff Bruemmer
451e90660b docs gen - add identity and steps (#62433)
* add identity and steps

* debug

* fix PR creation

* whitespace

* trailing space

* update release

* add reviewer
2025-08-20 19:23:22 +00:00
Alexander Polyankin
e73b625533 Fix test (#62436) 2025-08-20 14:51:52 -04:00
github-automation-metabase
f1c33c1581 Update generated docs (master) (#62435)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-20 14:28:00 -04:00
Phoomparin Mano
4762092265 Add embedded analytics JS documentation to admin panel (#62296) 2025-08-21 00:44:45 +07:00
Cam Saul
7c979921b5 Minor field ref resolution improvements (#62374) 2025-08-20 10:31:57 -07:00
Denis Berezin
dcb4ce2aec Fix duplicated table column viz settings (#62306)
* Fix duplicated table column viz settings

* Add BE logic

* Fix

* Review fixes

* Review fixes

* fixup! use linear time deduplication

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-08-20 19:28:01 +03:00
Brad Anderson
1e75fb2496 Feat: UXW-522 Document names should populate the title attribute for the page (#62363)
* Updates page title to be document's name
* Memoizes SetTitle so it doesn't perform a bunch of calculations on every render when the title hasn't changed
2025-08-20 12:06:21 -04:00
Jeff Bruemmer
1bf72241c5 docs - nightly gen edits (#62422)
* reuse doc gen worklow

* improve summary

* check out branch prior to gen

* update master and release

* run at different time

* whitespace
2025-08-20 15:53:05 +00:00
Jakub Chodorowicz
946666971c Update Snowplow Micro image (#62399)
* Update Snowplow Micro image

* add snowplow folder to e2e_all task dependencies
2025-08-20 17:47:34 +02:00
Timofey Kachalov
acd8a71676 refactor(sdk): Improve API of exposed from Hosted Bundle entities + additional refactoring (#62317) 2025-08-20 19:32:29 +04:00
Sébastien
03822446fb closes EMB-734 iframe+matchMedia crashing in Safari (#62407) 2025-08-20 17:14:34 +02:00
Alexander Polyankin
7f1391b53f Repro for "Columns from joined tables with a hyphen in their name cause validation issues in the custom expression editor" (#62305) 2025-08-20 10:57:06 -04:00
Alexander Polyankin
f79cb88f19 Repro for "Question with Date field filter over text semantic type fails on refresh" (#62355) 2025-08-20 10:57:00 -04:00
Alexander Polyankin
e69e5c958d E2E repro for custom columns in join LHS (#62362) 2025-08-20 10:56:51 -04:00
Timofey Kachalov
4e155de716 Add background-hover to custom colors list (#62403) 2025-08-20 18:24:44 +04:00
Aleksandr Lesnenko
54a28dc851 fix breadcrumbs icon shrinks (#62371) 2025-08-20 14:21:44 +00:00
Jeff Bruemmer
0d3492c6e2 docs - prefer https links (#62400)
* https links

* typo
2025-08-20 10:16:32 -04:00
Jeff Bruemmer
5583aa331c Docs nightly gen edits (#62404) 2025-08-20 10:15:43 -04:00
Aleksandr Lesnenko
75917ecd3b fix admin role does not appear until refresh (#62384) 2025-08-20 11:11:17 -03:00
John Swanson
a4b70f7874 fix: adjust schemas for inactive tables too (#61554)
* fix: adjust schemas for inactive tables too

When toggling the multi-catalog setting for a database, we rename
existing schemas to match. For example, if you turn multi-catalog on and
have the existing schema `foo`, we'll rename it to `mycatalog.foo`.
Similarly, if you have the existing schema `mycatalog.foo` and turn
multi-catalog *off*, we'll rename it to `foo`.

We were ignoring inactive schemas here, which meant that if you turned
on multi-catalog and some of your tables became inactive (quite possibly
because you didn't update the schema filter to match, a major footgun
for the user), we would:

- update the tables going one way (`foo` to `mycatalog.foo`) and
deactivate for not matching the schema filter, then

- never update the tables again, because now they're inactive

Instead we should update the schemas for inactive tables as well.

Related to [UXW-375: Databricks multiple catalogs - Table
"database.catalog.schema.table" is
inactive](https://linear.app/metabase/issue/UXW-375/databricks-multiple-catalogs-table-databasecatalogschematable-is) / https://github.com/metabase/metabase/issues/61492

I don't think this is a complete fix though - we may need to rethink the
feature, and possibly just not allow you to change the setting for
existing databases.

* Add a test
2025-08-20 07:10:57 -07:00
Timofey Kachalov
bf1932af14 Properly apply transparent background for Public Embedding (#62394) 2025-08-20 18:01:10 +04:00
Brad Anderson
d1b83f9b02 Fix: UXW-511 Up/down keys not functioning in a Document that contains detail views (#62353) 2025-08-20 09:55:41 -04:00
Denis Berezin
04a5a289aa Fix auto width measure for row id column (#62375)
* Fix auto width measure for row id column

* Add visual test

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-20 16:23:39 +03:00
lbrdnk
e2dc67831d Make gate and indexer constants configurable (#62358)
* Cleanup

* Introduce settings

* Doc
2025-08-20 13:52:22 +01:00
Anton Kulyk
0b2a56b859 Set tooltip max-width (#62277)
* Set max-width to tooltips

* Update visual test
2025-08-20 12:07:58 +01:00
Romeo Van Snick
bc546a38de Disable unsupported sources for transforms (#62248)
* Allow rendering databases as disabled in DataSelector

* Allow rendering databases as disabled in DataSourceSelectors

* Allow rendering databases as disabled in NativeQueryEditor

* Add features for transforms/* to type

* Disable unsupported source tables in the native queyr transform builder

* Allow disabling databases in DataPicker

* Allow passing shouldDisableItem from Notebook to DataStep

* Disable unsupported databases in datapicker for transforms

* Remove type error in filter

* Pass shouldDisableItem to more pickers

* Add missing database to item

* Filter out unsupported questions too

* Remove database property again from DataPickerItem

* Fix item type

* Rename db_id to database_id

* Pass database_id in collection picker

* Disable unsupported tables, metrics and dashboards

* Hide recent items that have been disabled

* Padd shouldDisableItem to more sub-pickers

* Add database metadata to table

* Add shouldDisableItem to TablePickers

* Rename helper

* Simplify types

* Add hook to avoid using metadata

* Disable questions based on unsupported databases in question picker

* Allow disambiguating RecentItem from TableItem

* Disallow transforms on audit databases

* Add tests for unsupported databases

* Add unit tests for disabling items

* Disable dashboards in Question picker

* Use plain ORDERS_ID

* Move database support helper to utils and pull data fetching out of hook

* Pull out helper into separate definiton

* Add test about creating transforms from metrics

* Remove transforms/view and transforms/materialized-view from api types

* Use Loader from metabase/ui

* Fix types
2025-08-20 20:42:48 +10:00
Cam Saul
6868375992 No QP store outside of QP kondo warning (#62199)
* Just add clj-kondo ignores for now.

* cljfmt
2025-08-19 15:39:24 -07:00
Edward Paget
15ea427ec5 fix: document search index after update (#62369)
Fixes documents not being updated for search because we were not
returning the row instance from the define-after-update handler in model.document.
2025-08-19 20:55:01 +00:00
Edward Paget
a27f642240 fix: handle pivot-grouping as a BigDecimal (#62189)
* fix: handle pivot-grouping as a BigDecimal

Some database drivers (Oracle) seem to convert the pivot-grouping
integer into a BigDecimal; this attempts to safely convert it back to an
integer we can perform bitwise operations on, using .longValueExtract
which will throw an exception if the number is not losslessly
convertible to a long.

* fixup! throw if conversion fails
2025-08-19 15:45:17 -05:00
Nick Fitzpatrick
afa9b31c4c adding documents to smart links (#62289)
* adding documents to smart links

* PR feedback

* rebase conflicts
2025-08-19 16:34:51 -03:00
Phoomparin Mano
37e6eee311 Add the metabase-browser custom element to Embed JS (#60828)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-08-20 01:40:19 +07:00
Timofey Kachalov
658e5dc747 refactor(sdk): Adjust Embedding SDK dts generation (#62273) 2025-08-19 21:28:42 +04:00
Alexander Polyankin
509225c8d2 Show the unauthorized page if the user tries to access notebook without data perms (#62300) 2025-08-19 17:17:13 +00:00
Ngoc Khuat
92e6d0c760 Better error messages for actions that violate privileges (#62282) 2025-08-19 17:14:56 +00:00
Jeff Bruemmer
8d655ac2da docs - nightly doc gen (#62345)
* update master generation to nightly

* update script

* add release workflow

* use variable for release branch
2025-08-19 11:48:00 -04:00
John Swanson
d0f2438d44 Exempt admins from sandboxing on query_metadata (#62228)
In `enforced-sandboxes-for-tables` we were only checking the
permission in the `data_permissions` table, without special-casing
administrators like we do elsewhere.

So when checking to see if an administrator in `All Users` (sandboxed)
and `Administrators` had an enforced sandbox for a table, we were
checking to see whether there were rows in `data_permissions` providing
`Administrators` with `:unrestricted` data access to the table - which
will never be the case, because Administrators is special and never gets
any rows there.

Instead, special-case the super user case like we do elsewhere. Don't
bother getting the groups they're a part of - we know the set of tables
they're sandboxed on is empty.
2025-08-19 08:38:15 -07:00
Denis Berezin
6a3d185b2b Enable map pin type setting, #40999 (#62019)
* Enable map pin type setting, #40999

* Add e2e test

* clean-up
2025-08-19 18:21:51 +03:00
Jakub Chodorowicz
2656ef82cd fix: handle whitespaces in the connection string, decode username and password (#62328)
* fix: handle whitespaces in the connection string, decode username and password

* Trim the connection URI at first step

* Add safe uri decode, edge case test and remove redundant trim
2025-08-19 17:18:19 +02:00
John Swanson
134a0c464d fix actions tests (#62347)
slack thread for details: https://metaboat.slack.com/archives/C5XHN8GLW/p1755612853173319
2025-08-19 15:08:01 +00:00
Alexander Polyankin
6d398465f9 Use MBQL lib for template tags (#62340) 2025-08-19 11:00:40 -04:00
lbrdnk
3ac91dcc82 Update setter to enable docs gen (#62063) 2025-08-19 14:45:52 +00:00
Aleksandr Lesnenko
16eb4796a0 hide metabot within documents when disabled (#62287)
* hide metabot within documents when disabled

* disable metabot node when it's disabled
2025-08-19 11:10:49 -03:00
Aleksandr Lesnenko
9711799d06 enable set to default button (#62304) 2025-08-19 11:10:41 -03:00
Chris Truter
116a1195f2 Disable table-data-editing if database has routing (#62071) 2025-08-19 15:53:15 +02:00
github-automation-metabase
5600626386 Auto-update documentation (#62322)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-19 09:45:06 -04:00
Brad Anderson
bcf3af51ef Feat: UXW-495 Disable menu when in trash similar to dashboards (#62303) 2025-08-19 09:40:31 -04:00
dpsutton
85ed69c790 wait up to 10 seconds for worker to stop (#62288)
* wait up to 10 seconds for worker to stop

in CI getting lots of flakes. Here's reproduction locally:

```
queue-test=> (dotimes [_ 20] (listener-handler-test))

FAIL in (listener-handler-test) (queue_test.clj:178) ;; 1
Standard behavior with a handler
expected: (not (thread-name-running? thread-name))
  actual: (not (not true))

FAIL in (listener-handler-test) (queue_test.clj:178) ;; 2
Standard behavior with a handler
expected: (not (thread-name-running? thread-name))
  actual: (not (not true))

,,,

FAIL in (listener-handler-test) (queue_test.clj:178) ;; 18
Standard behavior with a handler
expected: (not (thread-name-running? thread-name))
  actual: (not (not true))
nil
```

and after:

```
queue-test=> (dotimes [_ 20] (listener-handler-test))
nil
```

* eastwood doesn't like new qualified method stuff

* Attempt to fix flaky tests

emails can end up in here from other tests as well. So this takes two
tracks:
first, i want to just check all emails in the box for this
user. Sometimes there are multiple emails in here and the one we want
isn't first. and second, better error messages. This will show us all
email message subjects. Hopefully that lets us identify what else might
be going wrong.

Next step if this is still failing it to attach which test sent the
message using clojure.test/*testing-vars*.
2025-08-19 08:38:29 -05:00
Alexander Polyankin
6fc936e66f Limit dashboard name to 254 chars (#62294) 2025-08-19 09:36:07 -04:00
Alexander Polyankin
c1762bf787 Hide the filter button when there are no parameters (#62295) 2025-08-19 09:36:01 -04:00
John Swanson
86b21a98f0 Log propagation for notifications (#62286)
Adds a simple function and a macro to `metabase.util.log` to allow
propagation of ThreadContext across thread boundaries.

`(with-context-meta some-map)` adds the `mb-` prefixed items in the
`ThreadContext` to the metadata of that map.

`(with-restored-context-from-meta some-map)` takes a map presumably
resulting from calling `with-context-meta`, and sets the current
`ThreadContext` accordingly.

I changed the dispatch-fn and the worker consumption functions in
`metabase.notification.send` to use these to propagate the ThreadContext
to the worker thread.

Sending a notification like

```
(log/with-context {:aoooooook "hey"} (dispatch! {:flippity "ofosidjffoo"}))
```

now results in:

```
2025-08-18 14:42:45,716 ERROR notification.send :: Error in notification worker {mb-aoooooook=hey}
clojure.lang.ExceptionInfo: Invalid input: {:payload_type ["invalid dispatch value, got: {:flippity \"ofosidjffoo\"}"]}
```
2025-08-19 13:08:15 +00:00
John Swanson
ab8166e1cf Improve log context for exceptions (#55909)
* Improve log context for exceptions

This adds a feature to our log context that I've used and loved in the
past.

For illustration, let's say I do this:

```
(defn my-fn []
  (log/with-context {:user 123 :database 5}
    (/ 1 0)))

(try (my-fn)
     (catch Exception e (log/error e)))
```

With the current code, we'll run `my-fn`, throw an exception,
then *exit* the `log/with-context` block. When we eventually log the
exception, the context will be empty.

This is annoying, because when the exception was thrown, we had context
that a developer thought would be useful. But just when it would
be *most* useful to have that information - an uncaught exception we
didn't think about bubbles up to the HTTP request logging middleware or
whatever - it's thrown away.

This change essentially wraps `with-context` calls with a `try/catch`
that catches any exceptions and re-throws them, annotated with the
original context.

This way, when we actually log the exception, we can swap back the
original context. In the above example, `{:user 123 :database 5}` would
be logged with the exception.

* Move log context ex-data to special key

When the exception middleware catches an exception it does some fancy
logic about whether to just let the body be the exception message (like
"Not found") or a blob of data with the message, stacktrace, data, etc.

Including the log context in the ex-data itself caused this to get
confused (because some additional data was present in the `ex-data`) and
spit out the blob where previously we'd just presented a user-friendly
error message.

To avoid doing this accidentally in the future, I just stuck all the log
context data under a special key, `:metabase.util.log/context`, in the
ex-data, which we can explicitly ignore when deciding whether to include
the whole exception in the error response.

* Fix failing test
2025-08-19 12:22:57 +00:00
Anton Kulyk
f299892792 Move vertical legend to the right (for cartesian charts) (#62270) 2025-08-19 10:45:29 +01:00
Chris Truter
5d5d7f0e67 Better error messages for actions that violate custom constraints (#62271) 2025-08-19 11:14:06 +02:00
Timofey Kachalov
b42ac636f0 refactor(sdk): Add Hosted Bundle adjustments/improvements (#62164) 2025-08-19 12:02:15 +04:00
Romeo Van Snick
9320ec4ac7 Snowplow events for transforms (#62266)
* Add snowplow event when transform gets triggered manually

* Track job runs

* Add event when new transform is created

* Track transform create menu interactions

* Add tests for snowplow events

* Pull out transform manual runs into analytics file

* Move transform creation events to shared analytics file
2025-08-19 11:27:43 +10:00
Fraser
6aa97914b4 Add skip tag and replace .skip() (#62141) 2025-08-19 13:08:41 +12:00
Cam Saul
03c268b840 QP parameters code => Lib (#61114)
* Fix conversion of joins with a native source query to legacy

* Don't do nasty stuff to parameters when converting from legacy

* Move parameters to correct location when converting joins

* Fix conversion of joins with filters

* Splice join parameters together

* QP params => Lib

* Fix Kondo warnings

* Simplify PR [ci skip]

* Beautiful QP middleware

* Beautiful QP middleware.

* Add notez

* Test fixes 🔧

* JVM metadata provider fix 🔧

* Kondo & cljfmt

* Test fixes 🔧

* kondo

* Delete the Lib-style rewrites of the parameters code, I decided I didn't like them

* Fix the schema

* Revert unneeded changes

* Fix busted tests 🔧

* Fix two more busted tests.

* Fix even more broken tests

* Fix broken tests 🔧

* Improved normalization for :value clauses

* Test fix 🔧

* Test fix 🔧

* Fix resolution of field name refs in first stage

* Test fixes 🔧

* Another round of test fixes 🔧

* Fix :expression ref parameters

* Maybe fix flakes

* Test fixes 🔧

* cljfmt/kondo
2025-08-18 18:06:27 -07:00
Ryan Laurie
cd7977fa5d Fix Recents e2e Test Failures (#62309)
* debug

* unfreeze server time
2025-08-18 18:31:05 -06:00
appleby
be23df0964 Reduce coupling between semantic.index and semantic.scoring (#62089)
* Reduce coupling between semantic.index and semantic.scoring

Previously ->col-expr was defined in the scoring namespace and had to "know" about hybrid search query table aliases, which is gross.

Instead, define a hybrid-coalesce func in the semantic.index namespace and pass it into the semantic-scorers function. Also use it in hybrid-search-query, to ensure hybrid column references are constructed in the same way in both places.

* Add semantic-scorers->col-expr-is-respected-test

* Remove ->col-expr and just re-project cols from hybrid query with well-known names
2025-08-18 16:33:39 -07:00
Fraser
ec4b043c00 Simplify test to remove network calls that were flaking (#62142) 2025-08-19 11:28:26 +12:00
Alex Yarosh
cb62d6d9c9 Update embedded-analytics-js.md (#62315) 2025-08-18 19:03:36 -04:00
Phoomparin Mano
32c081354a Derive theme-aware colors in embed flow from 3 base colors (#61961) 2025-08-18 22:00:56 +00:00
John Swanson
ce8543e048 Add an API endpoint to delete collections (#61684)
* Add an API endpoint to delete collections

This permanently deletes a collection and anything contained inside it.

One "exception" that's not really an exception: say you have A > B > C > D,
you trash C, then trash A.

Now you have:

```
Trash > A > B
Trash > C > D
```

(because C was trashed directly).

But internally, we still represent D's location as `/A/B/C/`.

Now you permanently delete A. We need to make sure D's and C's locations
get fixed. Therefore, before deleting A, we go through all
the *directly*-archived children of A, and move *them* to A's parent.
Moving a collection also moves its children, so we'll move the whole
`C > D` structure out of `B` into the root collction.

Then we'll delete `A > B`, leaving `C > D` behind.

* Don't get the parent for no reason

the children-location of my parent is... my location. :doh:
2025-08-18 14:06:40 -07:00
Jeff Bruemmer
bd181add0b docs - automate doc generation (#62237)
* basic workflow

* update workflow

* edits

* format

* tuesday
2025-08-18 21:01:14 +00:00
github-automation-metabase
a9e1fe68a8 Bump net.snowflake/snowflake-jdbc-thin from 3.25.1 to 3.26.0 (#62264)
Inspect dependency changes here:
2025-08-18 15:07:04 -05:00
github-automation-metabase
2da534d5fa Bump io.netty/netty-buffer from 4.2.3.Final to 4.2.4.Final (#62261)
Inspect dependency changes here:
2025-08-18 15:06:21 -05:00
github-automation-metabase
742b0e7d29 Bump weavejester/dependency from 0.2.1 to 1.0.0 (#62259)
Inspect dependency changes here:
2025-08-18 15:05:31 -05:00
github-automation-metabase
08e3658741 Bump thheller/shadow-cljs from 3.1.8 to 3.2.0 (#62258)
Inspect dependency changes here:
2025-08-18 15:04:36 -05:00
github-automation-metabase
2b5933b991 Bump org.eclipse.jetty/jetty-unixdomain-server from 12.0.24 to 12.0.25 (#62257)
Inspect dependency changes here:
2025-08-18 15:03:40 -05:00
github-automation-metabase
a7af11df4e Bump org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server from 12.0.24 to 12.0.25 (#62254)
Inspect dependency changes here:
2025-08-18 15:02:58 -05:00
github-automation-metabase
7a36514339 Bump inflections/inflections from 0.14.2 to 0.15.0 (#62252)
Inspect dependency changes here: https://github.com/r0man/inflections-clj/compare/0.14.2...0.15.0
2025-08-18 15:02:41 -05:00
Ryan Laurie
847992a550 mark recents test flaky (#62299) 2025-08-18 12:56:27 -06:00
Phoomparin Mano
4579edafa0 Add top-level breadcrumb navigation for Embed JS (#62128) 2025-08-19 01:50:36 +07:00
Aleksandr Lesnenko
2bc99f976a UXW-491: prevent users from enterling long document titles (#62243) 2025-08-18 15:47:38 -03:00
Timofey Kachalov
7256a9a8a8 refactor(sdk): Output both SDK Package and SDK bundle versions + refactoring (#62215) 2025-08-18 22:12:12 +04:00
appleby
e5d04632d5 Ensure we cleanup the mock index metadata tables as well as the index table in test utils with-index! (#62247)
* Ensure we cleanup the index metadata tables as well as the index table in with-index!

Otherwise, we wind up with many "duplicate" docs in the gate table which results in duplicates in the index. These are
not true duplicates; they have fresh model ids from the with-temp'ed mock docs we create, but they have identical
content, so they have identical embeddings and tsvectors. Those documents then wind up with identical text and
semantic scores when querying the index, and since we ORDER BY the scores (with no tie breaker secondary ordering),
this creates non-determinism in the semantic and keyword rankings, making test assertions wonky.

* Tighten up test assertions in native-query-test

These were relaxed to top-three? in #62101, but since the query results are no longer non-deterministic, it should be
safe to switch back to requiring the match to be the first result.
2025-08-18 10:13:30 -07:00
Cam Saul
0e75814ad4 Fix field resolution when using a field name ref in the first stage (#62232)
* Improved normalization for :value clauses

* Fix resolution of field name refs in first stage
2025-08-18 12:55:52 -04:00
Jeff Bruemmer
51cafc1874 update filter doc (#62290) 2025-08-18 12:39:23 -04:00
Nicola Mometto
7c0714c7e6 move do-with-resilient-connection to wrapping describe-database function (#62062)
* move do-with-resilient-connection to wrapping describe-database function

* backwards compatible

* changelog

* more explicit changelog

* stronger wording

* fix changelog
2025-08-18 17:26:43 +01:00
lbrdnk
6cc8118d28 Recreate missing index table on init (#62278) 2025-08-18 17:58:45 +02:00
Ngoc Khuat
4e047df4ee Table editing inputs validation (#62098) 2025-08-18 14:59:19 +00:00
Edward Paget
47c8da0e28 feat(mage): print better argument usage help (#62226)
* feat(mage): add port option to mage nrepl

Adds an option to the mage nrepl command to customize the port mage's
nrepl starts on. This is mostly so I don't need to modify my clojure-mcp
configuration to point to a different port when working on mage stuff.

* feat(mage): add port option to mage nrepl

Adds an option to the mage nrepl command to customize the port mage's
nrepl starts on. This is mostly so I don't need to modify my clojure-mcp
configuration to point to a different port when working on mage stuff.

* feat(mage): print better argument usage help
2025-08-18 14:07:59 +00:00
Nicola Mometto
1b2833bd26 Search robustness (#62275)
* make semantic search resilient to errors on fallback engine

* sort active-engines by default-engine first

* more logging around appdb init

* add test
2025-08-18 14:05:27 +00:00
Edward Paget
abc5dc471b fix: document api tests with flakey ordering (#62236) 2025-08-18 08:54:46 -05:00
Nick Fitzpatrick
ad20093b7f Update the Database Form to use Mantine components (#61163)
* update the dashboard form to use mantine components

* committing forgotten files

* e2e adjustments and fixes

* test adjustments

* remove shameful hardcoded font sizes

* fix font size on switches

* adjusting unit test
2025-08-18 12:58:29 +00:00
Nicolò Maria Mezzopera
56e4ed86a3 Fix Uberjar artifact reuse (#62109)
* Fix OSS/EE artifact conflict in uberjar workflow

Problem: When fetching both OSS and EE artifacts in check-existing-artifacts job,
unzip was prompting for confirmation to replace COMMIT-ID file, causing the
workflow to fail with 'EOF or read error, treating as [N]one' error.

Solution: Use different extract paths for OSS and EE artifacts to avoid conflicts:
- EE artifact extracts to 'ee-artifact/' directory
- OSS artifact extracts to 'oss-artifact/' directory

This allows both artifacts to coexist without file conflicts, fixing the
artifact recycling issue for both OSS and EE versions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(ci): resolve OSS/EE artifact conflicts by extracting to separate paths

Fixes COMMIT-ID file conflicts when fetching both OSS and EE uberjar artifacts
by extracting each artifact directly to its designated directory path instead
of the current directory. Simplifies fetch-artifact action logic while
maintaining full backwards compatibility.

Changes:
- Extract artifacts directly to specified extract-path
- Eliminate file conflicts between OSS and EE artifacts
- Simplify processing logic by unifying unzip and rename steps
- Maintain backwards compatibility for all existing workflow usages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(action): correct error message for missing artifacts to use input name

* fix(ci): optimize uberjar concurrency to prevent duplicate builds per commit

Changes concurrency grouping from branch-based to commit-based to allow
multiple workflows to call uberjar for the same commit while preventing
duplicate builds. The existing artifact checking logic handles deduplication.

- Group by commit SHA instead of branch ref
- Disable cancel-in-progress to avoid wasting build work
- Allow concurrent calls from different workflows (pr-env, perf-test, etc.)
- First caller builds, subsequent callers reuse existing artifacts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(action): use temp directory to avoid file conflicts during artifact extraction

The fetch-artifact action was failing when multiple artifacts were extracted
to the same directory due to file conflicts (e.g., COMMIT-ID files). The unzip
command would prompt to replace existing files, causing CI failures.

This change extracts artifacts to unique temporary directories first, then
moves only the JAR file to the final location, eliminating conflicts while
maintaining full backwards compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(workflow): remove source_changed input and simplify build conditions

* fix(action): remove unnecessary blank line in fetch-artifact action

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-18 09:57:47 +02:00
Jakub Chodorowicz
984a2564fc Fix regression - small cta for large upsell banner and big card (#62009)
* Fix regression - small cta for large upsell banner and big card

* Extract upsell styles to per component css modules

* Regression - bring back margins to cta in large upsellbigcard

* Add upsell components to loki visual tests

* Fix too big margin in upsell large variant

* Align storybook story with the real usage

* Update Loki Snapshots

* Allow custom button styling on UpsellCard, move custom styles card instance

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-18 09:41:41 +02:00
Oleksandr Solovyov
57e37a6773 [serdes] report local PK for entity when loading fails (#62205) 2025-08-18 10:24:31 +03:00
Timothy S. Dean
63d54fc6af [Transforms] Address two potentially flaky transform-execution tests (#62242)
Make both transform execution tests less flaky and de-uglify some test utils.
2025-08-16 01:40:59 +00:00
Alexander Polyankin
02cf9664ae Transforms (#61289)
* Save changes

* Save changes

* Redshift passes tests

* Fix placeholder

* Fix placeholder

* Rename execution to run

* Rename execution to run

* Rename execute to run on the backend

* Rename execution to run

* add default jobs for the default tags

* Snowflake and SQLServer passing tests

* Fix issues stemming from BE renames

* Rename execution to run

* Rename execution to run

* Rename execution to run

* assorted updates

* Rename execution to run

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Fix transforms.api-test/execute-transform-test

* Remove :run_trigger from expectations in `transforms.api-test`

* fix `api.transform-job-test`

* E2E tests

* E2E tests

* Add inverse to tag insertion

* Fix whitespace in yaml (my favorite ;)

* E2E tests

* Add defaultly-tagged jobs back in

* Fix mysql migration (rollback order)

* Appease migration linter

* Oops

* use ${text.type} in migrations instead of text

* E2E tests

* E2E tests

* E2E tests

* don't run transforms on audit dbs

* Isolate transforms tests from regular test data

* Woof! Migrations now lint correctly

* m. changeset ids (sorry)

* E2E tests

* Better delete rollbacks

* Whitespace

* Last whitespace lint issue

* E2E tests

* Brain fart mistake.

* Remove excess drop table

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Better rollback for mysql

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* better error message when target already exists

* Get API tests passing again

* Add some multimethod unit tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* timeouts use a setting

* jobs check whether things are already running

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Change default job names.

* E2E tests

* E2E tests

* Remove default tags and jobs from migration entirely due to localization issues

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Fix execute test

* E2E tests

* E2E tests

* Allow nil schema in api

* E2E tests

* Run all transforms tests on ci

* Fix mysql ordering

* E2E tests

* Cancel targeting for worker_run_cancelation deletion

* E2E tests

* E2E tests

* only postgres supports transforms

* Rename worker_* to transform_*

* E2E tests

* Delete tag initialization

* E2E tests

* Fix up API tests, get BigQuery working

* Remove bigquery support flag for transforms/table

* worker_run_cancelation -> transform_run_cancelation

* No more worker

* Add missing file

* make transform_id and transform.id types consistent

* QUE-2140

* Remove views/materialized views

* Seed transforms data at startup

* Add translation support to transforms default seeding -- just no translations supplied yet

* m.

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* convert localized strings into actual strings on job seed insert

* fix some tests

* add docstrings for transforms api routes

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Migration fix?

* Revert "Migration fix?"

This reverts commit a4704c2203.

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* readd accidentally deleted h2 defmethod

* don't serialize transform models

* Remove with-transform-runs

* Remove create-transform-run, use with-temp-defaults-fns

* cleanup ns

* Remove with-transform-tags

* Fix silly tru mistakes

* Remove test-transform

* Migration fix?

* Simplify tests using defaults

* Migration fix?

* cljfmt

* cljfmt

* Use with-temp

* Seed tags/jobs based on internal setting

* cljfmt

* cljfmt

* cljfmt

* Better cleanup in tests

* assorted kondo and transform job hydration updates

* FE tests

* remove worker from config.edn

* start running all tests again

* Kondo transform_job.clj

* Kondo models/transform.clj

* Kondo models/transform_job.clj

* Kondo models/transform_run.clj

* FE tests

* test fixes

* Kondo ordering.clj

* Kondo schedule.clj

* test fixes

* test fixes

* test fixes

* test fixes

* FE tests

* Fix models?

* Fix models?

* m. cleanup

* Fix tests

* kondo passes

* Add entity ids

* Make entity_id s nullable

* Re-add entity ids to seeded tags and jobs

* Use model names in seed tests

* Better relative positioning in UI for tags

* Rename join tables

* Fix tests

* Fix tests

* Update entity_id

* kondo

* formatting

* formatting

* e2e test for default jobs and tags

* e2e test for default jobs and tags

* Remove transforms-gating for transforms default value seeding.

* e2e test for default jobs and tags

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* add tests

* add tests

* add tests

* add tests

* add tests

* Comment out failing test

* Fix kondo complaints

* Remove unique constraint on tag name.

* Lint fix.

* Re-add necessary rollbacks for old SQL versions

* Re-add timeout and cancelation on timeout

* update changelog

* Remove transforms-seeded setting

* Last bits of cleanup from local review

* Add transforms.jobs to init

* Missed a DRY spot.

* Fix schemas

* Remove dead code

* Merge master

* Merge master

* Remove dead code

* linter

* update transform job run when already-run transform completes

---------

Co-authored-by: Eric Normand <ericwnormand@gmail.com>
Co-authored-by: William Zimrin <william@metabase.com>
Co-authored-by: Timothy Dean <timothy@timothydean.dev>
2025-08-15 17:28:31 -04:00
LeAnn
15357d168b Update native editor docs to add notes on limitations (#62213)
* Update writing-sql.md

Adds a section below "How Metabase executes SQL queries" noting that we don't officially support multi-statement queries or DDL (and recommend against use of procedures and functions).

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-15 17:26:59 -04:00
Alex Yarosh
035f6707c1 docs: remove examples for R/CLS docs (#62230) 2025-08-15 17:25:28 -04:00
Riley Thompson
782432ca01 allow offset as filter field variable (#61984) 2025-08-15 17:18:50 -04:00
Aleksandr Lesnenko
662e3c8ead remove ts-expect-error in documents (#62222)
* remove ts-expect-error in documents

* review
2025-08-15 20:55:53 +00:00
Edward Paget
bdd0f32b50 revert ws only changes in modules/config.edn file (#62234) 2025-08-15 20:32:48 +00:00
Nicolò Pretto
1321b75fff import embed.ts instead of adding the script (#62154) 2025-08-16 02:37:17 +07:00
Cam Saul
e34a651ac0 Make Lib schemas better about catching MBQL-only keys in native stages or joins (#62192)
* Make Lib schemas better about catching MBQL-only keys in native stages or joins

* Replacing a field ref in join :fields should set the correct join alias
2025-08-15 12:27:05 -07:00
appleby
861d7bf029 Add view_count scorer to semantic search backend (#62086)
* Add view_count scorer to semantic search backend

* Get pgvector db from global env in semantic.scoring/view-count-percentiles*

Get the db data-source directly rather than passing it in as an argument to this function to side-step potential
issues with using the db as a cache key for the memoized version.

https://github.com/metabase/metabase/pull/62086#discussion_r2272790618
2025-08-15 11:21:56 -07:00
Jeff Bruemmer
5eff320fcb add pro banners (#62227) 2025-08-15 17:57:20 +00:00
Edward Paget
f11e8248d0 feat(mage): add port option to mage nrepl (#62224)
Adds an option to the mage nrepl command to customize the port mage's
nrepl starts on. This is mostly so I don't need to modify my clojure-mcp
configuration to point to a different port when working on mage stuff.
2025-08-15 17:55:31 +00:00
Aleksandr Lesnenko
15ae50ace3 Documents Feature (#61285)
* remove references to static questions

* Ditch overall sidebar for now (#61523)

* Remove list of cards sidebar

* Some type fixes

* Review fixes

* feat: associate in_report cards w/ report_document

* feat: associate cards with reports in create

* better markdown serde

* switch to prosemirror ast

* chore: add enterprise card test

* remove snapshots

* less redux

* send used card ids

* drop flushSync error

* remove replace question, drop refresh question

* fix backend not starting

* saving new report should not show LeaveRouteConfirmModal

* polish

* Insert into reports from metabot (#61642)

* insert from metabot

* Metabot plugin and hook

* make stuff nicer

* cleanup

* no more snapshots

* run build and docker uberjar on push

* remove trigger for uberjar

* Print Report

* cleanup

* always create a card clone when embedding

* always clone non in_report cards

* disable metabot sidebar on mob+b

* stop header bouncing

* jumping layout when loading

* why scroll to bottom when opened

* gross emojis

* cleaning up emoji ui a bit

* icons

* fe: reports -> documents

* update metabot question creation parsing

* keep report cards and collections in sync (#61686)

* do not leak prosemirror styles into charts

* chore: rename everything to document (#61743)

strip out snapshotting code

* fix FE usage of documents api

* fix embedding dashboard-only cards to documents

* uxw-366: Navigation back to the report from a drill through can be difficult - can we add the back button like for dashboards

* mention all entities

* split mention vs command, allow mentioning other entities

* paste smartlinks

* missing import

* fix links to tables

* fix layout

* auto focus on title on new documents

* UXW-404 Improves image formatting

* Tweaks metabot block styling, wires up "stop generating" functionality

* Fix issues with multiple in-flight requests

* Adds subtle animation to "Working on it..." message

* Document Metadata

* Fix some CI issues

* Persist cards when saving document (#61818)

* chore: remove document version model

* persist cards only when saving documents

* chore: remove in_document type

* feat: return document creator

* feat: save cards with parameters pass in as cards

in POST and PUT requests to documents

* chore: exclude doc cards from where shouldn't be

search, recents, collection items

* chore: fixup search and card tests

* contract

* feat: update document ast with new card ids

* fix: report -> document in collection api

* fix: ws

* feat: clone cards not associated with document

* chore: add tests for document permissions

* fix contract

* fetch root collection

* update message

* must be working now

* fix sidebar

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>

* wip but working sql query editor in documents

* feat: revision history for documents

* feat: include revision info in collection tree res

* document entity

* Fix issue where temporary implementation of metabot block can't create questions

* feat: allow documents to be archived

* Document Collection Item Caching

* Fix issue where submitting empty metabot prompt (by hitting "Run" or cmd+enter) makes it spin forever

* fix UXW-412 again

* feat: allow documents to be bookmarked

* fix: hide documents in collection items if not EE

* fix: add perms info to documents in collections

* fix: always add documents to bookmark lookup

* feat: add document delete endpoint

* fix: require non-blank string for name

* App Bar Breadcrumbs for documents

* fix: tests and lints

* fix: ordering of migrations for mysql

* fix: for OSS tests

* fix: tests and kondos

* fix: module sort

* New metabot documents API

* UXW-400: formatting floating menu

* UXW-416: replace question should replace only 1 question

* swap icon

* l10n

* fix: bad var reference in tests

* undo moves should work once archived is boolean

* Show tooltip with precise time in document metadata

* Updates MetabotEmbed to work with upcoming BE changes

* Updates MetabotEmbed to always use draft cards

* Updates MetabotEmbed "stop generating" functionality to work with regular (non-streaming) api call

* Updates MetabotEmbed to use most up-to-date api contract

* Stubs out the necessary updates to make MetabotEmbed work with an UnsavedCard from the BE rather than a full Card

* Updates MetabotEmbed to use most up-to-date api contract

* fixed drills & query editing for metabot cards

* fix: foreign key indexes

* Replaces hard-coded metabot-generated card title with title from the /generate-content response (or translates a default title if none provided)

* fix: add entity id column to documents

* add title to untitled docs

* UXW-453 Fix 404 when clicking draft card title

* Handle URL slugs, remove version code from document page, handle 404 and 403

* UXW-459 Fix issue where creating a new document when starting from another document overwrites the existing document (and shows previous document's metadata in new document)

* hide object detail row in document tables

* UXW-459 Fix issues with LeaveRouteConfirmModal and new documents

* UXW-461 Prevents jump when Save button appears/disappears. Also adds subtle fade-in transition when it appears.

* UXW-461 Save button always shows up for new documents (and user has necessary permissions)

* improved mention and command

* clean

* fix replace question

* do not show bubble menu on disallowed nodes

* MetabotEmbed polish:
* Prevents prompt from highlighting when you hit "Run" (potentially bringing up the editor bubble menu).
* Prevents useEffect hook from running way more than it needs to.
* Adds margin below MetabotEmbed.
* Hitting escape with nothing in the textarea will now remove the MetabotEmbed block.
* Makes layout less janky when Metabot responds with a long error message.

* Localizes "Created with Metabot" text

* drop emojis

* no emojis and markdown downloading

* fix metadata fetching

* initial e2e tests

* fix: set null on collection cascade for documents

mirrors behavior for dashboards and cards

* fix: remove documents token hack

* feat: documents in search

Also supports view_counts and last_viewed_at for documents

* fix: emit documentment read on api get

* fix: in_place search fixes and test fixes

* fix: migration order

* fix: set type to :question dashboard_id to nil

* fix: more in-place search fixes for documents

* fix: final in-place search test fixes

* fix: handle inadvertent documents in oss tests

* mention + command feedback

* placeholder

* fix command search

* Fix issue where charts sometimes don't get added via metabot when inserted in the middle of a document

* fix command

* feat: support pinning documents

* fixup! pinning reconcilation with documents

* feat: support serdes on documents (#62032)

* fix: kondo warning on unused var

* updated styles

* bump padding

* Markdown Loki Test

* UXW-462 Adds database picker in metabot block

* UXW-462 Fix issue where sometimes custom tiptap node tries to re-render too quickly resulting in an error

* refactor

* feedback on the command

* UXW-462 Fix issue where you can write markdown in metabot blocks

* improve state management UXW-463 UXW-450

* Updates "Created by Metabot" line based on design/user feedback

* feat: add documents to recents

* fix: whitespace and round-trip serdes test

* fix: whitespace exclusion path

* fix: token features in recent views test

* Able to generate sql charts

* fix: casing in tests

* Changes how mention text is referenced in the documents metabot prompt serializer. It uses a cache in the documents slice now. It was using a node attribute before but that was hacky and it messed with the "is dirty" calculation.

* more e2e tests

* Fix issue where metabot nodes sometimes yield a false positive in hasUnsavedChanges because they updated their own attributes

* Update menu items (#62072)

* Update commands and remove descriptions

* Removes unused code

---------

Co-authored-by: Brad Anderson <brad@metabase.com>

* feat: return can_restore, can_delete for docs

* Updates Document type with newly added properties

* Fix issue where "Delete permanently" errors out instead of deleting

* Move, Archive, and Bookmark in documents page

* bury shame

* UXW-472 Adds ArchivedEntityBanner for documents

* fix: remove extraneous precondition migration

* UXW-451 Adds some light dataset error handling

* Reverts probably-accidental change

* feat: check for name length

* Reports fix fe ci (#62046)

* Fix some CI issues

* Fix some CI issues

* Fix typecheck issues

* Fix lint

* Fix unit tests

* Fix e2e tests

* fix pivot query editing in documents

* better command popover positioning

* UXW-473 fix layout

* fix z-index

* only include tables you can use for native query builder

* Fix typecheck

* Light documents metabot cleanup

* Fix issue where browsers spell check areas that shouldn't be spellchecked (e.g. "Ask Metabot ...")

* Removes package-lock.json that was accidentally added in 63a94c8788 and should've been removed in 68366d7d37

* cleanup

* attempting to get a card embed in storybook

* Fix documents stories

* fix: bookmarks fail if token exists but ee doesn't

* fix: bookmark inside a collection error

* Removes now-unused extensions

* chore: tests for metabot tools

* Add token check on the FE

* fix: remove unused ns from test

* Review fixes

* Revert token check

* Add token check on the FE

* fix: correctly serialize token status to FE

* Fix e2e tests (#62113)

* Fix e2e tests

* Fix e2e

* fix: use adhoc metadata if card id is negative

* chore: add tests for isSavedCard guard

* UXW-489: replace shows entity picker, UXW-507: don't highlight chart after insertion

* Fix typecheck

* fix: token feature tests

* fix: add docs to stats ping

* Fix typecheck

* Fix e2e

* Reverts now-unnecessary changes

* Reverts more now-unnecessary changes

* Address cubic PR feedback (type guards)

* Fix issue where landscape-orientation images larger than the max-width get stretched

* Fix e2e

* PR feedback (code cleanliness)

* PR feedback (simplify custom node definition)

* adding loki references

* delete loki reference files

* adding missing loki reference files

* auto-fix generated sql (#62167)

---------

Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>

* PR feedback (unit test + remove unused classes)

* addressing some minor feedback

* chore: add table utils tests

* review

* Cleans up types

* Removes /documents/redux-utils. Uses plain useDispatch/useSelector hooks instead.

* review

* cleanup documents selectors

* remove unnecessary type cast in visualizationUtils.ts

* remove versioning mention in comments

* use _.isEqual instead of json serialization and string compare

* Code review fixes

* remove inline styles from FormatButton

* fix bubble menu does not immediately show what formatting is applied

* remove inline styles

* drop unused suggestion styles

* consistent hook names

* drop unused dep

* remove any from DocumentPage

* clean up change callbacks of the editor component

* drop unused onClode prop in EmbedQuestionSettingsSidebar

* provide correct reportTimezone to ModifyQuestionModal

* make runQuestionQuery optional

* NativeQueryModal cleanup

* clean up NativeQueryModal

* drop unused code in useDocumentState

* unnecessary casting

* reset error state

* drop unused prop

* bubble menu disallowed nodes

* dedupe similar hooks

* review

* fix: kondos

* Update e2e/support/helpers/api/createDocument.ts

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix: PR comments

* fix: remove schema ns

* Potential fix for e2e test failing on CI only

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
Co-authored-by: Edward Paget <ed.paget@gmail.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Luiz Arakaki <luiz.arakaki@metabase.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: eliotmetabase <eliot@metabase.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-08-15 10:00:03 -07:00
appleby
a417789bc2 Address review comments from semantic search integration branch PR (#62214)
* Remove feature-visualizer and nm-semantic-search-in-metabase from the Build Uberjar workflow

The feature-visualizer branch was removed in 3e605c6d87, but came back in (presumably due to bad merge conflict
resolution) from the semantic search branch.

* Fix typo in gate test: documen -> document

* Make cause third arg to ex-info in semantic-search /status endpoint
2025-08-15 16:48:58 +00:00
Riley Thompson
c1d3945035 Disable starburst in CI tests (#62209)
* disable starburst

* make starburst not required

* add back determine drivers check
2025-08-15 16:37:31 +00:00
Anderson
c4bd02d99f [PGR-111] Change what happens after a database is added (#62121)
* Create HeaderLinkGroup with new links and add to ExistingDatabaseHeader.tsx

* Don't show database added popup when database is created

* Ensure 'Browse data' button link does nothing when disabled

* Fix e2e tests

* Fix e2e tests part 2

* Adjust 'Browse data' link to be an actual button when disabled

* Fix padding (keep button padding & adjust flex gap)
2025-08-15 13:34:05 -03:00
Chris Truter
cd2b8d5ba8 Test for concurrent cluster lock creation with fix for postgres (#62204) 2025-08-15 16:31:17 +00:00
Nicola Mometto
2ea9652950 fix typo (#62210) 2025-08-15 16:02:17 +00:00
Jeff Bruemmer
2ff4e99eaa update generated docs script (#62190) 2025-08-15 15:42:47 +00:00
Maz Ameli
69a3b0f10c New Document icon (#62188)
* new document icon

* fix centering
2025-08-15 08:01:44 -07:00
Abed Habli
75b7e4d4ff Docs: Add SAML Single Logout (SLO) configuration instructions (#62174)
* docs: Add SAML Single Logout (SLO) configuration instructions

* Update docs/people-and-groups/authenticating-with-saml.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

* Update docs/people-and-groups/authenticating-with-saml.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

* Update docs/people-and-groups/authenticating-with-saml.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

* Update docs/people-and-groups/authenticating-with-saml.md

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-08-15 16:41:04 +02:00
Noah Moss
1a61eb257c Semantic search (#61036)
* copy over relevant code from semantic search service

* copy docker compose, add defenterprise integration

* WIP getting the integration working

* fix up reindex! call

* fix whitespace

* kick ci

* remove ^:const to try to fix compilation errorin tests

* Adds mi/can-read? checks to search results (#61060)

* Add a couple of helpful comments for manual testing

* Add ability to change db-url at the repl

* Add can-read? checks for search results

* Semantic search engine should not be used if the db is not setup

* sort kondo modules

* fix up syntax in metabase.search.impl and whitespace

* remove a blank line

* fix remaining clj-kondo issues

* Add semantic search test workflow (#61065)

* Add new workflow for semantic search

* Add a quick example test to see if things work

* Have the new tests only run if db-url is defined

* Sparks of joy

* Add a delay to appease the kondo gods

Not sure this rule should apply to once-fixture, but for now lets fix
it.

* Semantic search filtering, basic querying tests, connection pooling, etc (#61098)

* fix results postprocessing, add verified field to search index

* scaffold a basic query test

* index filtering tests

* quicky and dirty implementation of the requested ui changes

* Add basic connection pooling + tests

* Fix test indentation

* add test for verified content, refactor tests a bit

* address comments

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* Add nm-semantic-search-in-metabase to uberjar workflow and remove metabot-v3-main (#61142)

In preparation to deploy the nm-semantic-search-in-metabase branch to stats.

* Use EE feature for semantic search defenterprises (#61139)

* switch defenterprise features from :none to :semantic-search

* update tests

* Register semantic-search premium feature

* FE - default to app db search, enable semantic in command palette and search page, add disable semantic search on search page

* Test collection based permission checks apply to search results (#61152)

* Fix t2-instance derivation from search docs

Lookup in database as the search document model is lossy

* Test collection based permission checks apply to search results

* Swappable embedding models + semantic search kill switch (#61176)

* first stab at swappable embedding models + setting to disable semantic search globally

* fixups

* fixups

* fix up error in tests

* add semantic-search to stats ping to quiet test

* quiet another test

* fix whitespace

* fix kondo warnings

* fix up and simplify embedding tests

* fix core init test

* fix more tests

* tweak setting defaults + comments, remove debugging code

* fix compilation

* change oss version of supported? to return false instead of throwing

* fix lint issues

* Batched index updates for semantic search (#61117)

* kick ci

* Add comment to trigger reindex job

* Fix docstring typo

* Batch index updates for semantic search

* Wrap {create,drop}-index-table! in mt/as-admin in with-temp-index-table!

* Move binding for *vector-dimensions* into with-mock-embeddings

* Create metabase-enterprise.semantic-search.test-util and move once-fixture there

* Move other test helpes and macros into the semantic.test-util ns

* Factor out with-indexable-documents! from with-index!

* Move binding of search.ingestion/*force-sync* into with-temp-index-table!

Questionable, but realistically can't see tests wanting to use a temp index table without forcing sync reindex.

* Add table-exists-in-db?! to semantic.test-util

* Add some basic tests for funcs in the semantic.index namespace

* Add tests for batched index updates

* Disable flaky tests

* Fix up issues post-rebase

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>

* Fix accidental blocking search index init (#61200)

* kick ci

* Fix accidental eager index initialisation

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>

* Batched requests to OpenAI for fetching vector embeddings (#61217)

* Batch calls to openai according to token counts

* refactor

* mock the new batch embedding function

* mock both batched and unbatched embedding functions in tests

* a little code consolidation

* address comments

* Init db connection in reindex! if needed

* Add more DB existance checks for safety

* fix fe tests

* Lower batch size, improve logging, and make it configurable via env var (#61274)

* Lower batch size, improve logging, and make it configurable via env var

* fix whitespace

* Remove transaction from batched semantic search index updates (#61229)

* Drop uneccessary ! from table-exists-in-db?!

* Don't wrap batched index updates in a transaction

https://github.com/metabase/metabase/pull/61117#discussion_r2214828302

* Filter indexed entities from semantic search index

* Create HNSW index on semantic search embeddings column (#61238)

* Create HNSW index on semantic search embeddings column

* Add test for HNSW index creation

* Ensure identifiers are quoted when formatting honey sql in semantic search index

The nano-ids used in temp table names when testing (and various other places) might contain uppercase chars or hyphens which need to be quoted.

* Fix batch-delete! log message

* alter create-index-table! to not wipe the index if it already exists, and use the upsert API during index population (stop-gap changes to try to get the staging instance working)

* fix document filtering

* Only create HNSW embeddings index :if-not-exists (#61305)

Since init! no longer wipes the index table if it already exists, we also need to only create the embeddings HNSW
index if it does not exist.

* Better batching for semantic search (#61299)

* streaming embedding results to the index-updating code

* rework

* suppress kondo

* Parameterization refactor (#61328)

Adds the `index` and `embedding-model` parameters to functions in `index` and `embedding` respectively. This allows a degree more flexibility and less coupling to global variables which restrict how indexing functions can be used. 

The goal is this PR supports changes regarding active/pending and the embedding model being something you can play with at runtime.

* Add embedding-model parameter

* Restore previous top-level transaction behaviour on init/reindex

* Reduced redundancy

* Embedding test fixes

* Fixup comments

* Fix rebase goofs

* Fix tests again

* Joy

* Add `index` parameter, composed of table-name and embedding model

* Keep index name in the index structure

* English is a hard language

* Remove `:redef` we no longer want

* Another merge goof fix

* Fix bug in associating batched embeddings with original documents (#61347)

* Fix bug in associating batched embeddings with original documents

* tweak

* add log

* Quick follow-up optimization to prior PR: don't iterate over all of filtered-documents in each batch

* [Metabot] Hybrid search w/ RRF (#61353)

* rrf based hybrid search implemented

* keyword results weighted more heavily by name, corrected some issues with the rrf calc

* fix final result ranking

* move tsvector-related util functions into search.util and expose in the search interface to fix kondo errors

* Taking a stab at fixing SQL injection risks following existing postgres tsvector querying pattern

* Move postgres tsvector util tests

* gracefully handle nil names

* switch back to raw embedding literals but validate their contents

* add back perm checks (whoops)

* add back str/replace for ts-search-expr, bump up cosine distance cutoff

* tweak cutoff again, fix create index test

* remove str/replace usage bc it seems unneeded

* fix rrf calc

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>

* Remove indexed-entities from the semantic search model-set and documents reducible (#61304)

* Remove indexed-entities from the semantic search model-set

* Add comment about filter-read-permitted and indexed-entity docs

* Add prometheus metrics for semantic search backend (#61309)

* Add :metabase-search/semantic-index-size prometheus metric

And update it on upsert-index! / delete-from-index!

This metric mirrors the corresponding :metabase-search/appdb-index-size

* Add :metabase-search/semantic-embedding-tokens prometheus metric

* Make log levels / messages more consistent

* Remove vestigial populate! reference

* Record actual token usage as reported by OpenAI API response

* BOT-255 Index metadata system (#61379)

* Add index-metadata system

Adds the necessary indirection to support more advanced index table
management.

- Allows multiple indexes to exist
- Indexes are tracked by a new index_metadata table
- A single active pointer determines which index to use for the current
search engine backend
- It is assumed table == logical index and there is no other
partitioning, hence the unique constraint
- Some small simplifications to index.clj (drop index-name, assume names
are prefixed with the table name)
- The top level orchestration code happens in a new pgvector-api
namespace to avoid bloating the enterprise hooks (which assume a global
environment), and allow the api level to be properly parameterized.

* Kondo

* Appease kondo with require for next.jdbc in comment block

---------

Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>

* Enable fts on native query contents in the semantic search backend (#61576)

* Enable fts on native query contents in the semantic search backend

Update the semantic search backend to handle fts of native query contents in exactly the same way as the appdb
backend, namely: all keyword search content gets indexed into two separate columns, one with and one without native
query contents. At runtime, we decide which column to query against based on the user's search setting.

For now, this only modifies the keyword search side of the hybrid search result. The semantic search on the vector
embeddings still does not include native query contents, but any keyword matches can still get blended into the result
set by the RRF ranking.

* Ensure index names do not exceed postgres max of 63 characters

* Allow to toggle NativeQuery independent of DisableSemanticSearch in SearchSidebar.tsx

* Cleanup whitespace

* Add native-query-test

* Add :native_query to semnatic.tu/mock-documents

* Add upsert-index!-tsvectors-test

* Remove unecessary :raw wrapper from column names

* Remove unused =? alias

* [Semantic Search] Embedding generation support for OpenAI compatible APIs (#61641)

* make open base url configurable, add arctic-embed support, sanitize index table name for models with slashes + commas + periods

* make table names slightly shorter

* Update enterprise/backend/src/metabase_enterprise/llm/settings.clj

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* Update enterprise/backend/src/metabase_enterprise/semantic_search/index.clj

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* Update enterprise/backend/src/metabase_enterprise/semantic_search/index.clj

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* split off provider name to make index shorter

* Fix tests failing due to removing text-embedding-3-large model

* Abbreviate model names to ensure we do not exceed postgres identifier name limit

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* Ensure that semantic search entrypoints are safe to call without init! (#61438)

* Ensure that semantic search entrypoints are safe to call without init!

* Move more helpers into semantic.test-util namespace

* Add tests for calling semantic search entrypoints prior to calling init!

* Adjust fix and tests to work better with new index-metadata apis

And also log a warning and return nil if anyone calls into update-index! or delete-from-index! prior to calling init!

* set default for ee-openai-api-base-url setting

* BOT-258 semantic indexed entities (#61527)

* kick ci

* Semantic search filtering, basic querying tests, connection pooling, etc (#61098)

* fix results postprocessing, add verified field to search index

* scaffold a basic query test

* index filtering tests

* quicky and dirty implementation of the requested ui changes

* Add basic connection pooling + tests

* Fix test indentation

* add test for verified content, refactor tests a bit

* address comments

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* FE - default to app db search, enable semantic in command palette and search page, add disable semantic search on search page

* Init permission support for indexed entities

* fix kondo

* Fix rebase errors

* Fix rebase errors

* pr feedback

* unit test index entity perm filter

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* BOT-259 Semantic search filter parity (#61396)

* kick ci

* Semantic search filtering, basic querying tests, connection pooling, etc (#61098)

* fix results postprocessing, add verified field to search index

* scaffold a basic query test

* index filtering tests

* quicky and dirty implementation of the requested ui changes

* Add basic connection pooling + tests

* Fix test indentation

* add test for verified content, refactor tests a bit

* address comments

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* FE - default to app db search, enable semantic in command palette and search page, add disable semantic search on search page

* Remaining search filter support minus has_temporal_dimensions

* ignore public API warning about metabase.search.filter

* Fix collection filter impl

* fix kondo

* [no ci] remove comments

* More efficient querying

* Fix rebase errors

* fix merge

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* try something else

* Remove semantic HNSW index breaking where clause (#61765)

* Adjust semantic search query to favor HNSW index over seq scans (#61768)

* Adjust semantic search query to favor HNSW index over seq scans

* remove limit and SET random_page_cost

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* [SEMANTIC] base64 embeddings and better logging (#61809)

* Improved logging; base64 embedding

* trim double

* Use parse-double over parseDouble

* fix search.engine/init! return  (#61825)

* fix: return model frequencies from search.engine/init!

* fix: document return type of init!, like per delete! and update!

* fix: calc for batches

* semantic search instrumentation (#61790)

* intrument semantic search

* test for analytics

* typo

* fix: id is numeric

* move test next to metrics one

* Support switching between :semantic and :appdb engines (#61826)

* add test

* lift util

* feat: add full api test

* fix: appdb available when search-engine is semantic

* Fallback to appdb search if semantic search doesn't return enough results (#61815)

* Fallback to appdb or in-place search if not enough results are returned from semantic search

* Dedupe combined results

* Bump up hybrid search query limit + make it configurable

* tweak setting doc, fix reflection warning in test code

* clean up tests

* move fallback implementation into the EE namespace, add a new setting for min results threshold

* fix lint issues

* ensure tests set semantic-search feature

* Do not realise document reducibles (#61860)

* wip

* batched streaming upsert-index!

* fix: actually dedupe searchable_text

* Revert "try something else"

This reverts commit eec29881c5.

* can still inner seq

* push indexed-entities last

* fix: semsearch delete

* lift delete-from-index-batch-sql

* test

* dedupe test

* style

* comment

* indexed entities last in search

* Semantic search test fixes (#61884)

* Fix api-engine-switching-test

* Test - switch test fixture to :each to see if it removes a race condition

* Revert "Test - switch test fixture to :each to see if it removes a race condition"

This reverts commit 33386c602b.

* another test - ensure init-delay is derefed before getting datasource

* remove compose-fixtures

* Revert "remove compose-fixtures"

This reverts commit 16c882a599.

* another test

* test

* add back some of core-test

* comment out all code but leave in ns

* add back fixtures

* add back one test

* replace with stub test

* remove compose-fixtures

* fix tests with a try/finally in db_test.clj

* oops, add back :once

* also revert back fixture order

* more cleanup

* use with-index! in appdb-available-with-semantic-test rather than trying to generate real embeddings

* Fix db test

* Only fetch embeddings when needed (#61918)

* chore: use appropriate builder-fn instead of unqualify-keys

* feat: cache on already seen embeddings

* add test

* distinct-on content

* better logging

* reuse test impl

* note

* repl utils

* we have if-not-exists semantics, so no point in not invoking it on init.

We need to invoke it else the new index won't get picked up.
This will change anyway once we have proper migrations with #BOT-278

* fix tests

* Incorporate metadata into semantic search result ranking (#61906)

* Move common code into search.scoring and add search.engine/scorers for backend-specific scorers

* Refactor to remove search.engine/scorers

* Add new index columns required by scoring expressions

* Add metadata score to semantic search backend

* Give up on reusing scorer expressions between appdb and semantic search

* Add :all-scores stats to semantic search query results

* Fix failing pgvector query test

* Adjust rrf weight to fix failing query tests

* Add premium scorers for verified and official_collection

* Get rid of single-use test helper dog-training-native-query-json

* Add scoring tests

* Fix for permissions issue in test

* Remove extra whitespace in bindings

* [Semantic Search] Add AI Service as an embeddings providers (#61850)

* wip

* clean up and better abbrev logic

* fix provider references

* remove magic int

* do not munge model name if not needed

* add / fix tests

* make mock index have a shorter name

* shorten nanoid

* math was not mathing

* fix kondo error

* death by lints

* [BOT-260] sem search consistency, gating and indexer loops (#61602)

* Add document gating

Adds a document gating mechanism and async indexing job.

- Allows indexing to recover if it encounters a transient error.
- Avoids data loss during indexing due to process death
- Provides an ordering which is more closely related to logical record
validity times rather than write time into the index.

* Fix some test docstrings

* Fix some loop tests

* Schedule indexer only if the instance has the :semantic-search feature

* Avoid redundant replay of the very last gate entry when the quartz job fires

* Add a quick candidate-filter byte equality test

* Refine loop interrupt/error test (get rid of old gunk)

* Use shared `tu/spy` instead of copy-pasta

* Replace candidate filter with simple set of last seen

Use TEXT for hash for eq convenience.

* Avoid future foot guns with a (letfn) refactor of indexing-step

Avoids issues that might later be introduced by the 'accidental' closure of (actual) variables that might later be changed during this side-effecting operation. In particular the move-to-next-watermark local function.

^:once was suggested but a hoisted letfn that can only close over args (which keeps the mutable indexing-state at the forefront of ones mind) keeps us honest.

* Check if engine enabled and supported during indexer task

Previously was only checking if the db was configured.

* Be more careful about Instant and timestamp representation.

Preferred is sql.Timestamp for now due to the default setup of postgres / JDBC.

* Fix up some asserts that still reflected byte hashes

* Add a quick e2e index everything test.

Find horrific pagination bug. Fix that.

We did not account for having enough ties that our buffer was full. This was likely in tests even with the high precision of the pg clock because:
- we coerced stuff to Instant which lost precision
- we generally did not account for tie breaks in pagination (bad form)

So we are paginating properly using the secondary id as a tie break. Within the confidence time only, as otherwise this would be dangerous (it is right to stall if you see too much until the lag time has elapsed). This stops stalls if lots of documents share a buffer.

Will follow up with another test that forces time collisions to assert this tie break behaviour independently.

* Test fixes

* Joy

* Add indexer docstring

* Thread pool for semantic search index batch updates (#61947)

* parallel batch processing for index updates

* tweak setting docs

* switch back to transducing version

* Revert "switch back to transducing version"

This reverts commit 4a99c3c6869e28f56d794d8057f006700cfc8432.

* fix setting name

* revamp approach - use a ThreadPoolExecutor with a custom rejection policy

* fix tests

* add concurrency test

* Fix up tests by adding a serial mode that disables thread pool usage

* Fix final test -- ensure we spy on & call only on the 4-arity version of upsert-documents

* Switch to custom retry handler

* Still wrap executor in a delay for lazy initialization

* Fix upt ests

* Fix final tests

* [Semantic Search] Remove disable semantic search filter (#61973)

* remove disable semantic search filter

* fix failing test

* Collapse indexed-entity ids in semantic search results (#61952)

* Collapse indexed-entity ids in semantic search results

The indexed-entity results have composite ids like model-index-id:model-pk. We need to extract the model-pk and attach
that as the :id on the results. Otherwise, the links generated by the frontend are invalid like
/model/12345-blah/1234:62681

* Add indexed-entity-id->model-{index-id,pk} to search.util

And use indexed-entity-id->model-index-id in filter-can-read-indexed-entity

* Fix test failure due to overly long index name

* Use dimensions param in OpenAI api calls (#62010)

* Use dimensions param in OpenAI api calls

* Use starts-with?

* Improved fallback logic & prometheus metrics for semantic search (#62024)

* Add prometheus metrics to track appdb search fallback logic

* undo broken function call

* Update logic to not fallback if no results were filtered out

* fix more tests

* Tweaks

* Try again to fix tests

* Address comments

* update docstring

* Fix non-batched get-embedding for openai and ai-service providers (#62050)

* Fix non-batched get-embedding for openai and ai-service providers

We were passing a single text string rather than a seq of texts, resulting in an error when we tried to get the token
count.

    ERROR semantic-search.embedding :: Failed to generate OpenAI embedding for text of length: 8
    java.lang.ClassCastException: class java.lang.Character cannot be cast to class java.lang.String

* Add test for extract-base64-response-embeddings

* Add test-get-embedding

* Semantic search indexing status endpoint (#62082)

* add search-items-count function

* Add endpoint for reporting indexed count + total estimate

* try to fix test

* Temp commit to debug CI failure

* Add honeysql classpath to debug output

* Revert "Add honeysql classpath to debug output"

This reverts commit 4395f420f7.

* Revert "Temp commit to debug CI failure"

This reverts commit 36fbf047d6.

* Fix honeysql create-index :raw forms (#62144)

Something changed with honeysql 2.7.1340 and :raw forms in the tail of a create-index now get unwrapped and need to be
nested in another vector.

For example, in earliers versions

    (sql/format
     (sql.helpers/create-index
      [:foo-idx :if-not-exists]
      [:foo-table :using-hnsw [:raw "embedding vector_cosine_ops"]]))

produced an sql string like

   CREATE INDEX IF NOT EXISTS foo_idx ON foo_table USING HNSW (embedding vector_cosine_ops)

but on 2.7.1340 you get

   CREATE INDEX IF NOT EXISTS foo_idx ON foo_table USING HNSW (raw EMBEDDING VECTOR_COSINE_OPS)

Unclear if this is a honeysql bug or we're doing something unsupported, but fix it with a workaround for now by
wrapping the :raw in an extra vector like [[:raw "foo"]], in order to get CI green.

* Move reindex/index to gate the documents (#62101)

* switch init/reindex to gated updates

* nil stats

* sync index in test

* non deterministic search result

* Semantic search migration (#62043)

* Migration

* Rebase follow-up

* [Semantic Search] Add admin setting to enable semantic search (#61622)

* add basic setting switch for enabling semantic search, upsell component, logic for falling back to default search in settings, and basic e2e test

* fix type issue

* Fix serialization baseline test

* finished

* small fixes

* do not animate progress bar when progress === 100

* impl PR feedback

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>

* revert e2e diffs (#62173)

* Re-order semantic search index columns to test schema migration (#62172)

* Re-order semantic search index columns

Mostly to test schema migration, but this also makes the table contents easier to scan in PgAdmin / psql imho by
putting ids next to ids, timestamps next to timestamps, etc.

* migration 1

* cleanup

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* fix reflection warnings in tests (#62151)

* fix reflection warnings in test

* just use bound-fn*

---------

Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: Mihael Konjević <konjevic@gmail.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-08-15 15:17:51 +01:00
Jeff Bruemmer
384288806b fix links (#62193) 2025-08-15 08:59:59 -04:00
Timofey Kachalov
f7e06aac9d refactor(sdk): Add type-checking for SDK Bundle exports (#62202) 2025-08-15 15:56:29 +04:00
Timofey Kachalov
16232d530b refactor(sdk): Rename component-level MetabaseProvider to ComponentProvider (#62175) 2025-08-15 14:48:57 +04:00
Maz Ameli
3035ab0fb4 Add company, currency, and receipt icons (#62196)
* add company currency and receipt icons

* add new icons to IconName and Icons obj

* Remove duplicate 'currency' icon declaration

---------

Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>
2025-08-15 10:07:33 +03:00
Cam Saul
fe43845ee2 API Keys module cleanup (#62116)
* API Keys module cleanup

* Test fixes 🔧

* Fix Kondo errors

* Unmark these tests as `^:parallel` for now because I do not have the energy for dealing with MySQL

* I don't have time to fight MySQL

* Test fix 🔧
2025-08-14 16:08:58 -07:00
Cam Saul
bf85745bbb add-alias-info => Lib and misc bug fixes (#60231)
* add-alias-info => MLv2

* Restore deleted test

* WIP

* WIP [ci skip]

* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

* Restore accidentally-deleted `native-query-snippet` fn

* Fix accidental edits

* Make `visible-columns` stage-only

* More minor caching improvements

* cljfmt & kondo

* More minor caching improvements

* Fix #35252

* cljfmt & kondo

* Another round of test fixes and lint fixes 🔧

* Test fixes 🔧

* Test fix 🔧

* PR feedback

* Test & Lint fixes 🔧

* Test fix 🔧

* Kondo/cljfmt

* Appease Eastwood

* cljfmt run against everything

* Revert changes to deps.edn

* Did I fixx??

* cljfmt/kondo

* Fix Oracle test failure

* Fix nested fields (MongoDB)

* cljfmt

* Nested column name fixes

* Fix Mongo for reals

* Revert BigQuery breaking stuff

* Fix equality for binned columns

* Test fix 🔧

* Remove dead :ident keys

* Fix is_verified field refs

* Fix is_verified field refs

* Some sanity checking

* Fix typo

* Fixx

* Ok, don't be super fussy about bad code using :type/Text as a parameter

* Fix validation of legacy expression refs inside stage parameters

* Fix aggregation names not being deduplicated

* :as-alias

* replace saigon with bangkok

* use ho chi minh as equivalent replacement

* use bangkok for sqlserver

* update us/pacific to america/los_angeles

* Test debugging

* Fix debugging

* Test fixes 🔧

* Fix busted hardcoded e2e query and add disallowed-keys helper

* cljfmt

* Update deprecation notices 56 => 57

* Kick the can down the road

* Fix another busted test 🔧

* Improve field resolution even more 😒

* cljfmt

* Fix sandboxing with bad field refs.

* Ok I give up I guess I just accidentally fixed sandboxing with custom columns

* cljfmt

* I fixed it

* Appease the linter

* Test fixes 🔧

* OOOPS

* Fix test

* prettier

---------

Co-authored-by: Riley Thompson <rileythompson99@gmail.com>
2025-08-14 13:50:12 -07:00
Sloan Sparger
250f5453fb [Metabot] User feedback (#62048)
* UI for metabot feedback

* copy and spacing tweaks (#62049)

* switch to download based approach

* test

---------

Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-14 14:18:58 -05:00
Marcos
3334d7ad75 Add secondary role explanation for snowflake impersonation to docs (#62178)
* add secondary role explanation for snowflake impersonation

* fix with suggestions

* fix impersonation docs with suggestions
2025-08-14 16:02:50 -03:00
Phoomparin Mano
b9ccb9c883 Fix embed flow persistence by reducing scope of persisted items (#62177) 2025-08-14 18:27:30 +00:00
Aleksandr Lesnenko
5144a0c868 delete unused snapshots (#62180) 2025-08-14 18:09:35 +00:00
Timofey Kachalov
940be59861 feat(sdk): Add etag-based caching for the Hosted Embedding SDK bundle (#61283) 2025-08-14 20:28:13 +04:00
Jeff Bruemmer
63a634de52 update generated docs (#62138) 2025-08-14 12:27:01 -04:00
Jeff Bruemmer
2c62a6763b update env var doc gen script (#62068) 2025-08-14 09:58:36 -04:00
Chris Truter
da57ec87d0 Improve input_type assignments in /actions-v2/execute-form (#62097) 2025-08-14 15:55:23 +02:00
Nicola Mometto
751254246a populate field-values during get-field-values tool if not present (#62020)
* BOT-285: ensure field statistics are populated

* chore: test

* extend field-values treatment to dummy tools

* no more need for ensure-field-values!

* chore: use get-or-create

* style

* remove unused require

* fix

* nil safety

* extract
2025-08-14 12:42:24 +00:00
Nicolò Pretto
13835ef100 refactor(simple-embed): drop MetabaseEmbed and pass to the iframe the component name (#61967)
* wip

* wip2

* fix and wip

* wip

* fiiiix

* use the component name inside the iframe

* fix tests

* use custom elements attributes in the preview

* clean up

* clean up

* merge question with new question in the iframe code

* remove SdkIframeEmbedTagSettings

* styles -> S

* restore defaultTheme functionality that was merged on master

* fix test, now the iframe is not reset and we don't need to select the table again
2025-08-14 14:21:27 +02:00
Timofey Kachalov
f3ef92f7ca fix(sdk): Scope Mantine styles to SDK (#62103) 2025-08-14 15:39:12 +04:00
Ngoc Khuat
49389aea80 Send dashboard subscription with attachments only (#61784) 2025-08-14 05:25:00 +00:00
Timofey Kachalov
240160f605 Add an eslint rule that warns for external references inside the Embedding SDK NPM package code (#61417) 2025-08-14 02:06:15 +04:00
Jeff Bruemmer
7aeb66ccce docs - add JS to table and list of links (#62135) 2025-08-13 17:42:06 -04:00
Jeff Bruemmer
3721cd73ba data sandboxing -> row and column security (#62132) 2025-08-13 20:24:54 +00:00
Timofey Kachalov
840c232c5f refactor(sdk): Adjust SDK CLI to work with Hosted Bundle (#61406) 2025-08-14 00:21:00 +04:00
Alex Yarosh
f277e1f0c3 docs: JSON unfolding (#62129)
* Update json-unfolding.md

* Apply suggestions from code review
2025-08-13 16:19:15 -04:00
Alex Yarosh
d0ab801141 Update translations.md (#62127) 2025-08-13 16:18:19 -04:00
Edward Paget
b44c4d3c8e fix: handle special cased migration (#62110) 2025-08-13 14:31:32 -05:00
Timofey Kachalov
1b3446fe16 feat(sdk): SDK Backward Compatibility support via Hosted Bundle (#60554) 2025-08-13 23:19:43 +04:00
Ngoc Khuat
7948d6df58 Update channel test permission model (#62015) 2025-08-13 18:28:25 +00:00
Phoomparin Mano
5062575687 Default is-save-enabled to false on Embed JS and embed flow (#62094) 2025-08-14 01:02:30 +07:00
Riley Thompson
821510a5c4 Replace Asia/Saigon with Asia/Ho_Chi_Minh (#62105)
* replace saigon with bangkok

* use ho chi minh as equivalent replacement

* use bangkok for sqlserver

* update us/pacific to america/los_angeles
2025-08-13 17:22:01 +00:00
Nicolò Maria Mezzopera
fe478e275a Fix: Don't containerize on doc-only change and explicit artifact name (#62091)
* Fix containerize job to only run when uberjar succeeds

The containerize job now properly checks that the uberjar job succeeded
before attempting to containerize. This prevents containerization from
being triggered on documentation-only changes where the uberjar job
is skipped.

Added: needs.uberjar.result == 'success' condition

* Set default output name for fetched artifacts to "metabase.jar"
2025-08-13 12:01:00 +02:00
Phoomparin Mano
2e884c4ce6 CodeMirror styling in custom expression fails in Embed JS as the CSP nonce is missing (#61959)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-08-13 16:03:53 +07:00
Phoomparin Mano
57a07bdb4c Allow downloads should show even when drills is off (#61969) 2025-08-13 16:03:26 +07:00
Chris Truter
9586169df9 Move actions to the right timezone (#62073) 2025-08-13 10:27:05 +02:00
Chris Truter
3c955df9e9 Prevent configuration of disabled database-local settings (#62018)
- Add :database-feature to SettingDefinition schema to specify required driver features
- Update validate-settable-for-db\! to check database driver feature support
- Add validation to ensure :database-feature is only used with database-local settings
- Fix validation logic to throw when driver does NOT support required feature
- Add comprehensive tests for database feature validation
- Update defsetting macro documentation with :database-feature option

This allows database-local settings like database-enable-actions and
database-enable-table-editing to require specific driver features
(e.g. :actions, :actions/data-editing) before they can be enabled.
2025-08-13 11:24:55 +03:00
Jeff Bruemmer
a36b1553ee docs - images and edits (#62064) 2025-08-12 21:09:19 +00:00
Alex Yarosh
0cfee32754 docs: DB routing new DBs (#62081)
* db routing update

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-12 20:47:58 +00:00
Nicolò Maria Mezzopera
22507a963a Fix CI workflows nesting and artifact download (#61919)
* Fix uberjar containerization and implement flexible fetch-artifact action

Resolves issues where uberjars weren't getting containerized when adding the
build-docker-uberjar label to PRs or when manually dispatching workflows.

Major changes:
- Create containerize-uberjar.yml workflow for centralized containerization logic
- Create uberjar-containerize-labeled.yml for PR label-triggered builds
- Extract containerization from uberjar.yml to avoid 3-level workflow nesting
- Add containerization to run-tests.yml for master branch pushes
- Implement flexible extract-path parameter in fetch-artifact action
- Replace preserve-structure boolean with string-based path specification
- Update all workflows to use appropriate extract-path values

The fetch-artifact action now supports:
- extract-path: "." (current directory with custom output-name)
- extract-path: "target/uberjar" (maintains original structure)
- extract-path: "custom/path" (any directory structure)

Containerization now works in all scenarios:
- Master push/merge → run-tests.yml → containerize-uberjar.yml
- PR with build-docker-uberjar label → uberjar-containerize-labeled.yml
- Manual dispatch → containerize-uberjar.yml

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix fetch-artifact action to avoid moving file to itself

Prevents "mv: source and destination are the same file" error when
extract-path matches the existing jar location (e.g. target/uberjar).

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor fetch-artifact action to be more DRY

- Consolidate JAR path logic into a single function
- Export JAR_PATH to GITHUB_ENV for use in subsequent steps
- Remove repetitive path determination code
- Reduce lines of code from 113 to 108

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add Docker Hub link and pull command to PR comment

Enhanced the PR comment after containerization to include:
- Docker tag name (branch with slashes replaced by dashes)
- Direct link to Docker Hub repository tag page
- Ready-to-use docker pull command

This makes it easier for developers to find and pull the built image.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add get-docker-info action and update workflows to utilize it for Docker image retrieval

* Refactor post-comment job to streamline Docker info retrieval and PR comment posting in containerize workflow

* Remove unnecessary blank lines in fetch-artifact and get-docker-info actions for cleaner code

* Update containerize job conditions to trigger on pull request labels for Docker builds

* revert using fetch-artifact for release artifacts
2025-08-12 10:19:08 -10:00
Alex Yarosh
e9ab99a8f1 docs: add saml to embed JS (#62074)
* Update embedded-analytics-js.md

* Update docs/embedding/embedded-analytics-js.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-12 19:22:24 +00:00
github-automation-metabase
a12945b800 Bump org.apache.commons/commons-compress from 1.27.1 to 1.28.0 (#61777)
Inspect dependency changes here:
2025-08-12 16:23:06 +00:00
Riley Thompson
8c049ad6fe Only test normal drivers in nested-array-query-test (#62045)
* only test normal drivers

* run tier 3 if changes in src/metabase/driver
2025-08-12 15:41:27 +00:00
github-automation-metabase
d50129f95c Bump com.github.seancorfield/honeysql from 2.7.1310 to 2.7.1340 (#61772)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1340/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 15:01:26 +00:00
Jeff Bruemmer
99c391fb9f field filter intro (#62059) 2025-08-12 08:06:53 -05:00
Anderson
47f6a9ac46 chore: add andsalves as a team member (#62041) 2025-08-12 10:04:30 -03:00
github-automation-metabase
0f0d91d824 Bump com.microsoft.sqlserver/mssql-jdbc from 12.10.0.jre11 to 13.1.1.jre11-preview (#61486)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 23:00:29 -07:00
github-automation-metabase
dd41094d50 Bump org.eclipse.jetty/jetty-server from 12.0.22 to 12.0.24 (#62001)
* Bump org.eclipse.jetty/jetty-server from 12.0.22 to 12.0.24

Inspect dependency changes here:

* Consolidate Jetty deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 22:59:35 -07:00
github-automation-metabase
676c64a2aa Bump clj-kondo/clj-kondo from 2025.04.07 to 2025.07.28 (#61771)
* Bump clj-kondo/clj-kondo from 2025.04.07 to 2025.07.28

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.07.28/CHANGELOG.md

* Fix some of the Kondo warnings -- seems like there are false positives

* Fix Kondo warnings

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 22:21:13 -07:00
github-automation-metabase
709df6c4ac Bump com.facebook.presto/presto-jdbc from 0.292 to 0.293 (#59521)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:14:27 -07:00
github-automation-metabase
f2096262fa Bump org.graalvm.polyglot/polyglot from 24.2.1 to 24.2.2 (#61248)
* Bump org.graalvm.polyglot/polyglot from 24.2.1 to 24.2.2

Inspect dependency changes here: https://github.com/oracle/graal/compare/graal-24.2.1...graal-24.2.2

* Consolidate GraalVM deps bumps

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 20:14:03 -07:00
github-automation-metabase
73763282b7 Bump org.apache.logging.log4j/log4j-core from 2.24.3 to 2.25.1 (#60904)
* Bump org.apache.logging.log4j/log4j-core from 2.24.3 to 2.25.1

Inspect dependency changes here:

* Merge other Log4j version bumps

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Cam Saul <github@camsaul.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:12:16 -07:00
github-automation-metabase
43f07d3c88 Bump net.clojars.wkok/openai-clojure from 0.22.0 to 0.23.0 (#61776)
Inspect dependency changes here: https://github.com/wkok/openai-clojure/blob/0.23.0/CHANGELOG.md
2025-08-12 02:32:30 +00:00
github-automation-metabase
ecc7d9ba86 Bump io.github.clojure/tools.build from 0.10.9 to 0.10.10 (#61775)
Inspect dependency changes here: https://github.com/clojure/tools.build/blob/v0.10.10/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-12 02:32:22 +00:00
github-automation-metabase
c9205461c1 Bump com.google.cloud/google-cloud-bigquery from 2.51.0 to 2.54.0 (#61778)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.54.0/CHANGELOG.md
2025-08-12 02:32:08 +00:00
github-automation-metabase
65974dc29d Bump clj-http/clj-http from 3.13.0 to 3.13.1 (#60246)
Inspect dependency changes here: https://github.com/dakrone/clj-http/blob/3.13.1/changelog.org

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 02:31:52 +00:00
github-automation-metabase
b452abc839 Bump djblue/portal from 0.59.2 to 0.60.2 (#61997)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.60.2/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 01:52:21 +00:00
github-automation-metabase
debcec5881 Bump io.github.seancorfield/build-uber-log4j2-handler from v2.24.0 to v2.25.1 (#60900)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-08-11 18:19:12 -07:00
github-automation-metabase
2f15322530 Bump io.netty/netty-buffer from 4.2.1.Final to 4.2.3.Final (#61250)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 18:17:56 -07:00
github-automation-metabase
cce80c3f1d Bump diehard/diehard from 0.11.13 to 0.12.0 (#59517)
Inspect dependency changes here: https://github.com/sunng87/diehard/blob/0.12.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:43:56 +00:00
github-automation-metabase
5647025c0c Bump com.github.seancorfield/next.jdbc from 1.3.1002 to 1.3.1048 (#59516)
Inspect dependency changes here: https://github.com/seancorfield/next-jdbc/blob/v1.3.1048/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:41:28 +00:00
github-automation-metabase
ebb0d64993 Bump babashka/fs from 0.5.25 to 0.5.26 (#59146)
Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.26/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:06:08 +00:00
Denis Berezin
96a1ed0b8f UX-west FE bug fixes (#61948)
* UXW-466 enterprise-login-page-logo

* fix dash subscription popover cut off #59888

* Fix collection menu tooltips position #59379
2025-08-12 02:13:18 +03:00
github-automation-metabase
8d6ba8f390 Bump ring/ring-mock from 0.6.1 to 0.6.2 (#62003)
Inspect dependency changes here: https://github.com/ring-clojure/ring-mock/compare/0.6.1...0.6.2
2025-08-11 21:14:08 +00:00
github-automation-metabase
6ee5cbf07a Bump com.nimbusds/nimbus-jose-jwt from 10.4 to 10.4.1 (#62005)
Inspect dependency changes here:
2025-08-11 21:13:05 +00:00
github-automation-metabase
aba008b9b7 Bump org.apache.tika/tika-core from 3.1.0 to 3.2.2 (#61998)
Inspect dependency changes here:
2025-08-11 21:08:59 +00:00
github-automation-metabase
a9a088ef1f Bump com.oracle.database.jdbc/ojdbc17 from 23.8.0.25.04 to 23.9.0.25.07 (#61780)
Inspect dependency changes here:

Co-authored-by: dpsutton <dan@dpsutton.com>
2025-08-11 21:05:45 +00:00
github-automation-metabase
3fc274a4cf Bump com.fasterxml.woodstox/woodstox-core from 7.1.0 to 7.1.1 (#58758)
Inspect dependency changes here: https://github.com/FasterXML/woodstox/compare/woodstox-core-7.1.0...woodstox-core-7.1.1

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:59:30 +00:00
bryan
ba8f1f3ccf mage: Replace blank lines with empty strings + mage ls (#61987) 2025-08-11 20:55:21 +00:00
github-automation-metabase
db122be70b Bump com.amazon.redshift/redshift-jdbc42 from 2.1.0.32 to 2.1.0.34 (#62004)
Inspect dependency changes here: https://github.com/aws/amazon-redshift-jdbc-driver/blob/v2.1.0.34/CHANGELOG.md
2025-08-11 20:42:57 +00:00
github-automation-metabase
9781d9b7cd Bump cider/cider-nrepl from 0.55.7 to 0.57.0 (#60245)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.57.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 13:38:13 -07:00
github-automation-metabase
3feae381dd Bump org.xerial/sqlite-jdbc from 3.49.1.0 to 3.50.3.0 (#61485)
Inspect dependency changes here: https://github.com/xerial/sqlite-jdbc/compare/3.49.1.0...3.50.3.0
2025-08-11 13:31:34 -07:00
github-automation-metabase
9c2156a025 Bump commons-net/commons-net from 3.11.1 to 3.12.0 (#61773)
Inspect dependency changes here:
2025-08-11 13:07:45 -07:00
Riley Thompson
4ac4d34af7 handle nested arrays (#61977) 2025-08-11 15:44:04 -04:00
github-automation-metabase
9a4c0bb7c3 Bump io.netty/netty-common from 4.2.2.Final to 4.2.3.Final (#61251)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-08-11 12:36:37 -07:00
github-automation-metabase
ebd8ecb06c Bump com.github.seancorfield/honeysql from 2.7.1310 to 2.7.1325 (#61481)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1325/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:27:50 -07:00
github-automation-metabase
98a9b04fb1 Bump thheller/shadow-cljs from 3.1.4 to 3.1.8 (#61484)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:26:11 -07:00
github-automation-metabase
19f1e5517a Bump djblue/portal from 0.59.2 to 0.60.1 (#61774)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.60.1/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:25:13 -07:00
Jeff Bruemmer
ee248d5fff fix typos (#62029) 2025-08-11 17:09:12 +00:00
Jacob Joseph
b3d4d009aa Update filters.md (#61983)
we removed the gear icon from filters on dashboard editing, but the docs were still referring to it
2025-08-11 12:02:04 -05:00
Gustavo Saiani
d2f01b00eb Remove promo banner (#62023) 2025-08-11 14:01:01 -03:00
Sloan Sparger
a076cca120 [Metabot] Remove non-streaming metabot code (#61988)
* remove streaming code

* remove comment
2025-08-11 11:57:10 -05:00
Riley Thompson
42e48c71e0 Enable DB routing for Starburst and Presto (#61949)
* enable db routing for starburst

* enable presto routing
2025-08-11 16:23:59 +00:00
Riley Thompson
b3a9f566df Enable athena routing (#61934) 2025-08-11 11:22:39 -04:00
Aleksandr Lesnenko
5ef76f8592 fix visualizer cards don't have dashcard description setting (#62006) 2025-08-11 11:51:21 -03:00
Jeff Bruemmer
fbc7f9668d Update embedded-analytics-js.md (#62012) 2025-08-11 08:17:27 -05:00
Nicola Mometto
4c79e29cca Archive deleted tables (#61592)
* add migration

* add table before update to correctly set deactivated_at

* no need for schema

* archive tables

* tests

* note

* include active to index

* guard against nil changes

* doc

* guard against archival

* note

* prper count

* serdes/test

* extra safety guard

* more accurate logging

* use epocSecond

* more error validation

* change suffix

* add rollback mig

* move migrations to v56

* safer
2025-08-11 14:11:12 +01:00
Thomas Schmidt
0ab4df1655 Support markdown links in Metabot response (#61732) 2025-08-11 06:55:22 +00:00
Phoomparin Mano
4b128f68a9 Update parameters section subtitle for questions in embed flow (#61968) 2025-08-09 21:44:36 +07:00
Lodewijk Wensveen
b0687c26d2 fix(formatting): round compact numbers with Intl; preserve legacy k casing (closes #59454) (#61645)
* test(formatting): add compact rounding edge cases (refs #59454)

* fix(formatting): round compact numbers with Intl; preserve legacy k casing (closes #59454)

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2025-08-09 03:29:46 -04:00
Cam Saul
c6674c0185 [Lib] make visible-columns only work on stages (#61943)
* Make `visible-columns` stage-only

* More minor caching improvements
2025-08-09 00:35:00 +00:00
John Swanson
69b313f83e Format datetimes with user locale (#61680)
Bind the `*formatting-locale*` to the user's locale (falling back to the
system locale).

Also use `i18n/site-locale` instead of `(Locale. (system/site-locale))`,
which Does The Right Thing instead of incorrectly calling the
single-arity version of `Locale.`.

Fixes [UXW-208: Dashboard card download result using date locale from
instance and ignore user
locale](https://linear.app/metabase/issue/UXW-208/dashboard-card-download-result-using-date-locale-from-instance-and)

Fixes [UXW-142: Date formatting has undefined behavior (broken on my machine)](https://linear.app/metabase/issue/UXW-142/date-formatting-has-undefined-behavior-broken-on-my-machine)
2025-08-08 15:41:27 -05:00
Marcos
d76385094e fix examples in timezone docs (#61979) 2025-08-08 14:36:42 -06:00
Denis Berezin
772e56a62e Fix tabs alignment for horizontal tabs with grow (#61895)
* Fix tabs alignment for horizontal tabs with grow

* Review fixes
2025-08-08 23:10:55 +03:00
Oleksandr Yakushev
ab2eb8a1f9 [perf] Fix metabase.util.performance cljc-related issues (#61847)
* [perf] Fix metabase.util.performance cljc-related issues

* [perf] Move faster walk implementation into clj-only namespace
2025-08-08 22:12:39 +03:00
Denis Berezin
d1dd7964c2 fix: update loki after icon change (#61974) 2025-08-08 21:48:06 +03:00
Phoomparin Mano
a1206f3886 Fix pivot tables in static embedding having white cell backgrounds in dark mode (#61939) 2025-08-08 23:16:07 +07:00
Nicolò Pretto
6c24ddee41 test(embed-js): migrate tests to use custom element api (#61965)
* test(embed-js): migrate tests to use custom element api

* use CreateApiKeyResponse

* Update e2e/test/scenarios/embedding/sdk-iframe-embedding/sdk-iframe-embedding.cy.spec.ts

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-08-08 15:51:03 +00:00
Nicolò Pretto
e4afb704fe test(simple-embed): add test for is-saved-enabled, initial-sql-parameters and target-collection for metabase-question (#61830) 2025-08-08 17:14:08 +02:00
Edward Paget
aedb754045 fix: login_attrs -> jwt_attrs for jwt users (#61940)
* fix: login_attrs -> jwt_attrs for jwt users

Enables the new behavior where login attributes persist between jwt
logins for existing jwt-based users.

* fixup! add rollback migration

* fixup! yaml syntax
2025-08-08 08:50:33 -05:00
Alex Yarosh
1991635e2a docs: embedded analytics js (#61955)
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-08 10:57:40 +01:00
Timothy S. Dean
8ad7691ba9 Fix revision history for old cards (#61755)
Cards created before v0.55 lack the `:card_schema` field in their revision history. When loading these old revisions, the system throws "Cannot SELECT a Card without including :card_schema" because the Card model's `after-select` expects this field to always be present.

Existing code adds the legacy default `card_schema` value (20) in `revert-to-revision!`. This PR adds the value (20) to old revisions in `revision.clj`'s `after-select`.

This allows users to view revision history and revert cards that were created before the v0.55 upgrade.
2025-08-07 19:47:40 -06:00
Denis Berezin
30df0133e7 Fix navigate forwards to a Details modal for QB (#61835)
* Fix navigate forwards to a Details modal for QB

* Add e2e tests

* Fix e2e tests
2025-08-08 03:05:35 +03:00
AlessioLaiso
c2cee019de Updates the info and info_filled icons (#61938)
* Updates the info and info_filled icons

* use currentcolor fill instead

* remove fixed width and height and rely on viewBox

* tweak svg paths slightly

* fix y position

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-07 21:06:54 +00:00
Denis Berezin
812d1eceef Fix creator list UI on search page (#61936) 2025-08-07 23:44:16 +03:00
Fraser
d7653edd9d Upgrade fetch mock to v12 (#61857) 2025-08-08 07:28:15 +12:00
Cam Saul
f294fb48b7 Fix QP preprocessing middleware disabling Malli checks (#59324)
* Fix QP preprocessing middleware disabling Malli checks

* Test fix

* Yet another fix

* WIP

* Update preprocess.clj
2025-08-07 12:17:28 -07:00
Aleksandr Lesnenko
19f3c013aa fix annoying tooltip (#61883) 2025-08-07 15:36:39 -03:00
Cam Saul
5edd511b5b Finish untangling the metadata knot (#61767)
* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

* Restore accidentally-deleted `native-query-snippet` fn

* Fix accidental edits

* Fix metadata calculation for joins that contain joins

* All Lib tests are passing

* The PR that fixes everything [WIP] [ci skip]

* Test fix 🔧

* Sort namespaces

* Docstring formatting

* [Lib tests] 100 failures, 33 errors.

* [Lib] 98 failures, 24 errors.

* [Lib] 76 failures, 17 errors.

* [Lib] 49 failures, 4 errors

* [Lib] 46 failures, 2 errors.

* [Lib] 15 failures, 0 errors.

* [Lib] 13 failures, 0 errors.

* All Lib tests passing

* [QP tests] 2 failures, 1 error.

* Revert :encode/cache-key

* Minor caching performance improvements

* Fix nest breakouts/cumulative aggregations

* Add some more stuff to lib.core

* Test fixes/cljfmt/kondo

* Test fix 🔧

* Test fixes and fix some busted tests

* OMG CACHE SO MUCH FASTER!!!!!

* Fix MongoDB

* Fix tests and support mock segments

* Code cleanup and test fixes 🔧

* Test fix 🔧

* Fix set versus map

* PR feedback

* cljfmt

* More PR feedback and tighten up the field resolution code a bit

* Some schema cleanup

* PR feedback

* PR feedback

* Add TODO

* PR feedback

* Remove implementation of join `visible-columns` which is the same as :default

* Remove unused Card visible columns

* Restore the Card implementation of visible columns in THIS PR.
2025-08-07 11:25:42 -07:00
Phoomparin Mano
b46048533c fix(sdk): send CORS headers for error messages when embedding is disabled (#61808) 2025-08-07 23:46:32 +07:00
Cam Saul
d0c0516fa2 Fix busted tests from #53373 (#61899) 2025-08-07 09:06:33 -07:00
Edward Paget
eeb46a43f1 fix: jwt auth doesn't wipe login_attributes (#61927)
Missed this from the big remerge, where login attributes were being
reset to an empty value on jwt login. Also fixed not including the
jwt-group-sync on the initial formik state.
2025-08-07 11:05:02 -05:00
Phoomparin Mano
31412ebe1e Remove Beta badge from Embedded Analytics JS (#61920) 2025-08-07 22:45:47 +07:00
Phoomparin Mano
5b885a5447 Temporarily replace docs and quickstart with "Try it out" (#61926) 2025-08-07 22:45:29 +07:00
Nicolò Pretto
8df9924e76 fix(sdk): targetCollection should take precedence over recent dashboard (#61874) 2025-08-07 17:40:39 +02:00
Cam Saul
f6d3a73bb3 Add mbql-5-query macro (#61898)
* Add `mbql-5-query` macro

* Remove new test
2025-08-07 09:39:55 -06:00
Luiz Arakaki
2581cc50b4 add snowflake csid as Metabase_Metabase (#61866) 2025-08-07 14:14:37 +00:00
Cam Saul
be36bd367d More Lib metadata caching improvements and faster remove-inactive-field-refs (#61897)
* More Lib metadata caching improvements

* Faster remove-inactive-field-refs middleware
2025-08-07 10:06:22 -04:00
Roman Abdulmanov
064110eaa2 feat: endpoint for retrieve embedding token from jwt (#61540)
* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Some small cleanup

- remove unnecessary try/catch clauses

- rename/rework unnecessary public wrapper fn

- make `jwt` required for the endpoint

- only return session token, not any JWT data

* Test fixes

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-08-07 08:39:01 -05:00
Phoomparin Mano
794d472d29 Tag an embed flow test "persists chart embed options" as flaky (#61865) 2025-08-07 20:28:12 +07:00
Tony-metabase
dd9668fd41 Fix Payload Type Typo for Notifications (#61823)
* Fix Payload Type for Notifications

* Update api.html
2025-08-07 14:15:26 +02:00
Nicolò Pretto
5a2c86ad40 chore(sdk): post release 56 workflow changes (#61909)
* chore(sdk): post release 56 workflow changes

* update changelogs
2025-08-07 12:22:14 +02:00
Nicolò Pretto
35a47b2418 change rspack to allow testing custom domains locally easier (#61800) 2025-08-07 09:31:05 +00:00
Jakub Chodorowicz
304d4cda21 add connection string form prefill feature (#61323)
* wip: add connection string form prefill feature;

add tests

* Refactor deprecated export format

* Skip jdbc:prefix when parsing

* Add snowflake support

* Add success message

* Add a feedback message when pasting a connection string

* Refactor field mapping

* wip use regexes to parse connection strings

* make port optional

* Add snowflake

* Add bigquery and clickhouse

* Add Athena support

* Add Amazon Redshift

* Improve clickhouse

* Add failure message

* Add databricks and druid

* Add MySQL

* Add presto

* Adapt snowflake, create objectToString helper

* Add Apache Spark

* Add SQL server

* Add Oracle

* Add Starburst

* Add vertica

* Reset connection string input on change of key

* Map only when select db and protocol matches

* Fix and refactor semicolon params parsing

* Add tracking to database string uri parsing

* create mapping config with placeholders

use placeholders also in tests

* Create engineKeys types

* Create Cypress paste command using synthetic react events

* Use fade transition for feedback animation

* Add e2e tests for connection strings form filling

* fill in display name from connection string

* Add succes failure text test

* Validate form after filling in fields

* Use more standard fallback for paste

* Remove unused regex parsing implementation

* use mass setFields for fomik setting values

* Add test case for clearing existing values, including engine select field

* Fix form fields being overwritten when pasting connection string

* Add onPaste behavior and use simpler paste mechanism in Cypress

* Fix typo

* Extract and use engineKey type and isEngineKey guard

* Make connection string field controlled by formik

Fix submit values

Fix type error

* Remove unneeded prop justify

* Run regex just for currently selected db

* Fix naming of the test file

* Add e2e db connection test

* Fix missing path in th rspack emedding setup

* Explain why connection string is not sent to BE

* use pojo instead of map for db engines config

* Revert to * export to maintain consistency

* fix connection string test

* create a more meaningful type name
2025-08-07 11:25:36 +02:00
Nicolò Pretto
211f371fd5 mock /app/embed.js in test to the dev server to have up to date version (#61598)
in e2e tests
2025-08-07 11:03:46 +02:00
Cam Saul
3a5e8d1471 QP Binning middleware => Lib (#61530)
* QP Binning middleware => Lib

* Test fixes 🔧

* Resolution should propagate fingerprints from card metadata

* Revert accidental snapshots skip
2025-08-06 16:08:45 -07:00
eliotmetabase
93ec57af84 Update Admin Webapp and DashViz to UX West (#61849)
* Update teams and modules

* Update codeowners
2025-08-06 13:48:23 -07:00
lbrdnk
e5b8670c6d Add MB_SYNC_LEAF_FIELDS_LIMIT setting (#61842)
* Add MB_MONGODB_FIELD_LIMIT setting

* Update tests

* Make the setting generic
2025-08-06 22:40:17 +02:00
lbrdnk
88b979623a Check data permissions of result metadata columns (#61740)
* Add result_metadata perms check to qp

* Check result metadata view data on card put

* Throw the exception

* Test

* Add perm check for ad-hoc referencing cards

* Docstrings

* Use seq

* Order of checks

* Apply suggestions from code review

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Simplify into

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-08-06 22:11:10 +02:00
Maz Ameli
458913d017 Add table link to metadata page (#61764)
* add table link to metadata page

* Table

* Add a e2e test

* Add a e2e test

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-08-06 19:21:50 +00:00
John Swanson
d9373fa6d8 Include columns that are not specifically excluded (#61761)
When streaming data for a query, we were only including columns if a)
the viz settings for the column were completely empty, or if b) the viz
settings for the columns included specifically enabling that column.

The problem occurs most clearly for things like native SQL queries.

If you construct a query like

```
SELECT id FROM venues;
```

and then set the column viz settings to *something* non-empty (most easy
way: just hide the `id` column and then show it again), and then save
the card, then change the query to:

```
SELECT id, name FROM venues;
```

then if you download the CSV for this card (even after saving it!)
you'll get a result that only contains `id` and not `name`.

A few tests needed to change here because they were implicitly assuming
the old behavior, but I don't think that's entirely intentional. This
behavior was different than the behavior in the Metabase application
proper, where UI results would show all the columns (in the above
example, they'd immediately show `id` *and* `name`).
2025-08-06 10:20:08 -07:00
Alex Yarosh
34e884c47a docs: jwt docs (#61876)
* jwt edits

* Optimized 2 images, saved 188.8 KB (46.0% smaller)

* why are y'all 'waiting for the status to be reported'

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-06 16:59:46 +00:00
Timofey Kachalov
ee9d5d3832 feat(sdk): Add "SDK incompatibility with instance" banner (#61859) 2025-08-06 19:34:36 +04:00
Riley Thompson
230784e3fb Always set connection role for Redshift (#61869) 2025-08-06 15:16:03 +00:00
Phoomparin Mano
8119bc5c8c feat(sdk): add translation context and aria-label to embedding sdk settings (#61856) 2025-08-06 21:42:42 +07:00
Phoomparin Mano
94570c4c1b Add color reset button to embed flow (#61839) 2025-08-06 21:40:16 +07:00
Timofey Kachalov
aade35f0db refactor(sdk): Minor imports/code adjustments for Hosted Bundle (#61862) 2025-08-06 18:11:28 +04:00
Timofey Kachalov
289e00d760 refactor(sdk): Add styles for custom SDK spinner loader (#61864) 2025-08-06 13:25:25 +00:00
Jakub Chodorowicz
7428fee268 Prg-108-add-gem-icon-and-free-trial-cta-in-interactive-embedding (#61714)
* Create Upsell CTA component

* Replace pro labe with gem in embed upsell

* Create and use UpsellCta in Embedding Upsell

* Rebuiltd the logic for showing links and upsells in embedding modal

* Add UpsellCta tests

* Remove unneeded hook

Fix test and URL rendering for hosted

* Remove unneeded hook useInteractiveEmbeddingCta

* Fix test not running in target build (OSS)

* Fix embedded modal ee end premium cloud tests

* Add missing translation tag

* Use single upsellcta styling
2025-08-06 11:51:04 +02:00
Timofey Kachalov
ffad0df277 refactor(sdk): Prepare e2e code for Hosted Bundle (#61852) 2025-08-06 13:12:08 +04:00
Nicolò Maria Mezzopera
d86d74ba5f PR-envs and ci skip should work together (#61448)
* feat: promote uberjar as the single uberjar creation workflow

* chore: remove useless   reuse-existing-artifacts

* refactor: streamline PR environment workflow by removing wait_for_uberjar input and simplifying uberjar retrieval

* fix: ensure default editions are used if container info retrieval fails

* chore: don't build uberjar outside of run-tests

* fix: update uberjar artifact name to use the current SHA instead of PR head SHA

* fix: update uberjar artifact names to use PR head SHA when available

* fix: update uberjar workflow to simplify input parameters and improve conditional checks

* fix: add concurrency settings to uberjar workflow

* fix: update documentation condition in run-tests workflow

* fix: add default node version

* fix: update conditions for container info retrieval and containerization steps

* fix: update default node version to 22 in uberjar workflow

* Update .github/workflows/uberjar.yml

* Update .github/workflows/uberjar.yml

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-08-06 09:08:29 +00:00
Phoomparin Mano
141cff0fe8 Fix upsell button and auth links in embedding admin settings (#61802) 2025-08-06 15:21:14 +07:00
Timofey Kachalov
cc758a125d refactor(sdk): Convert webpack.embedding-sdk.config to rspack and prepare for Hosted Bundle (#61822) 2025-08-06 10:09:46 +04:00
Cam Saul
4b8d3a1dc8 Flaky test fix for metabase.queries.api.card-test/we-can-get-a-list-of-dashboards-a-card-appears-in (#61619)
* Flaky test fix for metabase.queries.api.card-test/we-can-get-a-list-of-dashboards-a-card-appears-in

* Fix formatting

* cljfmt

* Fix Kondo warning
2025-08-05 16:18:13 -07:00
Case Nelson
c9106f66f1 fix: handle arrays in sparksql (#61690) 2025-08-05 20:58:21 +00:00
Alexander Polyankin
efac2b8f96 [Release blocker] Revert fuzzy matching changes (#61828)
* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Test fixes
2025-08-05 15:55:38 -04:00
Phoomparin Mano
ab30c325db Rename embed-iframe route to embed-js (#61803) 2025-08-06 02:47:46 +07:00
Alexander Polyankin
d11ce55c79 [Release blocker] Revert join custom columns changes (#61827) 2025-08-05 15:19:32 -04:00
Cam Saul
81b5c133b2 Ensure we're actually using a cached metadata provider in tests (somewhat faster Lib/QP tests) (#61702)
* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

* Restore accidentally-deleted `native-query-snippet` fn

* Fix accidental edits

* Test fix 🔧

* Sort namespaces
2025-08-05 18:58:24 +00:00
Phoomparin Mano
673c5b93ed Add enable_embedding_simple to stats.clj (#61807) 2025-08-05 22:01:08 +07:00
Ngoc Khuat
44ec7bc393 [Action v2] Undo / Redo (#61677) 2025-08-05 13:24:50 +00:00
Timofey Kachalov
62b48d1795 refactor(sdk): Prepare src/metabase code for Hosted Bundle (#61801) 2025-08-05 15:25:26 +04:00
Timofey Kachalov
da35b08918 refactor(sdk): Add x-metabase-version header to BE responses (#61799) 2025-08-05 12:35:50 +04:00
Timofey Kachalov
4a56e706eb Migrate webpack.shared.config.js to rspack (#61796) 2025-08-05 12:34:24 +04:00
Phoomparin Mano
d8a03a312f Update copy from new iframe to Embedded Analytics JS in embed flow (#61788) 2025-08-05 01:13:01 +04:00
dpsutton
81f880637b bump hive to 4.1.0 (#61766)
solves:
https://github.com/metabase/metabase/security/code-scanning/305
https://github.com/metabase/metabase/security/code-scanning/304
https://github.com/metabase/metabase/security/code-scanning/301
https://github.com/metabase/metabase/security/code-scanning/302

does not solve:
https://github.com/metabase/metabase/security/code-scanning/490
2025-08-04 15:32:00 -05:00
Oleksandr Yakushev
9a6dd6456f [pivot] Implement optimized clj->js and use it when recalculating pivots on frontend (#61241) 2025-08-04 21:22:22 +03:00
Phoomparin Mano
698be3e9f7 Revert "feat(sdk): hide tables by default in embedding data picker if there a…" (#61792) 2025-08-04 22:17:36 +07:00
Phoomparin Mano
f232f68588 Cleanup stacked card background on embed flow preview (#61782) 2025-08-04 17:29:10 +07:00
Oleksandr Yakushev
75ef744af8 [m.u.performance] Make performance namespace cross-platform (#61159) 2025-08-02 02:05:40 +03:00
Phoomparin Mano
84e35e40da feat(sdk): hide tables by default in embedding data picker if there are more than 2 models (#61022)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-08-01 21:27:33 +00:00
Riley Thompson
d3f48b79a5 Enable DB routing for Databricks (#61630) 2025-08-01 16:56:46 -04:00
Jeff Bruemmer
643695fc44 docs - update expressions list (#61727)
* date funcs

* summary
2025-08-01 15:43:19 -04:00
Jeff Bruemmer
fd29d268d3 docs - update time grouping example (#61752)
* Update time-grouping-parameters.md

* tags

* edit
2025-08-01 15:42:16 -04:00
dpsutton
1a14bd6eba submit init function, not results (#61733)
was blocking on startup
stacktrace below is representative. has a few other things like reveal
but shows that we get into a huge loop over all cards and you end up
waiting for the instance to be ready for a long time
```
	at metabase.lib.card$fn__77290$fn__77297.invoke(card.cljc:71)
	at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303$fn__77304.invoke(card.cljc:141)
	at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$mapv.invokeStatic(core.clj:7050)
	at clojure.core$mapv.invoke(core.clj:7050)
	at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303.invoke(card.cljc:141)
	at metabase.lib.card$fn__77302$fn__77308.invoke(card.cljc:120)
	at metabase.lib.card$fn__77316$card_cols_STAR_77315__77317.invoke(card.cljc:163)
	at metabase.lib.card$fn__77316$fn__77322.invoke(card.cljc:157)
	at metabase.lib.card$fn__77350$card_metadata_columns77349__77351.invoke(card.cljc:223)
	at metabase.lib.card$fn__77350$fn__77354.invoke(card.cljc:217)
	at metabase.lib.card$eval77367$_AMPERSAND_f__77368.invoke(card.cljc:257)
	at metabase.lib.card$eval77367$fn__77372.invoke(card.cljc:242)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.field.resolution$fn__80775$resolve_in_card_returned_columns80774__80776.invoke(resolution.cljc:352)
	at metabase.lib.field.resolution$fn__80775$fn__80784.invoke(resolution.cljc:346)
	at metabase.lib.field.resolution$fn__80788$resolve_in_card_or_stage_metadata80787__80789.invoke(resolution.cljc:365)
	at metabase.lib.field.resolution$fn__80788$fn__80801.invoke(resolution.cljc:358)
	at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invokeStatic(resolution.cljc:410)
	at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invoke(resolution.cljc:390)
	at metabase.lib.field.resolution$fn__80844$resolve_from_previous_stage_or_source80843__80845.invoke(resolution.cljc:440)
	at metabase.lib.field.resolution$fn__80844$fn__80861.invoke(resolution.cljc:434)
	at metabase.lib.field.resolution$fn__80865$resolve_field_ref80864__80867.invoke(resolution.cljc:471)
	at metabase.lib.field.resolution$fn__80865$fn__80878.invoke(resolution.cljc:457)
	at metabase.lib.field$eval80922$_AMPERSAND_f__80923.invoke(field.cljc:62)
	at metabase.lib.field$eval80922$fn__80925.invoke(field.cljc:60)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680$fn__74681.invoke(calculation.cljc:287)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680.invoke(calculation.cljc:286)
	at metabase.lib.metadata.calculation$fn__74679$fn__74684.invoke(calculation.cljc:275)
	at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329$fn__80331.invoke(breakout.cljc:43)
	at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$mapv.invokeStatic(core.clj:7050)
	at clojure.core$mapv.invoke(core.clj:7050)
	at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329.invoke(breakout.cljc:42)
	at metabase.lib.breakout$fn__80328$fn__80334.invoke(breakout.cljc:35)
	at metabase.lib.stage$fn__81784$breakouts_columns81783__81785.invoke(stage.cljc:59)
	at metabase.lib.stage$fn__81784$fn__81787.invoke(stage.cljc:55)
	at metabase.lib.stage$fn__81843$summary_columns81842__81844.invoke(stage.cljc:92)
	at metabase.lib.stage$fn__81843$fn__81846.invoke(stage.cljc:86)
	at metabase.lib.stage$eval81986$_AMPERSAND_f__81988.invoke(stage.cljc:290)
	at metabase.lib.stage$eval81986$fn__81996.invoke(stage.cljc:283)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:513)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:510)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.queries.models.card$dataset_query__GT_dimensions.invokeStatic(card.clj:1270)
	at metabase.queries.models.card$dataset_query__GT_dimensions.invoke(card.clj:1262)
	at metabase.queries.models.card$extract_non_temporal_dimension_ids.invokeStatic(card.clj:1277)
	at metabase.queries.models.card$extract_non_temporal_dimension_ids.invoke(card.clj:1274)
	at metabase.search.ingestion$execute_function_attr.invokeStatic(ingestion.clj:68)
	at metabase.search.ingestion$execute_function_attr.invoke(ingestion.clj:63)
	at metabase.search.ingestion$execute_all_function_attrs$fn__131886.invoke(ingestion.clj:80)
	at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1309)
	at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
	at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1314)
	at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
	at clojure.lang.PersistentHashMap.kvreduce(PersistentHashMap.java:238)
	at clojure.core$fn__8559.invokeStatic(core.clj:6987)
	at clojure.core$fn__8559.invoke(core.clj:6967)
	at clojure.core.protocols$fn__8287$G__8282__8296.invoke(protocols.clj:174)
	at clojure.core$reduce_kv.invokeStatic(core.clj:6998)
	at clojure.core$reduce_kv.invoke(core.clj:6989)
	at metabase.search.ingestion$execute_all_function_attrs.invokeStatic(ingestion.clj:76)
	at metabase.search.ingestion$execute_all_function_attrs.invoke(ingestion.clj:73)
	at metabase.search.ingestion$__GT_document.invokeStatic(ingestion.clj:87)
	at metabase.search.ingestion$__GT_document.invoke(ingestion.clj:85)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at medley.core$distinct_by$fn__15232$fn__15233.invoke(core.cljc:290)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at clojure.core$completing$fn__8562.invoke(core.clj:7010)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at toucan2.pipeline$with_init$fn__51829.invoke(pipeline.clj:327)
	at clojure.core$completing$fn__8562.invoke(core.clj:7010)
	at toucan2.jdbc.result_set$reduce_result_set.invokeStatic(result_set.clj:156)
	at toucan2.jdbc.result_set$reduce_result_set.invoke(result_set.clj:125)
	at toucan2.jdbc.query$reduce_jdbc_query.invokeStatic(query.clj:51)
	at toucan2.jdbc.query$reduce_jdbc_query.invoke(query.clj:22)
	at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invokeStatic(pipeline.clj:19)
	at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invoke(pipeline.clj:9)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
	at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
	at toucan2.pipeline$transduce_execute$with_connection_STAR___51727.invoke(pipeline.clj:78)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invokeStatic(connection.clj:13)
	at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invoke(connection.clj:11)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
	at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.pipeline$transduce_execute.invokeStatic(pipeline.clj:77)
	at toucan2.pipeline$transduce_execute.invoke(pipeline.clj:64)
	at clojure.lang.Var.invoke(Var.java:401)
	at toucan2.pipeline$transduce_compiled_query.invokeStatic(pipeline.clj:244)
	at toucan2.pipeline$transduce_compiled_query.invoke(pipeline.clj:240)
	at toucan2.pipeline$transduce_built_query.invokeStatic(pipeline.clj:252)
	at toucan2.pipeline$transduce_built_query.invoke(pipeline.clj:246)
	at toucan2.pipeline$transduce_query_primary_method_default.invokeStatic(pipeline.clj:272)
	at toucan2.pipeline$transduce_query_primary_method_default.invoke(pipeline.clj:269)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
	at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
	at toucan2.pipeline$transduce_query_STAR_.invokeStatic(pipeline.clj:278)
	at toucan2.pipeline$transduce_query_STAR_.invoke(pipeline.clj:274)
	at toucan2.pipeline$transduce_with_model.invokeStatic(pipeline.clj:293)
	at toucan2.pipeline$transduce_with_model.invoke(pipeline.clj:280)
	at toucan2.pipeline$transduce_parsed.invokeStatic(pipeline.clj:309)
	at toucan2.pipeline$transduce_parsed.invoke(pipeline.clj:295)
	at clojure.lang.AFn.applyToHelper(AFn.java:160)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$apply.invoke(core.clj:662)
	at toucan2.pipeline$reducible_fn$reify__51862.reduce(pipeline.clj:404)
	at clojure.core$transduce.invokeStatic(core.clj:7025)
	at clojure.core.Eduction.reduce(core.clj:7874)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$reduce.invoke(core.clj:6947)
	at metabase.util$rconcat$reify__16182.coll_reduce(util.cljc:1188)
	at clojure.core$transduce.invokeStatic(core.clj:7026)
	at clojure.core.Eduction.reduce(core.clj:7874)
	at clojure.core$transduce.invokeStatic(core.clj:7025)
	at clojure.core$transduce.invokeStatic(core.clj:7021)
	at clojure.core$transduce.invoke(core.clj:7012)
	at metabase.search.appdb.index$index_docs_BANG_.invokeStatic(index.clj:279)
	at metabase.search.appdb.index$index_docs_BANG_.invoke(index.clj:275)
	at metabase.search.appdb.core$populate_index_BANG_.invokeStatic(core.clj:169)
	at metabase.search.appdb.core$populate_index_BANG_.invoke(core.clj:168)
	at metabase.search.appdb.core$eval132669$fn__132671.invoke(core.clj:182)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at metabase.search.core$init_index_BANG_$iter__133794__133798$fn__133799.invoke(core.clj:91)
	at clojure.lang.LazySeq.force(LazySeq.java:50)
	at clojure.lang.LazySeq.realize(LazySeq.java:89)
	at clojure.lang.LazySeq.seq(LazySeq.java:106)
	at clojure.lang.RT.seq(RT.java:555)
	at clojure.core$seq__5488.invokeStatic(core.clj:139)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24)
	at clojure.core.protocols$fn__8266.invokeStatic(protocols.clj:74)
	at clojure.core.protocols$fn__8266.invoke(protocols.clj:74)
	at clojure.core.protocols$fn__8207$G__8202__8220.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6965)
	at clojure.core$reduce.invoke(core.clj:6947)
	at metabase.search.core$init_index_BANG_.invokeStatic(core.clj:88)
	at metabase.search.core$init_index_BANG_.doInvoke(core.clj:80)
	at clojure.lang.RestFn.invoke(RestFn.java:411)
	at metabase.search.task.search_index$init_BANG_$fn__173098.invoke(search_index.clj:38)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394$with_transaction_STAR___126395.invoke(cluster_lock.clj:61)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at metabase.app_db.connection$do_transaction$thunk__61025.invoke(connection.clj:145)
	at metabase.app_db.connection$do_transaction.invokeStatic(connection.clj:164)
	at metabase.app_db.connection$do_transaction.invoke(connection.clj:141)
	at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invokeStatic(connection.clj:201)
	at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invoke(connection.clj:174)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invokeStatic(connection.clj:249)
	at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invoke(connection.clj:245)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:58)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:212)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394.invoke(cluster_lock.clj:53)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invokeStatic(connection.clj:18)
	at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invoke(connection.clj:15)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at metabase.app_db.connection$do_with_connection_primary_method_default.invokeStatic(connection.clj:132)
	at metabase.app_db.connection$do_with_connection_primary_method_default.invoke(connection.clj:130)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
	at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invokeStatic(cluster_lock.clj:53)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invoke(cluster_lock.clj:51)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407$do_with_cluster_lock_STAR__STAR___126409.invoke(cluster_lock.clj:78)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:662)
	at metabase.util.retry$decorate$fn$reify__126370.call(retry.clj:110)
	at io.github.resilience4j.retry.Retry.lambda$decorateCallable$5(Retry.java:306)
	at metabase.util.retry$decorate$fn__126369.doInvoke(retry.clj:111)
	at clojure.lang.RestFn.invoke(RestFn.java:400)
	at metabase.util.retry$fn__126375$make126374__126376$fn__126377.invoke(retry.clj:120)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:82)
	at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:75)
	at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
	at metabase.search.task.search_index$init_BANG_.invokeStatic(search_index.clj:37)
	at metabase.search.task.search_index$init_BANG_.invoke(search_index.clj:33)
	at metabase.search.task.search_index$eval173156$fn__173157.invoke(search_index.clj:46)
	at metabase.startup.core$run_startup_logic_BANG_$fn__173079.invoke(core.clj:30)
	at metabase.startup.core$run_startup_logic_BANG_.invokeStatic(core.clj:28)
	at metabase.startup.core$run_startup_logic_BANG_.invoke(core.clj:24)
	at metabase.core.core$init_BANG__STAR_.invokeStatic(core.clj:181)
	at metabase.core.core$init_BANG__STAR_.invoke(core.clj:117)
	at metabase.core.core$init_BANG_.invokeStatic(core.clj:194)
	at metabase.core.core$init_BANG_.invoke(core.clj:189)
	at dev$init_BANG_.invokeStatic(dev.clj:143)
	at dev$init_BANG_.invoke(dev.clj:139)
	at dev$start_BANG_.invokeStatic(dev.clj:180)
	at dev$start_BANG_.invoke(dev.clj:176)
	at dev$eval206099.invokeStatic(NO_SOURCE_FILE:1)
	at dev$eval206099.invoke(NO_SOURCE_FILE:1)
	at clojure.lang.Compiler.eval(Compiler.java:7739)
	at clojure.lang.Compiler.eval(Compiler.java:7729)
	at clojure.lang.Compiler.eval(Compiler.java:7694)
	at clojure.core$eval.invokeStatic(core.clj:3232)
	at clojure.core$eval.invoke(core.clj:3228)
	at vlaaad.reveal.repl$wrap_eval$fn__37945.invoke(repl.clj:90)
	at clojure.main$repl$read_eval_print__9248$fn__9251.invoke(main.clj:437)
	at clojure.main$repl$read_eval_print__9248.invoke(main.clj:437)
	at clojure.main$repl$fn__9257.invoke(main.clj:459)
	at clojure.main$repl.invokeStatic(main.clj:459)
	at clojure.main$repl.doInvoke(main.clj:368)
	at clojure.lang.RestFn.applyTo(RestFn.java:140)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:662)
```
2025-08-01 14:25:50 -05:00
Jeff Bruemmer
debb945c57 link to intro page (#61744) 2025-08-01 19:22:18 +00:00
Phoomparin Mano
8d195dc6db Add note on useExistingUserSession's browser compatibility (#61663) 2025-08-02 02:00:22 +07:00
John Swanson
1eccdad5f4 Format scalar currencies correctly (#61664)
Previously we were treating all currency formatting as if we were in a
table, and only adding the currency symbol if `currency-in-header` were
explicitly set to `false` for the column.

When formatting a scalar value, though, we want to always add the
currency symbol inline (since there is no header in this case).

I found that `metabase.channel.render.body/format-cell` and
`metabase.formatter.core/format-number` were actually only used to
format *scalar* cells and *scalar* numbers (as opposed to cells in a
table), so I renamed them for a bit more clarity and added a new
optional argument, `scalar?`, to
`metabase.formatter.core/number-formatter`. When passed (and truthy) the
currency symbol will be splatted into the formatted number even if
`:currency-in-header` is not `false`.
2025-08-01 09:51:31 -07:00
Ryan Laurie
3f07958eae [ci run] Fix deprecated input (#61700)
* replaced deprecated Input with TextInput

* udpate a couple more things

---------

Co-authored-by: iamkabilash <iamkabilash@gmail.com>
2025-08-01 10:51:06 -06:00
Jeff Bruemmer
0947c6b604 docs - minor edits (#61735)
* minor edits

* Update docs/permissions/row-and-column-security.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-08-01 16:47:09 +00:00
Jeff Bruemmer
e62c8f1fff docs - rename data sandboxing to row and column security (#61682) 2025-08-01 12:35:02 -04:00
John Swanson
efb70a343a do not throw on empty query for /search (#61615)
instead just pass `(not-empty q)` to the search subsystem, which will
convert it to `nil` if it's empty and pass it unchanged if it's not.

I still don't think this is probably the ideal user experience when you
navigate to `/search` but it's not an error at least.
2025-08-01 08:48:45 -07:00
John Swanson
6f34845c13 Fix zero measure count issue for pivot tables (#61565) 2025-08-01 08:23:26 -07:00
Riley Thompson
11f24779e2 Always set roles on connections (#61563)
* always set roles on connections

* add deps

* include sql-jdbc.execute

* kondo warn on reflection
2025-08-01 14:51:25 +00:00
Brad Anderson
086a00ab8d Fix: UXW-382 - Public Links menu item within sharing menu is too large (#61628)
* UXW-382 Updates "Public link" menu item for admins when public links aren't enabled so it doesn't look obviously broken

* UXW-382 Updates tests

* UXW-382 Updates "enable public links" menu item to be disabled per PR feedback

* UXW-382 Swaps core styles for mantine props per PR feedback
2025-08-01 10:50:58 -04:00
Nicolò Pretto
ed82963a86 chore(sdk): bump minimum react version to 18 (#61718) 2025-08-01 16:36:02 +02:00
Edward Paget
0fe24156a3 fix: issues generating valid urls for map tiles (#61634)
* fix: issues generating valid urls for map tiles

Fixes to issues generating map tiles, one is on x-ray dashboards we need
to check that we're not in a real dashboard and send an ad hoc tile
request.

Second if the field ref sent in the request has options we need to
remove the 'base-type' option because the type will be encoded as
something like test%2FFloat and the way Jetty decodes URLs before
parsing turns it into a '/' in a position a path separator cannot be:
https://github.com/jetty/jetty.project/issues/7713

* fixup! typeguard dashbaord id

* Update maps.cy.spec.js

* fixup! better handle null field opts
2025-08-01 08:40:27 -05:00
Riley Thompson
ad3ec1b797 Enable DB routing for snowflake (#61434) 2025-08-01 09:24:24 -04:00
Jeff Bruemmer
9276aaad2a docs - update generated docs (#61689)
* config template

* api docs

* env var docs
2025-08-01 09:21:27 -04:00
Timofey Kachalov
c69ef65bff feat(sdk): Use Mantine styles with CSS layer for the SDK (#61475) 2025-08-01 17:12:25 +04:00
Nicolò Pretto
87f36432ca allow setting the default cypress browser via env CYPRESS_BROWSER (#61652)
* allow setting the default cypress browser via env CYPRESS_BROWSER

* keep --browser have higher priority than the env
2025-08-01 12:19:34 +02:00
Nicolò Pretto
00ceb1aff2 remove references to ENTERPRISE_TOKEN (#61667)
* update docs that referenced old envs CYPRESS_ALL

* remove requirement on ENTERPRISE_TOKEN that's not needed anymore
2025-08-01 12:18:09 +02:00
Nicolò Pretto
b243e4e4d4 prepare the sdk workflow for 56 release (#61704) 2025-08-01 08:31:34 +00:00
Oleksandr Yakushev
7c2347fef6 [qp] Use metabase.util.performance/postwalk instead of regular clojure.walk (#60722) 2025-08-01 06:10:20 +00:00
Ryan Laurie
ab0ed63e26 update build info for v56 (#61676) 2025-07-31 20:18:24 -06:00
Ryan Laurie
d34ddd45c2 fix release notes preview action (#61671) 2025-07-31 20:18:16 -06:00
bryan
b07b86a367 enable cider middleware in dev-start (#61678)
Co-authored-by: Raimon Grau <raimonster@gmail.com>
2025-07-31 23:18:52 +00:00
Ryan Laurie
c4db9bf7fe fix native models test (#61697) 2025-07-31 22:20:33 +00:00
Cam Saul
d389949074 Re-implementation of metabase.driver.common.parameters.* that uses Lib (#61158)
* Re-implementation of `metabase.driver.common.parameters.*` that uses Lib

* Fix Kondo warnings

* Move tests that have nothing to do with drivers to QP

* Test fixes 🔧

* Test fixes 🔧

* Try simplifying the PR
2025-07-31 18:14:41 -04:00
bryan
0a9b808754 update jar-download to handle {v,}1.56.0-beta (#61696) 2025-07-31 22:11:21 +00:00
Riley Thompson
f1057b6420 Enable DB routing for Redshift (#61390)
* db routing for redshift

* simplify test

* dataset name multimethod

* small change

* use delayed defs

* add redshift ci routing env var

* small fix

* update dataset definitions

* change back to original data
2025-07-31 17:14:50 -04:00
Jakub Chodorowicz
28bf41bb17 Replace getStoreUrl usage with useStoreUrl (#61534)
* Replace getStoreUrl usage with useStoreUrl

* Refactor getStoreUrl

* Add harcoded default store URL (live store)
2025-07-31 15:09:31 -06:00
Oleksandr Yakushev
73bcc90a68 [pivot] Replace json-roundtrip with explicit type conversions (#61384) 2025-08-01 00:09:26 +03:00
Oleksandr Yakushev
74a6335bd3 [legacy-mbql] Optimize normalize-tokens (#60721) 2025-08-01 00:03:43 +03:00
Riley Thompson
fa3b11fcde Retry have-select-privilege? on error (#61236)
* feat: driver/do-with-resilient-connection

* feat: :keep-open? option to do-with-connection-with-options

* feat: attempt describe-database with resilient connection

* feat: execute jdbc query with retry conn

* test

* avoid recursive issues

* simplify

* changelog

* type hint

* force local conn, so the connection being closed won't close outer unrealized result sets

* working test

* more test

* opts

* style

* add test for connection options

* notes

* fix test

* docstring

* Update src/metabase/driver/sql_jdbc/execute.clj

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* logs

* better logs

* try to close conn when it's no longer valid

* pull out logic to is-conn-open

* is-conn-open? test

* clarify

* Update docs/developers-guide/driver-changelog.md

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* update version

* chore: move tests to right namespace

* retry have select privilege on error

* add test

* improve test

* remove let

* separate connection for each test

* clean up test

* try druid jdbc ci fix

* close connection during test

* use do with resilient connection in test for druid

* formatting

* always set role if supported

* Fix clickhouse and sqlserver

* impersonation test

* use normal-driver-select

* address comments

* kondo

* remove debug

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-07-31 19:38:56 +00:00
Denis Berezin
f8f5e20c1f UXW-381 Fix collections bulk action buttons UI (#61640) 2025-07-31 19:06:57 +03:00
Alex Yarosh
06712c46e5 Update database-routing.md (#61672) 2025-07-31 15:39:59 +00:00
Brad Anderson
f9d74d1f3b Fix: UXW-28 When deleting a tab with questions saved to the dashboard, no option offered to keep and move those questions (#61526)
* UXW-28 Adds confirmation modal when deleting a tab that contains dashboard-only cards

* UXW-28 Makes confirmation modal smarter; uses short version if all questions on a tab are dashboard questions, lists affected questions if it's a mix

* UXW-28 Adds tests
2025-07-31 10:51:35 -04:00
Brad Anderson
1dffd98bd7 UXW-314 Fix action icon inconsistencies (#61639) 2025-07-31 08:48:04 -06:00
Nicola Mometto
909354fe89 Attempt to reconnect during select probing if connection is closed (#60857)
* feat: driver/do-with-resilient-connection

* feat: :keep-open? option to do-with-connection-with-options

* feat: attempt describe-database with resilient connection

* feat: execute jdbc query with retry conn

* test

* avoid recursive issues

* simplify

* changelog

* type hint

* force local conn, so the connection being closed won't close outer unrealized result sets

* working test

* more test

* opts

* style

* add test for connection options

* notes

* fix test

* docstring

* Update src/metabase/driver/sql_jdbc/execute.clj

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* logs

* better logs

* try to close conn when it's no longer valid

* pull out logic to is-conn-open

* is-conn-open? test

* clarify

* Update docs/developers-guide/driver-changelog.md

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* update version

* chore: move tests to right namespace

* impersonation test

* use normal-driver-select

* trigger CI

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-07-31 15:19:49 +01:00
Edward Paget
944ca02530 chore: remove stray #p (#61665)
Not sure why kondo didn't get this.
2025-07-31 09:08:50 -05:00
Vamsi Peri
a2b720a743 Delete .github/workflows/claude.yml (#61666) 2025-07-31 13:27:43 +00:00
eliotmetabase
3f19d40ca1 Temporary change to fix CI, will update modules properly (#61662) 2025-07-31 13:05:34 +00:00
Phoomparin Mano
e357c4f0db Design cleanup for embedding sdk settings page (#61653) 2025-07-31 19:57:52 +07:00
Timofey Kachalov
8563b74b89 Remove circular references in SDK package (#61657) 2025-07-31 16:16:13 +04:00
Nicolò Pretto
6558cca6a4 feat(simple-embed): parse attributes with json5 to be more permissive… (#61648)
* feat(simple-embed): parse attributes with json5 to be more permissive with quotes

* Update package.json

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix tests

* Apply suggestion from @heypoom

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-31 11:57:30 +00:00
Phoomparin Mano
435e905ffd Hide Embed menu from "New" button if the user is not an admin (#61658) 2025-07-31 18:39:58 +07:00
Oleksandr Solovyov
3063577208 update snowflake's commons-lang3 to clear out security issue (#61656) 2025-07-31 13:38:27 +02:00
Timofey Kachalov
1c6c3681a8 Add backend-sources as triggers to SDK compatibility tests (#61650) 2025-07-31 14:28:48 +04:00
Chris Truter
84f0a92394 Assign correct MB version metadata to data-editing functions (#61647) 2025-07-31 09:31:04 +00:00
Chris Truter
9019aab71e BE support for Table Data Editing (#61490)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2025-07-31 08:34:17 +00:00
Cam Saul
abdfe5062c Faster field ref resolution (#61529)
* Remove debugging stuff

* 14 failures, 1 error.

* 10 failures, 1 error.

* 10 failures, 0 errors.

* Better log messages

* Faster field ref resolution

* Test fixes 🔧

* Some test fixes 🔧

* Remove resolve-joined-fields middleware

* Fix lib.underlying calculation of fields with join aliases

* Fix busted pivot tests

* Remove unused fn

* More resolution fixes

* drill-thru use vars so we can get updated fns in the REPL

* Consolidate the lib metadata => legacy metadata functions

* Add a pile of additional tests

* Migrate the `resolve-joined-fields` middleware (#39884)

* Support automatically removing duplicate refs in `:fields` and `:breakouts` during normalization

* More cleanup and extra tests 🔧

* Add ::mbql.s/OrderBys

* Mess with logging in resolution even more

* Order bys should be distinct ignoring keys like :base-type or namespaced keys

* I have fixed #60587

* One last round of test fixes??

* Test fix

* Code cleanup

* Fix test failures 🔧

* MongoDB test fix

* Fix Oracle test 🔧

* MongoDB test fix 🔧

* cljfmt

* e2e test fix?

* Test fix 🔧

* Less noisy logging

* Improve field resolution for implicit joins; PR feedback (part 1)

* PR feedback (part 2) and extra dox
2025-07-30 23:35:25 +00:00
eliotmetabase
adefc0f0b7 Create UX West, remove Admin Webapp and Dashviz (#61644) 2025-07-30 23:34:58 +00:00
dpsutton
fadfd67275 Test drivers on folder changes (#61633)
* Run tests if files in lib/drivers/qp are changes

check src/metabase/lib, src/metabase/query_processor, modules/drivers

we key off of team label but this is hopefully close enough to what we
really want

* run an action linter

```
❯ actionlint /Users/dan/projects/work/metabase/.github/workflows/drivers.yml
.github/workflows/drivers.yml:440:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
.github/workflows/drivers.yml:537:15: description is required in metadata of "Wait for localhost port to be ready" action at "/Users/dan/projects/work/metabase/.github/actions/await-port/action.yml" [action]
    |
537 |       - uses: ./.github/actions/await-port
    |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:587:13: description is required in metadata of "Test database driver" action at "/Users/dan/projects/work/metabase/.github/actions/test-driver/action.yml" [action]
    |
587 |       uses: ./.github/actions/test-driver
    |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:743:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
```

acitonlint seems pretty nice

not fixing the exclude-tag since that seems to work just fine

* fix syntax

* fetch base branch for file checks

to see if we changed files, need the base

* indentation is fun. super fast iteration

* resequence if before run
2025-07-30 18:28:38 -05:00
dpsutton
a204791f86 run third tier on devex team label (#61577)
* run third tier on devex team label

* empty to poke CI

* make prepare-statement private

probably good for this to be private either way, but this is done now to
kick CI and run tests that aren't running in CI

* close single quote
2025-07-30 17:09:57 -05:00
Edward Paget
4e7f0f28d3 fix: snyk set org and repo for open source limits (#61605) 2025-07-30 15:56:54 -05:00
John Swanson
a15d4122f2 Don't try to update setting as non-admin (#61567)
We're using a setting as a half-baked way to track whether we've ever
created a non-table chart. We do this regardless of whether you're an
admin or not, but the endpoint responds with a 403 if you're not an
admin.

Honestly motivation here was fixing [UXW-152: 403 thrown for non-admins
when viewing question re:
non-table-chart-generated](https://linear.app/metabase/issue/UXW-152/403-thrown-for-non-admins-when-viewing-question-re-non-table-chart)
but it feels a little silly. But... it's not *completely* unreasonable.
2025-07-30 20:47:37 +00:00
Case Nelson
8bc377369b refactor: drop with-temp from field-ref-repro tests (#61566) 2025-07-30 16:23:42 -04:00
Uladzimir Havenchyk
2ff3bb736f deps: update deps that use form-data to the fixed versions (#61582)
* deps: update deps that use form-data to the fixed versions

* downgrade jsdom
2025-07-30 20:06:09 +00:00
Uladzimir Havenchyk
badbd28565 deps: upgrade on-headers dep (#61589) 2025-07-30 20:05:11 +00:00
Nathan Voxland
c45c500628 Check for dev namespace better (#61610) 2025-07-30 14:46:08 -05:00
Uladzimir Havenchyk
a95c69a0b3 deps(release): update slack api and form-data packages (#61584) 2025-07-30 22:32:48 +03:00
Case Nelson
1319841229 dev: add the ability to run native ddl as part of dataset definitions (#61343)
* dev: add the ability to run native ddl as part of dataset definitions

* Fixing tests

* Fix kondo

* Fix tests and kondo

* Fix clickhouse tests

* Fix another clickhouse test

* Fix bigquery test

* Fix bigquery test

* Trigger Build
2025-07-30 13:24:53 -06:00
Edward Paget
e0bacfea5e feat: update group mapping text for jwt behavior (#61273)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* feat: make jwt group attribute admin configurable

* feat: update group mapping text for jwt behavior
2025-07-30 19:17:41 +00:00
Rodrigo López Dato
987ed5d7da Typo (#61624) 2025-07-30 16:01:04 -03:00
Nicolò Pretto
431afb660b feat(new-embed): log an error when the parsing of a json attribute fails (#61617)
* feat(new-embed): log an error when the parsing of a json attribute fails

* Update enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/webcomponents.ts

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-30 20:51:21 +02:00
Edward Paget
b11f0905f3 fix: allow scalar user-attributes (#61613)
* fix: allow scalar user-attributes

Only drop collections which cannot be converted to strings when
generating database queries.

* fixup! remove unused namespace

* fixup! use keep to retain false booleans
2025-07-30 18:42:56 +00:00
Phoomparin Mano
7eee4b5da1 docs(sdk): missing documentation for question components (#61616) 2025-07-30 18:27:12 +00:00
John Swanson
4bef26a524 Remove quotes around UUIDs in XLSX downloads (#61614)
I'm ignoring `styles` and `typed-styles` here just like the `Object`
implementation or the `String` implementation.
2025-07-30 12:31:31 -05:00
Phoomparin Mano
9edd0db967 Embed preview for simple embedding fails on production due to localhost checks (#61606) 2025-07-30 23:41:37 +07:00
Sébastien
f51780142f feat(sdk): download button is now in an always visible ... menu (#61556)
* Closes EMB-669: download button is now in an always visible ... menu

* renamed file and component

* Update Loki Snapshots

* fixed unit tests

* e2e

* e2e

* e2e

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-30 17:11:42 +02:00
Ryan Laurie
98ce261480 don't pass empty strings to question create API (#61467)
* don't pass empty strings to question create API

* add unit tests

* handle null

* even better
2025-07-30 15:10:21 +00:00
Phoomparin Mano
f7e1511dcd Update settings page and use Embedded Analytics JS as the public name (#61597) 2025-07-30 21:50:41 +07:00
Edward Paget
f1d46ecf36 feat: make jwt group attribute admin configurable (#61234)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* feat: make jwt group attribute admin configurable
2025-07-30 14:43:20 +00:00
Ngoc Khuat
f93123f2a2 Fix alert with goal archived even though goal is not met (#61586) 2025-07-30 13:37:53 +00:00
Oleksandr Yakushev
6a73a95940 [dev] Add devtools-to-flamegraph script (#61157) 2025-07-30 15:42:05 +03:00
Phoomparin Mano
40d897d7f1 Add the Beta badge to "New > Embed" menu (#61593) 2025-07-30 19:03:41 +07:00
Oleksandr Solovyov
89a7f3c1b6 update nimbus-jose-jwt (#61581) 2025-07-30 11:17:02 +00:00
Phoomparin Mano
eb671b92ab Check for simple embedding's enabled settings and token feature (#61590) 2025-07-30 17:51:01 +07:00
Rodrigo López Dato
aa0cdb546d Fix empty latest version (#61578) 2025-07-30 00:43:01 -04:00
Nathan Voxland
8132b400d2 /api/dashboard/save should use the submitter's id as creator_id (#61524) 2025-07-29 17:33:38 -05:00
Dennis Schridde
8c80f88e30 Fix race condition of ee-extra release trigger (#61559)
The workflow in the `metabase-ee-extra` repository could run before the
container image tags were created by the workflow in the `metabase`
repository, causing the former to fail.  Fix by making the image push
an explicit dependency of the ee-extra trigger.
2025-07-29 23:46:31 +02:00
Nathan Voxland
c004ea2d46 Created prototype API for dev work (#61473) 2025-07-29 16:36:13 -05:00
Luiz Arakaki
78adcf7380 Rename sandboxing row column security (#58369)
Rename sandboxing to row and column security
2025-07-29 17:15:37 -03:00
dk-gervais
7bc29f3f9a Update community-drivers.md (#61431)
Add the InterSystems IRIS Metabase driver to the list of Community Drivers
2025-07-29 15:59:32 -04:00
Edward Paget
d7cf38d3cf fix: simplify sandbox permissions management (#61542)
This works by just totally removing the permission grants created by
sandboxes. Instead we use the `gtapped-table` flag added by the
sandboxing middleware to add just the gtapped-table itself to set of
necessary table create-query permissions and exclude any joined tables
from being added to this set.

If those tables are included elsewhere in the query (not the part
created by the sandbox), they will be added to the set of tables to
check normally and the query will be blocked if the user doesn't have
query-builder perms.
2025-07-29 14:22:49 -05:00
Edward Paget
72bca32bcd fix: new child collections use parent's namespace (#60202)
Child collections are automatically created with the same namespace as
their parent collection. Since we enforce a validation that this must be
true it seems simpler for api clients to have this value set for them
rather than requiring them to supply the namespace attribute (though it
still remains optional to pass one.)
2025-07-29 14:02:29 -05:00
Edward Paget
14b2815113 feat: auto assign jwt users to groups by name (#61221)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* Update common.clj
2025-07-29 14:01:50 -05:00
Phoomparin Mano
9b0241aa11 Rename feature token name from embedding_iframe_sdk to embedding_simple (#61548) 2025-07-30 01:38:15 +07:00
Edward Paget
13a851f3c1 feat: add audit log events for groups (#60946)
As part of the tenanting project we want to emit audit events when users
join/leave tenant groups (or these groups are otherwise modified).
2025-07-29 13:01:45 -05:00
Jeff Bruemmer
9dcd19054e docs - custom smtp server (#61549)
* custom smtp server

* notes

* edits
2025-07-29 13:48:36 -04:00
Nicolò Pretto
0c64aaa4a7 custom elements api for new simple embedding (#60646)
* wip

* experiment of callback to see if it works on vue with .callback={}

* basic e2e test for dashboard

* more tests and cleanup

* remove my-app playground

* rm unused file

* use custom elements for the preview

* support for async and defer, defaulting to defer

* clean up custom elements code

* rename drills props

* Revert "experiment of callback to see if it works on vue with .callback={}"

This reverts commit 89a38dca47.

* fix theme not being restored from persisted settings

* fix: load script  for preview from instance url, make iframe loaded data
attribute work

* change the snippet to use new defer syntax

* support for exploration with question-id=new

* cleanup

* fix types

* Revert "fix types"

This reverts commit bbc8eb8b59.

* Revert "support for exploration with question-id=new"

This reverts commit 4c3f041629.

* reimplement support for exploration

* fix parameters conditional rendering

* fix linting issues

* fix embed code snippet

* fix(new-embed): allow multiple questions/dashboards on the same page

* test for multiple questions

* add note about theme

* feat(sdk): expose the title prop in StaticQuestion (#61001)

* attempot to make tests more stable

* fix types

* maybe fix tests?

* test for ci

* put back support for is-save-enabled

* H.getIframeBody -> H.getSimpleEmbedIframeContent as it should be less flaky

* restore logic

* fix exploration not working in test

* moved comment to the correct place

* potential fix for handleMessage, ignore messages from other iframes

* use question for exploration templates

* fix type errors

* skip flaky "persists default and hidden parameters"

* fix template: exploration in embed flow

* always enable embedding-simple on embed flow tests

* refactor the custom elements tests to use the generic helpers

* fix tests :fingercrossed:

* default title to true

* update helper to grab the first 37.65

* default drills to true

* we're now showing the title by default

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-29 18:57:04 +02:00
Nicola Mometto
ef8bc2ea06 reassign sem to querying (#61551) 2025-07-29 16:41:08 +00:00
Jacob Joseph
915a78f13a Update upgrading-metabase.md (#61552)
note about running on JAR with higher version.
2025-07-29 15:40:10 +00:00
Ryan Laurie
7427caa8d0 Remove release/update channel selection (#61369)
* remove release/update channel selection

* 😁

* white space is dark space in dark mode

* obey the linter

* update comment
2025-07-29 07:54:32 -06:00
Phoomparin Mano
35bc7c8b9a Fix flaky tests for simple embedding due to toasts blocking the next button (#61541) 2025-07-29 20:39:46 +07:00
Nick Fitzpatrick
ff36018fb9 Add includeDashboardQuestions to the useAvailableData check (#61507)
* Add includeDashboardQuestions to the useAvailableData check

* fix spelling
2025-07-29 09:04:10 -03:00
Nicola Mometto
b7d5408300 move me and libor to metabot (#61536) 2025-07-29 13:00:00 +01:00
Sébastien
7bc79ed0a5 Added 'hide' button to SDK problem banner (#61532) 2025-07-29 12:34:49 +02:00
Phoomparin Mano
4e87da201c Auto-enable simple embedding in embed flow instead of react sdk (#61463)
Co-authored-by: Roman Abdulmanov <roman@metabase.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-07-29 16:44:33 +07:00
github-automation-metabase
ea826ef62b Bump net.thisptr/jackson-jq from 1.3.0 to 1.4.0 (#61483)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-29 08:23:27 +00:00
Cam Saul
1270cf7271 [Lib] Remove idents part 6 (#61511) 2025-07-28 18:37:54 -07:00
Cam Saul
fc23270381 [Release blocker fix] Correctly handle remapping inside joins (#61442)
* Do not add new extra empty stages when converting a join from legacy

* Update gitignore

* Simplified fix for #60444

* Fix QUE-1607

* Test fix 🔧

* Fix QUE-1621

* Additional tests.

* Test fix 🔧

* Remove dead code -- schemas for idents in legacy MBQL schema

* Test fix 🔧

* Fix QUE-1623

* Test fix 🔧

* Fix failing tests

* Test fixes 🔧

* Make sure join metadata goes in the right place

* Additional tests

* Make sure join metadata goes in the right place

* Less verbose logging

* Test fixes 🔧

* Some extra tests 🔧

* Another test fix 🔧

* Remove unused export

* Cleanup

* Code cleanup

* Update tests 🔧

* test fixes

* Improve/fix metadata calculation

* Test fixes 🔧

* Update tests

* Test fix 🔧

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧

* PR feedback

* Test fix 🔧
2025-07-29 01:30:50 +00:00
Cam Saul
1d5a79395d Remove 'fix bad references' middleware (#61472) 2025-07-28 20:21:23 -04:00
Fraser
cc3ddf8359 Add content translation to multi-autocomplete (#61263) 2025-07-29 09:40:28 +12:00
Jeff Bruemmer
5b5c5e7298 docs - time grouping parameters for sql queries (#60951) 2025-07-28 17:20:42 -04:00
bryan
0b3df70817 force ref checkout for pull_request type trigger (#61514) 2025-07-28 12:27:36 -06:00
Jeff Bruemmer
5e7f3e9467 docs - metadata editing (#61501) 2025-07-28 14:04:32 -04:00
Edward Paget
ffb583c99e feat: separate jwt-set attributes from manual-set (#61458)
* allow tenant attributes CRUD (#60347)

wip merge user and tenant attributes

WIP use new api

Split Mapping Editor

types fixed

so much unit testing

handle null cases

update tests

update a couple more e2e tests

less silly test

make things nicer

invalidate user cache on tenant update

* feat: separate jwt-set attributes from manual-set

* fixup! typescript stuff

* feat: restore structrue-attributes merging

Co-Authored-by: Dan Sutton <dan@metabase.com>

* feat: use merged attributes in routing/sandbox/etc

Co-Authored-By: John Swanson <john.swanson@metabase.com>

* fixup! move group manager test to ee

* fixup! kondo

* fixup! modal spec

* fixup! cypress tests

* fixup! migration timestamp

* fixup! one more cherry pick oopsie

* fixup! sandboxing cypress helper fixes

* fixup! more cypress updates

* fixup! remove eslint directive

* fixup! remove 2-arity router-dbor-id->destination-db-id

All the places it was called with 2-arity were explicitly passing in
@api/current-user anyway

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Dan Sutton <dan@metabase.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-07-28 16:50:15 +00:00
Edward Paget
be8e6611c3 fix: handle headerless translations csv (#61025)
* fix: handle headerless translations csv

* fixup! PR feedback

Also fixes an issue with error line number reporting without headers

* feat: allow csv headers to be in any order

* fixup! error reporting test
2025-07-28 16:31:29 +00:00
Edward Paget
f182885389 fix: run each snyk project individually (#61430)
* fix: remove categories on push

* fix: run each project individually

* fix: run jobs in parallel with pom caching

* fixup! dry it up

* Update snyk.yml
2025-07-28 11:04:40 -05:00
Edward Paget
3bb4d5e74d chore: add more query permission test scenarios (#61095)
* chore: test deeply nested cards with mixed perms

* chore: test custom expressions and aggregations

* chore: add more tests for blocks and joins

* fixup! whitespace

* fixup! remove confusing comments
2025-07-28 15:17:23 +00:00
Ryan Laurie
17bea4176a Update diagnostic info instructions (#61504) 2025-07-28 08:59:24 -06:00
Aleksandr Lesnenko
e22ab60e01 allow hide if no results setting in visualizer (#61471) 2025-07-28 11:53:25 -03:00
Oleksandr Solovyov
04c1d21645 welcome everyone (#61316) 2025-07-28 17:07:40 +03:00
Chris Truter
e446ba2c3d Allow "blank" search for fieldvalues (#61497) 2025-07-28 14:07:13 +00:00
Oleksandr Solovyov
93390d9f57 upgrade liquibase and postgres (#59774)
---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-07-28 08:39:24 -05:00
Brad Anderson
29f56b541f UXW-35 Fixes #56249 in a way that still preserves the fix for #51611 (#61462) 2025-07-28 09:33:49 -04:00
Kamil Mielnik
d786ffbff8 SEM-527 Table picker item text overflows (#61444)
* Bring the effect back

* Add a comment
2025-07-28 16:25:08 +07:00
Roman Abdulmanov
58cfd55861 Updated team.json (#61488) 2025-07-28 09:58:19 +01:00
Phoomparin Mano
6625097d66 Update the embedding sdk admin settings to add simple embedding toggle (#61392)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-28 10:24:44 +02:00
Braden Shepherdson
ef21542b10 [MBQL Lib] Use stubs for cards and metrics in lib cache keys (#61386)
Fixes #61253.

Here's the breakdown of the issue, since it's subtle:
- These objects can contain some vanilla JS objects which in embedding
  contexts can be `Object.preventExtensions()`'d.
  - Eg. the `:visualization-settings` on a card or metric.
- `lib.metadata.cache` uses these objects as part of the cache key.
- Those become the keys of a CLJS map, which uses `cljs.core/hash`
- JS objects and arrays have pointer equality (`identical?` or `===`)
  semantics.
- The default `cljs.core.IHash/-hash` uses `goog.getUid(obj)`.
- That subtly mutates objects, adding a non-`enumerable`
  `closure_uid_123456789` property with an arbitrary sequence number.
- That's adding a property, which is a violation if
  `Object.preventExtensions()` (or `Object.freeze()`) has been used.
    - That silently does nothing by default, but throws in strict mode.

This PR modifies the cache key logic (which already has special handling
for `:lib/metadata`) to replace `:lib/type :metadata/card` and
`:metadata/metric` maps with a stub like `[:metric/card 123]`.
2025-07-28 07:43:18 +00:00
github-automation-metabase
645b55cfaf Bump commons-codec/commons-codec from 1.18.0 to 1.19.0 (#61482)
Inspect dependency changes here: https://github.com/apache/commons-codec/compare/commons-codec-1.18.0-RC1...commons-codec-1.19.0-RC1
2025-07-28 07:13:25 +00:00
Uladzimir Havenchyk
351fdc90cf chore: reduce usage of moment-timezone (#61388)
* drop unused redux functions

* drop time parsing in event cards

* replace moment types with dayjs

* use dayjs for tz guessing

* drop moment from a hook

* drop unused time functions
2025-07-28 06:02:59 +00:00
Fraser
05e78aae4a Use H helpers insteaed of commands cypress (#61403)
* Use H helpers insteaed of commands cypress
2025-07-28 09:11:50 +12:00
Fraser
b0b8348dad Remove flaky tag from content translation tests (#61439) 2025-07-28 09:11:36 +12:00
Cam Saul
831fb413cc [Lib] Misc metadata calculation and conversion bugfixes (#61437)
* Do not add new extra empty stages when converting a join from legacy

* Update gitignore

* Fix QUE-1607

* Test fix 🔧

* Fix QUE-1621

* Additional tests.

* Test fix 🔧

* Remove dead code -- schemas for idents in legacy MBQL schema

* Test fix 🔧

* Fix QUE-1623

* Test fix 🔧
2025-07-26 04:10:14 +00:00
bryan
aab42da74c remove unused dependency (#61374) 2025-07-25 21:38:12 +00:00
bryan
1dc85bcbae run known fixtures ahead of running tests (#61461) 2025-07-25 21:34:55 +00:00
Edward Paget
5e79cee71f fix: improve db drop down perf by prefiltering (#60652) 2025-07-25 15:48:09 -05:00
github-automation-metabase
23d194ca63 Bump io.github.camsaul/toucan2 from 1.0.565 to 1.0.566 (#59909)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-25 20:40:19 +00:00
Edward Paget
1cc4b87479 fix: mysql failure in saml setting test (#61460) 2025-07-25 18:40:18 +00:00
Phoomparin Mano
61d8979597 Update CORS and SSO handler to allow simple embedding client header (#61416) 2025-07-26 01:09:23 +07:00
Phoomparin Mano
206f7eaccb feat(sdk): expose the title prop in StaticQuestion (#61001) 2025-07-25 23:06:56 +07:00
Sébastien
832e2b7ac5 Viz 1323 visualizer cant combine single series chart and breakout (#61216)
* Closes VIZ-1322 VIZ-1323 looser compatibility

* fixup

* fixup

* fixed tests

* removed commented out blocks

* cleanup

* fixed unit test

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-07-25 17:33:09 +02:00
Chris Truter
dc973f0cb8 Add test coverage for search indexing during deserialization (#61047)
The test gives a bit of false confidence, as it passed before we added the forced re-indexing at the end of the import.

We probably want a way to keep the transaction open until after the ingestor has processed the messages from the toucan hooks... but that sounds quite invasive and brittle to pull off.
2025-07-25 15:14:40 +00:00
Edward Paget
08f7daa02a fix: reject dictionary locales not defined by mb (#60955)
If a locale is not defined for metabase we should not allow
content-translation dictionaries to uploaded with it. Since these
locales can't be used anyway it results in a confusing user experience.
2025-07-25 15:04:23 +00:00
Oisin Coveney
f2b8b44d48 Convert index.js/jsx to index.ts/tsx (#61373) 2025-07-25 14:30:19 +00:00
Phoomparin Mano
9d3ed0c9f2 Add defsetting and update embedding card in admin setting (#61292)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-25 21:01:05 +07:00
Oisin Coveney
0d14cb4aac Revert "Convert DashboardGrid to a functional component (#61364)" (#61449)
This reverts commit 647058ec89.
2025-07-25 13:56:19 +00:00
Oisin Coveney
647058ec89 Convert DashboardGrid to a functional component (#61364)
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-25 14:21:03 +03:00
Oisin Coveney
f58709dc20 Change InteractiveQuestion stories to SdkQuestion (#61445) 2025-07-25 13:52:36 +03:00
Phoomparin Mano
457cde39db Show simple embedding legal disclaimer and auto-enable embedding (#61375)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-07-25 17:51:45 +07:00
github-automation-metabase
3b028ee825 Bump net.snowflake/snowflake-jdbc-thin from 3.24.2 to 3.25.1 (#60910)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-25 09:14:46 +00:00
Fraser
c22ec1ebbd Remove waits from map e2e test (#61395) 2025-07-25 08:21:41 +12:00
Luis Paolini
d46d9d4dc9 Allow a width param for preview_png exporting (#61348)
* Allow a width param for exporting

* Fix linter
2025-07-24 17:20:25 -03:00
Jeff Bruemmer
08cd4c5d37 docs - user-generated content translation (#61102) 2025-07-24 18:48:15 +00:00
Tyler Plude
99a91de1b4 VIZ-1202 - Visualizer compatibility BE search filters (#60912)
* Populate search index col of non temporal dimension ids using clojure fn

* Add non_temporal_dim_ids filter param to search request

* fix kondo

* Add stub impl of new filter to in-place

* Add metadata provider cache

* Adding has-temporal-dim filter; fix tests

* fix lint

* Fix merge

* Hookup frontend to proper BE search filters; remove deprecated impl of has-temporal-dimensions

* Fix kondo

* Fix lingering refs to has-temporal-dimensions

* Fix lingering refs to has-temporal-dimensions

* fix test

* Fix test

* Remove FE compatibility code that was ported to BE; fix typing of partition helper

* Add helper for parsing non-temporal-dim-ids endpoint param; fix the conditional in FE

* remove debug let

* Add pr ref to comment

* Include dimension filter params in request only if cartesian

* remove specs that depended on checkDimensionCompatibilityForCartesianCharts

* PR feedback

* use existing dataset query transform

* Optimized 1 images, saved 76.0 KB (48.2% smaller)

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-24 11:38:54 -07:00
dpsutton
2fcd6ed374 handle strings rather than empty strings (#61426)
sqlserver returns columns with empty strings. not bad. just handle it
2025-07-24 13:38:35 -05:00
github-automation-metabase
680b24023c Bump com.taoensso/nippy from 3.5.0 to 3.6.0 (#59907)
Inspect dependency changes here: https://github.com/taoensso/nippy/blob/v3.6.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-24 18:10:22 +00:00
Jakub Chodorowicz
67aeb818ab Feature/smoother upgrade flow for customers (#61007)
* Prg-81-implement-logic-for-opening-store-and-receiving-messages (#60702)

* Add new self hosted upsell flow path

* Add upsell flow hook

* Add company name to params passed to store

* Update url parameters to snake case

* Remove redundant ampersand

* Clean up useEffect dependencies

* Add store origin to token activation message

* Improve put token mock

* Snake case return_url param

* Update messages' types

* Add source check on event

* Use dynamic store value (#60865)

* Create selector for store url

* Use dynamic store value in use upsell flow

* Improve store url selector

* Create useStoreUrl hook and deprecate getStoreUrl selector

* Increase the timeout of toast messages (#60966)

* increase the timeout of toast messages

* Send notification even if reference to store window was lost

* Add metabase window name (#60964)

* Prg-91-migrate-upsell-components-to-support-ee-upsell-flow (#60850)

* Enhance upsell functionality by adding onClick support to UpsellBanner and integrating useUpsellFlow in admin settings

Fix function name

* Use match pattern in UpsellBanner

* Add Upsell baner with click stories and tests

* Add upsell flow to dev instances banner

* Integrate upsell flow into UpsellBanner components

* Fix unrelated tests

* Improve the test assertion

* Prg-95-migrate-upsellcard-to-the-new-upsell-flow (#60989)

* Add onClock to UpsellCard component

* Migrate UpsellCard components to use self hosted upsell flow

* Disable new flow in dev instances upsell (#61048)

* Allow overriding store-url in dev env (#60967)

* Fix upsell flow with undefined store variable (#61056)

* Show failure toast even if connection with store was lost

* Add store-url to e2e default db setup

* Allow undefined store-url value in use upsell flow

* Fix failing unit tests

* Prg 96 migrate upsellbigcard to the new upsell flow (#61063)

* Migrace BigCard to use onClick

* Migrate BigCard upsells

* Add onClick to UpsellPill (#61076)

* Prg-104-run-the-new-upsell-flow-only-for-self-hosted-mb-instances (#61122)

* Disable new upsell flow on hosted instances

* Fix wrong match on UpsellBigCard

* Use getIsHosted selector

add test

* Fix e2e test - selecting upsell button

* Fix extra toast triggered with new upsells

* Add upsell flow to embedding ugprade link, remove binary notice from EE self serve (#61207)

* Fix typos

* Use existing link styles
2025-07-24 20:09:14 +02:00
Cam Saul
f197cbb591 lib/order-by should ignore duplicates (QUE-1604) (#61402) 2025-07-24 10:47:35 -07:00
bryan
85e8bcbc3d add CLA-passing email and name for bump commit (#61277) 2025-07-24 11:37:16 -06:00
bryan
50d9b94ccb run only when the Type:Documentation label set (#61427) 2025-07-24 17:25:20 +00:00
Phoomparin Mano
aa7ced174f feat(sdk): do not show "New Question" as fallback for new question (#61015) 2025-07-25 00:10:38 +07:00
bryan
7de1211bab mage -escherize-pr-summary (#61352) 2025-07-24 09:53:22 -07:00
Phoomparin Mano
fd5a433265 fix(sdk): hide the "back to previous results" button in questions (#61018) 2025-07-24 23:48:46 +07:00
Cam Saul
1bd2398307 Fix conversion of joins with :fields in last stage to legacy (QUE-1603) (#61401) 2025-07-24 09:08:59 -07:00
Nicolò Maria Mezzopera
2dc4715824 chore: Refactor sync wait times to use a constant for delay and adjus… (#61415)
* chore: Refactor sync wait times to use a constant for delay and adjust retry limits

* Update e2e/support/helpers/e2e-qa-databases-helpers.js
2025-07-24 14:38:32 +00:00
Edward Paget
e07751fe9e fix: flake dashboard card test (#60146) 2025-07-24 14:23:48 +00:00
Edward Paget
3cde309b3c fix: make test not parallel to avoid flake (#61327) 2025-07-24 09:05:00 -05:00
Kamil Mielnik
a1a437bd26 SEM-526 Filtering preview crashes when table is hidden (#61265)
* Fix crash

* Add test

* Update comment
2025-07-24 13:42:45 +00:00
Kamil Mielnik
59d8776683 SEM-362 Table picker should render anchor elements (#61272)
* Fix tags invalidation for bulk tables update

* Add MassTableVisibilityToggle

* Render mass toggle for schemas

* Add the button for dbs
- fix not-currently-selected branches in the tree not updating

* Fix types

* Align icon

* Align chevron icon

* Always show the toggle button for hidden tables

* Change color of hidden tables

* Only use ids of relevant tables

* Add tests

* Add test

* Take all visibility options into account

* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle

* Fix color

* Render table picker items as anchors

* Remove measuring elements as elements have constant size

* Fix types and tests

* Add test
2025-07-24 20:06:33 +07:00
github-automation-metabase
f5e92dbce9 Bump org.apache.commons/commons-lang3 from 3.17.0 to 3.18.0 (#60901)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-24 15:30:04 +03:00
Oisin Coveney
fea73a4f5c Rename InteractiveQuestion symbols to SdkQuestion (#61213) 2025-07-24 12:07:08 +00:00
Uladzimir Havenchyk
3a7474eadc Revert "drop typescript-plugin-css-modules with stylus dependency to unblock …" (#61391)
This reverts commit 8a4c87a136.
2025-07-24 10:56:11 +00:00
Timofey Kachalov
967745c312 Adjust API docs sort order respecting the kind (#61407) 2025-07-24 13:17:15 +04:00
Cam Saul
0cf80c77f2 [Lib] Finish removing idents (#61310)
* [Lib] Finish removing idents

* Fix Kondo warnings

* cljfmt

* Another pass at fixing Kondo warnings

* Test fix 🔧

* Test fix 🔧

* Test fixes 🔧

* A few more fixes 🔧

* Another pass

* Test fix 🔧

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧
2025-07-23 19:17:23 -07:00
Gustavo Saiani
09e2ee40e7 Update links (#61356) 2025-07-23 20:21:06 -03:00
Fraser
994e2ff647 Translate boolean content (#61366) 2025-07-24 10:32:21 +12:00
Fraser
afabd18f56 Add CLAUDE.md and copilot-instructions.md (#61313)
* Add CLAUDE.md and copilot-instructions.md
2025-07-24 10:32:08 +12:00
github-automation-metabase
a5e13bedd8 Bump org.postgresql/postgresql from 42.7.5 to 42.7.7 (#59518)
Inspect dependency changes here: https://github.com/pgjdbc/pgjdbc/blob/REL42.7.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-23 21:23:40 +00:00
bryan
5085f8ee19 rewrite clj-kondo/ignore for consistency (#61372) 2025-07-23 14:59:39 -06:00
Phoomparin Mano
341e81611e Migrate the new embed flow's snippets to use custom elements (#61330) 2025-07-23 20:38:46 +00:00
github-automation-metabase
22ddd2cba8 Bump djblue/portal from 0.59.1 to 0.59.2 (#61246)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.59.2/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 14:27:31 -06:00
bryan
3df17fd3a8 Add custom and default responses to openapi docs (#61339) 2025-07-23 13:39:29 -06:00
bryan
c3dbced191 [github actions] skip pngs optimize for merges (#61378) 2025-07-23 13:26:35 -06:00
dpsutton
8e836010fb Extra logging for temp storage (#61342)
Suspecting that instances OOM due to loading these into
memory. Increasing context and logging to help diagnose this:

When running tests:

```
clj -X:dev:test :only '["test/metabase/notification" "test/metabase/pulse"]'
...
DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 57167}
[main] DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 718167}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
```

Adding an optional preamble that is just `pr-str`'d and logging a human
readable size of the file that is saved
2025-07-23 14:26:17 -05:00
Jeff Bruemmer
634c7942cd docs - join expressions (#61376) 2025-07-23 19:20:46 +00:00
Alex Yarosh
5cdf070465 Update impersonation.md (#61380) 2025-07-23 15:15:46 -04:00
Cam Saul
f1c7740a45 add-dimension-projections middleware => Lib (#61349)
* add-dimension-projections middleware => Lib (#39877)

* Ban mt/with-column-remappings inside QP tests

* Update pivot QP code to not convert to legacy

* Rename middleware

* Use the remap metadata provider in sandboxing tests
2025-07-23 09:59:33 -07:00
github-automation-metabase
df80eb95b6 Bump commons-validator/commons-validator from 1.9.0 to 1.10.0 (#60899)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 16:40:36 +00:00
github-automation-metabase
a525192b0b Bump org.apache.logging.log4j/log4j-jcl from 2.24.3 to 2.25.1 (#60905)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 10:30:34 -06:00
Ryan Laurie
07f1e62fae correct ci skip label check (#61370) 2025-07-23 16:13:48 +00:00
Anton Kulyk
b614b303ea Fix sorting dashboard header filters (#61220) 2025-07-23 15:56:14 +01:00
Nicolò Pretto
739e461866 skip assigning milestones to embed sdk PRs, closes EMB-658 (#61361) 2025-07-23 15:43:53 +02:00
Nicolò Maria Mezzopera
cd987d88a7 feat: await for async setup function (#61365) 2025-07-23 14:11:05 +02:00
Uladzimir Havenchyk
8a4c87a136 drop typescript-plugin-css-modules with stylus dependency to unblock builds (#61362) 2025-07-23 10:36:38 +01:00
Nicolò Pretto
f3953111ce fix unknown prop handleAxis on SdkIframeEmbedSetup (#61335) 2025-07-23 07:55:13 +00:00
Kamil Mielnik
d1345439f9 Remove unused functions (#61320)
* Remove fetchRealDatabasesWithMetadata

* Remove fetchTables

* Remove useActionListQuery
2025-07-23 14:00:08 +07:00
Sébastien
73b8863eb6 Closes VIZ-703 formatting of time values is incorrect (#61195) 2025-07-23 05:28:07 +02:00
Aleksandr Lesnenko
783d3ceca4 update parameters UI (#60746)
* update parameter styles, keep only one variant

* review

* specs

* Update Loki Snapshots

* lint

* tweak ui

* Update Loki Snapshots

* review

* fix spec

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-23 00:58:37 +00:00
bryan
6d31996556 add CLA-signed metabase automation user git config (#61350) 2025-07-22 22:54:46 +00:00
github-automation-metabase
f3f462d9cc Bump org.jsoup/jsoup from 1.20.1 to 1.21.1 (#60249)
Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.21.1/CHANGES.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-22 16:47:10 -06:00
Jeff Bruemmer
1f0b41a30b add upgrade guide for SDK (#61031) 2025-07-22 20:18:57 +00:00
github-automation-metabase
1880b20c34 Bump com.amazonaws/aws-java-sdk-core from 1.12.785 to 1.12.788 (#61252)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-22 13:41:26 -05:00
Jeff Bruemmer
37cfdcfd3e docs - script to generate country codes table. (#61329)
* script to generate country codes

* link
2025-07-22 16:03:56 +00:00
Brad Anderson
a7ecc9e669 Closes VIZ-1311 - Slow loading dashcards with no average query duration shows 0 (#61035)
Tweaks slow-loading hover cards
2025-07-22 12:03:44 -04:00
Ryan Laurie
fda455fabc Enable CI skipping on PRs (#61307)
* dont run tests on pr with ci skip

* static viz too

* label instead of title
2025-07-22 09:47:26 -06:00
Sébastien
5d5f73f403 Closes VIZ-46 number formatting for remapped columns (#61201) 2025-07-22 17:35:54 +02:00
Sloan Sparger
7304c050ab [Metabot] Ensure state is saved on streamed responses (#61282) 2025-07-22 09:58:20 -05:00
github-actions[bot]
e8dee796db Update translations 2025-07-22 (#61314)
* Update translation sources 2025-07-22

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-07-22 14:55:23 +00:00
eliotmetabase
3e605c6d87 Update uberjar.yml to remove unused branches (#61306)
Remove branches that no longer exist from uberjar workflow to clean it up a bit
2025-07-22 09:00:23 -05:00
Brad Anderson
1fc73ccc47 Closes VIZ-1318 - Visualize in another way uses the Card Definition rather than the Dashboard Card (#61230)
Changes how the bug is fixed from trying to send parameters to using dataset fallbacks if a query fails
2025-07-22 09:29:14 -04:00
Ngoc Khuat
3441035d2d port the condition expression to master (#61045) 2025-07-22 09:57:12 +00:00
Oleksandr Solovyov
d530b9a45c hashp without stdout redirect (#61315) 2025-07-22 09:30:50 +00:00
github-automation-metabase
5be18b9afd Bump hiccup/hiccup from 1.0.5 to 2.0.0 (#59908)
Inspect dependency changes here: https://github.com/weavejester/hiccup/blob/2.0.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-22 07:45:53 +00:00
Fraser
0a61f6688f Move Content Translation settings and tweak copy (#61039) 2025-07-22 14:27:21 +12:00
Tyler Plude
6421b4187e Add tsplude to metabot team (#61286) 2025-07-21 17:45:15 -07:00
Cam Saul
40ce015882 Overhaul add-implicit-joins, fix/consolidate metadata normalization and other issues (#61168)
* Overhaul add-implicit-joins middleware

* Restore the wacko metadata updating code

* Ok, joins ARE allowed to have :fields.

* Fix JS tests 🔧

* Fix QUE-1563

* Test fixes 🔧

* Fix 100 more broken things

* Test fixes

* Use same distinct-ref logic as lib

* More test fixes 🔧

* Make add-alias-info better at matching things

* Consolidate the legacy result metadata schemas

* cljfmt

* Use `:decode/normalize` in the REST API for boring things like metadata

* Another round of test fixes 🔧

* Restore kondo ignore

* Another round of test fixes 🔧

* cljfmt

* PR feedback 🔧
2025-07-21 13:54:28 -07:00
github-automation-metabase
b7d02f7d6c Bump commons-io/commons-io from 2.19.0 to 2.20.0 (#61245)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-21 19:30:06 +00:00
Chris Truter
bf0624f700 Lint against incorrect time elapsed measurements (#61169) 2025-07-21 17:36:46 +00:00
Nicolò Maria Mezzopera
9f823bd747 chore: remove cy.wait in favour of waiting for element presence (#61226)
* chore: remove wait in favour of waiting for modal to disappear

* feat: wait for query to be completed to possibly avoid DB race condition

* feat: wait for the table name to be shown in the ui before clicking it

* chore: removed un-needed waits

* Update e2e/test/scenarios/admin/admin-reproductions.cy.spec.js

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-07-21 17:26:39 +00:00
Aleksandr Lesnenko
f881594d61 fix timeline events merging logic (#61239) 2025-07-21 13:02:29 -04:00
Romeo Van Snick
8401e8715d Disable :case and :coalesce type-compatibility checks (#61279)
* Disable :case and :coalesce type-compatibility checks

* Skip test
2025-07-21 16:56:26 +00:00
Jakub Chodorowicz
1cd2a7dafe Fix flaky SettingsPage test (#61009)
* Fix flaky SettingsPage test

* Use role selector
2025-07-21 17:44:14 +02:00
Romeo Van Snick
cd77efaf80 Relocate expressions code (#61120)
* Move expression widget into subfolder

* Import expression components from top-level

* Move expression helpers to metabase/querying/expressions

* Fix fuzzing paths

* Fix comment

* Add missing exports from expressions

* Remove unused exports

* Sort exports

* Add helper to get supported clauses

* Rename complete to suggestions for consistency

* Move tokenAtPos to position module

* Move assertion helpers to utils

* Split up pratt/types

* Use token text instead of slicing source

* Remove superflouous from and to on token

* Remove superflouous from, to and len on token

* Remove content helper

* Remove superflous fields on Token

* Rename compiler to compile-expression

* Fix imports

* Fix exports

* Remove eslint directives

* Move FK_SYMBOL to formatting/constants

* Use () => undefined instead of jest.fn
2025-07-21 17:35:57 +02:00
Brad Anderson
e50e3ddad8 VIZ-1287 Adds pressed state for visualizer Settings button (#61101) 2025-07-21 11:25:40 -04:00
Alexander Polyankin
b6174a8a0c Make Booleans work without Category (#61202) 2025-07-21 15:10:24 +00:00
github-actions[bot]
4956974743 Update translations 2025-07-17 (#61144)
* Update translation sources 2025-07-17

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jacob Joseph <likeshumidity@users.noreply.github.com>
2025-07-21 14:49:44 +00:00
Sébastien
2c2863cb9d Update team.json (#61254) 2025-07-21 16:32:54 +02:00
Kamil Mielnik
1e22b1971c SEM-505 The Preview button should be more noticeable and accessible (#61260)
* Move buttons into the sticky container, make preview button always present

* Update tests

* Make the preview button toggle the state
2025-07-21 21:19:45 +07:00
Rodrigo López Dato
0ff7a8887c Fix "Docker Hub" capitalization (#61268) 2025-07-21 11:03:48 -03:00
Kamil Mielnik
4e04711a2d Mass hide/unhide tables (#61206)
* Fix tags invalidation for bulk tables update

* Add MassTableVisibilityToggle

* Render mass toggle for schemas

* Add the button for dbs
- fix not-currently-selected branches in the tree not updating

* Fix types

* Align icon

* Align chevron icon

* Always show the toggle button for hidden tables

* Change color of hidden tables

* Only use ids of relevant tables

* Add tests

* Add test

* Take all visibility options into account

* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle
2025-07-21 13:56:15 +00:00
Romeo Van Snick
f38a0f6769 Allow supression of case and coalesce arg typechecks (#61264)
* Allow supression of case and coalesce arg typechecks

* Add test for ignored type-check

* Configure *suppress-expression-type-check?* in tests

* Fix formatting
2025-07-21 15:44:39 +02:00
Oisin Coveney
7e1ab4e2c7 Make sure that user plugin dashcard menu has priority over default menu (#61262) 2025-07-21 15:56:02 +03:00
Oisin Coveney
13d4abff0b Fix dashboard loading state for empty dashboards (#61052) 2025-07-21 14:46:30 +03:00
Ngoc Khuat
f1f175e4e5 Reversion the migration to fix v_alerts from 56 to 55 (#61161) 2025-07-21 12:42:36 +02:00
Nicolò Pretto
f4ac64fd80 Hide sample database mentions in <DatabaseForm> in the embedding setup (#61067)
* refactor DatabaseForm to fix unwanted changes to the embedding setup

* text-secondary

* clean up types
2025-07-21 11:00:05 +02:00
Kamil Mielnik
ff7eb5f1f5 SEM-497 Filtering preview inputs get auto-focused (#61190)
* Add autoFocus prop to filter components

* Disable autoFocus in preview

* Update unit tests

* Add test
2025-07-21 14:23:18 +07:00
Fraser
b241401b2d Fix Cloud SMTP Connection Card styling (#61115) 2025-07-21 09:41:31 +12:00
William
fea9b59511 Allow field filters and time groupings to specify an alias (#61118)
As is, field filters and time groupings assume that they can just refer to the field normally.  In queries where aliases are
used/required, this doesn't work so well.  Letting users specify the alias to use in place of the normal field
reference handles this case.

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-07-18 14:34:41 -05:00
Sloan Sparger
0374a8ac42 [Metabot] Improve loading experience logic (#61173)
* improve loading experience logic and fix bug where there are tool calls without messages causing messages to get cramed together with no space

* add a unit test
2025-07-18 14:03:46 -05:00
Aleksandr Lesnenko
d43c0a418b Fix visualizer cards crash due to inability to find the x-axis dimension column (#61180)
* fix visualizer cards crash

* reapply metabase#60892

* spec
2025-07-18 14:37:43 -04:00
Nick Fitzpatrick
d3435af399 Change styling for Home Help Component (#60180)
* Updating HomeHelpCard

* remove duplicated style
2025-07-18 15:02:22 -03:00
Alexander Polyankin
43ff1d6a13 Multiple values for native query parameters (#60984) 2025-07-18 17:45:33 +00:00
Nicolò Pretto
c4aca6545e fix(sdk): when starting from an entity id dashboard, use the numeric id (#61188)
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-18 22:18:52 +07:00
Uladzimir Havenchyk
f7288acbfe test: ensure popover contains delete permanently in trash (#61199) 2025-07-18 17:46:45 +03:00
Nicola Mometto
c57656fbfa Bigquery nested fields fix (#61193)
* scope by table-name

* add test
2025-07-18 15:09:44 +01:00
bryan
f24a7fdc18 crush every docs png in the repo (#61172) 2025-07-18 13:51:57 +00:00
Alberto Perdomo
22e6fd8d57 Update SDK NPM link in docs (#61192) 2025-07-18 15:17:13 +02:00
Nick Fitzpatrick
52d9ba6670 adjusting layout for <Tab.Tab> and <Button> components (#60992)
* adjusting layout for <Tab.Tab> and <Button> components

* update UserListElement
2025-07-18 09:55:36 -03:00
Uladzimir Havenchyk
0c2dddf2bc test: fix another flakiness in model re-mapping test (#61186) 2025-07-18 15:37:00 +03:00
Kamil Mielnik
aa691b0888 SEM-501 Add warning when multiple Entity Name field semantic types exist on the same table (#61148)
* Add warning

* Show prefixes

* Add test
2025-07-18 12:07:58 +02:00
Anton Kulyk
037cd61c9e Allow "focusing" a recently moved dashboard filter (#61085)
* Add `extraAction` prop to `undo` object

* Make `setEditingParameter` switch tab if needed

* Put a dashboard filter in the viewport

* Fix toast text appearance

* Hide "Show filter" button when moving to top nav

* Add e2e test

* Fix tests
2025-07-18 10:57:48 +01:00
Kamil Mielnik
5e08c9e9e1 SEM-390 Change copy of "Duration" to "Reset to defaults after" for log level customization (#61183)
* Update copy

* Update copy

* Bring back non-numeric prefix

* Reduce flickering (thanks @romeovs)

* Fix test
2025-07-18 16:42:34 +07:00
Oisin Coveney
2568336e90 Make ArchivedEntityBanner a context component (#60939) 2025-07-18 10:40:10 +03:00
Uladzimir Havenchyk
0ba623e4ba test: fix flakiness in model mapping test (#61146) 2025-07-18 10:39:14 +03:00
Vamsi Peri
4ff56367f9 Fix transparent background for SQL editor autocomplete suggestions (#61178)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-17 21:43:47 -04:00
Tyler Plude
c1484f5f57 Sort currency options by name not code (#60794)
* fix currency sort order in settings dropdown

* Preserve priority currency order; apply sort helper to other currency select inputs

* currency.js -> currency.ts

* move sort to cljc; revert FE changes

* rm unnecessary comment
2025-07-17 18:15:46 -07:00
Aleksandr Lesnenko
59193a2267 sort parameters in subscription sidebar (#61119) 2025-07-17 20:28:23 -04:00
Sloan Sparger
fb99cfcdc6 [Metabot] Fix horizontal scrollbar when response contains code (#61174) 2025-07-17 18:57:26 -05:00
Aleksandr Lesnenko
cfb3d5ad2e improve getParameterMappingOptions (#61113) 2025-07-17 19:43:49 -04:00
Tyler Plude
9eb27dc5c9 VIZ-1281 - Fix include-current for dashboard parameters (#60890)
* Pass parameter format options to lib

* pr feedback
2025-07-17 15:51:13 -07:00
dpsutton
9753a8a64d Ensure postgres downloads don't OOM (#60807)
* Ensure postgres downloads don't OOM

Fixes https://github.com/metabase/metabase/issues/60733

For performance reasons we set autocommit to true. this has an
unfortunate consequence that the postgres driver does not honor batch
sizes. We go through a lot of trouble to hook the streaming results of a
query to the output stream of the download, but the postgres jdbc driver
will realize all rows in memory.

A fast way forward is to set autocommit to false only when
`write?` (previous condition) or when executing a postgres download, as
reported in https://github.com/metabase/metabase/issues/60733.

How to test:
this is difficult. In CI we use

```clojure
  :ci
  {:jvm-opts ["-Xmx12g"
              "-Xms12g"
```

So hitting a query that would deterministically OOM the instance
requires a lot more muscle than we realistically want to use.

I'm running the following tests locally:

```
  :small-ram
  {:jvm-opts ["-Xmx400m"
              "-Xms400m"
              "-Dci=TRUE"]}
```

```clojure
(defn- readable [bytes]
  (cond (nil? bytes)  "0 bytes"
        (zero? bytes) "0 bytes"
        :else
        (let [units ["b" "kb" "mb" "gb" "tb"]
              magnitude   1024.0]
          (loop [[unit & remaining] units
                current (double bytes)]
            (if (and (seq remaining) (> current magnitude))
              (recur remaining (/ current magnitude))
              (format "%.1f %s" current unit))))))

(defn- consume
  [^java.io.InputStream is]
  (let [arr (byte-array 8024)]
    (loop [c 0, gas 5000000]
      (let [r (java.io.InputStream/.read is arr 0 (alength arr))]
        (cond (zero? gas)
              (throw (ex-info "Ran out of gas" {}))
              (neg? r) c
              :else (recur (+ c r) (dec gas)))))))

(deftest large-csv-test
  (mt/test-driver :postgres
    (testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
      (let [large-query "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
            result (mt/user-real-request :crowberto :post 200 "dataset/csv"
                                         {:request-options {:as :stream}}
                                         {:query       (mt/native-query
                                                        {:query large-query})
                                          :format_rows true})
            size (consume result)]
        (is (> size 2000000000)
            (format "Only consumed %s but expected ~2gb" (readable size)))))))
```

and then

```
❯ time source pg.env && DRIVERS=postgres clojure -X:dev:test:small-ram :only metabase.driver.postgres-test/large-csv-test

Running QP tests against these drivers: #{:postgres}

LONG TEST in metabase.driver.postgres-test/large-csv-test
Test took 23.358 seconds seconds to run

Ran 1 tests in 32.825 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 32825.099875, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 40.7 s.
All tests passed.
Running after-run hooks...
```

Why not add these tests now?
We probably should write a full memory regression suite. This is a great
candidate for a first one. But it seems silly to run a new CI job with
just this one job. Push back if you think i'm wrong.

Another area of pushback:
I took the lazy way when determining if a driver should have autocommit
set to false or not: i hardcoded it.

```clojure
(and (-> options :download?) (= driver :postgres))
```

The alternative is some method of a new driver multimethod or
driver-supports?. The former feels a bit heavy-weight, the latter feels
not quite right since this is almost a non-support and all other jdbc
drivers do support it, presumably?

I'm quite open to pushback here and invite comments if you see a better way.

* Can't use an if for write?

You'd think you can use an if here but the previous code used a when and
is silent on write?. Lots of tests fail relating to datasets in test
setup and uploads. Don't want to debug that in this bug fix context so
leaving a todo

* remove old arity metadata. thanks eastwood!

* Don't set autoCommit for all postgres and descendant drivers

```clojure
(ns ^:mb/memory metabase.memory.csv-test
  (:require
   [clojure.test :refer :all]
   [metabase.test :as mt]
   [metabase.driver :as driver]))

(set! *warn-on-reflection* true)

(defn- readable [bytes]
  (cond (nil? bytes)  "0 bytes"
        (zero? bytes) "0 bytes"
        :else
        (let [units ["b" "kb" "mb" "gb" "tb"]
              magnitude   1024.0]
          (loop [[unit & remaining] units
                 current (double bytes)]
            (if (and (seq remaining) (> current magnitude))
              (recur remaining (/ current magnitude))
              (format "%.1f %s" current unit))))))

(defn- consume
  [^java.io.InputStream is]
  (let [arr (byte-array 8024)]
    (loop [c 0, gas 5000000]
      (let [r (java.io.InputStream/.read is arr 0 (alength arr))]
        (cond (zero? gas)
              (throw (ex-info "Ran out of gas" {}))
              (neg? r) c
              :else (recur (+ c r) (dec gas)))))))

(def driver->query
  {:sqlite "WITH RECURSIVE generate_series(value) AS (
  SELECT 1
  UNION ALL
  SELECT value + 1 FROM generate_series WHERE value + 1 <= 1000000
)
SELECT replace(hex(zeroblob(1024)), '00', 'xx') FROM generate_series;"
   :postgres "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
   :clickhouse "SELECT repeat('x', 2048)
FROM system.numbers
LIMIT 1000000;"
   :redshift "WITH series AS (
  SELECT ROW_NUMBER() OVER () as i
  FROM stl_scan s1, stl_scan s2
  LIMIT 1000000
)
SELECT REPEAT('x', 2048) FROM series;"})

(deftest large-csv-test
  (mt/test-drivers #{:postgres :sqlite :clickhouse :redshift}
    (testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
      (let [large-query (or (driver->query driver/*driver*)
                            (throw (ex-info "Driver doesn't implement big query"
                                            {:driver driver/*driver*
                                             :available (keys driver->query)})))
            result (mt/user-real-request :crowberto :post 200 "dataset/csv"
                                         {:request-options {:as :stream}}
                                         {:query       (mt/native-query
                                                        {:query large-query})
                                          :format_rows true})
            size (consume result)]
        (is (> size 2000000000)
            (format "Only consumed %s but expected ~2gb" (readable size)))))))

(comment
  (mt/set-test-drivers! #{:postgres})
  (mt/set-test-drivers! #{:sqlite})
  (mt/set-test-drivers! #{:clickhouse})
  (mt/set-test-drivers! #{:redshift})
  (mt/test-drivers #{:redshift}
    (mt/db))

  )

```

Verify this with

```
  :small-ram
  {:jvm-opts ["-Xmx400m"
              "-Xms400m"
              "-Dci=TRUE"]}
```

and then

```
;; driver.env:
;; local clickhouse
export MB_CLICKHOUSE_TEST_password="password"
export MB_CLICKHOUSE_TEST_username="default"

;; local postgres
export MB_POSTGRESQL_TEST_USER=dan

export MB_REDSHIFT_TEST_PASSWORD=<value>
export MB_REDSHIFT_TEST_USER=<value>
export MB_REDSHIFT_TEST_DB=<value>
export MB_REDSHIFT_TEST_HOST=<value>
```

and then running:

```
❯ source driver.env && DRIVERS=redshift clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running tests in metabase.memory.csv-test/large-csv-test
Finding tests took 8.3 s.
Running 1 tests
Running before-run hooks...
Running QP tests against these drivers: #{:redshift}
..
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 188.320 seconds seconds to run

Ran 1 tests in 188.338 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 188337.678584, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 3.3 mins.
All tests passed.
Running after-run hooks...
```

redshift takes a while.

contrast with

```
❯ source driver.env && DRIVERS=clickhouse,postgres clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running QP tests against these drivers: #{:postgres :clickhouse}
...
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 46.638 seconds seconds to run

Ran 1 tests in 46.655 seconds
4 assertions, 0 failures, 0 errors.
{:test 1, :pass 4, :fail 0, :error 0, :type :summary, :duration 46655.436333, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 56.5 s.
All tests passed.
Running after-run hooks...
```

both running locally happen in ~1 minute compared to 3 minutes for redshift

* Remove commented out old arity

this funciton used to have two arities for clarity. But it wasn't
another entrypoint, it was just trying to keep things a bit cleaner. But
the result is that at the point where we used the string sql query we
didn't have the `info` map in lexical scope. Fixing this across arities
would have pushed us into 7 positional args, so you might want to switch
to a map, but honestly, it's just the same function.
2025-07-17 17:06:12 -05:00
Cam Saul
ea6a639b63 [Lib] Remove idents part 4 (#61149)
* [Lib] Remove idents part 4

* Kondo
2025-07-17 14:38:30 -07:00
bryan
2454ab7188 Mage Token Git Precommit Scanner (#60729)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-17 12:41:22 -06:00
Uladzimir Havenchyk
517f98bf5c test: fix flakiness in visualizer test (#61104) 2025-07-17 20:19:24 +03:00
Kamil Mielnik
0e75b6bbac SEM-463 Responsive buttons (#60928)
* Add ResponsiveButton component

* Prevent focus state being cut off

* Make the buttons responsive in the table section

* Make the buttons responsive in field section

* Extract useResponsiveButtons

* Add comments

* Extract useResponsiveButtons in FieldSection

* Add aria-label to the button

* Add tests

* Test tooltips

* Fix indent
2025-07-17 17:17:44 +00:00
Timofey Kachalov
82bad2ee19 Fix positioning of the Mantine Modal in SDK (#60917) 2025-07-17 20:54:03 +04:00
Phoomparin Mano
87afb2783f Reduce flakiness in new iframe embed locale test (#60973) 2025-07-17 23:33:03 +07:00
Anton Kulyk
ca73c4406e Add dashboard_filter_moved analytics event (#61084)
* Add `dashboard_filter_moved` analytics event

* Update event
2025-07-17 17:17:49 +01:00
Kamil Mielnik
e0e25ed230 Fix SEM-499 (#61131) 2025-07-17 23:11:57 +07:00
Cam Saul
2505c039bf [Lib] remove 'idents' part 3 (#60875)
* [Lib] remove 'idents' part 1

* [Lib] remove idents part 2

* [Lib] remove idents part 3

* Update tests

* Remove ident-related tests for Cards

* Remove more ident tests

* Remove more ident-related tests

* Fix Kondo warnings
2025-07-17 08:10:14 -07:00
Jeff Bruemmer
f2ce68cd98 Update saml-google.md (#61137) 2025-07-17 10:58:59 -04:00
Sloan Sparger
dc5ed72564 [Metabot] Add new teammates to Team Metabot (#61143) 2025-07-17 09:53:08 -05:00
Anton Kulyk
58717801ec Add "Move filter" menu (#60784)
* Add "move filter" menu

* Add undo

* Handle single tab dashboards

* Update text color for checked items

* Fix collapsed menu appearance

* Add tests

* Fix error when a tab doesn't have any dashcards

* Fix "Top of page" option selected color

* Use "card.title" viz setting

* Truncate long card titles

* Update "Disconnect from cards" button appearance

* Fix type error

* Make the select searchable, touch up on appearance

* Fix e2e test

* Add `moveDashboardFilter` helper

* Fix e2e test name

* Remove subtitles

* Update icon color

* Update icon color
2025-07-17 15:49:22 +01:00
bryan
92d757b132 Mage jar-download custom dir fix (#61138) 2025-07-17 14:48:37 +00:00
Nicolò Pretto
ff702a180c skip sdk compat tests as they're failing (#61136)
* skip sdk compat tests as they're failing

* make the yml pass validation
2025-07-17 14:35:22 +00:00
Phoomparin Mano
878fc256b6 Do not update new iframe embed flow preview if the same resource is chosen (#61014) 2025-07-17 20:41:16 +07:00
Alexander Polyankin
edfb5fe39c Make temporal unit variables work like regular variables (#60995) 2025-07-17 09:32:36 -04:00
Kamil Mielnik
d626289c81 SEM-512 It would be great if all toasts in Table Metadata had an Undo (#60974)
* Add undos in FieldSection

* Add undos in FormattingSection

* Add undos in MetadataSection

* Add undos in FieldItem

* Organize TableVisibilityToggle

* Add undos in BehaviorSection

* Add undos in TableSection

* Add trim()

* Never pass 2nd argument in onChange callbacks from Select

* Add undos in DataSection

* Fix SEM-499

* Add undos in RemappingPicker

* Reduce duplication

* Simplify code

* Rename

* Prevent undo loops in FieldSection

* Remove redundant param

* Refactor toasts in FieldSection

* Prevent undo loops in FormattingSection

* Prevent undo loops in MetadataSection

* Prevent undo loops in BehaviorSection

* Prevent undo loops in DataSection

* Prevent undo loops in TableSection

* Prevent undo loops in FieldItem

* Prevent undo loops in TableVisibilityToggle

* Prevent undo loops in RemappingPicker

* Reuse useMetadataToasts

* Fix types

* Fix undoing semantic type

* Update unit tests

* Update NameDescriptionInput unit tests

* Simplify argument

* Update tests, fix viz formatting inputs not respecting prop updates

* Revert "Fix SEM-499"

This reverts commit bb9f098433.

* Add more tests

* Avoid casting

* Remove redundant cast
2025-07-17 12:30:33 +00:00
Chris Truter
0adf8b5d5b Refresh Search index after loading serialized entities (#61053) 2025-07-17 12:12:33 +00:00
Oisin Coveney
9a6113cff5 Rename files, components, and types to SdkQuestion (#60996) 2025-07-17 15:12:06 +03:00
Oisin Coveney
59c1d93c76 Convert dashboard sidebar components to use dashboard context (#60715) 2025-07-17 14:56:45 +03:00
Kamil Mielnik
ff989915fb Fix flaky test (#61126) 2025-07-17 18:50:07 +07:00
Kamil Mielnik
19e9ec0cd3 SEM-503 + SEM-504 + SEM-509 + SEM-510 Micro UI/UX improvements (#60970)
* SEM-503 Add blue border to selected field

* SEM-504 Border radius of table/field name and description boxes should match that of setting cards

* SEM-509 Improve microcopy for table and field editing instructions

* SEM-510 Field descriptions could use "paragraph" text style with greater line height
2025-07-17 14:12:36 +07:00
Cam Saul
f67919695d MBQL 5 normalization should automatically add options maps (#61081) 2025-07-16 17:56:11 -07:00
Cam Saul
466f7879da [Lib] remove 'idents' part 2 (#60874)
* [Lib] remove 'idents' part 1

* [Lib] remove idents part 2

* Remove ident-related tests for Cards

* Remove more ident-related tests

* Fix Kondo warnings
2025-07-16 17:55:35 -07:00
Alexander Polyankin
bdfae3d613 Boolean variables in native queries (#60991) 2025-07-16 19:41:56 -04:00
Sloan Sparger
424bb4d19e [Metabot] Add text for search tool when being called (#61099) 2025-07-16 16:54:21 -05:00
Riley Thompson
b75ef21b91 Enable DB routing for BigQuery (#60516)
* save

* revert redshift changes

* kondo

* add ci routing var

* redshift rough work

* cleanup bigquery changes

* remove bigquery specific redefs and bindings

* add separate var for dataset

* custom routing info per driver

* update changelog

* cljfmt

* fix fe lint

* use deferred-tru

* dissoc db_routing_info for tests

* fix other tests

* fix kondo and lint

* use yaml

* fix whitespace

* change log

* kondo and eastwood

* use markdown for routing info

* remove unneeded driver method

* cleanup

* fix tests

* fix remaining test

* add fe test

* add extra info in register-lazy-loaded-driver

* address pr comment

* improve doc string

* add text-secondary color to database info markdown

* update markdown

* alphabetical order

* move db routing info from db to session properties

* FE adjustments

* dont parse extra info

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-07-16 17:20:26 -04:00
Tyler Plude
3f01f61624 VIZ-1048 - Visualizer Data Importer Improvements (#59139)
* poc

* timing logs

* Only render compatible datasets

* Build uberjar to be able to test in cloud with more data

* search index support for display

* search index support for exclude-display and has-temporal-dimensions

* fix weird filter vs index column bug

* fix temporal filter

* required ids search index filter

* fix build by removing :display from search render-terms

* adding h2 compatibility

* fixing alignment

* whitespace

* all clicks are add clicks now

* reverted labels change

* whitespace

* whitespace

* mutation -> query, load compatibles at startup

* using viz icons in dataset list

* remove exclude_display

* consolidate search endpoint

* rename display param to display_type

* allignment

* fix filter tests

* test fixes

* Closes VIZ-1185: revert "using viz icons in dataset list"

This reverts commit 7f4d177e977643f90250a5add2f946d6f35ad2a0.

* closes VIZ-1184 copy for "no results"

* closes VIZ-1183 spacing between input and results

* removed log statement

* fixed type

* fixed basics.cy.spec.ts

* fixed dashboard-questions.cy.spec.js

* fixed sharing-reproductions.cy.spec.js

* fixed snowplow-tracking.cy.spec.ts

* fixed funnels.cy.spec.ts

* fixed others

* fix import

* return new fields in results for in-place engine

* test fix

* test fix attempt

* rm backup file

* fixed more e2e tests

* fixup

* more stabilization of e2e tests

* tweak whitespace

* first attempt to fix failing postgres tests

* try a simpler approach

* closes VIZ-1227 search not triggered when no datasource is selected

* new attempt to parameterize the define-spec macro with app-db

* removing non-temporal-dimension-ids filter

* fix cljkondo

* fix test

* fixed e2e (snowplow)

* fixed e2e (funnels)

* fixed e2e (basics)

* better loading state, better typing

* reverted type change

* uncomment e2e cartesian; remove unused search param; fix bg color

* Fix query to resolve to false instead of nil

---------

Co-authored-by: Eliot Daigneault-Mestre <eliot@metabase.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-07-16 14:08:03 -07:00
metamben
4927b35f0f Stop offering expressions and aggregation being edited as columns (#61033)
* Stop offering expressions and aggregation being edited as columns

Fixes #61010

* Add repro for metabase#61010

* Add test for custom columns too

* Update expected error message in e2e test

* Detect cycles in resolver too

* Revert "Detect cycles in resolver too"

* Add e2e test for referencing custom expressions that are just wrappers

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-17 00:03:34 +03:00
Nemanja Glumac
481065bc8f Optimize writable QA DB snapshot creation process (#60898) 2025-07-16 20:47:37 +00:00
Braden Shepherdson
d10fafd538 [parameters] Use MBQL lib to query for field values from a card (#60510)
Fixes #44077. Fixes #35840.

Previously this used some custom legacy MBQL manipulation. It was
incorrect and led to a handful of bugs. Now it's a straightforward
edit of the query powered by MBQL lib.
2025-07-16 16:20:28 -04:00
Romeo Van Snick
b76a18112a Fix parameter target popover empty state (#60990)
* Add missing min-height to ParameterTargetList

* Add repro for metabase#60987

* Update list when clearing cache

* Remove minWidth

* Always disable virtualization in AccordionList

* Use Mantine Popover in DashCardCardParameterMapperButton

* Remove virtualization from AccordionList altogether

* Remove superflouous wrapper for Clause popover

* Add box sizing to dashcardmapper

* Remove withBorders prop

* Remove more unused instance properties from AccordionList

* Add repro for metabase#46767

* Add key to parameter mapping button

* Trap focus in parameter mapping popover

* Close toasts to avoid overlapping popovers

* Ignore search box in check

* Add missing tooltip

* Fix selector

* Fix selector

* Close popover when selecting value

* Revert "Remove superflouous wrapper for Clause popover"

This reverts commit 5a13c826f4.

* Use H.tooltip helper

* Use cy.trigger instead of realHover

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-16 20:43:28 +02:00
Jacob Joseph
b39cfa3b6a Update sql-parameters.md (#61096)
fixed missing double quotes
2025-07-16 18:29:41 +00:00
Riley Thompson
23eeb71330 Clear secret file memoization when DB details have changed (#60503)
* clear secret file memoization on db update

* add rsa env vars

* improve test

* add more narrow test

* improve test

* refactor snowflake private key test to create and drop user per test

* use accountadmin role

* try granting sysadmin

* try using accountadmin role

* use correct details

* throw exceptions for unimplemented methods

* clean up test code
2025-07-16 14:19:07 -04:00
Edward Paget
1e088b195a fix: don't recurse in check-block-permissions (#61078) 2025-07-16 13:09:14 -05:00
SabarigirisanSivakumarREO
5601b31019 Locale updates on LanguageStep submit (#60184) 2025-07-16 11:58:29 -06:00
SabarigirisanSivakumarREO
6c6e042e20 Update button focus styling in setup flow (#60175)
* Button focus has been updated

* fixed color usage & onlyIcon button
2025-07-16 11:58:04 -06:00
Riley Thompson
6f94207bdf Use different login and user names for sqlserver impersonation setup (#60743)
* use different login and user names for sqlserver impersonation setup

* Require role

* fix sqlserver test

* move feature supported def

* remove outdated test
2025-07-16 13:42:11 -04:00
Ryan Laurie
83178c42e9 Show Application Permission Saving Errors (#61038)
* show errors when saving permissions

* use new confirm modal
2025-07-16 17:16:34 +00:00
Ryan Laurie
366e28ab80 fix git log logic for release logs (#61012) 2025-07-16 11:04:23 -06:00
Ryan Laurie
e3a45d5996 Shard jest tests (#53638)
* shard jest tests

* dont fail fast

* remove coverage
2025-07-16 11:03:36 -06:00
Ryan Laurie
23ed37fcb3 run frontend test coverage nightly (#61077)
* run frontend test coverage nightly

* SPACE
2025-07-16 11:01:59 -06:00
Uladzimir Havenchyk
2768c95be3 test: fix flakiness in table resizing (#61064) 2025-07-16 19:30:50 +03:00
Phoomparin Mano
0b73abd44e Make new iframe embed flow's parameter placeholder text contextual (#61006) 2025-07-16 23:28:46 +07:00
Filipe Silva
1dd56e5f14 Postgres Replication to Cloud Storage (#59709)
* feat: harbormaster openapi client

* feat: pg replication backend

* feat: pg replication frontend

* ci: label for build docker job

* fix: update attached-dwh crufty tables on sync :update

Fix https://linear.app/metabase/issue/CLO-4223/mb-does-not-update-crufty-table-settings-on-config-change

* fixup: minor FE review items

* fixup: pg-replication -> database-replication

* fixup: use db driver feature in DatabaseReplicationSection

* fixup: jt link needs unique k

* fix: cache? not cache on setting
2025-07-16 11:09:01 -05:00
lbrdnk
bcd9ce522b Fix coercion overwrite (#61055)
* Fix coercion overwrite

* Adjust test
2025-07-16 17:14:17 +02:00
Uladzimir Havenchyk
87d57b5880 test: fix flakiness in dashcard resizing (#61066) 2025-07-16 18:14:04 +03:00
Nicolò Maria Mezzopera
8eec882c31 docs: add callout to driver build to the beginning of the guide (#61071) 2025-07-16 16:53:01 +02:00
Mahatthana (Kelvin) Nomsawadi
1bf726bddc feat(sdk): Create new dashboard question from EditableDashboard (#60920)
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-16 21:22:37 +07:00
Brad Anderson
75df8b0ce6 Removes blue slow-loading card border (#60998) 2025-07-16 09:37:10 -04:00
Rodrigo López Dato
788fd1922c Fix "Github" capitalization in all Markdown files (#61034) 2025-07-16 09:02:03 -04:00
Alberto Perdomo
cc23721d9c docs(sdk): add limitations around leaflet 1 (#61057)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-16 20:00:38 +07:00
Oisin Coveney
2ff890692e feat(sdk): Add withDownloads to the static question (#60976) 2025-07-16 15:46:01 +03:00
Abed Habli
8a6b842320 docs: leaf fields sync limit for MongoDB (#61011)
* adding the leaf fields limit

* updating
2025-07-16 10:00:47 +02:00
Nicolò Maria Mezzopera
c5118e2517 fix css issues in the Native Query Editor (#60929)
* feat: swap span for flex in Trigger component with chevron

* chore: use span in flex component

* feat: add small left padding to native editor action buttons

* chore: fix typo on data-testid file

* chore: force viewport to be big enough in cy test

* feat: force the test to small window and execute the drag vertically
2025-07-16 09:03:44 +02:00
Ngoc Khuat
bdc56af8e7 Simplify slack channel implementation (#60838) 2025-07-16 10:37:50 +07:00
Alexander Polyankin
e779e66621 Add missing query metadata (#61023) 2025-07-16 00:28:17 +00:00
Cam Saul
ad256b6e5c [Lib] remove 'idents' part 1 (#60873) 2025-07-16 00:04:03 +00:00
Kamil Mielnik
36b9569619 Fix flaky dashboard parameters test (#60972) 2025-07-15 19:49:45 -04:00
Tyler Plude
62d441fd36 VIZ-1151 - Fix currency setting precedence table static viz (#60808)
* Move global settings to beginning of merge

* Removing duplicate logic in favor of qp viz-settings-for-col
2025-07-15 13:31:43 -07:00
Edward Paget
4be3c78bf8 chore: bump metabase saml library version (#61017) 2025-07-15 18:51:55 +00:00
Alex Yarosh
1cdb4bf7a4 docs: impersonation docs update (#60810)
* impersonation docs update

* Optimized 2 images, saved 112.4 KB (47.2% smaller)

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* what's up with that expected embedding check

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-07-15 14:06:38 -04:00
Cam Saul
01d9e43d56 [Lib] Improved metadata caching (#60802)
* Fix errors in cache magic

* Test fixes 🔧

* Slight improvement

* Fix Cljs macro requires

* PR feedback

* Test fix 🔧

* Test fix 🔧

* Test fix 🔧

* Test fix 🔧

* Yet another test fix 🔧
2025-07-15 17:04:46 +00:00
Aleksandr Lesnenko
eeac221f9c Revert "fix crashing chart due to invalid dimension viz setting computation (#60892)" (#60993)
This reverts commit e8dcfb5512.
2025-07-15 15:57:51 +00:00
Nemanja Glumac
025a216c41 Connect Mongo QA database using its connection string (#60895)
* Try connecting mongo via connection string

* Simplify sqlite

* Fix Mongo connection string
2025-07-15 15:47:51 +00:00
Brad Anderson
517a9f26dc Closes VIZ-1275 - Convert vanilla JS scalar code to TS (#60737) 2025-07-15 11:31:16 -04:00
metamben
031fd123fe Add repro test for #57596 (#60959) 2025-07-15 16:44:41 +03:00
Phoomparin Mano
259621b0c1 Add height of 100vh to iframe embed flow snippet (#60975) 2025-07-15 20:28:05 +07:00
Romeo Van Snick
7e185c6a02 Show error modal when turning a native question with variables into model, even when the model acknowledgement has happened (#60932)
* Add repro for metabase#56913

* Add fix for #56913
2025-07-15 15:06:42 +02:00
lbrdnk
1e57b6b256 Limit number of leaf fields synced on Mongo (#59883)
* Rewrite sync fields pipeline

* Different pipeline, 1K fields limit

* Comment test

* Adjust ordering of fields

* nil vals

* Expr

* Pipeline, adjust for null value keys, cleanup

* Swap top operator for sort group first

* New tests

* Fix var

* Cleanup

* linter

* space

* cleanup

* Docstring

* Apply suggestions from code review

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* bracket

* Update modules/drivers/mongo/src/metabase/driver/mongo.clj

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* paren

* dbfields->ftree*

* docstring

* naming, docstring, whitespace

* map inst rest map

* first second

* ftree->nested-fields

* Now redundant kondo ignore

* Remove ^:dynamic from leaf-fields-limit

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
2025-07-15 13:36:25 +02:00
Phoomparin Mano
92589063d6 feat(sdk): use entity ids directly in questions and dashboards (#60555)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-15 17:30:17 +07:00
Alexander Polyankin
62695af846 Show join condition literals in the UI (#60937)
* Tests

* Tests

* Tests

* Tests
2025-07-15 05:47:30 -04:00
Ngoc Khuat
bcc7034af9 Spec update add support for reverse PK (#60847) 2025-07-15 09:38:53 +00:00
Nicolò Pretto
fb8ea44bda Embedding specific setup flow - Milestone 3 - Follow ups (#60137)
* "I'll do this later" doesn't exit the flow (#59993)

* parallelize requests and make them use rtk query (#59563)

* parallelize requests and make them use rtk query

* fix multiple "Automatically Generated Dashboards" collections created +
update types

* add test

* EMB-459: remove 3 tables limit (#59997)

* Tweak welcome step content display (#60083)

* tweak welcome step content display

* update test after copy update

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>

* remove useForceLocaleRefresh as the context is now enough (#60145)

* adds `embedding_setup_click` event (#60315)

* embedding setup: remove last fetch call and speed up e2e (#60392)

* close EMB-487, remove last remaining fetch call

* closes EMB-534, speed up e2e

* createdDashboard -> createdDashboards

* embedding setup: use cloud token in e2e and hide appbar and database status (#60335)

* EMB-533: make the e2e test use the CLOUD pro token

* EMB-532: hide the database sync and the app bars in setup/embedding

* Update e2e/test/scenarios/onboarding/setup/setup-embedding.cy.spec.ts

* fix typo

---------

Co-authored-by: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
2025-07-15 11:18:44 +02:00
Kamil Mielnik
2480f7a42c SEM-374 Improve searchability of Table Metadata Field Type section (#60925)
* Auto-select text on focus in Select inputs with search enabled, to ease searchability

* Add tests

* Add issue tag
2025-07-15 14:47:53 +07:00
Romeo Van Snick
407a4b740e Enable cljs dev tools when not hot reloading too (#60918)
* Enable cljs dev tools when not hot reloading too

* Use separate flag for cljs dev tools
2025-07-15 08:19:29 +02:00
Ryan Laurie
b2deef2357 Remove Changelogs From Github (#60668)
* update release note templates

* keep heading

* nicer version parsing

* nicer version parsing
2025-07-14 22:39:36 +00:00
Eric Normand
df407b6b25 today() custom expression function (#60472)
* Empty

* No need for intersection in test

* Correct modestring casing

* Test datetime(number, mode) for s, ms, us, ns

* Allow uppercase and hyphens but normalize them.

* Don't allow hyphens in frontend.

* Implement unix casts for mongo

* Convert floats to long

* Use hyphenated keywords internally

* expand docstring

* Try other implementation of nanoseconds for BigQuery

* Handle sqlserver unix timestamps with multimethod

* More flexible date type handling

* Use integer division with bigquery

* datetime(number) frontend tests

* Undo change to package.json

* Empty

* Wrap code-like stuff in ``

* Add expressions/today feature

* Add legacy + lib for today()

* Basic test for today() (WIP)

* Add expressions/today feature to sql + implementation

* Finalize today() test

* Implement today() on mongo

* Better comment

* use m/find-first

* Frontend implementation

* Add today() fe test

* Improve fe test for today()

* Add a line to changelog

* Add line to changelog about expressions/today

* Handle different types better in lib schema

* Add special case for mode in formatter

* Add mode to expression options

* Add special case for mode in parser

* Error message

* Schema with options

* Add options map to legacy schema for datetime

* Remove comment

* Add unit test for mode option in compiler

* Add test for formatting the mode option in datetime

* Better round-tripping for :datetime function

* Add :mode to allowed keys for options marshalling

* Fix expression to add mode to options map

* Test datetime() legacy/lib roundtripping

* Fix normalization

* Remove println

* Mongo datetime() with options map

* Move test to custom-column spec

* Remove duplicate check

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-14 16:38:04 -05:00
Raphael Krut-Landau
6f3d0be100 In main nav, don't show 'Other users' personal collections' if there are no other users (#58419)
* In main nav, don't show 'Other users' personal collections' if there are no other users

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Fraser <fraser@metabase.com>
2025-07-15 08:54:27 +12:00
Aleksandr Lesnenko
e8dcfb5512 fix crashing chart due to invalid dimension viz setting computation (#60892)
* fix chart crashes when having multiple metric and dimension columns and invalid dimension viz setting

* replace spec
2025-07-14 20:48:57 +00:00
metamben
7f31b95e8b Add repro test for #60587 (#60945) 2025-07-14 20:40:10 +00:00
Tyler Plude
27a4319cff Prevent onChange when no changes were made (#60881) 2025-07-14 12:31:04 -07:00
Tyler Plude
c306daf323 convert colors to hex for compatibility with batik (#60800) 2025-07-14 12:30:44 -07:00
Tyler Plude
114fd199f3 show max download rows text only when format is xlsx (#60793) 2025-07-14 12:30:09 -07:00
Timothy S. Dean
935c0fb1f6 Remapping endpoint checks for common remapping definitions (#60308)
This PR fixes a bug where dashboard filters linked to multiple fields would show entity keys instead of remapped entity names when viewed by users with grouped (limited) permissions.

The solution in this PR is to add support for explicit remapping field specification.

Also resolved a separate permissions caching bug in data_permissions.clj where the use-cache? logic was inverted.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-07-14 12:57:24 -06:00
Eric Normand
5f9b11d33e datetime(number, mode) (#60389)
* Empty

* No need for intersection in test

* Correct modestring casing

* Test datetime(number, mode) for s, ms, us, ns

* Allow uppercase and hyphens but normalize them.

* Don't allow hyphens in frontend.

* Implement unix casts for mongo

* Convert floats to long

* Use hyphenated keywords internally

* expand docstring

* Try other implementation of nanoseconds for BigQuery

* Handle sqlserver unix timestamps with multimethod

* More flexible date type handling

* Use integer division with bigquery

* datetime(number) frontend tests

* Undo change to package.json

* Wrap code-like stuff in ``

* Better comment

* use m/find-first

* Add a line to changelog

* Handle different types better in lib schema

* Add special case for mode in formatter

* Add mode to expression options

* Add special case for mode in parser

* Error message

* Schema with options

* Add options map to legacy schema for datetime

* Remove comment

* Add unit test for mode option in compiler

* Add test for formatting the mode option in datetime

* Better round-tripping for :datetime function

* Add :mode to allowed keys for options marshalling

* Fix expression to add mode to options map

* Test datetime() legacy/lib roundtripping

* Fix normalization

* Remove println

* Mongo datetime() with options map

* Remove duplicate check

* Add simple bytes to compiler

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-14 13:26:57 -05:00
Alexander Polyankin
987ae15bf9 Repro test (#60943) 2025-07-14 14:25:51 -04:00
Phoomparin Mano
4bb8f9d261 Integration branch for new iframe embedding setup flow (#60304)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-07-15 00:59:45 +07:00
Uladzimir Havenchyk
42e9dbd7f0 test: add repro for a fixed issue in metabase lib (#60927)
* test: add repro for a fixed issue in metabase lib

* fixup

* fixup
2025-07-14 20:44:00 +03:00
metamben
d5590d1148 Aggregation refs in aggregation exprs (#60307)
* Add aggregation columns

* Pass expressionIndex to Expression editor in AggregationPicker

* Add expression-parts-method for aggregation references

* Add support in the query processor

* Add more tests

* Hack FE to call aggregablecolumns

* Add missing expressionMode option

* Add columnsForExpressionMode helper

* Update error message from resolver

* Add query with aggregation for tests

* Add tests for resolving aggregations

* Fix tests

* Fix CLJS tests

* Fix more tests

* Add missing docstring

* Add more unit tests

* Add unit test for aggregation completions

* Fix error message in test

* Add tests for second stage resolver

* Add tests for referencing aggregations

* Add test for resolving aggregation in next stage

* Disambiguate test name

* Fix column names returned by QP for aliased aggregations

* Fix merge issues

* Fix final test

* Address review comments

* Move aggregation tests

* Add test for detecting cycles in aggregations

* Add test about disallowing duplicate aggregation names

* Add sort helper

* Add tests for using nested aggregations as question source

* Add e2e test for nested aggregations in follow up stage

* Add tests for using nested aggregations in follow up stage with breakout

* Allow duplicate aggregation names

* Add test for changing aggregation order in underlying question

* Remove nonsensical test

* Fix test descriptions

* Fix test

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-14 19:23:19 +03:00
metamben
eb8bd3178e Add BE repro tests (#60583)
* Add BE repro test for #58314

* Add repro test for #35252

* Add repro test for #39033

* Add repro test for #27521

* Add repro test for #47734

* Add repro test for QUE-1378

* Add repro test for QUE-1374

* Add repro test for #58314

* Add repro test for #44767

Closes #44767

* Add repro test for #60498

* Add repro test for #60444

* Make test for #60444 more general
2025-07-14 19:05:41 +03:00
Fraser
a18d59447c Cloud SMTP Whitelabeling (#59528) 2025-07-14 10:34:53 -05:00
Thomas Schmidt
dcb54e1032 Add message for data source search (#60926) 2025-07-14 15:30:57 +00:00
Nicolò Pretto
6af7b4ac1e run embedding tests from run-tests (#60450)
* run embedding-sdk.yml from run-tests.yml

* remove e2e-tests-skipped-stub

* try to put back some structure

* fix name of build

* / -> › because github doesn't uses only the part after the last slash

* use > instead of chevron to make linter happy

* breaking changeS

* remove code to trigger ci
2025-07-14 16:52:21 +02:00
Kamil Mielnik
90fff3b0a5 SEM-444 Remove the "Add filter" button from the filter preview (#60844)
* Add withSubmitButton prop to Filter components

* Disable submit button in filtering preview

* Add tests
2025-07-14 21:15:28 +07:00
Kamil Mielnik
024f7a66bd Fix redundant "Not found" error message (#60913)
* Fix filtering preview background on narrow screens

* Do not show db 404 message if db is not selected

* Add test
2025-07-14 21:15:09 +07:00
Kamil Mielnik
26851eb2a9 SEM-483 For unfolded JSON subfields, the prefix gets cut aggressively (#60919)
* Measure parent to compute left section max width

* Add test

* Use Ellipsified for the prefix

* Use Ellipsified in SortableFieldItem
2025-07-14 19:59:56 +07:00
Romeo Van Snick
bd3703bd75 Add repro for "Filter Fails in Multi Level Aggregate for Model Based on SQL Questions" (#60859)
* Add repro for metabase#48772

* Add test description

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-07-14 11:35:47 +00:00
Kamil Mielnik
b4f440eb86 Fix flaky dashboard parameters test (#60916)
* Fix flaky test by adding aria-hidden on elements rendered only to perform measurements

* Revert "Fix flaky test by adding aria-hidden on elements rendered only to perform measurements"

This reverts commit 5575d6b43b.

* Fix flaky test by adding aria-hidden on elements rendered only to perform measurements

* Use hidden instead of aria-hidden

* Filter out invisible elements

* Revert adding hidden attribute
2025-07-14 18:23:01 +07:00
Uladzimir Havenchyk
4337140573 chore: drop moment from more files (#60660)
* chore: drop moment from more files

* chore: replace moment with dayjs

* update impl.cljs

* one more
2025-07-14 13:11:57 +03:00
Kamil Mielnik
e7ce3fcdd0 SEM-482 No table fields empty state (#60848)
* Show empty state when table has no fields

* Add test

* Fix flake
2025-07-14 07:50:09 +00:00
Kamil Mielnik
100ebbb282 Fix field item focus state being cut off (#60851) 2025-07-14 14:21:01 +07:00
Kamil Mielnik
268f24c51e SEM-433 Empty table preview of columns with hidden visibility (#60846)
* Show empty state in table preview when field is hidden

* Update tests

* Center the empty state vertically
2025-07-14 14:19:35 +07:00
Kamil Mielnik
3c8e46a5e2 Repro #55563 - Bigquery STRUCT types don't allow renaming in Admin -> Table Metadata (#60854) 2025-07-14 14:18:40 +07:00
Brad Anderson
4453fa8363 VIZ-968 Fixes pdf export grey boxes issue (#60879) 2025-07-11 22:08:23 -04:00
Nemanja Glumac
95af56b07c Add sqlite on demand in E2E tests (#60888) 2025-07-11 22:45:41 +00:00
Nick Fitzpatrick
dc91b7f508 Entity picker simplification (#60858)
* moving pickers into same folder, consolidate getInitialContainer hooks

* getCollectionIdPath consolidation

* getStateFromIdPath

* comitting sins to get tests passing
2025-07-11 19:04:44 -03:00
Nathan Voxland
cd735c000a Fix flaky search available-models-test (#60789) 2025-07-11 16:27:53 -05:00
bryan
02d236381f pin tj-actions/changed-files (#60811) 2025-07-11 18:16:04 -03:00
bryan
7547172e81 optimize every docs png (#60882) 2025-07-11 21:05:34 +00:00
Edward Paget
a904572fb5 fix: get source tables in multi-stage aggregations (#60872)
Fixes getting source tables in multistage aggregations. The check for
when we were in the scope of the parent card was in the wrong place in
the match which resulted in us failing to make a source-query block
immediately inside a stage with a source card.
2025-07-11 14:37:30 -05:00
Nemanja Glumac
ef3e70f1cf Remove unused Cypress command updatePermissionsSchemas (#60860) 2025-07-11 13:32:19 -06:00
Ryan Laurie
1833673602 Update internal slack + smtp settings links (#60020)
* update internal slack settings links

* update smtp urls

* update e2e tests
2025-07-11 17:30:51 +00:00
John Swanson
4060e2131d Allow configuring uploads for attached DWH (#60724)
Two changes required to allow this:

- first, for the setting itself, allow setting it if the database is
writable OR an attached DWH.

- second, a similar change to make sure `syncable_schemas` is fetchable
for the attached DWH.
2025-07-11 17:21:17 +00:00
Brad Anderson
e5725a7fc6 Fixes issue where "official" icon is incorrectly small in dash cards (#60853) 2025-07-11 12:46:02 -04:00
Sébastien
20a23a8837 closes VIZ-915 better remove all feature in tables (#60827) 2025-07-11 18:44:57 +02:00
Sébastien
c098fc30df Closes VIZ-974 column formatting for BigInts (#60814) 2025-07-11 17:48:27 +02:00
Kamil Mielnik
912dad9f4e Show empty state in table preview when there is no data (#60840) 2025-07-11 21:13:40 +07:00
Romeo Van Snick
f0da0ef86e Add repro for metabase#46337 (#60845) 2025-07-11 15:31:48 +02:00
Romeo Van Snick
909746a470 Add repro for "Invalid query error when trying to zoom in Bar visualization" (#60829)
* Add repro for metabase#42817

* Use echartsContainer helper
2025-07-11 13:03:31 +00:00
Kamil Mielnik
38de869471 SEM-423 Data loading error handling (#60626)
* SEM-239 Data model - Layout boilerplate (#57174)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* SEM-240 Data model - Table section (#57248)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Fix flaky unit tests

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* SEM-241 Data model - Field - Data section (#57420)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Simplify color

* Use type instead of interface

* SEM-297 Drop entity framework usage in `SemanticTypePicker` (#57531)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Drop entity framework in FkTargetPicker

* Make table names show up

* Clean up

* Fix types

* Fix table names

* Add tests

* Add tests

* Add tests

* Restrict imports

* Improve config

* Restrict entity framework imports

* Simplify color

* Use type instead of interface

* Lint

* SEM-267 Data model - Field - Metadata section (#57527)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Add Metadata section with display name input

* Pass table through components

* Drop entity framework in FkTargetPicker

* Revert "Pass table through components"

This reverts commit 2eb3e3a256.

* Make table names show up

* Clean up

* Fix types

* Fix table names

* Add tests

* Add tests

* Add tests

* Restrict imports

* Improve config

* Restrict entity framework imports

* Simplify color

* Use type instead of interface

* Use SemanticTypeAndTargetPicker in FieldSection

* Sort

* Lint

* Typing

* Do not use v1/metadata wrapper

* Add TextareaBlurChange

* Add description input

* Update comments

* Update icon

* Add plugin query props

* Remove redundant prop

* Remove redundant _.omit

* Fix textarea crashing due to min height on input

* Set minRows

* Fix styling

* Remove PLUGIN_FEATURE_LEVEL_PERMISSIONS plugin usage from DatasetFieldMetadataFkTargetPicker
- because that's not how it works in master

* Drop -v2 suffix for new routes, use -v1 suffix for old routes (#57637)

* SEM-242 Data model - Field - Behavior section (#57638)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Clean up timeouts on unmount

* Improve typing

* SEM-269 Data model - Field - Formatting section (#57682)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Add FormattingSection

* Sort

* Make formatting form full width

* Use style prop instead of maxWidth

* Clean up timeouts on unmount

* Improve typing

* Metadata preview boilerplate (#58015)

* Render preview

* Add preview type selector

* Fix flex layout

* Lift preview type to top component to keep the state

* Move helpers to utils

* Add unit tests for preview picker

* Add feedback to metadata editor when saving config (#58038)

* Add feedback to all table and field settings

* Add missing prop

* Metadata table and detail preview (#57887)

* Handle undefined metadata

* Render Table preview

* Add custom error component

* Add helper for error message

* Add detail preview

* Make comment more clear

* Fix type

* Fix missing props

* Metadata table picker (#57648)

* Set up TablePicker component

* Fix type in api

* Add initial TablePicker implementation

* Add schema icon

* Update url for datapicker

* Move data loading to utils

* Add loading node types

* Derive icon from type

* Try building the treepicker state asynchronously

* Build custom tree

* Add loading state

* Push url state in picker

* Sync open state with url

* Use helper to manage expanded state

* Split Node into separate file

* Expose prefetch hook

* Prefetch data to avoid showing loading states

* Add search to table picker

* Move search-related stuff into Search module

* Use Link for navigation

* Add renderLoading helper

* Remove unused prop

* Make search input sticky

* Add separate sidebar for field picker

* Render single schema but open it by default

* Translate errors

* Defer search value

* Export lazy loaders for database info

* Use top-level data fetching

* Enable virtualization

* Move loader utils into utils

* Remove Node implementation

* Simplify styles

* Pull out some logic

* Reuse results in search

* Reuse tree helpers when handling search results

* Avoid passing down isExpanded

* Memoize

* Fix initial expanded state

* Automatically expand single-schema databases

* Pass tableId to DataPicker

* Add styling for active item

* Add getUrl helper for tree nodes

* Move types to separate file

* Simplify item

* Rename Item to Results

* Simplify

* Allow wrapping everywhere

* Add loading state

* Render tracks

* Remove unused colors

* Scroll active item into view

* Fix paths

* Add missing keys

* Handle browser navigation in table picker

* Handle browser navigation in table picker

* Add more documentation

* Debounce search

* Render track even when no parent was found

* Allow rendering urls to schema's with no name

* Add value to loading nodes

* Add delay to track too

* Add explicit level to FlatItem

* Add explicit parent refence to FlatItem

* Hide nameless schemas in the tree

* Refactor

* Move key to top-level item

* Make TablePicker not depend on router

* Disable smooth scroll

* Add unit tests for TablePicker

* Unnest unnamed schemas directly

* Also fetch tables when only one schema exists

* Remeasure items when they change

* Use more precise typeing for items

* Allow clicking table nodes in search results

* Remove unused classes

* Remove unused useDispatch hook

* Remove delay on loading items

* Add custom empty state

* Typo

* Add keyboard navigation to table picker

* Use test helpers in all tests

* Add keyboard navigation to search results too

* Add custom focus state for search items

* Add unit tests for search

* Jump to parent when pressing left arrow

* Add more cases to keyboard test

* Add hover state to table picker

* Use table display name in table picker

* Flatten single schema in to database

* Rename onChange_ to handleChange

* Use folder for schema

* Make the hover and active colors the same

* Rename Data tab to Data Model

* Remove title

* Fix layout

* Field description editor (#58280)

* Use NameDescriptionInput for the field section too

* Use TextArea for description editor

* Post-merge fixes

* Metadata editing UI tweaks (#58297)

* Add background to fields

* Tweak colors for disabled inputs

* Remove icons in SectionPill

* Remove icon from one more SectionPill

* Remove lint

* Move segments to table picker (#58422)

* Add link to segments in the datamodel sidebar

* Add local state to RouterTablePicker

* Nest segments under DataModel

* Add wrapper classes to revision routes

* Fix spacing for empty state

* Add active state to segments link

* Remove DataModelApp in DataModel routes

* Fix overflow in segment form

* Merge translation strings

* Add background color to segments components

* SEM-363 Data model - Field and table name/description inputs should be sticky and have icons (#58703)

* Remove hover/focus effect and break components down into files

* Update comment

* Consolidate toasts

* Remove unused styles

* Remove redundant card

* Extract SegmentsLink

* Make name/description input sticky

* Add icons

* Remove leftovers

* Fix TS error

* Move visibility toggles to the table picker (#58284)

* Fetch hidden tables

* Fetch hidden schemas

* Add visibility toggles to the table picker

* Remove table visibility toggle in table section

* Simplify visibility toggler

* Move visibility toggle to separate file

* Add unit tests for visibility toggle

* Show table as hidden whenever there is any visibility

* Use ActionIcon

* Break up onClick handler

* Use plan Icon

* Remove data from nodes that don't need it

* Add tooltips to table visibility togglers

* Wrap icons in ActionIcon

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Cleanup

* SEM-361 Data model - Field metadata/formatting settings do not affect the preview (#58841)

* Fix SEM-361

* Fix types

* SEM-311 Table preview - no impact when changing time formatting for seconds and ms (#58927)

* Avoid using a breakout for date-time columns

* Use the same logic for every type of field

* SEM-246 Data model - Filtering preview (#58854)

* Fix SEM-361

* Fix types

* Add FilteringPreview boilerplate

* Use FilterPickerBody

* Another attempt

* Make it work for all types of filters

* Memoize query

* Clear filter input on field change

* Account for prop changes

* Fix TS error

* SEM-268 Data model - Field - Behavior section - Display values (#57684)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Add placeholder

* Add RemappingPicker boilerplate

* Clean up timeouts on unmount

* Improve typing

* Add onChange logic boilerplate

* Extract DisplayValuesPicker

* Remove redundant code

* Format code

* Add fk input boilerplate

* Disable options instead of hiding them

* Rename

* Fetch required data

* Use full data

* Implement fk remapping onChange

* Implement naming tip

* Fix state

* Extract utils

* Fix schema step errors

* Add remappings boilerplate

* Fetch remappings

* Add more modal boilerplate

* Add modal props

* Handle modal state

* Add explicit edit button

* Implement modal form

* Limit amount of Boxes

* Bring all safety checks back in

* Refactor CustomMappingModal

* Style CustomMappingModal

* Extract getHasEmptyValues

* Remove todo

* Prevent flicker

* Fix initial state of fk picker

* Use is touched

* Add CustomMappingModal unit tests

* Add DisplayValuesPicker unit tests

* Move DisplayValuesPicker

* Remove redundant tags

* Fix uncontrolled/controller input react warning

* Add explanatory tooltips for disabled options

* Fix 1px of background leaking into view

* Add missing memoization

* Reset state when cancelling

* Sync single table via UI (#58342)

* add table-manual-sync event

* add table/sync_schema endpoint

* add table sync test

* Add api helper for the sync table schema endpoint

* Add SyncTableSchemaButton component

* Add SyncTableSchemaButton to table section

* Add unit tests for SyncTableSchemaButton

* Also invalidate field-values and parameter-values

* Simplify SyncTableSchemaButton hooks

* Move useTemporaryState into a separate hook

* Apply same pattern in all buttons

* address PR review comments: use `get-database`, `with-database-routing-off`

* Pass argument to useTemporaryState

* update test

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* Fix SEM-370 (#59051)

* Post-merge conflict fix

* SEM-329 Data model - Table section - Update fields sorting interaction (#59316)

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Pixel-perfect

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* SEM-376 Data model - Resizable columns layout (#59100)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* SEM-327 Data model - Move the re-scan / discard options away from the bottom of the fields list (#59474)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* SyncOptionsModal

* Move

* Field values modal

* Responsiveness

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* Tmp

* Revert "Tmp"

This reverts commit 6e561c0de7.

* SEM-424 Tests parity - datamodel.cy.spec.js (#59548)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* SyncOptionsModal

* Move

* Field values modal

* Responsiveness

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Port test

* Fix typing

* Port test

* Port tests

* Format code, add data-testid

* Port more tests

* Refactor withDatabase to TypeScript

* Await

* Fix prop handling

* Port test

* Memoize textarea for performance

* Port test

* Port tests

* Remove unlawful getFieldDisplayName usages

* ESLint

* Add JSDoc

* Port tests

* Port tests

* Format code

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* Tmp

* Revert "Tmp"

This reverts commit 6e561c0de7.

* Fix circular dependency

* Post-merge fix

* SEM-425 Tests parity - editor.cy.spec.js (#59838)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Simplify assertion

* SEM-426 Tests parity - reproductions.cy.spec.ts (#59970)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Simplify assertion

* SEM-427 Tests parity - remaining e2e suites (#59980)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Data model - Simple flex layout (#59995)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Try simple flex layout

* Update proportions

* Remove redundant elements

* Clean up

* Use ellipsis instead of wrapping

* Pixel perfect

* Tweak constants

* SEM-448 Tests parity - unit tests (#60042)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Try simple flex layout

* Update proportions

* Remove redundant elements

* Clean up

* Use ellipsis instead of wrapping

* Pixel perfect

* Tweak constants

* Add data model unit tests boilerplate

* Optimistically remove TODOs

* Use router

* Fix element rendering in tests

* Add tests + fixes

* Port tests

* Port a test, fix a util

* Port test

* Port tests

* Port tests

* Remove old tests

* Port tests

* Remove old tests

* Port tests

* Remove old tests

* Fix disabling tables in search results

* Fix flakes

* Update tests

* Remove redundant check

* SEM-434 Missing metadata in FieldDataSelector (#60262)

* Manually override tables prop and add missing properties to Field objects
- Fixes SEM-434

* Format code

* Use field.display_name

* Memoize tables

* SEM-462 Small tweaks (#60187)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Fix events

* Use prop instead of CSS

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Add comments

* SEM-460 Show prefix for JSON-unfolded columns (#60328)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Add comments

* SEM-420 Organize e2e tests (#60379)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Move segments to a separate spec

* Organize tests

* Add comments

* SEM-420 Organize e2e tests (part 2) (#60388)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Move segments to a separate spec

* Organize tests

* Move tests

* Move tests

* Add comments

* Merge tests

* Move tests

* Use modern selectors

* Move tests

* Move tests

* Reorder tests

* SEM-420 Test new features (e2e) (#60439)

* Add new tests, simplify toasts, remove long prefix from utils

* Test toasts

* Reuse utils

* Add table picker test for no schemas

* Fix schemaless tables not shown in search

* Add sync options test

* Fix & test prefixes

* Add logs

* Format code

* Coercion strategy test

* Add tests for visibility

* Update assertions

* Add test for tooltips

* Field values tests

* Add tests for filtering

* Add preview assertion

* Refactor preview verification

* Fix showing 403 error in preview

* Add preview tests

* Add preview assertions

* Add preview assertions

* Add preview assertions

* Add preview tests

* Move modals and state handling, add tests for Esc key

* Update unit tests

* Use useDisclosure

* Add extra error status check

* Revert unnecessary changes in cross-version tests

* SEM-419 Increase test coverage (unit tests) (#60491)

* Add new tests, simplify toasts, remove long prefix from utils

* Test toasts

* Reuse utils

* Add table picker test for no schemas

* Fix schemaless tables not shown in search

* Add sync options test

* Fix & test prefixes

* Add logs

* Format code

* Coercion strategy test

* Add tests for visibility

* Update assertions

* Add test for tooltips

* Field values tests

* Add tests for filtering

* Add preview assertion

* Refactor preview verification

* Fix showing 403 error in preview

* Add preview tests

* Add preview assertions

* Add preview assertions

* Add preview assertions

* Add preview tests

* Move modals and state handling, add tests for Esc key

* Update unit tests

* Add FieldOrderPicker unit tests

* Add CurrencyPicker unit tests

* Add FkTargetPicker unit tests

* Add more tests

* Add SemanticTypeAndTargetPicker unit tests

* Remove redundant code

* Move RemappingPicker

* Use useDisclosure

* Add extra error status check

* SEM-247 Clean up old Table Metadata page code (#60557)

* Remove old metadata page

* Move humanizeCoercionStrategy

* Remove unused functions

* Fix SEM-484 (#60600)

* Add tests

* Center field error

* Do not navigate if there's an explicit param

* Show field error

* Fix schemas loading, add tests

* Revert unnecessary change

* Fix data fetching

* Improve comments

* Remove invalid test for schemas

* Optimize conditions

* When table is not found, show the empty state as if table was not selected yet

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
2025-07-11 12:02:28 +00:00
Romeo Van Snick
40b7edf160 Fix some minor Custom Expression editor annoyances (#60825)
* Use displayName for error

* Fix error position for node

* Move padding to cm-content to avoid whitespace above gutter

* Add border radius to editor to avoid overflowing container

* Fix displayname in unit test

* Fix type for position

* Add test for error position

* Add unit test for position helper
2025-07-11 12:29:58 +02:00
Kamil Mielnik
a4fe6afc7f SEM-393 Toasts and error handling (#60770)
* Add warning_triangle_filled icon

* Use warning_triangle_filled icon for error toasts in buttons

* Show error toasts consistently

* Fix error handling in table preview

* Fix error handling in object detail preview

* Update message

* Add toasts for sorting

* Add test for errors

* Add missing tests

* Update test

* Add iconColor prop to Undo and use it instead of hardcoding color in warning_triangle_filled icon
2025-07-11 09:51:10 +00:00
Uladzimir Havenchyk
8be98769a5 chore: fix circular deps in qb (#60222)
* chore: fix circular deps in qb

* fixup

* fixup

* fixup

* last circular deps

* fix export

* add a lint rule
2025-07-11 11:29:20 +03:00
Romeo Van Snick
e60f0a163c Add repro for metabase#30712 (#60773) 2025-07-11 10:29:13 +02:00
Romeo Van Snick
61b9506a96 Add test for validation for timezone strings (#60767) 2025-07-11 10:29:03 +02:00
Uladzimir Havenchyk
8f81a00d7c chore: drop unused styles (#60771) 2025-07-11 11:19:19 +03:00
Uladzimir Havenchyk
63c72dca96 chore: drop unused files (#60364) 2025-07-11 08:15:56 +00:00
Sébastien
bd114d2045 Closes VIZ-264 nested JSON no longer formatted as [object Object] (#60489)
* Closes VIZ-264 nested JSON no longer formatted as [object Object]

* added type

* fixed types

* fixed tests
2025-07-11 10:01:01 +02:00
Romeo Van Snick
2d2fe45f9b Add repro for metabase#42942 (#60783) 2025-07-11 09:57:36 +02:00
Kamil Mielnik
efb916f3fb Show empty state when there are no databases (#60760) 2025-07-11 14:22:06 +07:00
Phoomparin Mano
9623731b0d Accept entity ids in SDK-related endpoints (#60464) 2025-07-11 14:08:39 +07:00
Mahatthana (Kelvin) Nomsawadi
7e459bd7e4 Prevent SDK issues going into Metabase release changelog (#60688)
* Prevent SDK issues going into Metabase release changelog

Skip tagging Embedding SDK issues with Metabase milestone

* Fix my embarrassment
2025-07-11 06:45:26 +01:00
Sébastien
1349f50633 cleaned up e2e helper API (#60686) 2025-07-11 07:35:56 +02:00
Luis Paolini
dbe16c735b I hate warnings on Docker builds (#60799)
Removes the warnings and the line about ARM builds
2025-07-10 21:49:25 -03:00
Nemanja Glumac
b1a89304a1 Fix the "contact admin alert" when admin email is missing (#60759) 2025-07-11 00:44:17 +00:00
Aleksandr Lesnenko
bdf49733c8 fix info icon placement (#60747)
* fix info icon placement

* Update Loki Snapshots

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-10 20:41:48 -04:00
Timothy S. Dean
131ad0cbf1 Field filters in embedded questions/dashboards match case-sensitivity of app (#60669) 2025-07-10 17:35:14 -06:00
Alex Yarosh
3059ac87fd autogenerated docs master (#60741) 2025-07-10 19:10:39 -04:00
Nemanja Glumac
6415c7dd8a Fix typo in mage help (#60798) 2025-07-10 23:50:35 +02:00
Alex Yarosh
710ace99c0 notify of new users (#60795) 2025-07-10 17:19:04 -04:00
bryan
458868a7d3 Add schema to PUT settings/api/{key} (#60645) 2025-07-10 13:01:57 -06:00
Aleksandr Lesnenko
6a05532a92 simplify apply filters copy (#60748) 2025-07-10 14:59:38 -04:00
Alex Yarosh
7a469b6cda Update expressions-list.md (#60787) 2025-07-10 18:38:37 +00:00
Jacob Joseph
245d618d15 Update expressions-list.md (#60785)
Double negative was confusing. Changed "Not available" to "Unavailable"
2025-07-10 14:21:05 -04:00
Ryan Laurie
c65b100017 yarn mage (#60780) 2025-07-10 16:50:37 +00:00
Sébastien
d2e67d96e7 Closes VIZ-1283 overflow in visualizer modal (#60695) 2025-07-10 17:44:29 +02:00
Alex Yarosh
2e2a81b5d4 Update securing-embeds.md (#60774) 2025-07-10 11:20:38 -04:00
Alexander Polyankin
7b5b07435b Send correct model metadata on model creation (#60704)
* Fix model metadata

* Fix model metadata

* Fix model metadata

* Fix model metadata

* Fix test
2025-07-10 11:13:59 -04:00
Nicolò Pretto
2ae676e86d skip e2e-cross-version-for-breaking-changes.yml as cypress crashes (#60761) 2025-07-10 11:22:59 +00:00
Romeo Van Snick
050db1b5a7 Add repro for #33835 (#60706) 2025-07-10 13:17:24 +02:00
Romeo Van Snick
9e8dd7a0a0 Add repro for #26512 (#60696) 2025-07-10 13:17:14 +02:00
Kamil Mielnik
2b5ba094d2 SEM-435 Ensure that we keep the selected table even when collapsing the tree (#60694)
* Ensure that we keep the selected table even when collapsing the tree
- Fixes SEM-435

* Update tests

* Always highlight selected table

* Use aria-selected
2025-07-10 10:47:47 +00:00
Anton Kulyk
aaa4a24405 Fix couldn't click filters in dashboard edit mode with SDK (#60725)
* Fix clicking filters in SDK dashboards

* Add e2e test
2025-07-10 11:18:22 +01:00
Romeo Van Snick
9e37bd9d50 Validation for case and coalesce clause types (#59038)
* Add validation for case/if clause types

* Add e2e repro for metabase#57674

* Avoid passing nil default into expressions

* Check for type compatibility, not equality

* Allow unknoen types

* Make e2e test more refined

* Fix e2e test

* Fix clj test

* Fix e2e test

* Handle set arguments to compatible?

* Fix docstring

* Use assignable? instead of most-common-ancestor

* Allow Date/DateTime/... to mix

* Use best-return-type to determine if all types are compatible

* Handle falsy default

* Add missing map

* Update comment to clarify compatibility omission

* Unwrap schema

* Add test for malformed case expressions

* Add type check to coalaesce too

* Add check to coalesce too

* Add tests for :default false

* Add tests for temporal types

* Move combination tests to BE test

* Use separate deftests for valid and invalid case and coalesce tests

* Fold repetitive parts into are expression

* Formatting of test

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Formatting of test

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Formatting of test

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Split up more tests

* Formatting in tests

---------

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-07-10 11:19:41 +02:00
Nicola Mometto
a22a898366 relax test, ordering can be nondeterministic (#60727) 2025-07-10 09:53:16 +01:00
Romeo Van Snick
0481704c35 Inconsistent formatting (#60546)
* Add option to use instance settings for number formatting

* Format row count in datagrid Footer with instance settings

* Format row count in datagrid Footer using instance settings

* Format row in question row count using instance settings

* Add unit test for number formatting with instance settings

* Fix unit tests

* Fix e2e tests

* Update Loki Snapshots

* Add useNumberFormatter hook

* Use useNumberFormatter hook

* Add test for useNumberFormatter

* Fix types

* Update Loki Snapshots

* Move useNumberFormatter to metase/common/hooks

* Add redux to DataGrid stories

* Add missing loki references

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-10 08:25:25 +02:00
William
f46f631694 Query cycle checker understands native queries (#60731)
We check for query cycles when saving cards, but the checker only understands mbql queries.  If we have a native query
that depends on another query, the cycle checker won't go through the native query to see if it is causing a cycle.
Now, the checker understands native queries and can find cycles involving them.

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-10 04:51:03 +00:00
Alexander Polyankin
cd8f94b668 60719 repro (#60723) 2025-07-09 21:04:36 -04:00
Cam Saul
0498a66013 [Lib] Stop passing :unique-name-fn as an option (#60663)
* [Lib] Stop passing `:unique-name-fn` as an option

* Add extra test

* Fix column order

* Test fixes and PR feedback

* Fix output schema

* Test fixes!!!

* Test fix?? 🔧

* Fix file order

* Test fix

* Revert accidental e2e changes
2025-07-09 16:41:29 -07:00
bryan
11c45ea42d add docs png image optimizer workflow (#60581)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-09 23:09:17 +00:00
Chris Truter
9e6b48ee34 Fix permission check for SQL actions acting on another db (#60705) 2025-07-09 22:17:01 +00:00
Alex Yarosh
68e905aff8 docs: move embedding auth flow article to docs (#60674)
* move authflow to docs

* link maintaining
2025-07-09 21:28:46 +00:00
Uladzimir Havenchyk
fb529d6a26 deps: fix critical alert re pbkdf2 (#60685)
* deps: fix critial alert re pbkdf2

* deduplicate crypto-browserify
2025-07-09 21:11:45 +00:00
Aleksandr Lesnenko
8db1213e52 improve heading mapping ui empty state (#60424) 2025-07-09 20:34:14 +00:00
Fraser
a9d032bd40 ADM-1154 make form text inputs non-bold (#60667)
* Make FormTextArea and FormTextInput non-bold
2025-07-10 08:23:52 +12:00
Alex Yarosh
bb20b7ed53 docs: clarify export limit (#60730)
* Update exporting-results.md

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-07-09 15:26:27 -04:00
Anton Kulyk
d265195f5e Add filter collapsing logic to question dashboard cards (#60566)
* Extract `useResponsiveParameterList` hook

* Extract `CollapsibleDashboardParameterList`

* Type `getComputedSettingsForSeries`

* Extract `cardTitle`

* Extract dashcard title font style constants

* Use collapsible filter list for dashcards

* Fix flaky collapsing point check

* Add visual tests

* Add screenshots

* Fix e2e tests

* Fix card overflow

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-09 17:48:59 +01:00
Tyler Plude
21cc70fa01 Change 'Inner Ring' label to 'Breakout' for single dimension (#58723)
* Change 'Inner Ring' label to 'Breakout' for single dimension

* fix type errors
2025-07-09 10:19:20 -06:00
Kamil Mielnik
693126716b Fix flaky dashboard filters test (#60711) 2025-07-09 17:46:51 +02:00
Ryan Laurie
e85832d6a6 trigger the rest of required jobs on merge queue (#60716) 2025-07-09 09:46:08 -06:00
Nemanja Glumac
d64b9f2593 Replace database selection in setup with a new component (#60511) 2025-07-09 17:25:19 +02:00
Ryan Laurie
fdde8c1b79 run tests for merge queue (#60712) 2025-07-09 08:52:50 -06:00
Romeo Van Snick
1ac679ff90 Add repro for "Custom column that only references a table column creates all sorts of problems" (#60692)
* Add repro for #25189

* Also check that table renders
2025-07-09 14:48:43 +00:00
Romeo Van Snick
b721834025 Add repro for "Custom Expression can fail query when mixing numeric and string functions" (#60691)
* Add clickDone to enterCustomColumnDetails helper

* Add repro for metabase#12938

* Add test case for other repro in issue
2025-07-09 16:22:22 +02:00
Nemanja Glumac
02ea8ebfd2 Remove branding link from Slack notifications (#60277)
We have to remove the link altogether because we can't stop it from unfurling.
2025-07-09 15:54:16 +02:00
Alex Yarosh
be7de15ac5 docs: subscription attachments (#60673)
* Update settings.clj

* subscription attachment docs
2025-07-09 09:52:58 -04:00
Jacob Joseph
236d8de1ba Update ssh-tunnel.md (#60697)
Added a note about best practice for security and IP Whitelisting link
2025-07-09 13:31:16 +00:00
Alexander Polyankin
6514e2921c Add a repro test for 39033 (#60670) 2025-07-09 09:09:08 -04:00
Alexander Polyankin
3d241f9c9e Repro for "Models that contain Joins to the Same Table Multiple Times fail when Model Metadata is Edited" (#60671) 2025-07-09 09:08:56 -04:00
Oisin Coveney
b1cc2fb7ec Make namespaced components consistent in core and SDK (#60639) 2025-07-09 15:40:29 +03:00
Mahatthana (Kelvin) Nomsawadi
5dbb3648cf Fix typedoc help message typo (#60687) 2025-07-09 11:45:47 +01:00
dpsutton
cd647eb242 use :role on connection details for sqlserver (#60678)
* use :role on connection details for sqlserver

* empty commit to retrigger CI with team/Drivers label for driver test

* fixup test
2025-07-09 05:44:40 -04:00
Nicola Mometto
21ff1a58ea infer only one column to be entity name (#60492)
* typo

* infer only one column per table to be entity name

* tests

* fix: test

* note

* fix: don't lose other classification results!

* regr test

* use count

* more tests

* fix: only consider active fields!

* also consider visibility_type

* perf: select only if needed

* style: reduce without atom

* style: cleaner
2025-07-09 09:39:21 +01:00
Sébastien
91f9e8db22 Closes VIZ-1204 VIZ-1205 error state when removing columns and switching viz (#60543)
* Closes VIZ-1204 error state when removing columns and switching viz

* Closes VIZ-1205 ambiguous state for funnel when coming from pie
2025-07-09 08:49:00 +02:00
Kamil Mielnik
3307281472 Up-level admin metadata editing (#57325)
* SEM-239 Data model - Layout boilerplate (#57174)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* SEM-240 Data model - Table section (#57248)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Fix flaky unit tests

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* SEM-241 Data model - Field - Data section (#57420)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Simplify color

* Use type instead of interface

* SEM-297 Drop entity framework usage in `SemanticTypePicker` (#57531)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Drop entity framework in FkTargetPicker

* Make table names show up

* Clean up

* Fix types

* Fix table names

* Add tests

* Add tests

* Add tests

* Restrict imports

* Improve config

* Restrict entity framework imports

* Simplify color

* Use type instead of interface

* Lint

* SEM-267 Data model - Field - Metadata section (#57527)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Add Metadata section with display name input

* Pass table through components

* Drop entity framework in FkTargetPicker

* Revert "Pass table through components"

This reverts commit 2eb3e3a256.

* Make table names show up

* Clean up

* Fix types

* Fix table names

* Add tests

* Add tests

* Add tests

* Restrict imports

* Improve config

* Restrict entity framework imports

* Simplify color

* Use type instead of interface

* Use SemanticTypeAndTargetPicker in FieldSection

* Sort

* Lint

* Typing

* Do not use v1/metadata wrapper

* Add TextareaBlurChange

* Add description input

* Update comments

* Update icon

* Add plugin query props

* Remove redundant prop

* Remove redundant _.omit

* Fix textarea crashing due to min height on input

* Set minRows

* Fix styling

* Remove PLUGIN_FEATURE_LEVEL_PERMISSIONS plugin usage from DatasetFieldMetadataFkTargetPicker
- because that's not how it works in master

* Drop -v2 suffix for new routes, use -v1 suffix for old routes (#57637)

* SEM-242 Data model - Field - Behavior section (#57638)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Clean up timeouts on unmount

* Improve typing

* SEM-269 Data model - Field - Formatting section (#57682)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Add FormattingSection

* Sort

* Make formatting form full width

* Use style prop instead of maxWidth

* Clean up timeouts on unmount

* Improve typing

* Metadata preview boilerplate (#58015)

* Render preview

* Add preview type selector

* Fix flex layout

* Lift preview type to top component to keep the state

* Move helpers to utils

* Add unit tests for preview picker

* Add feedback to metadata editor when saving config (#58038)

* Add feedback to all table and field settings

* Add missing prop

* Metadata table and detail preview (#57887)

* Handle undefined metadata

* Render Table preview

* Add custom error component

* Add helper for error message

* Add detail preview

* Make comment more clear

* Fix type

* Fix missing props

* Metadata table picker (#57648)

* Set up TablePicker component

* Fix type in api

* Add initial TablePicker implementation

* Add schema icon

* Update url for datapicker

* Move data loading to utils

* Add loading node types

* Derive icon from type

* Try building the treepicker state asynchronously

* Build custom tree

* Add loading state

* Push url state in picker

* Sync open state with url

* Use helper to manage expanded state

* Split Node into separate file

* Expose prefetch hook

* Prefetch data to avoid showing loading states

* Add search to table picker

* Move search-related stuff into Search module

* Use Link for navigation

* Add renderLoading helper

* Remove unused prop

* Make search input sticky

* Add separate sidebar for field picker

* Render single schema but open it by default

* Translate errors

* Defer search value

* Export lazy loaders for database info

* Use top-level data fetching

* Enable virtualization

* Move loader utils into utils

* Remove Node implementation

* Simplify styles

* Pull out some logic

* Reuse results in search

* Reuse tree helpers when handling search results

* Avoid passing down isExpanded

* Memoize

* Fix initial expanded state

* Automatically expand single-schema databases

* Pass tableId to DataPicker

* Add styling for active item

* Add getUrl helper for tree nodes

* Move types to separate file

* Simplify item

* Rename Item to Results

* Simplify

* Allow wrapping everywhere

* Add loading state

* Render tracks

* Remove unused colors

* Scroll active item into view

* Fix paths

* Add missing keys

* Handle browser navigation in table picker

* Handle browser navigation in table picker

* Add more documentation

* Debounce search

* Render track even when no parent was found

* Allow rendering urls to schema's with no name

* Add value to loading nodes

* Add delay to track too

* Add explicit level to FlatItem

* Add explicit parent refence to FlatItem

* Hide nameless schemas in the tree

* Refactor

* Move key to top-level item

* Make TablePicker not depend on router

* Disable smooth scroll

* Add unit tests for TablePicker

* Unnest unnamed schemas directly

* Also fetch tables when only one schema exists

* Remeasure items when they change

* Use more precise typeing for items

* Allow clicking table nodes in search results

* Remove unused classes

* Remove unused useDispatch hook

* Remove delay on loading items

* Add custom empty state

* Typo

* Add keyboard navigation to table picker

* Use test helpers in all tests

* Add keyboard navigation to search results too

* Add custom focus state for search items

* Add unit tests for search

* Jump to parent when pressing left arrow

* Add more cases to keyboard test

* Add hover state to table picker

* Use table display name in table picker

* Flatten single schema in to database

* Rename onChange_ to handleChange

* Use folder for schema

* Make the hover and active colors the same

* Rename Data tab to Data Model

* Remove title

* Fix layout

* Field description editor (#58280)

* Use NameDescriptionInput for the field section too

* Use TextArea for description editor

* Post-merge fixes

* Metadata editing UI tweaks (#58297)

* Add background to fields

* Tweak colors for disabled inputs

* Remove icons in SectionPill

* Remove icon from one more SectionPill

* Remove lint

* Move segments to table picker (#58422)

* Add link to segments in the datamodel sidebar

* Add local state to RouterTablePicker

* Nest segments under DataModel

* Add wrapper classes to revision routes

* Fix spacing for empty state

* Add active state to segments link

* Remove DataModelApp in DataModel routes

* Fix overflow in segment form

* Merge translation strings

* Add background color to segments components

* SEM-363 Data model - Field and table name/description inputs should be sticky and have icons (#58703)

* Remove hover/focus effect and break components down into files

* Update comment

* Consolidate toasts

* Remove unused styles

* Remove redundant card

* Extract SegmentsLink

* Make name/description input sticky

* Add icons

* Remove leftovers

* Fix TS error

* Move visibility toggles to the table picker (#58284)

* Fetch hidden tables

* Fetch hidden schemas

* Add visibility toggles to the table picker

* Remove table visibility toggle in table section

* Simplify visibility toggler

* Move visibility toggle to separate file

* Add unit tests for visibility toggle

* Show table as hidden whenever there is any visibility

* Use ActionIcon

* Break up onClick handler

* Use plan Icon

* Remove data from nodes that don't need it

* Add tooltips to table visibility togglers

* Wrap icons in ActionIcon

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Cleanup

* SEM-361 Data model - Field metadata/formatting settings do not affect the preview (#58841)

* Fix SEM-361

* Fix types

* SEM-311 Table preview - no impact when changing time formatting for seconds and ms (#58927)

* Avoid using a breakout for date-time columns

* Use the same logic for every type of field

* SEM-246 Data model - Filtering preview (#58854)

* Fix SEM-361

* Fix types

* Add FilteringPreview boilerplate

* Use FilterPickerBody

* Another attempt

* Make it work for all types of filters

* Memoize query

* Clear filter input on field change

* Account for prop changes

* Fix TS error

* SEM-268 Data model - Field - Behavior section - Display values (#57684)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Add placeholder

* Add RemappingPicker boilerplate

* Clean up timeouts on unmount

* Improve typing

* Add onChange logic boilerplate

* Extract DisplayValuesPicker

* Remove redundant code

* Format code

* Add fk input boilerplate

* Disable options instead of hiding them

* Rename

* Fetch required data

* Use full data

* Implement fk remapping onChange

* Implement naming tip

* Fix state

* Extract utils

* Fix schema step errors

* Add remappings boilerplate

* Fetch remappings

* Add more modal boilerplate

* Add modal props

* Handle modal state

* Add explicit edit button

* Implement modal form

* Limit amount of Boxes

* Bring all safety checks back in

* Refactor CustomMappingModal

* Style CustomMappingModal

* Extract getHasEmptyValues

* Remove todo

* Prevent flicker

* Fix initial state of fk picker

* Use is touched

* Add CustomMappingModal unit tests

* Add DisplayValuesPicker unit tests

* Move DisplayValuesPicker

* Remove redundant tags

* Fix uncontrolled/controller input react warning

* Add explanatory tooltips for disabled options

* Fix 1px of background leaking into view

* Add missing memoization

* Reset state when cancelling

* Sync single table via UI (#58342)

* add table-manual-sync event

* add table/sync_schema endpoint

* add table sync test

* Add api helper for the sync table schema endpoint

* Add SyncTableSchemaButton component

* Add SyncTableSchemaButton to table section

* Add unit tests for SyncTableSchemaButton

* Also invalidate field-values and parameter-values

* Simplify SyncTableSchemaButton hooks

* Move useTemporaryState into a separate hook

* Apply same pattern in all buttons

* address PR review comments: use `get-database`, `with-database-routing-off`

* Pass argument to useTemporaryState

* update test

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* Fix SEM-370 (#59051)

* Post-merge conflict fix

* SEM-329 Data model - Table section - Update fields sorting interaction (#59316)

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Pixel-perfect

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* SEM-376 Data model - Resizable columns layout (#59100)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* SEM-327 Data model - Move the re-scan / discard options away from the bottom of the fields list (#59474)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* SyncOptionsModal

* Move

* Field values modal

* Responsiveness

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* Tmp

* Revert "Tmp"

This reverts commit 6e561c0de7.

* SEM-424 Tests parity - datamodel.cy.spec.js (#59548)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* SyncOptionsModal

* Move

* Field values modal

* Responsiveness

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Port test

* Fix typing

* Port test

* Port tests

* Format code, add data-testid

* Port more tests

* Refactor withDatabase to TypeScript

* Await

* Fix prop handling

* Port test

* Memoize textarea for performance

* Port test

* Port tests

* Remove unlawful getFieldDisplayName usages

* ESLint

* Add JSDoc

* Port tests

* Port tests

* Format code

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* Tmp

* Revert "Tmp"

This reverts commit 6e561c0de7.

* Fix circular dependency

* Post-merge fix

* SEM-425 Tests parity - editor.cy.spec.js (#59838)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Simplify assertion

* SEM-426 Tests parity - reproductions.cy.spec.ts (#59970)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Simplify assertion

* SEM-427 Tests parity - remaining e2e suites (#59980)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Data model - Simple flex layout (#59995)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Try simple flex layout

* Update proportions

* Remove redundant elements

* Clean up

* Use ellipsis instead of wrapping

* Pixel perfect

* Tweak constants

* SEM-448 Tests parity - unit tests (#60042)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Try simple flex layout

* Update proportions

* Remove redundant elements

* Clean up

* Use ellipsis instead of wrapping

* Pixel perfect

* Tweak constants

* Add data model unit tests boilerplate

* Optimistically remove TODOs

* Use router

* Fix element rendering in tests

* Add tests + fixes

* Port tests

* Port a test, fix a util

* Port test

* Port tests

* Port tests

* Remove old tests

* Port tests

* Remove old tests

* Port tests

* Remove old tests

* Fix disabling tables in search results

* Fix flakes

* Update tests

* Remove redundant check

* SEM-434 Missing metadata in FieldDataSelector (#60262)

* Manually override tables prop and add missing properties to Field objects
- Fixes SEM-434

* Format code

* Use field.display_name

* Memoize tables

* SEM-462 Small tweaks (#60187)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Fix events

* Use prop instead of CSS

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Add comments

* SEM-460 Show prefix for JSON-unfolded columns (#60328)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Add comments

* SEM-420 Organize e2e tests (#60379)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Move segments to a separate spec

* Organize tests

* Add comments

* SEM-420 Organize e2e tests (part 2) (#60388)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Move segments to a separate spec

* Organize tests

* Move tests

* Move tests

* Add comments

* Merge tests

* Move tests

* Use modern selectors

* Move tests

* Move tests

* Reorder tests

* SEM-420 Test new features (e2e) (#60439)

* Add new tests, simplify toasts, remove long prefix from utils

* Test toasts

* Reuse utils

* Add table picker test for no schemas

* Fix schemaless tables not shown in search

* Add sync options test

* Fix & test prefixes

* Add logs

* Format code

* Coercion strategy test

* Add tests for visibility

* Update assertions

* Add test for tooltips

* Field values tests

* Add tests for filtering

* Add preview assertion

* Refactor preview verification

* Fix showing 403 error in preview

* Add preview tests

* Add preview assertions

* Add preview assertions

* Add preview assertions

* Add preview tests

* Move modals and state handling, add tests for Esc key

* Update unit tests

* Use useDisclosure

* Add extra error status check

* Revert unnecessary changes in cross-version tests

* SEM-419 Increase test coverage (unit tests) (#60491)

* Add new tests, simplify toasts, remove long prefix from utils

* Test toasts

* Reuse utils

* Add table picker test for no schemas

* Fix schemaless tables not shown in search

* Add sync options test

* Fix & test prefixes

* Add logs

* Format code

* Coercion strategy test

* Add tests for visibility

* Update assertions

* Add test for tooltips

* Field values tests

* Add tests for filtering

* Add preview assertion

* Refactor preview verification

* Fix showing 403 error in preview

* Add preview tests

* Add preview assertions

* Add preview assertions

* Add preview assertions

* Add preview tests

* Move modals and state handling, add tests for Esc key

* Update unit tests

* Add FieldOrderPicker unit tests

* Add CurrencyPicker unit tests

* Add FkTargetPicker unit tests

* Add more tests

* Add SemanticTypeAndTargetPicker unit tests

* Remove redundant code

* Move RemappingPicker

* Use useDisclosure

* Add extra error status check

* SEM-247 Clean up old Table Metadata page code (#60557)

* Remove old metadata page

* Move humanizeCoercionStrategy

* Remove unused functions

* Fix SEM-484 (#60600)

* Revert unnecessary change

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
2025-07-09 13:23:50 +07:00
Uladzimir Havenchyk
fddd24fc20 tests: drop old testing library (#60551)
* tests: drop old testing library

* use act in test
2025-07-09 05:54:13 +00:00
Vamsi Peri
d8e046e6c4 Fix for claude code container issue (#60677) 2025-07-08 21:09:48 -07:00
Vamsi Peri
afbf287b9b Claude code github workflow (#60675) 2025-07-08 22:13:48 -05:00
Vamsi Peri
dd31ae3c99 Fix SQL Server connection failure when login and database users differ (#60672)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-08 23:09:54 -04:00
Nemanja Glumac
a6ac68051b List all supported upload databases in a disclaimer/warning (#60627) 2025-07-09 00:23:39 +02:00
Brad Anderson
c16f89f373 Closes VIZ-195 - Bar chart data labels jump 1px on hover (#60215)
* VIZ-195 Updates getBarLabelLayout so it can be reused for the `seriesOption` and `labelOptions`
2025-07-08 15:35:02 -04:00
Alexander Polyankin
15e65fe228 Fix Lib.isNumeric check and get rid of the "MySQL hack" (#60653)
* Get rid of the MySQL number hack

* Get rid of the MySQL number hack

* Get rid of the MySQL number hack
2025-07-08 15:31:26 -04:00
Alexander Polyankin
93896cc32c Remove broken lib/aggregation-column (#60644) 2025-07-08 15:27:46 -04:00
Cam Saul
66994fde60 Fundamentally unbreak :lib/source (#60371)
* Fundamentally unbreak `:lib/source` (QUE-1375)

* Fix pivot QP

* Test fixes?? 🔧

* Un-deprecate the ident stuff

* PR feedback

* Appease Kondo

* Update Cypress e2e test
2025-07-08 11:11:34 -07:00
John Swanson
578c449fb1 Improve usage analytics without first/last name (#60408)
Users without a first or last name previously showed up in Usage
Analytics as `null`. This change just uses either the full name (if both
`first_name` and `last_name` are present), or whichever of those values
is not `null`.

[ADM-826: Users with First Name only don't show up in Usage Analytics](https://linear.app/metabase/issue/ADM-826/users-with-first-name-only-dont-show-up-in-usage-analytics)
2025-07-08 18:09:11 +00:00
Sloan Sparger
23243c4953 [Metabot] Only use visible timeline events when sending chart configs (#60467)
* only use visible timeline events when sending chart configs

* fix unit test
2025-07-08 11:17:57 -05:00
Sébastien
1783247861 Closes VIZ-1215 more space for pie wells (#60637) 2025-07-08 18:03:21 +02:00
Sébastien
9180bcffc4 Closes VIZ-1242 visualize another way copy (#60325)
* Closes VIZ-1242 visualize another way copy

* e2e

* e2e

* e2e

* fixed e2e
2025-07-08 18:02:21 +02:00
Riley Thompson
236b6a9f16 Delete bigquery datasets > 2 hours old (#60508)
* delete datasets > 2 hours old

* Add comment back
2025-07-08 10:48:56 -04:00
Brad Anderson
b11dc5b829 M1 of Improve the experience of slow loading cards in dashboards (#60564)
* Closes VIZ-1224 - Make dashcards use chart-specific skeletons (#60090)

* Updates Dashboard cards' loading state to use already-made chart-specific loading skeletons
* Adds SankeySkeleton
* Tweaks MapSkeleton so its fill color can be overridden
* Fixes double name issue in loading skeletons in pinned questions on collections page

* Closes VIZ-1230 - Trigger spinner state when card takes longer to load (#60359)
2025-07-08 10:26:04 -04:00
Alexander Polyankin
67c3b5b82d Chars composition fix (#60629) 2025-07-08 10:25:28 -04:00
Alexander Polyankin
4e626e44bf Add repro (#60570) 2025-07-08 13:58:32 +00:00
Alexander Polyankin
21eeee9d1d Add repro (#60574) 2025-07-08 09:46:32 -04:00
Oleksandr Solovyov
fd2f983e84 stop asking team workflows to review all migrations (#60628) 2025-07-08 15:27:35 +02:00
Alexander Polyankin
58ef36ab3c Add repro (#60589) 2025-07-08 13:00:46 +00:00
Fraser
cf575553bb Fix hover selector and add menu hover story (#60616) 2025-07-08 08:28:31 -03:00
Alexander Polyankin
f685a1ad7e Fix drill thru with multi-series dashcards (#60572)
* Fix drills with series

* Add a test
2025-07-08 06:17:15 -04:00
Alexander Polyankin
498d058f6a Fix MultiStageFilterPicker leaving the query with an empty stage (#60561)
* Fix MultiStageFilterPicker leaving the query with an empty stage

* Fix MultiStageFilterPicker leaving the query with an empty stage
2025-07-08 06:16:49 -04:00
Alexander Polyankin
c1bbd72109 Add repro (#60567) 2025-07-08 06:15:24 -04:00
Alexander Polyankin
48a235c45a Add repro (#60553) 2025-07-08 06:14:48 -04:00
Sébastien
a8e91c5bfd Fixed a type (#60598)
* Fixed type

* e2e

* e2e
2025-07-08 12:00:33 +02:00
Jakub Chodorowicz
66415b0ba6 Rename source param name to content (#60504)
* Rename source param name to content

* Rename source component paremeters to location
2025-07-08 10:40:09 +02:00
Mahatthana (Kelvin) Nomsawadi
7b1ac77db0 Remove beta message from the SDK readme, it's been GA for a while (#60591) 2025-07-08 07:53:55 +01:00
Sébastien
af7deb4b9c Closes VIZ-1218 reset button on data sources (#60123)
* Closes VIZ-1218 reset button on data sources

* resets to default only for single datasources cards

* e2e

* e2e

* removed TODO

* simpler

* disable reset btn when already pristine

* revert unnecessary changes to addDataSource
2025-07-08 08:51:58 +02:00
Alexander Polyankin
78f83e6c3c Add repro (#60573) 2025-07-07 18:57:03 -04:00
Alexander Polyankin
fdfe821815 Add repro (#60577) 2025-07-07 18:56:38 -04:00
Aleksandr Lesnenko
2fa6ea0c52 filters in dashcards tracking (#60517)
* filters in dashcards tracking

* update tracking according to spec
2025-07-07 21:07:54 +00:00
Jeff Bruemmer
2de2f8d732 docs - compress images (#60579)
* compress images

* more images
2025-07-07 20:11:10 +00:00
Aleksandr Lesnenko
8599574936 show active y-axis split lines on hover (#60238)
* show y-axis split line on hover

* fix axis split line visibility on hover

* review
2025-07-07 19:45:39 +00:00
Romeo Van Snick
a97d2d1c0d Preview native query with snippet (#60559)
* Allow previewing query that only has snippets

* Add e2e test
2025-07-07 19:30:12 +02:00
Romeo Van Snick
5f8b4e95eb [Integration] Column picker improvements (#60442)
* QUE-1370: Convert AccordionList to TypeScript (#59463)

* Convert AccordionList components to typescript

* Fix types for Select

* Fix types for FilterColumnPicker

* Fix types for QueryColumnPicker

* Fix types for FormSelect

* Fix types for DataSelector

* Fix types for data-picker

* Fix types for AggregationPicker

* Move types into types module

* Simplify searchProp

* Use default export

* Fix info icons always showing

* Remove unused --accordion-list-width

* Rename T for clarity

* Parametrise Section type too

* Fix default label renderer

* Fix missing props

* Avoid calling in on non-object items

* Simplify maxHeight prop

* Move fallbacks into AccordionListCell

* Move shared props to shared type

* Sort props

* Remove styled component for AccordionList

* Rename _list

* Fix itemIsSelected signature

* Simplify callback

* Fix searchFuzzy prop default

* Fix schema picker callback

* Fix aria-selected for tests

* Omit filter description

* Fix loading state

* Remove unused searchFuzzy prop

* Remove unused searchCaseInsensitive prop

* Remove unused hideEmptySectionsInSearch prop

* Reduce this.props usage

* Do not pass aria-expanded to non-expandable items

* Rename AccordionList.unit.spec to tsx

* Remove get and use type guards

* Remove unused cast

* Rename ListItem to Item

* Avoid silly x variable name

* Fix incorrect base type for Item

* Define Item type

* QUE-1359: Add highlight when item has cursor (#59622)

* Add highlight when item has cursor

* Add repro

* Use _.times

* Test using computed style

* Use Cypress._

* QUE-1360: scroll selected item into view (#59617)

* Scroll items into view when selected

* Add e2e test for scrolling items into view

* QUE-1361: Allow using table in search and add fuzzy search (#59693)

* Flatten getRowsCached into getRows

* Use method directly in checkSectionHasItemsMatchingSearch

* Build search index when props change

* Memoize the fuse index

* Add fuzzySearch props to AccordionList

* Enable fuzzy search in Filter and Aggregation picker

* Add unit tests for fuzzy search

* Add fallback for searchProp

* Remove unused variable

* Use shallow equality for memoization

* Remove this.state

* Add tableName and tableDisplayName to filter picker search props

* Strictly type searchProp

* Fix type of default search prop

* Do not include results with bad score

* Search by custom property

* Avoid O(n²) search

* Lower the score

* Fix types in test

* Memoize search

* Pull out isSearching

* Sort results by score

* Export SearchProp types

* Coerce default search props

* Use SearchProp types in Select

* Move itemScore and sectionScore to utils

* Remove search state from state

* Simplify initial cursor method

* Fix cursor logic for sorted items

* Add comment on why a custom memoize function is needed

* Fix unit tests

* Add forwardRef back to AccordionListCell

* Make ref dependency explicit

* Fix broken merge

* Correctly move cursor through rows

* Move searchFilter into getRows

* Fix missing rows

* Lower the search threshold

* Always show section when it has a type

* Move searchThreshold to constant

* Use includes

* Remove unused type fields

* Rename index.js to index.ts

* Refactor search

* Fix types

* Simplify ItemScores

* Allow customizing threshold in strategy

* Enable fuzzy search for query column picker

* Fix substring search

* QUE-1363: Custom expression fallback (#59992)

* Add clausesForMode helper

* Add custom expressions to filter picker

* Do not require helpText for snippets

* Remove helpText arguments from expression completions

* Export expressionClauseSnippet helper

* Allow opening expression editor with custom clause snippet

* Pass expression clause to custom expression editor

* Fix types

* Add onSearchTextChange to Accordionlist

* Select expression clause when typing (

* Only show expression clauses while searching

* Always sort expression clauses last

* Remove reportTimezone arg where no longer needed

* Add expression functions to aggregation picker

* Import underscore as _

* Rename filter

* QUE-1414: Fuzzy search tests (#60257)

* Add test for fuzzy matching in filter popover

* Add tests for picking custom expression in the filter picker

* Add test for selecting expression in aggregation picker

* Add test for selecting items in AccordionList while searching

* Verify that typing non-existing clause does nothing

* Typo

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* QUE-1468: Sticky search in AccordionList (#60190)

* Make the search bar floating

* Remove overflow override

* Correctly set width

* Pass width as direct prop

* Use sticky modifier

* Make search sticky in virtualized list

* Add scroll padding for search bar

* Do not scroll searchbar into view

* Use scrollIntoView vs scrollTo

* Pass maxHeight to scroll container directly

* Remove scrollTo in tests

* Use correct scrolling container

* Remove duplicate sticky style

* Unwrap accordionpicker

* QUE-1413: Colum completion prefix (#59921)

* Allow searching by table name in custom expression completions

* More strictly filter results

* Fix unit tests

* Also disable filter on functions

* Fix unit tests

* Add lower weight to displayLabelWithTable

* Fix e2e tests

* Fix e2e test

* Use display value from longest match

* Copy indices to avoid readonly error

* Fix e2e test

* Preserve option identity

* Use first match to render

* Undo e2e test changes

* Fix e2e test

* Allow matching columns names via long display name too

* Use displayLabel

* Increase score threshold

* Fix unit tests

* Remove missing key error

* Memoize fuzzyMatcher

* Fix e2e test

* QUE-1518: join picker custom search (#60493)

* Allow searching by table name in QueryColumnPicker

* Fix scroll on QueryColumnPicker

* Add custom expressions to join column picker

* Allow selecting expression with ( in QueryColumnPicker

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-07-07 15:53:48 +00:00
Brad Anderson
6d7524138a Closes VIZ-1248 - Update Dashboard tabs so bottom border is full width (#60470)
* VIZ-1248 Tweaks dashboard tabs bottom border (per Product feedback)
* VIZ-1248 Tweaks dashboard tabs scroll arrows so they don't overlap with tab bottom border
* VIZ-1248 Tweaks dashboard tabs bottom border so it shows up on fullscreen mode but not full width
* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-07 11:41:30 -04:00
Ryan Laurie
a793753415 🧹 Remove deprecated date inputs (#60414)
* Remove deprecated date inputs

* fix tz

* design updates

* update tests
2025-07-07 09:34:40 -06:00
Alexander Polyankin
20fb8601f6 Repro for "Query builder SQL references wrong column in outermost WHERE clause" (#60548) 2025-07-07 14:55:36 +00:00
Edward Paget
790d221d1f fix: optionally add can_run_adhoc_query in items (#60021)
* fix: optionally add can_run_adhoc_query in items

Allow the can_run_adhoc_query parameter to be optionally included in the
collection items response, so that targets that are not valid for ad hoc
queries can be removed from the picker in the UI.

* split up large test
2025-07-07 09:30:58 -05:00
Romeo Van Snick
ae79ee4e32 Do not show error when snippet is active (#60445)
* Do not show error when snippet is active

* Add test for hiding errors while snippet is visible

* Also suppress error underline when snippet is active
2025-07-07 15:15:23 +02:00
Nemanja Glumac
b484fc93ed Redesign a database connection string toggle UI (#60520) 2025-07-07 15:09:37 +02:00
Sébastien
a5880551f8 Closes VIZ-1214: improve feedback on areas where columns can be dragged onto (#60281)
* vertical cartesian well -> ok

* put the logic in a hook and handled hortizontal well

* added unit tests and handled other types of wells

* reorg and style

* css tweak

* Closes VIZ-1244 Wells light up upon dragging on them, even if the column won't map

* no outline

* Closes VIZ-1216 bubble size well style (#60380)

* fixes wrong drag overlay

* much better fix for draggig overlay

* tpyo

* removed useless cast

* removed comment

* refactored test
2025-07-07 12:57:49 +02:00
Timofey Kachalov
0614a03ea2 Fix PortalContainer to respect SDK styles (#60496) 2025-07-07 13:36:38 +04:00
Nicolò Pretto
dccd4f970e fix(sdk): use supbath for /auth/sso http call (#60488) 2025-07-07 09:34:07 +00:00
Sébastien
b5c789acf0 Closes VIZ-1208: smarter detection of selected columns (#60338)
* Closes VIZ-1208: smarter detection of selected columns

* no breakout when more than one metric

* no breakdown when more than 1 metric if new col is not date

* combo _is_ cartesian
2025-07-07 11:09:31 +02:00
Ngoc Khuat
e587fa357d Fix v_alerts cron syntax error with / (slash) (#60482) 2025-07-07 09:07:22 +00:00
Sébastien
bdeca87a47 Close VIZ-967 Adding Click Behavior to a Column with a Prefix Causes Strange Formatting (#60490) 2025-07-07 09:51:02 +02:00
Phoomparin Mano
efef12dbb0 fix(sdk): make isEmbeddingSdk consistent on new iframe embed using singletons (#60349) 2025-07-07 14:32:07 +07:00
Fraser
02da4ebccc Fix inconsistent header button styles (#60108)
* Fix inconsistent editor button styles
2025-07-07 12:52:15 +12:00
Oleksandr Yakushev
0ef0f93644 [cljs] Introduce match-lite to reduce CLJS bundle size (#59421)
* [m.lib.fe-util] Introduce match-lite to reduce CLJS bundle size

* [m.lib.filter] Replace match-one with match-lite

* [m.lib.remove-replace] Replace match-one with match-lite

* Replace match-one with match-lite on all CLJC files
2025-07-06 23:41:36 +03:00
metamben
76fd1bfb52 Add repro test for #33972 (#60515)
Closes #33972
2025-07-04 23:43:22 +00:00
metamben
52fd7f457c Add repro test for #51856 (#60513)
Closes #51856
2025-07-04 21:45:08 +00:00
metamben
b1401f1a5a Add repro test for #40061 (#60507)
Closes #40061
2025-07-04 23:51:58 +03:00
Aleksandr Lesnenko
de37711918 fix question caching key in dashboard selectors (#60476) 2025-07-04 16:36:59 -04:00
Aleksandr Lesnenko
5e40b0d589 adjust inline filters popover position (#60425) 2025-07-04 20:17:47 +00:00
Oleksandr Yakushev
07267954f1 perf: Optimize remove-empty-clauses (#60461) 2025-07-04 20:16:52 +00:00
Oleksandr Yakushev
4cd5ac3743 [malli] Don't instrument multimethods when instrumentation is disabled (#60458)
* [malli] Don't munge function names when instrumentation is disabled

* [malli] Don't instrument multimethods when instrumentation is disabled
2025-07-04 21:56:15 +03:00
Anton Kulyk
bf06c662eb Fix flaky test (#60494) 2025-07-04 14:33:03 -04:00
Phoomparin Mano
9ab71b7283 chore(sdk): skip flaky test (#60495) 2025-07-04 16:24:39 +00:00
Alexander Polyankin
6acc4b0e86 Unskip repro 40635 (#60453) 2025-07-04 07:39:53 -04:00
Nemanja Glumac
c8e9ccae66 Add data (csv, db, gsheets) via the "Add data" modal (#60330)
* Introduce the option to add data from the sidebar via "Add data" modal  (#58408)

* Add CSV panel to the "Add data" modal (#59008)

* Add Metabase storage upsell to upload CSV panel (#59901)

* Add unit test coverage for the missing collection utils (#59902)

* Consolidate analytics around databases, CSV uploads and Google Sheets (#59996)

* Add Google Sheets management tab to the _Add data_ modal (#59905)
2025-07-04 13:24:41 +02:00
Timofey Kachalov
89dd4a6db2 sdk(fix): Render legacy popover within the proper portal container for the SDK (#60126) 2025-07-04 14:57:48 +04:00
Fraser
98e2dcc7c8 Update license text for airgap tokens (#60373)
* Add description for airgap tokens
2025-07-04 20:56:00 +12:00
Nemanja Glumac
148bd23161 fix(sdk)!: Remove deprecated + unused QuestionEditor and ModifyQuestion(#60374) 2025-07-04 15:32:13 +07:00
Mahatthana (Kelvin) Nomsawadi
68549e8664 fix(sdk): fix popovers can't be rendered inside modals (#60431)
* Fix popovers can't be rendered inside modals

* Fix wrapped tooltips
2025-07-04 07:21:05 +01:00
Sébastien
8adc64a632 Closes VIZ-1209 browser stalls when too many series in visualizer (#60385) 2025-07-04 07:11:08 +02:00
Sébastien
1ea95981bf Closes VIZ-1206 some settings are not preserved when changing to funnel (#60438) 2025-07-04 07:11:01 +02:00
appleby
00a24143f0 Fix join condition compilation on mongo when rhs is a literal value (#60457) 2025-07-03 17:49:15 -07:00
metamben
5feeb16ab7 Add repro test for #12679 (#60473)
Closes #12679
2025-07-04 01:15:19 +03:00
Ryan Laurie
34965e0fcb mark parameter test flaky (#60469) 2025-07-03 20:34:00 +00:00
John Swanson
7c39ff2fbe Fix a couple flaky tests (#60409)
* remove stray `t2/debug`

* fix flaky notification send test

another thread was responsible for popping off the queue so there was a
race condition here.

* fix flaky test for not calling DB

i feel bad about this but this seems to be a reasonable solution given
the situation.

Any endpoint that gets some setting inside it might emit an extra SQL
query or two. So we can't reliably check to see whether hitting a given
endpoint hits the DB.

What we can do is hit it a few times and make sure one of those times
didn't hit the DB. Which is silly... but yeah.
2025-07-03 20:17:16 +00:00
Ryan Laurie
7f724d65b0 🧹 Remove ButtonWithStatus (#60402)
* remove ButtonWithStatus

* fix button label

* e2e test update

* add intercept
2025-07-03 20:16:27 +00:00
Ryan Laurie
4c6ebf7d58 Refactor Browse Databases (#60157)
* Browse DBs WIP

* update browse card styles

* fix tests

* better markup

* brand color text
2025-07-03 13:45:23 -06:00
Alexander Polyankin
63466c8a41 [Integration branch] Make joins with custom expressions (#60036) 2025-07-03 14:47:00 -04:00
Ryan Laurie
997806cad5 Don't use hyphens in token features 😁 (#60273)
* use underscores for token features

* update tests

* fix backend test
2025-07-03 12:34:53 -06:00
dpsutton
a5c3bec1fa Swap over to mysql's images for 8.0 (#60446)
Tests fail in CI which try to set timezones in mysql to "alias" types:
'US/Pacific', etc

```
❯ grep "Failed to set timezone" test-log_formatted.json | jq -r '.message'
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Eastern' for :mysql database
Failed to set timezone 'US/Hawaii' for :mysql database
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Eastern' for :mysql database
```

on mysql image from circle CI:

```
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2025-07-03 02:00:48 |
+---------------------+
1 row in set (0.01 sec)

mysql> SET @@session.time_zone = "US/Pacific";
ERROR 1298 (HY000): Unknown or incorrect time zone: 'US/Pacific'
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2025-07-03 02:10:25 |
+---------------------+
1 row in set (0.01 sec)
```

on mysql's official image for 8.0:

```
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2025-07-03 13:51:36 |
+---------------------+
1 row in set (0.00 sec)

mysql> SET @@session.time_zone = "US/Pacific";
Query OK, 0 rows affected (0.00 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2025-07-03 06:51:41 |
+---------------------+
1 row in set (0.01 sec)
```

This happened because circle ci bumped the base image to ubuntu 22 in
511bd63787
and this has different timezone information.

Here's timezone data in their 8.0.32 image

```
ls -l /usr/share/zoneinfo/US/Pacific
lrwxrwxrwx 1 root root 22 Feb 14 21:25 /usr/share/zoneinfo/US/Pacific -> ../America/Los_Angeles
```

and in 8.0.42 (alias to latest 8.0 at time of writing)

```
ls -l /usr/share/zoneinfo/US/Pacific
/usr/bin/ls: cannot access '/usr/share/zoneinfo/US/Pacific': No such file or directory
```

Mysql's official images still have these legacy timezone aliases
2025-07-03 10:17:06 -05:00
Anton Kulyk
ababaeaa40 Improve heading filters collapsing logic (#60271)
* Support refs in parameter list components

* Rework heading element size checks

* Extract constants

* Add visual tests

* Fix e2e tests

* Add screenshots

* Revert "Fix e2e tests"

This reverts commit df4661a4a2.

* Fix e2e tests

* Remove not used ref

* Update Loki Snapshots

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-03 16:04:58 +01:00
Timothy S. Dean
9e2c462c09 Make mu/fn safe for cljs (#60299)
The mu/fn macro produces instrumented code, whose tail catches java.lang.Exception to clean up their stacktraces. This is obviously not possible in clojurescript. This adjusts the code to detect whether or not it's compiling for Clojurescript or Clojure and tweak the expansion appropriately.
2025-07-03 08:14:14 -06:00
Ryan Laurie
d80b0f7cb5 remove unused test helper (#60398) 2025-07-03 07:53:50 -06:00
Ryan Laurie
03a090e3fa move archiveCollectionModal (#60399) 2025-07-03 07:38:39 -06:00
Jakub Chodorowicz
1aecbe45ea Makes upsells dismissible (#60332)
* Enhance UpsellBanner component with dismissable feature

* Add dismissable functionality to Upsell components and update UpsellBanner integration

* Refactor UpsellWrapperDismissable to improve props handling and update UpsellBanner integration

* Refactor close icon and add tests

* Improve dismissible typing

* Adjust Banner text styling

* Add missing mocks

* Change the property to dismissible
2025-07-03 12:32:45 +02:00
Romeo Van Snick
dd8d9aaee6 Only bind ctrl-f to search on windows (#60429) 2025-07-03 11:41:24 +02:00
Nicola Mometto
0ff434acce Reduce memory pressure during BigQuery sync (#59683)
* lazier bigq describe-table

* lazier even, with one query per table

* group by in sql

* fix tests

* use by-key in sync-fields

* style

* lazier

* style

* fix completing

* batch describe

* error safe

* use information-schema

* higher default

* pre-filtering on bigq

* add reducible test

* reinstate explicit sorting, we're eager in there anyway

* bigger!

* add extra test

* Update modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk.clj

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* spelling

* alias to xforms

* missed alias update

* comment

* remove dependency on xforms

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-07-03 09:49:22 +01:00
Anton Kulyk
c0da9fe3a1 [Feature] Filters in question dashcards (#59684)
* Enable filters in question dashcards (#59420)

* Enable inline filters on question dashcards

* Fix type errors

* Update unit tests

* Remove scale transform for `DashboardParameterList`

* Add e2e tests

* Fix unit tests

* ensure inline filters connect to only their dashcards (#59591)

* update inline filters ui (#59761)

* allow connecting inline filters to other cards on the same tab (#59764)

* disable dashcard pointer events when editing dashboard (#59768)

* disable dashcard pointer events when editing dashboard

* review

* Fix type error

* Correctly duplicate question dashcards with inline filters (#59635)

* Update parameter mappings when duplicating a card

* Add tests

* Fix e2e tests

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>

* fix heading parameter mapping layout (#60173)

* hide add filter button for users without query edit permission (#59663)

* hide add filter button for users without query edit permission

* wip

* specs

* Fix e2e test

* Fix dashcard menu layout

* Filters in dashboards M2 backend (#60162)

* question filters in email subs v1

* add a little padding

* untangle circular dependency

* fix inline parameters for slack

* fix some of the slack tests

* fix more slack tests

* fix hopefully final slack tests, and add a new one

* parameters email styling changes after pairing with Kyle

* update slack code to address comment

* fix style call

* remove now-unused function

* try to fix slack tests

* try to fix header bolding in slack

* make dashcard menu button always visible (#60411)

* make dashcard menu button always visible

* Update Loki Snapshots

* tweak styles to prevent overflow on scalar cards

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-02 16:53:41 -07:00
Aleksandr Lesnenko
42aa1cc95f set a bin range to between filter in dashboard click behavior (#59894) 2025-07-02 22:34:57 +00:00
Denis Berezin
5a07192176 Fix permission check for notifications - allow slack (#60400)
* Fix permission check for notifications - allow slack

* Fix e2e
2025-07-03 01:26:02 +03:00
Oleksandr Yakushev
5477bf1a8c [parse-param] Rewrite metabase.lib.parse-param to handcrafted parsing to drop Instaparse (#60242) 2025-07-03 01:23:42 +03:00
Aleksandr Lesnenko
91fc911887 fix trend native formatting (#60223) 2025-07-02 18:22:35 -04:00
Nemanja Glumac
1e4efe0fb8 Remove a potentially superfluous step from the default e2e snapshot (#60309) 2025-07-02 21:57:07 +00:00
Cam Saul
5372f7a813 Add Kondo warning about committing t2/debug (#60224) 2025-07-02 14:55:24 -07:00
Alberto Perdomo
7b7a81ec37 Add missing step to set JWT SSO URI (#60405) 2025-07-02 20:57:43 +01:00
Alexander Polyankin
f0bffec1ef Fix bucketed column names after the annotate PR (#60291)
* Fix bucketed column names after the annotate PR

* Fix bucketed column names after the annotate PR

* Fix bucketed column names after the annotate PR

* Unskip dashboard tests

* Unskip dashboard tests

---------

Co-authored-by: Roman Abdulmanov <roman@metabase.com>
2025-07-02 18:39:22 +00:00
Ryan Laurie
dae160df0b move AddToDashSelectDashModal (#60396) 2025-07-02 12:31:40 -06:00
Alexander Polyankin
f79a5a3b68 Removing FK->PK remapping hack (#59859) 2025-07-02 18:17:49 +00:00
Alberto Perdomo
51b6f7e41c Update SDK changelog (#60403) 2025-07-02 19:13:18 +01:00
Anton Kulyk
9e75dcffa6 Unwire inline parameters when moving a dashcard to another tab (#60144)
* Unwire inline parameters when moving a dashcard

* Add tests

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-07-02 17:45:51 +01:00
Jeff Bruemmer
93c0afb069 typo (#60393) 2025-07-02 12:28:23 -04:00
Eric Normand
6646c46d90 datetime(bytes, mode) custom expression function (#59206)
* Typo in name

* Test an implement iso and simple mode strings

* Implement simple coercion strategy for sqlite

* Implement simple coercion for clickhouse

* Implement simple coercion for vertica

* Try wrapping strings with h2x/literal

* Fix athena

* Fix Vertica concatenation

* Try other clickhouse fix

* Let's try to fix hive-like

* Typo in clickhouse!

* Fix vertica

* Smarter parsing.

* Oops extra paren

* use parseDateTime() for clickhouse

* Add snowflake.

* Fix insane Snowflake test.

* Add databricks sqlite and vertica to test

* Tests, yo

* We need all sql+mongo to support bytes

* Remove redundant limit

* Implement bytes->temporal for hive-like

* Add more dbs to bytes->temporal test

* WIP

* Update frontend schema

* Remove printlns because it's poluting the test logs

* Presto uses LocalDateTime

* Starburst uses LocalDateTime

* Use zoned tiem for sparksql

* Snowflake binary dataset type

* Sqlite BLOB datatype

* SQL Server binary type

* Add vertica binary type

* SparkSQL binary type

* BigQuery binary type

* Capitalize clickhouse binary type

* Try a different type for SparkSQL

* Implement temporal bytes coercion for sqlite

* Implement temporal bytes coercion in sql server

* Add Sqlite binary dates expectations

* Change date type for sparksql expectation for simple datestring

* Implement temporal bytes coercion in vertica

* Implement temporal bytes coercion for Oracle

* MongoDB temporal bytes coercion

* Vertica uses cast as VARCHAR, not to_char()

* Oracle binary date expected return type

* Cut off multiple databases that can't convert temporal bytes to datetimes

* kick ci

* Allow all databases except athena

* Save some code for later

* Athena temporal string coercion (simple)

* Better comment

* Clean up tests

* Use more dispatch values and implement bytes tests

* Implement isobytes coercion strategy

* Test that drivers without binary temporal coercion throw exceptions

* Fix expectation for h2 and postgres

* Implement iso bytes in mongo

* Implement iso bytes in Oracle

* Implement binary iso coercion for hive-like

* Update expected return from h2 and postgres

* Implement binary iso coercion for Starburst

* Implement redshift and presto binary iso coercion

* Remove hive-like implementation for bytes coercion

* Rename bytes-iso and bytes-simple to isobytes and simplebytes

* Implement mode dispatch for datetime

* Fix Oracle typo

* Implement sqlite binary coercion

* Update frontend text.

* Update enum

* Normalize strings to keywords in legacy

* Clean up

* Clean up databricks bytes ingestion.

* Clean up more

* Improve syntax for valid modes check

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>

* Improve text

* Add fe tests for mode strings

* Complete coercion strategy code

* Avoid directly referencing driver names

* REmove unused mode string + correct validation logic

* Better feature keywords

* Frontend test for binary cast

* Appease the Kondo

* Improve fe test

* Build new ad hoc question with native question as source

* Fix types

* Fix test description

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-02 11:01:47 -05:00
Sébastien
4b39657797 Closes VIZ-1235 update top nav filter appearance (#60197)
* Closes VIZ-1235 update top nav filter appearance

* e2e

* e2e

* eslint

* e2e

* e2e
2025-07-02 16:40:23 +02:00
Sébastien
d9eec6d01f followup on VIZ-1221 added translation (#60178) 2025-07-02 16:09:49 +02:00
Brad Anderson
131c127eb9 #60285 Brings back .CardsContainer class that was removed in #59529 (#60286) 2025-07-02 09:30:09 -04:00
Nemanja Glumac
4b527d16cb Remove unused ConfirmContent (#60355) 2025-07-02 15:12:27 +02:00
Oisin Coveney
50ba7910a0 fix(sdk): Remove fullscreen and refresh buttons from SDK dashboard as they don't make sense (#60198)
* Remove refresh, fullscreen, and by extension, the nightmode toggle from SDK

* remove SDK_DASHBOARD_VIEW_ACTIONS

* Refactor tests and stories to be a little easier to debug something like this, and use explicit keys for the dashboard actions

* Fix up a thing

* Fix unit tests

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-07-02 13:56:16 +01:00
Anton Kulyk
1de9f60d69 Fix duplicate filter names (#60333) 2025-07-02 13:25:27 +01:00
Anton Kulyk
427c8df3e3 Fix "undo" when removing a heading dashcard with filters (#60331)
* Show undo toast from redux action vs. component

* Restore parameters on undo dashcard removal

* Add e2e test

* Fix console error
2025-07-02 13:25:13 +01:00
Uladzimir Havenchyk
8321dcb44d test: reduce noise from warnings from QueryBuilder unit tests (#60321)
* test: reduce noise from warnings from QueryBuilder unit tests

* typecheck
2025-07-02 13:40:59 +03:00
Nemanja Glumac
feb1037758 Remove deprecated and unused WithPublicDashboardEndpoints (#60363) 2025-07-02 12:18:00 +02:00
Ngoc Khuat
b7a556a2b7 move metabase.util.jvm/metabase-namespace-symbols to test (#58918) 2025-07-02 09:00:03 +00:00
Fraser
cc7564e1f8 Use Indicator for update notifications (#60106)
* Use Indicator for update notifications

* Move indicator to the right side
2025-07-02 20:39:02 +12:00
Oleksandr Solovyov
4dad9fd40e ask search bots to not index openapi docs (#60376)
otherwise Google is trying to index every instance of Metabase docs
2025-07-02 08:37:18 +00:00
Timofey Kachalov
9a3a5e8d52 Improve Sample apps healtcheck logic (#60339) 2025-07-02 12:10:14 +04:00
Luis Paolini
96e51b83b1 Update build.md (#60193)
wipe remains of Java 11
2025-07-01 19:27:00 -04:00
Nemanja Glumac
835792147a Delete deprecated and unused FormCheckbox (#60356) 2025-07-02 00:28:45 +02:00
Sloan Sparger
cc112327ab [Metabot] Make streaming the default (#60311) 2025-07-01 15:37:56 -05:00
Jeff Bruemmer
3204acc748 docs - update sync scans (#60011) 2025-07-01 16:17:07 -04:00
Jeff Bruemmer
3f2f202b28 update UI copy and docs (#60216) 2025-07-01 16:16:42 -04:00
Sloan Sparger
1324a86e65 [Metabot] Better text streaming (#60226)
* wip

* save progress

* TEMP COMMIT

* go another direction

* add tests, remove debugging colors

* clean up

* add a few more unit tests

* try rounding down

* fix scrollbar flickering for some users, cancel pending animation frames on unmount
2025-07-01 14:13:34 -05:00
Timothy S. Dean
e59956db6a Make a test less flaky. (#60334) 2025-07-01 11:59:21 -06:00
Sloan Sparger
ad8f5d6944 [Metabot] Thinking + error style iteration (#60095)
* implement updated styling, refactor out error messages from message state to better control error formatting, refactor out thinking and message components from MetabotChat

* finish things up

* unit tests for tool call logic

* add missing test around message clearing after error

* fix copy in e2e test
2025-07-01 12:59:01 -05:00
Timofey Kachalov
59cd8376fe Render ComparisonPicker for SDK without a portal (#60192) 2025-07-01 21:35:10 +04:00
Timofey Kachalov
3584d9410d Replace react-beautiful-dnd with dnd-kit for ChartSettingFieldsPartition (#60167) 2025-07-01 19:53:09 +04:00
Nemanja Glumac
ab17acf66b Remove <TextButton> (#60323) 2025-07-01 17:17:58 +02:00
Jakub Chodorowicz
5d969b8913 add upsells for dev instances in admin settings (#60044)
* Create UpsellDevInstances for Embeddings pages

* Add dev instance upsell to general settings

* Add dev instancles banner

* Hide upsell in in dev mode

* Add StorePaths type

* Update links for dev instances banner

* Update store link for upsell dev instance

* Refactor DevInstanceBanner to use translation function directly for text and external links

* Add unit tests for DevInstanceBanner component

* Refactor imports for UpsellDevInstances across embedding settings components

* Refactor DevInstanceBanner to use a reusable BannerBody

* Replace ExternalLink with Anchor in DevInstanceBanner

* Add jsdoc to getStoreUrl function

* Add target blank to store url
2025-07-01 17:08:50 +02:00
Nicolò Pretto
1ba3a2259e fix embedding-reproduction test, "issue 8490" failing because it finds (#60322)
multiple elements
2025-07-01 15:41:56 +02:00
Nicolò Pretto
68c03d37c9 document the backward-compatibility-tests (#60134)
* document the backward-compatibility-tests

* Update bin/backward-compatibility-test.js
2025-07-01 10:25:39 +00:00
Mahatthana (Kelvin) Nomsawadi
1169f3f043 Fix failed host apps tests (#60259)
* Fix failed host apps tests

* Fix host app tests still are failing

* Fix bug on the file-path with only the app-host tests change

* Fix the file-path
2025-07-01 03:41:11 +01:00
Nemanja Glumac
2ab98edd41 Add toast upon successful database connection during setup (#60301) 2025-06-30 21:35:18 +00:00
Phoomparin Mano
ebcf446ad9 fix(sdk): crash when changing questionId from new to native question (#60161) 2025-07-01 02:57:30 +07:00
Jeff Bruemmer
dd02ac1df1 docs - update links (#60290)
* links

* links

* more links

* link

* cleanup
2025-06-30 15:05:10 -04:00
Nicola Mometto
4504595645 add sync test around fks (#60074)
* add test

* Update test/metabase/sync/sync_metadata/fields_test.clj

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-06-30 17:31:35 +01:00
appleby
fbf6038a83 Unskip e2e regression test for metabase#49305 (#60171)
metabase#49305 was fixed by #57981 which added its own test, but this regression test can now be unskipped as well.
2025-06-30 08:53:16 -07:00
Jeff Bruemmer
11cfa6679a docs - links and link fixes (#60269)
* links and link fixes

* Update docs/dashboards/subscriptions.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-06-30 14:55:22 +00:00
Jeff Bruemmer
e3688062aa docs - permissions strategies for embedding (#60164)
* edits

* links

* impersonation

* edits

* connective tissue

* summary

* remove tenant

* note on all users

* formatting

* typo

* Alex edits

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-06-30 10:53:41 -04:00
Nick Fitzpatrick
ecbb96c04d Mantine V8 integration branch (#58773)
* update deps

* initial date migration

* default portal reuse target node to false

* remove timezone from MonthYearPicker value

* date picker adjustment for timezone

* unit tests

* fix Quarter Picker Types

* re-apply patch, fix up unit tests

* last adjustments?
2025-06-30 08:29:01 -06:00
Oleksandr Solovyov
e121e258ed add dev.migrate/orphaned-changesets (#60128) 2025-06-30 16:16:52 +02:00
Oleksandr Solovyov
7c25b5d622 update copy on 'Only send this alert once' option (#60194) 2025-06-30 14:10:26 +00:00
Nemanja Glumac
542998e964 Fix HostAppTestSuiteName type (#60239) 2025-06-30 14:28:44 +02:00
Anton Kulyk
70c565cc2a Fix redundant API calls in object detail viz (#60191) 2025-06-30 11:42:52 +01:00
Timofey Kachalov
fcb5200ad9 Move SDK e2e sample/host app test docs into SDK dev.md file (#60068) 2025-06-30 14:01:22 +04:00
Timofey Kachalov
f854fa1b6c Fix nextjs sample app env config (#60255) 2025-06-30 09:32:58 +00:00
bryan
a15838f7af rename test version of "es.json" (#60203) 2025-06-30 11:42:48 +03:00
Sébastien
7405037f12 Closes VIZ-1104 clear settings after drillthrough (#60185) 2025-06-30 06:54:21 +02:00
Brad Anderson
4299f31087 VIZ-147 Adds saving-dom-image-overflow-visible override to dashboard card titles since html2canvas doesn't support text-overflow: ellipsis so it cuts off the text in a suboptimal way (even the ascenders/descenders) (#60225) 2025-06-27 19:14:45 -04:00
Nemanja Glumac
2a1665066e Fix "additional terms" tooltip in settings uploads (#60232) 2025-06-28 01:11:51 +02:00
Sloan Sparger
2da2dc3a03 [Metabot] Do not clear conversation history when using chart analysis or sql fixing (#60154)
* dont start new conversations when fixing sql or analyzing a chart

* fix unit test
2025-06-27 23:10:21 +00:00
Aleksandr Lesnenko
4406c4464d New apply dashboard filters UI (#59670)
* new manual filter apply ui

* apply filter -> apply
2025-06-27 18:51:21 -04:00
Cam Saul
838ae27f16 Unify QP + Lib metadata calculation + 1000 new tests (#59013)
* `annotate` middleware => MLv2

* Test fixes

* Fix #42307

* Add `lib.join/rename-join`

* Continue to iterate on `annotate` rewrite

* Squash #58712

* Less test noise

* Revert "Squash #58712"

This reverts commit 9c8d170aa4.

* Only one test failure to go!

* Add more documentation; code cleanup

* Improved column looping code.

* Test fix 🔧

* Code cleanup

* Use existing Join renaming code.

* FIX QUE-1330

* Fix #30397 / QUE-147

* Kondo cleanup

* Test fixes.

* 13384 assertions, 81 failures, 47 errors.

* 13373 assertions, 48 failures, 28 errors.

* 13400 assertions, 48 failures, 15 errors.

* 13391 assertions, 48 failures, 12 errors.

* 13401 assertions, 22 failures, 11 errors.

* 13404 assertions, 20 failures, 6 errors.

* 13407 assertions, 13 failures, 6 errors.

* 13414 assertions, 11 failures, 8 errors.

* 13412 assertions, 10 failures, 8 errors.

* Minor code cleanup

* Minor code cleanup

* 13412 assertions, 10 failures, 5 errors.

* Fix Kondo errors

* 13411 assertions, 10 failures, 5 errors.

* 13404 assertions, 7 failures, 5 errors.

* 13411 assertions, 3 failures, 5 errors.

* 13399 assertions, 2 failures, 5 errors.

* 13396 assertions, 2 failures, 4 errors.

* 13424 assertions, 2 failures, 2 errors.

* Test cleanup

* Fix deps graph

* Update lib module config

* Cleanup

* Kondo cleanup

* Minimize diff

* 13421 assertions, 3 failures, 2 errors.

* Nice refactor of big hairball test

* More beautiful refactoring

* 13474 assertions, 0 failures, 1 errors.

* Fix linter error

* Remove unused `:aggregation_index` column

* Test fixes

* Test fixes 🔧

* 14547 assertions, 1 failure, 1 error.

* Fix calling the zero arity of unique-name-generator twice

* Handful of test fixes 🔧

* Fix :converted-timezone for :convert-timezone with 3 args instead of 4

* Fix metabase.queries.api.card-test/renamed-column-names-are-applied-to-json-test

* Split up mega test

* Split up another large test

* Fix error message

* Resolve #39887. 14536 assertions, 1 failure, 0 errors.

* WOW! Is everything green now??

* Test fix 🔧

* Update issue IDs

* Update more issue IDs

* PR feedback

* A test fix 🔧

* Another test fix 🔧

* More test fixes 🔧

* Formatting

* Test fixes 🔧

* Test fixes 🔧

* More test fixes 🔧

* Less nonsense

* 6618 assertions, 115 failures, 16 errors. [Lib]

* 6637 assertions, 3 failures, 16 errors.

* 8208 assertions, 3 failures, 0 errors. [Lib]

* Almost ready??

* [Lib] 8216 assertions, 0 failures, 0 errors.

* [QP] 5330 assertions, 21 failures, 31 errors.

* [QP] 5344 assertions, 8 failures, 2 errors

* Fix QUE-1380

* Fix QUE-1410

* [QP] 5344 assertions, 8 failures, 1 errors.

* 5345 assertions, 2 failures, 1 error.

* Proper deduplication in field resolution; also, add some normalization tests

* 13563 assertions, 1 failure, 0 errors.

* 13579 assertions, 0 failures, 0 errors.

* Kondo & cljfmt

* Kondo

* Test fixes 🔧

* Disallow duplicate expression names (QUE-1412)

* Test fixes 🔧

* Test fix

* Fix QUE-1418

* Fix error messages about inline-value with MongoDB

* Fix Redshift test failure

* Fix Athena test

* Fix BigQuery tests

* Fix dumb test failure

* Card source-model-cols should work for Cards without a query.

* Fix MongoDB

* Fix Druid

* Fix some busted code formatting.

* Fix column names

* Fix column names

* Do type inference for native queries with MBQL stages if the driver returns all :type/*

* Fix column names

* Fix column names

* Fix column names

* Druid test fixes 🔧

* More test fixes 🔧

* Update more FE tests

* MBQL 5 map normalization should not normalize nil values

* Support new `:decode/mock` key for mock metadata provider

* Split up unrelated large test

* Don't add :was-binned false to refs

* Clean up the display name calculation logic for column metadata

* Update binning middleware to use 'better' column resolution logic in lib.field.resolution

* Don't calculate different display names in QP results metadata

* Properly convert join :source-metadata

* Update expected display name

* Revert making test too complicated

* Simplify the remove-inactive-field-refs middleware

* Misc code cleanup and test fixes 🔧

* Appease whitespace linter

* Add test to make sure Lib result metadata merges in :info :metadata/model-metadata

* Literally an insane number of new tests

* Add `:lib/original-display-name` to column metadata schema

* Improve error message for fix-bad-references when you use Field ID ref with native source query

* Improved field resolution logic

* Card should NOT add :lib/original-display-name all willy-nilly

* Add `:lib/source-display-name` and `:lib/ref-display-name`

* FINALLY fix display name logic??

* Revert making things private (thanks for lying to me LSP)

* Test fixes 🔧

* Remove `:lib/hide-bin-bucket?`

* Test fix

* Update notebook helpers

* Always use LONG display names for columns from the previous stage.

* Fix metabase.query-processor-test.nested-queries-test/space-names-question-test

* Make sure we use correct display names for implicitly joined columns

* Make sure BINNING gets propagated with `:lib/original-binning`.

* Make sure we correctly calculate if a column is inherited or not.

* Make sure binning info is returned in QP results and other misc fixes

* Do NOT return join alias info for columns that come from implicit joins.

* Update tests

* Some test fixes

* Don't generate wacky default join aliases

* Test fixes 🔧

* Fix more tests

* Prettier

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Use 'Unknown Field' as display name for unknown fields

* Fix incorrect use of expression refs

* Mark selected columns correctly

* cljfmt

* Update/fix backend tests again

* More fix selection fixes 🔧

* Fix equality matching for join columns

* Update tests

* Fix Kondo

* Fix line-bar-tooltips.cy.spec.js

* Add transducer version of u/index-by

* Some PR feedback

* Fix joins-reproductions.cy.spec.js 🔧

* Kondo cleanup

* Fix multiple-column-breakouts.cy.spec.ts

* Update tests

* Update tests not to expect :ident

* Update test not to expect duplicate columns

* PR feedback.

* More test fixes.

* IDK, maybe this is the last round of fixes. 🔧

* Support normalizing parameter dimensions

* Test fixes 🔧

* Fix CLJS code

* One last fix for column equality

* Update a couple of e2e tests

* Another test update

* Fix the test

* remove duplicated spec

* Even more tests (1 million tests)

* cljfmt

* Add test to make sure breakoutable-columns does not include remaps

* Fix Kondo

* skip failed tests

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-06-27 13:34:43 -07:00
Oisin Coveney
01ef763723 Consolidate SDK dashboard components (#59529) 2025-06-27 21:22:45 +01:00
appleby
974684b58d Enable the :expression-literals feature for the mongo driver (#60107)
* Enable the :expression-literals feature for the mongo driver

* Wrap :value expressions in $literal when compiling for mongo

* Add mongo compile-cond and compile-filter impls for :expression, :field, and :value

* Better codegen of compile-filter and compile-cond for :expression, :field, and :value on mongo

* Review feedback: hash-map -> array-map
2025-06-27 13:22:26 -07:00
Ryan Laurie
7ed7423614 Cleanup docker setup in CI (#60125)
* cleanup docker setup in e2e

* fix name

* pin maildev and update attachment api
2025-06-27 13:58:47 -06:00
Case Nelson
97d1a1e82a dev: separate app-db tests into its own workflow (#60207) 2025-06-27 13:12:51 -06:00
Nemanja Glumac
e872767998 Forbid assigning return values in Cypress (#60152)
* Fix violations

* Error on future violations

* Add a note to the e2e readme
2025-06-27 21:00:40 +02:00
bryan
b89726a15d send dispatch_type in the client payloads (#60219) 2025-06-27 18:37:48 +00:00
bryan
bcf6e46585 Merge -> Close (#60214) 2025-06-27 12:25:24 -06:00
Case Nelson
a3aed2ab66 dev: bigquery static datasets (#60168)
* dev: bigquery static datasets

* Check every two days

* Fix var

* Fixes for sql params and test fixes

* Fix tests

* Fix tests

* Add logging for test debug

* Fix time range

* Fix default dataset check

* Fix dataset name replace

* Ignore exceptions on tracking in case of could not serialize error

* Fix kondo

* More kondo fixes
2025-06-27 12:19:42 -06:00
bryan
57fcb1a6d1 Update docs workflow triggers (#60208) 2025-06-27 11:45:44 -06:00
Sébastien
19b4b29ce7 Closes VIZ-1145 row chart label cut off (#60179)
* Closes VIZ-1145 row chart label cut off

* Update frontend/src/metabase/visualizations/shared/components/RowChartView/utils/data-labels.unit.spec.ts

Co-authored-by: Brad Anderson <brad@metabase.com>

---------

Co-authored-by: Brad Anderson <brad@metabase.com>
2025-06-27 19:02:56 +02:00
Sébastien
547028bafd Closes VIZ-642 no more move cursor in mobile (#60188) 2025-06-27 19:01:10 +02:00
bryan
343dd2c518 Add cljfmt rule for driver/api-replace + run formatter (#59892) 2025-06-27 15:45:57 +00:00
github-actions[bot]
d834221200 Update translations 2025-06-26 (#60156)
* Update translation sources 2025-06-26

* Update translations

* comment out locale with wrong format

* let's try to just rename it?

* et

* dont import estonian (yet)

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-06-27 17:12:59 +02:00
Aleksandr Lesnenko
0fb5606341 enable table cell multiselect (#59823)
* enable table cell selection

* fix spec
2025-06-27 09:29:03 -04:00
Jakub Chodorowicz
0452a7403b Adjust License Token setup step (#59464)
* Adjust License Token setup step

# Conflicts:
#	frontend/src/metabase/setup/components/LicenseTokenStep/LicenseTokenForm.tsx

* Add License Token Step tests

* Accessbility improvements

* Use button for skip

* Fix setup flow tests

* Fix e2e setup tests

* Use existing store url and unstyled button

* fix selector usage

* Make the token error test more specific

* Simplify the full width divider styling

* Simplify Popover styles

* Fix the store link

* Use plain Button for skip

* Follow the setup pattern in tests

* Improve copy text

* Provide translation context

* Use HoverCard component instead of Popover

* Don't display license token hover card by default
2025-06-27 09:51:11 +02:00
Sébastien
90bf2749d3 Closes VIZ-1221 nicer error state for missing columns (#60003)
* Closes VIZ-1221 nicer error state for missing columns

* e2e

* handle missing card gracefully
2025-06-27 08:37:32 +02:00
Sébastien
3219571e48 Closes VIZ-1211 default colors for visualizer cards (#60115)
* Closes VIZ-1211 default colors for visualizer cards

* e2e

* .

* .
2025-06-27 08:37:15 +02:00
appleby
b39dfa529a Add xrays drill thru repro for #23820 (#59669)
* Add e2e repro for #23820

* Review feedback: exist -> be.visible

* Review feedback: drop force from click action
2025-06-26 17:58:15 -07:00
Tyler Plude
2fd83dba03 [Feature] Parameters in Dashboard Cards (#59083)
* BE support for inline_parameters field on dashboard cards

* trailing whitespace; migration fix

* Add migration condition

* fix spec

* fix serdes

* Add filters to heading dashboard cards (#59201)

* Add `isHeadingDashCard` util

* Add "Add a filter" button to heading dashcards

* Extract `AddFilterParameterMenu` component

* Add `inline_parameters` to dashcard type

* Add inline parameters to heading dashcards

* Add `parameters` prop to `DashboardParameterList`

* Disable default heading mapping UI

* Add selectors for header and inline parameters

* Display heading dashcard filters

* Persist inline parameters

* Add unit tests

* Update heading placeholder

* Add e2e test

* Fix unit tests

* Fix `setFilter` e2e helper

* Rearrange heading elements

* Show variables mapping UI for headings

* Fix shrinking filter list

* Fix e2e tests

* Fix `hasInlineParameters`

* Fix copy

* Rename e2e helper

* Revert "Rename e2e helper"

This reverts commit d49ce4b752.

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>

* Fix editing filters in heading dashboard cards (#59264)

* Add `isSortable` prop to parameters list component

* Disable header filters sorting

* Don't disable pointer events for header dashcards

* Hide mapping UI when heading card doesn't have vars

* Add e2e test

* Update e2e test

* Update e2e test

* Add unit tests

* Correctly remove inline filters from header dashboard cards (#59276)

* Handle removing inline parameters

* Add e2e test for removing inline parameters

* Remove inline parameters when removing a dashcard

* Add e2e test

* Run prettier

* Disable auto-wiring for inline filters (#59337)

* Disable auto-wiring after adding a new card

* Disable auto-wiring after mapping filter to a card

* Add e2e test

* Handle inline parameters when duplicating a dashboard/dashcard (#59407)

* Fix inline filters legend when exporting dashboard PDF (#59619)

* Rename CSS ID

* Rename `parametersNode` var

* Fix filter widget legend position in PDF exports

* Closes VIZ-1057 VIZ-1056 touch up filter appearance (#59325)

* Closes VIZ-1057 touch up filter appearance

* added back DashCardParameterMapper

* handleResize also when isEditing changes

* fixed warning in selector and resize observing

* spacing and sizing is g2g

* added parameters with values length in narrow mode

* fixed unit tests

* fixed e2e

* fixed e2e again

* ...

* disable inline filters sorting (#59742)

* Fix type error

* Fix backend tests for filters in dashcards (#59953)

* Fix serialization tests for filters in dashcards

* also fix metabase.dashboards.models.dashboard-card-test

* fix more tests

* fix an old migration test to create entities via raw table name

* fix another migration test

* undo serialization baseline changes

* targeted change to serialization baseline to add inline_parameters

* Correctly display inline filters in public/embedded dashboards (#59484)

* Add e2e tests

* return inline_parameters in results of public and embed dashboard endpoints

* Add tests for enabled/disabled/locked parameters

* filtered locked params out of inline parameters in embedding

* Fix filters shown in the header and in cards

* Fix e2e test

* Fix parameters display

* Update Loki Snapshots

* Fix visual tests

* Update screenshots

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>

* Fix linter error

* Render header params beneath their associated headers in dashboard subscriptions (#59890)

* Fix serialization tests for filters in dashcards

* Render inline parameters in dashboard subscription emails beneath their associated header

* Fix kondo issues

* refactor out utils.clj

* fix whitespace + import

* fix kondo

* add unit test, fix typo

* add an e2e test

* address nit

* add slack implementation

* fix test

* try to fix slack test again

* reset serialization baseline to match feature branch

* correct snapshots

* Update Loki Snapshots

* okay now it should pass

* snapshots

---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-06-26 20:30:13 -04:00
Timofey Kachalov
223e79b9c2 Adjust embedding sdk ci triggers (#60043) 2025-06-27 00:48:31 +04:00
Case Nelson
7faeda11f2 fix: driver-tier-3-check-output (#60163) 2025-06-26 20:16:08 +00:00
metamben
702230d6f4 Distinguish external remapping from explicit join (#60029) 2025-06-26 23:14:39 +03:00
John Swanson
3d9ec072e4 Fix N+1 in get card dashboards endpoint (#60139)
This endpoint should also be changed to a GET endpoint, but I'll do that
down the road.
2025-06-26 11:50:04 -07:00
Case Nelson
08cfa3d14b fix: snowflake flake with manually created datasets in static world (#60138)
* fix: snowflake flake with manually created datasets in static world

* Update modules/drivers/snowflake/test/metabase/driver/snowflake_test.clj

Co-authored-by: Riley Thompson <riley@metabase.com>

---------

Co-authored-by: Riley Thompson <riley@metabase.com>
2025-06-26 11:38:19 -06:00
Edward Paget
ab57a144aa fix: collection archive/move w/out parent perms (#60091)
* fix: collection archive/move w/out parent perms

Allow users to archive and move collections even when they do not have
read-write permissions on the parent collection.

* fixup! docstring feedback
2025-06-26 12:06:20 -05:00
Edward Paget
22a045996c fix: randomize the sample db sync schedule (#59847)
* fix: randomize the sample db sync schedule

* fixup! make sure sample dbs aren't scheduled to 43
2025-06-26 12:00:53 -05:00
Nemanja Glumac
5c468e8170 Add unique keys to the "new menu" items (#60117) 2025-06-26 16:19:40 +02:00
Braden Shepherdson
3aed5bfd73 [QP] Respect the time if absolute datetime dashboard filter provides it (#60010)
Fixes #59778

Previously this was always rounded to `:day` for a single absolute
datetime filter. (Absolute date ranges already respected the times if
provided.)
2025-06-26 14:00:00 +00:00
Sloan Sparger
50554f3001 [Metabot] Fix long prompt suggestions not wrapping (#60100) 2025-06-26 08:56:29 -05:00
Sloan Sparger
8464213a96 [Metabot] Fix too large of chart images not being able to be converted to base64 (#60105) 2025-06-26 08:55:03 -05:00
Edward Paget
67397aeadf fix: increment graph revision when parent permissions are copied (#59727)
* inc perms revision number on collection creation

also delete a misleading comment about data permissions.

The `before` and `after` fields here will be blanked out. This is
unfortunate, but this is a strictly better state of affairs from before,
when the change to permissions would not be recorded at all. At least
now we will record that it happened, and concurrent changes to the
permissions graph will fail instead of succeeding with odd/unexpected
behavior.

We'll add a remark to the revision to explain why it was created.

Co-Authored-By: Ed Paget <ed@metabase.com>

* Add tests for new behavior

Co-Authored-By: John Swanson <john.swanson@metabase.com>

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-06-26 13:52:40 +00:00
Timofey Kachalov
88bdcfe6ae sdk(fix): Render ColorSelector within ChartNestedSettingSeriesMultiple without portal (#60118) 2025-06-26 17:15:15 +04:00
Sébastien
8ca1361d47 Closes VIZ-1220 proper icons for visualizer actions (#60040) 2025-06-26 14:29:20 +02:00
Thomas Schmidt
af55313e5d Improve chart context (#60055)
* Improve chart context
  * Send query
  * Send display type
* Refactor existing code to only provide query once and not send display type on the root
* Only fetch metabot context if plugin is enabled
2025-06-26 11:34:15 +00:00
Phoomparin Mano
a41e383e0e fix(sdk): switching from existing to new question should keep query builder open (#60077) 2025-06-26 15:40:32 +07:00
Nemanja Glumac
37f6d88370 Fix the extract column e2e flake (#60102) 2025-06-25 23:04:38 +00:00
Sloan Sparger
e4003975d0 [Metabot] Fix warning no conversation id (#59966) 2025-06-25 18:02:51 -05:00
Ryan Laurie
a36337cb42 fix pre-release test environment vars (#60099) 2025-06-25 16:41:59 -06:00
Edward Paget
90f2f3b309 fix: ad hoc error messages return the hidden card (#60064)
Also update to ensure /dataset apis are run as an ad hoc context
2025-06-25 15:31:43 -05:00
Timothy S. Dean
7aba2a5695 Stop asserting requests are not canceled (#59962)
The query processor would explicitly return `nil` when a query was canceled, but then that `nil` would cause an `AssertionError` to be thrown. This is no longer the case.
2025-06-25 13:29:37 -06:00
Noah Moss
271459ead8 Use dynamic var for locale in datetime formatting for exports (#60079)
* store datetime formatting locale in a dynamic var

* add test

* fix kondo
2025-06-25 15:23:30 -04:00
Brad Anderson
b7c40b13a4 VIZ-1114 Fix static viz error caused by using css variable in svg (#60076) 2025-06-25 14:26:09 -04:00
Oisin Coveney
a024d632f4 Convert menu dashboard buttons to use dashboard context (#59975)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 18:39:15 +01:00
Sloan Sparger
14cd563b6e [Metabot] Setting hotfix (#60071) 2025-06-25 17:03:26 +00:00
Oisin Coveney
01bf8c50fa Create DashboardTitle context component (#60030) 2025-06-25 17:50:01 +01:00
Ryan Laurie
6da4c6ebe8 push multi-arch images when tagging (#60031) 2025-06-25 10:25:41 -06:00
Romeo Van Snick
2d4d1dfc47 Avoid invalid prop errors in Cypress from the mock undolisting (#60061) 2025-06-25 18:23:18 +02:00
Oisin Coveney
6c0cd33105 Convert basic dashboard buttons to use dashboard context (#59971)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 17:17:40 +01:00
Oisin Coveney
4371c14114 Convert fullscreen dashboard buttons to use dashboard context (#59972)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 17:17:34 +01:00
Oisin Coveney
2cd7b7abcd Convert edit dashboard buttons to use dashboard context (#59974)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 17:17:24 +01:00
Case Nelson
cc84b518f2 dev: don't run tier 3 driver tests unless on certain teams (#60016)
Discussion metaboat.slack.com/archives/C0669P4AF9N/p1750783492043299

With this change we only run driver tests if:

on master or release-* branches
PRs labeled with .Team/Drivers, .Team/Querying, or .Team/SemanticLayer
2025-06-25 09:58:11 -06:00
Sloan Sparger
92f2dc76e9 [Metabot] Remove AI Proxy references (#59965) 2025-06-25 10:50:07 -05:00
Jeff Bruemmer
d8e8b17d23 remove message (#60059) 2025-06-25 14:51:49 +00:00
William
60fe4437ba collection: null in native queries doesn't break things (#60008)
Apparently, it is possible to get collection: null in a card's dataset query.  It is unclear why this happens, but
this change ensures that nothing will break when it does happen.
2025-06-25 08:48:33 -05:00
Ngoc Khuat
d149e62a5c Graceful shutdown notification workers (#60005) 2025-06-25 13:29:07 +00:00
Romeo Van Snick
3f85969803 Add max width on multi-input field (#60045)
* Add max-width to overflowing field

* Add repro for metabase#59306
2025-06-25 15:27:29 +02:00
Oisin Coveney
6ccd85ae4a Convert info dashboard buttons to use dashboard context (#59976)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 13:21:37 +01:00
Sébastien
ef109213a2 Closes VIZ-1181 lost series formatting options (#59985) 2025-06-25 10:05:38 +02:00
Sébastien
7bd58dd39b Closes VIZ-1217 undo/redo labels (#59990)
* Closes VIZ-1217 undo/redo labels

* test
2025-06-25 07:10:09 +02:00
Sloan Sparger
f23bca761c [Metabot] Streaming error handling and retry prompt UI (#59937)
* save progress

* refine error handling

* add test coverage

* self review

* remove left over todo

* small corrections

* fix unit test
2025-06-24 18:40:49 -05:00
Alexander Polyankin
b7e62695f1 Revert "Retract fk constraints if removed from DB (#59539)" (#60033)
This reverts commit fb2691764f.
2025-06-24 16:37:08 -07:00
Nemanja Glumac
af696da68c Update E2E token helpers (#59802)
In the past, we have run CI, and local testing with two enterprise tokens:

- all features
- no features

And this really doesn't reflect most real-world scenarios very well. We should be testing with tokens that have actual sets of features that are used in the wild, namely:

- starter cloud
- pro cloud
- pro self-hosted

Some bleeding-edge features that have not yet been implemented into our commercial plans will need to be tested with an all features token still.

This commit updates our testing helpers to use a paradigm that more accurately reflects real-world usage scenarios. Instead of setting specific features for a test, you activate a specific token.
2025-06-25 00:30:32 +02:00
Jeff Bruemmer
a23753148e Update start.md (#60026) 2025-06-24 21:26:55 +00:00
Sloan Sparger
4dcc7e5e1e [Metabot] Add streaming support (#59728)
* add BE code

* port over most of code from branch metabot/streaming w/o tests + making changes for supporting both normal requests and streamed ones

* improve test coverage, bug fixes, add support for analyze chart, error handling changes

* small bit of clean up + add unit tests for streaming

* fix some subtle bugs around request cancellation and stream processing

* Remove debugging logs

* fix be lints and things

* Improve ai service response streaming code

- Wrap initialization of response-lines reader with with-open to automatically close it after the response is done
- Remove Thread/sleep code

* Update modules config to register usage of the server module

* Remove request body destructure in the agent-streaming endpoint

* Fix reflection error

* Expand the docstring for the streaming-request function

* sort namespaces

---------

Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
2025-06-24 16:23:58 -05:00
Oisin Coveney
f5aa70d869 Convert DashboardTabs to context (#59973) 2025-06-24 22:01:32 +01:00
Brad Anderson
b039849b2b Closes VIZ-1115 - Clean up x-rays sidebar visual bug (#59739) 2025-06-24 16:48:56 -04:00
Nicola Mometto
fb2691764f Retract fk constraints if removed from DB (#59539)
* Add migration to add metabase_field_user_settings table

* Add FieldUserSettings model, handle updates to Field transparently

* Add test

* TODO

* we can't user after-update, as it doesn't reflect the proper model

write through

* respect user schema during fk sync

* test via put endpoint

* comments

* fix

* FieldUserSetting serialisation test

* fk sync test

* simplify

* PoC with realizing set of fks

* add test case

* wip: using tmp table

* unique tbl

* update test

* fix for h2

* table-by-table

* style

* fix test

* stronger test

* fix for mysql
2025-06-24 20:34:19 +00:00
Nick Fitzpatrick
5b3f0b8ada use <pattern> and <text> in svg instead of background image (#59880) 2025-06-25 01:50:27 +05:30
Nicola Mometto
93d44f7c4d Respect user-set settings during sync (#59301)
* Add migration to add metabase_field_user_settings table

* Add FieldUserSettings model, handle updates to Field transparently

* Add test

* TODO

* we can't user after-update, as it doesn't reflect the proper model

write through

* respect user schema during fk sync

* test via put endpoint

* comments

* fix

* FieldUserSetting serialisation test

* fk sync test

* simplify

* fix: clean user-set coercion-strategy/semantic-type on base-type update

* add extra test
2025-06-24 19:58:07 +00:00
Brad Anderson
723ca9e4a8 Closes VIZ-1114 - Tweaks to chart appearance in dashboard full screen dark mode (#59956)
* VIZ-1114 Updates cartesian graph lines so they're subtler in fullscreen night mode in a way that also allows them to be defined separately from the border color (if desired) in the embedding sdk

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-24 15:46:13 -04:00
Case Nelson
f96d0a7e53 dev: create and maintain static datasets for snowflake (#59734)
* dev: create and maintain static datasets for snowflake

https://www.notion.so/metabase/Dataset-hash-tracking-20e69354c901806d94adc1a5a48a83db

* Test fixes

* Remove usages of destroy-db

* Fix impersonation test

* Fix missing require

* Fix kondo

* Fix interval tests creating too many datasets

* Adding access_note rename accessed_at

* Add test to tracking-not

* Fix kondo
2025-06-24 13:29:55 -06:00
Jeff Bruemmer
625145686a cloud - update links (#60009)
* update links

* more links
2025-06-24 15:25:42 -04:00
Uladzimir Havenchyk
343445301b chore: remove not used files (#59688) 2025-06-24 22:17:48 +03:00
github-automation-metabase
363af94d50 Bump org.eclipse.jetty/jetty-unixdomain-server from 12.0.21 to 12.0.22 (#59154)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-06-24 18:19:31 +00:00
github-automation-metabase
e7900c56c0 Bump com.amazonaws/aws-java-sdk-core from 1.12.783 to 1.12.785 (#59159)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-24 18:15:42 +00:00
Nick Fitzpatrick
99eddd4aa4 Remove .only use in Homepage.cy.spec (#60014) 2025-06-24 18:12:07 +00:00
Nick Fitzpatrick
60830ca5fb Migrate new menu to Mantine (#59610)
* Migrate new menu to Mantine

* Adusting tests for new role
2025-06-24 17:47:50 +00:00
William
4ae6739cab Postgres driver throws better error message when it misinterprets ? (#59878)
? is used as a jdbc parameter placeholder and is also an operator in postgres.  If you want to use it as an operator,
you often need to escape it with ??.  This gives a better error message when that happens.
2025-06-24 12:19:25 -05:00
Sébastien
df8f88c0d9 closes VIZ-1219 restore 'edit question' for regular cards (#59982) 2025-06-24 18:04:58 +02:00
Jacob Joseph
a1ec32c4c1 Update interactive-ui-components.md (#59361)
added note that Data breadcrumbs are not affected by this setting
2025-06-24 11:26:42 -04:00
Nicolò Pretto
db76991217 remove beta badge from the sdk on the embedding homepage (#59857)
* remove beta badge from the sdk on the embedding homepage

* deprecate Badge
2025-06-24 16:49:44 +02:00
Ryan Laurie
1aef88e1a0 improve external link buttons (#59812) 2025-06-24 08:23:32 -06:00
Ryan Laurie
cfa1cac67a improve error state for settings admins (#59817) 2025-06-24 14:05:12 +00:00
Ryan Laurie
991a536af1 Consolidate getErrorMessage functions (#59876)
* consolidate error messages

* appease the linter

* fix test
2025-06-24 07:37:40 -06:00
Timofey Kachalov
02cd081cf3 Use composedPath to detect a click target for useSequencedContentCloseHandler (#59779) 2025-06-24 15:37:49 +04:00
Timofey Kachalov
027dcf9071 fix(sdk): Render ChartSettingColorPicker color picker without a portal (#59821) 2025-06-24 12:20:35 +04:00
Mahatthana (Kelvin) Nomsawadi
f234621449 Fix can't download PDF on static dashboard when titled=false and has no tabs (#59968)
* Fix dashboard PDF download button not clickable in some cases

* Fix auto complete not working on VS Code

* Add an E2E assertion
2025-06-24 08:48:16 +01:00
Timofey Kachalov
b04b0baa1c sdk(test): Pass collection id to the CollectionBrowser stories (#59787) 2025-06-24 11:19:03 +04:00
Timofey Kachalov
7a2a99379e Render ChartSettingMultiSelect without a portal for SDK (#59893) 2025-06-24 11:18:39 +04:00
Nathan Voxland
7c676d4f30 Added dev.h2/tcp-listen (#59886) 2025-06-23 16:32:04 -05:00
Nathan Voxland
756ba5c593 Test migrations when going back to an old version (#59587) 2025-06-23 16:28:52 -05:00
Jakub Chodorowicz
ca79b062e7 Add blue dot attention notice to events icon links PRG-36 (#59605)
* Add blue dot attention notice to events icon links

* Fix Collection Header tests

* Adjust offset of inidicators to bring them closer to icons

* Improve test by with better API usage
2025-06-23 22:12:08 +02:00
Uladzimir Havenchyk
bd45dd3ceb deps: downgrade rspack to address panic error (#59936) 2025-06-23 19:52:02 +00:00
Ryan Laurie
70c663d859 Remove dead code + tidy up admin settings directory (#59887)
* remove dead code + tidy up settings

* prettier

* create admin components

* update imports

* fix import
2025-06-23 13:23:47 -06:00
Aleksandr Lesnenko
a489f8cf49 fix native gridmap binning calculation (#59881) 2025-06-23 15:12:24 -04:00
Sébastien
e8056cd996 trying to remove query from Visualization.tsx (#59676) 2025-06-23 20:39:08 +02:00
Alex Yarosh
dd46aa0686 env var docs update master (#59951) 2025-06-23 18:05:53 +00:00
Ryan Laurie
64d36c81b0 hide db routing for unsupported DB engines (#59934) 2025-06-23 17:24:45 +00:00
Ryan Laurie
7d860ce9d0 make setting header inline block (#59818) 2025-06-23 11:18:59 -06:00
Braden Shepherdson
d4ddb685b5 [Parameters] Drop any :fields when (ab)using a card for field values (#59427)
Fixes #59394.

If the card we're trying to use for parameters values has an explicit `:fields` clause, that was surviving into
the final query, which causes us to generate bad SQL and throw a 500. This discards the `:fields`, which aren't
relevant when we're overwriting the query's last stage with a single breakout.
2025-06-23 17:08:31 +00:00
Phoomparin Mano
acd034425a Add ready event handler for new iframe embedding (#59714) 2025-06-23 23:26:47 +07:00
Phoomparin Mano
c3c2469f6a Option to use existing user session in new iframe embedding (#59701) 2025-06-23 22:56:59 +07:00
Aleksandr Lesnenko
14a0913f13 scroll dashboard when dragging a card (#59897) 2025-06-23 11:55:06 -04:00
appleby
e4f959e109 Add regression test for #40676 (#59763)
* Fix :display-name for field-metadata-method [:ic/reports :updated-by]

* Add regresssion test for #40676
2025-06-23 15:08:07 +00:00
Raphael Krut-Landau
3bf9bff940 Content translation: design tweaks (#59595)
* This PR addresses design feedback from @kdoh

* Show toasts on dictionary upload/download success and failure
* Move localizing user-generated content to its own settings section

* tests

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-06-23 20:36:32 +05:30
SabarigirisanSivakumarREO
2943d49d22 Fixed semantic structure on welcome page. (#59844)
Co-authored-by: Vamsi Peri <vamsi@metabase.com>
2025-06-23 11:03:35 -04:00
Raphael Krut-Landau
7ff73d789a Add simple confirmation modal to dictionary upload (#59479)
* Add simple confirmation modal to dictionary upload

* updating e2e tests

* rebase hook adjustment

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-06-23 19:03:28 +05:30
Ryan Laurie
2eb3558399 Improve Admin Nav Spacing + Active Behavior (#59811)
* fix sizing and spacing

* cleanup old code

* handle special nav highlights

* update nav tests
2025-06-23 07:32:07 -06:00
Fraser
00b07b20f6 Implement notification badge for updates (#59767)
* Implement nofication badge for updats

* Remove translation of 1

* Change to async find text
2025-06-23 06:19:42 -06:00
Romeo Van Snick
b56244edde Shortcut for formatting (#59534)
* Lift onFormatQuery to NativeQueryEditor

* Pass onFormatQuery to codemirror editor

* Lift canFormatQuery to NativeEditor

* Add format expression keymap to custom expression editor

* Add shortcut documentation

* Add helper to get NativeEditor value

* Add test for formatting using shortcut in native editor

* Add test for formatting in the custom expression editor via shortcut

* Do not allow formatting invalid expressions by shortcut

* Add test for invalid expression

* Wait for format button to be visible

* REmove unused var

* Perform the realPress on the cm editor

* Change order of keyboard event handling so that Ctrl+F handler does not kick in when pressing Ctrl+Shift+F

* Replace search keymap for native editor

* Add CodeMirror wrapper

* Use wrapped CodeMirror in NativeQueryEditor

* Use wrapped CodeMirror in custom expression editor

* Use wrapped CodeMirror in CodeEditor

* Export more from CodeMirror module

* Use highest precedence for shortcuts

* Add support for highlighted ranges to common CodeMirror editor

* Use highlightRanges prop

* Simplify code editor

* Use highlightRanges prop in Native editor

* Add highlight class

* Move shared codemirror style to CodeMirror module

* Move tag out of :global block

* Add missing import

* Fix background color

* Simplify highlights deps

* Move autofocus, autocorrect and tabIndex plugin to shared CodeMirror editor

* Disable autocorrect in SQL editor

* Memoize basicSetup

* Add snippet shortcuts

* Remove unnecessary lowercase

* Use type guard

* Addd types file

* Rename util to utils

* Destructure extension from props

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-06-23 13:47:45 +02:00
Nicolò Pretto
31cd80ece1 hide the trial banner from the iframe preview (#59854) 2025-06-23 10:51:22 +02:00
Robert Kosara
da97a51e95 Small fixes to the cumulative count and sum page (#59895)
This fixes a couple small typos and makes a few other changes while I was at it. I made the little math expressions consistent, and changed the text under "How…" since it only talks about count at first.
2025-06-20 16:34:53 -07:00
Ryan Laurie
efcc142db0 Move components to common components (#59867)
* resolve component name conflicts for Alert, NumericInput, NewItemMenu

* move components to common components

* update references

* fix more refs
2025-06-20 15:05:51 -06:00
dpsutton
f7e83b35b1 test db routing on dbs which support it (#59845)
* test db routing on dbs which support it

* remoev an extra newline

* remove hardcoded clickhouse addition

* Remove database routing support from a few more drivers

Some of these are artifacts of no data-loading support in tests and they
can be reenabled when that works:
- databricks: multi-catalog so similar to clickhouse
- presto: data loading
- spark: multi-catalog so similar to clickhouse
- vertica: dataloading

* Turn off in athena, bigquery, oracle, redshift

Change dataset name since "table" is reserved in bigquery

- athena: data loading issue. Can't diagnose yet if this is similar to
other cloud databases.

- bigquery: includes database in query in tests. Seems not in real life.

```sql
 SELECT `v4_router_data__transient_1750437202857.t`.`id` AS `id`,
       `v4_router_data__transient_1750437202857.t`.`f`  AS `f`
FROM   `v4_router_data__transient_1750437202857.t`
LIMIT  1048575
```

- oracle: unknown. i suspect a data loading issue

- redshift: includes database in query. But i think
this might be a testing artifact: we aren't creating a database each,
but a schema each and faking it. Which violates the expectation of
db-routing. So this is a testing artifact

```sql
SELECT
  "schema_173"."airports_airport"."id" AS "id",
  "schema_173"."airports_airport"."name" AS "name",
  "schema_173"."airports_airport"."code" AS "code",
  "schema_173"."airports_airport"."latitude" AS "latitude",
  "schema_173"."airports_airport"."longitude" AS "longitude",
  "schema_173"."airports_airport"."municipality-id" AS "municipality-id"
FROM
  "schema_173"."airports_airport"
LIMIT
  1048575
```

* disable snowflake

includes databases in its queries:

```clojure
(defn- query-db-name []
  ;; the store is always initialized when running QP queries; for some stuff like the test extensions DDL statements
  ;; it won't be, *but* they should already be qualified by database name anyway
  (when (driver-api/initialized?)
    (db-name (driver-api/database (driver-api/metadata-provider)))))

;; unless we're currently using a table alias, we need to prepend Table and Field identifiers with the DB name for the
;; query
;;
;; Table & Field identifiers (usually) need to be qualified with the current database name; this needs to be part of the
;; table e.g.
;;
;;    "table"."field" -> "database"."table"."field"

;; This takes care of Table identifiers. We handle Field identifiers in the [[sql.qp/->honeysql]] method for `[:sql
;; :field]` below.
(defn- qualify-identifier [[_identifier identifier-type components, :as identifier]]
  {:pre [(h2x/identifier? identifier)]}
  (apply h2x/identifier identifier-type #_(query-db-name) components))
```

* actually disable for snowflake
2025-06-20 15:46:27 -05:00
Ryan Laurie
9e5b064bc0 show error message for databases that don't support routing (#59849)
* show error message for databases that don't support routing

* add tests

* add tests
2025-06-20 13:45:57 -06:00
Alexander Polyankin
2b82fc5785 Support remapping for multiple fields (#59804) 2025-06-20 15:33:55 -04:00
Alex Yarosh
e6da8a0bf0 snowflake (#59877) 2025-06-20 19:29:35 +00:00
Ryan Laurie
a158877776 Move core components to common components (#59863)
* move core to common

* update references

* update type import
2025-06-20 13:18:19 -06:00
bryan
519a7fef26 bump docs/README.md to trigger a docs build (#59861) 2025-06-20 12:10:38 -06:00
Aleksandr Lesnenko
dc657da1cb disable metadata popovers when column header clicked (#59510) 2025-06-20 17:44:53 +00:00
Alex Yarosh
1825d9ea72 docs: more unsupported DBs for DB routing (#59864)
* more unsupported DBs

* Update docs/permissions/database-routing.md
2025-06-20 17:40:35 +00:00
Ryan Laurie
6126a40361 Move containers to common components (#59852)
* move containers to common components

* update imports
2025-06-20 11:08:06 -06:00
Alex Yarosh
24f8cefc56 Update installing-metabase.md (#59858) 2025-06-20 16:52:05 +00:00
Nicolò Pretto
9213639b44 log analytics event even if tracking is disabled (#59777) 2025-06-20 18:24:47 +02:00
Nicolò Pretto
0fa32c79f1 correct copy and icon on embed setup (#59850) 2025-06-20 16:19:31 +00:00
Ryan Laurie
44265e9d25 Move hooks/ to common/hooks (#59843)
* move hooks

* update imports
2025-06-20 16:00:50 +00:00
Brad Anderson
f475c78129 VIZ-1099 VIZ-1107 Improve dashboard look and feel - M2 Card titles and tab styles (#59659)
* VIZ-1099 Increases font-size of dash card titles
* VIZ-1099 Adds additional padding above card titles per design feedback
* VIZ-1107 Updates dashboard tabs to more closely match our standard tabs component
* VIZ-1107 Makes contrast less jarring for dashboard tabs in night mode while preserving embedding sdk customizability
* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-20 11:52:31 -04:00
Edward Paget
46588a1ef6 feat: an api for debugging permissions issues (#59583)
* feat: Add debugger API for card permissions

* fixup! initial set of PR feedback fixes

* fixup! add more information to data

* fixup! simplify queries

better arg names and docstring

* fixup! whitespace lint
2025-06-20 13:50:55 +00:00
Alex Yarosh
e32252fea4 no db routing for clickhouse (#59835) 2025-06-20 09:38:54 -04:00
Nemanja Glumac
ccf1f976ca Remove unused querying analytics (#59826) 2025-06-20 14:22:24 +02:00
Nicolò Pretto
0b5707fc97 fix: include sit-url in embedding-app-origins-interactive to make the (#59825)
preview work on cloud
2025-06-20 11:29:08 +02:00
Timofey Kachalov
d1d137319a Use dnd-kit for ChartSettingFieldsPicker (#59749) 2025-06-20 11:40:47 +04:00
github-automation-metabase
0831ff0d70 Bump io.trino/trino-jdbc from 475 to 476 (#59160)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-20 03:43:06 +00:00
github-automation-metabase
8081a68505 Bump org.bouncycastle/bcpkix-jdk18on from 1.80 to 1.81 (#59148)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-06-20 03:40:28 +00:00
github-automation-metabase
ff08209ceb Bump net.snowflake/snowflake-jdbc from 3.24.0 to 3.24.2 (#58765)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-06-20 03:39:37 +00:00
github-automation-metabase
f43e43f8ad Bump org.eclipse.jetty/jetty-server from 12.0.21 to 12.0.22 (#59153)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-20 03:33:28 +00:00
github-automation-metabase
e00ef81d03 Bump com.google.cloud/google-cloud-bigquery from 2.50.1 to 2.51.0 (#59155)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.51.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-20 03:33:13 +00:00
github-automation-metabase
2a55b86213 Bump org.mongodb/mongodb-driver-sync from 5.5.0 to 5.5.1 (#59158)
Inspect dependency changes here: https://github.com/mongodb/mongo-java-driver/compare/r5.5.0...r5.5.1

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-20 03:32:03 +00:00
github-automation-metabase
29f9071f99 Bump org.clojure/clojure from 1.12.0 to 1.12.1 (#59150)
Inspect dependency changes here: https://github.com/clojure/clojure/blob/clojure-1.12.1/changes.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-19 20:11:28 -07:00
github-automation-metabase
4bf5f38a96 Bump org.bouncycastle/bcprov-jdk18on from 1.80 to 1.81 (#59149)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-19 20:11:03 -07:00
github-automation-metabase
4cb8315580 Bump org.eclipse.jetty.ee9/jetty-ee9-servlet from 12.0.21 to 12.0.22 (#59152)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-19 20:10:54 -07:00
github-automation-metabase
cb9ac33d3b Bump io.netty/netty-common from 4.2.1.Final to 4.2.2.Final (#59157)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-19 20:10:11 -07:00
bryan
478cd9f933 add cloud docs (#59820) 2025-06-19 18:47:33 -04:00
Ryan Laurie
7bf69d33e0 Parse Back to prior release in release logs (#59196)
* Parse further back in release log

* escape unsafe html
2025-06-19 16:44:52 -06:00
Ryan Laurie
e89dc0b721 change fullwidth styling to match prior implementation (#59799) 2025-06-19 15:31:28 -06:00
Sloan Sparger
c1badf210c [Metabot] Do not allow root collection to be selectable as a metabot entity (#59648)
* do not allow root collection to be selectable as a metabot entity

* make can select fn optional
2025-06-19 16:30:33 -05:00
John Swanson
0e7a277d82 Disable database routing for clickhouse (#59806)
Clickhouse's databases are more like schemas, and Database Routing is
not working correctly.

For now, let's disable Database Routing for Clickhouse. In a followup PR
I'll write tests for other drivers to make sure DB routing is working
for them, if not we can disable them as well.
2025-06-19 13:53:52 -07:00
Raphael Krut-Landau
7f43a53cf0 Content translation: Add sample translations if dictionary is blank (#59569) 2025-06-19 15:46:16 -05:00
Nemanja Glumac
fb1c041353 Update e2e tokens in CI (#59754)
Updates the secrets references to the
  - "all features" token
  - "no features" token

They are now using newly generated tokens. Respectively:
- `MB_ALL_FEATURES_TOKEN`
- `MB_STARTER_CLOUD_TOKEN`
2025-06-19 22:11:38 +02:00
Edward Paget
030684868f chore: all permissions module access through core (#59416)
* chore: all permissions module access through core

* fixup! break circular dep

* fixup! some other broken kondos

* fixup! revert collections changes

* fixup! remove dynamic var from public api
2025-06-19 17:55:08 +00:00
Edward Paget
38715c57cc chore: remove dead with-allowed-... macro in card (#59660)
This macro does not do anything any longer the dynamic var it set is
only readed through the `update-card!` path and it was only used in a
path that called `t2/update!` instead.
2025-06-19 12:06:51 -05:00
Phoomparin Mano
c43bcc46d1 Allow more settings to be updated in new iframe embedding (#59487) 2025-06-20 00:04:41 +07:00
Ryan Laurie
83f7cf0fd9 quarantine flakiest e2e tests (#59759) 2025-06-19 11:41:58 -04:00
Romeo Van Snick
677473f773 Await popover to exist and have focus (#59782) 2025-06-19 17:06:35 +02:00
Ryan Laurie
a3fb318575 Use Side Nav for Performance Pages (#59702)
* performance app updates

* improve UI

* update tests

* fix db routing tests
2025-06-19 09:03:37 -06:00
Oleksandr Solovyov
e71dba060f update ring (#59775) 2025-06-19 16:00:49 +01:00
Braden Shepherdson
411f2ac8ea [MBQL lib] When removing clauses, match downstream refs correctly (#59634)
Fixes #59441.

Previously this was matching against the `returned-columns` of the
previous stage, but that's incorrect. Since we're trying to match stage
`k` refs we must match against stage `k` columns, not stage `k-1`.
2025-06-19 14:48:05 +00:00
Nicolò Pretto
58b2ac5b0d new_embedding_flow search param redirect (#59784)
* new_embedding_flow search param redirect

* add e2e test for analytics and for not messing with /setup events
2025-06-19 16:32:22 +02:00
Aleksandr Lesnenko
9e7943aeb5 fix chart crash when dimension aggregation is removed (#59740) 2025-06-19 10:15:47 -04:00
Nicolò Pretto
f8c015777c EMB-490 embeddig setup step seen event (#59712)
* EMB-490 embeddig setup step seen event

* fix types

* Update frontend/src/metabase/setup/components/EmbeddingSetup/steps/embeddingSetupSteps.ts
2025-06-19 15:41:43 +02:00
Thomas Schmidt
2b1efe414a Thomas/metabot cleanup sql context (#59674)
* Code cleanup
* Moves query analyzer to metabot-v3 module
* Consolidates SQL query analysis functionality under the metabot-v3 module to reduce cross-module dependencies
* Properly hydrate and pass schema for tables used in the native query for Metabot
* Adds tests
* Do not rely on is_native flag for fetching database schema in Metabot context
2025-06-19 13:38:38 +00:00
Nemanja Glumac
1b75ad7c5a Resolve a circular dependency in collections (#59685) 2025-06-19 13:27:05 +02:00
Alex Yarosh
51a7fdb409 docs - fix links (#59760) 2025-06-19 07:12:35 -04:00
Mahatthana (Kelvin) Nomsawadi
15dcbf0b7c fix(sdk): Fix flickered "Question new not found error" (#59696)
* Prevent flickered no question "new" found error

* Refix the bug
2025-06-19 11:50:35 +01:00
Timofey Kachalov
5703bc13d1 Apply proper SDK styling to the SortableList drag overlay (#59713) 2025-06-19 14:04:22 +04:00
Alex Yarosh
3f3b925eed redirects for category pages (#59579) 2025-06-18 21:31:50 -04:00
Alex Yarosh
6fe8a78990 docs: edit cards on dashboards (#59730)
* Update introduction.md

* Update docs/dashboards/introduction.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* Update introduction.md

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-18 19:59:39 -04:00
Ryan Laurie
6a5566453f remove duplicate findRequests helper (#59726) 2025-06-18 16:58:38 -06:00
Ryan Laurie
65420ff3fd Update People + Groups Nav (take 2) (#59710)
* update people nav

* type fix

* use modern upsell

* fix e2e test, cleanup

* wider pages

* update tests

* update unit tests

* update titles and nav

* limit description width

* little updates
2025-06-18 22:56:19 +00:00
Ryan Laurie
15306c17e7 Light facelift for Tools + Troubleshooting (#59668) 2025-06-18 22:55:12 +00:00
bryan
a5acb871bb minor formatting (#59746) 2025-06-18 16:51:58 -06:00
Nathan Voxland
b10b0dce4b Make sure no inactive or archived tables and dashboards are shown in the popular items result (#59636) 2025-06-18 16:37:27 -05:00
Edward Paget
060ca28cc3 chore: remove unused partial permission checks (#59718)
These checks used to be used for the Database model's permission, but
are no longer after the move to the data permissions model
2025-06-18 20:44:23 +00:00
John Swanson
d2448daf08 Localize the trash name on memoized collection (#59662)
* Localize the trash name on memoized collection

* just defer translation on the `trash-collection`

When we're getting it explicitly rather than for all collections - for
the sake of speed here, since this was causing some issues with
serialization.

* parallelize

* docstring
2025-06-18 20:14:11 +00:00
Nick Fitzpatrick
c6a55b0f90 Fix re-rendering error modal on collection upload (#59073)
* fix re-rendering error modal on collection upload

* migrating file upload error modal, adding e2e
2025-06-19 01:36:50 +05:30
bryan
7c86d9d269 Fix docs workflow trigger action syntax (#59723) 2025-06-18 18:24:42 +00:00
bryan
9b42a0ae7b modify trigger to send source + target branches (#59575) 2025-06-18 12:03:11 -06:00
Ryan Laurie
610ee2e900 Revert "Update People + Groups Nav (#59363)" (#59703)
This reverts commit 50cf80b158.
2025-06-18 23:29:38 +05:30
Nick Fitzpatrick
658c1e4704 Small UI Fixes (#59644) 2025-06-18 22:05:07 +05:30
Nicolò Pretto
44e0478525 make database widget keyboard friendly (#59468)
* make database widget keyboard friendly

* restore role=option, as it's the correct one inside a listbox

* add unit test
2025-06-18 16:32:56 +00:00
Nicolò Pretto
b13dd15c41 embedding setup: prefill user details and update settings (#59694)
* update settings set in the processing step, closes EMB-499 and EMB-500

* EMB-486 prefill user details
2025-06-18 17:33:09 +02:00
Brad Anderson
03cf63892c Closes VIZ-162 - Stacked bar chart with mixed negative and positive values creates nonsensical percentage breakdowns in tooltips (#59138)
* VIZ-162 Updates percent calculation for stacked bar charts’ tooltips for bars with a mix of positive and negative values. Positive values are a percentage of the positive total and negative values are a percentage of the negative total.

* VIZ-162 Updates e2e tests to verify new stacked bar chart behavior
2025-06-18 10:02:28 -04:00
Timofey Kachalov
40f15d3ce7 Render Mantine and Echarts tooltips in a proper portal container for SDK (#59513) 2025-06-18 17:16:42 +04:00
Oleksandr Solovyov
f5b5de0dbd shorten filename to not overflow byte limit in some filesystems (#59625)
shorten filename to not overflow byte limit in some filesystems

in particular ext4 limits file name by 255 *bytes*, not chars, which is doable by using 3-byte chars

fixes #59233
2025-06-18 16:12:56 +03:00
Ryan Laurie
50cf80b158 Update People + Groups Nav (#59363) 2025-06-18 12:58:34 +00:00
Nicola Mometto
40d2b1bfa1 increment failed-fingerprints rather than the throwable object (#59627)
* increment failed-fingerprints rather than the throwable object

* fix: continue? needs updated stats
2025-06-18 11:18:50 +01:00
Uladzimir Havenchyk
bc4750a562 fix: css layout of time grouping errors (#59658) 2025-06-18 10:27:16 +03:00
Ryan Laurie
4523266d6c update metabot nav (#59440) 2025-06-18 00:40:27 +00:00
appleby
46fc871718 Add e2e reproduction for #35067 (#59584)
* Add e2e reproduction for #35067

Closes #35067

* Inline single-use query
2025-06-17 14:33:05 -07:00
Nicola Mometto
8150ee9bbd perf: filter json fields first (#59631) 2025-06-17 15:25:39 -04:00
Stas Gavrylov
4f376c4ce5 Fix storybook docs examples rendering (#59639) 2025-06-17 22:03:04 +03:00
Jeff Bruemmer
8540e3cc26 dev notes (#59643) 2025-06-17 14:51:45 -04:00
Sloan Sparger
3220b41358 [Metabot] Update the metabot team (#59649)
* update the metabot team

* remove trailing comma
2025-06-17 13:30:15 -05:00
Nathan Voxland
e00e7d8668 Clear checksums when rolling back from 55 (#59570) 2025-06-17 13:13:12 -05:00
Nathan Voxland
99dbd78088 Correct saving of pivot card metadata (#59283) 2025-06-17 13:03:41 -05:00
lbrdnk
7437bfc147 Add coerced-string-nums-dataset (#59568)
* Add coerced-string-nums-dataset

* Adjust coercion strategy
2025-06-17 19:33:19 +02:00
Nicolò Pretto
f67b4aae0e EMB-501 and EMB-503, review wording on the last step and flip order of code and preview (#59612)
* emb-501: Review wording so that it's not perceived as working

* EMB-503: Flip order of code and preview

* update top sentence
2025-06-17 18:43:05 +02:00
Alex Yarosh
3a9e1d2380 Update metrics.md (#59629) 2025-06-17 12:04:21 -04:00
Nathan Voxland
4e98918192 Support passing an environment file to jar-download (#59574) 2025-06-17 09:15:50 -05:00
Edward Paget
ab5465ec9b fix: card before update to not always force update (#59559) 2025-06-17 08:26:25 -05:00
Stas Gavrylov
653d9e616e Add TZ option to Cypress config to stabilize local testing (#59453) 2025-06-17 14:43:10 +03:00
Nicolò Pretto
21c90d92c3 set embedding-homepage visible as soon as we can (#59476)
* set embedding-homepage visible as soon as we can

* cleanup test

* reorder because it makes more sense

* Update frontend/src/metabase/setup/components/EmbeddingSetup/steps/UserCreationStep.tsx

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-06-17 11:49:59 +02:00
Mahatthana (Kelvin) Nomsawadi
6165712a53 Ignore ?locale search param in result downloads (#59243)
* Fix can't download static SQL question\

when a parameter only expects a single value

* Ignore `?locale` search param in result downloads

* Finish the comment

* Fix public action tests failing

* Address review: Call side-effect explicitly

* Preserve same behavior

* Flip boolean to make it easier to read

* Improve boolean condition

* revert the use of `isEmbeddingSdk` env until #59602 is fixed

* Add missing condition to retain the same behavior

* Fix more failing tests duh!

* Fix should sync logic for real this time.
2025-06-17 10:34:44 +01:00
Sloan Sparger
269009d1f3 [Metabot] Analyze chart improvements (#59449) 2025-06-17 06:44:05 +00:00
Thomas Schmidt
aa5dab0b8c Bot 188 sql features in chat (#59382)
* Use Metabot for FixSQL Button

* Enrich context with sql schema if user is viewing a native query (or the editor)
2025-06-17 07:53:08 +02:00
John Swanson
d710fb129f fix a flake (#59424)
just no reason to hardcode an ID like this.
2025-06-16 14:28:07 -07:00
Noah Moss
36573b38fa support pivots with between 31 and 63 breakouts (#59494) 2025-06-16 16:22:28 -04:00
Uladzimir Havenchyk
c7fb35e7fc test: fix flaky test (#59547)
* test: fix flaky test

* one more attempt

* debug

* one more time

* one more time

* one more time
2025-06-16 23:05:31 +03:00
bryan
558af5e372 add 'mage alias' fix help w/o bb installed (#59322) 2025-06-16 13:57:12 -06:00
Luis Paolini
537d4169ee Update upgrading-metabase.md (#58477)
* Update upgrading-metabase.md

Adding a note about upgrading between major versions

* Update upgrading-metabase.md

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-16 14:54:12 -04:00
Jacob Joseph
5846360d58 Update table.md (#59490)
Fixed wrong header level (was h2, should be h3)
2025-06-16 13:23:04 -04:00
lbrdnk
4410db3aea Fix searching for uuid column values in dashboard filter (#59272)
* Fix searching for uuid column values in dashboard filter

* Adjust so only the uuid fields are remapped for search

* Address review remarks
2025-06-16 18:51:56 +02:00
Alex Yarosh
59326bee8c update link (#59557) 2025-06-16 12:45:25 -04:00
Sébastien
f463fa21bc Closes VIZ-917 two data points for one series (second try) (#59546)
* trying

* no comment
2025-06-16 18:07:47 +02:00
Brad Anderson
a1cf3cbe6b Reverts VIZ-1080, needs more time for review (#59550)
* Reverts VIZ-1080, needs more time for review

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-16 11:41:07 -04:00
Raphael Krut-Landau
010c5510fc Fix padding in Heading visualization component (#59555)
This fixes a bug where the padding on a Heading would disappear when it was edited.

Before:

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/utGnP2ljFMMNOgi82vVn/b3cd934b-320b-4202-9619-1e1cad7b046d.png)

After:

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/utGnP2ljFMMNOgi82vVn/cc35902e-309a-4b02-8f6b-5d14295015e9.png)
2025-06-16 11:35:51 -04:00
Jeff Bruemmer
ba4b0a30c8 docs - note on db routing (#59549)
* note on db routing

* note on connection swapping

* add warning

* edits

* revisions
2025-06-16 11:13:23 -04:00
Ngoc Khuat
dc92ed99e3 Fix v_alerts incorrectly classify by the minute and custom schedule (#58468) 2025-06-16 14:45:00 +00:00
Nicolò Pretto
3e9ef060ed MVP of Embedding setup flow (#58853)
* Add embedding setup flow with multi-step wizard. Add EmbeddingSetup component with welcome, data connection, processing, and final steps. Create setupEmbeddingSettings action for configuring embedding and JWT. Add CodeSnippet component for displaying code examples. Set up proper routing for the embedding setup flow.

* Update embedding setup flow to actually create the database and handle errors. Update DataConnectionStep to display error messages.

* Fix linter errors in EmbeddingSetup component and setupEmbeddingSettings action

* Setup embedding flow: Remove SchemaSelectionStep, fix imports and types

* Fix linter errors and finalize embedding setup flow with navigation and original content restored

* Add EmbeddingSetupWrapper to provide context for embedding setup flow

* Fix table fetching in TableSelectionStep to use metadata endpoint

* Implement model and dashboard creation in ProcessingStep using /api/card endpoint

* Fix useEffect and useCallback dependencies and import order in TableSelectionStep

* working flow

* small tweaks

* sidebar with steps

* update snippet to use iframe embed

* better "Need assistance" positioning

* fix and refactor database and tables steps

* style final step

* bottom part of /final

* done step and idk i'm tired

* remove chevron and add syntax highlight as per feedback on the loom

* fix user not being loaded

* welcome step and final step

* remove dead code

* add query builder

* more stuff

* add comment about keepMounted

* set the proper settings during setup, fixes EMB-462 and EMB-461

* hide DatabaseStatus, fixes EMB-458

* "do later" -> link to /, closes EMB-456

* attempt at setting a max width, maybe closes EMB-454

* fix icons

* fix scrollbar on tall pages

* to refactor: wip link between setup and onboarding

* fix jumpy layout while moving across pages

* fix DatabaseStatus showing up after landing to the homepage

* Revert "to refactor: wip link between setup and onboarding"

This reverts commit b4c19da37d.

* wip user step

* revert changes to database status, we don't need those changes now that we're not in the routes that use the App component

* prevent going to setup/embedding if setup is already done

* table search

* restore original position of metabot to keep diff cleaner

* category + icon on search input

* restore routes structures

* add widht and height, fixes EMB-480

* remove "Need assistance" link, closes EMB-479

* change content in DoneStep, closes EMB-478

* removed /embed from the url

* empty set for search + layout adjustements, closes EMB-481

* removing things i commited by mistake

* locale selector, closes EMB-466

* cleanup unused code

* fix loading not being centered in table selection loading

* fix processingStatus i18n issue

* Remove undefined CSS custom property

* Revert "fix loading not being centered in table selection loading"

This reverts commit 8fda19338a.

* re-do the centering

* close EMB-473, refactor to be only one page

* move CodeSnippet in the file where it's used, it's not a generic
component for now

* Add a basic embedding onboarding E2E test (#59323)

* Add a basic E2E test

* Add missing import

* Finish assertions

* Wait for DB sync

* Hide DB sync status, so Cypress could click a button

* Fix test on CI

* Fix E2E after upstream change

* Some adjustment to make CI passes

* Wait for loader to disappear to avoid failing CI

* Simulate being on cloud

* Addresses review feedback

* fix sidebar steps, titles and visibility

* fix another wrong string

* Update frontend/src/metabase/setup/components/EmbeddingSetup/EmbeddingSetupSidebar.tsx

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* address pr feedbback

* fix error ui in table selection

* add useForceLocaleRefresh to table step

* update label on test too

* more label updates

* Properly refetch database API

* Add DB sync retries assertion

* fix the retry of the database sync

---------

Co-authored-by: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-06-16 16:20:31 +02:00
Riley Thompson
1d89072891 Add regression tests for clickhouse (#59348)
* add regression tests

* Add issue references

* make double comment test driver agnostic

* make tests more agnostic

* format

* make another test agnostic

* add prometheus metrics

* add driver query metrics test

* test against failed count

* move clickhouse native tests back, remove parallel from metrics query test

* fix kondo

* add todo attribution

* disable 0.8.4 broken tests, re-enable 0.8.6 broken tests
2025-06-16 10:16:58 -04:00
Uladzimir Havenchyk
35fa63c63a fix: allow dragging editor border to completely hide it (#59335)
* fix: allow dragging editor border to completely hide it

* add test

* cleanup

* add animation

* fix leftovers

* fix overflow
2025-06-16 12:13:09 +00:00
metamben
76da6d5382 Resolve visibility in query instead of filtering with mi/can-read? (#59360)
* Resolve visibility in query instead of filtering with mi/can-read?

---------

Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
2025-06-16 12:09:22 +00:00
Romeo Van Snick
c3674747f4 Close table header popover with escape (#59262)
* Manually close popover on escape

* Add repro for metabase#55673

* Revert "Manually close popover on escape"

This reverts commit cce85f0882.

* Trap focus in click actions popover

* Remove unneeded closeOnEscape
2025-06-16 12:00:22 +02:00
Fraser
e537911bc3 Scroll element into view before checking visibility (#59531) 2025-06-16 20:37:49 +12:00
Timofey Kachalov
c21360e3bd Update the SDK version for the latest npm tag (#59532) 2025-06-16 08:31:56 +00:00
Timofey Kachalov
7ba6f246f3 Fix sample app dev bundle tests (#59511) 2025-06-16 12:13:50 +04:00
Jakub Chodorowicz
33fc7acca9 Dev-601-format-storybook-folders-with-prettier (#59190)
* Format with prettier .storybook folder

* Skip reformatting mockServiceWorker file

* Format storybook folders with prettier on pre-commit
2025-06-16 09:16:22 +02:00
Ryan Laurie
6d5393cfeb Settings Visual Updates (#59140)
* Routing + Nav

* Add SettingsSection everywhere

* Remove tabs from WhiteLabel pages

* Remove tabs from auth pages

---------

Co-authored-by: Fraser McIntosh <fraser@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-16 09:38:58 +12:00
Raphael Krut-Landau
0860a98a1e Support translation of user-generated content in statically embedded questions and dashboards (#56879) 2025-06-13 21:23:44 -04:00
Aleksandr Lesnenko
f040ca027c fix object id column size (#59505)
* fix object id column size

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-13 20:47:42 -04:00
appleby
876368b12d Add some tests for implicitly-joinable visible-columns (#59227)
* Add missing :ident to :model/products-and-reviews mock card

* Add tests for implicitly-joinable visible-columns

* Add more context and cross-reference the comment about implicit-self-join-test

* Put keyword first when looking up entries in lib.tu/mock-cards
2025-06-13 16:45:31 -07:00
Alex Yarosh
8b0cd97ab9 relativedatetime truncates (#59501) 2025-06-13 18:57:40 -04:00
Uladzimir Havenchyk
39b274db1b Native time groupings (#58180)
* process-query supports temporal-unit template tags in native queries (#57295)

The query processor understands temporal-unit template tags and can parse and compile
`{{mb.time_grouping('param', 'table.column')}}` appropriately.  This does not include lib or frontend support and this
feature is not yet usable outside of manually making a query and passing it to qp/process-query.

* Update metabase.lib.native to understand mb.time_grouping parameters (#57506)

This adds lib support for time_grouping parameters. To do that, it pulls out the parsing logic from the driver code and pulls it into lib, where both the driver and lib can use it. The frontend still doesn't support these parameters, so while you can technically type in and run a query with a time_grouping parameter, the frontend behaves oddly if you try.

* implement frontend for time grouping in native queries (#57849)

* Update metabase.lib.native to understand mb.time_grouping parameters

* move parse-param tests

* keep picky behavior of old tagfinding

* fix ns alias

* fix ns declaration for cljs

* add lib tests for finding function tags

* remove resurrected file

* fix rebased code

* fix linting

* update doc string

* fix modules

* implement frontend for time grouping in native queries

* fix modules

* fix validation bug

* update sidebar

* fix typecheck

* fix styles

* use correct icon

---------

Co-authored-by: William Zimrin <william@metabase.com>

* implement dashboard mapping to time grouping parameters (#57931)

* Update metabase.lib.native to understand mb.time_grouping parameters

* move parse-param tests

* keep picky behavior of old tagfinding

* fix ns alias

* fix ns declaration for cljs

* add lib tests for finding function tags

* remove resurrected file

* fix rebased code

* fix linting

* update doc string

* fix modules

* implement frontend for time grouping in native queries

* fix modules

* fix validation bug

* update sidebar

* fix typecheck

* fix styles

* implement dashboard mapping to time grouping parameters

* filter columns properly

* fixup

* fixup

* temporal-unit tags use variable targets

* fix backend tests

* use variable

* cleanup

* add handling for required params

* update copy and fix required toggle usage

---------

Co-authored-by: William Zimrin <william@metabase.com>

* tests for native query time grouping (#58091)

* Update metabase.lib.native to understand mb.time_grouping parameters

* move parse-param tests

* keep picky behavior of old tagfinding

* fix ns alias

* fix ns declaration for cljs

* add lib tests for finding function tags

* remove resurrected file

* fix rebased code

* fix linting

* update doc string

* fix modules

* implement frontend for time grouping in native queries

* fix modules

* fix validation bug

* update sidebar

* fix typecheck

* fix styles

* implement dashboard mapping to time grouping parameters

* filter columns properly

* fixup

* fixup

* temporal-unit tags use variable targets

* fix backend tests

* use variable

* cleanup

* add handling for required params

* update copy and fix required toggle usage

* reset default value if time grouping option is excluded from the list of available options

* add tests

* drop not planned test

---------

Co-authored-by: William Zimrin <william@metabase.com>

* add tests for mapping of native query to temporal unit parameter (#58161)

* rework tag editor sidebar and related files to typescript (#58283)

* revert default required logic (#58568)

* revert default required logic

* fix test

* add native query validation of time grouping syntax (#58426)

* add basic fe validation for native queries

* fixup

* add cljs function for validating native queries

* make validate function take a full query and work in cljs

* add backend/cljc tests for validate-native-query

* improved error messages for validate-native-query tests

* use a new dianostics method from lib

* fix clj linting

* update sidebar styling

* fix initial state

* adjust error styling

* fix tests and drop not valid anymore code

* fix linting

* favor first template tag found and update tags when type changes

* validate that temporal unit function parameters aren't empty

* add e2e tests

* convert day/week/month/quarter/year groupings to dates

* fix empty param

* only convert days to dates

* finally actually make date conversion work correctly?

* address review

* adjust tests to the latest changes

---------

Co-authored-by: William Zimrin <william@metabase.com>

* rename test

* update native query time grouping tests to be more comprehensive (#58814)

* Fix time grouping tests (#58878)

* validate time unit parameters and fix bug (#58993)

* Fix and test nil values for native time groupings (#59062)

* add e2e tests for optional usage of time grouping (#59045)

* add e2e tests for optional usage of time grouping

* cleanup

* fixup

* update test

* fix class reference

---------

Co-authored-by: William <william@metabase.com>
2025-06-13 18:49:29 -04:00
Tyler Plude
184d6a5b6d Fixes import warnings in shared js color getter bundle (#58445)
* Fixes import warnings in shared js color getter bundle

* fix static viz backend errors

* remove commented line

* pr feedback
2025-06-13 15:43:22 -07:00
Nathan Voxland
2628e7874d Added validation for email-from-name (#59330) 2025-06-13 17:12:59 -05:00
Alex Yarosh
5b83c629d9 docs: update pivot docs (#59492)
* pivots

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-13 20:37:25 +00:00
Aleksandr Lesnenko
18ff09c54a adjust measured cells spacing (#59475)
* adjust measured cells spacing

* Update Loki Snapshots

* update specs for new widths

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-13 19:24:02 +00:00
William
3e0e2c6b99 Add setting to disable reusing a dashboard's last used parameters (#59293)
Set MB_DASHBOARDS_SAVE_LAST_USED_PARAMETER to false to disable saving.
2025-06-13 14:22:46 -05:00
Uladzimir Havenchyk
c55139ed0c chore: cleanup native editor after refactoring (#59281)
* chore: cleanup native editor after refactoring

* rename type

* fix types
2025-06-13 17:56:55 +00:00
Jeff Bruemmer
623523c6fc docs - alert note (#59481)
* note on disposable alerts

* edit

* alerts permissions note

* summary

* phrasing
2025-06-13 13:52:31 -04:00
Riley Thompson
7d306e5884 Revert clickhouse to 0.8.4 (#59470)
* revert to 0.8.4

* manually revert changes that depended on 0.8.6

* other fixes for 0.8.4
2025-06-13 12:28:51 -04:00
Edward Paget
eabbba2463 fix: make the jwt idp uri a required setting (#59344)
The SDK now requires the jwt uri to be set to function in version 55
this enforces that requirement on the admin page.
2025-06-13 16:21:12 +00:00
Nathan Voxland
2c567ae30f Removed query analysis backend code (#58816) 2025-06-13 10:39:47 -05:00
Sloan Sparger
135ba04d91 [Metabot] Guard ai entity analysis (#59339)
* guard ai entity analysis

* fix types

* add token feature to BE

* Add :ai_entity_analysis premium feature to token feature test

* iteration

* fix bad reference

---------

Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
2025-06-13 09:00:36 -05:00
Brad Anderson
2f1de41467 VIZ-1020 Updates text card "extra large" breakpoint version so it's only applied on full-width dashboards since fixed-width dashboards don't have enough height to display it without scrollbars (#59437) 2025-06-13 09:38:20 -04:00
metamben
172fe61ae5 Select the most viewed tables when generating SQL queries (#59359)
Fixes BOT-181
2025-06-13 15:17:42 +02:00
Oisin Coveney
18a8fdbf6d remove isJwtProviderSet booleans (#59459) 2025-06-13 14:35:00 +03:00
Sloan Sparger
f41897df9d add a startNewConversation helper (#59423) 2025-06-13 13:32:36 +02:00
Oisin Coveney
64887b6369 Rename initialDashboardId to dashboardIdProp (#59457) 2025-06-13 10:06:50 +00:00
Oisin Coveney
fa9d884b60 Convert TitleAndDescription to typescript (#59413) 2025-06-13 11:52:14 +03:00
Oisin Coveney
055e8b0b66 [EMB-327] MS1: Add Dashboard Context (#57595) 2025-06-13 11:44:59 +03:00
Mahatthana (Kelvin) Nomsawadi
a442965526 Remove unnecessary horizontal scroll on static embed sharing modal (#59230)
* Remove unnecessary horizontal scroll on static embed sharing modal

* Fix undefined CSS custom property via linter

* fix tests

* Fix the style regression from the previous commit
2025-06-13 04:27:23 +01:00
Fraser
52dd381e5b Replace deprecated LeaveConfirmationModal (#54999)
* Replace deprecated LeaveConfirmationModal
2025-06-13 10:20:02 +12:00
Brad Anderson
490320b47e VIZ-1079 VIZ-1080 - Improve dashboard look and feel with low-hanging polish - M1 "just do" (#59267)
* VIZ-1079 Tweaks dash card border, shadow, and radius
* VIZ-1080 Removes left padding from section headings and text cards (excludes edit mode)

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-12 18:18:31 -04:00
Edward Paget
4b90bd4e78 fix: improve effective children performance (#59004)
* fix: improve effective children performance

on the /items endpoint by reusing the permission CTE

Co-Authored-by: John Swanson <john.swanson@metabase.com>

* fix: remove n+1 hydration call for card children

* fix: remove case/whens in sort statements

* fix: scope search results for modal to collections

Co-Authored-By: Nathan Voxland <nathan@metabase.com>

* fix: function to convert to collection items

* fixup! PR suggestion

Co-Authored-By: Ryan Laurie <ryan@metabase.com>

* fixup! add row-lock fixture for mariadb flake

* add debug for failing test

* fixup! make sure api/bit->boolean is called first

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Ryan Laurie <ryan@metabase.com>
2025-06-12 22:14:27 +00:00
Nick Fitzpatrick
019b997680 adding Native Query Editory shortcuts to glossary (#59372) 2025-06-13 00:46:24 +05:30
lbrdnk
44bf519b74 Use substring optimization on any text fields (#59061)
* Use substring optimization on any text fields

* Add integration test for coercion
2025-06-12 21:13:04 +02:00
Cam Saul
c686b3a7b9 More misc QP/Lib cleanup (#59354)
* Support type deduction for `case` and `coalesce`

* Revert accidental changes

* Fix CLJS tests

* More misc QP/Lib cleanup

* Test fixes 🔧

* Test fixes 🔧

* Add `:type/HasDate` and `:type/HasTime` to the type hierarchy

* Additional fix 🔧

* Improved type calculation logic

* Fix QUE-1358

* Test fixes 🔧
2025-06-12 16:31:33 +00:00
Nemanja Glumac
0fd603f9cc Revert the "Add data modal" from master (#59364)
* Revert "Address review comments from #58408 (#58785)"

This reverts commit ed6e5591e3.

* Revert "Introduce the option to add data from the sidebar via "Add data" modal  (#58408)"

This reverts commit de780f53cd.

* Reflect changes from #58405
2025-06-12 10:30:58 -06:00
Nicolò Pretto
eb6fa6052c test: add basic tests for interactive embedding with sso (#58698) 2025-06-12 16:40:29 +02:00
Timofey Kachalov
8a8217b323 Update react-virtualized-to-9.22.6 (#59343) 2025-06-12 18:28:15 +04:00
Timofey Kachalov
3b9bcc1158 Remove back push filters for embedding-sdk.yml (#59406) 2025-06-12 18:22:26 +04:00
Sébastien
57f96b1561 Closes VIZ-1111 no chevron in edit mode (#59300)
* closes VIZ-1111 no chevron in edit mode

* e2e -> unit
2025-06-12 16:03:45 +02:00
Nicola Mometto
d2bb428aa5 Revert "Ensure we use a different connection per have-select-privilege? call (#58620)" (#59400)
This reverts commit 13dedb2e85.
2025-06-12 14:58:56 +01:00
Sébastien
2504278fd1 Closes VIZ-1098 copy on settings (#59299) 2025-06-12 15:36:23 +02:00
Uladzimir Havenchyk
9379998665 chore: upgrade rspack to address webpack-dev-server vulnerability (#59384) 2025-06-12 15:36:28 +03:00
Chris Truter
1b3e52d285 Add workflows as codeowner for metabase.actions (#59386) 2025-06-12 12:29:06 +00:00
Timofey Kachalov
3f484a9198 Use latest docker-compose for Sample App e2e CI (#59385) 2025-06-12 16:12:34 +04:00
Braden Shepherdson
1175848a78 [MBQL lib] Update downstream refs after swapping clauses (#59318)
Fixes #59273.
Fixes #48306.

Swapping two clauses can change their names, eg. two sum aggregations
`sum` and `sum_2`. Since refs in later stages are based on those names,
the refs need updating to track the same column, rather than change
targets.

`lib.remove-replace` already has logic for this when replacing a clause,
it was readily reused here. I added tests for swapping aggregations and
multiple breakouts of the same column.

Note that viz settings (also based on the names) are not updated as part
of this PR. There are separate bugs open for that issue both when
removing a clause and reordering them.
2025-06-12 11:47:01 +00:00
Nicola Mometto
0b06002dd5 Performance + memory usage optimisations for json unfolding during sync (#59122)
* a bit lazier table->unfold-json-fields

* remove need for dynamic var

* more optimised

* don't leak json parsers

* code style

* better perf

* short circuit earlier in case of a lot of nested fields

* add to changelog

* rename
2025-06-12 10:20:27 +00:00
Mahatthana (Kelvin) Nomsawadi
30405beba7 fix(sdk): Remove unhelpful error Error: null (#59168)
* Don't log `Error: null` on the SDK

* Assert error another way
2025-06-12 10:10:07 +01:00
Mahatthana (Kelvin) Nomsawadi
106a53e50c Fix can't download static SQL question\ (#59164)
when a parameter only expects a single value
2025-06-12 10:09:19 +01:00
Cam Saul
b908c7a826 Support type deduction for case and coalesce (#59331)
* Support type deduction for `case` and `coalesce`

* Revert accidental changes

* Fix CLJS tests
2025-06-12 02:34:18 +00:00
Alexander Polyankin
ac42020ffb Fix single and multi-value string filter widget for non-string columns (#59352) 2025-06-11 20:01:04 -04:00
Jakub Chodorowicz
194f33bd58 PRG-49 Add token missing banner (#59030)
* Add icon color support to the banner componet and story

* Add token missing banner rules

* Add token missing banner rules

* Add useLicenseTokenMissingBanner tests

* Dismiss license banner in e2e tests by default

* Improve flag naming in LicenseTokenMissingBanner

* Add banner story - non-closable

* Use regular double quotes for simple string

* Remove duplicated CSS property

* Improve docstring for license token missing banner setting

* Fix wrong property name in the test

* Remove empty align property

* Use existing setupUpdateSettingEndpoint mock

* Extract constants out of the function

* Use ready mock helpers in tests

* Refactor mock setup function to conform to existing standards

* Share the dismissal date between all admins

* Use admin settings APIs to interact with dissmisal state

* Improve banner dismissal test

* Use regular settings API to access license token banner dismissal fetch
2025-06-12 00:21:25 +02:00
Edward Paget
7c7b8c0ffa fix: set-table/db-permissions! in single txn (#58804)
* fix: set-table/db-permissions! in single txn

Update set-table-permissions! and set-database-permissions! to build
lists of all necessary changes based on the requested permissions
updates and then execute those changes in a single transaction to avoid
possible deadlocks in the recursive calls.

* fixup! incorrect doc string
2025-06-11 20:14:08 +00:00
Case Nelson
e502e8c313 fix: snowflake keep additional-options with private key (#59287) 2025-06-11 14:01:25 -06:00
Alberto Perdomo
a2da60735b Add admin settings step to JWT SSO SDK upgrade guide (#59332)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-11 20:43:05 +01:00
Edward Paget
741cc32efe fix: resolve TODO for empty app db (#58673)
* fix: resolve TODO for with-empty-2h-app-db

* fixup! revert permissions_tests changes

* fixup! keep change to use only public perms api
2025-06-11 19:32:26 +00:00
Ryan Laurie
72115f8077 use the right color prop for the settings gear (#59347) 2025-06-11 19:14:41 +00:00
Edward Paget
1b21d9e703 fix: audit migration for schema casing (#59346)
We can have tables in migrated instances that have two copies of the
audit db tables one with a 'public' schema and one with a 'PUBLIC'
schema. This handles that case.
2025-06-11 18:57:35 +00:00
Timofey Kachalov
fd85a8b2c5 Disable npm audit for host apps (#59302) 2025-06-11 22:47:54 +04:00
Cam Saul
cc5ece8941 Misc QP/Lib cleanup (#59336)
* Misc QP/Lib cleanup

* Test fix

* Kondo fix

* Flaky test fix
2025-06-11 14:44:25 -04:00
Rwakasiisi Edwin
40898a8923 docs - update visualizing-results.md to remove repetition (#59345) 2025-06-11 14:08:32 -04:00
Jeff Bruemmer
c00f99a8a2 docs - note on dev instances (#59326)
* note on dev instances

* edit
2025-06-11 13:54:27 -04:00
Sloan Sparger
386b0c1180 [Metabot] Suggestions UI improvements (#59320) 2025-06-11 12:54:21 -05:00
Jeff Bruemmer
d8da5514a1 early access program link (#59328) 2025-06-11 13:53:32 -04:00
Cam Saul
93844dde9b Do not normalize escaped join aliases (QUE-1353) (#59327) 2025-06-11 17:32:14 +00:00
Edward Paget
22baf07864 feat: add parameter card dashboard api tests (#59205)
* chore: add parameter card api tests

* fixup! add row lock fixture to avoid a flake
2025-06-11 11:41:06 -05:00
Sloan Sparger
572463d93a [Metabot] Unit test flake fix (#59321)
* fix flaking unit test

* run enterprise tests on change
2025-06-11 11:23:40 -05:00
Eric Normand
5631b69254 Remapped columns in model should not break (#59124)
* Add test for 23449

* Let -> const

* Better tests.

* Better tests still

* Better saving code

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

* Better test name

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Whitespace

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-06-11 15:13:18 +00:00
Romeo Van Snick
5b3f884cf5 Add repro for "Longer filter values overrun the screen when a single value is selected" (#59258)
* Add repro for metbase#44090

* Also test values without spaces
2025-06-11 17:05:49 +02:00
Alex Yarosh
74cc4496a7 docs: customize logging levels (#59290)
* logging

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-11 14:43:44 +00:00
Ryan Laurie
5c30345bdb Remove Query Validator Frontend (#58738)
* remove query-validator-fe

* remove e2e

* remove another ref
2025-06-11 07:54:34 -06:00
Sloan Sparger
6c15c95f6a [Metabot] Suggested prompts (#58823)
* FE wip

* more FE progress

* last big pass at UI

* url page param sync, show model name, move new code to new file

* remove pagination in url and add link to new metabot convo

* unit testing

* finish tests

* move prompt result fetching outside of metabot agent hook and into chat sidebar

* fix constant reference

* fix

* Add metabot prompts and wire up AI service

* Return prompt suggestions for cards visible by the user

* pr feedback

* Test metabot-scope

* Add BE tests

* Fix tests and kondo issues

* Fix tests and kondo issues

* Fix tests more

* Fix serialization

* Fix serdes more

* Use MySQL compatible delete syntax

* have FE use new regenerate endpoint instead of delete

* change mocked status code

* fix flaking unit test and fix failing MetabotAdminPage spec from wrong mocked pagination value

* Add prompt regeneration endpoint

* Document prompt regeneration endpoint

* fix test flake

* doh... fix the right test this time

* Use the collection configured int the app-db in answer-sources

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-06-11 16:31:38 +03:00
Uladzimir Havenchyk
0d61f1dc9f chore: split NativeQueryEditor to components (#59217)
* chore: split NativeQueryEditor to components

* pass missed parameter
2025-06-11 14:41:03 +03:00
Timofey Kachalov
5879a72692 Add more dependencies to SDK's packages.json (#58780) 2025-06-11 13:24:56 +04:00
Ryan Laurie
13e7b728bb Use Mantine TextInput in InputBlurChange (#58931)
* Use Mantine TextInput in InputBlurChange

* fix InputWithSelectPrefix

* fix tests
2025-06-11 00:07:50 +00:00
Tyler Plude
fa987a1031 Bump hawk version (#59282) 2025-06-10 15:51:48 -07:00
Fraser
7e2a6fd82b Prevent long dashboard names Inline (#59228)
* Limit input to 100 chars
2025-06-11 10:50:22 +12:00
Jeff Bruemmer
9522b3553b add blockquote for db routing (#59285) 2025-06-10 22:00:06 +00:00
Alexander Polyankin
1e0151089e Add e2e repro (#59270) 2025-06-10 14:57:20 -04:00
Oisin Coveney
875d28d5e0 docs(sdk): Add upgrade instructions for new auth flow (#59248)
* Add more docs

* Update authentication.md

* Apply suggestions from code review

* revisions

* edits

* note on saml

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-10 18:58:58 +01:00
Oleksandr Yakushev
bbcc5c8da6 Bump Malli to 0.19.1 (#59271) 2025-06-10 20:34:06 +03:00
Alexander Polyankin
9b0e848524 Fix filtering for string SQL columns (#59216) 2025-06-10 16:31:52 +00:00
Nemanja Glumac
1adc1c277a Fix the stale database cache when we enable or disable uploads for a certain database (#59184) 2025-06-10 17:41:00 +02:00
Timofey Kachalov
3bcdb8ae5d fix(sdk): wait for locales to be loaded before rendering SDK components (#58566) 2025-06-10 19:09:34 +04:00
Sébastien
cc50572fed Cloes VIZ-1098 polish for approximate number of intervals setting (#59254) 2025-06-10 16:55:16 +02:00
Alexander Polyankin
e0633df84c Show only valid linked filters in dashboards (#59084) 2025-06-10 10:17:22 -04:00
Riley Thompson
d3940c48f9 Revert "Fix hive-like trivy warnings (#58977)" (#59226)
This reverts commit f9396a3131.
2025-06-10 09:10:18 -04:00
Alberto Perdomo
875cde2f6f Add limitation about CSS vars in SDK theming (#59238)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-10 12:53:17 +00:00
Kamil Mielnik
4d295519b8 Upgrade browserslist db (#59240)
- npx browserslist@latest --update-db
2025-06-10 09:51:54 +00:00
Oisin Coveney
61bf62e6b9 feat(sdk): Add Visualization Button, hook, and onRun event (#58080) 2025-06-10 11:22:57 +03:00
Case Nelson
8e161473ed refactor: introduce driver-api (#59011)
* refactor: introduce driver-api

* Add kondo linting

* Handle kondo

* self review

* Clean up imported vars

* Rename qp.error-types

* Fix missed clickhouse ref

* Fix init settings

* Fix table alias error

* Fix kondo error

* Fix mistake mbql.s

* Fix var ref for get-method and kondo module config

* Fix dynamic vars

* Ignore exported multifns in changelog check

* Fix desired-alias in rewrite clause

* Use snowflake-jdbc-thin to avoid registering the embedded bouncycastle provider

* Update merged code for driver-api
2025-06-09 21:07:49 -06:00
Riley Thompson
f9396a3131 Fix hive-like trivy warnings (#58977)
* standalone with override deps

* format deps

* remove unnecessary deps

* add clarifying comment

* remove standalone, fix all warnings
2025-06-09 18:46:28 -04:00
Braden Shepherdson
45ef5471b6 [MBQL lib] Fix underlying-records drill on breakout of custom column (#59218)
Fixes #59005.

The FE-supplied `:dimension` column was being used directly, when it needs to be looked up anew on the massaged query.
2025-06-09 20:50:06 +00:00
William
ecf6b108a4 Fields values work for secondary series in a dashcard (#59076)
Field values check both :card and :series for the relevant card
2025-06-09 20:39:56 +00:00
William
46460a72d8 Select fields with parent-ids and hide parents by default (#58730)
In postgres, json fields are hidden by default, and we just show their children instead.  However, mongo fields and
bigquery struct fields work differently -- we default to just showing the parent, even though the ui claims that all
fields are selected.  This makes mongo and bigquery work like postgres.

In addition, this fixes a presumably-longstanding bug where mongo had incorrect column names when selecting both a
parent its child.  Basically, you can't ask mongo for both a parent and its child.  The returned data is just json, so
asking for the parent field includes all of its children.  Instead, mongo just errors when you try to make a request
like that.  As a workaround, the mongo driver was just requesting and returning the child fields.  This meant that it
was returning a different number of fields than expected, which confused annotate.

Now, the mongo query processor only selects for parent fields, because as mentioned, parent fields include their
children.  However, it also keeps track of all the fields we asked for in :projections, so when we get data back, we
know to pull all of those fields out of the returned data.
2025-06-09 20:38:28 +00:00
Jeff Bruemmer
e132bc2b3f notes (#59214) 2025-06-09 18:04:49 +00:00
Jeff Bruemmer
c9d8bda4e2 docs - data picker option (#59136) 2025-06-09 13:44:51 -04:00
Jeff Bruemmer
1d861f3bd0 docs - native editor menu (#59204)
* update sql snippet

* update images
2025-06-09 13:44:15 -04:00
Jeff Bruemmer
da0fa68410 docs - dev instances (#59186)
* dev instances

* link

* notes on tokens
2025-06-09 17:42:49 +00:00
Nathan Voxland
06868930d5 Better detection of card metadata changes (#59131) 2025-06-09 12:07:51 -05:00
Edward Paget
0493b2ab06 fix: check for row existence in parameter upsert (#59127)
* fix: check for row existence in parameter upsert

Do an exists check instead of relying on the result of `update!` being
zero. `update!` can return zero either when a row does not exist or when
there are no applicable changes in the request.

* fixup! use medley/mapply instead
2025-06-09 11:23:27 -05:00
John Swanson
167b5d0457 fix a tiny flake (#58902) 2025-06-09 08:56:23 -07:00
John Swanson
e6ae405f1b CI debugging improvements (#58883)
* test logs as artifact

* better test logs

* debugging improvements

* fix `with-context` query to work with non-literals

```
(with-context {:foo "bar"}
 ...)
```

worked,

```
(with-context (merge {:foo "bar"} {:bin "baz"})
 ...)
```

did not, now it does!

* add compiled query args to context

* kondo

* compact logs

* use an `:after` method

* use defonce to avoid repeated `test-var` overwrite
2025-06-09 08:56:14 -07:00
Timothy S. Dean
6911ca0034 Provide column-header filter drilling for serializedJSON (#59015)
* Stop excluding structured columns from column-filter drill throughs.
* Add tests that all kinds of structured columns are handled appropriately
2025-06-09 09:27:05 -06:00
Nathan Voxland
0f472619a1 Applied minor code style suggestions (#59116) 2025-06-09 10:23:08 -05:00
Luiz Arakaki
45ec88bcf6 __METABASE_ROUTER__ instead of primary db (#59189) 2025-06-09 11:55:46 -03:00
Nathan Voxland
d52ceacb85 Don't count dashboard subscriptions as a reason to count a card as recently viewed (#59080) 2025-06-09 09:48:25 -05:00
Raphael Krut-Landau
49d98e3bdf In the main nav, move 'Browse databases' above 'Browse models' (#58405) 2025-06-09 13:59:16 +00:00
Ryan Laurie
f72cb7a95f skip upload test results to trunk for draft PRs (#59012) 2025-06-09 06:44:14 -06:00
John Swanson
25949f7010 no archived collections in perm graph (#59065) 2025-06-09 05:39:21 -07:00
Vamsi Peri
a203a07465 Reduce log level to debug for some sync logs (#59161)
* Reduce log level to debug for some sync logs

* Update describe_table.clj
2025-06-09 08:23:19 -04:00
Uladzimir Havenchyk
124f99efa6 chore: replace lib/time with lib/time-dayjs where it is possible (#58852) 2025-06-09 10:22:21 +03:00
Mahatthana (Kelvin) Nomsawadi
f5c3e19c20 Properly expose initialParameters on dashboard components (#59115) 2025-06-09 06:27:44 +01:00
Case Nelson
505ce6bf19 fix: increase starburst percentile acceptable epsilon (#59129) 2025-06-06 14:41:54 -06:00
Uladzimir Havenchyk
eb71b07554 chore: typo in the function name (#59103) 2025-06-06 23:09:16 +03:00
Ryan Laurie
b74a36e201 Move routing out of SettingsEditor (#58905)
* Move Routing to React Router

* update tests

* fix command palette import

* Add some more tests

* remove dead code
2025-06-06 19:44:28 +00:00
Nick Fitzpatrick
9a6a8bc2db Auto Focus save button on the SaveQuestion Modal (#59093)
* Auto Focus save button on the SaveQuestion Modal

* adjusting e2e tests
2025-06-07 01:10:53 +05:30
Nick Fitzpatrick
fde212f961 Use Resize Observer to set google button width (#59125)
* Use Resize Observer to set google button width

* remove shame
2025-06-07 00:31:27 +05:30
John Swanson
4541eeb4ac s/mirror database/destination database/g (#58438) 2025-06-06 09:32:11 -07:00
Sébastien
1873505e72 closes VIZ-187 double scrollbar on viz settings (#59095) 2025-06-06 17:29:47 +02:00
Romeo Van Snick
6e3aca9d5a Remove flash of default title when saving a question (#59094)
* Use existing name when possible

* Add repro for metabase#55631

* Fall back to empty string
2025-06-06 17:27:26 +02:00
Jeff Bruemmer
f7f44f2538 update table docs (#59068) 2025-06-06 11:23:50 -04:00
Phoomparin Mano
12351f93d8 fix(sdk): omit jwt token response from error messages (#59108) 2025-06-06 21:27:20 +07:00
Phoomparin Mano
401a3f5a03 End-to-end tests for SSO authentication for new iframe embedding (#58939)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-06-06 14:24:24 +00:00
Ryan Laurie
2f6f6d8cd1 Update Slack Settings (#59072)
* Update Slack Settings

* fix button copy

* Update localization

* dont swallow errors

* delete more stuff!
2025-06-06 14:20:46 +00:00
Ryan Laurie
d22c0b93b7 fix typo in authcard (#59101)
* fix typo in authcard

* add translation context
2025-06-06 07:49:22 -06:00
Uladzimir Havenchyk
16efcf7bc4 chore: replace moment with dayjs in unit tests (#59105) 2025-06-06 16:45:20 +03:00
Phoomparin Mano
5a6dffed11 refactor(sdk): rename authMethod to preferredAuthMethod (#59099) 2025-06-06 20:27:59 +07:00
Phoomparin Mano
95d2db505a SSO authentication for new iframe embedding (#58567) 2025-06-06 19:43:56 +07:00
Kamil Mielnik
a6544c6cae SEM-359 Toasts shown when nothing changed (#58946)
* Fix SEM-359

* Update ChartSettingInput interface

* Add repros
2025-06-06 15:25:26 +07:00
Kamil Mielnik
f99fe8e922 Remove debugging code (#59041) 2025-06-06 13:54:01 +07:00
Cam Saul
b6dff656d7 Add team names to backend modules config (#58907) 2025-06-05 22:22:03 -04:00
Edward Paget
e26c2b0ef7 fix: move metabot migrations back to 001 (#59066)
* fix: move metabot migrations back to 001

* fix: embedded metabot name

* fix: add dummy migration
2025-06-05 16:37:37 -05:00
Ryan Laurie
b5db6f3d6b update auto backport workflow (#58943) 2025-06-05 15:21:51 -06:00
Nick Fitzpatrick
bde63bb6d3 static size for watermark background, changing source url (#58647) 2025-06-06 01:51:14 +05:30
Ryan Laurie
cdd03ce3f9 Stabilize flaky mongo tests (#59059)
* stabilize flaky mongo tests

* replace mongo tag
2025-06-05 19:38:22 +00:00
Eric Normand
753f612b70 Test that self-joined columns are independently editable (metadata) (#58999)
* Test that self-joined columns are independently editable (metadata)
2025-06-05 19:30:04 +00:00
Alex Yarosh
8e3ae592e5 docs: update offset limitations (#59056)
* Update offset.md

* Update expressions-list.md
2025-06-05 12:17:40 -04:00
Phoomparin Mano
b8b2c9859b refactor(sdk): move auth functions to the auth-common module (#58557) 2025-06-05 23:13:22 +07:00
dpsutton
4161aa620a Revert "Make snowflake not required (#58815)" (#58991)
This reverts commit 9dcbcba3f6.

snowflake is now fixed from being flaky and is now required again

the fix was in checking old dataset names to prune. Shared databases
like cloud databases don't get destroyed when docker terminates, so we
have to remove old databases. The way we did it in the past would error
if more than 10,000 rows were returned. The fix is the following from
https://github.com/metabase/metabase/pull/58818 :

```clojure
(defn- old-dataset-names
  "Return a collection of all dataset names that are old -- prefixed with a date two days ago or older?"
  []
  ;; modified the query from the snowflake driver:
  ;; fa58e34968/src/main/java/net/snowflake/client/jdbc/SnowflakeDatabaseMetaData.java (L1644C21-L1644C90)
  ;; We run into issues where this returns more than 10,000 items and we get an error: "The result set size exceeded
  ;; the max number of rows(10000) supported for SHOW statements. Use LIMIT option to limit result set"
  (let [query "show /* JDBC:DatabaseMetaData.getCatalogs() with limit */ databases in account limit 10000"]
    (into []
          (comp (map :name)
                (filter sql.tu.unique-prefix/old-dataset-name?))
          (jdbc/reducible-query (no-db-connection-spec) [query] {:raw?
          true}))))
```
2025-06-05 10:53:51 -05:00
Alexander Polyankin
71cc4d55ad Fix model sigma icon (#57989) 2025-06-05 14:46:37 +00:00
Timofey Kachalov
8a48603cd9 Exclude react-ansy-style from SDK deps and adjust host app dependencies (#59034) 2025-06-05 18:16:24 +04:00
Edward Paget
cb519789e7 fix: audit adjust to source handles nil schemas (#59003)
Some mysql -> postgresql migrated users still had adjust to source
failing because they had two tables with downcased names but one with a
"public" schema column and the other with a null schema column. This
handles that case by only selecting tables if there is not already a
table with a "public" schema column.
2025-06-05 13:58:37 +00:00
Brad Anderson
cb53ea46f7 Closes VIZ-192: Goal line tooltip formatting does not match ticks formatting (#58805)
* VIZ-192 Updates goal tooltip to use same formatting as y-axis (but ignores compact/auto formatting to ensure the goal value is represented accurately)

* VIZ-192 Adds support for formatting percentage-based goals (e.g. bar charts with "Stack - 100%" selected)

* VIZ-192 Updates getGoalLineHoverData to accept a formatGoal param rather than a chartModel per PR feedback

* VIZ-192 Adds e2e tests for goal value formatting
2025-06-05 09:38:29 -04:00
Brad Anderson
ec39dcbd7e Closes VIZ-181: Negative values overlap with x-axis labels, making them unreadable (#58740)
* VIZ-181 Adds boundaryGap to bar chart y-axis if it has negative values to ensure bar labels don’t overlap axis labels

* VIZ-181 Minor performance consideration; `ensureRoomForLabels` only checks `dataSeriesOptions` since "bar" series won't show up in other seriesOptions

* VIZ-181 Tweaks ensureRoomForLabels calculation

* VIZ-181 Adds unit tests for ensureRoomForLabels
2025-06-05 09:37:23 -04:00
Nicola Mometto
ad608ccc91 don't assume a keyset doesn't exist if the value it's set to is the same as it already has (#59032) 2025-06-05 11:56:39 +01:00
Mahatthana (Kelvin) Nomsawadi
8ff9fa1b9b Unskip skipped test (#59029) 2025-06-05 11:41:46 +01:00
Mahatthana (Kelvin) Nomsawadi
89ca56dbe7 Update SDK release workflow after 55 gold (#59016) 2025-06-05 11:01:44 +01:00
Romeo Van Snick
33032d5ae0 Apply filter correctly when clicking Contains... or Does not contain... quick filters (#58798)
* Remove popover for quick drill

* Add repro for metabase#58247

* Show filter popover instead of immediately applying filter

* Do not prefill values

* Change filter propt to Filterable

* Remove nonsensical comment

* Remove duplicate filter

* Remove superflouous checks
2025-06-05 11:18:28 +02:00
Romeo Van Snick
515c93f442 Don't open the database picker when there is only one database (#58849)
* Don't open the database picker when there is only one database

* Allow null for database

* Add repro for metabase#57644

* Remove duplicate it

* Use == to check for undefined

* Fix test description

* Update e2e/test/scenarios/native/native-reproductions.cy.spec.ts

Wording

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-06-05 11:17:52 +02:00
Dan Stone
10205ea677 Remove data-editing API (#58955)
This early API was unintentionally committed to master. See the
`internal-tools` branch for the working version.
2025-06-05 09:53:24 +01:00
Romeo Van Snick
d2541d2426 Disallow aggregations in filters and custom columns (#58839)
* Add check for correct clauses for expression mode

* Add support helper to expressions/mode

* Do not show help text for unsupported functions

* Add repro for metabase#58230

* Add e2e test for not showing helptext for unsopported functions

* Allow value operator

* Pass expressionMode where needed

* Tranlate mode name in error message

* Avoid throwing in checkExpressionModeSupportsClause
2025-06-05 10:01:21 +02:00
Romeo Van Snick
c9490c3bad Allow resetting a required filter to its default value (#58875)
* Add repro for metabase#57388

* Fix update button helper

* Set to default when value is empty

* Update repro

* Make unit test more robust

* Do not pass default value to default value picker

* Fix unit test
2025-06-05 08:51:13 +02:00
Fraser
a5cdcada29 Move notification components to new folder structure (#59009) 2025-06-05 14:24:46 +12:00
Ryan Laurie
ed2d5c676f Update JWT Settings (#58749) 2025-06-05 00:32:21 +00:00
Nicola Mometto
13dedb2e85 Ensure we use a different connection per have-select-privilege? call (#58620)
* fix info formatting

* ensure exception is not swallowed

* Ensure we use a different connection per [[have-select-privilege?]] call.

This is to guard against databases (like Oracle) closing a connection when attempting
    to execute a priviledged select, causing subsequent calls to fail.

* adjust usage of snowflake driver

* adjust usage of postgres driver

* update tests

* more efficient: move filtering within db-tables

* add test

* add changes to driver changelog

* route through driver rather than jdbc, so athena doesn't fail

* ensure we're testing only the drivers using default jdbc impl

* expose wrapper, rename
2025-06-04 23:42:10 +01:00
Ryan Laurie
b4f207e44b Update Settings SAML Form (#58670)
* Update Settings SAML Form

* type fixes

* type fixes

* add saml unit tests

* update e2e tests

* update backend tests

* saml formatting

* Not found placeholder

* update e2e tests

* remove duplicate tests

* properly test saml disabled

* make tests nicer
2025-06-04 22:38:38 +00:00
Alexander Polyankin
a921faf14f Fix the comment (#58882) 2025-06-05 00:28:54 +03:00
Uladzimir Havenchyk
533c823dc5 test: add repro for a fixed issue (#58996) 2025-06-05 00:26:23 +03:00
Nemanja Glumac
87115666c1 Add the special empty viz state for native queries (#59001) 2025-06-04 23:12:51 +02:00
Oleksandr Yakushev
673da45b3b Update Malli to 0.18 (#58753) 2025-06-04 23:45:52 +03:00
Fraser
985f298f8b ADM-788 Convert SMTP email form to new components (#57827) 2025-06-04 20:11:30 +00:00
Jeff Bruemmer
f5d3f3267c add notIn entry (#58998) 2025-06-04 15:16:38 -04:00
Jakub Chodorowicz
44e9886d68 PRG-53 add community translations notice (#58789)
* PRG-53 add community translations notice

Enhance localization features by adding community translation links and descriptions across user profile, localization settings, and setup components.

* PRG-53 Refactor localization components to use CommunityLocalizationNotice

Replaced direct translation links and descriptions in UserProfileForm, LocalizationSettingsPage, and LanguageStep with the new CommunityLocalizationNotice component for improved code reuse and consistency.

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>

* PRG-53 Use external link in the notice and add tests

* PRG-53 Fix e2e i18n test

* PRG-53 Prefer stack over brs, add a11y label, refactor export

* PRG-53 Improve cy selector to a semantic one

* PRG-53 Use hardcoded Metabase name in the setup flow

* PRG-53 use color name in color property

* PRG-53 use show-metabase-link setting

* PRG-53 Use Metabase original name for admin screens

* PRG-53 Add storybook stories

* PRG-53 Don't mention custom name in the translation when white labelling

* PRG-53 use static for crowdin link

* PRG-53 remove CommunityLocalizationNotice story

* PRG-53 Fix e2e i18n test

---------

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>
2025-06-04 21:03:01 +02:00
Ryan Laurie
2b426e701c Remove cloud settings plugin (#58827)
* Remove cloud settings plugin

* remove unreachable logic for updates on hosted instances

* fix import

* fix title

* remove dead hosted updates code

* linter obedience
2025-06-04 17:53:04 +00:00
Filipe Silva
03bd660f37 fix: lookup cloud migration part keys (#58881)
* fix: lookup cloud migration part keys

Mapping over multipart-urls map entries wasn't ordered or deterministic, but it happened to be for less than 8 elements.

Changed to a lookup on advice from @dpsutton.

Fix https://metaboat.slack.com/archives/C010ZSXQY87/p1748611922362219

* test: update cloud migration settings test vars

* fix: add early multipart errors
2025-06-04 18:26:35 +01:00
Ryan Laurie
4ff5abd06a Update Embedding Settings (#58750)
* Update Static and Interactive Embedding Settings

* update sdk settings

* remove useMergeSetting

* remove more dead code

* remove more unnecessary stuff

* update unit tests

* more test updates

* update e2e tests

* Move embedding unit tests to local components

* address review comments
2025-06-04 17:24:16 +00:00
Sébastien
e0e3a17634 Closes VIZ-1051 no title menu for single source cards (#58797)
* Closes VIZ-1051 no title menu for single source cards

* fix
2025-06-04 19:16:45 +02:00
Ryan Laurie
3db6677747 Update License and Billing Settings (#58755)
* WIP

* cleanup store code and update tests

* cleanup plugins

* fix toast

* fix import
2025-06-04 11:08:33 -06:00
Ryan Laurie
31a355c833 remove swag button (#58892) 2025-06-04 16:58:04 +00:00
Aleksandr Lesnenko
fc70115302 remove ai dashboard analysis (#58378)
* remove ai dashboard analysis

* add back explaining dashcards

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2025-06-04 11:39:02 -05:00
Nicola Mometto
3739507b28 respect modularisation effort and use analytics.core (#58920) 2025-06-04 17:30:54 +01:00
Eric Normand
4e37fb0e71 Add test for implicity join columns (#58896)
* Add test for implicity join columns

* Fix typo in test name
2025-06-04 16:25:42 +00:00
John Swanson
d77f3da196 Fix 3 flaky tests (#58729)
* Fix a flaky test for max-refingerprint-field-count

The code here goes through tables and refingerprints them (with all
their fields). After each table it checks the
`max-refingerprint-field-count` and stops if we've hit it.

The test gave some wiggle-room - we'd allow 10 extra fields. But in a
fresh run of my tests, the biggest table has... 13 fields. So if the
last table we hit before hitting the limit was *that* table, we exceed
our wiggle-room and the test fails.

Instead, the test now actually looks to see what's the biggest table we
have (in terms of number of fields), and asserts that the number of
fields refingerprinted is, at the most, the max plus that number of
fields.

* fix two more flaky tests

one is clearly a symptom of another test being super naughty but I can't
figure out which one. It's marked `parallel` and doing

```
(mt/with-temp [:model/Card {id :id} ...]
 (do-something-with (t2/select-one :model/Card id)))
```

which is failing because `(t2/select-one :model/Card id)` is returning
nil. We can just pass the card that was actually returned by
`mt/with-temp` here and that should be more resilient to horrible tests
being horrible.

the other is checking that we're caching something by checking the call
count to toucan on the first and subsequent call to a function. But it
asserts that the first call count is exactly 6, which isn't relevant.
If I start a fresh REPL I get more than 6 the first time. It doesn't
matter! Just assert that we don't get MORE than the first time on the
second run!

* fix flaky tests freal

* fix: use t2/query to skip card callbacks

* fix: retry on failed pk insert

* fix: log when we have the cluster lock

* fix: try catching all sqlexceptions

* fix: add a fixture to pre-create the cluster_lock

* fixup! remove with-connection from update-used-cards

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-06-04 16:24:52 +00:00
appleby
59d0ab1124 Fix before-and-after :join generative test (#58913)
* Add testing context around before-and-after gen tests

To ensure you can see the before and after queries as well as the steps that produced them when a test fails.

* Fix before-and-after :join in generative tests

Pass stage-number to check for aggregations and breakouts on the stage where the join was added rather than the final
stage.
2025-06-04 09:15:13 -07:00
Mahatthana (Kelvin) Nomsawadi
34e6a516c7 Add an option to opt in to multi-staged data picker (#58575)
* Add an option to force multi-staged data picker

* Move type to a proper location

* Add `question` to `entity_types`

* Add ability to select saved questions back to multi-staged data picker

* Auto select Questions or Models when there is only a single option

* Prevent accidental types

* Remove unreachable code

* Default the join step after selecting a question to the question step

* Fix type errors

* Improve typing + fix unit tests

* Remove unnecessary await

* Add unit tests

* Update the default simple data picker value

* Fix the picker name typo

* Ignore `question` in Simple data picker

* Add E2E tests

* Move a constant out of a type file

* Fix types

* Address review. Make code more sane

* Address review. Improve variable name clarity.

---------

Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-06-04 15:09:38 +01:00
Oisin Coveney
256179a72a docs(sdk): Fix docs for new auth flow (#58776)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-04 14:03:33 +00:00
Romeo Van Snick
61ff81a3ab Fix disappearing padding on filter (#58932)
* Make padding consistent on different filter types

* Add repro for metabase#58923
2025-06-04 16:01:59 +02:00
Sébastien
519a9f197f Closes viz-1053 UI polish on download popover (#58844)
* closes viz-1053 UI polish on download popover

* addressed comments
2025-06-04 15:53:16 +02:00
Nicola Mometto
c0a3f19b87 use a much cheaper query in the snowflake driver to detect ability to connect (#58868) 2025-06-04 09:30:53 -04:00
Timofey Kachalov
b5528b9e77 Add angular@20 host app and e2e (#58887) 2025-06-04 17:17:10 +04:00
Nicola Mometto
73ad3908a7 handle effective_type/coercions in fingerprinters (#58693)
* add tests for SEM-3

* let fingerprinters respect ->Number coercers

* explicitely assert for supported coercions

* add test on fingerprinted supported coercions
2025-06-04 11:44:25 +00:00
Uladzimir Havenchyk
002816ac09 chore: replace moment-timezone with dayjs in some files (#58846)
* chore: replace moment-timezone with dayjs

* fix import
2025-06-04 14:05:56 +03:00
Uladzimir Havenchyk
b5a11b7497 chore: replace moment-timezone with dayjs when fromNow is used (#58850) 2025-06-04 14:05:43 +03:00
Phoomparin Mano
d028448a5f ci(sdk): skip broken create question test temporarily (#58924) 2025-06-04 17:58:57 +07:00
Nicola Mometto
27e5abdf8c add some snowplow events for semantic layer events (#58843)
* track sync/scan on snowplow

* allow analytics in warehouse_schema

* some field analytics

* add tests
2025-06-04 11:04:34 +02:00
Uladzimir Havenchyk
d966ff346c chore: replace moment-timezone with dayjs in cypress specs (#58848)
* chore: replace moment-timezone with dayjs in cypress specs

* Update e2e/test/scenarios/filters/relative-datetime.cy.spec.js

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-06-04 07:31:50 +00:00
Cam Saul
dd474a1776 [MLv2 × QP] auto-parse-filter-values => MLv2 (#58683)
* [MLv2 × QP] `auto-parse-filter-values` => MLv2

* Simplify code

* Simplify further

* Fix function name

* Add comment

* Remove unused namespaces

* Test fix 🔧

* Test fixes 🔧
2025-06-03 15:29:59 -07:00
Fraser
cb70a6df23 Don't show prompt to add duplicated model to dashboard (#54701)
* Don't show prompt to add duplicated model to dashboard
2025-06-04 10:21:10 +12:00
bryan
baa82b1ca0 Mage jar dl branches (#58724) 2025-06-03 21:25:35 +00:00
Jeff Bruemmer
5cdc504355 docs - multi-catalog support for databricks (#58901)
* multi-catalog support

* Update docs/databases/connections/databricks.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

* Update docs/databases/connections/databricks.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

* Update docs/databases/connections/databricks.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-06-03 21:22:47 +00:00
Alex Yarosh
e57f223d3a docs: custom expression support updates (#58895)
* custom expression updates

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-03 20:33:53 +00:00
Jeff Bruemmer
e0213e3665 docs - remove export branding (#58897)
* note on Metabase branding

* keyword
2025-06-03 20:31:16 +00:00
Fraser
f0c19f08a1 Adm 484 convert maps tab to new components (#58547)
* Add test for GeoJSON widget

* Add more tests

* Add tests for updating map value

* Add edit map test

* Refactor widget to tsx

* Render error messages correctly

* Use MapsSettingsPage and add tests

* Fix loading bug

* Add explantory comment
2025-06-03 14:23:42 -06:00
Edward Paget
49d314b70d fix: prevent empty updated_at updates (#58811)
Use cluster locking around both last_viewed_at and view_count updateds
for report_dashboard models.
2025-06-03 14:48:58 -05:00
Nathan Voxland
b1de6084e2 Make new "appdb" search engine the default starting with v55 (#58718) 2025-06-03 13:38:29 -05:00
Ryan Laurie
e6f17ffae9 Remove LLM Autodescription Frontend (#58828) 2025-06-03 17:56:30 +00:00
Nathan Voxland
f13a02c0c3 Split v56 changelog from the monolithic previous changelog (#58650) 2025-06-03 12:39:20 -05:00
Nathan Voxland
f5b3699072 Correctly handle nil last-sync-started-at in gsheets response (#58661) 2025-06-03 12:38:13 -05:00
John Swanson
ffec482d73 fix SSO login (#58874)
This was failing because we call

```
(session/create-session! :sso user (request/device-info request))
```

with the result of this function, and `session/create-session!` requires
a user with at least `:id` and `:last_login`. We didn't have a
`:last_login` in this case so `create-session!` was barfing.

we didn't have any tests that actually logged in as an existing user.
2025-06-03 17:32:10 +00:00
Alexander Polyankin
7029fd4c6d Fix default fields for joined SQL models (#58826) 2025-06-03 13:16:05 -04:00
Nicola Mometto
56cdad9c72 Short circuit on sync error (#58706)
* update sync error handling to take into account `do-not-retry-exceptions?` as per its docstring

* add test

* introduce `with-returning-throwable`, use consistently

* update test
2025-06-03 16:44:58 +00:00
Nick Fitzpatrick
607cf6efad add remember me to google sign in (#58239)
* add remember me to google sign in

* UI adjustments

* assert that remember me checkbox is rendered with google button

* backend test that cooke expiration is set

* rollback model changes in BE test

* create user model and use with-model-cleanup

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-06-03 22:06:39 +05:30
Timothy S. Dean
04e0d8a390 Add galdre to internal team config (#58819) 2025-06-03 10:17:49 -06:00
Rodrigo Quinteiro
e97eeccba4 Update case.md (#54847)
Superman has a face
2025-06-03 12:08:55 -04:00
Nemanja Glumac
ed6e5591e3 Address review comments from #58408 (#58785)
* Define the number of engines in a constant

* Improve callback naming

* Use t-shirt sizing

* Remove superfluous e2e test

We're already covering this scenario using Jest.

* Update prop naming

* Simplify CSS
2025-06-03 17:59:40 +02:00
Sébastien
a3ee9cde79 VIZ-1024 small polish items on visualizer (#58360)
* closes VIZ-1024 more menu with only one item feels weird

* fixed e2e test

* removed dead code
2025-06-03 15:18:37 +00:00
Jeff Bruemmer
29df8b91d9 docs - shortcuts (#58737)
* keyboard shortcuts doc

* script to generate docs

* handle ctrl/cmd

* readme

* casing

* more casing

* revision

* note on menu

* message

* typo

* dir name

* update test

* Update docs/util/resources/introduction.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

* Update frontend/src/metabase/palette/shortcuts/question.ts

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

* edits

* update docs

* interpolate >

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-06-03 10:07:11 -04:00
Romeo Van Snick
6c1eeb9f32 Browser nav for model editor (#58786)
* Change tab as well when url changes

* Do not get confused about editor height

* Add repro for metabase#55486

* Scope loading query

* Test forward button too

* Limit query

* Remove loading check altogether
2025-06-03 16:01:15 +02:00
Jeff Bruemmer
05462a5212 edit uploads (#58845) 2025-06-03 09:51:31 -04:00
Jeff Bruemmer
d0418f8377 docs - visualizer updates (#58604) 2025-06-03 09:49:08 -04:00
Riley Thompson
9a01d082ff Revert "Remove hive-jdbc$standalone dependency (#58655)" (#58856)
This reverts commit f11fb71403.
2025-06-03 16:46:43 +03:00
Anton Kulyk
2d5d40a9ab Fix flaky visualizer tests (#58801)
* Wait for queries to complete after saving changes

* Wait for `dc.series` queries in `visitDashboard`

* Wait until visualizer loads after it's open

* Fix flaky tests

* Remove flaky tag

* Revert "Wait for `dc.series` queries in `visitDashboard`"

This reverts commit 3f6a606442.
2025-06-03 13:45:39 +01:00
Riley Thompson
f11fb71403 Remove hive-jdbc$standalone dependency (#58655) 2025-06-03 12:48:00 +03:00
Nicola Mometto
4b6f1097f8 add logging for table filtering during sync (#58777)
* add logging for table filtering

* make sure drivers also log schema exclusions
2025-06-03 09:23:31 +00:00
Timofey Kachalov
b649df7214 Update Host App dependencies (#58835) 2025-06-03 12:30:08 +04:00
dpsutton
ba43f3ad71 Fixup snowflake old dataset check (#58818)
Error we were getting:

```
1. Unhandled net.snowflake.client.jdbc.SnowflakeSQLException
   The result set size exceeded the max number of rows(10000)
   supported for SHOW statements. Use LIMIT option to limit result set
   to a smaller number.
        SnowflakeUtil.java:  170  net.snowflake.client.jdbc.SnowflakeUtil/checkErrorAndThrowExceptionSub
        SnowflakeUtil.java:  102  net.snowflake.client.jdbc.SnowflakeUtil/checkErrorAndThrowException
             StmtUtil.java:  488  net.snowflake.client.core.StmtUtil/pollForOutput
             StmtUtil.java:  394  net.snowflake.client.core.StmtUtil/execute
          SFStatement.java:  502  net.snowflake.client.core.SFStatement/executeHelper
          SFStatement.java:  211  net.snowflake.client.core.SFStatement/executeQueryInternal
          SFStatement.java:  145  net.snowflake.client.core.SFStatement/executeQuery
          SFStatement.java:  779  net.snowflake.client.core.SFStatement/execute
          SFStatement.java:  697  net.snowflake.client.core.SFStatement/execute
 SnowflakeStatementV1.java:  293  net.snowflake.client.jdbc.SnowflakeStatementV1/executeQueryInternal
 SnowflakeStatementV1.java:  149  net.snowflake.client.jdbc.SnowflakeStatementV1/executeQuery
SnowflakeDatabaseMetaData.java: 1648  net.snowflake.client.jdbc.SnowflakeDatabaseMetaData/getCatalogs
                      REPL:  107  metabase.test.data.snowflake/old-dataset-names/fn
```

We do this in `old-dataset-names` by just calling `(.getCatalogs
metadata)` which runs
fa58e34968/src/main/java/net/snowflake/client/jdbc/SnowflakeDatabaseMetaData.java (L1644C21-L1644C90)
or

```sql
String showDB = "show /* JDBC:DatabaseMetaData.getCatalogs() */ databases in account";
```

I've modified that to have a limit and then run that
`jdbc/reducible-query` to get the names
2025-06-03 00:00:45 -05:00
appleby
c979f78a3d Fix zoom drill for clicks on a joined PK column (#58204)
* Fix zoom drill for clicks on a joined PK column

* Add lib.drill-thru.common.primary-key? and foreign-key? helpers

* Fix zoom and quick-filter drill for clicks on a joined PK column

* Remove unused imports

* Move source fields check into lib.drill-thru.common and revert changes in lib.metadata.calculation

* Remove trailing whitespace from docstring

* Lookup primary key in visible-columns ignoring joins rather than source-table fields

* Fix docstring
2025-06-03 00:14:49 +00:00
Tyler Plude
f06fded742 Fixing strings for relative date params in subscriptions (#56471)
* Fixing mapped user facing strings for relative date params in subscriptions and alerts

* Adding frontend fix + spec

* Changing 'is' to '->' in UI

* pr feedback

* e2e test fix

* use badges in oss sidebar; update pulse card rendering; test fixes

* test fix

* test fix

* pr feedback
2025-06-02 16:15:43 -07:00
Ryan Laurie
9dcbcba3f6 Make snowflake not required (#58815) 2025-06-02 16:27:16 -06:00
Jeff Bruemmer
c852e0b4a1 docs - pivot table exports (#58660) 2025-06-02 16:54:52 -04:00
Maz Ameli
b7711b995b add a hover and selected state to top items in admin top nav (#58688) 2025-06-02 13:39:15 -07:00
John Swanson
6a3a058e28 Respect is_active on JWT/SAML logins (#58582)
Currently, if a user is set to `is_active: false`, we still allow them
to log in via JWT or SAML. When they do, we also don't update the value
of `is_active`, which could potentially lead to inaccurate user counts.

After this change, the behavior when discovering an existing user upon
login is:

- if `is_active` is `false` and JWT/SAML user provisioning is on, we'll
log the user in and set `is_active` to `true`.

- if `is_active` is `false` and JWT/SAML user provisioning is off, we'll
give the user an error and not change the existing user.

- if `is_active` is `true`, we'll log the user in like normal.
2025-06-02 11:30:46 -07:00
John Swanson
5c0171e37b Randomize the timing of upgrade checks (#58701) 2025-06-02 11:28:09 -07:00
Anthony Lio
8adcd9ec66 fix(api-openapi): adds meta viewport to open api index file (#53665) 2025-06-02 14:20:52 -04:00
Oleksandr Yakushev
467297aeb2 cljs: Replace clojure.spec leftovers with Malli (#58242) 2025-06-02 10:16:01 -07:00
Ryan Laurie
fcef77fdef Quarantine flakiest e2e tests (#58796)
* quarantine flakiest tests

* remove fixed test 😌
2025-06-02 15:59:19 +00:00
Timofey Kachalov
490f1c8ab7 Share common Host App tests between all Host Apps (#58791) 2025-06-02 18:29:53 +04:00
Ryan Laurie
c50883c866 use string literals for i18n context (#58784) 2025-06-02 14:08:15 +00:00
Jeff Bruemmer
bd3ea3bdab docs - download button for static embeds (#58707) 2025-06-02 09:56:40 -04:00
Alex Yarosh
ea5e00c5b4 Update data-sandboxes.md (#58754) 2025-06-02 09:49:51 -04:00
okaeiz
ad1d77f1aa Fix the code blocks in README.md to facilitate the copy feature (#53159) 2025-06-02 09:39:32 -04:00
Uladzimir Havenchyk
37cc0ffa9d test: wait for card data in a flaky test (#58778) 2025-06-02 15:37:01 +03:00
Ryan Laurie
85a5f8efc7 fix currency formatting bug (#58733) 2025-06-02 06:15:21 -06:00
Nemanja Glumac
de780f53cd Introduce the option to add data from the sidebar via "Add data" modal (#58408) 2025-06-02 13:51:40 +02:00
Romeo Van Snick
28ceb5e471 Reproduction for missing hyphen in formatting in joined columns (#58574)
* Add repro for metabase#58371

* Add unit test to reproduce metabase#58371
2025-06-02 11:11:22 +02:00
Romeo Van Snick
e1041fcfa1 Deduplicate binning information (#58587)
* Remove binning from pinned items

* Add reproduction for metabase#57697

* Revert "Remove binning from pinned items"

This reverts commit aa2d4abbb4472b835dee901ce7ac36c4bc43cd5e.

* Remove binning from column when calculating displayname
2025-06-02 11:11:06 +02:00
Timofey Kachalov
e7ddf4d260 Improve the embedding-sdk-no-exposed-internal-types-validate CI job (#58612) 2025-06-02 12:38:07 +04:00
metamben
4b006fec6e Handle datetime extracted values in filters for xrays (#58725)
Fixes #47196.
2025-06-02 09:18:09 +03:00
Maz Ameli
15597535de Fix embarrassing styling in Data Reference (#58544)
* fix alignment on table lists

* make all the lists align the same

* remove unnecessary 100% width

* standardize card widths

* fix up edit state
2025-05-30 22:04:49 -07:00
Ryan Laurie
9aa35fff0b Metabot Admin - Folder Edition (#58316)
* Add models; liquibase migration; ...

and other model incantations

* Add fk constraint after indexes

* Update model tests for column names

* serdes fixes

* Replace remaining missing metabot_model_entity_id

* Update generated baselines

* fix serialization tests

* initial implementation

* make the api match

* wip

* align types with API

* improved routing

* empty state

* cleanup and tests

* pivot to collection picking

* no personal collection

* update tests

* remove defunct table changes

* fix conflicts

* add copy for embedded metabot

* linter appeasement program

* linter appeasement program

* linter appeasement program

* update api

* no thank you migration

* un-un-un revert some stuff

* address review comments

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-05-31 00:56:06 +00:00
appleby
937ab0ca3d Ensure display-info returns correct :long-display-name for aggregations from a previous stage (#58614)
* Add lib.util/find-clause-by-uuid

* Lookup clause by uuid to generate the :long display-name for a :metadata/column

* Fix display-name expectations in targets.unit.spec.ts

* Fix display-name expectations in click-behavior.cy.spec.js

* Fix display-name expectations in filter-sources.cy.spec.js

* Review feedback: ensure last-stage? throw when given an invalid stage-number

* Review feedback: use lib.tu/venues-query

* Review feedback: explict true? and false? checks for first-stage? and last-stage?
2025-05-30 16:50:30 -07:00
metamben
8e6d4a8258 Reflect include-current option in filter name (#58662)
* Reflect include-current option in filter name

Fixes #50139
2025-05-31 02:35:46 +03:00
Tyler Plude
e68b3f998e Only run necessary pivot subqueries (#57999)
* WIP

* Adjust process-multiple-queries to also support single pivot queries

* cleanup

* Seemingly working backend support for only running necessary subqueries

* pivot unit test adjustments

* Test fixes

* Rerun pivot query when settings change

* wip fix for pivots as email attachments in subscriptions

* alternate single query qp support; unit test fix

* fix ts

* fix

* fix frontend spec

* pr feedback

* adding api test coverage for pivots with totals disabled

* fix cljkondo

* typo

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2025-05-30 14:12:28 -07:00
Raphael Krut-Landau
9c071ffbcb Use better icons in filter popover (#58377) 2025-05-30 15:34:41 -04:00
lbrdnk
4b4b74e49a Adjust external column type sync (#58528)
* Adjust external column types sync

* Adjust

* Typo
2025-05-30 19:27:48 +00:00
Edward Paget
ceff6b3e63 fix: no log on migrations without a rollback (#58577) 2025-05-30 19:27:04 +00:00
Jeff Bruemmer
5236b54cc3 remove starts (#58731) 2025-05-30 19:04:54 +00:00
Eric Normand
2314c8b5ad Test that mapping query column metadata (#58599)
* Add test fo 52465

* Move setup to beforeEach()
2025-05-30 18:57:59 +00:00
Noah Moss
c90d29f9f1 Always fully uncollapse pivots in exports (#58716)
* keep backend pivot exports uncollapsed

* fix kondo errors

* update tests - only run collapsing tests on cljs, add a new test for clj that rows are not collapsed

* fix more kondo warnings

* cleanup
2025-05-30 14:17:10 -04:00
Edward Paget
45269fcf32 feat: api and models for managing metabot entities (#58168)
* feat: api and models for managing metabot entities

* Add stubs

* Add models; liquibase migration; ...

and other model incantations

* tests for api

* Update h2 copy

* rename model to dataset

* Add fk constraint after indexes

* Wrap tests with with premium feature

* Add seed migration; drop unused index

* Update API to wrap in items instead of data

* Update model tests for column names

* Pass remaining serdes tests

* Reorder migrations

* serdes fixes

* correct api to remove metabot_model_entity_id

Handle root collection

* fix mistake in merge

* Replace remaining missing metabot_model_entity_id

* Update generated baselines

* fix rollback sql syntax

* update api to support collections

* update serdes for collections in metabot entities

* fix precondition for loading metabots

* fix cleanup metabot table before list endpoint test

* fix whitespace

* fix serialization tests

* fixup! change migration version to 56

* fixup! remove remaining no-metabot tags

* fixup! super nit

* fixup! move api into new namespace

make /metabot API routes singular

* fixup! better combine routes
2025-05-30 17:43:59 +00:00
Romeo Van Snick
453eab244c Do not prevent cmd+enter from working when inputs are focused (#58630)
* Do not prevent cmd+enter from working when inputs are focussed

* Add repro for metabase#56905
2025-05-30 19:15:31 +02:00
Edward Paget
75ee0f5bc3 feat: add job factory to handle jobs with missing classes (#57151) 2025-05-30 12:14:45 -05:00
Eric Normand
7114b71dac Unskip test for fixed bug 46756 (#58722) 2025-05-30 16:50:18 +00:00
Timofey Kachalov
84cf0f564f Add Nextjs 14 Host Apps e2e tests (#58710) 2025-05-30 20:30:06 +04:00
Timofey Kachalov
5da40d53c5 Update typedoc version to 0.28.5 (#58645) 2025-05-30 20:15:09 +04:00
Phoomparin Mano
cdbd112bff feat(sdk): ability to specify preferred authentication method (#58641)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-05-30 23:05:59 +07:00
Oleksandr Yakushev
2baab9c7a0 More improvements to CLJS bundle size (#58702)
* cljs: Make currency definitions more compact

Useful for reducing CLJS bundle size.

* cljs: Use unquoted functions in metabase.lib.drill-thru

* cljs: Make var re-exporting leaner in CLJS
2025-05-30 19:04:35 +03:00
Brad Anderson
04035f1154 VIZ-327 Updates styling and text for cryptic "unknown map" error message (#58540) 2025-05-30 11:25:28 -04:00
Jeff Bruemmer
9c615e79f0 sentence case (#58681) 2025-05-30 10:50:04 -04:00
Sloan Sparger
e945330f2f [HOTFIX] Metabot requests causing interactive embedding to improperly redirect (#58687)
* prevent Metabot from making a request for suggested prompts if no user is logged in to prevent auth redirect

* this fix is better

* add code comment

* reference PR in code comment

* revert unneeded change
2025-05-30 09:06:22 -05:00
Alexander Polyankin
efab244107 Fix implicit joins for cards (#58551) 2025-05-30 09:43:30 -04:00
Ryan Laurie
408848d793 Rework Ldap auth form (#57716) 2025-05-30 05:45:12 -06:00
Timofey Kachalov
0cc545526b Update SDK JWT auth docs (#58692) 2025-05-30 14:00:04 +04:00
Uladzimir Havenchyk
e4ec734dca ci: use eslint caching (#58521)
* ci: use eslint caching

* improve caching
2025-05-30 07:45:01 +00:00
Anton Kulyk
3a3db243a7 Port "add series" modal e2e tests for visualizer (#58376)
* Fix sharing e2e test

* Simplify `shouldSplitVisualizerSeries` check

* Handle empty/erroring datasets

* Use card names for series names

* Port e2e tests

* Don't use entity IDs

* Unskip test

* Include metrics and models in data importer search

* Return result_metadata for metrics and datasets

* Fix drillthrough test

* Update comment

* Bring back removed metric tests

* Remove reundant test

* include result_metadata in recents api request

* Fix e2e test

* Fix typo

Co-authored-by: Sébastien <sebastien@metabase.com>

* Fix e2e test

* fix be test

* Fix e2e tests

* Update src/metabase/activity_feed/models/recent_views.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-05-29 14:44:33 -07:00
Cam Saul
fef2ff25bd [BE Modularization] Remove server dep on driver (DEV-559) (#58548) 2025-05-29 21:13:43 +00:00
Cam Saul
5e7d24290e Mega App DB memory usage improvements (#58664)
* Mega App DB memory usage improvements

* Add a test

* Minor comment formatting

* Fix test name

* This test can be ^:parallel

* Actually no it can not

* Fix test name
2025-05-29 21:12:47 +00:00
Cam Saul
42053fe15e Don't create mega queries when deleting databases (#58491) (#58535)
* Don't create mega queries when deleting databases (#58491)

* Improved fix

* Don't require new migrations to have preconditions (this is bad)

* Remove test

* Revert migrations

* Manually set Field.parent_id = NULL for all Fields in a Database when deleting a Database

* Tweak query for MySQL

* Yet another fix 🔧

* `IS NULL` => `IS NOT NULL`

* Give up on trying to find a nice fix

* MySQL fix

* MySQL fix (for real)
2025-05-29 14:01:14 -07:00
Timofey Kachalov
93b76e1876 Add the SDK Host Apps e2e tests (#58486) 2025-05-30 00:30:22 +04:00
Jeff Bruemmer
cf79da01cc docs - boolean filter (#58678)
* george boole

* image

* auto-apply filters
2025-05-29 16:09:31 -04:00
Nathan Voxland
2a05b062ba Improve error handling in gsheets integration (#58439)
* Improve error UI for gsheets (#58594)

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-05-29 15:01:57 -05:00
Edward Paget
5453388b07 fix: data perms test to set schemas for tables (#58671) 2025-05-29 19:47:22 +00:00
metamben
6bd7abb277 Generate valid multi arg string filters in parameter chaining (#58646)
Fixes #57287
2025-05-29 22:44:04 +03:00
Uladzimir Havenchyk
633a75f2c3 feat: move native query sidebar icons to the header (#58501)
* feat: move native query sidebar icons to the header

* fix unit test

* fix tests

* cleanup

* fix svg icon

* align items to the top

* rename action-editor-sidebar to action-editor-action-buttons

* address review

* fix styles

* fix styles

* review
2025-05-29 22:26:08 +03:00
Nick Fitzpatrick
1677e13e89 Surface Group API error messages, update components (#58494)
* surface API error messages, update components

* use <ConfirmModal>
2025-05-29 23:45:31 +05:30
Ryan Laurie
8969a6d7d1 Fix fail-y downloads tests (#58652)
* fix fail-y downloads tests

* stabilize flake
2025-05-29 12:04:33 -06:00
Nemanja Glumac
03a847cc29 Delete withBackground HoC (#58634) 2025-05-29 19:12:42 +02:00
Ryan Laurie
2f86808554 Don't Require tech-writer review for developers guide docs (#58658)
adding a diretory without an owner after a parent directory with an owner should exclude it from code ownership
2025-05-29 16:29:22 +00:00
Phoomparin Mano
38f130358c Add embed options for templates to new iframe embedding (#58338) 2025-05-29 23:24:33 +07:00
Edward Paget
229118d0bf fix: audit-db adjust source check for lower case (#58605) 2025-05-29 16:13:30 +00:00
Mahatthana (Kelvin) Nomsawadi
cd1d74091c Fix SDK cross version tests getting version number from other prerelease labels (#58637)
* Fix SDK cross version tests getting version number from other prerelease labels

* Update code from #58638

* Remove unnecessary console.log

* Simplify code even moarrrrrrr
2025-05-29 16:13:44 +01:00
Ryan Laurie
e2f9a61753 fix auto-approve (#58642) 2025-05-29 07:25:41 -06:00
github-actions[bot]
1139fcded8 Update translations 2025-05-28 (#58558)
* Update translation sources 2025-05-28

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-05-29 13:25:05 +00:00
Ryan Laurie
b8b6d610a7 Update adminAppState mock to remove isNoticeEnabled (#58633) 2025-05-29 12:58:52 +00:00
John Swanson
8a3919c960 Don't show schemas for destination databases (#58409) 2025-05-29 05:49:17 -07:00
Phoomparin Mano
899ff2ef2e ci(sdk): bump package.json to 0.56.0-nightly (#58625) 2025-05-29 17:22:07 +07:00
Phoomparin Mano
f70ff1d987 ci(sdk): add release-x.55.x branch to release workflow (#58622) 2025-05-29 17:19:08 +07:00
metamben
bcb23015d4 Disallow aggregation expressions in plain expressions (#58608)
* Disallow aggregation expressions in plain expressions

Closes #41344.
2025-05-29 10:02:02 +00:00
Timofey Kachalov
062f726061 Fix nextjs dependency (#58584) 2025-05-29 11:39:53 +04:00
Oleksandr Solovyov
5742fe8faa version-helpers: update new version requirements (#58561) 2025-05-29 07:12:19 +00:00
Nemanja Glumac
ef8402cf26 Delete unused RestfulRequest class (#58598) 2025-05-28 22:40:45 +00:00
Edward Paget
07851c4331 fix: set download-results to no on table block (#58597)
* fix: set download-results to no on table block

When a view-data permission for a table is set to blocked set the
create-queries and download-results permissions to no. Also includes a
migration script read to backport to v52 to update databases to be
consistent with this change

* fixup! remove precondition

* fixup! join in update to work on mysql

* fixup! separate migrations on mysql/postgres

* fixup! test order
2025-05-28 21:50:06 +00:00
Jacob Joseph
494462a397 Update saml-google.md (#58602)
Added docs about synchronize group membership specific to Google SAML config
2025-05-28 19:59:57 +00:00
Timofey Kachalov
a52a292ff4 Adjust internal types leaking message (#58537) 2025-05-28 23:38:54 +04:00
Ryan Laurie
02771d878a Optimize version info fetching (#58000)
* optimize version info fetching

* fix type
2025-05-28 13:33:07 -06:00
Riley Thompson
9b755aab80 Add text comparison support for ClickHouse UUIDs (#58576)
* allow rerunning clickhouse field filter test

* add proper uuid support for clickhouse

* require left-join feature for join test

* cleanup
2025-05-28 15:03:43 -04:00
Timofey Kachalov
72975d11c4 Export UserBackendJwtResponse from SDK (#58589) 2025-05-28 13:01:35 -06:00
github-automation-metabase
814e5a95da Bump ring/ring-mock from 0.4.0 to 0.6.1 (#57315)
Inspect dependency changes here: https://github.com/ring-clojure/ring-mock/compare/0.4.0...0.6.1

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-28 17:52:14 +00:00
github-automation-metabase
207977e9cd Bump io.github.tonsky/clj-reload from 0.9.6 to 0.9.7 (#58465)
Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 17:49:56 +00:00
Case Nelson
58a480de68 fix: sqlserver properly convey ssh-tunnel details to connection-pool cache (#58309)
* fix: drivers properly convey ssh-tunnel details to connection-pool cache
2025-05-28 11:20:22 -06:00
github-automation-metabase
a3b8bc0136 Bump io.github.camsaul/toucan2 from 1.0.564 to 1.0.565 (#58464)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 16:55:06 +00:00
github-automation-metabase
030b3f2168 Bump com.github.steffan-westcott/clj-otel-api from 0.2.7 to 0.2.8 (#58463)
Inspect dependency changes here: https://github.com/steffan-westcott/clj-otel/blob/0.2.8/CHANGELOG.adoc

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 16:38:36 +00:00
github-automation-metabase
77288ad23d Bump thheller/shadow-cljs from 3.1.1 to 3.1.4 (#58466)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 16:37:11 +00:00
github-automation-metabase
859997583f Bump com.google.cloud/google-cloud-bigquery from 2.50.0 to 2.50.1 (#58467)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.50.1/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 16:37:00 +00:00
Sébastien
d254909d96 Closes VIZ-977 backstack when replacing a dataset in visualizer (#57952)
* closes VIZ-977 backstack when replacing a dataset

* closes VIZ-990 self-collapsing data sources

* e2e

* Remove WIP file

* Fix e2e test

---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2025-05-28 16:42:28 +01:00
Ryan Laurie
ac3ea294c7 build colspan into table component (#58325) 2025-05-28 09:30:39 -06:00
metamben
6cef8aea56 Add data loading options for metric, report, and table details (#58542) 2025-05-28 18:20:13 +03:00
Raphael Krut-Landau
f5185c6298 Simplify models/metrics filter (#58382) 2025-05-28 09:44:22 -04:00
Anton Kulyk
1d497cd54a Fix additional tooltip columns for charts opened in visualizer (#58519)
* Update column references in `graph.tooltip_columns`

* Update fn name
2025-05-28 13:22:20 +00:00
Sébastien
afa64803aa Closes VIZ-1034: can't click through to source question for cards with an empty title (#58472)
* wip

* e2e

* fixed wrong rebase

* fixed e2e

* type

---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2025-05-28 14:21:21 +01:00
Raphael Krut-Landau
57c718c5e3 Center radio label wrappers, vertically (#58389) 2025-05-28 09:20:00 -04:00
Anton Kulyk
7184480fc0 Fix flaky visualizer test (#58563)
* Fix flaky visualizer test

* Switch to UI assertions
2025-05-28 13:51:28 +01:00
Nicola Mometto
eb8eefe50b Sem 258 identifier case sensitivity (#58515)
* be case-sensitive during sync

* add SEM-258 test

* extract to top-level fn with docstring
2025-05-28 11:28:10 +00:00
Jakub Chodorowicz
131ade90fb chore: add chodorowicz as a team member (#58555) 2025-05-28 12:08:17 +02:00
appleby
5ec56ea755 Fix underlying records drill for question with multiple breakouts on the same column (#58454)
* Add breakout->filterable-column and matching-filterable-column

* Call breakout->filterable-column in underlying records drill-filter

* Use matching-filterable-column util in prepare-query-for-drill-addition

* Add e2e test

* Remove unused lib.ref alias

* Review feedback: nested -> card-sourced

* Review feedback: DrillThrough -> DrillThru
2025-05-27 17:40:54 -07:00
Cam Saul
b3bf03986e [Backend modularization] query-permissions module (#58543)
* [Backend modularization] `query-permissions` module

* PR feedback
2025-05-28 00:00:21 +00:00
Cam Saul
d8af6c3ff8 [Backend modularization] prune api deps (#58384)
* [Backend modularization] prune `api` deps

* `indirect-deps`
2025-05-27 15:49:47 -06:00
Jeff Bruemmer
c79afd62fc Update impersonation.md (#58531)
* Update impersonation.md

* Update docs/permissions/impersonation.md
2025-05-27 16:47:53 -04:00
Oisin Coveney
98e1166ea0 fix(sdk): SAML + JWT + New Auth Flow (#56869)
Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-05-27 22:26:49 +02:00
Jeff Bruemmer
51174fce6b docs - updates for new menu (#58367) 2025-05-27 14:08:32 -04:00
bryan
fbb663d236 add docs_merge_detected workflow (#58529) 2025-05-27 11:53:41 -06:00
Phoomparin Mano
c1db8c5a6d New iframe embedding based on embedding SDK components (#58390)
* Setup sdk-based embedding iframe route (#56915)

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* restore routes.clj to fix merge conflicts

* Tests for new iframe embedding's script tag and route (#57269)

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* remove the safe-to-remove warning on rspack css ordering

* Rename embed.v1.js to embed.js for new iframe embedding (#58415)

* Revert "remove the safe-to-remove warning on rspack css ordering"

This reverts commit 4feae48604.

* Remove redundant sdk-ee-plugins import from the SDK in new iframe embedding (#58416)

* Ignore CSS import order warnings from new iframe embedding (#58417)

* Follow-up validation improvements for new iframe embedding (#58516)

* Explicitly disallow using API keys in production for new iframe embedding (#58520)

* fix wrong merge conflict - do not destructure H.cy in component tests

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-05-27 23:35:03 +07:00
Sébastien
252c1c0fce closes VIZ-1021 message for empty results (#58525) 2025-05-27 17:50:07 +02:00
metamben
da0be61b2e Render Metabot generated get-year filters friendlier in the FE (#58527) 2025-05-27 15:27:24 +00:00
metamben
4efe85990b Introduce fields controlling the data loaded by answer-sources (#58498)
* Introduce fields controlling the data loaded by answer-sources

Closes BOT-167
2025-05-27 18:05:58 +03:00
Stas Gavrylov
8cc4451ebc WRK-438: Update cron syntax explanation (#58518) 2025-05-27 18:00:51 +03:00
Alexander Polyankin
2b7a5352fb Fix implicit field refs for cases when the source-field is coming from a join (#52720) 2025-05-27 14:32:14 +00:00
Jeff Bruemmer
80fbc9f9ca docs - database routing (#58436) 2025-05-27 09:49:45 -04:00
Brad Anderson
b917700959 VIZ-976 Updates visualizer slice's undoable config so it prevents history items from being added when dropping an item has no effect on the rest of the visualizer state (#58424) 2025-05-27 09:43:19 -04:00
Riley Thompson
0931f01921 Add Clickhouse UUID cast implementation for native filtering (#58496)
* clickhouse replace uuid impl

* generate uuids in tests
2025-05-27 09:38:22 -04:00
Anton Kulyk
4e9f101cea Fix brush filter for visualizer charts (#58492)
* Fix brush filter for visualizer charts

* Fix typo

Co-authored-by: Sébastien <sebastien@metabase.com>

---------

Co-authored-by: Sébastien <sebastien@metabase.com>
2025-05-27 14:37:16 +01:00
Edward Paget
18776a687a chore: bump oktokit in release tooling (#58431) 2025-05-27 08:06:50 -05:00
Mahatthana (Kelvin) Nomsawadi
ced4a5ec3d Fix static question embed download when parameters have multiple values (#58423)
* Fix static question embed download when parameters have multiple values

* Simplify type

* Don't wanna deal with outdated query builder types 🤷

* Use a proper value when asserting
2025-05-27 06:42:28 +01:00
Ngoc Khuat
e0f5809a74 Fix Viz settings of 2 questions with the same query on dashboard subsciprionts (#58471) 2025-05-27 01:57:46 +00:00
Alexander Polyankin
a6da2249c0 Remove force-broken-id-refs (#58489) 2025-05-26 22:35:32 +00:00
William
72e14e3ea2 nest-query explicitly adds all fields to the query (#58331)
Before, nest-query relied on the preprocessor (specifically, the add-implicit-clauses middleware) to add all possible
fields to the newly created inner query (and then removes unnecessary fields later).  However, add-implicit-fields
ignores fields with a parent id.  The main user of parent-id is mongo, and mongo doesn't use nest-query, so this
usually isn't an issue.  However, bigquery also uses parent-id, and bigquery is a sql driver that uses nest-query.  As
a result, nest-query wasn't adding bigquery struct member fields to the inner query, which caused some queries to
break.  Now, nest-query explicitly finds all non-sensitive/retired fields (including fields with parent ids) and
ensures that they are in the inner query.
2025-05-26 22:34:41 +00:00
Cam Saul
746e8174bc [Backend modularization] Remove util deps on lib and legacy-mbql (#58379)
* [Backend modularization] Remove `util` deps on `lib` and `legacy-mbql`

* Don't reference unloaded schema

* Test fixes 🔧

* Test fixes 🔧

* cljfmt
2025-05-26 23:10:12 +03:00
Sébastien
d5a0699e61 closes VIZ-1035 silent error when converting certain models to viz cards (#58484) 2025-05-26 18:50:48 +02:00
Alexander Polyankin
fcf51ffefd Show loader every time the generated sql is fetched (#58488) 2025-05-26 16:32:37 +00:00
Riley Thompson
8367dd30a2 Connection impersonation for MySQL & SQLServer (#57622) 2025-05-26 12:18:26 -04:00
Raphael Krut-Landau
eb1de2371e Do science without yelling (#58404) 2025-05-26 11:56:15 -04:00
Mahatthana (Kelvin) Nomsawadi
fbbf273218 repurpose entityTypeFilter as entityTypes for new embedding data pickers for the SDK (#58208)
* used `entityTypeFilter` for new embedding data pickers

* Rename `entityTypeFilter` to be consistent with `entity_types`

* Migrate `entity_types` to a new reducer

* Add E2E test

* remove unused prop

* Fix interactive embedding's `entity_types`

* Fix unit tests
2025-05-26 15:43:12 +01:00
Romeo Van Snick
b1852e2d43 Avoid doing quadratic search in FkTargetPicker (#58434)
* Avoid using quadratic search in FkTargetPicker

* Reduce further parsing and stringification

* Avoid calling JSON.parse in FkTargetPicker

* Assert fieldId

* Rename getters to be more clear
2025-05-26 19:59:58 +07:00
Nick Fitzpatrick
b3f4fd20d8 Use user locale setting if available for lang prop in <html> (#58221)
* use user locale setting if available for lang prop in <html>

* add a test

* fix my broken test

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-05-26 17:54:24 +05:30
Anton Kulyk
63428a43e2 Visualizer: fix scalars being compatible nearly everywhere (#58399)
* Fix scalars being compatible nearly everywhere

* Fix type error
2025-05-26 12:57:31 +01:00
Anton Kulyk
b7de348186 Visualizer: pies, funnels, gauge polish (#58437)
* Fix underlying question menu for pie charts

* Fix opening gauge, fix titles for scalar cards
2025-05-26 12:43:34 +01:00
Nick Fitzpatrick
f142a1dc75 Remove edit permissions from other users personal collections (#58281) 2025-05-26 17:09:50 +05:30
Nemanja Glumac
86350c8a04 Add transient "Getting started" section to the main sidebar (#58332) 2025-05-26 12:20:09 +02:00
Sébastien
ff3d1141cd Closes VIZ-994 snowplow tracking for visualizer (#58274)
* added simple tracking

* .

* added more events

* prefix

* e2e tests

* flaky flaky, eggs and baky

* ...
2025-05-26 10:50:45 +02:00
Jeff Bruemmer
4b11a8aaec docs - entry for datetime function in expression list (#58450)
* entry for datetime function in expression list

* edit

* fix typos
2025-05-23 22:54:35 +00:00
Eric Normand
aebd8322ea Correct datetime() helper text. (#58456) 2025-05-23 22:16:32 +00:00
Riley Thompson
0125b77c3d Add bigquery user agent (#58410) 2025-05-23 21:40:14 +00:00
Tyler Plude
965d41f3ff array-map for json export to preserve order (#58451)
* array-map for json export to preserve order

* fix indents

* add comment
2025-05-23 14:34:20 -07:00
Kyle Doherty
51c758988e clean up settings menu (#58365)
* use mantine menu and reorganize options

* remove comments

* fix unit tests

* e2e test fixes, replace "a" with ForwardRefLink to fix sidebar not getting closed

* fix external links

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2025-05-23 17:19:42 -04:00
Tyler Plude
ea48474bcf Convert BigDecimals to double for color getter JS bundle (#58263)
* Convert bigdecimals in table static viz

* unit test; support for bigint conversion
2025-05-23 13:54:38 -07:00
Alexander Polyankin
3d3f52c6f1 Prompt in generated SQL + first comment as a prompt + limit to SQL (#58265)
* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Tests

* Tests

* Tests

* Tests

* Tests
2025-05-23 16:37:52 -04:00
Aleksandr Lesnenko
eaea377420 add pivot xlsx export hint (#58313)
* add pivot xlsx export hint

* safer not to change global checkbox style

* lint
2025-05-24 02:42:05 +07:00
Noah Moss
85bd509d40 url-encode parameters substituted into link and iframe cards (#58429) 2025-05-23 15:29:41 -04:00
Noah Moss
0b53dc2477 Fix column alignment for fully-collapsed pivot exports (#58372)
* Fix fully collapsed pivot exports

* Fix tests, fix unrelated typo
2025-05-23 15:15:17 -04:00
metamben
69703938b3 Add field-values endpoint (#58403) 2025-05-23 22:10:28 +03:00
metamben
1bac602009 Make string matching functions case insensitive (#58427)
Closes BOT-121
2025-05-23 22:10:16 +03:00
Edward Paget
906313b8e0 fix: audit db not working after import form h2 (#58374)
* fix: audit db not working after import form h2

Removes conditions from the `adjust-audit-db-to-source!` function so we
make sure we always restoring the audit db tables to their original form
regardless of what type of app-db is used.

* fixup! test setting up db triggers

* fixup! cljfmt
2025-05-23 18:45:20 +00:00
Timofey Kachalov
4694ac7ce9 Run sample app tests for both prod and dev bundles (#58421) 2025-05-23 19:57:21 +04:00
Nicolò Pretto
295cfce315 remove support for the already deprecated hide_download_button hash parameter (#58401)
* remove support for #hide_download_button

* clean up code 🧹

* adds link to the docs

* use the same style we use in the sdk
2025-05-23 17:27:16 +02:00
Nathan Voxland
16d8f21bbd Improved search metrics (#57797) 2025-05-23 09:29:55 -05:00
Phoomparin Mano
d40df5ea08 fix(sdk): fix tooltip crash by migrating away from renderToString (#58394) 2025-05-23 20:46:34 +07:00
Nicolò Pretto
a1acddd7d6 cross versions tests: skip @OSS tests and use prod build for the FE (#58277)
run breaking changes tests on multiple runners

TO BE REVERTED BEFORE MERGING

force production fe build

build-release as setting node_env fucks up everything

exclude @OSS tests

Revert "TO BE REVERTED BEFORE MERGING"

This reverts commit c907a2f492.
2025-05-23 14:38:15 +02:00
Nick Fitzpatrick
43d10c8787 Questions in usage analytics should never show native preview panel (#58229)
* Add additional check on rendering native preview panel

* adding e2e test

* adjusting e2e test

* do not show native panel when no data is selected

* move e2e test to instance analytics suite
2025-05-23 17:13:01 +05:30
Chris Truter
b9fe632080 Add Text/Description back to public field-types docs (#58273) 2025-05-23 13:04:00 +02:00
Anton Kulyk
1e8153a5e0 Use computed settings in visualizer redux actions (#58237)
* Fix some columns added twice

* Use computed viz settings in visualizer actions

* Fix pie chart tests

* Fix removing dimensions in multi series charts

* Handle null metrics and dimensions

* Fix funnel e2e tests

* Fix funnel unit tests

* Fix appending multiple columns

* Fix cartesian unit tests

* Add repro test

* Remove comments

* Add comments
2025-05-23 11:39:42 +01:00
Mahatthana (Kelvin) Nomsawadi
b1bcf32406 Set sensible default data picker step when joining (#58065)
* simplify embedding data picker code

* Show the data picker step based on starting query source

* Set starting model collection ID when joining a model

* Improve initial collection loading UX

* Fix failed unit tests and types

* Fix failed E2E tests

* remove unused var

* Fix sometimes the starting collection is incorrect

* Add an E2E test

* Add a comment to clarify

* Clarify a new prop
2025-05-23 11:38:08 +01:00
Sébastien
5a638013b4 Closes VIZ-646 -> simplify the "empty state" CTAs in visualizer (#57957)
* closes VIZ-646 no dataset CTAs

* better UI

* fixed e2e tests
2025-05-23 11:11:03 +02:00
Timofey Kachalov
5a11a8d3e8 sdk(docs): Remove remarks from SdkDashboardDisplayProps type annotations (#58368) 2025-05-23 11:52:29 +04:00
Fraser
216b1b790c Create LocalizationSettingsPage (#57368)
* Create LocalizationSettingsPage
2025-05-23 14:33:34 +12:00
Edward Paget
f647173e41 Disable quartz metrics trigger listener (#58244) 2025-05-22 20:49:39 -05:00
Cam Saul
fd969ed8d1 [Backend modularization] Move all settings to .settings namespaces (#58327)
* Remove unneeded `GET /api/util/openapi` endpoint

* [Backend modularization] Move all settings to `.settings` namespaces

* Fix stuff up

* Test fixes 🔧

* cljfmt
2025-05-22 17:56:16 -06:00
Brad Anderson
d5cb296f50 Closes VIZ-329 -> Applying formatting updates is unintuitive happens on scroll (#58252)
* VIZ-329 Updates ChartSettingInput and ChartSettingInputNumeric to apply changes when the user pauses typing in addition to on blur

* VIZ-329 Removes now-redundant blur handler in ChartSettingInputNumeric and updates unit tests
2025-05-22 17:16:22 -04:00
Cam Saul
d7a44a0b81 Remove unneeded GET /api/util/openapi endpoint (#58323)
* Remove unneeded `GET /api/util/openapi` endpoint

* Fixes
2025-05-22 19:34:35 +00:00
Aleksandr Lesnenko
4ef802769e use original series settings visibility in visualizer (#58243)
* use original series settings visibility in visualizer

* hide settings for hidden series, add a spec

* shallow clone
2025-05-23 02:13:42 +07:00
Aleksandr Lesnenko
d96b5a512f Makes visualizer entities use numeric card.ids in viz settings (#58295)
* Revert "fix serialization for visualizer entities (#57467)"

This reverts commit d56e791077.

* drop columns from test data

* fix types, tests

* Revert "[VISUALIZER] Fixing dashboard duplication for visualizer cards (#58106)"

This reverts commit 6cf7606754.

* keep preferred true?

* serdes transformation support for visualizer settings

* Update entity ids in visualizer dashcards on DB read to be card ids

* unit test for the serdes transformations

* cljkondo

* fix on-read to only run if viz settings exists

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2025-05-22 11:55:32 -07:00
Cam Saul
cefe3d4c0b [BE modularization] Eliminate permissions dep on server, server dep on users (#58312)
* [Backend modularization] Eliminate `permissions` dep on `server`, `server` dep on `users`

* Move `user/permissions-set` => `perms/user-permissions-set`

* Fix something else

* Cleanup

* Fix Kondo warnings

* Fix Kondo

* Revert parallelizing Kondo

* Fix the stuff
2025-05-22 18:19:07 +00:00
Nicola Mometto
4565e1ce54 Disable distribution drill if binning is not available (#58356)
* disable distribution drill if binning is not supported

* add unit test
2025-05-22 18:40:33 +01:00
Cam Saul
cc3b0ceecb [Backend modularization] batch-processing module (#58330) 2025-05-22 10:32:24 -07:00
Eric Normand
22502a99dc Implement the datetime(string) custom expression function (#58048)
* Empty

* Add schema for datetime()

* Add datetime() function; works on iso strings

* Implement datetime() for sql to test all drivers

* Remove Z from datetime

* Change the format of the datetime string in tests

* Be more lenient on types

* have multiple formats for the test

* Implement datetime() for mongo

* Use ISO string in test

* Datetime for string with no mode

* Add changelog entry for :expressions/datetime

* Add docs for datetime

* Add e2e tests for datetime

* Update e2e test and datetime text

* Fix :expressions/datetime feature

* Remove reference to iso

* Remove unused schema

* Fix frontend test

* Use multiple arities for datetime()

* Replace T with ' ' in databases that don't like T in datetime timestamps

* Try removing visibility requirement in test

* Fix brittle test

* Test dates with space and with T

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-05-22 11:26:40 -05:00
Kyle Doherty
7bbc501191 add text to help with swap affordance (#58311) 2025-05-22 11:42:52 -04:00
Alexander Polyankin
7b66df806b Fix dashboard crashing when there is invalid stage-number in parameter targets (#58296) 2025-05-22 11:40:36 -04:00
Maz Ameli
f4abe9a703 Standardize form input font size to md (14px) and improve spacing (#58258)
* make form inputs use md font size, and add spacing

* remove redundant classes, tweak spacing
2025-05-22 15:38:19 +00:00
Edward Paget
0555261a6e fix: drop execution time quartz job metric (#58351) 2025-05-22 09:59:34 -05:00
metamben
3eaca42bd5 Call AI service endpoints without trailing slashes (#58348) 2025-05-22 14:29:15 +00:00
Sébastien
af14a4ef81 Closes VIZ-989 double scrollbars on tabular view (#58345)
* closes VIZ-989 double scrollbars on tabular view

* .
2025-05-22 16:04:57 +02:00
Phoomparin Mano
5ee122bd43 Show "Use instance font" in default dropdown in static embed (#58335) 2025-05-22 21:03:28 +07:00
Romeo Van Snick
02a5a4d511 Render bucketing popover in portal (#58170)
* Render popover in portal

* Revert withinPortal change

* WIP

* Move overflow onto child container

* Move fix to css-only

* Remove fixed strategy

* Fix e2e tests

* Reduce diff
2025-05-22 15:39:52 +02:00
Phoomparin Mano
608bb8c1c4 feat(sdk): remove question and metric from entity type filters in the sdk's data picker (#58339) 2025-05-22 20:06:47 +07:00
Nicolò Pretto
f1843ef47f run breaking changes tests on multiple runners (#58092) 2025-05-22 13:18:50 +02:00
metamben
1061de72ca Handle decoding of nil (unknown) field type (#58318) 2025-05-22 06:17:03 +00:00
Cam Saul
43f5033b5f [Backend modularization] eliminate api dependency on server (#58317)
* [Backend modularization] eliminate `api` dependency on `server`

* Fix moved var
2025-05-22 01:39:04 +00:00
Cam Saul
4bb81a7927 [Backend modularization] Decouple app-db and util from driver (#58249)
* [Backend modularization] Decouple `app-db` and `util` from `driver`

* Fixx

* Test fix 🔧

* Move query cancelation checking logic for app DB types into `app-db`

* Fix

* Appease Kondo
2025-05-21 21:33:27 +00:00
Cam Saul
e8559895a3 [Backend modularization] eliminate api dep on embedding (#58310) 2025-05-21 21:07:31 +00:00
Edward Paget
c162d0983d fix: explicitly mark when fields are gtapped (#58113)
* fix: explicitly mark when fields are gtapped

* add debug

* fixup! tests setup to set advanced feature

* fixup! strip any user-added gtapped-tables keys

* fix a bad import
2025-05-21 16:04:45 -05:00
Nemanja Glumac
e8faba9fe8 Refactor browse navigation section (#58279)
* Refactor `browse` navigation section

- Removes the dependency on the `CollapseSection` custom component
- Prepares the section for the "Add Data" project

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2025-05-21 20:42:21 +00:00
Cam Saul
c82a945223 [Backend modularization] Eliminate util dependency on channel and parameters (#58302) 2025-05-21 14:14:28 -06:00
Cam Saul
90161de265 [Backend modularization] logger cleanup; decouple api from logger (#58251)
* [Backend modularization] `logger` cleanup; decouple `api` from `logger`

* Test fixes 🔧
2025-05-21 14:11:23 -06:00
Cam Saul
f9e730f12d Misc backend modules tooling improvements (#58298) 2025-05-21 14:10:57 -06:00
Alexander Polyankin
302d1295a5 Do not create targets with nil field refs (#58299) 2025-05-21 20:00:41 +00:00
Edward Paget
b81d0f94e9 fix: appdb table permssions search slowdown (#58294)
Use a correlated subquery to make sure we hit the pk index

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-05-21 18:59:12 +00:00
dpsutton
ab3f39a82b Log view count information (#58259)
BEFORE:
```
2025-05-20 22:24:17,586 DEBUG middleware.log :: POST /api/dashboard/pivot/1/dashcard/12/card/10/query 202 [ASYNC: completed] 634ms (81 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (132 total active threads) Queries in flight: 1 (0 queued); h2 DB 1 connections: 0/7 (0 threads blocked) {:metabase-user-id 1}
2025-05-20 22:24:25,629 DEBUG events.view-log :: Increment view counts of 24 items
```

AFTER:

```
2025-05-20 22:24:17,586 DEBUG middleware.log :: POST /api/dashboard/pivot/1/dashcard/12/card/10/query 202 [ASYNC: completed] 634ms (81 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (132 total active threads) Queries in flight: 1 (0 queued); h2 DB 1 connections: 0/7 (0 threads blocked) {:metabase-user-id 1}
2025-05-20 22:24:25,629 DEBUG events.view-log :: Increment view counts of 24 items
2025-05-20 22:24:25,638 DEBUG events.view-log :: Writing 3 items to :model/Dashboard with lock :metabase.events.view_log/report_dashboard-view-count
2025-05-20 22:24:25,654 DEBUG events.view-log :: Writing 21 items to :model/Card with lock :metabase.util.cluster-lock/statistics-lock
2025-05-20 22:24:27,649 WARN models.card :: Best-effort backfill of :entity_id failed for Card null
2025-05-20 22:24:27,656 WARN models.card :: Best-effort backfill of :entity_id failed for Card null
2025-05-20 22:24:27,660 WARN models.card :: Best-effort backfill of :entity_id failed for Card null
```
2025-05-21 13:36:51 -05:00
Sébastien
3c8ca416f1 Closes VIZ-984 provide a clearer entrypoint to the underlying question in viz cards (#58228)
* added an ... submenu to open questions

* fix

* menu is now in the title

* addressed feedback

* reverted submenu change

* added title menu items to funnel

* added e2e test

* added chevron

* unit test fix
2025-05-21 19:18:42 +02:00
Cam Saul
de55ea6c3e [Backend modularization] Eliminate util dep on dashboards (#58250) 2025-05-21 10:28:41 -06:00
Sloan Sparger
5462e2fb61 [Metabot] Sidebar UI (#58059)
* remove auto-close logic

* add metabot icon to searchbar, clicking icon opens metabot instead of search

* make chat ui appear in the sidebar

* add header section to the chat sidebar

* progress on conversation ui

* few tiny additions

* fetch mock suggested prompts from an endpoint, animate thinking text, fix search button touch target size, do no clear chat history when closing the chat sidebar

* messages rendered as markdown

* restyles

* more restyles

* fix input autofocus

* impl empty state, remove more textarea code

* hide copy button actions

* handle user aborted requests better

* design iteration

* latest design feedback, better auto-scrolling, better markdown rendering

* fix types

* increase unit test coverage

* impl long convo calc, add unit tests, fix focus issue if clicking the metabot option from the command palette

* move code to enterprise folder, fix some e2e, adjust header alignment, fix some types

* small clean ups, fix failing tests and erroring types

* add unit test and fix selector for getting latest agent messages by type

* review feedback, turn on an e2e test again

* try getting metabot e2e working

* fix embedding sdk

* impl pr feedback
2025-05-21 11:23:08 -05:00
Edward Paget
d6acba4756 fix: split snyk scans (#58290)
Fits them under githubs 20 runs per sarif file limit
2025-05-21 16:05:57 +00:00
Romeo Van Snick
f7e14433ef Update toast design (#58145)
* Make default toast color darker

* Avoid remounting the UndoList on overy toast change

* Tweak the undo animation to come in from the left

* Move more undo state into UndoListingOverlay

* Reverse toast order

* Manually manage undo target

* Remove unused props

* Store pause state in undo itself

* Use react-transition-group to render toast notifications

* Measure height so we can animate toast position

* Use css transforms only and avoid animating bottom

* Mock react-transition-group in test

* Unmount elements on exit

* Wait for animation in test

* Make toast ref optional

* Clean up transition

* Fix e2e test

* Disable transition group in cypress

* Add check_filled icon

* Default to check_filled

* Add text-secondary-inverse

* Use text-secondary-inverse color for icon on tooltip

* Remove min-width from toast

* Control the animation state of the todo's after moving the portal

* Fix icon in unit tests

* Simplify undo hooks

* Avoid overwriting state

* Add missing import

* Allow transitioning new todos even when not moving the portal

* Fix e2e test

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-05-21 15:29:54 +02:00
Uladzimir Havenchyk
8f4cda8597 feat: update metabot icon and placeholder text (#58253)
* feat: update metabot icon and placeholder text

* add tests
2025-05-21 11:48:44 +00:00
Nicola Mometto
56f420c38d Fix race condition in sync, causing failure if a table gets deleted inbetween steps (#58217)
* fix typo

* don't error out during fields-metadata fallback if table is known to not exist

* table known to not exist impl for drivers

* add test

* add debug log

* add to changelog

* address review comments
2025-05-21 12:43:46 +01:00
Roman Pittner
1ff83fcb70 Swapped out the <StepTitle/> for default <Title/> in CompletedStep.tsx
Visual change. Updated the title in CompletedStep.tsx with the actual <Title/> component so that the styling is unified with the rest of the app.
2025-05-21 13:05:11 +02:00
Nemanja Glumac
dfbebdfce3 Branding email subscriptions (#58096)
This commit adds the conditional branding to dashboard email subscriptions and to question alerts. It does so by altering the handlebars templates we use for each, respectively. It follows the same logic as the rest of the PRs from this project. If a token has a whitelabel feature flag (Pro/Enterprise), the branding is not shown. It should be shown for OSS and for Starter plans.

* Add branding content to dashboard subscriptions

* Add branding content to alerts
2025-05-21 12:59:27 +02:00
Nick Fitzpatrick
ec224e251e Exclude parent from recents and search when moving items (#58181)
* Do not show entity parent in recents or search when moving entities

* e2e tests

* adjusting e2e test
2025-05-21 15:42:20 +05:30
Aleksandr Lesnenko
e73e604d4c fix narrow columns widths in dashcards (#57873)
* expand columns to minGridWidth

* specs, flakiness

* refactor measuring code, reduce flakiness

* fix types

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-05-21 15:56:39 +07:00
Phoomparin Mano
cf6a83436c Restore embed signal fallback when in embedding (#58240) 2025-05-21 15:30:48 +07:00
Chris Truter
17e8ae6b28 Un-deprecate Text/Description semantic type (#58235) 2025-05-21 10:18:18 +02:00
Nick Fitzpatrick
023f079151 API key creation modal alawys shows error after selecting group (#58210)
* fixing FormGroupWidget error prop

* update unit test
2025-05-21 12:28:14 +05:30
Raphael Krut-Landau
0e5e5cd2c5 Add script to facilitate translation backports (#58189) 2025-05-20 22:19:55 -04:00
Cam Saul
8749431e5d [Backend modularization] Move some legacy stuff to .core namespaces (#58185)
* [Backend modularization] Move some legacy stuff to `.core` namespaces

* Kondo linter and rename `metabase.http-client` => `metabase.test.http-client`

* metabase.cloverage-runner => metabase.test.cloverage-runner

* `metabase.types` => `metabase.types.core`

* cljfmt / Kondo

* Fix ns name

* Fix type names

* Add `NumericWrapper?` and `TextWrapper?` helpers

* cljfmt

* `metabase.cmd` => `metabase.cmd.core` (part 2)

* Test fixes 🔧
2025-05-20 22:01:32 +00:00
Alexander Polyankin
f15681fc90 Remove field ident calculation (#58246) 2025-05-20 21:48:05 +00:00
Alex Yarosh
09fff2ff41 docs: make sure the code renders (#58205)
* Update funnel.md

* don't need to escape apparently
2025-05-20 17:27:51 -04:00
Cam Saul
6d3d404d1d [Backend modularization] Move JVM metadata provider into lib-be (#58245)
* [Backend modularization] Move JVM metadata provider into `lib-be`

* Fix namespaces
2025-05-20 20:02:05 +00:00
Alexander Polyankin
605cabe101 Remove entity_id on databases, tables, fields (#58236) 2025-05-20 19:50:28 +00:00
Cam Saul
ee52f219dc [Backend modularization] Remove models dep on driver (#58203) 2025-05-20 18:54:05 +00:00
Cam Saul
ce3b11810c [Backend modularization] move metabase.dashboard-subscription-test (#58114)
* [Backend modularization] move `metabase.dashboard-subscription-test` (DEV-524)

* Fix
2025-05-20 18:28:37 +00:00
Cam Saul
6841c08ff7 [Backend modularization] events module deps pruning (#58202)
* [Backend modularization] `events` module deps pruning

* cljfmt
2025-05-20 18:10:23 +00:00
Noah Moss
f7f8f6b911 Ensure we buffer the output stream for CSV downloads (#58238) 2025-05-20 10:57:42 -07:00
Anton Kulyk
e1b1e18500 Unify visualizer compatibility checks + disable unusable columns (#57919) 2025-05-20 18:28:52 +01:00
Cam Saul
7f3a4a1463 [Backend modularization] metabase.api.dataset => metabase.query-processor.api (#58201)
* [Backend modularization] `metabase.api.dataset` => `metabase.query-processor.api`

* Update config

* Sort namespaces

* Fix Kondo warnings
2025-05-20 12:07:39 -05:00
bryan
3ecfbb74e1 Ues linear graphql api with exponential backoff (#58182) 2025-05-20 10:33:13 -06:00
Alexander Polyankin
84af10f4c0 Add unique metabase_table(db_id, schema, name) constraint (#58103)
* Add migration

* Add migration

* Add migration

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Deduplicate tables

* Deduplicate tables

* Deduplicate tables

* Fix tests

* (mt/with-temp-defaults :model/Database)

* (mt/with-temp-defaults :model/Database)

* Fixes

* Remove new column from results

* Remove new column from results

* Remove new column from results

* Remove new column from results

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* BackfillDatabaseEntityIds

* BackfillDatabaseEntityIds

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* Add a comment

* Add a comment

* Add a comment

* Add a comment
2025-05-20 11:44:00 -04:00
metamben
386693ede9 Make sure dashcard parameter mappings have valid targets (#58215)
Fixes #58214
2025-05-20 16:36:57 +03:00
Cam Saul
5578b587a5 [Backend modularization] metabase.db => metabase.app-db.core (#58200)
* Remove most outdated :consistent-alias specs

* `metabase.db` => `metabase.app-db.core`

* Kondo fixes 🔧
2025-05-20 05:36:14 -07:00
Phoomparin Mano
f5f8a13af9 fix(sdk): questions shows an error while loading on strict mode (#58183) 2025-05-20 18:26:39 +07:00
Christoph Deil
1d3e4d8cf6 Fix Python newline in code-templates.ts (#57350) 2025-05-20 12:22:09 +01:00
Timofey Kachalov
50678b84b7 Add sdk esbuild branch to the release process (#58211) 2025-05-20 14:06:04 +04:00
Timofey Kachalov
a6642444d6 feat(sdk): Do not bundle main-app plugins to the SDK bundle (#58028) 2025-05-20 12:23:11 +04:00
github-automation-metabase
f80ca9eb75 Bump org.eclipse.jetty/jetty-server from 12.0.20 to 12.0.21 (#58138)
* Bump org.eclipse.jetty/jetty-server from 12.0.20 to 12.0.21

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-20 00:28:52 +00:00
github-automation-metabase
f2b782b9d6 Bump djblue/portal from 0.59.0 to 0.59.1 (#57815)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.59.1/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-20 00:25:09 +00:00
github-automation-metabase
dba7e427b5 Bump com.github.seancorfield/honeysql from 2.7.1295 to 2.7.1310 (#58132)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1310/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-20 00:17:48 +00:00
github-automation-metabase
230de54068 Bump rewrite-clj/rewrite-clj from 1.1.49 to 1.2.50 (#58140)
Inspect dependency changes here: https://github.com/clj-commons/rewrite-clj/blob/v1.2.50/CHANGELOG.adoc

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-20 00:09:33 +00:00
github-automation-metabase
ab2d8b1120 Bump com.databricks/databricks-jdbc from 2.7.1 to 2.7.3 (#58143)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-19 23:47:26 +00:00
github-automation-metabase
8f2690e850 Bump io.github.clojure/tools.build from 0.10.8 to 0.10.9 (#58133)
Inspect dependency changes here: https://github.com/clojure/tools.build/blob/v0.10.9/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-19 23:39:08 +00:00
github-automation-metabase
afb0b91f02 Bump thheller/shadow-cljs from 3.0.5 to 3.1.1 (#58141)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-19 23:34:39 +00:00
Maz Ameli
96071d15ce auto-merge
* remove unused var

* use mantine radius

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-05-19 23:32:17 +00:00
github-automation-metabase
772ad84d24 Bump io.github.tonsky/clj-reload from 0.9.5 to 0.9.6 (#58134)
Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.6/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-19 23:29:38 +00:00
github-automation-metabase
799e6f90cd Bump com.clickhouse/clickhouse-jdbc from 0.8.5 to 0.8.6 (#58142)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-19 23:28:39 +00:00
Cam Saul
6c623919a1 [Backend modularization] add tests to make sure we have requires (#58196)
* [Backend modularization] add tests to make sure we have requires for `init` and `settings` namespaces

* cljfmt
2025-05-19 23:14:59 +00:00
github-automation-metabase
104f820b1b Bump methodical/methodical from 1.0.126 to 1.0.127 (#58135)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-19 23:12:55 +00:00
Cam Saul
067621099e [Backend modularization] metabase.models.dimension => warehouse-schema (#58191) 2025-05-19 22:12:19 +00:00
bryan
1662b32dee key prefixes must be unique, but they weren't (#58190) 2025-05-19 20:49:24 +00:00
Cam Saul
a952fb7e8e [Backend modularization] Move metabase.util.ssh into driver (#58187)
* [Backend modularization] `metabase.util.ssh` => `metabase.driver.sql-jdbc.connection.ssh-tunnel`

* Update changelog
2025-05-19 13:41:46 -07:00
Timofey Kachalov
263547ba24 Fix timeline event tooltip date text for SDK (#58122) 2025-05-20 00:36:30 +04:00
Cam Saul
b892464ed6 [Backend modularization] Move util/password_check into session (#58179)
* [Backend modularization] Move `util/password_check` into `session`

* PR feedback
2025-05-19 20:04:35 +00:00
Brad Anderson
5b0b40b8e5 chore: add bpander as a team member (#58176) 2025-05-19 15:24:01 -04:00
metamben
33b628834d Fix X-Ray URLs generated for models (#58178)
Fixes BOT-125
2025-05-19 21:55:55 +03:00
Nathan Voxland
9472a252df Limit data selected out to what will be eventually indexed (#57552) 2025-05-19 13:52:47 -05:00
Phoomparin Mano
7fff64eaf7 feat(sdk): remove footer from dashboards (#57779) 2025-05-20 00:49:59 +07:00
Nicola Mometto
457526c9ef Exclude all numeric values from Category semantic type consideration (#57955)
* docstring typo fixes

* [SEM-8] Exclude all numeric values from Category semantic type consideration

* add unit test for SEM-8

* more typo fixes

* adjust existing tests for new sync behavior

* extend category classifier restriction to any non-text(-like)

* unit test for bolean classification

* further adjust existing tests for new sync behavior

* missed one test

* Fix e2e test by filtering

* fix e2e test by setting field semantic-type before hand

* don't classify int/bool values to category by name either

* rename tests

* extend tests

* style

* remove unused var

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-05-19 18:08:03 +01:00
Aleksandr Lesnenko
b932a8fd5c fix ai question sidebar rerenders (#58152) 2025-05-19 16:23:29 +00:00
appleby
8d0ee0743d Remove :expression_name from col-info-for-expression in annotate middleware (#57981)
* Fix the sorting of custom column from a saved card in a new question

* Remove the expression_name that is not actually used.

* Use col.name instead of expression_name in sanatizeResultData

* Remove additional :expression_name references in tests

* Remove comment that was attached to now-removed :expression_name

* Remove expression_name from static-viz components

* Remove expression_name from instance_analytics export

* Add comment to now-deprecated expression_name field in DatasetColumn

* Add e2e test for sorting on nested custom column

---------

Co-authored-by: Lifeng Lv <lvlifen9@gmail.com>
2025-05-19 08:45:49 -07:00
Ryan Laurie
95c42197c3 update google auth form (#57715) 2025-05-19 09:25:16 -06:00
Ryan Laurie
dfe5951475 cleanup deprecation notice code (#58001) 2025-05-19 09:21:21 -06:00
Noah Moss
f08b7961fb Unlimit pivot exports (#58109)
* unlimit pivot exports

* fixups, fix default for collapsed rows setting

* address import issue

* simple unit test

* simplify test a bit

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-05-19 11:13:40 -04:00
Nathan Voxland
7c75d0ef53 Better support for non-english searching in appdb index (#57979) 2025-05-19 10:04:36 -05:00
Noah Moss
b75e530b78 Fix default for condense duplicate totals setting (#58112)
* fixups, fix default for collapsed rows setting

* add condense_duplicate_totals test for pivot csv exports

* tweak order of checks
2025-05-19 11:03:25 -04:00
Nemanja Glumac
ac444667ff Fix broken yarn dev-ee (#58164)
Running `yarn dev-ee` was broken on the latest master. (introduced in #58054)
The compiler was complaining about the `\` in the docstring because it was interpreting it as an escape character followed by a newline.
2025-05-19 15:25:33 +02:00
Oleksandr Yakushev
00dc257b65 cljs: Fix obscenely large schema expansions (#58094) 2025-05-19 16:12:11 +03:00
Oleksandr Yakushev
35a641b26f Bump HoneySQL version (#58156) 2025-05-19 16:05:17 +03:00
Oleksandr Yakushev
f383f9a753 perf: Small optimizations for metabase.search.spec (#57935) 2025-05-19 15:55:15 +03:00
Timofey Kachalov
807acae216 sdk(feat): Reduce bundle size by using commonReducers from the Main App by SDK (#58071) 2025-05-19 16:51:04 +04:00
Aleksandr Lesnenko
620117bb3f Fix visualizer cards do not work on public dashboards (#58104)
* add missing entity_id field

* specs
2025-05-19 17:53:28 +07:00
Aleksandr Lesnenko
0ac23e079e fix legend flaky spec (#58006) 2025-05-19 17:52:46 +07:00
Aleksandr Lesnenko
db6300be72 fix tooltip flakes (#58117) 2025-05-19 17:50:42 +07:00
Oleksandr Yakushev
2f84c10b82 perf: Cache metabase.driver.util/features (#57811) 2025-05-19 10:21:20 +00:00
Oleksandr Yakushev
53a2d9e079 Bump Toucan and Methodical (#57932) 2025-05-19 13:19:56 +03:00
Oisin Coveney
0351cbdf3a Fix menu text on sharing and subscription menu (#58089) 2025-05-19 09:53:01 +00:00
Nicolò Pretto
afa28d75bf convert script to js in preparation of splitting the work on multiple runners (#58086)
* convert script to js

import os

* remove two tests as one file there fails

* Update bin/backward-compatibility-test.js

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* test -> tests

* address feedback

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-05-19 11:42:22 +02:00
Sébastien
6994d6ca24 Closes VIZ-982 settings not always being propagated (#58072)
* .

* closes VIZ-982 settiings not being propagated

* fixup
2025-05-19 10:56:33 +02:00
Mahatthana (Kelvin) Nomsawadi
3533f67824 Remove field references (#57950) 2025-05-19 05:23:58 +01:00
Alexander Polyankin
b0e6c762c7 Revert "Clean up after #58124 (#58127)" (#58128)
This reverts commit 04462007be.
2025-05-18 11:14:27 -04:00
Alexander Polyankin
04462007be Clean up after #58124 (#58127) 2025-05-18 13:19:55 +00:00
Alexander Polyankin
02596269e1 Revert "Add unique metabase_database (name, engine) constraint and deduplicat…" (#58124)
This reverts commit 5300bf8bfc.
2025-05-18 11:15:36 +00:00
Alexander Polyankin
5300bf8bfc Add unique metabase_database (name, engine) constraint and deduplicate data (#58101) 2025-05-17 03:55:52 +00:00
Aleksandr Lesnenko
96eefff546 fix x-axis ticks granularity on charts with multiple datasets (#57805)
* fix x-axis ticks granularity on charts with multiple datasets

* update specs

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-05-17 03:12:35 +00:00
Cam Saul
688c93d4bc [Backend modularization] users module (first pass) (#58054)
* [Backend modularization] `users` module (first pass)

* Add missing fixture

* Add another missing fixture

* Fix test failure

* Test fixes 🔧

* Test fix ??

* Appease Kondo

* Fix missing (.wakeUp ...) call
2025-05-17 00:46:58 +00:00
Cam Saul
3f8676b1c0 [Backend modularization] warehouses module (first pass) (#58058)
* [Backend modularization] `warehouses` module

* Test fix 🔧

* Test fix 🔧

* Fix bad merge

* Test fix 🔧

* Appease Kondo
2025-05-16 23:59:43 +00:00
Tyler Plude
6cf7606754 [VISUALIZER] Fixing dashboard duplication for visualizer cards (#58106)
* Fixing dashboard duplication for visualizer cards

* test fix
2025-05-16 16:04:06 -07:00
Cam Saul
8661c9a1d6 [Backend modularization] warehouse-schema module (first pass) (#58047)
* [Backend modularization] `warehouse-schema` module (first pass)

* [Backend modularization] `warehouse-schema` module (first pass)

* Fix

* Fix test failure 🔧
2025-05-16 22:40:06 +00:00
bryan
164f9b0d4b require --hot cli arg to enable reloader mw (#58095) 2025-05-16 16:13:03 -06:00
bryan
c20859f4eb mage jar-download improvments (#58102) 2025-05-16 16:12:55 -06:00
Ryan Laurie
52d7235fee Refresh temporary tokens (#58046)
* refresh temporary tokens

* fix tests

* update comments
2025-05-16 22:12:45 +00:00
Ryan Laurie
0ae799bed8 flake jail (#58108) 2025-05-16 15:17:03 -06:00
Cam Saul
c8546e2af3 [Backend modularization] dashboards module (first pass) (#58056)
* [Backend modularization] `dashboards` module

* Move models

* move API namespace
2025-05-16 20:58:47 +00:00
William
bd0a271edd revert and disable entity-id backfill (#58098) 2025-05-16 14:12:37 -05:00
Nemanja Glumac
54a306d031 Adapt the setup flow for the "embedding" use case (#57749)
We're greatly simplifying and speeding up a Metabase setup 
when the use case is "embedding". This currently applies only to 
hosted instances. The FE in the main app will expect the query param
`use_case=embedding` to exist. If it does, we're showing the simplified
setup flow.
2025-05-16 10:51:06 -06:00
Cam Saul
0b36b9a2e6 [Backend modularization] Remove server's dependency on api-routes (#58052)
* [Backend modularization] Remove `server`'s dependency on `api-routes`

* Test fix 🔧
2025-05-16 08:59:37 -07:00
Cam Saul
0be751ab44 [Backend modularization] Move :model/ApplicationPermissionsRevision (#58057) 2025-05-16 08:58:52 -07:00
metamben
dd1a150343 Optimize DB caching and field matching (#58082)
* Optimize DB caching and field matching

Fixes BOT-139

* Stop relying on column idents

* Warm the cache when loading available metric cards
2025-05-16 15:06:51 +00:00
Oleksandr Yakushev
bc4be9159f cljs: Don't require cljs.pprint in :cljs-release mode to reduce bundle size (#58085) 2025-05-16 17:57:12 +03:00
Eric Normand
d196582116 date() and text() in sql dbs and mongo (#57653)
* Empty

* kick ci

* Allow temporal type in addition to string for `date()`

* Add date(datetime) test

* Use cast for date for postgres

* Extend date() on mysql

* Extend date() on bigquery

* Extend date() at snowflake

* Extend date() to datetime on clickhouse

* Generalize `date()` to :sql

* Update changelog with `date(datetime)`

* Empty

* DateTime->Date Coercion + test

* Slight cleanup

* Whitespace

* Cleaner implementation and test

* Test timestamp as well as timestamptz

* Correct implementation to get subtypes of DateTime

* Update helper text string for date

* Add e2e tests for date

* Also check to correct coercion of dates

* Add customization points to enable clickhouse implementation.

* Remove changelog-test/ignore true from ->date

* Fix defn ordering

* Fix expected type for datetime coercions

* Fix tests for sqlite

* Implement coercion for Mongo

* Implement specialization for oracle

* Add :expressions/date feature to all sql dbs

* Add :expressions/date feature to mongo

* Mongo: add text() and date()

* Better check

* Better check

* kick ci

* Add text() to all sql dbs

* Empty

* kick ci

* kick ci

* Format code

* Format code

* Add :text implementation to sql driver

* More robust tests across drivers

* Correct changelog text

* Ors on one line

* Or on same line

* kick ci

* Add `text-dbtype` multi-method

* Add athena implementation of text-dbtype

* Add databricks implementation of text-dbtype

* Remove date expression in tests that breaks some sql dbs

* Improve cast test for dates on other dbs

* Remove duplicate test

* Remove test that won't work for many dbs

* Use VARCHAR for oracle

* Use STRING for SparkSQL

* Use VARCHAR on Vertica

* Remove test that converts date to text before parsing it

* Add mongo exception

* Only run this test for SQL databases (requires native sql query)

* Add SQL Server text type

* Add Starburst text type

* Try varchar2(100)

* Simpler implementation

* Don't support date() for Oracle

* Try selecting from people to get oracle to work.

* Compile nested query for `text()` test

* Don't test empty string because Oracle treats it as NULL.

* Appease the kondo

* Implement Presto cast to text

* Implement cast-to-text in terms of cast (for presto)

* Correct test name

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-05-16 14:55:01 +00:00
Timofey Kachalov
801e9b6e6b feat(sdk): Do not add unused Empty state SVG images to the SDK bundle (#58013) 2025-05-16 17:26:37 +04:00
Ngoc Khuat
5af0a1720b Robust InitSendPulseTriggers (#58007) 2025-05-16 20:42:16 +09:00
Nemanja Glumac
58e15efc82 Return nil when there are no params in a subscription (#58075)
We're using the `computed.filters` value in the handlebars email template.
Previously, if `parameters` were an empty list `[]` we were returning a truthy value,
and handlebars was rendering an empty row in an email.

@ngoc figured out that we need to wrap parameters with `seq` in order to have a
a proper `nil` assigned to `:parameters`.
2025-05-16 11:27:14 +00:00
Timofey Kachalov
9fcd2fef34 feat(sdk): Reduce bundle size by avoiding the usage of jsrsasign dependency (#58009) 2025-05-16 14:53:02 +04:00
Nemanja Glumac
fe41e9bb1a Update the copy for the map empty viz state (#58073) 2025-05-16 12:35:15 +02:00
Aleksandr Lesnenko
7a8727b98d fix flaky timelines spec (#58060) 2025-05-16 12:33:44 +02:00
metamben
e17c8f0671 Batch process fields in implicitly-joinable-columns (#58053) 2025-05-16 09:48:11 +00:00
Sébastien
800067c2d2 Closes VIZ-700 switch to using include_metadata (#57829)
* closes VIZ-700 switch to using include_metadata

* e2e

* e2e

* more work on making e2e less flaky?
2025-05-16 09:51:12 +02:00
Ngoc Khuat
7a7e09163b new login email fallback to last_name, email if it exists (#58027) 2025-05-16 04:27:38 +00:00
Ngoc Khuat
d29b63a097 prefix all of our log context with mb- (#58023) 2025-05-16 03:20:23 +00:00
Cam Saul
a81c9c884c [Backend modularization] module score calculation (#58002)
* [Backend modularization] module score calculation

* dox
2025-05-15 19:37:15 -06:00
appleby
e30c325250 Cast booleans literals in :fields clause to bit for sqlserver (#57723)
* Cast boolean expressions in :fields clauses to type bit on sqlserver

* Compile boolean literals :inline on sqlserver

* Add some tests for non-booleans to boolean_to_comparison_test.clj

* Add tests for boolean-expression-clause?

* Mention sql.qp/*inner-query* in boolean-expression-clause? docstring

* Split separate cases into separate tests

* Add cast in sql.qp/as if field options contain ::sql.qp/add-cast

Rather than duplicating logic for :select-top in apply-top-level-clause [:sqlserver :fields], just decorate boolean
:fields clauses with ::sql.qp/add-cast and let the parent method handle it. In this way, the :sqlserver method can
pre-process the MBQL :fields clauses rather than post-processing the raw honeysql.
2025-05-15 17:32:37 -07:00
appleby
782daee511 Fix boolean->comparison conversion for nested queries (#57717)
* Add tests for {sum,count,distinct}-where with literal booleans

* Fix typo in literal expressions tests: filters -> filter

* Fix boolean->comparison for boolean expressions coming from nested queries

* Add sql.u/->honeysql-parent-method util

* Remove ::boolean-is-comparison abstract driver

* Lift ->honeysql call out of boolean-to-comparison

* Pass in boolean-types to boolean->comparison from driver

* Update comments and docstrings

* Require :left-join feature in nested-and-joined-literal-boolean-expressions-in-conditions-test

* Revert whitespace changes

* Implement sql.qp/apply-top-level-clause :filter in terms of parent method

* Fix typo in docstring

* Remove unused sql.helpers import

* Add comment about Oracle 23+ support to boolean_to_comparison.clj

* Rename local has-types? to has-some-types? in boolean-field-clause?
2025-05-15 14:30:39 -07:00
Cam Saul
d7eae1df71 [Backend modularization] parameters module (first pass) (#58043)
* [Backend modularization] `parameters` module (first pass)

* Make sure DB is initialized

* Oops revert the change I made to demo something during BE Guild Sync
2025-05-15 21:15:28 +00:00
metamben
dbb22cd0ed Stop hydrating unused properties (#58003)
* Stop returning field values in the answer-sources response

Fixes BOT-137
2025-05-15 22:34:03 +03:00
github-automation-metabase
afffb18b57 Bump io.netty/netty-common from 4.2.0.Final to 4.2.1.Final (#57824)
* Bump io.netty/netty-common from 4.2.0.Final to 4.2.1.Final

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-15 19:23:29 +00:00
bryan
9e01e38352 in dev, use wrap-reload middleware (#57930) 2025-05-15 11:59:45 -06:00
Timofey Kachalov
ad9d43e0fa Do not transform :has css selectors by Post CSS (#58011) 2025-05-15 19:49:04 +04:00
Nemanja Glumac
44c866ebba Re-enable the old flaky reproduction (#58036) 2025-05-15 17:25:46 +02:00
Aleksandr Lesnenko
af2fafe17f include visible timeline events from different collections in ai analysis (#57990) 2025-05-15 10:59:08 -04:00
Cam Saul
5373dfac4d [Backend modularization] queries module (#57936)
* [Backend modularization] `queries` module

* `metabase.api.query-metadata` => `metabase.queries.metadata`

* Update config & cljfmt

* Make queries API namespace

* cljfmt

* Fix Kondo warnings

* First pass at fixing circular references.

* Second pass for fixing circular refs.

* Third pass at fixing circular references

* Circular refs pass 3

* Circular refs pass 4

* Circular refs pass 5

* Circular refs pass 6

* Fix

* Appease Kondo

* Test fix 🔧

* Appease Kondo

* Test fix 🔧

* Test fix 🔧

* Test fixes 🔧

* Fix reflection warning

* `schema` => `warehouse-schema`

* More test fixes 🔧

* cljfmt

* Fix

* Test fix 🔧

* Test fix 🔧

* Test debugging

* Test fixes

* Test fix 🔧
2025-05-15 13:30:30 +00:00
metamben
7937ecf662 Stop returning field values in the answer-sources response (#57966)
Fixes BOT-137
2025-05-15 16:19:14 +03:00
Nicolò Pretto
7437449749 change retrieve key too (#57985) 2025-05-15 15:03:59 +02:00
Nemanja Glumac
0581f1c141 Add a single branding link to Slack notification (#57501) 2025-05-15 14:28:16 +02:00
Timofey Kachalov
79afb5dec2 Fix fonts.styled.ts braces (#58025) 2025-05-15 15:50:31 +04:00
Phoomparin Mano
6c890a3a28 ci(sdk): fix flaky tests on entity id target collection (#58014) 2025-05-15 18:10:02 +07:00
Phoomparin Mano
c890601b2e ci(sdk): fix flaky tests on interactive question theming (#58010) 2025-05-15 17:27:59 +07:00
Timofey Kachalov
1ae53cb922 Fix wrong names of CSS module files (#58012) 2025-05-15 13:50:03 +04:00
Timofey Kachalov
d7912c544b Fix ModalHeader back button position (#58008) 2025-05-15 13:49:24 +04:00
Alexander Polyankin
2842276e6d Remove duplicated code from api/dashboard.clj for parameter matching in chain filters (#57922)
* Fix params used in dashboard endpoints

* Fix params used in dashboard endpoints

* Fix params used in dashboard endpoints

* Fix lint
2025-05-14 21:49:01 -04:00
github-automation-metabase
fa63153010 Bump io.github.camsaul/toucan2 from 1.0.561 to 1.0.564 (#57816)
Inspect dependency changes here: https://github.com/camsaul/toucan2/compare/1.0.561...head

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 23:35:15 +00:00
Edward Paget
54974e31dc feat: generic data permissions visibility queries (#57712)
* feat: generic data permissions visibility queries

Creates a new namespace with a generically applicable set of sql queries
for getting only models controlled by data permissions that a given user
has access to.

It also creates a new model.interface defmulti `visible-filter-clause`
that allows us to generate a filter clause for a given model to filter a
query on a supplied expression to only those models allowed for the
supplied user. There is a default implementation that is always true.

the `visible-filter-clause` method is only implemented for the Table
model so far since that is used in a search.

This also fixes a bug in the previous implementation of the sql
filtering for Table models that did not correctly handle the logic in
`data-perms/coalesce` for `:perms/view-data` where `:blocked` is ranked
ahead of `:legacy-no-self-service` for the purposes of selecting the
applicable user permission but is ranked below when testing permission levels.

Co-Authored-By: John Swanson <john.swanson@metabase.com>

* fixup! default for visible-fliter-clause to false

* fixup! add cast back for search permissions

* fixup! correct db type test

* fixup! more verbose table names in perms test

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-05-14 21:06:12 +00:00
Gustavo Saiani
ed8d735bbd Docs: update links so that they land on final URLs instead of internal redirects (#57461) 2025-05-14 20:16:35 +00:00
Gustavo Saiani
c5b8e1c3fe Pass param to plans-blockquote (#57991) 2025-05-14 17:02:36 -03:00
Alexander Polyankin
1d61926cf5 Fix FE navigation when the query is running (#57977)
* Fix FE navigation when the query is running

* Fix FE navigation when the query is running

* Add test

* Add test
2025-05-14 15:55:39 -04:00
github-automation-metabase
4e6bbcdd5e Bump com.google.cloud/google-cloud-bigquery from 2.49.0 to 2.50.0 (#57822)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.50.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 19:51:18 +00:00
github-automation-metabase
7f30bb16dd Bump com.clojure-goes-fast/clj-async-profiler from 1.6.1 to 1.6.2 (#57812)
Inspect dependency changes here: https://github.com/clojure-goes-fast/clj-async-profiler/blob/1.6.2/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 19:50:04 +00:00
github-automation-metabase
132336c0be Bump methodical/methodical from 1.0.125 to 1.0.126 (#57818)
Inspect dependency changes here: https://github.com/camsaul/methodical/compare/1.0.125...head

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 19:47:47 +00:00
github-automation-metabase
0eac0bb2bd Bump thheller/shadow-cljs from 3.0.4 to 3.0.5 (#57821)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 19:47:00 +00:00
github-automation-metabase
f00b28668a Bump diehard/diehard from 0.11.12 to 0.11.13 (#57814)
Inspect dependency changes here: https://github.com/sunng87/diehard/blob/0.11.13/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 12:07:51 -07:00
github-automation-metabase
a0184a91d6 Bump org.apache.xmlgraphics/batik-all from 1.18 to 1.19 (#57820)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 12:01:58 -07:00
github-automation-metabase
32f5b9105b Bump net.thisptr/jackson-jq from 1.2.0 to 1.3.0 (#57819)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 12:01:47 -07:00
Gustavo Saiani
5c0f8d8ede Update link (#57963) 2025-05-14 15:54:17 -03:00
Alexander Polyankin
6e6449b724 Fix FE permission checks for Edit query definition (#57973) 2025-05-14 18:48:30 +00:00
Timofey Kachalov
424be8573c fix(sdk): Move @cypress/react as dev dependency for SDK (#57962) 2025-05-14 22:05:54 +04:00
Aleksandr Lesnenko
cb1b6f7856 track first non-table chart generated (#56858)
* track first non-table chart generated

* specs

* fix types

* review

* fix serialization

* eliminate chart rerender when instance settings change

* fix prop name

* rename chart-generated setting

* update e2e spec
2025-05-14 18:04:03 +00:00
Aleksandr Lesnenko
04246335c6 filter timeline events for ai entity analysis by collection id (#57926) 2025-05-14 13:40:23 -04:00
Nicolò Pretto
0f49dafa5d make the uberjar artifact from the cross-version tests not collide with (#57971)
the one from component tests
2025-05-14 17:20:36 +00:00
Alexander Polyankin
92c221ceb2 Add boolean parameters to dashboards and SQL field filters (#57435)
* Boolean params PoC

* Fix types

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* Fixes

* Fixes

* Fixes

* Fixes

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix formatting settings

* Fix routes

* Fix routes

* Fix routes

* Fix

* Fix routes

* Fix routes

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Add e2e

* Fix
2025-05-14 18:08:23 +01:00
Ngoc Khuat
bc92e04aea fix the enterprise feature that let admin archive all notifications of a user and unsubscribe them from notifiations (#57881) 2025-05-14 19:43:54 +03:00
Cam Saul
f2004162a1 [Backend modularization] plugins cleanup (#57792)
* [Backend modularization] `plugins` cleanup (DEV-457)

* Test fix 🔧

* Fix unused namespace
2025-05-14 09:02:35 -07:00
Nicolò Pretto
3ef1bf8739 remove double concurrency group causing deadlock (#57960) 2025-05-14 17:00:30 +02:00
Nicolò Pretto
9308cc12ba add yet another linter, no literal strings so we don't forget to translate everything (#57785) 2025-05-14 16:26:05 +02:00
Jeff Bruemmer
9c2464e3e3 Update case.md (#57958) 2025-05-14 13:29:58 +00:00
Nicolò Pretto
52d243cbcf fix(ci-sdk): make cross versions tests run again (#57856)
* debug logs

* testing please ignore

* cleanup and add comment
2025-05-14 13:23:10 +02:00
Mahatthana (Kelvin) Nomsawadi
487893a6c6 Add more tests to cover missing cases (#57744)
* Add the first integration test!!!

* Finish integration tests

* Add missing E2E cases

* Remove WIP comment

* Ensure join data only show selected database

* Clarify cryptic Cypress step

* Make test types clearer

* Stop abusing `await` in unit tests

* Consolidate tests

Co-Authored-by: Poom poom@poom.dev
2025-05-14 11:01:51 +01:00
Ngoc Khuat
e3d85f8506 Giving system event notifications its own queue (#57769) 2025-05-14 06:52:52 +00:00
Alexander Polyankin
222e1beb38 Handle nulls with MBQL lib (#57942) 2025-05-14 02:10:13 +00:00
appleby
3f59c806d8 Handle emptyable expressions in desugar-is-empty-and-not-empty (#57870)
Closes #41265.

The schema for is-empty and not-empty was updated in #56855 to allow StringExpressionArg as well as Field. This
updates desugar-is-empty-and-not-empty to also understand non-field args.
2025-05-13 17:59:15 -07:00
Konstantin Darutkin
23161f4b9b fix(datagrid): improve row selection control (#57889) 2025-05-13 20:20:22 -04:00
metamben
b91c475c4c Fix past1hours and past1seconds filters (#57907)
* Fix past1hours and past1seconds filters

Without this change, both of these types generate 1 minute intervals.
2025-05-14 00:57:25 +03:00
Cam Saul
506b418891 [Backend modularization] secrets module (#57802)
* [Backend modularization] `secrets` module

* Merge master
2025-05-13 14:05:56 -07:00
Nathan Voxland
9c73ab5fe4 Improved liquibase rollback-major-version! logic to not use a simple count (#57754) 2025-05-13 15:26:38 -05:00
Case Nelson
3e4d36e7ab fix: snowflake test and migrate happening repeatedly (#57540)
* fix: snowflake test and migrate happening repeatedly

* Improve comments in test

* Fix kondo
2025-05-13 13:30:15 -06:00
Edward Paget
2919662edb fix: move quartz metric listeners to analytics (#57757)
* fix: move quartz metric listeners to analytics

To make sure the task module does not need to depend on the analytics module

* fixup! remove analytics from task uses

* fixup! export listener adder methods

* fixup! missing docstring

* fixup! put the comment back in the right spot
2025-05-13 19:03:12 +00:00
Phoomparin Mano
fb06c2b571 fix(sdk): table cell color is always white on the sdk (#57770) 2025-05-14 02:01:24 +07:00
Phoomparin Mano
d52a4e35da feat(sdk): theme-dependent default question toolbar colors (#57747) 2025-05-14 00:54:24 +07:00
Luis Paolini
693181cc44 Update upgrading-metabase.md (#57751)
* Update upgrading-metabase.md

Add changes that were needed for a long time :)

* suggested edits (#57913)

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-05-13 17:48:34 +00:00
Cam Saul
0f62c5c292 [Backend modularization] Finish moving "public settings" into appropriate modules (#57860)
* [Backend modularization] `channel` Settings cleanup (DEV-435)

* Remove `metabase.settings.deprecated-grab-bag`

* Fix circular references

* Fix circular refs

* Lint fix

* Test fix 🔧
2025-05-13 17:35:42 +00:00
Cam Saul
81da34e617 Fix API routes checks for dataset (#57871) 2025-05-13 10:21:09 -06:00
John Swanson
caffffd802 Fix snowplow helpers to be less flaky (#57750)
Remove `expectGoodSnowplowEvents` entirely - it was an antipattern.

Replace it with a good set of snowplow helper functions that actually
accomplish what we want:

- `expectSnowplowEvent`, which matches on the *entire* event rather than
assuming the event is an unstructured event (most of ours are, but some
are not).

- `expectUnstructuredSnowplowEvent`, which behaves the same as
  `expectGoodSnowplowEvent` used to, except I removed an unused behavior
  where it took a function instead of a partial-match object.

- `assertNoUnstructuredSnowplowEvent`, which asserts the inverse of
  `expectGoodSnowplowEvent` - there are zero matching snowplow events.

I removed `Good` from all these names as I think that's implied - if you
want to make an assertion that a bad event is being received you can
write your own helper :)
2025-05-13 08:49:00 -07:00
bryan
5b7c4d6f26 fix watcher alias (#57790) 2025-05-13 15:46:42 +00:00
Sébastien
9c0c457fc8 Closes VIZ-400 fix stickiness for initial rendering as well (#57886) 2025-05-13 17:01:22 +02:00
Riley Thompson
93b2148bb5 Replace Mongo 4.4/5.0 with 6.0 (#57795) 2025-05-13 09:58:18 -04:00
Romeo Van Snick
ccc1a876be Reduce parameter data sent in public csv download url (#57195)
* Only send id and value when downloading csv

* Add repro for metabase#51813

* Merge in template tag parameters to parameters when running cards

* Fix erroneous test

* Do not pass all parameter data for cards

* Remove commented out code

* Only pass sparse parameters on public dashboards or cards

* Remove unused import

* Fix lint

---------

Co-authored-by: Tamás Benkő <tamas@metabase.com>
2025-05-13 15:35:41 +02:00
Andrew McLoughlin
eacc2176ed Fix typo.md (#57702) 2025-05-13 09:31:39 -04:00
Ngoc Khuat
471ff47c6f break lines for each modules in the config so it generates fewer conflicts (#57874) 2025-05-13 11:15:10 +00:00
Phoomparin Mano
32b3f46331 feat(sdk): warn when using dev instance and change banner design (#57746) 2025-05-13 17:55:56 +07:00
Ngoc Khuat
eddc872446 fix formating value for contains parameter (#57876) 2025-05-13 09:31:08 +00:00
Sébastien
b3d4d2fc8e closes viz-943 wrong icon size but SOMETIME (#57833) 2025-05-13 10:44:33 +02:00
Cam Saul
272a353462 [Backend modularization] collections module (#57722)
* [Backend modularization] `collections` module (DEV-444)

* Fix wrong namespace

* Fix new metabot v3 code

* Some test fixes. 🔧

* Move test for EE-specific behavior to EE

* Make `/api/collection` tests work correctly from the REPL

* Try to debug failing test

* Fix sanity checc

* Fix Kondo warnings

* Test fix 🔧

* Attempt to debug test failures

* More test failure debugging

* Cleanup

* More test failure debugging

* More test debugging

* Fix private var

* Test fix? 🔧
2025-05-12 20:27:01 -07:00
Alexander Polyankin
ec316302da Send param_fields per parameter to avoid field ref matching (#57554) 2025-05-12 19:47:13 -04:00
Case Nelson
3d810c0f87 fix: remove fast snowflake sync (#57858)
* fix: remove fast snowflake sync

* Fix kondo
2025-05-12 16:06:24 -06:00
Cam Saul
dc8381925b [Backend modularization] OSS content-verification module (#57804)
* [Backend modularization] content-verification module (DEV-431)

* Fix namespace
2025-05-12 15:05:29 -07:00
github-automation-metabase
caa4add50e Bump com.oracle.database.jdbc/ojdbc17 from 23.7.0.25.01 to 23.8.0.25.04 (#57826)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <riley@metabase.com>
2025-05-12 21:39:13 +00:00
Cam Saul
754d708240 [Backend modularization] Move EID translation API endpoint into module (#57629)
* [Backend modularization] Move EID translation API endpoint into module (DEV-433)

* Prettier
2025-05-12 17:39:34 +00:00
Nicolò Pretto
f454edadb8 wrap strings in t in EditSandboxingModal (#57787) 2025-05-12 18:54:37 +02:00
lbrdnk
b1c25efba4 Track log level adjustments (#57756)
* Snowplow events for log adjustments

* Apply suggestions from code review

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Track empty log_levels as log_adjustments_reset

* Use log-levels instead

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-05-12 18:33:28 +02:00
Aleksandr Lesnenko
0c2d3afa18 do not show visualize another way on text cards (#57806) 2025-05-12 11:59:12 -04:00
Aleksandr Lesnenko
e47f333669 fix text align setting on text dashcards (#57807) 2025-05-12 11:58:56 -04:00
github-automation-metabase
5cb20c2f50 Bump org.mongodb/mongodb-driver-sync from 5.4.0 to 5.5.0 (#57825)
Inspect dependency changes here: https://github.com/mongodb/mongo-java-driver/compare/r5.4.0...r5.5.0

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-12 11:10:49 -04:00
Nicolò Pretto
0f7f07f684 restore missing code after bad conflict resolution of metabot branch (#57846) 2025-05-12 14:50:59 +00:00
Jeff Bruemmer
dc3975479f docs - notification thread pool size. (#57748)
* note about long-running queries clogging queue

* fix spacing, update env vars

* note on troubleshooting notifications

* Update docs/troubleshooting-guide/index.md

* Update docs/configuring-metabase/environment-variables.md

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>

* Update docs/configuring-metabase/environment-variables.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

* edits

* Update notifications.md

Adding some little detail about when changes happen

---------

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
2025-05-12 09:28:32 -04:00
Kyle Doherty
2a76f70a69 standardize on ToolbarButton for main view header actions (#57791)
* standardize on ToolbarButton for main view header actions

* fix unit test

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2025-05-12 08:44:58 -04:00
Nicola Mometto
1d2a6aa95b Add bronsa to team json files (#57834) 2025-05-12 13:13:43 +01:00
Sébastien
ebcced6bd4 Closes VIZ-656 better mapping when switching to/from non-cartesians (#57830) 2025-05-12 12:52:54 +02:00
Tyler Plude
b424828108 [VISUALIZER] Fix funnel type static viz support (#57560)
* adding get-visualization-columns in clojure land

* remove inline defs

* add util unit tests

* update comment

* linter fixes

* Fix render visualizer utils to work with entity ids, add test

* Fix body test
2025-05-09 18:01:27 -07:00
Cam Saul
818bacef5f [Backend modularization] product-feedback module (#57720)
* [Backend modularization] `product-feedback` module (DEV-438)

* Update modules config
2025-05-09 22:33:51 +00:00
Alexander Polyankin
07399694ef Use dedicated endpoints for remapping in dashboards & questions (#57571)
* Remove unused endpoints

* Resolve implicit FK Field -> PK Field -> [Name] Field remapping

This affects the field and dashboard APIs.

* New endpoints

* Remove unused code

* Always return value, possibly without label

* Stop requiring FK entry in FK -> PK -> Name resolution

* Relax FK requirement in remapped value resolution

* Remove remaining /field/ endpoints

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-05-09 22:20:52 +00:00
Tyler Plude
bd5d9811ee [BUG FIX] Correctly merge column settings in exports (#57473)
* use existing col settings helper

* forward declaration of viz-settings-for-col to prevent compilation issues

* fixing typo in parens

* fix unit tests

* Fix clj kondo warnings
2025-05-09 15:00:51 -07:00
github-automation-metabase
65a5384994 Bump io.netty/netty-buffer from 4.1.119.Final to 4.2.0.Final (#56361)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-09 21:45:59 +00:00
github-automation-metabase
ec15bbf4b4 Bump org.mongodb/mongodb-driver-sync from 5.3.1 to 5.4.0 (#55608)
* Bump org.mongodb/mongodb-driver-sync from 5.3.1 to 5.4.0

Inspect dependency changes here: https://github.com/mongodb/mongo-java-driver/compare/r5.3.1...r5.4.0

* Update deps.edn

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-09 21:22:32 +00:00
Cam Saul
3e65e9f158 [Backend modularization] OSS audit-app module (#57623)
* [Backend modularization] OSS audit-app module

* Cleanup

* Update config

* Fixx

* Test fix 🔧

* Appease the module linter

* Test fix 🔧
2025-05-09 20:53:38 +00:00
Jeff Bruemmer
38a58700f6 links (#57796) 2025-05-09 20:42:46 +00:00
github-automation-metabase
d405ed82e3 Bump org.graalvm.polyglot/polyglot from 24.2.0 to 24.2.1 (#56956)
* Bump org.graalvm.polyglot/polyglot from 24.2.0 to 24.2.1

Inspect dependency changes here: https://github.com/oracle/graal/compare/graal-24.2.0...graal-24.2.1

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-09 20:15:02 +00:00
Cam Saul
a4313c3960 [Backend modularization] Mega Renaming PR 2 (#57565)
* Move `show-database-syncing-modal` into `sync` module (DEV-436)

* `metabase-enterprise.core` => `metabase-enterprise.core.dummy-namespace` (DEV-473)

* `task` module cleanup (DEV-458)

* Fix 🔧

* Test fix 🔧

* Fixes 🔧
2025-05-09 19:44:37 +00:00
Cam Saul
58648d1de4 [Backend modularization] premium-features cleanup (#57562)
* [Backend modularization] `premium-features` cleanup (DEV-464)

* Fix 🔧

* Fix stuff

* Fix Kondo failures not causing CI failures

* Docstring cleanup

* More fixes 🔧

* Fix 🔧

* Fix token status checc

* Test fix 🔧

* Appease TypeScript

* Appease TypeScript again
2025-05-09 13:37:16 -06:00
Ryan Laurie
5cca6cd94d Update Authentication Settings (#57405)
* rework auth settings

fix for auth cards

fixes

make checking SSO nicer

SCIM tests

make stuff nicer

much tests

rebase fix

update auth settings

update more tests

whoopsie

little fixes

* update more tests

* test fixes

* remove auth tabs

* gee wiz thanks sloan

* conflict fix
2025-05-09 13:29:55 -06:00
Cam Saul
bc50403dcb [Backend modularization] bug-reporting module (#57670)
* [Backend modularization] `bug-reporting` module (DEV-442)

* Update modules config
2025-05-09 19:03:07 +00:00
Cam Saul
94a9847fbf [Backend modularization] version module (#57630)
* [Backend modularization] `version` module (DEV-443)

* Fix stuff
2025-05-09 18:24:24 +00:00
Konstantin Darutkin
f454566dae feat(frontend): add selectable rows for DataGrid (#57771)
* feat(frontend): add selectable rows for DataGrid

* feat: add row selected attribute
2025-05-09 19:23:28 +01:00
Cam Saul
b6c2815bf3 [Backend modularization] geojson module (#57463) 2025-05-09 17:44:06 +00:00
Aleksandr Lesnenko
5a00c58b32 visualizer feature branch (#48527)
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-05-09 12:54:16 -04:00
Ryan Laurie
9825858b19 Add DWH Paused Modal for Uploads (#57285)
* add paused modal

* trigger paused modal

* add unit tests
2025-05-09 10:47:23 -06:00
Jeff Bruemmer
0d756faa0c update learn links (#57782) 2025-05-09 16:13:55 +00:00
Nicolò Pretto
34e647af26 fix: wrap un-translated strings in t`` (#57693)
* fix: wrap un-translated strings in t``

* fix more untranslated strings

* translate some aria-labels

* use interpolation instead of having to provide context

* address feedback and add context

* more t calls added

* revert changes to slider component as it's not used and may get removed

* remove file that i re-created when rebasing

* more context

* more context

* Update frontend/src/metabase/query_builder/components/MoveQuestionModal/MoveQuestionModal.tsx

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>

* Update frontend/src/metabase/query_builder/components/expressions/Editor/Listbox/Listbox.tsx

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>

* address feedback

* add context to what is SSL short for

* remove whitespace that could possibly create issues

* add missing import for c

---------

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2025-05-09 17:51:19 +02:00
Eric Normand
8edafd083c Datetime to date coercion (#57523)
* Empty

* kick ci

* Allow temporal type in addition to string for `date()`

* Add date(datetime) test

* Use cast for date for postgres

* Extend date() on mysql

* Extend date() on bigquery

* Extend date() at snowflake

* Extend date() to datetime on clickhouse

* Generalize `date()` to :sql

* Update changelog with `date(datetime)`

* Empty

* DateTime->Date Coercion + test

* Slight cleanup

* Whitespace

* Cleaner implementation and test

* Test timestamp as well as timestamptz

* Correct implementation to get subtypes of DateTime

* Update helper text string for date

* Add e2e tests for date

* Also check to correct coercion of dates

* Add customization points to enable clickhouse implementation.

* Remove changelog-test/ignore true from ->date

* Fix defn ordering

* Fix expected type for datetime coercions

* Fix tests for sqlite

* Implement coercion for Mongo

* Implement specialization for oracle

* Better check

* kick ci

* kick ci

* Format code

* Format code

* Correct changelog text

* Ors on one line

* Or on same line

* Remove zh from the list of supported translations (#57672)

We don't support the `zh` (Traditional Chinese) locale anymore – only `zh-CN` (Simplified Chinese), and `zh-HK` (Hong Kong), and `zh-TW` (Taiwan). Here's a [Slack discussion](https://metaboat.slack.com/archives/C6UBFU9GW/p1741983889165599).

So let's remove `zh` from the list of supported translations.

For some reason the list wasn't sorted alphabetically by language name - this PR fixes that too.

* [Backend modularization] Mega Renaming PR 1 (#57561)

* auth-provider => auth-provider.core

* enterprise/auth-provider

* `metabase.events.core`

* Move `sql-parsing-enabled` Setting into `query-analysis` (DEV-449)

* `metabase.events.core` (DEV-455)

* `metabase-enterprise.stats` => `metabase-enterprise.analytics.stats` (DEV-475)

* `enterprise/stale` cleanup (DEV-474)

* `enterprise/airgap` => `enterprise/premium-features`

* Appease Kondo

* Remove unused

* Mark setup tests flaky (#57710)

* mark setup tests flaky

* add flake

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* Fix parameter types! (#57677)

* [Notification] reduce module apis (#57678)

* fix audit log to record external emails when sending notifications (#57679)

* Remove "Model" and "Action" from the "New" button menu (#57647)

* feat: add a link to field filter docs from dashboard sidebar with native question (#57687)

* feat: add a link to field filter docs from dashboard sidebar with native question

* oops

* add missing translation

* Metabot v3 PoC (#52436)

Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Mihael Konjević <konjevic@gmail.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: github-automation-metabase <166700802+github-automation-metabase@users.noreply.github.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>

* Patch the metabot-v3 merge (#57731)

* Remove unused props from the "New" menu

* Remove Metabot code related to the "New" menu

* Fix flaky e2e test in the onboarding `setup` spec (#57735)

* remove unused slider component (#57745)

* [Admin] Modernize components for People + Groups pages (#57365)

* update components in frontend/src/metabase/admin/people/components to use Mantine components and remove deprecated component usage

* update people and group pages/modals to use more modern components

* use relative sizes

* fix user success modal not closing on "Done" confirm button click

* remove CS from PeopleListRow

* clean up admin/people/colors.ts

* lint fix

* people list footer fix

* pr feedback

* [Admin] Convert people / group pages to RTKQuery (#57490)

* update components in frontend/src/metabase/admin/people/components to use Mantine components and remove deprecated component usage

* update people and group pages/modals to use more modern components

* use relative sizes

* fix user success modal not closing on "Done" confirm button click

* remove CS from PeopleListRow

* clean up admin/people/colors.ts

* lint fix

* people list footer fix

* pr feedback

* wip

* fix issues, people page updates, some clean up

* add unsaved files

* type fix, fetch user list from rktquery for PeopleList

* remove entity usage from unsubscribe modal, lint fix

* remove all remaining usages of user entity

* remove user entity

* test fixes, remove unused user schema

* bit of clean up

* qa pass - invalidate groups cache if user is deactivated/reactivated

* address pr feedback

* Bump org.apache.poi/poi-ooxml-full from 5.4.0 to 5.4.1 (#56357)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Add analytics for new entity creation being initiated (#57673)

This commit adds analytics to the:

1. New button being clicked
    - In the top app bar
    - From the empty collection
2. New menu individual items being clicked:
    - Dashboard
    - ~Question~ (not possible at the moment)
    - ~Native query~ (not possible at the moment)
3. An entity creation being initiated
    - Model from the /browse/models page
    - Metric from the /browse/metrics page
    - Collection from the collection header
    - Collection from the main nav sidebar

* Bump io.github.eerohele/pp from 9598f4c72b528480a85ea41651c45b08d1717428 to 4998a1fdd9d3713d7034d04509e9212204773bf2 (#57577)

Inspect dependency changes here: 9598f4c72b...4998a1fdd9

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Bump commons-io/commons-io from 2.18.0 to 2.19.0 (#56654)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Shutdown index sync while its results are unused (#56885)

* Shutdown index sync while its results are unused

* Update tests

* Update mongo tests

* Bump com.google.guava/guava from 33.4.6-jre to 33.4.8-jre (#56952)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Bump com.amazonaws/aws-java-sdk-core from 1.12.782 to 1.12.783 (#57586)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Bump io.github.tonsky/clj-reload from 0.9.4 to 0.9.5 (#57578)

Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.5/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump babashka/fs from 0.5.24 to 0.5.25 (#57575)

Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.25/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump org.apache.calcite.avatica/avatica from 1.25.0 to 1.26.0 (#54171)

Inspect dependency changes here: https://github.com/apache/calcite-avatica/compare/avatica-1.25.0-rc0...avatica-1.26.0-rc0

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* fix: do not render gauge if grouping col is date (#56715)

* fix: toolbar button color not changing on hover (#56694)

* Bump refactor-nrepl/refactor-nrepl from 3.10.0 to 3.11.0 (#57584)

Inspect dependency changes here: https://github.com/clojure-emacs/refactor-nrepl/blob/v3.11.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump org.jsoup/jsoup from 1.19.1 to 1.20.1 (#57583)

Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.20.1/CHANGES.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* [Backend modularization] `view-log` module (DEV-427) (#57628)

* [Backend modularization] Move anonymous-stats-related stuff into `analytics` module (DEV-437) (#57631)

* Bump org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server from 12.0.19 to 12.0.20 (#57579)

* Bump org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server from 12.0.19 to 12.0.20

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump com.taoensso/nippy from 3.4.2 to 3.5.0 (#56953)

Inspect dependency changes here: https://github.com/taoensso/nippy/blob/v3.5.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Bump com.ibm.icu/icu4j from 76.1 to 77.1 (#55241)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump thheller/shadow-cljs from 2.28.21 to 2.28.23 (#56657)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* `date(datetime)` integration branch (#57448)

* Empty

* kick ci

* Allow temporal type in addition to string for `date()`

* Add date(datetime) test

* Use cast for date for postgres

* Extend date() on mysql

* Extend date() on bigquery

* Extend date() at snowflake

* Extend date() to datetime on clickhouse

* Generalize `date()` to :sql

* Update changelog with `date(datetime)`

* Update helper text string for date

* Add e2e tests for date

* Also check to correct coercion of dates

* Better check

* kick ci

* Format code

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>

* Bump org.apache.poi/poi from 5.4.0 to 5.4.1 (#56355)

* Bump org.apache.poi/poi from 5.4.0 to 5.4.1

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump cider/cider-nrepl from 0.55.4 to 0.55.7 (#57576)

Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.55.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump org.postgresql/postgresql from 42.7.4 to 42.7.5 (#57314)

Inspect dependency changes here: https://github.com/pgjdbc/pgjdbc/blob/REL42.7.5/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump clj-kondo/clj-kondo from 2025.02.20 to 2025.04.07 (#56650)

* Bump clj-kondo/clj-kondo from 2025.02.20 to 2025.04.07

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.04.07/CHANGELOG.md

* Add kondo ignore to tests for new :missing-protocol-method linter

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump thheller/shadow-cljs from 2.28.21 to 3.0.4 (#57585)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Remove unused code in embedding data picker (#57700)

* Remove unused exported components

* Remove references to metrics

* Remove references to saved questions

* Remove irrelevant tests

* Remove unnecessary prop

* Fix more unit tests

* Remove more unnecessary code

* Fix failed unit tests

* Remove unnecessary prop

* speed up notification tests (#57763)

* Update logger presets (#57667)

* Update presets

* Update presets

* Update test

* Apply suggestions from code review

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* better snowplow errors when expecting the wrong number of good events (#57730)

* add ?. to make it more resilient

* add more logssss

* cy.log

* some nicer error message

* fix eventType

* removes leftover lines

* typos on comments

* Update e2e/support/helpers/e2e-snowplow-helpers.js

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Mihael Konjević <konjevic@gmail.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: github-automation-metabase <166700802+github-automation-metabase@users.noreply.github.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
Co-authored-by: Adithya Vardhan <imadithyavardhan@gmail.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
2025-05-09 14:38:45 +00:00
Nicolò Pretto
557e7d0f34 better snowplow errors when expecting the wrong number of good events (#57730)
* add ?. to make it more resilient

* add more logssss

* cy.log

* some nicer error message

* fix eventType

* removes leftover lines

* typos on comments

* Update e2e/support/helpers/e2e-snowplow-helpers.js

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-05-09 11:13:44 +00:00
lbrdnk
8b2a8b4d42 Update logger presets (#57667)
* Update presets

* Update presets

* Update test

* Apply suggestions from code review

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-05-09 11:16:32 +02:00
Ngoc Khuat
0e53e2bd21 speed up notification tests (#57763) 2025-05-09 07:44:33 +00:00
Mahatthana (Kelvin) Nomsawadi
8fa039f6dc Remove unused code in embedding data picker (#57700)
* Remove unused exported components

* Remove references to metrics

* Remove references to saved questions

* Remove irrelevant tests

* Remove unnecessary prop

* Fix more unit tests

* Remove more unnecessary code

* Fix failed unit tests

* Remove unnecessary prop
2025-05-09 06:51:43 +01:00
github-automation-metabase
1c5bc70adb Bump thheller/shadow-cljs from 2.28.21 to 3.0.4 (#57585)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-09 00:07:31 +00:00
github-automation-metabase
07235bbde0 Bump clj-kondo/clj-kondo from 2025.02.20 to 2025.04.07 (#56650)
* Bump clj-kondo/clj-kondo from 2025.02.20 to 2025.04.07

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.04.07/CHANGELOG.md

* Add kondo ignore to tests for new :missing-protocol-method linter

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 23:27:10 +00:00
github-automation-metabase
7c0ca3369b Bump org.postgresql/postgresql from 42.7.4 to 42.7.5 (#57314)
Inspect dependency changes here: https://github.com/pgjdbc/pgjdbc/blob/REL42.7.5/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 23:18:34 +00:00
github-automation-metabase
be86f32a0f Bump cider/cider-nrepl from 0.55.4 to 0.55.7 (#57576)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.55.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 22:09:49 +00:00
github-automation-metabase
d9147bd92c Bump org.apache.poi/poi from 5.4.0 to 5.4.1 (#56355)
* Bump org.apache.poi/poi from 5.4.0 to 5.4.1

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 21:58:39 +00:00
Eric Normand
d55b0e247a date(datetime) integration branch (#57448)
* Empty

* kick ci

* Allow temporal type in addition to string for `date()`

* Add date(datetime) test

* Use cast for date for postgres

* Extend date() on mysql

* Extend date() on bigquery

* Extend date() at snowflake

* Extend date() to datetime on clickhouse

* Generalize `date()` to :sql

* Update changelog with `date(datetime)`

* Update helper text string for date

* Add e2e tests for date

* Also check to correct coercion of dates

* Better check

* kick ci

* Format code

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-05-08 21:52:34 +00:00
github-automation-metabase
61b7eeda25 Bump thheller/shadow-cljs from 2.28.21 to 2.28.23 (#56657)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 20:53:47 +00:00
github-automation-metabase
3a8479078c Bump com.ibm.icu/icu4j from 76.1 to 77.1 (#55241)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 20:53:31 +00:00
github-automation-metabase
a743c27bcd Bump com.taoensso/nippy from 3.4.2 to 3.5.0 (#56953)
Inspect dependency changes here: https://github.com/taoensso/nippy/blob/v3.5.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 20:47:00 +00:00
github-automation-metabase
139d1605fa Bump org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server from 12.0.19 to 12.0.20 (#57579)
* Bump org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server from 12.0.19 to 12.0.20

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 20:45:10 +00:00
Cam Saul
a6f9bb8167 [Backend modularization] Move anonymous-stats-related stuff into analytics module (DEV-437) (#57631) 2025-05-08 13:22:09 -07:00
Cam Saul
b405045f94 [Backend modularization] view-log module (DEV-427) (#57628) 2025-05-08 13:21:54 -07:00
github-automation-metabase
a669530a55 Bump org.jsoup/jsoup from 1.19.1 to 1.20.1 (#57583)
Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.20.1/CHANGES.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 13:19:06 -07:00
github-automation-metabase
a6ef327bdd Bump refactor-nrepl/refactor-nrepl from 3.10.0 to 3.11.0 (#57584)
Inspect dependency changes here: https://github.com/clojure-emacs/refactor-nrepl/blob/v3.11.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 13:17:42 -07:00
Adithya Vardhan
dafbd09482 fix: toolbar button color not changing on hover (#56694) 2025-05-08 13:13:35 -07:00
Adithya Vardhan
87ca8ab2d3 fix: do not render gauge if grouping col is date (#56715) 2025-05-08 13:13:27 -07:00
github-automation-metabase
8827164777 Bump org.apache.calcite.avatica/avatica from 1.25.0 to 1.26.0 (#54171)
Inspect dependency changes here: https://github.com/apache/calcite-avatica/compare/avatica-1.25.0-rc0...avatica-1.26.0-rc0

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 19:56:01 +00:00
github-automation-metabase
8285908e3a Bump babashka/fs from 0.5.24 to 0.5.25 (#57575)
Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.25/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 12:27:13 -07:00
github-automation-metabase
58f4e0a9dd Bump io.github.tonsky/clj-reload from 0.9.4 to 0.9.5 (#57578)
Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.5/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 12:26:53 -07:00
github-automation-metabase
431184652f Bump com.amazonaws/aws-java-sdk-core from 1.12.782 to 1.12.783 (#57586)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 12:26:25 -07:00
github-automation-metabase
3cfcb03cf5 Bump com.google.guava/guava from 33.4.6-jre to 33.4.8-jre (#56952)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 12:25:40 -07:00
lbrdnk
76a5231a6f Shutdown index sync while its results are unused (#56885)
* Shutdown index sync while its results are unused

* Update tests

* Update mongo tests
2025-05-08 21:20:00 +02:00
github-automation-metabase
ab296e8d6c Bump commons-io/commons-io from 2.18.0 to 2.19.0 (#56654)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 19:19:07 +00:00
github-automation-metabase
fcb6e8415b Bump io.github.eerohele/pp from 9598f4c72b528480a85ea41651c45b08d1717428 to 4998a1fdd9d3713d7034d04509e9212204773bf2 (#57577)
Inspect dependency changes here: 9598f4c72b...4998a1fdd9

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 11:56:11 -07:00
Nemanja Glumac
38762f1b74 Add analytics for new entity creation being initiated (#57673)
This commit adds analytics to the:

1. New button being clicked
    - In the top app bar
    - From the empty collection
2. New menu individual items being clicked:
    - Dashboard
    - ~Question~ (not possible at the moment)
    - ~Native query~ (not possible at the moment)
3. An entity creation being initiated
    - Model from the /browse/models page
    - Metric from the /browse/metrics page
    - Collection from the collection header
    - Collection from the main nav sidebar
2025-05-08 20:44:35 +02:00
github-automation-metabase
d415393100 Bump org.apache.poi/poi-ooxml-full from 5.4.0 to 5.4.1 (#56357)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 11:33:17 -07:00
Sloan Sparger
7db950f952 [Admin] Convert people / group pages to RTKQuery (#57490)
* update components in frontend/src/metabase/admin/people/components to use Mantine components and remove deprecated component usage

* update people and group pages/modals to use more modern components

* use relative sizes

* fix user success modal not closing on "Done" confirm button click

* remove CS from PeopleListRow

* clean up admin/people/colors.ts

* lint fix

* people list footer fix

* pr feedback

* wip

* fix issues, people page updates, some clean up

* add unsaved files

* type fix, fetch user list from rktquery for PeopleList

* remove entity usage from unsubscribe modal, lint fix

* remove all remaining usages of user entity

* remove user entity

* test fixes, remove unused user schema

* bit of clean up

* qa pass - invalidate groups cache if user is deactivated/reactivated

* address pr feedback
2025-05-08 13:00:01 -05:00
Sloan Sparger
c9caad50a4 [Admin] Modernize components for People + Groups pages (#57365)
* update components in frontend/src/metabase/admin/people/components to use Mantine components and remove deprecated component usage

* update people and group pages/modals to use more modern components

* use relative sizes

* fix user success modal not closing on "Done" confirm button click

* remove CS from PeopleListRow

* clean up admin/people/colors.ts

* lint fix

* people list footer fix

* pr feedback
2025-05-08 11:50:57 -05:00
Nicolò Pretto
be81440458 remove unused slider component (#57745) 2025-05-08 18:02:52 +02:00
Nemanja Glumac
fc0a1777ec Fix flaky e2e test in the onboarding setup spec (#57735) 2025-05-08 16:07:56 +02:00
Nemanja Glumac
4c6c580964 Patch the metabot-v3 merge (#57731)
* Remove unused props from the "New" menu

* Remove Metabot code related to the "New" menu
2025-05-08 14:03:24 +00:00
metamben
d3fafe9cf2 Metabot v3 PoC (#52436)
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Mihael Konjević <konjevic@gmail.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: github-automation-metabase <166700802+github-automation-metabase@users.noreply.github.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-05-08 06:57:20 -04:00
Uladzimir Havenchyk
8fc63096b8 feat: add a link to field filter docs from dashboard sidebar with native question (#57687)
* feat: add a link to field filter docs from dashboard sidebar with native question

* oops

* add missing translation
2025-05-08 07:30:39 +00:00
Nemanja Glumac
f53785e010 Remove "Model" and "Action" from the "New" button menu (#57647) 2025-05-08 09:04:20 +02:00
Ngoc Khuat
ee5d61525c fix audit log to record external emails when sending notifications (#57679) 2025-05-08 07:03:41 +00:00
Ngoc Khuat
2f4a3d35c2 [Notification] reduce module apis (#57678) 2025-05-08 05:08:07 +00:00
Alexander Polyankin
c1763bd9d7 Fix parameter types! (#57677) 2025-05-08 01:16:33 +00:00
Ryan Laurie
22e028af3a Mark setup tests flaky (#57710)
* mark setup tests flaky

* add flake

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2025-05-07 17:00:28 -06:00
Cam Saul
e58ecd7290 [Backend modularization] Mega Renaming PR 1 (#57561)
* auth-provider => auth-provider.core

* enterprise/auth-provider

* `metabase.events.core`

* Move `sql-parsing-enabled` Setting into `query-analysis` (DEV-449)

* `metabase.events.core` (DEV-455)

* `metabase-enterprise.stats` => `metabase-enterprise.analytics.stats` (DEV-475)

* `enterprise/stale` cleanup (DEV-474)

* `enterprise/airgap` => `enterprise/premium-features`

* Appease Kondo

* Remove unused
2025-05-07 14:32:36 -07:00
Raphael Krut-Landau
a69c66d0e1 Remove zh from the list of supported translations (#57672)
We don't support the `zh` (Traditional Chinese) locale anymore – only `zh-CN` (Simplified Chinese), and `zh-HK` (Hong Kong), and `zh-TW` (Taiwan). Here's a [Slack discussion](https://metaboat.slack.com/archives/C6UBFU9GW/p1741983889165599).

So let's remove `zh` from the list of supported translations.

For some reason the list wasn't sorted alphabetically by language name - this PR fixes that too.
2025-05-07 16:43:16 -04:00
Cam Saul
29efdb4287 Remove unused :model/FieldUsage (#57556) 2025-05-07 12:33:19 -07:00
Cam Saul
655907c7bb Remove unused :model/TablePrivileges (#57551)
* Remove unused `:model/TablePrivileges`

* Remove another stray reference
2025-05-07 12:31:33 -07:00
Nathan Voxland
8c57a1b48a Support bigint model_pks in model_index_value (#57661) 2025-05-07 14:25:55 -05:00
Noah Moss
770207290a Don't add isCollapsed nodes for paths not in the data (#57704) 2025-05-07 11:13:52 -07:00
Kamil Mielnik
802890a8a3 SEM-229 Hide numerical semantic types on string-based fields (#57606)
* Remove hack

* Update test
2025-05-07 19:33:59 +02:00
lbrdnk
3709509a67 Migrate hacked semantic type fields to use coercion (#57518)
* migrate hacked fields

* Format and join subq work differently

* Add engine filtering to migration

* Update migr

* Comment
2025-05-07 19:33:10 +02:00
Cam Saul
0b91af3d7c Functions with side effects should generally end in ! (#57615) 2025-05-07 09:14:10 -07:00
Ryan Laurie
c0d38f98a7 stabilize flaky font unit test (#57699) 2025-05-07 09:03:46 -06:00
Sloan Sparger
6a34d8b120 [Admin] Remove styled component usages from people and group pages + components (#57303)
* convert UnsubscribeUserModal and UnsubscribeUserForm components

* convert UserActivationModal to TS

* convert UserPasswordResetModal to TS

* convert UserSuccessModal to TS

* convert PeopleList and PeopleListingApp components to TS

* convert PeopleListRow to TS

* convert use-people-query to TS

* fix deprecated usages of google_auth and ldap_auth with sso_source field

* fix lint

* convert GroupsListing, GroupsListingApp, and AddRow components to TS

* convert lib/groups, AdminContentTable, and AddMemberRow to TS

* convert GroupDetailApp and GroupDetail to TS

* fix import

* convert GroupSummary to TS, make adjustments to other converted files to make types happy

* remove people/components/SearchInput and convert usage to mantine component to avoid TS migration

* remove styled component usage from people and groups pages and components

* adjustment to people listing app
2025-05-07 09:39:43 -05:00
Nicolò Pretto
319b45efb0 make LocaleProvider change the return of useLocale and set the locale used by Mantine (#57534)
* refactor: rename test file to tsx to have hopefully better diff in the
next commit

* fix EMB-360: Make Mantine components use the locale from LocaleProvider

* close EMB-373: make useLocale return the locale from LocaleProvider if
present
2025-05-07 12:25:12 +02:00
Romeo Van Snick
ce33f7c3b9 Fix missing snippet create button (#57479)
* Use Mantine dropdown for snippet menu

* Fix search icon in snippet header too

* Remove default ICON_SIZE

* Fix MIN_SNIPPETS_FOR_SEARCH

* Add createSnippet helper

* Add repro for metabase#57441

* Add test for snippet search

* Move snippet helper to api

* Use actual ref for input

* Simplify header search rendering

* Use SidebarHeader for snippet sidebar

* Use Flex for most components

* Simplify padding

* Use class component for archived snippets

* Use class for header button

* Use direct properties

* Rely less on custom css

* Fix header padding

* Fix e2e tests

* Remove unused eslint-disable

* Add type annotation

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-05-07 11:40:42 +02:00
Mahatthana (Kelvin) Nomsawadi
251fb3d05c Copy multi-stage components (#57436)
* Move SimpleDataPicker to a new directory preparing for new components

* Use the embedding data picker from a new folder

This requires turning the component into a plugin, which we'll do in the
next commit.

* Move plugin property to a more appropriate place

* Implement embedding multi-stage data picker as an EE plugin

* Add DataSourceSelectorProps

* Remove reference to query builder data picker

* Fix failing unit tests

* Move embedding data picker components to a proper location
2025-05-07 09:27:04 +01:00
Ryan Laurie
a59d8af558 Update Appearance Settings (#56468)
* Update Appearance Settings

* unit test additions + updates

* update e2e tests

* test updates

* unit test fix

* fix lint errors

* obey the linter

* add test coverage

* add more tests

* support env var override ui

* remove dead code

* nicer routing

* useDisclosure

* stabilize test
2025-05-06 17:22:54 -06:00
Edward Paget
e8ff64fc77 fix: failing kondos on master (#57662)
* fix: failing kondos on master

* fixup! remove all external references to permissions group membership

* fixup! missing export
2025-05-06 15:44:31 -07:00
Ryan Laurie
0beb4fd1ec Add build-args to uberjar job (#57633)
* add build-args to uberjar job

* better sha
2025-05-06 13:01:02 -06:00
Nick Fitzpatrick
f508020b18 Watermarks in development instances - App viz (#57620)
* adding watermark for dynamic viz

* starting to put together e2e tests for watermarks

* adding unit test

* adding loki tests

* adding more e2e tests

* changing test id

* adding e2e tests on chart interactivity

* fixing type error
2025-05-06 23:51:25 +05:30
Aleksandr Lesnenko
61b06cb9ca update chart settings types (#57657) 2025-05-06 13:28:40 -04:00
Case Nelson
c21a754c1a fix: redshift pg_enum error when missing base types (#57397) 2025-05-06 09:49:36 -06:00
github-actions[bot]
cebcccd81a Update translations 2025-04-29 (#57372)
* Update translation sources 2025-04-29

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-05-06 09:21:55 -06:00
Nemanja Glumac
479f6ec15e Remove "Collection" option from the "New" button menu (#57649)
Resolves PRG-29 by removing the "Collection" entry from the main "New" menu.
2025-05-06 17:17:12 +02:00
Nemanja Glumac
e42004d8bd Remove "Metric" option from the "New" button menu (#57641)
Resolves PRG-27 by removing the option to create Metric from the main "New" menu.
2025-05-06 15:03:39 +02:00
Romeo Van Snick
3b9ba47ce5 Clean up helper text utils (#57382)
* Split up config into categories

* Break out clauses into groups

* Add duplicate name check

* Allow setting shared options

* Add category to mbql clause config

* Rename groups

* Use enum for category

* Build examples using helper functions

* Build ExpressionParts directly in helper-text

* Flatten examples

* Wrap example in function

* Enable late-binding for args

* Unwrap example

* Remove get name and get description wrappers

* Remove getHelpDocsUrl helper

* Simplify example fn

* Add missing export

* Remove getFunctionByStructure

* Simplify help text helpers

* Rename structure to displayName

* Make args required

* Manually type clause definition type

* Merge HELPER_TEXT_STRINGS into config

* Move help text helpers to separate file

* Use data from MBQL_CLAUSES instead of HELPER_TEXT_STRINGS

* Allow defining stuff in config

* Move help text into config

* Remove fallback to HELPER_TEXT_STRINGS

* Remove helper-text-strings

* Allow more stuff to be optional

* Build clause in getClauseDefinition

* Avoid self-referential types

* Use getClauseDefinition in completer

* Handle new args definition

* Handle null instead of undefined

* Enforce type on all argument definitions

* Enforce name on all argument definitions

* Get clause defns

* Fix types

* Simplify tests

* Remove unnecessary guard

* Avoid creating unnecessary functions

* Move defineClauses to separate module

* Remove any in config

* Rename helper-text-strings test to help-text
2025-05-06 14:53:52 +02:00
John Swanson
6376201ee2 Implement Tenant Groups (#57050)
* Implement Tenant Groups

- normal users cannot be added to a tenant group

- tenant users cannot be added to a normal group

- tenant groups cannot receive write access to any collection

- tenant groups cannot receive any access to the audit collection

- tenant groups cannot receive any application permissions

* Add a setting to turn tenants off and on

When the setting is turned on:

- create the All External Users group, with
`magic_group_type=all-exsternal-users` and `is_tenant_group=true`

When the setting is turned off:

- make sure there are no remaining tenants or tenant users

- delete the All External Users group

* Remove the need for memoized `tenant?` functions

* Fix tests

* allowe using with-temp with perms group membership

* fix more tests

* remove unnecessary bindings

* Put setting behind a feature flag

* Don't read setting from env

closes adm-648
closes adm-657
closes adm-649
2025-05-06 05:50:11 -07:00
Phoomparin Mano
7f92780e9e fix(sdk): custom GeoJSON maps does not load due to wrong domain (#57539) 2025-05-06 19:02:48 +07:00
Nemanja Glumac
9e13274e72 Add a "new collection" button to the collection header (#57616)
Resolves PRG-25

This PR adds a new button to the collection header menu. The button simply opens a new collection modal (lets you create a new collection). There are two important things to note about this change:

1. This button shows only when a user has a curate permissions for the current collection
2. This change required adding a new icon to our design system, which was approved by Maz.
2025-05-06 13:51:26 +02:00
Phoomparin Mano
92fac6cabb fix(sdk): updating collection's entity id crashes InteractiveQuestion and CollectionBrowser (#57529) 2025-05-06 18:51:14 +07:00
Ngoc Khuat
aca9b98060 move context info to after the log message (#57588) 2025-05-06 07:18:06 +00:00
Nemanja Glumac
d25b43a3cb Add a "new collection" button to the main sidebar (#57605)
Resolves PRG-20

This PR replaces the old `...` menu next to the "Collections" sidebar header. As a reminder, this menu was previously triggering a popup with two items:

1. New collection
2. Other users' personal collections (in case the user is an admin)

We're now improving the UX and replacing this menu with two distinct items:

1. The `+` icon that creates a new collection directly
2. The new individual sidebar link that leads to other users' personal collections (again, only if admin)
2025-05-06 07:03:35 +00:00
Nemanja Glumac
fd2f465639 Add a new model button to the browse models page (#57555)
Resolves PRG-21
2025-05-06 08:16:47 +02:00
Fraser
b7f5e23707 Create new PublicSharingSettingsPage component (#57465)
* Create new PublicSharingSettingsPage component

* Add unit tests
2025-05-06 16:00:56 +12:00
Edward Paget
9e7f0b903a fix: remove version-info from settings list api (#57505)
* fix: remove version-info from settings list api

* fixup! cljfmt

* fixup! remove extra assignment
2025-05-05 18:04:34 -05:00
Alex Yarosh
232ce151c3 help page (#57619) 2025-05-05 21:31:07 +00:00
Cam Saul
5d6b82d6ee Fix Kondo failures not causing CI failures (#57618) 2025-05-05 21:01:28 +00:00
Kyle Doherty
1b0ceb2c48 Update Title component sizes to match Figma (#54750)
* update title sizes to match figma - add multi line title stories for lineheight examples

* little more line height in modal titles

* little fixes

* more little fixes

* reduce smartscalar title size

* Update Loki Snapshots

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-05-05 13:41:48 -06:00
Nick Fitzpatrick
c42252c802 Add watermark to static viz chart renderings (#57553)
* add watermark to static viz chart renderings

* adjusting unit test
2025-05-05 22:38:28 +05:30
Edward Paget
dd9c170d8d fix: add table-level sql based permission query (#57541)
* fix: add table-level sql based permission query

Some places in our code we may be returning fewer tables than a user has
access to because we load a limited number of models from the database
then apply permissions filters to those. This provides a subquery based
check for table permissions that we can use in other queries to do the
same kind of test for table access that we would do on the clojure-side.

Co-Authored-By: Nathan Voxland <nathan@metabase.com>

* fixup! restore check-permissions-for-model impl

* Update src/metabase/models/table.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* fixup! caluse -> clause spelling

* fixup! reformat malli annotations; add docstring

* fixup! add Literal type to honeysql helpers

* fixup! restore accidentally deleted clause

---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-05-05 11:48:38 -05:00
Ryan Laurie
c88a5b5bc5 remove use modal hook (#57601) 2025-05-05 10:39:07 -06:00
github-automation-metabase
aa0bd12ed3 Bump net.snowflake/snowflake-jdbc from 3.23.2 to 3.24.0 (#57587)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <riley@metabase.com>
2025-05-05 11:20:53 -04:00
github-automation-metabase
a0bee28c26 Bump org.eclipse.jetty/jetty-server from 12.0.19 to 12.0.20 (#57581)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-05 14:04:27 +00:00
Ngoc Khuat
ea279ca19b Email domain check when adding notification recipients (#57416) 2025-05-05 13:59:54 +00:00
github-automation-metabase
a8656deb25 Bump org.eclipse.jetty.ee9/jetty-ee9-servlet from 12.0.19 to 12.0.20 (#57580)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-05 13:48:41 +00:00
Nick Fitzpatrick
8ebc12b933 Register Dynamic Shortcuts (#56812)
* Register Dynamic Shortcuts

* regex keys

* things more-less working

* adding admin shortcuts, patching kbar to pass keyboard event

* fixing type issues

* only emit events on keyboard shortcut executions

* remove wait
2025-05-05 17:35:30 +05:30
Nick Fitzpatrick
edb69d6dbb properly invalidate collections when x-raying a table (#57495) 2025-05-05 17:34:15 +05:30
Kamil Mielnik
8aac6aac61 Add label to CodeEditor in LogLevelsForm (#57524)
* Add label to CodeEditor in LogLevelsForm

* Remove required for consistency
2025-05-05 17:56:16 +07:00
Nemanja Glumac
691d1430f8 Add a new metric button to browse metrics page (#57496)
Resolves PRG-22
2025-05-05 12:53:00 +02:00
Nicolò Pretto
2adc027178 fix(sdk): manual fixes for module level ttag calls causing broken translations (#57391)
* fix: filter button labels

* fix: part of EMB-335, uiName: t => getUiName: () => t

* fix linting issue

* fixed unit test mock missing getUiName
frontend/src/metabase/visualizations/components/Visualization/Visualization.unit.spec.js
missing

* make application-permissions.cy.spec.js pass
2025-05-05 10:11:02 +02:00
Aleksandr Lesnenko
e3e035ac6e remove old static pie chart interface (#57545) 2025-05-03 00:56:14 +00:00
Alexander Polyankin
c7ee8b29d2 Fix isDate check in legacy (#57185) 2025-05-03 00:04:44 +00:00
Vamsi Peri
a23481188c Fix for Grey areas around the cards when exporting to PDF (#56928)
* cursor says this could fix the issue

* harder vibe coding

* remove handling of made up by llm elements that do not exist

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-05-02 22:49:49 +00:00
Oleksandr Yakushev
0a4625fdbe [svg] Pool static-viz-context objects (#56648) 2025-05-02 23:34:37 +03:00
Nathan Voxland
ac81ee5c25 Fixed catching of 403 errors from harbormaster (#57504) 2025-05-02 14:04:34 -05:00
Cam Saul
99613cfe0d [Backend modularization] sample-data module (#57511)
* [Backend modularization] `sample-data` module

* Remove duplicate ns form
2025-05-02 11:51:47 -07:00
Nathan Voxland
e515a2d6d0 Further limit tsvector size since it's concatinated (#57514) 2025-05-02 13:20:26 -05:00
Riley Thompson
0c0aaf5490 druid jdbc localdate set param impl (#57507) 2025-05-02 10:56:28 -04:00
Riley Thompson
0bc9646ca0 set timezone for identity-hash-test tests (#57530) 2025-05-02 10:56:14 -04:00
Case Nelson
40507a0e21 fix: include system catalog in databricks multicatalog (#57484)
* fix: include system catalog in databricks multicatalog

* Fix formatting
2025-05-02 08:53:37 -06:00
github-automation-metabase
562617890f Bump com.facebook.presto/presto-jdbc from 0.291 to 0.292 (#56659)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <riley@metabase.com>
2025-05-02 10:43:22 -04:00
github-automation-metabase
9e4fb1181c Bump io.trino/trino-jdbc from 431 to 475 (#57319)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <riley@metabase.com>
2025-05-02 10:43:11 -04:00
github-automation-metabase
6422238118 Bump com.clickhouse/clickhouse-jdbc from 0.8.4 to 0.8.5 (#57318)
* Bump com.clickhouse/clickhouse-jdbc from 0.8.4 to 0.8.5

Inspect dependency changes here:

* Fix test for jdbc driver upgrade

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <rileythompson99@gmail.com>
2025-05-02 10:42:04 -04:00
Romeo Van Snick
c4cb9263f6 Do not set card when using browser back button (#57389)
* Add reproduction for metabase#56775

* Pass the correct card to the location change

* Unwrap card when navigating to model or metric
2025-05-02 13:42:05 +02:00
Romeo Van Snick
003777b77d Clean up expression config (#57109)
* Rename ALL_NODES to NODE_TYPE

* Remove unnecessary name override

* Remove unused EXPRESSION_OPERATOR_WITHOUT_ORDER_PRIORITY

* Use precedence from pratt compiler

* Move EDITOR_FK_SYMBOLS to identifier module

* Lift const descriptor

* Remove unused characters config

* Remove identifierAlwaysQuoted from EDITOR_QUOTES config and make the behaviour the default

* Move identifierDefaultQuote out of config and hard-code the behaviour

* Flatten default quotes config and move default into string module

* Remove wrong comment

* Use parseOperatorType to find operator type

* Remove separate operator groups

* Remove unused FUNCTIONS variable

* Remove barely used getExpressionName

* Use Boolean token to parse booleans

* Remove True and False from operators

* Rename Star and Slash to Multiply and Divide

* Remove FIELD_MARKERS

* Simplify config definition

* Inline getDescriptionForNow

* Move OPERATOR check to formatter

* Use normal quotes in config

* Split up MBQL_CLAUSES to avoid duplicating names

* Split clause helpers into separate files

* Fix sort order in completion tests

* Move operators to a separate group in config

* Use EXPRESSION_OPERATORS in formatter

* Export using star

* Rename OPERATOR to PUNCTUATOR

* Rename parseOperatorType to parsePunctuator

* Rename parseOperatorType to parsePunctuator

* Add helper for potential function prefixes

* Remove unused OPERATORS

* Remove superflouous helper

* Inline formatCallExpression

* Use Lib.ExpressionOperator where possible

* Remove impossible case for expression

* Inline isLogicOperator

* Rename variable for clarity

* Deduplicate helpers

* Move formatter helpers into utils

* Simplify helper

* Fix import order

* Remove reliance on PUNCTUATOR type

* Fix variable name

* Simplify punctuator definition

* Clean up lexifier

* Flatten lexifier results

* Remove errors for parser results

* Flatten parser result

* Simplify parser tests

* Remove cast

* Remove unused import

* Translate all error messages in formatter

* Simplify type

* Use sentence case name for type
2025-05-02 13:19:47 +02:00
Alexander Solovyov
76133ade49 [serdes] break endless loops (#57482)
When making sure stuff can load even with a loop, the circuit breaker was removed, leading to endless loops. That
would happen if the data causing the loop wasn't stripped properly. Right now if stripping things once did not help
and the entity is in the pipeline again, the process will break (with hopefully enough data to detect why).

This also changes the logic from exception to just recursive calls. Plus it's back at skipping all dashcards in a
Dashboard instead of just skipping visualization logic, which should make for a way faster processing (less deep for
sure). Plus it tries to improve logging a bit so it's easier to understand what's going on in complex cases.
2025-05-02 10:30:38 +00:00
Nicolò Pretto
f29902368b sdk-storybook: disable reactDocGen to speed up storybook (#57440) 2025-05-02 10:47:58 +02:00
Sébastien
2c106817a4 closes viz-360 esc key should not add a recipient (#57253)
* closes viz-360 esc key should not add a recipient

* better code in e2e test to avoid eslint-disable-next-line
2025-05-02 09:47:19 +02:00
Sébastien
da5cd4e7cf Closes VIZ-349 unknown date style warnings (#57263)
* closes VIZ-349 unknown date style warnings

* safer approach
2025-05-02 07:20:03 +02:00
Alexander Polyankin
04bf793795 Drop param_values (#57508) 2025-05-02 00:39:30 +00:00
Fraser
fa9ea2a5a9 Create EmailSettingsPage (#56760)
* Create EmailSettingsPage

* Add email settings to mocks

* Create ReplyToWidget

* Add unit tests for email page

* Handle boolean conversion in AdminSettingInput
2025-05-02 11:45:51 +12:00
Cam Saul
a04e9bd9b0 [Backend modularization] testing-api module (#57503) 2025-05-01 15:53:14 -07:00
Cam Saul
85b3ab5d5f [Backend modularization] Move remaining Slack namespaces into channel module (#57502) 2025-05-01 15:09:14 -07:00
Cam Saul
41e3110f20 [Backend modularization] create new api-keys module (#57497)
* [Backend modularization] create new `api-routes` module

* Fix test 🔧

* [Backend modularization] `api-keys` module
2025-05-01 14:22:52 -07:00
Cam Saul
213535773b [Backend modularization] create new api-routes module (#57492)
* [Backend modularization] create new `api-routes` module

* Fix test 🔧
2025-05-01 20:16:03 +00:00
Jeff Bruemmer
c1e301eda6 docs - note on role setting (#57268)
* note on role setting

* format
2025-05-01 16:15:16 -04:00
Edward Paget
d82bf686b6 deps: remove simpleclient_jetty and javax.servlet (#57487) 2025-05-01 18:58:56 +00:00
Oisin Coveney
fe3792cda9 Convert AutomaticDashboardApp to a functional component (#57390) 2025-05-01 17:53:37 +00:00
lbrdnk
8278732860 Fix cumulative aggregations legacy transform (#57258)
* Fix cum-sum and cum-count legacy transform

* Address review remarks

* Adjsut test

* ag idents

* dissoc-in
2025-05-01 09:34:57 +02:00
Oisin Coveney
0fb515cbc6 TS Conversion: Automatic Dashboard App (#57075) 2025-05-01 08:09:35 +01:00
Cam Saul
2d038e518e Remove Legacy Metrics code from the backend (#57401)
* Remove Legacy Metrics code from the backend

* Code cleanup

* Test fix 🔧

* Test fix 🔧

* PR feedback

* Extra test

* Revert some X-Rays changes

* Remove commented-out test

* Test fixes 🔧
2025-04-30 19:06:26 -07:00
Cam Saul
fc56c810f9 [Backend modularization] native-query-snippets (#57460) 2025-04-30 23:18:03 +00:00
Riley Thompson
fd18b7708f Try specifying tz for identity hash test flake (#57408) 2025-04-30 22:40:06 +00:00
Cam Saul
1c113a608e [Backend modularization] upload module cleanup (#57414)
* `upload` module cleanup

* Fix MySQL

* More keyword fixes 🔧

* Keep uploads sorted
2025-04-30 15:15:58 -07:00
Noah Moss
5fabb3e1ec Fix subtotal label formatting for xlsx pivot exports (#57452)
* Fix subtotal label formatting for xlsx pivot exports

* untangle circular dep
2025-04-30 14:57:49 -07:00
Nathan Voxland
6da77fce6f Reindex immediately on start-up if existing table is old (#57159) 2025-04-30 16:39:46 -05:00
Riley Thompson
f947b70c35 Restrict Mongo sandboxing with saved questions (#56983)
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-04-30 17:32:52 -04:00
bryan
90b9fea551 fix docs bump workflow (#57454) 2025-04-30 20:47:26 +00:00
bryan
8574e882e9 Remove non-doc branches before sending workflow trigger (#57446) 2025-04-30 15:50:42 -04:00
lbrdnk
609807dc33 Fix sorting by aggregation expression with cumulative function works (#57292) 2025-04-30 20:24:30 +02:00
Alex Yarosh
698012db51 Update countif.md (#57373) 2025-04-30 14:12:24 -04:00
Edward Paget
8006d49537 fix: move internal stats for module organization (#57430) 2025-04-30 17:50:33 +00:00
Cam Saul
0c154e49de [Backend modularization] cache module (#57410)
* [Backend modularization] `cache` module

* Update module config

* Update Setting references
2025-04-30 09:43:46 -06:00
Edward Paget
eb3cc6d1cc feat: add prometheus metric for quartz task states (#56994)
* feat: add prometheus metric for quartz task states

Adds a new quartz_task_state metric that will report to prometheus the
states of all quartz jobs running on a metabase instance using a guage.

Each task state is reported as a label and we also report a state for
tasks that are executing.

All hosts on a metabase cluster _should_ report the same value for these
metrics if they are scraped at the same time, and we need to consider if
the additional DB load is okay since this does query the database during
a prometheus scrape to report this metric.

* fixup! add job-name tag and histogram of job time
2025-04-30 13:31:08 +00:00
Nicolò Pretto
af3156b9dd add locale selector to sdk storybook (#57393)
* add locale selector to sdk storybook

* clarify the default value and change to have objects as items
2025-04-30 15:12:40 +02:00
Alexander Polyankin
0f158889c6 Handle submit in dashboard filter widgets (#57388)
* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit

* Handle submit
2025-04-30 08:11:58 -04:00
Alexander Polyankin
85411a4abc Apply filter split button (#57215)
* Add filter add button

* Add filter add button

* Add filter add button

* Add filter add button

* Add filter add button

* Add filter add button

* Add filter add button

* Add filter add button

* Add filter add button

* Fix E2E

* Fix E2E

* Fix E2E

* Fix back button

* Fix back button

* Fix back button

* Fix back button

* Fix back button

* Fix back button

* Fix back button

* Remove extra source abstraction
2025-04-30 06:21:07 -04:00
Timofey Kachalov
1586c15e04 Add Access-Control-Max-Age header to cache CORS preflight requests made by SDK (#57383) 2025-04-30 11:55:52 +04:00
Timofey Kachalov
827c5d8b2e Update Shoppy Sample App Tests to work with App DB Dump (#57250) 2025-04-30 11:17:49 +04:00
Cam Saul
6d588fef7a [Backend modularization] embedding module (#57409)
* Embedding module

* Embedding module

* Fix lint errors

* Fix circular references

* Remove reference to renamed namespace
2025-04-29 16:58:58 -07:00
Cam Saul
c1d7e63ac0 [Backend modularization] Move premium-features API into module and other misc cleanup (#57404)
* [Backend modularization] Move `premium-features` API into module and other misc cleanup

* Fix Search Settings

* Fix

* Fix removed namespace

* Test fix 🔧
2025-04-29 15:30:17 -07:00
Cam Saul
486a5904a4 [Backend modularization] task-history module (#57369)
* [Backend modularization]  module

* Add init namespaces

* Test fix 🔧

* Test fixes 🔧

* [Backend Modularization] `task-history` module

* cljfmt
2025-04-29 14:57:15 -07:00
Noah Moss
b0c1eddc38 Quarantine cypress flakes in download format test + small correctness fix (#57392)
* try to fix cypress download format flakes

* handle unset last_table_download_format

* more test tweaks

* make tests shorter, refactor, and add wait periods

* rearrange more code

* remove the waits, quarantine tests as flaky

* move cy.intercept to right before reload

* skip tests again

* unravel .then calls
2025-04-29 21:38:16 +00:00
Nathan Voxland
ff6f759dbd Delete indexed rows from the search index which correspond to deleted rows (#57086) 2025-04-29 16:29:53 -05:00
Ryan Laurie
06d74f2209 Map settings array on fetch (#57367)
* map array on fetch

* fix types
2025-04-29 15:28:51 -06:00
Case Nelson
b11300d091 feat: Implement multi-catalog for databricks (#57148)
* feat: Implement multi-catalog for databricks

* Fix schema for nil

* Add tests for joins on multi-catalog

* Fix multicatalog driver name

* Remove require

* Alphabetize drivers

* Add changelog

* Fix tests

* Fix tests

* Do not sync system catalogs

* Address review comments

* Update connection properties

* Update example to make clear its a schema
2025-04-29 14:57:36 -06:00
Cam Saul
01b2c8c140 [Backend modularization] settings module (#57366)
* [Backend modularization]  module

* Add init namespaces

* Test fix 🔧

* Test fixes 🔧
2025-04-29 13:32:18 -07:00
Nemanja Glumac
2ab279f7bb Add unit tests coverage for branded export utils (#57358)
* Add basic unit test coverage for export branding utils

* Add tests for `getChartFileName` util
2025-04-29 21:17:07 +02:00
Nathan Voxland
cfd1cd8c3b Handle deleted connections in harbormaster (#57356) 2025-04-29 13:14:35 -05:00
Nathan Voxland
a7ff114fed mb/mb should be able to get an mb_dev_* token (#57363) 2025-04-29 09:10:49 -05:00
Alan Molina
6b5b200b71 Fix typo on collections.md (#52657)
Just removing an additional square bracket in the docs.
2025-04-29 09:09:11 -04:00
metamben
e8acf5e4b1 [SEM-219] Humanize error message even more (#57205)
* [SEM-219] Humanize error message even more

To provide the customized error message, the type check built into the defendpoint framework has to be disabled, which
results in less specific API documentation.

(Malli has an experimental feature we currently don't use for looking up humanized errors from parent schemas, that
would let us configure the error message AND keep the input type information.)
2025-04-29 15:51:34 +03:00
Ryan Laurie
a180c257e1 Refactor Build + Docker Uberjar Job (#57298)
* rewrite uberjar workflow

* test

* fix

* fix

* fix

* fix

* fix

* fixes

* dont make docker sad

* remove test code

* remove metabot shenanigans

* address review comments

* different secrets handling

* remove test code
2025-04-29 06:22:03 -06:00
github-automation-metabase
f990334130 Bump com.gfredericks/test.chuck from 0.2.14 to 0.2.15 (#56651)
Inspect dependency changes here: https://github.com/gfredericks/test.chuck/blob/test.chuck-0.2.15/changes.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-29 10:30:07 +00:00
Nemanja Glumac
ebd7ea407f Use custom redux import to remove type casting (#57362)
Resolves PRG-13
2025-04-29 09:46:47 +00:00
lbrdnk
79daf9d2bd Use case statment to filter metrics (#55094)
* Test comparing  case vs filtered ags

* Add test and update case definition

* Add logging to check CI, mark as driver ns

* Remove metadata to see which driver tests run

* add failing op for some drivers

* Use case to filter metric ag

* Filter in case

* Existing tests update

* WIP Respect expression deduplication

* Move transformation right after metric fetch

* Update test

* Aggregation maps to be used in tests

* Simplify metric transform

* New tests

* Cleanup

* Cleanup

* Cleanup

* Fix equality

* Cleanup

* Cleanup equality

* Simplify test

* Tolerate float deviation

* Feature dependent aggregations

* Update test

* Fix value formatting

* Add var to std dev ags

* Update the filtering logic

* Speculate

* Adjust tests

* Update test

* Kondo

* Adjust test for starburst

* Remove debug def

* Apply suggestions from code review

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Adjust naming

* Comment

* fresh-uuids into definition

* Add shortcut for empty condition

* Adjust meta and case default

* Remove now redundant condition

* Docstring

* Indentation

* Remove dev leftover

* Remove dev leftover

* Update tests and distinct-where

* Nullary aggregations map

* Distinct-where feature

* Fix formatting

* Adjust e2e test

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-04-29 09:48:55 +02:00
Sloan Sparger
d8cd6914d6 [Admin] Migrate groups pages + components to TS (#57232)
* convert UnsubscribeUserModal and UnsubscribeUserForm components

* convert UserActivationModal to TS

* convert UserPasswordResetModal to TS

* convert UserSuccessModal to TS

* convert PeopleList and PeopleListingApp components to TS

* convert PeopleListRow to TS

* convert use-people-query to TS

* fix deprecated usages of google_auth and ldap_auth with sso_source field

* fix lint

* convert GroupsListing, GroupsListingApp, and AddRow components to TS

* convert lib/groups, AdminContentTable, and AddMemberRow to TS

* convert GroupDetailApp and GroupDetail to TS

* fix import

* convert GroupSummary to TS, make adjustments to other converted files to make types happy

* remove people/components/SearchInput and convert usage to mantine component to avoid TS migration
2025-04-28 19:09:20 -05:00
Eric Normand
85194c8080 Extend integer() cast function to accept floats (#56817)
* Add float cases to integer cast testing

* Update types of integer mbql expression

* Better messages for tests

* Add rounding test and specialize for redshift

* Don't use extreme values for redshift

* Add e2e tests for float -> integer casts

* Update helper text for integer

* Change test message.

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* Helper function to convert to integer

* Appease the kondo

* More accurate comment

* Update arithmetic.cljc

* Refactor to use better ->integer implementation for SQL dbs

* kick ci

* Missed an argument

* Round properly for inline constants

* Add String->Integer and Float->Integer coercion strategies

* Add MongoDB string->integer and float->integer coercions

* Fix types in coercion test

* Also cast in mongodb coercion

* Use NUMBER(p) type in Oracle

* Spark SQL needs explicit round()

* SQLite needs explicit round()

* SQL Server needs explicit round()

* Clickhouse cast to float first

* SQLite needs to cast to float first so it can round

* SQL Server needs to cast to float so it can round

* Mongo needs to cast to float before rounding

* Spark SQL needs to cast to float so it can round

* Revert converting multimethod ->integer to defn

* Remove cast-integer multi-method and restore ->integer

* Update `integer-dbtype` in changelog

* Fix oracle integer type

* Fix spark sql casting

* Databricks driver needs to round

* kick ci

* Use ->integer in coercion

* Helper function for cast to integer with round

* kick ci

* Remove unnecessary ->float implementation

* Fix cljfmt precommmit hook

* Fix clickhouse returning bigdecimal

* Handle raw values in untyped-inline-value

* This came in with the merge

* Allow integer(float) and integer(string)

* Remove stray println

* Work for known types only

* Test for converting literals at compile time

* Update mysql

* Fix timezone test failing on null week-of-year

* Update fe test for float coercion

* Doh! Typo.

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-04-28 18:34:36 -05:00
Cam Saul
a32c124933 [Backend Modularization] query-analysis module cleanup (#57360)
* Move QueryAnalysis model into `query-analysis` module

* Add `metabase.query-analysis.settings`

* Move `query-analysis-enabled` Setting

* Update modules config
2025-04-28 22:53:20 +00:00
Aleksandr Lesnenko
b0065a0c8e fix invalid tooltip on interpolated values (#57305)
* fix invalid tooltip on interpolated values

* specs, timezone issues for interpolated datums

* fix waterfall, scatter

* update e2e spec after fixing timezone issue

* fix e2e failures

* specs
2025-04-28 18:07:48 -04:00
Aleksandr Lesnenko
a43bdf804d pivot table: show subtotals for a single item (#56988)
* add viz setting fe

* ClJS changes

* Fix up some BE tests

* fix last test

* spec, hint

* specs

* review

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2025-04-28 21:27:16 +00:00
Edward Paget
3584a5c83b fix: avoid deadlocks by not holding connection (#56524)
Avoid the possiblity of deadlocks during cached query processing by no
taking the connection using with-connection and instead just selecting
the cached result using toucan.

I _think_ this connection holding was introduced under the assumption
that we could 'stream' a binary column from postgresql using the
.getBinaryStreaming jdbc method. However postgres requires binary
columns to be full read and written and so we are unable to stream
results from that column, so this operation ends up being the same as
just querying the column normally.

Because we are not streaming the result in it seems safe to just yeild
the connection back to pool so it can shared with other requests.
2025-04-28 15:52:02 -05:00
Noah Moss
8ccc4df47d Remember last download format in user kv store (#57155)
* initial implementation

* e2e test

* tweaks

* fix e2e test + refactor

* reduce unneeded comments

* clean ns

* fix unit tests

* fix e2e test

* disable userKV when no user is logged in

* fix up a number of unit tests

* refactor out BaseQuestionDownloadPopoverProps with two wrapper components to avoid using the user kv hook in public/embedded contexts

* fix up types

* fix up e2e test

* use ?. syntax
2025-04-28 15:57:13 -04:00
Noah Moss
1a4744e18c Hide email domains for non-admin users without settings access (#57300)
* hide email domains for users without settings access

* fix test

* fix up e2e test

* update BE setting visibility

* Revert "update BE setting visibility"

This reverts commit b3728ad21d.

* remove commented-out line
2025-04-28 19:45:19 +00:00
metamben
75dd83ba81 Prevent falling back on type before cast when qp/ignore-coercion (#57095)
Fixes #56886

This is assuming that qp/ignore-coercion is set to avoid repeated casting.  That means, that we should type is as if
the cast has happened.
2025-04-28 19:36:26 +03:00
Riley Thompson
3e4d4a5116 Disable sqlite for array-query-can-be-cached-test (#57302)
* disable sqlite
2025-04-28 15:58:34 +00:00
Oisin Coveney
e26c89311e Remove Toaster HoC (#57341) 2025-04-28 15:55:49 +00:00
Edward Paget
193cb3819f fix: scheduler state management in cloud migration (#57338)
* fix: scheduler state management in cloud migration

When we create the h2 database to dump a metabase instance to during
cloud migration we need to stop and start the quartz scheduler instance
running on the instance during the migration.

Some liquibase migrations handling quartz job changes expect to control
the scehduler and start/stop it while those migrations run. Recent
changes to guard against this behaviour in testing case these
migrations to throw an exception when they run during the cloud
migration task.

This also fixes an older bug that the quartz scheduler would remain off
on the instance being migrated after the cloud migration task finishes.

* fixup! stop scheduler after all calls to migrate!

* fixup! formatting
2025-04-28 10:55:34 -05:00
Oisin Coveney
7d4053a93e Use redux selectors in Dashboard Leave modal (#55179) 2025-04-28 14:55:07 +00:00
Nicolò Pretto
be5453c13c fix: wrong syntax on if was making 'cross-version-for-breaking-changes' always run (#57339)
* fix: wrong syntax on `if:` was making 'cross-version-for-breaking-changes'
always run

* Update .github/workflows/embedding-sdk.yml

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-04-28 16:38:09 +02:00
Romeo Van Snick
f1a4c76719 Remove field parsing hack (#57286)
* Rename OPERATORS in tokenizer to FIELD_PUNCTUATORS to avoid confusion with expression operators

* Rename Reference to Field in tokenizer for consistency

* Allow specifying the string delimiter to unquote

* Reduce state in tokenizer

* Allow the tokenizer to parse field tokens that are missing an opening bracket

* Add more comments and rename variable for clarity

* Implement proper escaping in field tokenizer

* Remove duplicate OPEN_BRACKET from punctuators

* Simplify lexifier now that tokenizer returns the correct token for fields

* Reorder loop to reduce duplication

* Simplify lexifier now that tokenizer returns the correct token for fields

* Add unit tests for unquoting with specific character

* Make invalid token error message more precise

* Punctuation

* Typo

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-04-28 16:31:56 +02:00
Romeo Van Snick
976ba29134 Add custom error message for zero-arg functions (#57332) 2025-04-28 15:45:25 +02:00
Kamil Mielnik
9044b07a76 SEM-218 Offer to update the log configuration from the admin panel (#57022)
* Add endpoints to allow admins to override log levels at runtime

Fixes SEM-219

* Add types and RTK query mappings for logger endpoints

* Add a TODO

* Add isErrorWithMessage and isErrorWithMessageResponse guards

* Add

* Add readOnly prop to CodeBlock

* Add duration inputs

* Stop returning undo-task and document return value shapes

* Add delete endpoint, return nothing when adjusting

* Make sure empty adjustments are idempotent

* Fix API documentation

* Add preset dropdown

* Add preset menu

* Update icon

* Use new reset endpoint, update API paths

* Extract DurationInput

* Extract PresetPicker

* Update preset name

* Update menu width

* Translate

* Make CodeBlock fill its parent

* Improve error handling

* Extract utils

* Hide nanoseconds

* Move code

* Simplify code

* Format code

* Extract CodeEditor

* Remove CodeBlock

* Update comment

* Rename

* Add logger mocks

* Add LogLevelsModal unit tests boilerplate

* Fix closing, scrolling, and add info icon

* Add tests

* Lint

* Revert "Lint"

This reverts commit b8339873c2.

* Hide options microseconds and milliseconds

* Fix circular import

* Add missing import

* Fix tests

* Rename TimeUnit to LoggerDurationUnit

* Use NumberInput

* Use existing getResponseErrorMessage

* Use utils from metabase/forms

---------

Co-authored-by: Tamás Benkő <tamas@metabase.com>
2025-04-28 19:57:14 +07:00
Romeo Van Snick
135f97a0df Make CumulativeCount a window function and Sum an aggregation (#57323) 2025-04-28 14:28:43 +02:00
Nemanja Glumac
decbc2e2a2 Introduce Metabase branding to PDF exports (#57266)
Resolves PRG-1 by introducing the branding content to the dashboard PDF exports
Resolves PRG-7 by making the branding content clickable

Additionally resolves PRG-14
2025-04-28 14:20:47 +02:00
github-automation-metabase
fddd39230b Bump cider/cider-nrepl from 0.54.0 to 0.55.4 (#57312)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.55.4/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-28 10:33:40 +00:00
Oisin Coveney
448bdd0569 TS Conversion: DashboardData (#57074) 2025-04-28 10:10:14 +01:00
Mahatthana (Kelvin) Nomsawadi
ac02214b9c Prevent path-to-regexp from breaking when a libary require v6+ (#57242) 2025-04-28 06:44:49 +01:00
Oleksandr Yakushev
ebaaae8bec [dashboard-templates] Use more efficent every? implementation (#56948) 2025-04-28 01:28:41 +03:00
Filip Hric
b8da46c9d8 ci: run changed e2e specs only when only e2e specs changed (#55319)
* run e2e tests only when e2e tests are changed

* sparse checkout

* revert skip build logic

* fix path

* fix path

* add logging

* fix pattern

* fix pattern again

* add tests and cleanup

* cleanup

* handle flaky group

* Revert "handle flaky group"

This reverts commit cd4f996669.

* pass multiple specs

* simplify patten handling

* logs

* play with checkout

* again

* wip

* wip

* if there are other files than e2e, run all tests

* run flaky group only when specs not passed

* optimize flaky group

* make it string

* temp disable build

* temp disable build

* one more time

* more logs

* logs

* arrrgh

* please work

* now?

* step by step

* revert flaky dependency on build

* tests

* oh

* oh 2

* oh 3

* address review

* fix paths

* fix paths

* fix paths

* fix paths

* fix paths

* fix paths

* add wildcard

* fix paths

* fix paths

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-04-27 15:06:58 +03:00
Sloan Sparger
38b3b0f2fc [Admin] Migrate people pages + components to TS (#57207)
* convert UnsubscribeUserModal and UnsubscribeUserForm components

* convert UserActivationModal to TS

* convert UserPasswordResetModal to TS

* convert UserSuccessModal to TS

* convert PeopleList and PeopleListingApp components to TS

* convert PeopleListRow to TS

* convert use-people-query to TS

* fix deprecated usages of google_auth and ldap_auth with sso_source field

* fix lint
2025-04-25 22:29:22 +00:00
Eric Normand
67ef0e3962 Float tier 2 integration (#56982)
* float() tests + tier 1 (postgres)

* Add more parsing test.

* Better float comparison

* Add expression/float feature

* Add float function to config

* Add float help text

* Add e2e test for float()

* Add `:expressions/float` to list of feature flags

* Only allow casting text to float (not number)

* Better test message

* Refactor for nicer code

* `float()` for snowflake (#56927)

* Implement float() for snowflake

Also add text and date feature keys because somehow they were left off.

* Don't use Long/MAX_VALUE in tests because it breaks some dbs.

* Fix copy-paste error

* kick ci

* Implement float() for mysql (#56919)

Also, add :expressions/date and :expressions/text features that were missing somehow.

* Cast and split custom expression functions for Clickhouse (#56924)

* Implement integer() for clickhouse

ClickHouse is recently tier 2!

* Implement float() for clickhouse

* Implement text() for clickhouse

* Add date() to clickhouse

* Implement splitPart() for clickhouse

* Cast to Date32 after parsing date

* Use a nullable type

* Use nullable types for casts

* Try parseDateTime instead to avoid null

* Use case sensitive function names

* Fix argument order of splitByString()

* Don't use Long/MAX_VALUE in Clickhouse

* Clickhouse needs a lot of type hints!

* Cast position to int

* Better tests for split part

* Negative indexes should return empty string

* kick ci

* Convert index to long (for ClickHouse)

* `float()` implementation for BigQuery (#56920)

* Add float() support for bigquery.

Also add features for date and text that mistakenly got left out.

* Correct argument order for parse_date

* Refactor ->float

* Remove cast-float implementations

* Reinstate Clickhouses' cast to float function.

* Remove specialized :float functions for sql drivers

Replace them with a single :sql implementation

* kick ci

* More refactoring to get rid of questionable recursion

* Fix three tests

* Add null case for literal ->float compilation

* Add type info

* Revert making typed? public (don't need it no more)

* Revert converting multimethod ->float to defn

Also, use a new function called `coerce-float` that does the work.

* Try clickhouse using cast() instead of toFloat64()

* Revert presto jdbc ->float implementation

* Use keyword type name for float-dbtype

* Revert removing ->float method from bigquery clickhouse and starburst

* Add `float-dbtype`, `cast-float`, and `:expressions/float` to changelog

* Remove cast-float multimethod and redundant ->float methods

* REmove mt/dataset test-data from split-part tests.

Is it really necessary?

* Revert qpt changes

* Properly handle NULL in clickhouse cast to float

* Fix presto and starburst

With an improved safe-denominator function

* Change to double as default sql type for casting

* Fix test for casting to double

* Use ->float instead of coerce-float for coercion

* Use DOUBLE PRECISION for Vertica driver

* Use BINARY_DOUBLE for oracle

* Use float for sqlserver

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-04-25 17:00:36 -05:00
github-actions[bot]
c3c706604d Update translations 2025-04-22 (#57002)
* Update translation sources 2025-04-22

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-04-25 14:45:47 -06:00
Nemanja Glumac
a19342a4ce Add clarity to the subscription filter tooltip copy (#57299)
Resolves PRG-15

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-04-25 20:27:32 +00:00
John Swanson
93b36bddbe Add permissions_group.magic_group_type (#56881)
and use it as the source of truth for whether a group is the "All Users"
or "Administrators" group, instead of just the name.

This is a unique field, but it's nullable. H2, MariaDB, MySQL, and
Postgres all treat `null` values as unequal, so it's fine to have many
permissions groups without a `magic_group_type`, but any row *with* a
`magic_group_type` must be distinct from the others. In other words, we
can have lots of non-magic groups and exactly one magic group of each
type.

For now, we'll just have the same Administrators and All Users groups
and the names won't change. At some point, when tenants are enabled,
we'll want to rename "All Users" to "All Internal Users" and create a
separate "All External Users" group.
2025-04-25 12:36:40 -07:00
Braden Shepherdson
407172b445 [refs] Don't backfill :result_metadata on read; strip idents instead (#57273)
Fixes QUE-989, QUE-905.

Stop backfilling idents in `result_metadata` on reading cards. That's costly and recursive, and was the source
of the perf issues on stats.

We're planning instead to support optional, best-effort idents for a longer period, and let the background job do
the work.
2025-04-25 19:34:27 +00:00
Alex Yarosh
a7a413a1dc docs: add casting section to list of custom expressions (#56689)
* add casting section

* Update docs/questions/query-builder/expressions-list.md

* Revert "add casting section"

* Update docs/questions/query-builder/expressions-list.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* Apply suggestions from code review

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-04-25 18:39:42 +00:00
Anton Kulyk
d103f4b875 Close table header popover on second click (#57282)
* Un-skip and update repro test

* Close table header popover on subsequent click
2025-04-25 19:01:50 +01:00
Nathan Voxland
cbae9e265c Renamed /api/ee/gsheets/folder to /api/ee/gsheets/connection (#57239) 2025-04-25 12:59:15 -05:00
Braden Shepherdson
ea655a010d [refs] Fix annotate so model idents are only applied to source columns (#57274)
Fixes QUE-904.

With (1) a fresh column like an aggregation, and (2) when the source was a model:
`annotate` was wrapping the column's ident as if it came from the source model, but that's incorrect.

This adjusts the order of operations so that only columns inherited from the source get their idents
wrapped with the source model.
2025-04-25 17:23:08 +00:00
Adithya Vardhan
9b87335e1b fix: increase flex basis to avoid wrapping in bigger screens (#56733) 2025-04-25 18:02:03 +01:00
bryan
d1a2dce450 Use mage for clj-kondo and cljfmt in GitHub Actions workflow (#57229) 2025-04-25 10:53:46 -06:00
Tyler Plude
8a42850c4f Improve Table Static Viz Text Wrapping Column Widths (#56991)
* Updating text wrap and minibar logic to gracefully handle structure of column widths; updated fallback column width when no width is present in viz settings

* removing inline defs
2025-04-25 09:48:09 -07:00
Alexander Solovyov
cd07ef0afa uberjar.yml should upload my containers (#57270) 2025-04-25 10:43:28 -06:00
Nick Fitzpatrick
e85940a30c Keyboard Shortcut Polish (#57212)
* updating shortcuts, adding shortcut in profile menu, add hotkeys to close shortcut modal and sidesheets

* updating tests

* no one will know

* updating to use mantine hooks
2025-04-25 21:38:44 +05:30
Riley Thompson
0b9e27d15a Enable query caching in flaky test (#57226) 2025-04-25 11:55:49 -04:00
bryan
b3cce298ba Enable equals-true Kondo linter and teach Claude about Clojure (#56573)
* teach claude how to write backend code

* Add solid instructions for calling into the repl

* teach it how to behave when there's no repl

* remove mcp stuff for now

* add lint pr quick command

* fix: Add missing docstrings in mage/be_dev.clj

Added docstrings to parse-int, nrepl-port, and nrepl-eval functions to fix clj-kondo linting warnings.

* flesh out Lint PR quick command

* feat: enable equals-true Kondo linter and fix warnings

This change enables the `:equals-true` warning in the clj-kondo linter configuration,
which identifies code patterns where `(= true x)` is used instead of the more idiomatic
`(true? x)` form in Clojure.

Key changes:
- Enable `:equals-true` linter with warning level in .clj-kondo/config.edn
- Fix all instances of `(= true x)` throughout the codebase, replacing with `(true? x)`
- Add a new utility to check balanced parentheses in Clojure forms
- Add a new mage command `-balance-parens-check` to validate balanced parentheses
- Update CLAUDE.md with documentation about the balanced parentheses utility

This change improves code quality by promoting idiomatic Clojure usage and adds
a helpful tool for ensuring proper Clojure syntax when editing code.

* fix: update code to resolve equals-true Kondo linter warnings

This commit addresses the newly enabled equals-true linter warnings by:
- Adding #_{:clj-kondo/ignore [:equals-true]} to are forms that legitimately need to test both true/false values
- Replacing (= true x) with (true? x) and (= false x) with (false? x) in test assertions where appropriate

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix more, refine claude instructions

* fix more = true -> true? linter errors automatically

* fix remaining (= true x) -> (true? x) linter warnings by adding clj-kondo ignores

We need the ignores for 'are' macro clj-kondo tests where (= expected (fn x)) is the idiomatic pattern.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* move the linter to the things-we-use section

* update claude.md from github copliot's review

* balanced-parens? -> is-readable-code?

- Returns explicit errors, usually with line numbers.

* update claude.md (mostly formatting)

* Fix kondo-updated when there are no matching files

* Update CLAUDE.md to replace -balance-parens-check with -code-is-readable

* Refactor mage -eval to mage -repl with improved usability and reliability

The implementation uses eval and read-string strategically to control when and where code is evaluated:

1. The code from the command line must first be transported as a string to the running REPL server
2. read-string allows parsing the code without executing it
3. eval then executes the code in the correct namespace context
4. This creates a "REPL inside a REPL" where namespace switching and evaluation happen in a controlled environment
5. This approach prevents premature evaluation and ensures code runs in the intended scope

* -check-readable task naming

* cleanup -check-readable

* fix output + fix user.clj

* shuffle code around

* Update CLAUDE.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-25 15:55:31 +00:00
bryan
446c01c5f8 fix stack traces + task! (#57160) 2025-04-25 15:39:53 +00:00
Kamil Mielnik
9ff33ca64f Fix - Cannot schedule automatic value scanning for postgres database (#57256)
* Fix #57198

* Use proper setter

* Repro #57198
2025-04-25 15:26:19 +00:00
Alexander Polyankin
42065b3426 Add parameter default options in subscriptions (#57188) 2025-04-25 11:02:29 -04:00
John Swanson
6ca51d16a1 Hide Schemas for dest DBs (#56853)
Is this the only schema filter? Kind of confused that it's
postgres-specific...
2025-04-25 08:00:15 -07:00
Sloan Sparger
8ad62ccfd5 Sticky footer for database connection modal (#56997) 2025-04-25 09:55:29 -05:00
Ryan Laurie
793e17b386 Fix inefficient regex (#57218)
* Update dom.unit.spec.js

* Update dom.js

* add more tests

---------

Co-authored-by: mmmsssttt404 <931121963@qq.com>
2025-04-25 08:39:27 -06:00
Jeff Bruemmer
5d669bbc5d docs - env var update (#57260)
* update env vars

* update api

* config template
2025-04-25 09:55:07 -04:00
Alexander Solovyov
66cc680762 fix flakey check for duration (#57254)
also hunting for that cache test flake
2025-04-25 13:49:00 +00:00
Sébastien
34a054d0e0 Closes VIZ-332 no more dupes in y-axis ticks (#56910)
* closes VIZ-332 no more dupes in y- ticks

* copy

* lint
2025-04-25 14:00:17 +02:00
Romeo Van Snick
6c366b8e71 Clean up resolver (#56962)
* Use Resolver type from resolver module

* Move getKindForType to resolver

* Inline compileDimension

* Simplify resolver and make data flow requirements more obvious

* Avoid fetching unused dimensions

* Cache metadata displayInfo while resolving

* Move compiler-based resolver tests to compiler

* Rename variables to be more generic

* Refactor resolver

* Merge ExpressionType and MBQLClauseReturnType

* Add tests for resolver

* Be more precise in the resolver error messages

* Be more specific about expected field type in errors

* Add tests for unknown dimensions

* Rename any_ to any

* Add tests for mixed case matching

* Allow matching column names case-insensitively

* Replace ResolveError with CompilerError in resolver

* Use expressionMode in tests

* Fix types

* Remove cast in test

* Add more comments

* Add e2e tests for field matching

* Fix lint

* Rename Field to column in resolver error messages

* Remove TODO's and replace them with comments

* Fix error message in e2e test
2025-04-25 12:30:53 +02:00
Phoomparin Mano
6b427efbfc fix(sdk): clicking on "and X more" in chart legend throws error (#57175) 2025-04-25 17:07:57 +07:00
Alexander Solovyov
d2a3ef856a fix flakey identity-hash tests everywhere (#57245) 2025-04-25 09:29:45 +00:00
Romeo Van Snick
2c8a5bd7ef Add check to prevent double comma's in the custom expression editor (#57199)
* Add check to prevent double comma's

* Rename checkDoubleComma to checkDoubleCommas
2025-04-25 11:04:24 +02:00
Timofey Kachalov
92506a847b docs(sdk): Add generation of embeddable .md tables for Embedding SDK components (#56990) 2025-04-25 12:51:21 +04:00
Nemanja Glumac
4b33f7157e Introduce Metabase branding to PNG downloads (#57088)
Resolves PRG-2

This commit adds Metabase branding to the PNG downloads 
for instances that **do not** have the whitelabel feature flag.

Even though it is possible to download the dark mode PNG, 
this commit does not fully resolve PRG-6 because it doesn't 
turn the text white.
2025-04-25 10:07:19 +02:00
Romeo Van Snick
bf2d148954 Fix expression diagnostic for mismatched siblings (#57170)
* Check all mismatched sibling tokens, not just missing comma's

* Rename siblings check to checkMismatchedSiblings

* Merge imports

* Also catch call expressions
2025-04-25 09:50:57 +02:00
Romeo Van Snick
0ea88ad4d5 Add min-width to popover (#57181)
* Add minimum width to description popover

* Add repro for metabase#57132
2025-04-25 09:50:37 +02:00
Ngoc Khuat
8544c33213 Fix send once alerts repeatedly sending (#57164) 2025-04-25 02:38:39 +00:00
William
47da0a3d1e Drills use column data from lib/returned-columns (#56894)
result_metadata for a query on a model returns the underlying columns, not the model's columns.  This was causing
drills to break in certain circumstances, because the query processor was trying to cast a particular value twice.
Making drills default to using the column from lib/returned-columns fixes the issue.
2025-04-24 22:45:32 +00:00
bryan
da77b1cc6c Doc update detection (#56330) 2025-04-24 22:03:49 +00:00
Uladzimir Havenchyk
bce438f8b0 test: await for data in temporal unit spec (#57178) 2025-04-24 21:48:29 +00:00
bryan
85f05af834 lint migrations file from babashka (#56611) 2025-04-24 21:37:52 +00:00
Sloan Sparger
3ccadd4160 [DB Routing] Callout db routing enabled on permissions page (#57070)
* callout db routing enabled on permissions pages

* add e2e tests
2025-04-24 15:55:40 -05:00
Sloan Sparger
f396378f43 [DB Routing] Polish db routing (#56901)
* update copy w/ description, update db routing docs link, impl prefill for new destination dbs, fix bug where editing db details would not let you tab through the form

* fixes

* make no user attributes error message link to people page, db routing section expanded by default if feature enabled

* pull out fix for edit db form not being tab-able

* fix failing tests

* copy feedback
2025-04-24 15:55:23 -05:00
Noah Moss
546a40bb49 Change wording for default view map button (#57211) 2025-04-24 16:53:21 -04:00
Nick Fitzpatrick
5638ee1c81 Updating entity-id cards in sidesheets (#57052)
* updating entity cards

* adjusting unit test

* PR feedback
2025-04-25 01:36:01 +05:30
Sloan Sparger
e17f0eb452 Make edit db form tab-able (#56902) 2025-04-24 20:05:15 +00:00
dpsutton
93bd0995b9 More robust checking for timeout exceptions (#56737)
* wip

* More robust checking for timeout exceptions

Overview:
We enumerate items in the database and then we want to see which ones
the user can actually run queries against. To do this we run a query
like `select false from TABLE where 1 != 1 limit 0`. The hope is that
the query analyzer realizes it only needs to do permission checks and
doesn't try to satisfy these conditions (either because limit says no
rows, or 1 != 1 is easily proven to filter all rows). So we _usually_
get very quick feedback if we can select from the table or not.

Snowflake seems to not do this on views. If a view takes a long time to
query, snowflake seems to take a long time to query. The original fix
was to add a 15 second timeout to the query. The expectation here is
that Snowflake can quickly fail if there are no permissions for the
table or view, but might take a long time to run the probe query. But we
can interpret a timeout as a successful permission check.

The original way we checked for timeouts was a very naive check for
`java.sql.SQLTimeoutException`. It seems basically no one uses this when
you do:

```clojure
(with-open [stmt (...)]
  (doto stmt
    (.setQueryTimeout 15)
    (.execute)))
```

For instance, here's some logs from Snowflake:

```
WARN net.snowflake.client.core.StmtUtil Cancelling query 0e8987ee-2d22-40f9-b30d-0129d38ce976 with reason TIMEOUT
INFO metabase.driver.sql-jdbc.sync.describe-database <schema>:<table-name>: Assuming no SELECT privileges: caught exception,net.snowflake.client.jdbc.SnowflakeSQLException: SQL execution canceled,	at ...
```

Note It's a regular `net.snowflake.client.jdbc.SnowflakeSQLException`.
Here's a true permissions failure for comparison:

```
sync.describe-database <schema>:<table>: Assuming no SELECT privileges: caught exception,net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error:,Failure during expansion of view 'SOME_VIEW': SQL compilation error:,Object 'DB.SCHEMA.TABLE' does not exist or not authorized.,
```

So we use some regex checks against the messages to try to detect when
we have a permissions failure (cannot select) vs a timeout of the
probe (presumably can select).

And a reminder of the balances here: it's better to show someone a table
that they get an error if they try to query than to hide a table that
they can query. So this change should bias towards reporting can-select
in cases where it might not be clear.

* Only run tests when classes are present

if you don't have :drivers on classpath it would fail

* ensure boolean is returned

tests assert false? on a nil

* CI fails based on the indentation of comments

* empty commit for CI

* Move postgres test into postgres test namespace

* Replace ex-msg matching with sqlerrorcode/sqlstate

Use jdbc error codes and sql state matching to figure out if a
SQLException is caused by user action canceling the request (essentially
how setQueryTimeout works). This adds a multimethod dispatching off the
driver keyword to match up either the SQLState code or the SQLErrorCode
with the appropriate value for a given database driver. Some of these
were found by looking how QueryTimeoutException is implemented in
Hibernate and others were found from JDBC driver source code or documentation.

* fixup! handle multiple codes for mariadb

* fixup! add partial query timeout test

* fixup! split apart sql timeout tests

* fixup! use correct sqlstate for snowflake timeout

* fixup! remove split out tests

* fixup! remove when-class

* fixup! snowflake sql state

* fixup! move query-canceled? into driver code

Removes the jdbc-exceptions namespace and instead makes query-canceled a
driver multimethod that extracts and dispatches on the SQLException
class within the sql-jdbc driver.

Non-jdbc drivers can implement this method, but it is only used for
handling errors in the cluster lock using the appdb and for the sql-jdbc
describe-database sync task.

Co-Authored-By: Nathan Voxland <nathan@metabase.com>

* fixup! update driver changelog add default method

* fixup! merge mysql/mariadb methods

* fixup! add added metadata

* fixup! make test throw instead of is false

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-04-24 20:01:52 +00:00
Case Nelson
0df7a6a8d4 fix: improve database status metric (#56469)
* fix: improve database status metric

* Format line better

* Fix tests and kondo

* Remove unhealthy counter too
2025-04-24 14:00:46 -06:00
Nick Fitzpatrick
9daf822736 add patch to kbar for tinykeys update (#57116) 2025-04-25 01:11:47 +05:30
Aleksandr Lesnenko
fe3085dc88 remove react 19 as a limitation (#57158) 2025-04-24 14:55:20 -04:00
Braden Shepherdson
163269fda0 [refs] Turn bad :idents in result_metadata into a warning (#57189)
There are at least two cases right now where the idents are bad or
missing that need debugging, but throwing errors is breaking things.
2025-04-24 17:44:15 +00:00
Case Nelson
052474813d fix: snowflake rsa doesn't work with hostname (#57157)
* fix: snowflake rsa doesn't work with hostname

* update account if present
2025-04-24 11:37:28 -06:00
Nicolò Pretto
8e8314cc7e ci: make cross versions tests run only if the pr is against a release (#57197)
branch
2025-04-24 18:23:22 +02:00
Case Nelson
6552bcd10f fix: snowflake key fails when editing unrelated details (#57156)
* fix: snowflake key fails when editing unrelated details

* Fix test comment

* Compare byte arrays
2025-04-24 10:07:04 -06:00
Ryan Laurie
3fa1acbdcf prevent non-admins from calling admin-only gsheets endpoints (#57186) 2025-04-24 09:23:51 -06:00
Alexander Polyankin
30e0b718f4 PoC for using dataset columns with MBQL lib type checking functions (#57140) 2025-04-24 10:40:45 -04:00
John Swanson
f152b8e5c3 Fix two bugs in DB Routing (#56931)
* Fix deleting a DB with database routing on

* Fix database sync with a user attribute set

When an admin has the relevant user attribute set and tries to sync the
database schema, we use `(with-database-routing-off ...)` to explicitly
turn off database routing for the purposes of sync. However, there are
two problems here:

First, this is just informational for the purposes of error checking, it
didn't actually turn off database routing, it just made us throw an
exception if a driver touched a mirror database (in dev).

Second, during query processing, when we're actually doing the database
routing "swap" to replace the router with the mirror DB, we were doing
`with-database-routing-on`. This essentially means that if you do

```
(with-db-routing-off
 (qp/process-query query rff))
```

you *don't* actually turn off DB routing. 🤦

Both underlying issues get fixed by the same change: if database-routing
is OFF, don't DO any database routing in the QP middleware. This seems
more reasonable to me anyway.

* CR resp
2025-04-24 07:22:59 -07:00
Nicolò Pretto
24debc3158 add ttag/no-module-declaration rule (#56848)
* add ttag/no-module-declaration rule + eslint ignore comments

* change the reference to github issue instead of linear

* add new ignores after rebase

* remove formatting changes from eslint files

* fix eslint rule mising from a file

* convert one field to getter as that got added after I opened the codemod
pr and it's failing the check here

* more //eslint-disable-next-line
2025-04-24 15:50:46 +02:00
lbrdnk
5242b6d15e Fix sync for 66K tables db (#57066)
* Fix 66k statement params in sync-table-privileges and sync-fks

* Test for privileges

* Test privileges

* Update and test set-initial-table-sync-complete-for-db!
2025-04-24 14:04:05 +02:00
Nicolò Pretto
28c0e9458d ci: remove ready_for_review as trigger type (#57134) 2025-04-24 13:07:35 +02:00
Timofey Kachalov
e9fb8e782f Temporarily disable Shoppy sample app tests (#57167) 2025-04-24 13:58:24 +04:00
Phoomparin Mano
dd76006c42 fix(sdk): use background color in sankey chart text outline (#57135)
* use bg-white instead of white

* add visual test

* fixed storybook stories

* add loki snapshot
2025-04-24 16:39:37 +07:00
appleby
c96816b0fc Move :expression-literals aggregation tests into expressions_test.clj (#57144)
* Move :expression-literals aggregation tests into expressions_test.clj

These tests all use :basic-aggregations not :expression-aggregations, so move them into expressions_test.clj to
consolidate the :expression-literals tests in one place.

* Add clause with top-level boolean literal in case-with-literal-expression-test
2025-04-23 15:38:39 -07:00
Alexander Polyankin
3e8400f143 Check for axis type instead of Category (#57128)
* Check for axis type

* Check for axis type
2025-04-23 18:35:23 -04:00
Luiz Arakaki
8b1d0548b1 only track database routing as enabled if there is at least one routing db (#57117) 2025-04-23 20:51:02 +00:00
Luiz Arakaki
adb4c4a5de rename starburst to startburst (trino) to help customers understand that starburst is trino compatible (#56891) 2025-04-23 16:48:58 -03:00
Noah Moss
4f9ced2fda Share pivot export code between XSLX/CSV instead of using native Excel pivots (#56622)
* Prototype sharing CSV pivot export code with Excel instead of Excel native pivots

* Cleanup some code, fix reflection warnings

* clean ns

* halfway to getting native excel formatting working

* native formatting working, but no auto-sizing

* fix up formatting, get auto-sizing working (+ refactor)

* Fix BE tests

* remove an old test case no longer needed

* lint

* remove final broken tests which is no longer needed

* lint, and clean up/refactor CSV code a bit

* clean up/refactor XLSX code

* remove debug symbol

* fix whitespace

* address feedback
2025-04-23 15:22:34 -04:00
Edward Paget
163528e95c fix: test flake in jetty stats (#57141) 2025-04-23 18:26:02 +00:00
Uladzimir Havenchyk
8f62a989d7 ci: run linting when e2e specs are changed (#57118)
* ci: run linting when e2e specs are changed

* fixup
2025-04-23 17:51:31 +00:00
Renaud Joly
d56e0511d2 Documentation: fix typo in funnel link (#56761) 2025-04-23 13:01:58 -04:00
github-automation-metabase
ea566a0a2e Bump io.github.weavejester/cljfmt from c87493e54bdc30c104d75b95ce2a2ce5e7403430 to 7de286008766127128a156275b9add3bf443d7e5 (#56655)
Inspect dependency changes here: c87493e54b...7de2860087

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-23 09:59:21 -07:00
Edward Paget
f7a66b2fac fix: request max time stat reports seconds (#57121)
Forgot to divide millis by 1000 before saving so this stat was reporting
some silly numbers on stats. Also adds tests around this metric
2025-04-23 16:36:26 +00:00
Alexander Polyankin
1fcabbe944 Replace Category with has_field_values check when computing columns compatible with a parameter AND enable card sources for numeric parameters (#56825) 2025-04-23 11:53:08 -04:00
Oisin Coveney
af0188ade1 fix(sdk): Ensure that questions don't flicker when fetching entity IDs (#57073) 2025-04-23 15:36:19 +00:00
Jeff Bruemmer
bcc7bd2cda fix link (#57122) 2025-04-23 11:06:44 -04:00
Phoomparin Mano
520c64839c Use viewFooter variant in view footer's download icon (#57105)
* tweak IconButton variants

* remove variant=subtle as it is applied by default
2025-04-23 21:51:15 +07:00
Nathan Voxland
6214e2896a [Sheets] Allow "Sync Now" (#54940)
---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-04-23 09:47:58 -05:00
Nemanja Glumac
2761c8dd36 Revert "Use a deterministic identifier for chart downloads (#57058)" (#57112)
This reverts commit b5363f3a7e.
2025-04-23 16:13:31 +02:00
Ryan Laurie
81058dea6a replace ee-extra release step (#57120) 2025-04-23 08:02:14 -06:00
Uladzimir Havenchyk
447a73372d chore: fix linting issue (#57115) 2025-04-23 13:18:41 +00:00
Romeo Van Snick
2ba02a78dd Clean up diagnostics (#56984)
* Add missing t to error messages

* Pull out lexification from diagnoseSyntaxChecks

* Add hooks to compiler

* Define diagnose and diagnoseAndCompile using compiler hooks

* Add maybe helper to throw the first error

* Use maybe helper to make sure parsing and lexifying throws

* Remove throwOnError argument to parser

* Add error hook

* Use error hook to make lexifier and parser throw

* Pass token and source in object

* Return position information for mismatching parenthesis

* Add length to Token

* Handle unknown string quotes

* Simplify lexifier

* Move malformed number check to diagnostics

* Move malformed string check to diagnostics

* Move malformed field name check to diagnostics

* Move bad token check to diagnostics

* Stop returning errors from lexifier

* Merge nodes when unopened bracket occurs

* Add error helper for diagnostics

* Use error helper for diagnostics

* Remove unused helpers

* Remove unused ParseError

* Remove errors fuzz test

* Add default hooks to parser

* Remove maybe helper

* Split up checks into syntax and expression folders
2025-04-23 15:13:59 +02:00
Romeo Van Snick
e038159085 Rename regexextract to regexExtract (#57013)
* Rename regexextract to regexExtract

* Fix regexExtract examples in docs

* Fix references to regexExtract in tests
2025-04-23 15:13:46 +02:00
Uladzimir Havenchyk
6bad11bfeb test: move flaky test to jail (#57091) 2025-04-23 11:22:39 +00:00
Romeo Van Snick
e3e81e4da8 Format zero-arity functions with parens (#56835)
* Format no-argument expression clauses with empty ()

* Suggest no-arg clauses with empty ()

* Remove fallback for non-arg functions in resolver

* Fix unit tests

* Fix e2e test

* Add test for no-arg suggestion completions

* Update examples in docs

* Render parens for no-arg clauses in helptext header

* Make function browser insert parens for no-arg functions

* Do not show help text when a function call is not made

* Add repro for metabase#55300

* Fix function browser e2e test

* Remove unnecessary branch

* Remove fallback for non-arg functions in resolver

* Add () to now in one more location in docs

* Fix unit tests
2025-04-23 09:27:07 +02:00
Noah Moss
587c5e0a6f Exclude nil card IDs for preemptive caching reruns (#57082)
* Exclude nil card IDs for preemptive caching reruns

* Update enterprise/backend/src/metabase_enterprise/task/cache.clj

Co-authored-by: bryan <bryan.maass@gmail.com>

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-04-23 02:59:54 +00:00
Noah Moss
632777c91a Fix inaccurate row collapsing for pivot exports (#56998)
* fix for inaccurate collapsed rows in export

* add unit tests

* fix test

* lint

* edit docstring, skip roundtripping on cljs

* address feedback
2025-04-22 22:47:55 -04:00
Alexander Polyankin
436c0804fa Fix click behavior reset (#57053) 2025-04-22 23:35:57 +00:00
Fraser
1bb8bd14fe Add development-mode setting and banner (#56579)
* Add development-mode setting and banner
2025-04-23 10:13:10 +12:00
Riley Thompson
82cde67228 Upgrade ClickHouse JDBC driver to 0.8.4 (#57055)
* upgrade to 0.8.4

* add test

* update clickhouse contributors
2025-04-22 21:40:48 +00:00
Braden Shepherdson
bde4df5206 [MBQL lib] Gracefully handle invalid :fields refs in joins (#57078)
Fixes #56434.

A join clause's `:fields` might contain refs to columns that no longer exist on the joined table/card.

Before this change, a malformed column was being passed to `with-join-alias`, causing it to throw.
Now the bad fields are dropped from `returned-columns`, and if they all get dropped then it is treated as `:all`.
2025-04-22 21:13:48 +00:00
Timofey Kachalov
d676b8a2ca Properly handle non-pr context for notify-pull-request action (#57081) 2025-04-23 01:08:08 +04:00
Uladzimir Havenchyk
ed132646b0 ci: use variant for trunk to distinguish tests from matrix (#57069)
* ci: use variant for trunk to distinguish tests from matrix

* group e2e

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-04-23 00:02:42 +03:00
Nemanja Glumac
b5363f3a7e Use a deterministic identifier for chart downloads (#57058)
Resolves PRG-10.

This commit keeps the DOM node that we use for downloads
deterministic, while ensuring that we always target the correct
chart in the dashboard.

The same question can be added to the dashboard multiple times
so the only unique identifier we can use is the dashcard id.

But this brings us to the weird situation that the node we're sending
to the canvas to render before downloading is different when we're
downloading the chart from a dashboard vs when we're downloading
it directly from the question page.

This pseudo DOM code shows what we did before:

Dashboard:
```
dashcard-id <--- we were grabbing this
    visualization-root
        card-id
```

Question:
```
div
    visualization-root
        card-id <-- we were grabbing this
```

Compare that to what we're doing now

Dashboard:
```
dashcard-id
    visualization-root
        card-id <--- we are now grabbing this*
```
* but only when it is under the specific dashcard-id

Question:
```
div
    visualization-root
        card-id <-- we continue grabbing this like before
```
2025-04-22 23:01:57 +02:00
Jeff Bruemmer
5b4ed4413c remove bulk filter modal docs (#57083) 2025-04-22 21:00:41 +00:00
Anton Kostenko
bc4517243c Replace SDK and iframe response status metrics to export non-grouped status codes (#56976)
* Replace SDK and iframe response status  metrics to export non-grouped status codes
2025-04-22 20:55:00 +00:00
appleby
111908b790 Enable :expression-literals for sqlserver and oracle (#56942)
* Fix literal-expressions-inside-nested-and-filtered-aggregations-test

* Use mt/formatted-rows in order-by-integer-literal-expression-test

* Support selecting an empty string literal in select-clause-deduplicate-aliases

For drivers like Oracle that inherit from ::sql.qp.empty-string-is-null/empty-string-is-null, if a user adds an empty
string as a custom literal expression, that literal "" value will get compiled to nil, so ensure that
select-clause-deduplicate-aliases can handle such nil values in the :fields list.

Basically, we want to ensure that a query like

  {:expressions {"empty": [:value ""]},
   :fields      [[:expression "empty"]]
   :limit       1}

gets compiled to

  SELECT NULL [AS] "EMPTY" ...

* Add sql.qp.expression-literals/boolean->comparison abstract driver

This is similar in spirit to the existing sql.qp.empty-string-is-null driver and can be used for drivers like oracle
and sqlserver that require booleans to be converted to comparison expressions in logical operators like :and, :or, and
:not, and in the top-level of a :filter clause.

* Enable :expression-literals for sqlserver

* Enable :expression-literals for oracle

* Review feedback: not -> nil?

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Implement ->honeysql :sum-where and :distinct-where in terms of :case for :sql driver

Change the ->honeysql methods for :sum-where and :distinct-where to build an MBQL :case form and compile that, rather
than building a honeysql :case form directly. In this way, drivers that need special handling for :case will get
:sum-where and :distinct-where for free. Note that :count-where was already implemented this way. See, e.g. the
:metabase.driver.sql.query-processor.expression-literals/boolean->comparison abstract driver which converts booleans
in the case conditions to equivalent := expressions.

* Fix typo in test: case clause -> expression

* Rename boolean->comparison abstract driver to boolean-is-comparison

Rename

  ::sql.qp.expression-literals/boolean->comparison to
  ::sql.qp.boolean-is-comparison/boolean-is-comparison

This makes it clear that the namespace should only contain the abstract driver, and is also more consistent with the
existing driver in sql.qp.empty-string-is-null.

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-04-22 13:47:39 -07:00
Edward Paget
e1266af965 fix: use a shared lock for report_card updates (#57040)
the view_count and last_view_at updates of report cards can deadlock
against each other, so introduce a shared keyword they can use to each
take a cluster lock when updating these values to prevent the deadlocks.
2025-04-22 13:11:09 -07:00
Sébastien
e19c9f9013 closes VIZ-400 dashboard parameters panel background FF (#56906) 2025-04-22 20:12:37 +02:00
metamben
254b87fd5f Add endpoints to allow admins to override log levels at runtime (#56973)
* Add endpoints to allow admins to override log levels at runtime

Fixes SEM-219
2025-04-22 17:37:28 +00:00
lbrdnk
7cdf5d3116 Add schema, table and field to missing database type to base type mapping (#56843)
* Adjust missing base type logging for jdbc drivers

* Adjust base type logging for Athena

* Add schema and table to missing base type logging

* Comments

* Update test

* Drop only preceding nils
2025-04-22 18:40:18 +02:00
Uladzimir Havenchyk
a9c878d2b2 test: sign in as admin for external db (#56963) 2025-04-22 18:23:31 +03:00
Kamil Mielnik
163d5afe2a SEM-111 Support sorting by duration, start and end time (#56791)
* Use Mantine instead of styled components

* Fix centering

* Add task and status params

* Add TaskStatusPicker

* Make picker clearable

* Add task picker

* Put filters and pagination together

* Translate task status

* Break down logic

* Move loading and error state

* Always render something

* Make task picker searchable

* Add empty state to the table

* Fix clear button being transparent

* Add useUrlState

* Use useUrlState in TasksApp

* Move UrlState to its own file

* Sort

* Rename file

* Rename

* Clean invalid query params on mount

* Prettier

* Use Action

* Ignore invalid pages

* Reuse variable

* Fix tests

* Add test

* Add label to clear button

* Remove redundant condition

* Add assertions

* Improve typing

* Be explicit about empty string handling

* Add sorting params to ListTasksRequest

* Add sorting params to url state

* Render icon for the first column

* Add SortableColumnHeader

* Extract TasksTable

* Move use-url-state to its own directory

* Add unit tests for useUrlState

* Add test

* Refactor

* Add more tests

* Fix missing import

* Add task endpoints mocks

* Add TasksApp tests boilerplate

* Add pagination test

* Add tests for filters

* Add more tests

* Tmp

* Make SortColumn generic

* Use SortingOptions

* Remove unused type

* Make BaseItemsTableProps non-generic

* Integrate sortingOptions

* Prevent CLS

* Prevent table content from disappearing on sort or filter

* Improve typing

* Use isLoading

* Get fresh data

* Update comment

* Reset page on sorting change

* Update tests

* Add tests for page reset

* Update tests

* Mark test as flaky

* Reuse SortingOptions

* Extract getFirstParamValue
2025-04-22 22:00:28 +07:00
Luis Paolini
d92762277c add a note to okta scim (#57032)
Adding the header, which is coming often
2025-04-22 11:21:18 -03:00
github-automation-metabase
6c5c5e409f Bump cheshire/cheshire from 5.13.0 to 6.0.0 (#56950)
Inspect dependency changes here: https://github.com/dakrone/cheshire/blob/6.0.0/ChangeLog.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-22 12:54:24 +00:00
Phoomparin Mano
2b3f6833e7 fix(sdk): css variables leak from Mantine to the host app (#56985)
* add tests for mb-wrapper leaks

* revert me - temporarily check diffs

* Revert "revert me - temporarily check diffs"

This reverts commit f474fe7b25.

* only apply mb-wrapper when in the sdk

* use cy.log to show e2e messages

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-04-22 19:08:23 +07:00
Uladzimir Havenchyk
5e9d964237 test: add timeout after dragging tab to avoid flakiness (#57019) 2025-04-22 11:45:46 +00:00
Uladzimir Havenchyk
81c0d0b0fa test: move flaky tests to jail (#56964)
* test: move flaky tests to jail

* two more tests

* one more
2025-04-22 14:21:19 +03:00
Romeo Van Snick
6734dbaa02 Fix metric tests (#56965)
* Allow metrics to show up in tests

* Unskip metric test

* Unskip metric test
2025-04-22 12:55:14 +02:00
Uladzimir Havenchyk
f0b61b8aeb test: make admin test more reliable (#56967) 2025-04-22 13:53:07 +03:00
Luis Paolini
09790c4c6e Remove ed25519 dep (#56940)
Not needed since
https://github.com/apache/mina-sshd/pull/639

Will also remove one security alert due to https://github.com/advisories/GHSA-p53j-g8pw-4w5f
2025-04-22 07:30:26 -03:00
Timofey Kachalov
624a6c53db Adjust CI on exposed internal types from Embedding SDK (#57014) 2025-04-22 14:09:26 +04:00
Romeo Van Snick
d7ae787f0e Remove legacy expression helpers (#56813)
* Remove legacy expression in the return type from compiler

* Move test cases to formatter tests

* Move op and opt helpers to test utils

* Move value helper to test utils

* Rewrite compiler tests to use expression parts

* Remove unused test helpers

* Use actual invalid metadata instead of broken references

* Remove Lib.legacyExpressionForExpressionClause and Lib.expressionClauseForLegacyExpression

* Remove unused mock in fuzz test

* Remove legacy-expression-for-expression-clause and expression-clause-for-legacy-expression helpers

* Merge __support__ and test folders

* Reuse query from shared testing data

* Remove legacy-expression-for-expression-clause and expression-clause-for-legacy-expression tests

* Fix import

* Rename util to utils
2025-04-22 11:45:59 +02:00
Romeo Van Snick
bb5c6874de Remove unused properties in expression compiler (#56993)
* Remove unused parser properties

* Remove custom AssertionError class

* Remove unused WS token

* Remove unused skip property
2025-04-22 11:39:11 +02:00
Romeo Van Snick
0e2edd80e6 Fix infinite loop in native editor (#57012)
* Use _.isEqual to check if ranges are equal

* Add back in reproduction for metabase#53649
2025-04-22 11:38:57 +02:00
Nicolò Pretto
6720fb7987 run codemod to convert t calls on module level to getters when possible (#56793)
* ran the codemod, lets see if it greens out on ci

* manually remove some changes as not-needed or risky

* remove other createEntity
2025-04-22 10:53:35 +02:00
Romeo Van Snick
8df5d81d69 Replace all references of StartRule with Lib.ExpressionMode (#56970) 2025-04-22 10:46:05 +02:00
Timofey Kachalov
3a5bde5087 Fail CI on exposed internal types from Embedding SDK (#56958) 2025-04-22 11:25:21 +04:00
Kamil Mielnik
f81d576487 Improve SortColumn typing (#56907)
* Make SortColumn generic

* Use SortingOptions

* Remove unused type

* Make BaseItemsTableProps non-generic
2025-04-22 14:20:08 +07:00
Kamil Mielnik
9a4f9cc59d Fix - Filtering the foreign key dropdown randomly works (#56916)
* Fix #56839

* Repro #56839

* Update log
2025-04-22 14:19:53 +07:00
github-automation-metabase
33a444d442 Bump djblue/portal from 0.58.5 to 0.59.0 (#56954)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.59.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-21 16:03:46 -07:00
github-automation-metabase
17476b91f5 Bump io.github.weavejester/cljfmt from fc3340da3c8344b3fbb336d190ce696ef40e42d4 to c87493e54bdc30c104d75b95ce2a2ce5e7403430 (#56354)
Inspect dependency changes here: fc3340da3c...c87493e54b

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-21 15:59:12 -07:00
Nathan Voxland
38e1e87c87 Dowgraded postgresql driver until liquibase fix is released (#56981) 2025-04-21 15:55:57 -05:00
Eric Normand
cc3f0a5d59 float() tests + tier 1 (postgres) (#56814)
* float() tests + tier 1 (postgres)

* Add more parsing test.

* Better float comparison

* Add expression/float feature

* Add float function to config

* Add float help text

* Add e2e test for float()

* Add `:expressions/float` to list of feature flags

* Only allow casting text to float (not number)

* Better test message

* Refactor for nicer code

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-04-21 20:40:15 +00:00
Romeo Van Snick
61860a1d1a Remove unused expression helpers (#56974)
* Inline only use of isCaseOrIfOperator

* Remove unused matchers

* Rename matchers module to literals

* Rename arguments
2025-04-21 19:26:24 +02:00
Edward Paget
656b31eddb fix: add cluster lock around view count update (#56977)
To avoid deadlocks on postgresql appdbs caused by overlapping ids in the
in clause of these updates.

I also had to change the `call-count` implementation for one of the
tests to spy on t2/query instead. The call-count pipeline middleware
will register either 2 or 4 depending on if we need to insert rows into
the lock table or not.
2025-04-21 12:24:47 -05:00
Aleksandr Lesnenko
e53749f67c Fix column resizing (#56898)
* fix column resizing

* comments

* specs

* change column measurement approach

* repro

* move pagination issue to a separate PR

* fix specs

* fix unit specs

* specs

* unnecessary dependency

* extract a hook and fix failing specs

* adjust to latest master branch updates

* fix types

---------

Co-authored-by: Sébastien <sebastien@metabase.com>
2025-04-21 16:35:00 +00:00
metamben
601217f9f9 Discourage changing jdbc-data-warehouse-unreturned-connection-timeout-seconds (#56749)
Fixes QUE-755

Since killing connections this way is the mechanism we use to terminate long running JDBC driver queries, this timeout
shouldn't differ from the db-query-timeout-minutes setting.
2025-04-21 18:57:48 +03:00
Romeo Van Snick
cb2c515dc6 Allow passing strings to isEmpty and notEmpty (#56855)
* Allow strings to be passed to isEmpty

* Add repro for metabase#55687

* Add be test for is-empty and not-empty

* Use Emptyable var
2025-04-21 17:09:47 +02:00
Edward Paget
0d35a0ac4c fix: broken test after ident change (#56941) 2025-04-21 14:44:01 +00:00
Nathan Voxland
c137105f73 Don't update the "active" index table from the "reindex" job (#56671) 2025-04-21 09:26:53 -05:00
bryan
d7130ed448 replaces 4 = true.. w/ true? (#56935) 2025-04-18 22:11:10 +00:00
bryan
83941fea48 introduce the no-auto-issue-links label (#56923) 2025-04-18 14:21:55 -07:00
Alex Yarosh
59644bf378 Update field-types.md (#56938) 2025-04-18 21:06:32 +00:00
Gustavo Saiani
508dcaeacc Update links in docs (#56930)
* Update link

* Update links
2025-04-18 15:48:03 -04:00
Timofey Kachalov
3df44a9c5e docs(sdk): Remove remaining internal types from being exposed (#56895) 2025-04-18 16:47:10 +04:00
Romeo Van Snick
344b722f49 Merge resolver into compiler (#56647)
* Resolve dimensions while compiling

* Use resolver in pratt compiler instead of resolver pass

* Remove legacy resolver

* Add missing imports

* Add startRule to compiler in test

* Use helper to calculate argtype

* Provide a default implementation of argType

* Return expressionParts from compiler

* Convert resolver tests to use compiler

* Remove superflouous comment

* Convert MAP_TYPE to a function

* Rename field-resolver to resolver

* Simplify resolver check

* Move resolver-related code into resolver module
2025-04-18 13:33:17 +02:00
Nick Fitzpatrick
db1aaa49c8 Pinned items moderation status (#56668)
* pinned questions show moderated status, handle their own caption title

* unit tests, description

* fixing grid spacing

* e2e test adjustments

* fix for verified skeletons

* update quetion embed test, dashboard embed test
2025-04-18 10:43:16 +05:30
Alexander Polyankin
fbe7122dc5 Fix pivot metadata (#56786) 2025-04-18 02:02:39 +00:00
Ryan Laurie
1e303ea32f Refactor Upload Settings to use RTK + Mantine (#55780)
* Refactor Upload Settings to use RTK + Mantine
2025-04-17 22:38:33 +00:00
Oleksandr Yakushev
7a0bd60c94 [test] Speed up metabase.pulse.send-test tests (#56336)
* perf: Optimize duplicate-model-ids and search/ingestion functions

* [test] Mock javascript-visualization in m.pulse.send-test to speed up tests
2025-04-18 01:30:48 +03:00
Braden Shepherdson
0a4d7039ad [refs] Return :idents in QP annotate; save in :result_metadata (#56244)
Fixes [QUE-701](https://linear.app/metabase/issue/QUE-701), [QUE-778](https://linear.app/metabase/issue/QUE-778),  [QUE-777](https://linear.app/metabase/issue/QUE-777),  [QUE-776](https://linear.app/metabase/issue/QUE-776),  [QUE-703](https://linear.app/metabase/issue/QUE-703),  [QUE-704](https://linear.app/metabase/issue/QUE-704).

### Description

Directly implements `:ident` calculation for legacy MBQL in the QP!

Also changes the spelling of compound idents to eg. `join[JoinClauseIdent]__InnerColumnIdent`, `native[CardEntityId]__COLUMN_NAME`, etc. The advantage of this is that NanoIDs cannot contain `[]`, whereas they do contain `_`s. Then we can make sure there's no missing `entity_id`s (a common issue) by looking for `native[]`. `native____` might have happened by accident is the NanoID started with two underscores.

This is an unfortunately large PR, but I don't think much can be done to help that.
The output of `annotate` becomes `Card.result_metadata`, which is a key **input** to
`annotate`. So we have to tackle legacy metadata end to end to produce a healthy PR.

(A prior attempt to use the lib and match up the results turned into a cluster of hacks,
and required half of these changes anyway, so this direct approach seems more sound.)

Most of this logic lives in the `annotate` post-processing middleware, with
some support from `add-source-metadata` pre-processing.


#### Idents

This generates correct idents for proper fields, expressions,
aggregations, breakouts, explicit and implicit joins, native queries and
models (native and MBQL).

#### Safety checks and Guarantees

Also adds and strengthens several safety checks in the library and
elsewhere. The guarantees I hope we can count on at this point are:
- Cards are saved with correct `:ident`s in their `:result_metadata`.
- Cards with old `:result_metadata` get (correct) `:ident`s added on read.
- Lib can now rely on getting correct idents for all input cards!
- Therefore the lib (BE + FE) can compute the ident for **every column**.

#### Placeholder idents

For native queries, we can only get `result_metadata` from executing them.
The usual flow is:
- Write the query
- Send it as an ad-hoc `/api/dataset` request
- Get back `result_metadata`
- Save it, passing the `result_metadata` back to the BE.

We need a card `entity_id` to create idents for a native query, but an ad-hoc
query doesn't have a card yet! The BE now generates a placeholder `entity_id`,
which gets replaced on save with the new card's actual `entity_id`. These
placeholders contain (1) illegal NanoID characters, and (2) a NanoID, which
means they cannot be mistaken for non-placeholder NanoID, and that they are
still globally unique, so there's no caching concerns.
2025-04-17 20:55:23 +00:00
Romeo Van Snick
66ba50cfea Convert diagnostics to lib (#56646)
* Move diagnostics to separate dir

* Use correct type for startRule arg

* Split up diagnostics into sepearate files per check

* Use throw for checks that don't yet

* Pull out syntax checks into separate function

* Split up lib.diagnoseExpression into helper

* Return expressionParts from compiler

* Add vist helper that walks Lib.ExpressionParts

* Convert check-known-functions to use Lib.ExpressionParts

* Convert check-supported-functions to use Lib.ExpressionParts

* Convert check-comparison-operator-args to use Lib.ExpressionParts

* Convert check-arg-count to use Lib.ExpressionParts

* Convert check-case-or-if-arg-count to use Lib.ExpressionParts

* Convert check-arg-validators to use Lib.ExpressionParts

* Remove legacy visitor

* Also pass expression clause to diagnostics

* Use pMBQL in diagnose-expression

* Stop passing expression to diagnostic checkers

* Rename visit to visitor
2025-04-17 21:53:10 +02:00
Timofey Kachalov
3764616d8c Setup app cleanup for sample-app runner (#56866) 2025-04-17 23:12:10 +04:00
Timofey Kachalov
9bb5e3ec50 feat(sdk): Use public types for Dashboard/Collection/User and other entities (#56875) 2025-04-17 23:11:31 +04:00
Phoomparin Mano
ebcdfddf7e Improve PDF and results download button UI in static embedding (#56541)
* replace the export button in dashboard header

* use the same download button style for both

* add styles for compact download button

* change the compact export button style

* add download button logic

* update data-testid

* update dashboard tests in public-resource-downloads

* use getDashboardCard helper instead

* move question result download to header

* remove PDF export localized test

* add PublicOrEmbeddedDashboardView loki diffs

* use text-primary instead of text-dark for download icons

* simplify downloadAndAssert embed logic

* simplify classnames merging

* revert ExportPdfMenuItem

* cleanup TitleAndDescriptionContainer

* revert LegendCaption

* show the header if headerButtons is not null

* standalone question download results only shows up on card hover

* always show header if there is a header button

* add floating headers when title is hidden

* add comment on floating header buttons

* use accessible label selectors instead of data-testid

* replace question-results-download-button testid with accessible label

* cleanup downloadAndAssert logic

* update tests

* support shared selector

* update unit test for PublicOrEmbeddedDashboardPage.enterprise

* update unit test for PublicOrEmbeddedDashboardPage.premium

* update unit test for PublicOrEmbedded

* update localization tests

* localize aria-label and re-add label tests

* make aria-label "Download as PDF" for all instances

* fix question tests on locale hash params

* fix tests on disabling downloads

* add realHover case to downloadAndAssert

* update testid in LegendDescriptionIcon

* update public-resource-downloads cypress test

* use visibility checks in tests

* restore ellipsis button size

* restore hover parent state to standalone question

* update localization tests that referenced PDF export button

* remove eslint-disable directives

* update ChartSkeleton

* update ChartSkeleton

* lift spacing to LegendCaption

* use lighter colors for dashcard downloads

* add new loki snapshots

* use the auto refresh text for locale tests as pdf export text is gone

* use the lighter color for all download icons

* add new loki snapshots

* update test assertions for locale tests
2025-04-18 00:50:23 +07:00
appleby
3b3d9229a2 Add missing docsPage links to custom expression HELPER_TEXT_STRINGS (#56818) 2025-04-17 10:28:53 -07:00
Tyler Plude
daf6c948e6 Fixing division by zero for minibar columns (#56871) 2025-04-17 10:20:45 -07:00
bryan
eb06aa0d79 use the branch in mage cljfmt-updated <branch> (#56868) 2025-04-17 16:07:01 +00:00
Nicolò Pretto
88a88270be fix(sdk): use instance locale if no locale is passed (#56683)
* fix(sdk): use instance locale if no locale is passed

* update docs

* we do support country codes, we have tests for it

* Update e2e/test-component/scenarios/embedding-sdk/locale-on-provider.cy.spec.tsx

Co-authored-by: Phoomparin Mano <poom@metabase.com>

* remove manual fallback to "en", site-locale is never undefined as it has
a default

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-04-17 16:06:05 +00:00
Timofey Kachalov
fe1df8df88 feat(sdk): Export public plugin and icon types (#56851) 2025-04-17 19:30:24 +04:00
Sloan Sparger
3c539e3626 [Permissions] Skip fetching of table fields when updating db permissions (#56859) 2025-04-17 15:09:24 +00:00
Edward Paget
5ed1cf1a2d fix: make enhance table stats a single query (#56738)
Avoids hitting the postgresql query parameter limit when there are more
than MAX_UINT16 tables in a database, also should be more efficient to
fetch this in a single query.
2025-04-17 07:47:12 -07:00
Kamil Mielnik
98f9c39437 SEM-173 Allow filtering logs on specific namespaces (#56772)
* Use Mantine instead of styled components

* Fix centering

* Add task and status params

* Add TaskStatusPicker

* Make picker clearable

* Add task picker

* Put filters and pagination together

* Translate task status

* Break down logic

* Move loading and error state

* Always render something

* Make task picker searchable

* Add empty state to the table

* Fix clear button being transparent

* Add useUrlState

* Use useUrlState in TasksApp

* Move UrlState to its own file

* Sort

* Rename file

* Rename

* Clean invalid query params on mount

* Prettier

* Use Action

* Ignore invalid pages

* Reuse variable

* Fix tests

* Add test

* Add label to clear button

* Remove redundant condition

* Add assertions

* Improve typing

* Be explicit about empty string handling

* Add url state to logs

* Add download button

* Disable the button instead of hiding it

* Add query input

* Add clear button

* Improve copy

* Typo

* Fix unit tests setup

* Improve empty state message

* Support location in setup

* Add a test for empty state message when filtering

* Add a test

* Add download button assertions

* Add e2e tests

* Simplify assertion

* Remove redundant element

* Add debounce

* Fix timezone issue

* Extract TasksTable

* Move use-url-state to its own directory

* Add unit tests for useUrlState

* Add test

* Refactor

* Add more tests

* Fix missing import

* Add task endpoints mocks

* Add TasksApp tests boilerplate

* Add pagination test

* Add tests for filters

* Add more tests

* Update tests

* Update tests

* Add more assertions
2025-04-17 21:34:36 +07:00
Romeo Van Snick
04973ca224 Clean up unused code in the expression parser (#56706)
* Remove unused hooks

* Simplify error creation in pratt parser

* Simplify CompileError construction and remove unused data
2025-04-17 16:24:59 +02:00
Kamil Mielnik
b8f0117f5f SEM-110 Support filtering of tasks list by status and task name (#56664)
* Use Mantine instead of styled components

* Fix centering

* Add task and status params

* Add TaskStatusPicker

* Make picker clearable

* Add task picker

* Put filters and pagination together

* Translate task status

* Break down logic

* Move loading and error state

* Always render something

* Make task picker searchable

* Add empty state to the table

* Fix clear button being transparent

* Add useUrlState

* Use useUrlState in TasksApp

* Move UrlState to its own file

* Sort

* Rename file

* Rename

* Clean invalid query params on mount

* Prettier

* Use Action

* Ignore invalid pages

* Reuse variable

* Fix tests

* Add test

* Add label to clear button

* Remove redundant condition

* Add assertions

* Improve typing

* Be explicit about empty string handling

* Extract TasksTable

* Move use-url-state to its own directory

* Add unit tests for useUrlState

* Add test

* Refactor

* Add more tests

* Fix missing import

* Add task endpoints mocks

* Add TasksApp tests boilerplate

* Add pagination test

* Add tests for filters

* Add more tests
2025-04-17 20:57:38 +07:00
lbrdnk
2a827d4448 Add memory usage logging to sync steps (#56834) 2025-04-17 13:04:23 +02:00
Timofey Kachalov
764b236601 feat(sdk): Export more public SDK types (#56838) 2025-04-17 13:55:31 +04:00
Nicolò Pretto
6999843d4c fix: run cross-version-for-breaking-changes only on pull requests to (#56794)
make it pass on master
2025-04-17 09:32:10 +02:00
lbrdnk
7cb3445541 Add sorting capabilities to GET /task/ endpoint (#56795)
* Add sorting

* Add test

* Adjust ordering for h2

* Use merge instead of union

* kondo

* Undefined nil ordering among various app dbs
2025-04-17 08:58:44 +02:00
Nick Fitzpatrick
9aec86abce Snowplow tracking for shortcuts (#56744)
* temo

* enable tracking for shortcuts

* amending e2e test
2025-04-17 05:17:11 +00:00
Nick Fitzpatrick
bf27059a98 Disabled shortcuts when a modal is open on the page (#56806)
* Disabled shortcuts when a modal is open on the page

* fix context check

* removing irrelevant test
2025-04-16 19:35:25 +00:00
Uladzimir Havenchyk
3dd6b40c80 test: release healthy specs from jail (#56764) 2025-04-16 22:33:52 +03:00
Romeo Van Snick
633a4565ff Convert compiler to lib (#56426)
* Convert pratt compiler to use ExpressionParts

* Simplify compile by using compileNode helper

* Add todo's about casts

* Simplify error creation

* Make assertions more consistent and translate error messages

* Remove any check

* Simplify compiler by moving stuff into infix/unary helpers

* Remove unused assertions

* Remove casts on constant operator names

* Add assertions for operators

* Wrap top-level literals in a value clause

* Handle bigints in pratt compiler

* Accept ExpressionParts in Lib.expressionClause

* Remove null from ExpressionArgs

* Add field and metric to expression operator

* Simplify pratt compiler types

* Add more tests for equivalent clauses

* Return metadata objects directly from field-resolver

* Add more operators to type

* Create type for field type

* Remove resolverPass

* Convert resolver to Lib.ExpressionParts

* Convert compiler to expressionParts

* Fix syntax error

* Fix types

* Remove unused passes

* Fix resolver tests

* Add types to top-level literals

* WIP: convert untagged expression-parts from #js

* Manually unwrap field, segment and metric metadata

* Unwrap options in pratt compiler

* Remove empty options

* Handle normalized expression when diagnosing

* Allow customizing field resolver

* Fix fuzz tests

* Add value to ExpressionOperator

* Remove unused TODO's

* Use constants in test so types match

* Wrap clauses in defineClause and extract list of defined clauses

* Forbid setting name on clause config

* Use defined clause name as ExpressionOperator

* Use getClauseDefinition helper to get clause definitions

* Ignore type in filters

* Move expression-parts transformation to lib.js

* Add type-of method implementations for field, metrics and segments

* Trigger change when fast setting custom expression

* Remove superflouous casts

* Simplify resolver return type

* Use reference for top-level fields

* Be more specific about types in compiler

* Convert operator to string

* Add unit test for specific expressions

* Fix literals icons

* Remove unused matchers

* Remove unused option from compiler

* Negate number literals directly in compiler

* Add expression-clause implementation that takes one argument

* Use single-arg version of Lib.expressionParts

* Remove TODO

* Use helper to compile top level literal

* Add effective-type to top-level literals

* Remove unused MBQLCLauseMap type

* Remove unused import

* Add two-argument version of expressionClause

* Wait for button to be visible

* Add operator to invalid operator assertion

* Remove incorrect operator check

* Add more specific type to clause name

* Always throw if function name is not found

* Add overloads to getDefinedClause for known function names

* Document the allowFastSet typing hack

* Lift operator check

* Convert nil to {} in body

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Make expression-parts js conversion more clear

* Pass through lib.metadata.calculation/type-of for the type-of implementations

* Always throw assertion errors

* Use helper to check query invariants

* Remove lib.schema.expression/type-of methods

* Add test for normalization of uppercase keyword arguments

* Allow some normalizers to ignore case

* Use threading for lowercase converter

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Structure test better

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Remove unused var

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-04-16 20:52:26 +02:00
Nick Fitzpatrick
6a782d5eb4 Update navigation shortcuts to be key sequences (#56798)
* adjusting keyboard shortcuts, event names

* adding viewing context to dashboard shortcuts

* adding unit tests for enforce some sanity
2025-04-16 12:26:27 -06:00
Uladzimir Havenchyk
fa896cbe1c ci: extract build-matrix script (#56773)
* ci: extract build-matrix script

* fixup

* fixup

* add a test

* make executable?

* checkout

* fix path

* add tests from .github to file-path

* fixup
2025-04-16 20:24:27 +03:00
appleby
50e2c32603 Log metric data for failures in qp.middleware.metrics/adjust (#56747)
* Log metric data for failures in qp.middleware.metrics/adjust

When qp.middleware.metrics/adjust fails to expand a metric, log the metric's name and dataset_query, not just the
metric id.

Closes QUE-862

* Update test to assert that metric data is present in ExceptionInfo
2025-04-16 09:36:35 -07:00
bryan
8bb6ef90d7 fix missing deps.edn checksum (#56800) 2025-04-16 12:36:03 -04:00
Alexander Polyankin
781af5af39 Temporal units translation fix (#56792) 2025-04-16 16:30:44 +00:00
Kamil Mielnik
ec25a3ac4a yarn remove use-debounce (#56784) 2025-04-16 21:25:56 +07:00
Nicolò Pretto
5d9bb5985a POC of cross version tests to detect breaking changes (#56130)
* wip script to build the frankenjar

* build/run/test functions that seem to be working

* preparing for ci

* wip ci workflow

* need to run the job "manually" at least one to be able to dispatch it
from the gh cli

* add workflow_call

* bash instead of sh to solve issue of illegal option -o pipefail?

* use correct version of node

* prepare backend

* more envs to ci

* make jar run on the background in ci

* trying to run a list of specs in ci, tagging with tags probably won't
work as tags potentially need to be there on "older" versions of the
test

* fewer tests so it maybe doesn't timeout

* run on prs targerting the pr branch and the target base one
:wq

* clean up

* fix: without --env it wasn't really using the grepTags param:wq

* refactor: check for the actual files instead of doing ls*

* add back some more test files

* add log for ci

* remove colors as they're not shown in ci

* test: wait for data to load in a flaky test

* test: wait for data to load in a flaky test

* make sure we're building the EE jar

* skip licnese step as we don't need it

* move script out of embedding-sdk folder

* make curl -s to spam less in ci

* refactor: move jops to keep the result job last

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
2025-04-16 16:09:17 +02:00
Riley Thompson
49f744375c Revert "Revert "Remove partner drivers"" (#56575) 2025-04-16 09:43:29 -04:00
lbrdnk
22f176f81b Address remarks for status and task filtering in GET /task endpoint (#56774)
* Docstring

* Support :unknown task

* Add tasks-count

* Use tasks-count in the API definition

* Rename to total

* Add and update tests

* docstring
2025-04-16 15:06:38 +02:00
metamben
21b29f3965 Add diagnostics for expressions with illegal nested aggregations (#56741)
Fixes QUE-822
2025-04-16 15:52:36 +03:00
Ngoc Khuat
88e251c441 Guard notification pool for exhaustion (#56766) 2025-04-16 11:23:22 +00:00
github-automation-metabase
4bdc21b1aa Bump com.google.guava/guava from 33.4.5-jre to 33.4.6-jre (#55972)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-16 07:30:20 +00:00
Uladzimir Havenchyk
008973b814 test: move flaky mongo test to jail (#56753) 2025-04-16 09:28:51 +03:00
Alexander Polyankin
01eb3ac384 Remove dead code from FieldValuesWidget (#56739) 2025-04-15 22:52:41 -04:00
Fraser
43d5939a64 Convert Updates tab to new components (#55979)
* Convert Updates tab to new components
2025-04-16 11:14:42 +12:00
Alex Yarosh
cbacd7048e docs: semantic types (#56703)
* semantic types

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* feedback

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-04-15 16:53:41 -04:00
Eric Normand
21e1ca15c6 Correct output for dashboard filter variables (#56619)
* Correct output for dashboard filter variables

* Whitespace

* Add node script for testing clojurescript

* Enhance format-unit and add parse-unit.

parse-unit is new.

format-unit now works with moment (cljs) or java.time (clj) values, not just strings and numbers. I also added two new
units (:day-of-week-abbrev and :month-of-year-full).

* Refactor to use time/parse-unit and time/format-unit
2025-04-15 14:42:20 -05:00
Ngoc Khuat
5f47d1cbd3 Less ambiguous notification logs (#56701) 2025-04-15 20:31:03 +03:00
Nicolò Pretto
fd25c7efcc add comment to explain why we need isDashboard to Visualization (#56709) 2025-04-15 18:47:43 +02:00
Uladzimir Havenchyk
4c59fc665f test: fix another flakiness (#56711)
* test: fix another flakiness

* another assert

* add comment back and remove flaky
2025-04-15 16:29:25 +00:00
bryan
38bb58583d indent files with mage from lint-staged (#56303) 2025-04-15 09:09:36 -06:00
Timofey Kachalov
1eeaec0e94 docs(sdk): Improve typedoc output and plugins (#56712) 2025-04-15 18:38:26 +04:00
Alexander Polyankin
6985eca2b3 Remove unused endpoints from services.js (#56735) 2025-04-15 14:37:12 +00:00
Alexander Solovyov
b211f68ec7 fix identity-hash-test flakes (#56728)
this happens because we're not hashing `now` in this case, but what is coming from DB; which is OffsetDateTime and can
have slightly different precision, leading to different hash.
2025-04-15 13:49:39 +00:00
Alexander Solovyov
c6488e7fc6 use big number mode for apache compress (#56719)
possibly fixes a problem we're seeing in #53354
2025-04-15 13:37:22 +00:00
metamben
f786d876bb Wait a bit longer in util.queue tests to let them pass in CI (#56681)
* Wait a bit longer in util.queue tests to let them pass in CI
2025-04-15 13:32:41 +00:00
Alexander Polyankin
f74bf7fac2 Use MultiAutocomplete in FieldValuesWidget - multiples values only (#56461) 2025-04-15 09:22:53 -04:00
Alexander Polyankin
a3da9834be Rename date picker labels (#56699) 2025-04-15 13:13:52 +00:00
Timofey Kachalov
3dff6bef19 Run build job for SDK on any FE code change (#56718) 2025-04-15 17:07:46 +04:00
Alexander Polyankin
30ca07666d Fix the filter input placeholder for remapping cases (#56691) 2025-04-15 09:04:11 -04:00
Alexander Polyankin
67de26fc3f Fix native model perms (#56697) 2025-04-15 09:04:02 -04:00
Oisin Coveney
b7a74d02c7 feat(sdk): Automatically set a sensible display to interactive questions (#56584) (#56667)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-04-15 11:19:17 +01:00
Alex Yarosh
d001543d0e Update connecting.md (#56708) 2025-04-15 05:23:22 -04:00
Timofey Kachalov
51d772c85b Fix redirect from internal module, replace metadata description via a plugin (#56614)
Co-authored-by: Timofei Kachalov <timofei@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-04-15 12:24:54 +04:00
Timofey Kachalov
f9c6432297 Remove Embedding SDK API generated doc files from repo (#56637) 2025-04-15 12:07:36 +04:00
Fraser
8afc62789e Replace confirm content in use-confirmation hook (#55247)
* Replace confirm content in use-confirmation hook

* Ensure modal closes after confirmation

* Update to mantine popover

* Toggle closeOnClickOutside when modal is open/closed
2025-04-15 18:32:42 +12:00
Jeff Bruemmer
8ee568053a docs - expression casing (#56695) 2025-04-14 22:32:32 +00:00
Uladzimir Havenchyk
cabe5b28f8 test: fix flakiness in action creator unit tests (#56672) 2025-04-14 20:30:58 +03:00
Nicolò Pretto
f78b415927 make the sdk docs check not required so we can merge things (#56685) 2025-04-14 18:04:11 +01:00
Alexander Polyankin
363c87a8af MultiAutocomplete + remapping (#56621) 2025-04-14 12:33:30 -04:00
metamben
5472a21887 Parse BigQuery timestamp values with microsecond precision (#56626)
Fixes #51175

BigQuery sometimes returns timestamp values as floating point values (as strings, of course). We used to pass the
parsed double value to java-time.api/instant, but that seems to have microsecond precision. In this change we use
Java's built-in Instant construction function to keep the full precision.
2025-04-14 19:31:29 +03:00
Alex Yarosh
90b57b895a docs: mention supabase (#56676)
* mention supabase

* Update docs/databases/connections/postgresql.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-04-14 16:18:37 +00:00
Jeff Bruemmer
74f24399e1 fix typo (#56678) 2025-04-14 16:09:36 +00:00
Romeo Van Snick
dfc753e0f6 Fix dissappearing string escapes (#56605)
* Add repro for #56596

* Allow escaping backslash

* Use unquoteString everywhere to parse strings and references

* Do string quoting and unquoting more consistently

* Add repro for #56596

* Make string parsing more straightforward and consistent

* Use quoteString to find errors with quoting

* Type string helpers more strictly

* Add fuzz tests for string quoting

* Move fuzz helper to test folder

* Make string fuzzing repeatable

* Add sanity check

* Fuzz all three quoting modalities

* Add [-quote tests

* Rename quote to delimiter

* Fix path for lexifier fuzz testing

* Fix name for compiler fuzz testing

* Use constant to store delimiter pairs

* Fix option name in formatter

* Add more cases around half-quoted strings

* Rename quote to delimiter in comment

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-04-14 15:30:05 +00:00
Alexander Solovyov
330f2c0a3c mage jar-download now can see newer releases (#56669)
since we don't tag v1.* anymore or something?
2025-04-14 18:27:29 +03:00
Nemanja Glumac
6c0ae49c2d Create the "Product Growth" team (#56674) 2025-04-14 17:19:48 +02:00
Romeo Van Snick
bd3ef171a8 Convert formatter to mbql (#55468)
* Add isExpressionParts helper to check

* Export Lib.isColumnMetadata

* Add Lib.isColumnMetadata to check

* Mark is-column-metadata as Single use instead of smelly

* Add is-metric-metadata helper

* Add is-segment-metadata helper

* Add isSegmentMetadata and isMetricMetadata to checks

* Use expressionParts and expressionClause in formatter

* Avoid stringifying the ast

* Allow passing literals to filter-clause

* Simplify test case for now

* Handle [:value x] in formatter

* Unnest expression-parts

* Add metric-clause? and segment-clause? helpers

* Handle metric and segment clauses in expression-parts

* Flatten case/if statement args in expression-parts

* Remove special case for case/if in formatter

* Support keywords in expression-parts

* Fix duplicate negation test case

* Prefer desctructuring over get

Co-authored-by: Braden Shepherdson <braden@metabase.com>

* Use set to match case and if

Co-authored-by: Braden Shepherdson <braden@metabase.com>

* Fix typo

* Use conditional threading in maybe-expand-*-expression

* Use destructuring to match case/if clauses

* Use cond-> instead of maybe-expand- helpers

* Fix literal in formatter tests

* Rename is-*-metadata to *-metadata?

* Swap test case order

* Use multi-method for expression-parts

* Inline recurse fn

* Accept ExpressionClause in the formatter

* Pass expression clause in HighlightExpression

* Build expressionParts for examples manually

* Be more strict in formatter typing

* Be more strict in formatter typing

* Fix FunctionBrowser example

* Add test case for 1 + 1

* Pass expression clause to format in Editor

* Add docstring to expression-parts-method

* Remove superflouous check

* Use threading macro in column-metadata-from-ref

* Unwrap case/if into pairs and a fallback argument

* Remove reference to unknown function

* Add stage-index-less version of expression-parts

* Add MetricMetadata and SegmentMetadata to ExpressionArg

* Fix case/if expansion not to have nil argument when fallback is nil

* Add test for case and if

* Fix case/if defop

* Add more test cases to case and if test

* Add ExpressionArg type

* Allow passing Expressionable to formatter

* Add more tests for case and if

* Move case and if conversions to fe_util

* Deduplicate case-or-if matcher

* Document case-or-if helpers more

* Be more precise in the type of ExpressionParts args

* Fix args for expression-clause in exclude-date-filter

* Remove faulty test

* Add test for nested parts

* Move fix-expression into ->op-arg

* Move ensure-uuid into fix-expression

* Wrap operator in keyword

* Correctly recurse through expression-parts

* Add test for nested case parts round-trip

* Add source-field to test data

* Comment out broken test case

* Add source-field to ReferenceOptions type

* Remove unused imports

* Allow more arguments to expression-parts

* Use expression-parts in filter test

* Handle bigint in formatter

* Add missing import

* Remove unused import

* Normalize mbql

* Allow lib.expression/expression as arg to expression-clause

* Handle expression refs

* Add tests for unknown fields, metrics and segments

* Add metrics to formatting tests

* Handle non-existent metrics and segments

* Add workaround for unknown fields

* Use cond-> and destructuring for unknown field

Co-authored-by: Braden Shepherdson <braden@metabase.com>

* Remove superflouous call to lib.field/extend-column-metadata-from-ref

* Inline segment-metadata-from-ref and metric-metadata-from-ref

* Collapse all identity expression-parts-methods in a doseq

* Call expression-parts instead of expression-parts-method

* Use multi-method to handle case and if

* Pull out temporal expression expansion into separate multimethod

* Move check closer to where it is used

* Remove constant conditional

* Use threading macro in expression-parts

* Move nested case/if test out of deftest

* Fix formatting

* Fix metadata method when metric is not found

* Add display-name to unknown field stub

* Use lib.metadata helpers directly for field, metric and segments in expression-parts

* Fix e2e test

* Handle segments in filter parts directly

* Fix e2e test

* Add TODO

* Use doseq in literals test

* Add test for bigint value clause in expression-parts

* Remove TODO

* Use id from sample database

* Use vec

Co-authored-by: Braden Shepherdson <braden@metabase.com>

* Fix types

* Use simpler assertion helper

* Move metric to aggregations tests

* Do not wrap value clauses in parentheses

* Return metric metadata from expression-parts

* Emit expression reference in the case of expressions

* Strip expression-name from columns metadata in expression-parts

* Add e2e test for nested references

* Return stub metric metadata if metric is not found

* Use expression-name from the reference

* Add tests for field reference in expression-parts

* Add tests for segment reference in expression-parts

* Add tests for metric reference in expression-parts

* Add tests for expression reference in expression-parts

---------

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2025-04-14 15:58:36 +02:00
Romeo Van Snick
93831828e4 Fix native editor sidebar (#56594)
* Fix issue where toolbar is being pushed off screen

* Add repro for metabase#56570
2025-04-14 12:11:00 +02:00
Kamil Mielnik
922cda5ec0 SEM-114 Improve pagination in tasks page (#56491)
* Add pagination to URL in tasks

* Add tests
2025-04-14 13:40:26 +07:00
Nick Fitzpatrick
53093f8c1a Query builder keyboard shortcuts (#56610)
* Query builder keyboard shortcuts

Query builder shortcuts

* PR feedback, remove download question shortcut
2025-04-14 07:48:43 +05:30
lbrdnk
a4ba2acd4b Add filtering capabilities to /task/ endpoint and add/task/unique_tasks endpoint (#56451)
* Adjust /task enpoint to handle status filtering

* Update GET /task endpoint

* Update test

* Unique tassk endpoint and filter nad schema

* Tests

* chore

* Review remarks

* Simplify

* Fix schema

* typo
2025-04-13 09:44:23 +02:00
lbrdnk
a54de86b39 Speculative OOM fix: partition index updates, update logging for index sync (#55866)
* Adjust logging

* Speculative OOM fix

* Update partitioning logic of sync-all-indexes!

* Add test

* Use bigger partitions

* Adjust tests

* Remarks
2025-04-13 09:43:52 +02:00
Oleksandr Yakushev
5d97d19781 [metrics] Fix race condition in jvm-hiccup/alloc-rate metrics (#56528) 2025-04-12 21:54:30 +03:00
appleby
97387d0942 Enable expression-literals for redshift and vertica (#56534)
* Support drivers that need special handling for literal string expressions

* Enable the :expression-literals feature for vertica

* Enable the :expression-literals feature for redshift

* Review feedback: lift comment about inlined literals from h2 to sql driver
2025-04-11 16:33:52 -07:00
bryan
63198734e2 properly address metabase's bb executable (#56606)
- if you have bb on your path, then this would never be hit.

Testing by uninstalling bb will not uncover this issue if you have
repo/path/metabase/bin on your PATH!
2025-04-11 22:54:27 +00:00
appleby
2a4e8d1c69 Enable expression-literals for sqlite and starburst (#56533)
* Rename True and False expressions in literal expression tests

Speculative fix for sqllite failing the tests.

* Update literal expression tests to work with drivers that treat empty string as null

* Add empty-string-literal-expression-test and remove empty string form standard-literal-expression-defs

* Fix logical merge conflicts in case-with-literal-expression-test

* Enable the :expression-literals feature for sqlite and starburst

* Review feedback: drop format-nil->empty-str

As pointed out by metamben in code review `(str nil)` is already the empty string. In fact, the culprit here was a
missing `format-nil-values?` arg to `format-rows-by`.
2025-04-11 15:03:52 -07:00
Uladzimir Havenchyk
de8c20bf55 test: use mousemove instead of realHover for echart tooltip (#56583) 2025-04-12 00:44:57 +03:00
Alexander Polyankin
ba131b1abd Close the MultiAutocomplete dropdown on Esc, preventing the outer Popover from closing (#56562) 2025-04-11 15:39:31 -04:00
Nick Fitzpatrick
452dbefda4 Add route prop to disable command palette, Disable in setup routes (#56507)
* Add route prop to disable command palette, Disable in setup routes

* increase wait timeout

* refresh user on setup

* Lets try a unit test instead

* removing refresh user from UserStep
2025-04-12 00:09:12 +05:30
Ryan Laurie
fd7c0db61f fix frontend test flake (#56597) 2025-04-11 08:50:04 -06:00
Uladzimir Havenchyk
5e19281112 test: fix a broken entity picker test (#56586) 2025-04-11 17:27:37 +03:00
Jeff Bruemmer
50df68482e docs - note on quotes (#56520)
* note on quotes

* edit

* tags

* format

* spacing

* edit
2025-04-11 14:25:41 +00:00
Noah Moss
c17c259d79 Remove a workaround which is no longer needed due to update of Apache POI (#56572)
* Remove a workaround which is no longer needed due to update of Apache POI

* clean ns
2025-04-11 13:33:23 +00:00
metamben
3be8f6ab2b Require only id and value for parameters when running questions (#56565)
This is the BE part of #51813
2025-04-11 15:40:41 +03:00
Sébastien
50664531b3 closes metabase#56307: faint line on tooltip arrow in FF (#56588) 2025-04-11 13:43:56 +02:00
Oisin Coveney
1f19dee6c5 Fail SDK unit tests when there are console errors #55529 2025-04-11 11:16:54 +01:00
William
c3c5edc272 Calculate and cache entity_ids on select (#54411)
We need to ensure that we consistently have entity-ids in metadata (and potentially elsewhere) even before we've finished backfilling them in.  To do this, we check for entity-ids in the field/table/database/card after-select and run calculation/deduplication logic to get them when necessary.  We then cache the results (because these calculations can be slow), and a separate job then drains the cache and writes the results back to the db.
2025-04-11 00:19:38 +00:00
John Swanson
728fa82bc2 Feature: Database Routing (#54648)
* Migrations for database sandboxing (#53125)

Two changes here:

- add a self-referential foreign key,
`metabase_database.router_database_id`, to allow marking a mirror
database's router database. Databases with this set are mirror
databases, databases without it are primary databases.

- add a `db_sandbox` table with only three columns:

  - `id`, primary ID,

  - `db_id`, the `metabase_database.id` this sandbox is for, and

  - `user_attribute`, the user attribute used to map users to a
    particular mirror database.

* CRUD API for database routing (#54102)

* Migrations for database sandboxing

Two changes here:

- add a self-referential foreign key,
`metabase_database.primary_database_id`, to allow marking a mirror
database's primary database. Databases with this set are mirror
databases, databases without it are primary databases.

- add a `db_sandbox` table with only three columns:

  - `id`, primary ID,

  - `db_id`, the `metabase_database.id` this sandbox is for, and

  - `user_attribute`, the user attribute used to map users to a
    particular mirror database.

* Bulk endpoint for creating mirror dbs

The error case is a bit wonky right now, it just returns the errors for
the details that failed... without the details or name.

Co-authored-by: Ed Paget <ed@metabase.com>

* Add endpoint for marking a database as a RouterDB

Co-authored-by: Ed Paget <ed@metabase.com>

* Rebase fixes

* Exclude mirrordbs from regular db endpoints

* kondo fixes

* mark `DatabaseRouter` as not serialized

* serdes fix

* copy fix

* delete and update routers

Also reorganized things to be a bit less cattywompus.

Now we have:

- `POST api/ee/database-routing/mirror-database` to create a new mirror database
- `POST api/ee/database-routing/router` to create a new router using an
  existing database
- `PUT api/ee/database-routing/router/:id` to update a router to use a
  new user attribute
- `DELETE api/ee/database-routing/router/:id` to delete a router and all
  of the associated mirror databases.

* GET endpoint for mirrors of a particular router db

* Don't test database conn for mirror dbs

---------

Co-authored-by: Ed Paget <ed@metabase.com>

* Modify the API - don't care about database routers (#55036)

* Modify the API - don't care about database routers

Add a `router_user_attribute` to the `GET /api/database/:id` API
endpoint.

Modifies the database routing API to address only by the database ID.
There's now just two endpoints:

- POST /ee/database-routing/mirror-database to create a mirror database

- PUT /ee/database-routing/router-database/:id to change the
`user_attribute` used for routing an existing database. Can be set to
`null` to turn of database routing for the database.

* fix test

* kondo

* DB Routing: Sloan's API improvements (#55438)

* router_user_attribute on `/database/`

* unique database names for mirror dbs

* Don't delete mirror databases when deleting router

* query param to check conn details

* no making a mirror a router

* Require `:manage-database` perms to get dest dbs

(rather than superuser.)

* set `visible-if`, NA on dest dbs

* Add conditions when making db router

* fix db migrations

* fix tests

* kondo

* reorder migrations for mysql/mariadb

* Implement database routing (#55053)

* Swap DB for DB routing

Caching should work, field values does not currently.

* Rename the metadata replacement dynamic var

for clarity. Since we're using it outside of tests now.

* Refactor Advanced Field Values

Previously we had 3 types of Advanced field values:

- sandbox,
- impersonation,
- and linked-filter

Each of these three had their own function, `hash-key-for-*`, and the
caller of this function was responsible for generating the correct hash
key for the field provided.

For example, `hash-key-for-advanced-field-values` took a `fv-type` and
called either `hash-key-for-linked-filters` or `hash-key-for-sandbox` or
`hash-key-for-impersonation` depending on the type.

The big problem here is that the hash keys aren't composable. You can
see this being an issue in `hash-key-for-linked-filters`, where the
enterprise version needs to also check whether the field is sandboxed,
and if so, include sandboxing data in the generated hash as well as the
linked filter data.

If we add more orthogonal things to the hash (like database routing) we
would end up with a rat's nest where each hashing function partially
implements a bunch of other hashing functions to make things work. E.g.
`hash-key-for-database-routing` might check if the field is sandboxed,
and if so include data about the sandbox, but also
`hash-key-for-linked-filters` should check if the field is
sandboxed *or* impersonated *or* subject to db-routing and include data
about those, and ...

Instead, I've replaced all these functions with `hash-input-for-*`
functions, which return self-contained maps that reflect
their *internal* knowledge of what should/should not be cached.

For example, the `hash-input-for-sandbox` function returns either
`nil` (if the field is not sandboxed for the current user) or
`{:sandbox-attributes {<the user attributes used for the sandbox>}}` (if
it is).

`hash-input-for-field-values` simply merges all of these together into
one lump.

To tell whether we're generating a `full` or `advanced` field value, we
can just check to see whether the hash input has any data other than the
field ID.

The one downside here is that we'll no longer be able to look at the DB
and distinguish between different types of FieldValues. As far as I can
tell, the code itself does not ever do this, so I think this is an
acceptable tradeoff.

* database routing for field vals

* move things around a bit

* fix tests

* Lint

* WIP: database routing

* fix test

* more tests, caching tests

* kondo

* stray #p

* Exclude mirror databases from search

* Exclude mirror databases from sync

* Do not create permissions for mirror databases

* fix more tests

* lint

* Add another e2e test for field values

* Don't grab database from query in h2 driver

* Fix my rebase error

* [DB Routing] Implement UI (#55132)

* save

* wip

* wip

* lots of progress

* iteration

* more progress, add delete mirror modal

* type clean up, bug fixes, code organization

* address lots of TODOs

* prevent configuring uploads to routed dbs, prevent db routing if db is upload destination db, replace all usages of routed database and mirror database in favor of destination database

* clean up url usage, add health check to destination database lists

* support hidden fields for database details

* fix types and TODOs

* render warning that model features can not be enabled when db routing is enabled, add unit tests for DestinationDatabasesList

* add e2e coverage for db routing CRUD

* move db routing e2e to a new file, make tests nicer, add test coverage for not showing destination databases outside of database settings

* test that db routing can not be enabled if other conflicting features are enabled

* finish e2e tests as much as possible, add feature token to session properties payload

* move more code into enterprise folder, add redirects and permissions checks for destination db routes, handle no user attributes on instance state, fix failing unit tests, make alerts tooltips when features cant be enabled based on other features being enabled

* test fixes, impl error states kyle provided

* split up tests by ee and oss

* error state updates, fix failing e2e tests

* fix failing oss e2e test, beef up db management perms test

* PR feedback

* impl more feedback

* Fix BE tests

* another be test

* pr feedback

* fix one of the failing e2e tests

* include_mirror_databases -> router_database_id

* skip test

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>

* fix deletion of router dbs with dest dbs (#55831)

* Don't require superuser perms to get dest db (#55754)

* [DB Routing] Database pages tech debt - RTKQuery + TS migrations (#55744)

* convert DatabaseList to typescript

* make DatabaseEditApp use rtkquery, remove old initialize approach, remove related redux code, port code to use api db rather than metabase lib Database class

* remove dismissDatabaseSyncSpinner redux code in favor of rtkquery

* fix some mistakes causes tests to fail

* port DatabaseList to typescript

* port adding sample database to rtkquery

* misc fixes

* fix failing unit test

* convert admin/databases/database.js and admin/databases/selectors.js to TS

* editParamsForUserControlledScheduling.js to editParamsForUserControlledScheduling.ts

* remove all usages of metabase lib Database class from Database pages

* fix type errors

* fix failing e2e

* prettier

* [DB Routing] Port Admin DB page components to Mantine (#55811)

* port components to mantine for admin db pages

* fix failing tests

* remove unused comment

* fix type issue

* Require opt in/out of database routing (#55841)

I was considering possible errors here and I think this will work well
as a safety harness.

In dev/testing (non-prod) environments, let's add an assertion to the
JDBC driver that if we're about to connect to a database. Either:

- we're *explicitly* trying to only connect to Router Databases. For
example, sync should *never* connect to mirror databases or go through
Database Routing. OR

- we've enabled Database Routing, and we *don't* want to access the
Router Database (unless of course DB routing has been configured to send
us there)

Another way of putting this is that there are two obvious ways for this
feature to go sideways: we accidentally sync a mirror database or do
something else that shouldn't work for mirror databases, OR we
accidentally skip the Database Routing process and connect to the router
database when we shouldn't.

Of course, we can't guarantee that all drivers will call
`(database-routing/check-allowed-access!)` before connecting! But we can
just call it from the JDBC router and that should be sufficient to catch
any issues in development in the vast vast majority of cases.

* [DB Routing] UI feedback part 1 (#55893)

* make dest db validate on creation, invalidate cache of user attributes after user is updated

* add test coverage for updates and uncomment e2e tests parts that were previously failing

* fix type issue

* Fix audit/query logging for DB routing (#56103)

[ADM-585: Handle audit logging and query logging](https://linear.app/metabase/issue/ADM-585/handle-audit-logging-and-query-logging)

* exclude destination dbs from serialization (#56076)

* Decrease the pool size for mirror DBs (#56104)

DB metadata seems like an odd thing - it's the Metabase Database
converted to a snake-hating map, so `router_database_id` becomes
`router-database-id`.

We can't write a function of `:model/Database` that decides whether
we're looking at a mirror database (because we're not looking at a
`:model/Database` here). So we're reduced to just checking the key.
Feels weird, but I think the cleanest way available here?

* Fix sandbox on a routed DB with question as filter (#56393)

This only affected turning on sandboxing, and was not an error for
sandboxing itself.

When we configure sandboxing, we want to make sure the column types for
the query we're using match the columns in the sandboxed table.

As part of this, we ran the query anonymously with
`(request/with-current-user nil ...)`. With Database Routing, however,
we added a new constraint: you can't run any queries against a database
with routing configured anonymously.

Instead just run the query as a superuser. This is effectively the same,
and it's consistent with what we do when actually *enforcing* the row
level restrictions anyway: we preprocess the source query as an admin
and then splice it into the user's query.

The one thing that gives me pause: I'm not really sure why we would have
done `(request/with-current-user nil ...)` in the first place here.

* Add database-router usage e2e tests (#56255)

* Improve error messages and UI for config (#56392)

* Improve error messages and UI for config

- improve error messages when a dest db can't be found

- improve the admin UI for configuring DB routing: https://metaboat.slack.com/archives/C07L6VCCYQL/p1744044752380479

* changes suggested by Jeff

* fix error msg tests

* disable linting for DB Routing description

* fix getting a destination db

db `can-read/write?` use router DB if necessary, since destination
databases don't actually have permissions saved.

* i18n for errors

* spelling 😁

* fix tests

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>

* Fix options for Destination DBs (#56450)

* Fix options for Destination DBs

This may still require a bit of frontend work.

* Set destination-database=true for destination db modal

---------

Co-authored-by: Fraser McIntosh <fraser@metabase.com>

* Fix impersonation with Database Routing (#56503)

* Fix impersonation with Database Routing

Database routing was not working with impersonation, because by the time
the driver calls `set-role-if-supported!` the router database (which is
configured for impersonation) has already been swapped out for the
mirror database (which is not).

To fix this, have a new impersonation middleware set a dynamic var,
`*impersonation-role*`, which is preferred by `set-role-if-supported!`
if set. This way, in queries, `set-role-if-supported!` will use the
pre-calculated role (which seems better than computing it twice anyway).

Co-authored-by: Ed Paget <ed@metabase.com>

* Add impersonation tests

* Add sandbox question test

---------

Co-authored-by: Ed Paget <ed@metabase.com>
Co-authored-by: Fraser McIntosh <fraser@metabase.com>

* keep metadata store on metadata provider swap (#56502)

* keep metadata store on metadata provider swap

Before, we would blow away the existing QP store entirely when using
`*DANGER-allow-replacing-metadata-provider* to swap out the existing
metadata provider.

Instead we can only initialize the QP store when it was truly
uninitialized, and replace *only* the metadata provider when we're
trying to do that.

This is just in case something in QP post-processing needs data from the
original store, e.g. something that was stored with
`qp.store/store-miscellaneous-value!`.

Co-authored-by: Ed Paget <ed@metabase.com>

* only allow replacing md provider once

---------

Co-authored-by: Ed Paget <ed@metabase.com>

---------

Co-authored-by: Ed Paget <ed@metabase.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Fraser <fraser@metabase.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-04-10 13:21:23 -07:00
Alexander Polyankin
9eb88c3478 Pass missing props in MultiAutocomplete (#56506) 2025-04-10 15:15:22 -04:00
Uladzimir Havenchyk
24b79c324c test: fix another flakiness (#56563) 2025-04-10 22:04:51 +03:00
Konstantin Darutkin
c3e6655d45 fix: controlled column reordering in datagrid (#56543) 2025-04-10 19:40:08 +01:00
Aleksandr Lesnenko
8f57a69882 fix incorrect series colors in static viz (#56415)
* fix static charts may have incorrect series colors

* use hex colors in static viz
2025-04-10 14:02:08 -04:00
Timofey Kachalov
067057efda Add CI job checking outdated Embedding SDK API documentation (#56452) 2025-04-10 21:54:31 +04:00
Nick Fitzpatrick
98c2872f2b Adm 505 collection and everywhere shortcuts (#56457)
* rest of global, and some collection shortcuts

* adjust collection item commands, e2e tests

* adjust e2e test

* remove bulk move
2025-04-10 16:32:56 +00:00
Timofey Kachalov
10b7df74e9 docs(sdk): Add generated documentation files for @metabase/embedding-sdk-react (#56367) 2025-04-10 20:18:59 +04:00
Edward Paget
b46ae17a3b feat: upgrade ring-jetty to 1.14.1 (#55921)
* feat: upgrade ring-jetty to 1.14.1

Moves us onto Jetty 12 which has some features (pthreading, QoSHanlder)
that we may want to take advantage of.

* fixup! customize jetty metrics

* fixup! license info for jetty ee9

* fixup! make a var private

* fixup! don't use deprecated method

* fixup! create custom statistics handler

Replicate the Jetty 11 statistics handler that is able to report on
asynchronously handled requests separately from synchronously handled
ones. Also ports it to directly report statistics to our prometheus
rather than needing to build a connector between the stats handler
object and our metrics reporting

Co-Authored-By: John Swanson <john.swanson@metabase.com>

* fixup! fix race condition in stats test

* fixup! missing private annotation

* fixup! use normal jetty release with logging fix

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-04-10 16:16:23 +00:00
Timofey Kachalov
b373500c04 docs(sdk): Setup automatic documentation generation for @metabase/embedding-sdk package (#56366)
Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
2025-04-10 20:06:06 +04:00
Uladzimir Havenchyk
31f31e59f0 ci: simulate slow network in stress test (#56464)
* ci: simulate slow network in stress test

* fixup
2025-04-10 19:04:08 +03:00
Nick Fitzpatrick
cf806ce408 Growing entity picker (#56462)
* resize observer entity picker

* adding e2e test

* e2e adjustments
2025-04-10 21:08:01 +05:30
Aleksandr Lesnenko
baab33ecca fix bars width on dst timezone data (#56466)
* fix bars width on dst timezone data

* specs
2025-04-10 11:06:17 -04:00
metamben
acea8921ab Support binning by column with a single numerical value (#56517)
Fixes #53521

--

Co-authored with lyulifeng (lyulifengg@gmail.com)
2025-04-10 14:43:02 +00:00
Timofey Kachalov
4d38da9476 Refactor Embedding SDK CI workflow and improve notify-pull-request action (#56545) 2025-04-10 18:24:38 +04:00
Gustavo Saiani
231d159585 Improve links (#56549) 2025-04-10 11:06:45 -03:00
Nicolò Pretto
59bd5a5905 call e2e-component-tests-embedding-sdk-cross-version from (#56454)
* call e2e-component-tests-embedding-sdk-cross-version from
embedding-sdk.yml

* add e2e-component-tests-embedding-sdk-cross-version to the tests-results
so it needs to pass (or be skipped)
2025-04-10 13:34:29 +00:00
John Swanson
6d647bccde Reset all errored triggers to WAITING on startup (#55769)
* Reset all errored triggers to `WAITING` on startup

Co-authored-by: Ed Paget <ed@metabase.com>

* Add explanatory comments

---------

Co-authored-by: Ed Paget <ed@metabase.com>
2025-04-10 05:44:56 -07:00
lbrdnk
c198bc44e7 Make category semantic type available for all types (#56505)
* Make Category semantic type available for all types

* Update test
2025-04-10 12:56:32 +02:00
lbrdnk
20e9cd8fc1 Fix percentile with expression argument on Clickhouse (#56488)
* Fix percentile honeysql generation on Clickhouse

* Fix lib/case arities

* Add test

* Whitespace
2025-04-10 09:05:32 +02:00
Riley Thompson
76241f7db7 Revert "Remove partner drivers (#56403)" (#56529)
This reverts commit 44274c63ad.
2025-04-10 01:51:38 +00:00
Aleksandr Lesnenko
722fc1a45f fix dashboard empty state for no query creation users (#56340)
* fix dashboard empty state for no query creation users

* fix unit specs
2025-04-09 22:03:35 +00:00
Edward Paget
d20183be8e fix: allow metabase jars to start on JVM 24 and up (#56518)
Metabase jars would crash when running on JVM 24 because the getReourse
method on the ClassLoader object was changed to return null if there is
no file at the provided path. This adds a ".keep-me" file to the
resources directory that Metabase can use to check if it is running in a
jar.
2025-04-09 21:17:50 +00:00
Riley Thompson
b626947efb Document athena permissions (#56525) 2025-04-09 21:11:35 +00:00
Nathan Voxland
c583ae13e6 Added include_metadata argument to search API (#56397) 2025-04-09 15:01:38 -05:00
Case Nelson
a8ecef4802 fix: resolve snowflake sync cost issue (#56337)
* fix: resolve snowflake sync cost issue

Using information_schema queries will cause snowflake to wake an
instance and thus incur costs. Using `show` queries will not do so.

In addition this adds a new multi-method for manipulating the results of
`describe-fields-sql`.

* Fix database-position and sorting

* Fix kondo

* Add order-by to mysql describe-fields

* Sort deps

* Use identity not map identity

* Fix databricks

* Address PR comments
2025-04-09 13:49:57 -06:00
Nick Fitzpatrick
c1062d680a remove duplicate function, translate dates (#56449) 2025-04-10 00:47:41 +05:30
Nathan Voxland
1762ab78d5 Created queue listener and updated search to use it (#55069) 2025-04-09 13:16:00 -05:00
Ryan Laurie
10890aee1f update CI config for automatic translation update (#56500) 2025-04-09 12:02:43 -06:00
Phoomparin Mano
87bbb5b9a1 Expose PDF and dashcard result download toggles in the embedding modal (#56211)
* scaffold separate download options for dashboard static embeds

* parse the display options to hash options

* add toggles to the embed preview

* workaround for duplicate types

* cleanup the dashboard workaround

* cleanup the dashcard workaround

* downloads parameter should not show up on OSS

* replace the download button tests

* update existing tests

* fix test for Download buttons

* remove unnecessary fallback

* add a new snowplow schema

* update unit tests

* fix snowplow test assertions

* add snowplow tests

* use results instead of dashcard for consistency

* make the JSON schema backwards-compatible

* split download settings into two components

* use downloadsEnabled.results instead

* snowplow type must be results, not dashcard

* revert StaticEmbedSetupPane changes as it is unused

* create a new field for snowplow tracking
2025-04-10 00:06:29 +07:00
Nick Fitzpatrick
cfb87dc8a1 Remove copy and move shortcuts from dashboards (#56493)
* Remove copy shortcut from dashboards

* Also remove mod+m shortcuts
2025-04-09 22:26:18 +05:30
Raphael Krut-Landau
9fc01e8dc6 (mini-PR) Remove irrelevant msgctxt from error diagnostic modal (#56484)
Like it says on the tin
2025-04-09 09:33:23 -04:00
Jeff Bruemmer
cc4202abde docs - data picker entities (#56448)
* entity types for data picker

* dropdown and sidebar

* separate page

* note on metrics

* notes

* edit

* table
2025-04-09 09:20:22 -04:00
Kamil Mielnik
c3ec3d1a90 Fix - Column sorting does not work well with predefined column orders (#56486)
* Fix loading state shown after change

* Repro #56482

* Repro #56482

* Revert 69a7c65c99

* Add extra assertion
2025-04-09 20:17:42 +07:00
Eric Normand
6658efa2f9 Allow lhs and rhs columns to be selected in existing join (#56446)
* Allow lhs and rhs columns to be selected in existing join

* Only mark selected if there is a current selection (tests)

Also simplify the test.
2025-04-09 08:05:00 -05:00
Kamil Mielnik
d703d1a3e7 SEM-113 Format the visualization of the task results (#56383)
* Add new buttons

* Move TaskModal to its own dir

* CopyButton

* Rename

* Download

* Fix setTimeout usage in CopyButton

* Style code

* Styling

* See logs link

* Improve styling

* Format code

* Improve comment

* Extract formatTaskDetails

* Rename

* Extract getFilename

* Improve comment

* Fix text selection

* Add unit tests boilerplate

* Add test

* Remove unit test

* Remove unused function

* Test downloading

* Test task details

* Comments

* Remove useMemo

* Simplify props

* Clean up timeouts
2025-04-09 17:53:28 +07:00
Kamil Mielnik
971252a066 Fix - In some circumstances the type dropdown is not visible in full on table metadata page (#56442)
* Fix #56428

* Repro #56442

* Make vertical padding same as horizontal
2025-04-09 08:25:45 +00:00
Ngoc Khuat
2390fca3af Fix flaky unsubscribe test (#56472) 2025-04-09 08:14:05 +00:00
Uladzimir Havenchyk
db87251a3a test: several fixes for flaky tests (#56441)
* test: wait for data to load in a flaky test

* fix two more tests

* fix one more test
2025-04-09 08:36:07 +03:00
appleby
64dcfe501e Enable expression literals on additional drivers (#56334)
* Enable expression literals on drivers that pass tests

Closes QUE-780

* Update .devcontainer/Dockerfile for java 21 and node 22

This Dockerfile is apparently used by the "metabase assembler", which in turn is used by
.github/workflows/presto-kerberos-integration-test.yml to run the Presto Kerberos tests.

* Add case-with-literal-expression-test

* Review feedback: remove extra whitespace

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-04-08 17:20:36 -07:00
metamben
23db3d6618 Preserve non-default effective type of column in field-ref metadata (#56453)
Fixes #55171
2025-04-09 01:58:21 +03:00
github-actions[bot]
785db78108 Update translations 2025-04-08 (#56418)
* Update translation sources 2025-04-08

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-04-08 22:04:39 +00:00
metamben
11239d8d7b Support formatting postgres and oracle concatenation operator (#56331)
Fixes #55961
2025-04-08 23:32:18 +03:00
Riley Thompson
44274c63ad Remove partner drivers (#56403) 2025-04-08 16:31:57 -04:00
Alexander Polyankin
9c8720bc0a New MultiAutocomplete for inline editing (#56195) 2025-04-08 19:01:15 +00:00
Edward Paget
6fb0244736 feat: make cluster locking reusable (#56310)
* feat: make cluster locking reusable

Builds a more generic interface for cluster locking using our existing
retry mechanism and jdbc level timeouts that will work with any database
rather than just postgresql.

* fixup! handle alt error text on mysql/mariadb

* fixup! don't lock on h2

* fixup! move malli annotations to retry
2025-04-08 16:18:52 +00:00
Romeo Van Snick
95afcd14b1 Allow selecting multiple ranges and running those in native editor (#56420)
* Store all native editor selected ranges in redux

* Pass all selected ranges to redux

* Add repro for metabase#54799

* Fix unit tests

* Fix typo

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Do not intersperse space in when running selected text

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-04-08 16:59:34 +02:00
Ryan Laurie
1abbfdd637 Move toast handling into useAdminSetting Hook (#56406)
* move toast to useAdminSetting hook

* update tests

* circular import or something
2025-04-08 07:50:48 -06:00
Edward Paget
f6fbcab4d0 fix: mock time to middle of a utc day (#56296)
This test was flaking if it was run close to the boundary of a UTC day
where the models could be created one day and then the clock ticked over
to a new day before the query ran.
2025-04-08 13:49:00 +00:00
Edward Paget
b4bcdb65d3 feat: add basic schema for sso saml settings api (#56318) 2025-04-08 13:44:04 +00:00
Nathan Voxland
0ac5d0bf7f Don't update report_card.result_metadata if it has not changed (#56314)
* Don't update card metadata if it has not changed

* Store stored-metadata as a different field on info

* Fixed failing tests

* Update src/metabase/query_processor/middleware/results_metadata.clj

Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>

* Addressed review comments

* Update src/metabase/query_processor/middleware/results_metadata.clj

Co-authored-by: Braden Shepherdson <braden@metabase.com>

* Addressed review comments

* Update src/metabase/query_processor/middleware/results_metadata.clj

Co-authored-by: Braden Shepherdson <braden@metabase.com>

* Addressed review comments

* fixup! exclude info map from legacy normalization

* fixup! test that metadata equality skips update

* fixup! make adding the info map conditional

* fixup! use qp.store instead of adding to info map

* fixup! remove #p

* fixup! remove cyclic dep

* fixup! move load and store fns to same ns

* fixup! test name

---------

Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-04-08 08:27:48 -05:00
Braden Shepherdson
ba72e829bf [revisions] Include card_schema in revisions; default to 20 (#56394)
The new `:card_schema` field on `:model/Card` was wrongly excluded from Revisions.

This PR includes them, and adds a default value for old Revisions which predate `:card_schema`.
2025-04-08 13:08:09 +00:00
Sébastien
f4511c2b97 closes VIZ-613 caret on readonly input in FF (#56380) 2025-04-08 13:45:33 +02:00
github-automation-metabase
ed9e654155 Bump net.snowflake/snowflake-jdbc from 3.23.1 to 3.23.2 (#56363)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-08 11:44:05 +03:00
github-automation-metabase
c92fe37769 Bump io.netty/netty-common from 4.1.118.Final to 4.2.0.Final (#56362)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-08 11:38:36 +03:00
Filipe Silva
e1fd2d1cdd devex: add claude tooling (#56391) 2025-04-08 09:37:04 +01:00
Oleksandr Yakushev
89f7b64763 [metrics] Add hiccup and allocation rate metrics (#56345) 2025-04-08 11:17:52 +03:00
Nick Fitzpatrick
2621458071 Adm 504 shortcut viewer and dashboard shortcuts (#55945)
* most dashbaord actions, shortcut side drawer

* fix build error

* converting back to modal. start setting up shortcut grouping

* Shortcut Glossary

* most global actions

* modal polish, adding shortcut context

* shortcuts e2e tests

* remove commented code

* check for context in hook, PR feedback

* fix error

* linter 🙄
2025-04-08 00:53:41 -03:00
Uladzimir Havenchyk
cbcf698e30 test: wait for data to load in a flaky test (#56409) 2025-04-08 00:40:25 +03:00
Riley Thompson
d6b7f86354 Prevent Athena sync failing due to catalog (#56038) 2025-04-07 14:35:48 -04:00
Ryan Laurie
be9cffd831 Convert General Settings Page to use new components (#55064) 2025-04-07 12:22:49 -06:00
Case Nelson
ba40a8354e fix: snowflake can-connect with ssh without touching other drivers (#56325)
* fix: snowflake can-connect with ssh without touching other drivers

* Adjust host-and-port for can-connect without calling incorporate-ssh-tunnel-details
2025-04-07 12:15:26 -06:00
Aleksandr Lesnenko
ee794794ca change table cells vertical align to top instead of center for wrapping (#56256) 2025-04-07 13:52:27 -04:00
Nathan Voxland
c409a653c5 Don't need to be running "configure the scheduler" liquibase tasks during testing (#56176) 2025-04-07 12:45:34 -05:00
Case Nelson
830be48c20 fix: dont log db-details (#56386)
We were inadvertently logging db-details in the rarely used
`maybe-test-and-migrate-details`. This changes to more of a data
diff where we can still get important information on how it changed.
2025-04-07 11:41:11 -06:00
Aleksandr Lesnenko
2dba03a0d0 fix readability of map buttons (#56341) 2025-04-07 13:10:41 -04:00
Romeo Van Snick
10fff67c18 Split up expression resolver (#56350)
* Rename checkCompiledExpression to diagnoseExpression

* Add tests for arg count validation

* Add arg validator tests

* Add test for unsupported functions to diagnostics

* Add isCallExpression matcher

* Add visit helper

* Move unsupported function check to diagnostics

* Move arg validator to diagnostics

* Move arg count validation to diagnostics

* Remove EQUIVALENT_CLAUSES since we have them in config.js

* Remove database argument where no longer needed

* Add COMPARISON_OPERATORS to config

* Add LOGICAL_OPS to config

* Add NUMBER_OPERATORS to config

* Add FIELD_MARKERS to config

* Move comparison validator to diagnostics

* Simplify resolver

* Move checkers before Lib.diagnoseExpression

* Fix diagnoseExpression return type

* Move case or if operator argument check to diagnostics

* Remove unused tokenName

* Make expression types more specific

* Convert resolver to typescript

* Add test for multi-arg infix operators

* Add checker for unknown functions

* Add more tests for coalesce typing

* Add more tests for comparison operator resolving

* Add test for number operators

* Add test for logic operators

* Remove branches that are handled in the config already

* Allow mbql clause config to define the arg types

* Allow case/if to define argType too

* Move getNode and getToken to utils

* Make resolver fn required

* Validate field names in resolver

* Move trim into getMBQLName

* Fix top-level literals

* Handle expression refs

* Allow number operators to be multiple

* Add more tests for custom arg validators

* Test operator resolvers more

* Add more tests for multi arg functions with options

* Use better formatting in test

* Be more generic in getNode and getToken

* Use correct location for errors
2025-04-07 18:40:55 +02:00
Sébastien
c375e64c2d Closes VIZ-579: jarring layout change in object detail view (#56287)
* fixed console warning

* closes VIZ-579 object detail layout no longer jumps

* e2e
2025-04-07 18:26:28 +02:00
Ryan Laurie
0601021d0c use PAT for repository dispatch (#56335) 2025-04-07 10:07:11 -06:00
metamben
796a3c8290 Make mr/def assert that the docstring is a compile time string (#56381)
This is to make adding typos more difficult.
2025-04-07 15:52:27 +00:00
Vamsi Peri
2b577eb3f5 New entry for metabot team (#56384) 2025-04-07 14:46:26 +00:00
github-automation-metabase
1f197ad4cd Bump dev.weavejester/hashp from 0.3.0 to 0.4.0 (#56353)
Inspect dependency changes here: https://github.com/weavejester/hashp/compare/0.3.0...0.4.0

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-07 17:41:53 +03:00
Ryan Laurie
5d102ec856 Move Enterprise settings types to general types file (#56174)
* move Enterprise settings types to general types file

* not so fancy
2025-04-07 08:17:57 -06:00
Kamil Mielnik
a14ebf5f29 SEM-223 Show database type instead of MBQL type in UI (#56374)
* Show db type instead of semantic type

* Update unit tests

* Fix flaky test
2025-04-07 21:14:35 +07:00
Eric Normand
54b509bf2f Fix relative-time-view rendering (#56326) 2025-04-07 09:10:27 -05:00
Noah Moss
e2fbe3142f Retain formatting for links with no URL (#56327)
* Retain formatting for links with no URL

* Rework approach to fix tests
2025-04-07 13:34:33 +00:00
Nick Fitzpatrick
e3ba446fbd switch css rule for <FileInput /> component (#56349) 2025-04-07 10:14:50 -03:00
github-automation-metabase
83d3bc708d Bump cider/cider-nrepl from 0.53.2 to 0.54.0 (#56351)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.54.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-04-07 15:28:28 +03:00
lbrdnk
56aaaa96d7 Invalidate card's cache on PUT (#56365)
* Invalidate card cache on put

* Add test
2025-04-07 14:16:29 +02:00
Kamil Mielnik
3196d30a33 Fix - Field order sidesheet loading state breaks metadata page layout (#56369)
* Revert "Revert "Prevent CLS""

This reverts commit 043ea8a9e7.

* Add loading and error handling

* Add tests

* Refactor

* Rename tests

* Add issue tags
2025-04-07 18:42:56 +07:00
Anton Kulyk
146c4dd8df Fix goal line doesn't appear on a normalized stacked bar chart (#56298)
* Normalize goal line value

* Add visual test
2025-04-07 11:41:40 +01:00
Kamil Mielnik
117785089c SEM-220 Show the data type above the Field Type dropdown (#56289)
* Make it work

* Use Mantine

* Update tests

* Display db type instead of mbql type

* Show db type instead of semantic type

* Revert "Show db type instead of semantic type"

This reverts commit 5a51c5abca.

* Update tests

* Prevent CLS

* Revert change

* Revert "Prevent CLS"

This reverts commit f74b6e80af.
2025-04-07 10:10:54 +00:00
Kamil Mielnik
216212b27a SEM-156 Extract column sorting into a separate control (#56060)
* SEM-156 Extract column sorting into a separate control (#55696)

* Add new 'Table settings' button
- remove unused CSS classes

* Add 'Edit column order' button

* Update sort_arrows icon

* Update header

* Update header

* Remove global CSS classes from MetadataHeader

* Prevent button from shrinking

* Styling

* Drop inline styles from MetadataHeader

* Add FieldOrderSidesheet & FieldOrderDropdown boilerplate

* Connect FieldOrderDropdown

* Make the sort_arrows icon math-perfect

* Sort attributes

* Lift state

* Use Select instead of Menu

* Rename FieldOrderDropdown to FieldOrderPicker

* Sort props

* Avoid using t in top level context

* Fix outline being cut off

* Add onUpdateFieldOrder prop

* Drop connect usage

* Add SortableField boilerplate

* Add inner components

* Handle disabled drag

* Remove copypasta

* Styling

* Icons

* Remove comment

* Fix dnd

* Remove redundant key prop

* useDragOverlay

* Prevent flicker

* Remove old sort button

* Keep sidesheet in sync when closed

* Drop SortableColumn

* Remove SortableList from MetadataTableColumnList

* Improve spacing

* Simplify SortableField interface

* Fix state issues

* Update unit tests

* Update unit tests

* Make focus state match border radius of the content

* Add comment

* Update e2e tests

* Remove comment

* Use useDisclosure

* Add a comment

* Reduce sorting complexity

* Rename

* Simplify logic
2025-04-07 14:47:30 +07:00
Noah Moss
f231f3b519 Disable indefinite vertical panning on leaflet maps, and enable smooth horizontal wrapping (#56329) 2025-04-04 23:34:34 -04:00
Tyler Plude
4126202645 Hide trend line widget when multiple series present (#54107)
* Hide trend line widget when multiple series present

* Adding unit test for trend line hidden state

* Prettier
2025-04-04 17:32:59 -07:00
Tyler Plude
d8705ab9b9 Fixing typo in embed type ui (#56116) 2025-04-04 16:25:36 -07:00
Aleksandr Lesnenko
88ce89e065 fix bar width on non-linear x-axis scales (#56265) 2025-04-04 22:05:04 +00:00
Oleksandr Yakushev
6e957d4ab7 perf: Optimize available-drivers-info (#55970) 2025-04-05 01:02:06 +03:00
bryan
c9d926e018 Do not enforce table cruftiness during updates (#56312)
* do not enforce table cruftiness during updates

- matches original behavior

* add test
2025-04-04 14:25:30 -06:00
Nemanja Glumac
d186e5d0e8 Empty states for visualizations (#55706)
This commit introduces empty states for visualizations 
in order to help less experienced users create their first chart. 

These new empty states come in two flavors:
1. With a "Summarize" button CTA that will open the summarize sidebar
2. With a link to our helpful documentation (for more complex charts)

We have been previously relying on the `placeholderSeries` dummy data to display a greyed out chart preview when we cannot render a chart. That functionality is now replaced with a new property called `hasEmptyState`.

`checkRenderable()` util will try to render a chart based on the series and settings. If it is unable to do so, it will throw a `ChartSettingsError`. This, in combination with hasEmptyState and a few other properties, is a cue to render a new, empty state for that visualization.
2025-04-04 21:34:37 +02:00
Case Nelson
304da4aba7 Revert "fix: properly test snowflake ssh connection details" (#56315)
This reverts commit 0fc5cbe7dc.
2025-04-04 13:14:06 -06:00
Luis Paolini
9e10b9c131 Add note about allowtcpforwarding (#56320) 2025-04-04 19:11:12 +00:00
Raphael Krut-Landau
a65865fce2 Test that sandboxing fails closed when misconfigured (#56110) 2025-04-04 15:04:58 -04:00
Aleksandr Lesnenko
3a93e08dbe skip loki flaky table test (#56305)
* skip loki flaky table test

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-04-04 18:27:41 +00:00
Riley Thompson
921e0a4ffc Replace - with _ in Mongo join aliases (#56185) 2025-04-04 18:18:09 +00:00
appleby
3c40ebd387 Expression literals milestone 2 (#56254)
* Initial BE changes for custom expression literals (#55206)

* Empty

* Add `value` support in the expression editor (#55203)

* Literals in filters tests (#55283)

* E2E tests for literals in custom columns (#55288)

* BE changes for :value wrapped expression literals

* Extend BE test with more literal values

* Add float value to qp test for expression literals

* Add Float and Boolean cases to literal-expression-test

* Remove ^:internal from value clause

:value clauses are now generated by the frontend when creating a top-level expression literal and preserved when
converting legacy <-> pMBQL.

* Add some lib.convert tests for literal custom expressions

* Add legacy schema tests for literal custom expressions

* Add normalize / canonicalize tests for literal custom expressions

* Remove vestigial "date" expression from fields clause in query-with-literal-custom-expression-test

* Fix literal-expression-test for cljs

CLJS parses 1.00 as 1 and hence :type/Integer not :type/Float

* Fix js_test expression-clause-<->-legacy-expression-test for wrapped literals

* Move QP tests into expressions_test.clj and add more tests

* Remove commented out :value and update comment in stage-expressions->legacy-MBQL

* Restrict QP literal expressison tests to supported drivers

* Update boolish->bool to accept BigDecimal inputs

Apparently some DBs return BigDecimal results for boolean expressions.

* Temporarily remove literal-expression-case-test

Needs more debugging

* Move aggregations tests into expression_aggregations_test.clj

* Add some basic filter tests to QP expressions_test.clj

* E2E tests for literal custom columns in other clauses and fixes (#55295)

* E2E tests for literal custom columns in other clauses and fixes (#55295)

* Move changes from the FE branch

* Move changes from the FE branch

* Move changes from the FE branch

* Fix filter schema and false = false filter (#55417)

* Fix date/string literals effective type (#55427)

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix malformed order-by clauses

* Remove tests for offset expressions as non-aggregation expressions

These tests were initially added in #42302, but we disabled offset in custom columns in #43224.

Remove these tests so we can re-enabled nest-expressions when expressions appear in an order-by clause.

https://metaboat.slack.com/archives/C0645JP1W81/p1742317450874479

* Add order-by to the list of places to check in should-nest-expressions?

This is to support order-by of custom expressions, in particular literal custom expressions.

https://metaboat.slack.com/archives/C0645JP1W81/p1742317450874479

* Rename round-trip-expression-literal-test and move it next to existing literal tests in the same file

* Uncomment filter-literal-boolean-expression-with-no-operator-test

The schema was relaxed in bd82763beb, so now the test passes.

* Uncomment filter-literal-expression-with-and-or-test

* Add round-trip-filter-expression-test

* Add more cases to legacy schema filter-test

* Remove unused import

* Review feedback: set/difference -> disj

* Add :expression-literals driver feature (#55662)

* Add the :expression-literals database feature

And enabled it for postgres, mysql, bigquery, and snowflake.

These are the tier 1 and tier 2 DBs, minus redshift which is currently failing some tests.

* Add lib.metadata/database-supports? helper

* Check if :expression-literals feature is enabled in diagnose-expression

* Use standard-literal-expression-values in order-by test expectation

* Add comment about compiler warning to boolish->bool

* Add breakout-by-literal-expression-test

* Add expression-literals-test to nested-queries-test

* Add compound expressions involving literal custom columns to e2e filters tests

* Use lib.schema.common/is-clause? to detect :value expr in diagnose-expression

* Review feedback: fix order-by-integer-literal-expression-test

* Review feedback: conj -> vector

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>

* Add explicit CAST when compiling string literal expressions in H2 driver (#55920)

* Add explicit CAST when compiling string literal expressions in H2 driver

Closes QUE-726

* Add e2e test for nested question with literal custom columns

* Add :expression-literals feature to various mock providers used in tests

* Update diagnose-expression tests

* Ensure legacy :value options are normalized in mbql.normalize

Values coming from the FE in expression-clause-for-legacy-expression call normalize and expect to have :value options
converted from strings to keywords.

* Add base_type to value literals in adjustTopLevelLiteral

* Consistent spelling of base_type

* Use lib.metadata/database-supports? to check for database :features (#56114)

* Use lib.metadata/database-supports? to check for database :features

Closes QUE-836

* Convert a couple more tests to use meta/updated-metadata-provider

* Add e2e test to ensure that sandboxing on literal custom column fails closed (#56190)

* Add e2e test to ensure that sandboxing on literal custom column fails closed

Closes QUE-844

* Review feedback: dedup CustomColumnType definition

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-04-04 11:02:06 -07:00
bryan
260a02887e Mage jar download finds latest major version (#56309)
* scrape releases page to find latest major version

e.g.:

```
$./bin/mage jar-download 50
Warning: JARS not found in env.
Looking for latest version of 50 on release page 1
Downloading from: https://downloads.metabase.com/enterprise/v1.50.35/metabase.jar
              to: /Users/bcm/dv/mb/metabase/jars/metabase_1.50.35.jar ...
Downloaded 1.50.35.jar to /Users/bcm/dv/mb/metabase/jars
```

* better feedback
2025-04-04 12:00:43 -06:00
Sébastien
c03a20dae7 Closes VIZ-588 wrong hover index (#55910)
* closes VIZ-588 wrong hover index

* test

* type
2025-04-04 17:54:34 +02:00
github-actions[bot]
9a521649a3 Update translations 2025-04-01 (#56045)
* Update translation sources 2025-04-01

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-04-04 15:21:36 +00:00
Kamil Mielnik
89153b5504 SEM-210 Show database and table of each segment in the segment admin list (#56151)
* Make segment name clickable

* Upadte e2e test

* Convert SegmentItem to TS

* Modernize SegmentItem

* Add cells

* Add TableBreadcrumbs component

* Use TableBreadcrumbs in SegmentEditor

* Use real data

* Improve data handling

* Handle ellispis

* Add tests

* Add test for no schema

* Rename

* Prettier

* Update icon color

* Fix icon shrinking

* Use TableBreadcrumbs in SegmentItem

* Fix icon shrinking

* Update max width

* Update tests

* Sort

* Remove css file
2025-04-04 14:51:06 +00:00
Eric Normand
c4749ad880 Implement text() and date() on bigquery (#56180) 2025-04-04 14:33:22 +00:00
Eric Normand
dcaeb12485 Implement text() and date() on mysql (#56177) 2025-04-04 14:31:31 +00:00
Eric Normand
c1ae2a738a text() and date() on snowflake (#56178) 2025-04-04 14:31:07 +00:00
Kamil Mielnik
eec2e8034a SEM-211 Show database name for the segment's table in the editing screen (#56213)
* Add TableBreadcrumbs component

* Use TableBreadcrumbs in SegmentEditor

* Use real data

* Improve data handling

* Handle ellispis

* Add tests

* Add test for no schema

* Rename

* Prettier

* Update icon color

* Fix icon shrinking

* Remove css file
2025-04-04 14:13:21 +00:00
Uladzimir Havenchyk
18f5b5282b test: scroll in the virtual table (#56269)
* test: scroll in the virtual table

* fix linting issues

* revert assert back
2025-04-04 14:02:03 +00:00
Jeff Bruemmer
e8ba2da551 drop leading equals operator (#56294) 2025-04-04 09:53:06 -04:00
Jeff Bruemmer
631bb25266 add metabase logo (#56292) 2025-04-04 13:40:44 +00:00
Mahatthana (Kelvin) Nomsawadi
8aa1b56dc6 Deploy SDK with Metabot (#56282) 2025-04-04 14:36:46 +01:00
Kamil Mielnik
d1ce4b64a2 Fix product screenshot link in README (#56268) 2025-04-04 19:48:35 +07:00
Uladzimir Havenchyk
29c361e150 test: wait for data in a flaky test (#56248)
* test: wait for data in a flaky test

* one more check

* set smaller viewport

* add wait

* add a helper
2025-04-04 19:45:16 +07:00
github-automation-metabase
a8463d2a47 Update Readme version references and published npm version to 0.55.1-nightly (#56277) 2025-04-04 12:28:45 +00:00
Mahatthana (Kelvin) Nomsawadi
a54b7ed035 Fix wrong default cell background color on SDK (#55669) 2025-04-04 12:24:56 +01:00
Phoomparin Mano
2725e33502 ci(sdk): set the nightly version in master to 55 (#56273) 2025-04-04 18:23:28 +07:00
Phoomparin Mano
8a8e0c6e5b Enable PDF and card result downloads individually in static and public embedding (#56131)
* scaffold setting up individual downloads

* use downloadsEnabled as boolean for result downloads

* allow SDK to use a single withDownloads props for compatibility

* sdk static dashboard should continue to support single withDownloads prop

* update downloads prop to be string compatible

* fix the areDownloadsEnabled matcher

* refactor download plugin matcher

* do not modify EmbedDisplayParams for now

* fix misleading types

* remove ConnectedDashboard default

* undo LookAndFeelSettings

* revert embed flow and analytics changes

* add test cases for public resource downloads

* add test cases for public question download

* do not support PDF downloads on questions

* remove redundant showDashboardCardActions

* create types for download results

* rename cardResult to dashcard

* replace cardResult with dashcard

* add downloadsEnabled to storybook

* update unit test for areDownloadsEnabled

* update unit test for no-token case

* update unit test for oss case

* try to disable downloads in storybook

* update story defaults

* make downloadsEnabled a component default

* add default to downloadsEnabled in PublicOrEmbeddedDashboardView for loki

* revert changes as loki diffs seems good now

* fix loki diff issue in stories
2025-04-04 17:24:21 +07:00
Aleksandr Lesnenko
1d819fac28 skip tooltip loki specs (#56250) 2025-04-03 23:10:40 +00:00
Oreon Lothamer
4b6ed446b2 add additional fields to payload for create-release-issues (#55956) 2025-04-03 09:44:31 -10:00
Eric Normand
ce99b5c4f5 Integration branch for generalizing cast tests (#55952)
* Empty

* Date generalized tests (#55953)

* Centralize and generalize tests for `integer()`

Also make room for other casting functions to be similarly tested

* Remove unsued imports

* Move postgres date cast test into cast_test.clj

* Rename :cast to :expressions/date

* Remove old imports

* Remove unused features

* Remove more!

* Fix test files

* Centralize and generalize tests for `integer()` (#55950)

* Centralize and generalize tests for `integer()`

Also make room for other casting functions to be similarly tested

* Remove unsued imports

* Example tests for integer()

* Remove empty line

* Use field type

* Appease the Kondo

* Check for Number instead of Integer

* Cast to big-integer before comparing (for snowflake)

* Remove split-part-test. It doesn't belong in this branch.

* Rename :cast to :expressions/integer

* Fix parens after merge

* Unified text() tests

* Appease the kondo

* Appease the whitespace demons

* Oops, wasn't filtering for drivers

* Use literal string for redshift
2025-04-03 13:16:15 -05:00
Nathan Voxland
0eff2ec6de Support for individual google sheets (#54938)
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-04-03 12:52:58 -05:00
Jeff Bruemmer
832be65250 docs - various changes (#56230)
* path

* add firebolt driver

* remove api description
2025-04-03 17:50:41 +00:00
Phoomparin Mano
c5d31e8ba2 fix(sdk): fix dataset endpoint being called on every re-render (#56100)
* fix missing useMemo in ad-hoc question

* add a test case for EMB-288

* fix test case for interactive dashboard
2025-04-03 23:43:36 +07:00
Uladzimir Havenchyk
5546d00759 test: use dynamic data for referencing columns and tables instead of static (#56139) 2025-04-03 14:31:51 +00:00
Raphael Krut-Landau
d02f98c519 (mini-PR) Localize string in sidesheet (#56221)
Let's localize the string "Learn more" in the question info sidesheet
2025-04-03 10:26:07 -04:00
Edward Paget
23ffd1ce0a fix: make saml issuer identity required in FE (#56154) 2025-04-03 09:08:46 -05:00
Timofey Kachalov
1bb78814cf feat(sdk): Use dts rollup to generate a single .d.ts file with types (#56205) 2025-04-03 17:47:56 +04:00
Kamil Mielnik
103a64f3ad Fix - When DB is stuck in a Sync Loop, DB List in Native Editor Blinks Constantly (#55995)
* Add a repro for #55951

* Fix typos

* Refactor repro

* Fix #55951

* Remove unused components

* Use 'loading'

* Format code

* Fix test setup

* Rename isLoading back to isSearchLoading since it indicates Search.loadList usage

* Use 1 /search API call instead of 2

* Get rid of rawData

* Update unit tests
2025-04-03 20:27:21 +07:00
dpsutton
45c30a4676 Changelog for api/card/:card-id/query/export-format (#56189)
Examples in 52:
-----

```
52:

WORKS (form data)
curl 'http://localhost:3002/api/card/119/query/csv' \
  -H "x-api-key: $KEY_52" \
  -H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' \
  --data-raw 'parameters=%5B%7B%22id%22%3A%227c1e5d79-453a-490e-a507-ffba548aa071%22%2C%22type%22%3A%22id%22%2C%22value%22%3A%5B%225%22%5D%2C%22target%22%3A%5B%22dimension%22%2C%5B%22template-tag%22%2C%22param%22%5D%5D%7D%5D&format_rows=true&pivot_results=false'

WORKS (query param)
curl 'http://localhost:3002/api/card/119/query/csv?parameters=%5B%7B%22id%22%3A%227c1e5d79-453a-490e-a507-ffba548aa071%22%2C%22type%22%3A%22id%22%2C%22value%22%3A%5B%225%22%5D%2C%22target%22%3A%5B%22dimension%22%2C%5B%22template-tag%22%2C%22param%22%5D%5D%7D%5D&format_rows=true&pivot_results=false' \
  -X POST \
  -H "x-api-key: $KEY_52"

DOES NOT WORK (json body)
curl 'http://localhost:3002/api/card/119/query/csv' \
  -H "x-api-key: $KEY_52" \
  -H 'Content-Type: application/json' \
  --data-raw '{"parameters": [{"id":"7c1e5d79-453a-490e-a507-ffba548aa071","type":"id","value":["5"],"target":["dimension",["template-tag","param"]]}], "format_rows": true}'
```

Examples for 53:
---------
```
53:
WORKS
curl 'http://localhost:3003/api/card/113/query/csv' \
  -H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' \
  -H "x-api-key: $KEY_53" \
  --data-raw 'parameters=%5B%7B%22id%22%3A%229971a99a-32cb-4b6c-8339-584884e3b3e2%22%2C%22type%22%3A%22id%22%2C%22value%22%3A%5B%225%22%5D%2C%22target%22%3A%5B%22dimension%22%2C%5B%22template-tag%22%2C%22param%22%5D%5D%7D%5D&format_rows=true&pivot_results=false'

WORKS:
curl 'http://localhost:3003/api/card/113/query/csv' \
  -H "x-api-key: $KEY_53" \
  -H 'Content-Type: application/json' \
  --data-raw '{"parameters": [{"id":"9971a99a-32cb-4b6c-8339-584884e3b3e2","type":"id","value":["5"],"target":["dimension",["template-tag","param"]]}], "format_rows": true}'

DOES NOT WORK
curl 'http://localhost:3003/api/card/113/query/csv?parameters=%5B%7B%22id%22%3A%229971a99a-32cb-4b6c-8339-584884e3b3e2%22%2C%22type%22%3A%22id%22%2C%22value%22%3A%5B%225%22%5D%2C%22target%22%3A%5B%22dimension%22%2C%5B%22template-tag%22%2C%22param%22%5D%5D%7D%5D&format_rows=true&pivot_results=false' \
  -X POST \
  -H "x-api-key: $KEY_53"
```
2025-04-03 08:25:21 -05:00
Oisin Coveney
6d7ae96779 fix(sdk): Add questionProps to dashboard components (#55993) 2025-04-03 16:23:31 +03:00
Romeo Van Snick
4187e57c4a Multi line help text (#56155)
* Allow detecting enclosing function in multiline expressions

* Add repro for metabase#56152
2025-04-03 15:07:10 +02:00
Alex Yarosh
8bd3844525 update api and anv var docs (#56198) 2025-04-03 08:48:49 -04:00
Kamil Mielnik
bff123bb45 SEM-212 Allow clicking on the Segment's name to navigate to its edit screen (#56146)
* Make segment name clickable

* Upadte e2e test
2025-04-03 15:18:11 +07:00
Chris Truter
b63e596d37 Revert search engine default to in-place (#56199) 2025-04-03 06:08:59 +00:00
Edward Paget
2600de0663 fix: deadlock in last used at (#56173)
* fix: deadlock in last used at

This prevents bulk updates to last used at from deadlocking by creating
a new table in metabase's database that can be used by instances to take
cluster wide locks. It adds an initial implementation of a customizeable
db-based locking mechanism.

For the last_used_at update, a metabase instance will first set a
session variable to control locking timesout then take a cluster lock
using SELECT * FROM metabase_cluster_lock WHERE lock_name = 'name' then
execute the update_at.

If another table is holding this lock metabase will wait .5s for the
lock to be released then timeout its SQL transaction, sleep the Thread
for 1s then retry taking the lock. This makes sure we're not holding DB
connections waiting for locks.

* fixup! kondo

* Update resources/migrations/001_update_migrations.yaml

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* Update src/metabase/query_processor/middleware/update_used_cards.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* fixup! finish method rename

---------

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-04-02 20:47:20 -05:00
Riley Thompson
5f7b7cb812 Fix MySQL JSON decimals (#56102) 2025-04-03 00:17:04 +00:00
Tyler Plude
e04d00c264 Fix formatter support for field id or name col settings (#55067)
* Fix formatter support for when both field ids and col names are used in viz settings

* Apply fix in qp common as well, which date formatter consumes

* Addressing PR feedback and breaking up large test

* Fixing or->merge reversion; adding datetime formatter tests

* Improving viz setting merges based on types of field_ref and column setting keys

* Addressing PR feedback
2025-04-02 14:48:52 -07:00
Jeff Bruemmer
d2bcabb33c docs - remove partner drivers (#56184) 2025-04-02 21:35:17 +00:00
Eric Normand
e1c7441569 Unified tests for splitPart() (#55941)
* Unified tests for `splitPart()`

* Remove postgres specific split-part-test

* Remove Redshift split-part-test

* Remove snowflake split-part-test

* Remove mysql split-part-test

* Remove bigquery-specific split-part test

* Fix MySQL implementation of splitPart()

* Only allow string literals for 2nd and 3rd args of replace()

* Only allow non-empty string for delimiter of splitPart()

* Better non-blank string

* Make position in splitPart() positive literal or numeric expression

* WIP new examples tests + corner cases

* Oops, go back to non-empty string

* Improve tests

* Improve test message

* Empty string on non-positive position in splitPart() for mysql and postgre

* Fix Redshift error

* Snowflake: return empty string with non-positive position

* Also test zero position

* Correct misplaced paren

* Fix `splitPart()` for snowflake

* Nicer comment on weird mysql implementation

* Rename positive-integer schema

* Clearer parameter comments
2025-04-02 21:01:55 +00:00
eliotmetabase
8ff8ed3494 Change decimal field for Number question to only accept positive integers and update E2E test to cover edge cases (#56112) 2025-04-02 13:03:47 -07:00
Oleksandr Yakushev
f0ba0e628a perf: Optimize settings retrieval (#55969) 2025-04-02 22:52:57 +03:00
bryan
8d5baa6a73 dont skip mage tests when BE job is skipped (#56170)
* dont skip mage tests when BE job is skipped

* checkout metabase for mage tests

* make mage tests its own thing

* add mage test workflow

* if it aint broke dont fix it

* remove dupe mage test from backend workflow
2025-04-02 19:50:37 +00:00
Jeff Bruemmer
dbefc5643a docs - table viz updates (#56162)
* paginate table on dashcards
2025-04-02 15:03:08 -04:00
Eric Normand
d1a4eb463e Rename :cast in tier 2 databases (#56158)
* Empty

* Rename :cast in tier 2 databases
2025-04-02 13:23:36 -05:00
Case Nelson
273ecb3b63 fix: attempt #2 to skip adding non-existent partner jars (#56171) 2025-04-02 11:49:45 -06:00
Edward Paget
bc2c0b2fa7 fix: correct setting name check for static stats (#56145)
* fix: correct setting name check for static stats

also fix namespace for the defenterprise in token check to load the
embedding stats module

* fixup! use get-raw-value

* fixup! use-get-value-of-type
2025-04-02 17:37:54 +00:00
Case Nelson
3f6b4e3938 fix: ee-build should skip adding jars when there are none (#56166) 2025-04-02 11:18:44 -06:00
Eric Normand
e2ae5b91a8 Split :cast into three features (#56153)
* Split :cast into three features

* Update frontend feature names

* Update changelog

* PoC

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-04-02 17:01:19 +00:00
Jeff Bruemmer
073300b47e docs - mention config file on api keys page (#56150) 2025-04-02 12:45:37 -04:00
Riley Thompson
74b62202b9 Make mongo between condition inclusive (#56087) 2025-04-02 12:13:44 -04:00
Noah Moss
f07d1810ea Remove opacity from viz settings gear icon (#56143)
* remove opacity from view button icon

* remove reference to ViewButtonIcon CSS module
2025-04-02 11:28:01 -04:00
Braden Shepherdson
9cd41f0b6f Fix chain filters on public dashboards (#56096)
Fixes [QUE-838](https://linear.app/metabase/issue/QUE-838/linked-filters-are-not-working-on-public-dashboards).

Query params were getting parsed incorrectly to a map like `{:17fdc812 ...}`
with a keyword rather than a string. These failed to match any of the
dashboard's parameters (which are keyed by strings like `"17fdc812"`)
and returned no values (but did not throw any errors in prod).
2025-04-02 13:12:00 +00:00
Kamil Mielnik
acacf330ec Fix - Visibility explanation copy is the same across all 3 options (#56081)
* Fix #56077

* Repro #56077
2025-04-02 19:06:10 +07:00
Mahatthana (Kelvin) Nomsawadi
a9a62e5b82 Fix storybook not working with MetabotQuestion (#56127) 2025-04-02 12:47:43 +01:00
Alexander Solovyov
1020b3dcee fix testing and CDPATH issues with mage (#56125)
also make script code a bit simpler with early breaks
2025-04-02 13:40:45 +03:00
Ngoc Khuat
339b7d1dd4 Flaky test fix: unsubscribe-receive-email-test (#56123) 2025-04-02 09:26:37 +00:00
lbrdnk
e0e833aa52 Add String->Float coercion strategy (#55863)
* Implement string to decimal coercion

* Use float coercion

* Add coercion to mongo

* Use float8

* Update dataset def

* Update coercion to float

* Temp dynamic-dataset-loading

* Comment

* Use ->float multimethod

* Rename dataset

* Enable test for dbs with preloaded datasets
2025-04-02 11:13:32 +02:00
Ngoc Khuat
0dc44b4551 Add job context for all quartz jobs (#55889) 2025-04-02 03:44:47 +00:00
Ryan Laurie
8ef81c9a91 revert #56007 (#56111) 2025-04-01 16:11:44 -06:00
Uladzimir Havenchyk
641e170996 test: add native query test to flaky group (#56093) 2025-04-01 21:01:08 +00:00
John Swanson
3f78551385 Add ./bin/mage start-maildev command (#56074)
* Add `./bin/mage start-maildev` command

```
$ ./bin/mage start-maildev
Killing existing `mb-maildev` container...
Running: docker run -d -p 1080:1080 -p 1025:1025 --name mb-maildev maildev/maildev
8b01ba798a18192d02d1fdc3e7874fd03586f91063069db017d44baf30a38c47
Configure Metabase to send emails using localhost:1025
View Maildev UI at http://localhost:1080
```

* Update bb.edn

Co-authored-by: bryan <bryan.maass@gmail.com>

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-04-01 13:12:03 -07:00
Case Nelson
e5ed289651 task: update ee-extra to understand noop from registry (#55934) 2025-04-01 13:59:28 -06:00
Luiz Arakaki
ff42a7c926 Update usage analytics to 54 (#55908)
Closes #55568
Resolve field entity-ids
Adds is_verified to the content model
Adds status to the tasks model
Minor changes to the content
2025-04-01 15:00:38 -03:00
Jeff Bruemmer
94abd0f302 docs - note on caching and permissions (#56034)
* note on caching and permissions

* differentiate caching

* clarify caching

* remove impersonation note
2025-04-01 13:54:14 -04:00
William
a4ee7f4eb7 Bigquery handles nested fields in nested queries appropriately (#56033)
Before, when you had an outer query referring to something in a nested field from the inner query, the query processor
would assume the field is still nested and generate invalid sql.  Now, it will just refer to the alias.
2025-04-01 12:06:54 -05:00
Aleksandr Lesnenko
2aa82343e2 fix scatter charts freeze (#56016) 2025-04-01 11:48:16 -04:00
Nicolò Pretto
ebc59ff5fd ci: run sample app tests and sdk cross version tests on draft prs (#56008) 2025-04-01 15:43:05 +00:00
Uladzimir Havenchyk
90f1364fe2 test: add a fix for flaky test but move to jail anyway (#56071) 2025-04-01 15:29:58 +00:00
Arkadi Yaroslavtsev
bb58f77a79 Add cloud-ops as codeowners of prometheus.clj (#56073)
So that cloud-ops can verify new metrics are sound and usable for cloud o11y. 

See https://www.notion.so/metabase/Implementing-a-Prometheus-metric-for-your-feature-14569354c901804b97a3dfcf2fecfc22?pvs=4#15169354c90180a7a4daf6b43820cdd8
2025-04-01 10:12:43 -04:00
Stas Gavrylov
0f094446f1 WRK-213: Adjust available intervals for 'by the minute' schedule option (#56068) 2025-04-01 16:21:53 +03:00
Ngoc Khuat
a582ad33c4 [Notification] Improve memory usage for alerts (#55896) 2025-04-01 11:29:17 +00:00
Uladzimir Havenchyk
83ebdb8afd test: move flaky test to jail (#56039) 2025-04-01 14:13:20 +03:00
lbrdnk
0eec5c335f Fix coercion for model (#55870)
* Fix coercion for model

* Add test

* Update test
2025-04-01 11:03:25 +02:00
Kamil Mielnik
f541df16f8 Global scrollIntoView & scrollBy mocks (#55983)
* Remove redundant mocks

* Use jest.fn

* Remove scrollIntoViewMock from setup

* Remove mockScrollIntoView

* Remove mockScrollTo and mockScrollBy

* Introduce getScrollIntoViewMock

* Remove remaining scrollIntoView mocks
2025-04-01 08:57:18 +00:00
Sébastien
08a13afd28 Closes VIZ-289 duplicated cards never ending loading state (#55256)
* closes VIZ-289 duplicated cards never ending loading state

* added test
2025-04-01 10:37:44 +02:00
Oisin Coveney
49cec30f3f Fix console.warn message (#56004) 2025-04-01 11:36:27 +03:00
Romeo Van Snick
f6cecc0960 Fix overflow in expression editor suggestions (#55986)
* Fix overflow in custom expression suggestions

* Add repro for #55984

* Use isScrollableHorizontally helper

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Use isScrollableHorizontally helper

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Don't allow icon to shrink

* Allow suggestion names to break

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-04-01 08:17:25 +00:00
Nemanja Glumac
d9779da94a Respect whitelabeling when showing the instructional video (#55987) 2025-04-01 10:26:49 +03:00
Oisin Coveney
f2b5cf8fcb QueryDownloadPopover -> QuestionDownloadWidget + QueryDownloadWidget -> QuestionDownloadPopover (#55894) 2025-04-01 10:01:28 +03:00
Romeo Van Snick
1e48077705 Merge expression tokenizer and lexer (#55916)
* Move the lexifier to it's own file

* Remove duplicate type union member

* Remove unused typeinferencer

* Add ParseError type to errors

* Lexify straight in to pratt.Token

* Remove unused TOKEN type

* Use pratt.Token type everywhere

* Fix type

* Remove unused __support__/expressions helper file

* Ignore END_OF_INPUT when matching suggestions
2025-04-01 08:33:53 +02:00
Tyler Plude
00527b55c0 Add display-as image support for table static viz (#55388)
* Add display-as image support for table static viz

* Adding table unit test for view-as image setting
2025-03-31 16:42:07 -07:00
Ryan Laurie
f62755dc9b Add Important Info to Pull Requests (#56007) 2025-03-31 16:34:02 -06:00
Uladzimir Havenchyk
1a990b898b test: fix flake caused by popover appearance order (#55989)
* test: fix flake caused by popover appearance order

* put back flaky tag
2025-04-01 00:23:13 +03:00
Uladzimir Havenchyk
0bebb404eb test: fix flake caused by data not loaded on slow network (#55998) 2025-04-01 00:22:30 +03:00
Braden Shepherdson
eef8dd149b [refs] Fixing Audit DB init and audit content export to handle idents (#56032)
Fixes #55929. (Requires a new export for 54 that also gets backported.)

Adds a new setting `install-analytics-database` that skips loading the
database at all, if set to false. That allows the dev instance that
exports the analytics content to have no real audit DB, and therefore to
generate the right `entity_id` hashes for the audit export!

Existing audit DBs are fine; the checksum will see these new entity_ids
in the export and overwrite any existing content.
2025-03-31 21:17:55 +00:00
Alexander Polyankin
b86d92d156 E2E repro for "Custom Expression having a date function between 2 aggregation functions returning dates doesn't work" (#55930) 2025-03-31 19:04:01 +00:00
Alexander Polyankin
a1b5478734 Show a more user-friendly error message when there are incompatible types (#55927) 2025-03-31 18:56:53 +00:00
Eric Normand
edd33406f7 Implement splitPart() for BigQuery (#55918)
* Implement splitPart() for BigQuery

* Always return string instead of null

* Better test failure message

It's running fine on my machine ;)

* Use coalesce instead
2025-03-31 12:46:31 -05:00
Alexander Polyankin
eb303b3596 Fix compilation of case with clauses that need pre-processing (#55958) 2025-03-31 13:40:31 -04:00
Nathan Voxland
13f81f354f Limit tsvector inserts to 1048575 bytes (#55954) 2025-03-31 12:36:19 -05:00
Case Nelson
8135a2f41f fix: Ensure that local timestamps params work (#55931)
* fix: Ensure that local timestamps params work

Fixes #53371

By filtering a timestamp or date column on an OffsetDateTime it results
in an index being missed since the lhs needs to be upcast by the db engine
to a `timestamp with timezone`.

This ensures we only pass OffsetDateTime to `timestamp with timezone`
columns.

Context about decision here:
https://metaboat.slack.com/archives/C0645JP1W81/p1743111964032089

* Handle sending a datetime range rather than just a date

* Feature gate to dynamic dataset loading

* Fix kondo

* Remove comment
2025-03-31 11:35:15 -06:00
Eric Normand
8737a30d70 splitPart() test for Redshift (#55938) 2025-03-31 11:43:14 -05:00
Eric Normand
004ba66176 splitPart() on Snowflake (#55935) 2025-03-31 11:41:12 -05:00
Eric Normand
9fed60a967 splitPart() for MySQL and MariaDB (#55914)
* Remove commented code from postgres test

* Add splitPart() to MySQL
2025-03-31 11:37:39 -05:00
Alex Yarosh
37b8a235ca docs: can't permanently delete collections (#56014)
* Update delete-and-restore.md

* format

* Update delete-and-restore.md

---------

Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
2025-03-31 12:15:51 -04:00
Jeff Bruemmer
f4eeb43daf scan section in sparksql (#56015) 2025-03-31 15:51:29 +00:00
Romeo Van Snick
c38c533c72 Case-sensitivity arg name vs example disambiguation (#55965)
* Rename caseInsensitive to caseSensitivity

* Use literal string for case-insensitive template

* Update argument description to be more clear

* Support inline expression highlights

* Render help text description with Markdown

* Add more markdown to help text strings

* Use markdown code blocks to mark code in help text descriptions

* Highlight argument references in help text descriptions

* Fix arg alignment

* Fix HelpText unit tests

* Fix FunctionBrowser tests

* Render FunctionBrowser descriptions using Markdown too

* Mark true

* Fix e2e tests

* Fix e2e tests

* Remove commented-out code

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-03-31 17:18:02 +02:00
Riley Thompson
1d70e07d79 Fix Snowflake casted date field relative time filters (#55225) 2025-03-31 11:09:01 -04:00
Jeff Bruemmer
a2f38e43de formatting (#56009) 2025-03-31 14:38:44 +00:00
Edward Paget
ba9c2face3 fix: typo in token check stats name (#55999) 2025-03-31 14:13:41 +00:00
Jeff Bruemmer
4da41fc578 docs - add ClickHouse and Starburst to list of supported databases (#56001) 2025-03-31 10:00:44 -04:00
Riley Thompson
e7dda8b9ff Mark Mongo binData as a text like type during sync (#55792) 2025-03-31 09:40:00 -04:00
Aleksandr Lesnenko
babdb67fb5 Fix table row heights with rich content (#55960)
* allow wrapping links

* fix image rendering, add specs

* update wrapping setting validation and visibility
2025-03-31 09:05:22 -04:00
Oisin Coveney
63dadf79d5 docs(sdk): Add docs for dashboard types (#55988)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-03-31 11:36:52 +00:00
github-automation-metabase
a310eeb305 Bump io.github.clojure/tools.build from 0.10.7 to 0.10.8 (#55973)
Inspect dependency changes here: https://github.com/clojure/tools.build/blob/v0.10.8/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-31 07:18:31 +00:00
github-automation-metabase
c3e042e91e Bump cider/cider-nrepl from 0.53.0 to 0.53.2 (#55971)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.53.2/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-31 07:02:19 +00:00
Ngoc Khuat
c5f4bf9fc7 When randomize sync db schemas, avoid at 0th minute marks (#55891) 2025-03-31 06:01:25 +00:00
Alex Yarosh
14f6682637 Update impersonation.md (#55957) 2025-03-30 14:38:37 -04:00
Romeo Van Snick
5f68e7a88c Fix offset example (#55942)
* Apply all passes to examples

* Add format test for offset example

* Make sure all help texts return a string

* Add repro for #55940

* Typo
2025-03-30 10:41:39 +02:00
Uladzimir Havenchyk
2593cf1957 test: add flaky test to a flaky group (#55871) 2025-03-28 17:01:43 -04:00
Alex Yarosh
3ed041bc60 docs: mb_api key docstring (#55924)
* mb_api key docstring

* formatting

* edit

---------

Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
2025-03-28 16:55:22 -04:00
Aleksandr Lesnenko
d7b1ec1435 disable column reordering on raw query views (#55581) 2025-03-28 20:00:53 +00:00
Aleksandr Lesnenko
f00ca484c8 Table pagination viz settings in dashcards, rows count footer (#55735) 2025-03-28 19:29:03 +00:00
Anton Kulyk
a3ed24fb9c Use clickable styles only for links in detail view (#55903) 2025-03-28 19:13:15 +00:00
Anton Kulyk
50e1b0de63 Don't show dashcard's info tooltip in edit mode (#55905) 2025-03-28 18:29:39 +00:00
Case Nelson
4169b8cc2b fix: properly test snowflake ssh connection details (#55879) 2025-03-28 12:20:12 -06:00
Uladzimir Havenchyk
589c133fac deps: upgrade rspack to 1.3 (#55901) 2025-03-28 17:58:57 +00:00
Eric Normand
676f833a0b Tests for integer() on redshift (#55868)
* Tests for `integer()` on redshift

* Appease the kondo
2025-03-28 12:54:27 -05:00
Ngoc Khuat
329eb07013 Change version for alert api change log from 53 to 54 (#55890) 2025-03-28 18:23:49 +02:00
bryan
be9d37cad2 move mage docs into developer docs (#55915)
- also improve usability of setup-autocomplete test
2025-03-28 16:13:27 +00:00
Aleksandr Lesnenko
9a7704896c prevent text wrapping from being applied to links (#55882) 2025-03-28 15:51:36 +00:00
Noah Moss
22856615ae Auto-categorize truncation units as datetime columns in insights code (#55861)
* Auto-categorize truncation units as datetime columns in insights code

* detect datetime units on the FE as well when rendering trend visualization

* prettier

* add unit test

* typo

* fix comment alignment
2025-03-28 14:55:57 +00:00
Alexander Polyankin
8e5807c8e7 Enable type checking in the expression editor (#55737) 2025-03-28 09:55:26 -04:00
Nick Fitzpatrick
8ca8411c71 force <DefaultLogoIcon /> on welcome page (#55869) 2025-03-28 09:48:46 -03:00
Jeff Bruemmer
305667abed docs - api keys in config file (#55771) 2025-03-28 11:21:29 +00:00
lbrdnk
c421a23bd8 Provide LEVEL_ONE_TYPES to FE (#55766)
* Provide LEVEL_ONE_TYPE to FE

* Apply suggestions from code review

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-03-28 10:25:46 +01:00
Uladzimir Havenchyk
b6e957c05b test: another attempt to fix dashboard flaky test (#55873) 2025-03-28 07:44:57 +03:00
appleby
174508dd10 Update driver-changelog for :cast :distinct-where :split-part features (#55664) 2025-03-27 18:16:15 -07:00
Tyler Plude
67b4bf4cdb Fix bottom margin on query builder view #55876 (#55878) 2025-03-27 17:09:49 -07:00
Tyler Plude
b42e24382a Add new Tanstack table viz settings support to static viz (#55517)
* Initial support for text wrapping in static viz

* Add text-align support

* Add row index support

* Fixing broken unit tests

* Adding new unit test coverage for Tanstack viz settings

* Fixing typo in whitespace; removing debug def

* Removing defs & outdated comment

* Addressing PR feedback

* Adding column width support to minibar columns; improving doc strings

* Adding minibar column width support; improving doc strings; moving consts to style namespace

* Fixing broken unit test after font size change

* Remove trailing whitespace
2025-03-27 16:53:46 -07:00
Uladzimir Havenchyk
a78e2fa04b test: add test to a flaky group (#55867) 2025-03-27 20:56:20 +00:00
Luiz Arakaki
2f40fe4e79 support keys in env vars (#55756)
# Support Environment Variables for API Keys
### Overview
This PR adds support for using environment variables to define API keys in the configuration file, enhancing security and flexibility for deployment environments.
### Changes
- Modified API key validation to support environment variable substitution in the key field
- Added runtime validation for API keys from environment variables to ensure proper formatting
- Refactored tests to properly validate environment variable integration
- All API keys (including those from environment variables) still must follow the required format:
  - Must be between 11-254 characters
  - Must start with mb_
  - Must match the pattern mb_[A-Za-z0-9+/=]+
### Usage
```
api-keys:
  - name: "ENV API Key"
    key: "{{env API_KEY_FROM_ENV}}"
    creator: "admin@example.com"
    group: "admin"
```

### Testing
- Creation of API keys from environment variables
- Validation of API key format from environment variables
- Error handling for improperly formatted environment variable values

# Skip keys if they exist
To guarantee that it is possible to keep the same yaml file on each instance initialization, if there is a key in the instance and the config file has a key with the same name, the creation is skipped.
2025-03-27 20:04:16 +00:00
Tyler Plude
12add5657c Minibar chart support in table static viz (#55736)
* Minibar chart support in table static viz

* Fixing unit test; adding new minibar unit test

* Fixing clj kondo warnings

* Addressing PR feedback

* Removing dead minibar code

* Removing old minibar unit tests
2025-03-27 12:49:39 -07:00
Eric Normand
30b14f3243 integer() for snowflake (#55774)
* Empty

* Implement and test snowflake integer()

* Use card-with-source-metadata-for-query in snowflake tests

* Use lib/functions instead of lib/expression-clause in snowflake
2025-03-27 14:49:22 -05:00
Eric Normand
721736df58 integer() for BigQuery (#55704)
* integer() for BigQuery

* Fix BigQuery tests for integer()

* Change to backticks

* kick ci

* Fix for BigQuery

* Capitalize name of field

* Use STRING type for casting in BigQuery

* Sometimes we get an integer back, and that's okay

* Use mt/card-with-source-metadata-for-query in bigquery tests

* use lib/functions instead of lib/expression-clause in bigquery
2025-03-27 14:48:42 -05:00
Alex Yarosh
34d1b99615 docs: don't forget to use headers in split files (#55856)
* Update uploads.md

* Update docs/databases/uploads.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-03-27 19:02:13 +00:00
Edward Paget
dade705ce7 feat: add remaining token check stats and settings (#55638)
* feat: add remaining token check stats and settings

Adds the remaining five data points we want to report during the token
check request. Adds a new module to internal stats that does the
embedding counts and setting checks.

* fixup! log stats

* fixup! move enterprise settings into defenterprise

* fixup! remove row count
2025-03-27 13:57:25 -05:00
Edward Paget
5448ab30e4 fix: only remove vis_settings from dashboardcard (#55846)
* fix: only remove vis_settings from dashboardcard

Fixes loading serialized dashboard cards where we would previously
delete and recreate them on each load.

In order to handle circular dependencies caused by links to other
dashboards in a dashboardcard's visualization_settings we were removing
the dashboardcards entirely from the dashboard model to break the cycle.
Later when we traversed back through the dependency path we would load
the original dashboard a second time with the restored dashboardcards.

However, on the load of the cycle breaking change we could entirely drop
dashcards belonging to the dashboard because the serialization code was
treating our cycle breaking changes as an edit to the dashboard to drop those
cards. This meant when we got back to the the second load of the
dashboard we would create the dashcards fresh instead of updating
existing instances.

The fix here is that we only remove the values from the dasboard card
model that can cause the cycle -- in this case just the
visualization_settings column. This seemed the most straightforward fix,
but there are other possibilities here.

One is that we could _just_ preserve the entity_id column in dashcards
which would eliminate the possibility of any other cycles here.

Another option would be to change how we handle nested models in serialization.
There is not really a foreign key dependency here between dashboard A
and dashboard B linked by the dashboard card. If we instead just created
those dashboards first _then_ went back and created their dashcards we
don't have any problems at all. We could move nested models up to the
same level of handling in serialization that we do for models, which
would let us create the dashboards first then create any dashboard cards
in a subsequent step.

* fixup! update docstring
2025-03-27 18:49:48 +00:00
Riley Thompson
25a6329fec Upgrade ClickHouse JDBC driver version to 0.8.2 (#55713) 2025-03-27 14:31:31 -04:00
Alexander Polyankin
53780a436b Use :value for bigint values in queries (#55698) 2025-03-27 18:07:27 +00:00
Braden Shepherdson
4d318a1183 [models] Add card_schema column, for future use in after-select (#55714)
Closes QUE-794 and QUE-705.

This will enable us to *know*, rather than *infer*, what version of
`report_card` we're looking at.

One example: in the near future, I'm going to add some values to
`result_metadata` on cards. If we later discovered a bug in that logic
and could no longer trust those fields written to AppDB in
`result_metadata`, the `card_schema` will tell us with certainty
whether the card was saved with the broken logic (`:card_schema N`)
or the new logic (`:card_schema (+ N k)`).

The upgrade steps could drop the invalid fields and, if desired, infer
the correct ones.

Note that there's nothing here about writing back! This is about
cleaning up old cards during `after-select`.

There are no upgrades yet; the current version is still the default.
2025-03-27 13:47:43 -04:00
Case Nelson
000ea868f5 fix: move classloader to init as soon as possible (#55786) 2025-03-27 11:03:27 -06:00
dpsutton
1a6a9a0916 Bit more logging (#55837)
```
2025-03-27 15:25:21,322 INFO sync.describe-database :: Checking "PUBLIC"."LARGE_NUMBERS"
2025-03-27 15:25:21,757 INFO sync.describe-database :: "PUBLIC"."LARGE_NUMBERS": SELECT privileges confirmed
2025-03-27 15:25:21,759 INFO sync.describe-database :: Checking "PUBLIC"."SINGLE_ROW_TABLE"
2025-03-27 15:25:21,975 INFO sync.describe-database :: "PUBLIC"."SINGLE_ROW_TABLE": SELECT privileges confirmed
2025-03-27 15:25:21,976 INFO sync.describe-database :: Checking "PUBLIC"."SLOW_QUERY_VIEW"
2025-03-27 15:25:22,219 INFO sync.describe-database :: "PUBLIC"."SLOW_QUERY_VIEW": SELECT privileges confirmed
```

This will list all tables it enumerates and then which ones it
removes. There are also two error handling states:

```
2025-03-27 15:29:25,418 INFO sync.describe-database :: "schema"."some_table": SELECT privileges confirmed
2025-03-27 15:29:25,419 INFO sync.describe-database :: "schema"."some_table": Assuming SELECT privileges: caught timeout exception
2025-03-27 15:29:25,419 INFO sync.describe-database :: "schema"."some_table": Assuming no SELECT privileges: caught exception
java.lang.Exception: Some exception
	at metabase.driver.sql_jdbc.sync.describe_database$eval194718.invokeStatic(NO_SOURCE_FILE:33)
	at metabase.driver.sql_jdbc.sync.describe_database$eval194718.invoke(NO_SOURCE_FILE:33)
        [more stacktrace from the exception]
```

This is essentially just changing the log level. We can and perhaps
should change these back to debug or trace in the future but this is
useful for now.
2025-03-27 11:44:52 -05:00
Eric Normand
aa2457d52c integer() for MySQL (#55691)
* WIP Implement `integer()` for all :sql descendants

* Add test-data to tests

* Just do MySQL

* Undo change to query_processor_test

* Remove unused imports

* Remove extra blank line in query_processor

* Convert postgres tests to mysql

* Appease MySQL syntax

* Remove old tests for mysql integer()

* Remove unsupported postgres tests

* Fix kondo

* kick ci

* Fix up for MariaDB

* Fix queries in test

* Try bigger numbers for MariaDB

* Remove ability to cast integer to integer

* Check that boolean = 1 in mysql

* Use mt/card-with-source-metadata-for-query

* Use lib/functions instead of lib/expression-clause

* Use lib/functions instead of lib/expression-clause in postgres

* Use card-with-source-metadata-for-query for postgres tests
2025-03-27 16:38:49 +00:00
Sébastien
471f077083 Closes viz-447 disable text selection when dragging/resizing dashcards (#55528)
* closes viz-447 disable text selection when dragging/resizing dashcards

* eslint

* fixed e2e
2025-03-27 17:21:49 +01:00
Sébastien
4ee67dba0c upgrade @octokit/rest to address ReDos vulnerabilities (metabase#351) (#55828) 2025-03-27 12:15:50 -03:00
Alexander Solovyov
20276982a8 notifications: log skipping reason (#55701) 2025-03-27 17:15:17 +02:00
Riley Thompson
37068e88df Remove stack traces from SQLExceptions (#55765) 2025-03-27 15:02:58 +00:00
Alexander Polyankin
4de6e9f7e2 Ignore parameters targets with stage-number out of range (#55761) 2025-03-27 14:59:15 +00:00
Alexander Solovyov
43292e6a0e config.yml.sample (#55804) 2025-03-27 14:06:44 +02:00
Nicolò Pretto
f5f4dbbc4b make rspack error when the port is already in use (#55803)
* make rspack error when the port is already in use

* adds rspack.config.js to the frontend_sources on file-paths

* use PORT env
2025-03-27 12:48:22 +01:00
Romeo Van Snick
3a865cc16b Update some function names to match modern casing (#55672)
* Update some function names to match modern casing

* Fix test cases

* Update casing in docs for isEmpty, notEmpty, lTrim, rTrim, isNull, and notNull

* Fix isNull and isEmpty casing in tests

* Fix case in unit test

* Fix casing in e2e tests
2025-03-27 11:38:47 +01:00
Kamil Mielnik
5a1d677444 RFC 118. Prettier - arrowParens: “always” (#55807)
* Update .prettierrc
- remove "arrowParens": "avoid" so that it defaults to "always" instead

* Run "yarn prettier"
2025-03-27 09:18:07 +00:00
Mahatthana (Kelvin) Nomsawadi
651894d137 Fix Slack channel couldn't be found when it's behind pagination (#55748)
* Fix couldn't find Slack channel

When the first `conversations.list` doesn't return the Slack channel we
want, we need to continue to paginate until we found it.

* [debug] for testing

* Revert "[debug] for testing"

This reverts commit 67dd2c0405.

* Simplify logic

Co-Authored-By: Timofey Kachalov <timofei@metabase.com>

---------

Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-03-27 06:04:40 +00:00
Sébastien
2d86842776 reverts #53898 (#55695) 2025-03-27 06:49:56 +01:00
Luis Paolini
13ec3265ef Add group mappings in keycloak (#55775)
* Add group mappings in keycloak

* Apply suggestions from code review

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-03-27 02:02:26 +00:00
Ryan Laurie
4c29538c1f allow assertion functions (#55772) 2025-03-26 17:15:02 -06:00
Ryan Laurie
930bb87382 Only Show Sync Status to Admin Who Started Gdrive Sync (#55587)
* rename and reorganize

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/google_drive/GdriveConnectionModal.tsx
#	enterprise/frontend/src/metabase-enterprise/google_drive/GdriveSyncStatus.tsx

* resolve conflicts

* only show sync status to admin who created it

* Add connection info to disconnect modal (#55588)

* rename and reorganize

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/google_drive/GdriveConnectionModal.tsx
#	enterprise/frontend/src/metabase-enterprise/google_drive/GdriveSyncStatus.tsx

* resolve conflicts

* update disconnect modal

* better spacing
2025-03-26 22:18:32 +00:00
Uladzimir Havenchyk
c5a1cdecc8 test: another fix for dashboard flaky test (#55759)
* test: another fix for dashboard flaky test

* increase timeout
2025-03-26 21:04:07 +00:00
Raphael Krut-Landau
b47569f399 In e2e sandboxing tests, compare two users with different attributes (#55556) 2025-03-26 16:44:49 -04:00
Alex Yarosh
7800b2f488 Update mongodb.md (#55789) 2025-03-26 20:41:06 +00:00
Ryan Laurie
1657085257 Don't load gsheets sync status component for non-admins (#55724)
* don't load gsheets sync status for non-admins

* kick ci
2025-03-26 14:34:14 -06:00
Jeff Bruemmer
aa91ebc7a2 docs - alert updates (#54623)
* update question caching

* update alerts

* remove images

* notifications

* add supported schedules

* edits
2025-03-26 20:21:45 +00:00
lbrdnk
e168a7c35d Adjust jdbc-get-tables and probe query logging (#55658) 2025-03-26 20:51:21 +01:00
Case Nelson
2a1adfeee8 feat: Bring starburst driver in house (#55123)
* feat: Bring starburst driver in house

* Fixing lints and github service

* Fix kondo and reflection warnings

* Fix some tests

* Fixing tests

* Fix database check test

* Fix tests

* Hide impersonation

* Cleanup

* Cleanup kondo override

* Add License

* Update modules/drivers/starburst/test/metabase/test/data/starburst.clj

Co-authored-by: Riley Thompson <riley@metabase.com>

* Update modules/drivers/starburst/test/metabase/test/data/starburst.clj

Co-authored-by: Riley Thompson <riley@metabase.com>

* Update modules/drivers/starburst/test/metabase/test/data/starburst.clj

Co-authored-by: Riley Thompson <riley@metabase.com>

* Address Review comments

* Better exception messages

* Fix source version for metabase

* Fix source test

---------

Co-authored-by: Riley Thompson <riley@metabase.com>
2025-03-26 13:41:00 -06:00
Aleksandr Lesnenko
746d806428 remove outdated snapshots (#55663) 2025-03-26 18:48:52 +00:00
Noah Moss
4b65251933 Translate comparison text for smart scalars on the BE (#55722)
* Translate comparison text for smart scalars on the BE

* lint

* add back space

* refactor
2025-03-26 18:30:45 +00:00
Edward Paget
b227d94cdc feat: use semi-join for collection permissions (#55727)
Improve the performance of the collection permission query by using a
semi-join instead of an inner join to the permission tables. This
ensures each collection only needs to be tested once for a route that
gives a user permission to access it rather than multiple times.

This reduces the query time for users that are members of lots of
collections since we dont need postgresql to create large join tables or
return the same collection id more than once from this query.
2025-03-26 12:53:41 -05:00
Alexander Polyankin
b29ae5d7f9 Migrate useUserListQuery to RTK (#55721) 2025-03-26 16:16:26 +00:00
Raphael Krut-Landau
6bde1d3b4a Add e2e test for sandboxing multistage questions (#55565) 2025-03-26 12:11:52 -04:00
Alexander Polyankin
7549ce42f9 Migrate EditUserModal to RTK (#55719) 2025-03-26 15:07:40 +00:00
Riley Thompson
a391b89276 Remove JS from mongo queries (#55499) 2025-03-26 10:39:19 -04:00
Ngoc Khuat
f50b9fc2bc [Notification] more 🪵 (#55751) 2025-03-26 13:03:15 +00:00
Uladzimir Havenchyk
07263fff52 test: make dashboard flaky test more robust and stable (#55715)
* test: make dashboard flaky test more robust and stable

* revert flaky

* add additional check

* fix that works locally

* revert prev version

* add missing line
2025-03-26 15:03:18 +03:00
Romeo Van Snick
396fa05998 Operator prefix suggestions (#55697)
* Match functions even when the current token is an identifier

* Add repro for metabase#55686

* Use existing function in test
2025-03-26 10:16:52 +01:00
Ngoc Khuat
7772e1ae37 Log context (#55746) 2025-03-26 08:51:36 +00:00
Kamil Mielnik
a5343da112 SEM-176 Use new semantic type picker everywhere (#55539)
* Add baseType prop to SemanticTypePicker

* Update unit tests

* Fix legacy v1/ Field['base_type'] typing, to make it same as Field['base_type'] from api/

* Use isa

* Add a hack for numerical types

* Fix typo

* Pass field

* Reuse type

* Use effective type

* First pass on the tech doc

* Handle booleans

* Use isa

* Refactor

* Update test

* Update test

* Assume no type can have 2 level-one ancestors

* Add comments

* Extract getCompatibleSemanticTypes

* Refactor isDeprecated

* Refactor

* Add fieldId param

* Add test for booleans

* Make initialValue required

* Do not assume a field cannot have multiple level-one ancestors
- these types have 2 level-one ancestors: type/JSON, type/XML, type/DruidJSON, type/OracleCLOB

* Extract FIELDS

* Add test

* Test Entity Name

* Remove '

* Add test

* Update test

* Add test for base_type fallback

* Update comment

* Refactor tests

* Add Field containing JSON tests

* Refactor

* Add a comment

* Improve naming

* Improve naming

* Use SemanticTypePicker in DatasetFieldMetadataSidebar

* Use Field from types/api

* Extract DatasetFieldMetadataSemanticTypePicker

* Fix typing

* Pass label, tabIndex, and onKeyDown

* Remove old picker

* Use SemanticTypePicker in FieldTypeDetail

* Remove unused prop

* Remove redundant margin

* Fix #55617

* Use SemanticTypePicker in Field

* Remove old SemanticTypePicker

* Reuse FkTargetPicker

* Introduce new top-level frontend directory: frontend/src/metabase/metadata
- Move semantic type picker + subcomponents in there

* Add readme

* Get rid of global CSS classes

* Remove old FKTargetPicker component

* Pass databaseId to components

* Don't check for text-like fields

* Merge branch 'SEM-97-limit-semantic-types' into SEM-176-new-semantic-type-picker-everywhere

* Update test

* Update tests

* Sort options by label

* Update test

* Fix docs links

* Change reproductions suite to TypeScript

* Repro #55618

* Repro #55617

* Make sure combobox flips if there is no space underneath
2025-03-26 14:42:17 +07:00
Romeo Van Snick
60988ea706 Add Expressionable type (#55683)
* Add Expressionable

* Accept Lib.Expressionable in expression editor

* Remove type casts in AggregationPicker and FilterPicker
2025-03-26 08:40:01 +01:00
Mahatthana (Kelvin) Nomsawadi
20facf4b69 ci(sdk): make 54 the latest in release workflow (#55741) 2025-03-26 13:14:19 +07:00
Edward Paget
6aa3663a64 fix: add index to field_usage query_execution_id (#55712)
* fix: add index to field_usage query_execution_id

Supports faster deletes on the query_execution table. Without this index
deleting rows from that table leads to a seq scan on the field usage
table for each row deleted to handle the ON DELETE CASCADE trigger.

* fixup! drop empty preconditions
2025-03-26 01:04:21 +00:00
Fraser
f7d4c635e1 Encode settings key in url (#55734) 2025-03-26 13:44:55 +13:00
github-automation-metabase
47278fdcf6 Bump com.google.cloud/google-cloud-bigquery from 2.48.0 to 2.49.0 (#55606)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.49.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-25 23:23:10 +00:00
github-automation-metabase
15c65e7ad3 Bump io.github.tonsky/clj-reload from 0.9.0 to 0.9.4 (#55600)
Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.4/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-25 23:22:57 +00:00
github-automation-metabase
a00bff5b0f Bump com.microsoft.sqlserver/mssql-jdbc from 12.9.0.jre11-preview to 12.10.0.jre11 (#55609)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-25 23:22:45 +00:00
Ryan Laurie
f39269dffd Less noise and more emojis in release channel (#55705)
* less noise and more emojis in release channel

* remove variable
2025-03-25 21:47:20 +00:00
Alexander Polyankin
df239d0174 Migrate UserSuccessModal to RTK (#55716) 2025-03-25 14:56:33 -04:00
Edward Paget
b3dfcd4a88 fix: reset connection pool after app-db tz change (#55567) 2025-03-25 12:48:36 -05:00
github-automation-metabase
20bfdbb4bc Bump com.google.guava/guava from 33.4.0-jre to 33.4.5-jre (#55599)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-25 17:18:52 +00:00
Uladzimir Havenchyk
df11338cfb test: make scrollable echarts tooltip stable (#55699)
* test: make scrollable echarts tooltip stable

* make test better
2025-03-25 16:44:57 +00:00
Jeff Bruemmer
33b34e456c docs - expression updates (#55645) 2025-03-25 16:09:03 +00:00
Alexander Solovyov
9381eadebb add dimensions to sample content (#55507) 2025-03-25 17:53:07 +02:00
Alexander Solovyov
140f48eb43 update athena to 3.5.0 (#55391) 2025-03-25 15:18:36 +00:00
Uladzimir Havenchyk
f9d20ea838 test: skip flaky calendar test as it is broken (#55689) 2025-03-25 14:11:45 +00:00
Ryan Laurie
aa8594fae7 remove smoke test (#55655) 2025-03-25 07:57:58 -06:00
Uladzimir Havenchyk
6be63025c9 test: mark broken column tests as broken and not flaky (#55674) 2025-03-25 16:33:46 +03:00
Alex Yarosh
7722d8db9c Update e2e-tests.md (#55676) 2025-03-25 12:46:24 +00:00
Sébastien
6a1588be90 Closes viz-456: decimals setting not being honored compact formatting (#55181)
* closes viz-456 decimals not being honored compact formatting

* fixup

* .
2025-03-25 13:43:21 +01:00
lbrdnk
857228f952 Querying generative test MS2 (#53921)
This PR adds defgentest and transforms with-gentest into gt/iterate. It also adds new test that uses cards.
2025-03-25 13:38:12 +01:00
Filip Hric
7d2e94f352 update cypress and some of its dependencies to the latest version (#55614) 2025-03-25 10:15:56 +00:00
Kamil Mielnik
b174d2e240 SEM-97 Limit the semantic Field Types choices to the actual field type category when editing table metadata (#55343)
* Add baseType prop to SemanticTypePicker

* Update unit tests

* Fix legacy v1/ Field['base_type'] typing, to make it same as Field['base_type'] from api/

* Use isa

* Add a hack for numerical types

* Fix typo

* Pass field

* Reuse type

* Use effective type

* First pass on the tech doc

* Handle booleans

* Use isa

* Refactor

* Update test

* Update test

* Assume no type can have 2 level-one ancestors

* Add comments

* Extract getCompatibleSemanticTypes

* Refactor isDeprecated

* Refactor

* Add fieldId param

* Add test for booleans

* Make initialValue required

* Do not assume a field cannot have multiple level-one ancestors
- these types have 2 level-one ancestors: type/JSON, type/XML, type/DruidJSON, type/OracleCLOB

* Extract FIELDS

* Add test

* Test Entity Name

* Remove '

* Add test

* Update test

* Add test for base_type fallback

* Update comment

* Refactor tests

* Add Field containing JSON tests

* Refactor

* Add a comment

* Improve naming

* Improve naming

* Use Field from types/api

* Fix typing

* Don't check for text-like fields
2025-03-25 09:55:32 +00:00
Noah Moss
6f17b2319a Baseline-align text in NativeQueryClickFallback (#55653) 2025-03-24 18:52:19 -04:00
Raphael Krut-Landau
89a4b2651a Add e2e tests for sandboxing implicitly and explicitly joined tables (#55443) 2025-03-24 18:41:25 -04:00
John Swanson
88f6005128 Return 5000 unique user attribute keys (#55649)
Previously we looked at 1000 users and got the set of unique user
attribute names from them. So if 1000 users each had a `name` and user
1001 had `some-other-attribute`, we would give you back `name` as the
complete set of available attributes.

This modifies the magic number (to 5000 from 1000) and the logic. We
select the first 5000 unique *attributes*. So if 1000 users each have a
`name`, that only counts as 1, and we'll continue looking for other
unique attributes before returning to the client.
2025-03-24 22:01:07 +00:00
Luiz Arakaki
711d29bbbb Add constraints to key (#55211)
Implemented validation that ensures API keys when created with config.yml:
Start with the mb_ prefix
Have a minimum length of 12 characters and max 254
Prefix (first 7 characters) must be unique
String must be Base64
2025-03-24 18:01:00 -03:00
github-actions[bot]
cde8cbbbba Update translations 2025-03-24 (#55641)
* Update translation sources 2025-03-24

* Update translations

* kick ci

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-03-24 20:48:26 +00:00
Ryan Laurie
dc6c57f07b v54 release code updates (#55643)
* add v54 build requirements

* remove required checks copy script
2025-03-24 13:06:15 -06:00
Alexander Polyankin
f42397e56d Add hover effect for dirty query state (#55627)
* Add

* Hover effect

* Remove unused compact prop

* Remove unused borderless prop

* Rename className

* Rename className

* Fix circular button padding and icon

* Fix circular button padding and icon

* Fix circular button padding and icon

* Fix circular button padding and icon

* Fix circular button padding and icon

* Fix circular button padding and icon
2025-03-24 12:54:54 -04:00
Raphael Krut-Landau
9360d1414e Refactor sandboxing e2e tests (#55540) 2025-03-24 11:55:30 -04:00
Ryan Laurie
7eee9af182 Gsheets frontend refactoring (#55564)
* rename and reorganize

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/google_drive/GdriveConnectionModal.tsx
#	enterprise/frontend/src/metabase-enterprise/google_drive/GdriveSyncStatus.tsx

* resolve conflicts

* oops forgot one
2025-03-24 09:33:46 -06:00
Noah Moss
728f04302f Use field refs instead of field ids/names for tiles queries (#55570)
* Use field refs instead of field ids/names for tiles queries

* Fix up embedded + public endpoints

* use field_refs

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-03-24 11:29:30 -04:00
Ryan Laurie
1c0bbf23fd allow SegmentedControl to have colors (#55582) 2025-03-24 08:36:25 -06:00
Aleksandr Lesnenko
16bbc2931d fix charts glitches in safari (#55589) 2025-03-24 10:06:59 -04:00
github-automation-metabase
e07c8d7f39 Bump org.graalvm.polyglot/polyglot from 24.1.2 to 24.2.0 (#55603)
* Bump org.graalvm.polyglot/polyglot from 24.1.2 to 24.2.0

Inspect dependency changes here: https://github.com/oracle/graal/compare/graal-24.1.2...graal-24.2.0

* update js-community version too

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2025-03-24 13:34:53 +00:00
Nick Fitzpatrick
85e4594069 Setting shouldUpdateUrl to false when calling popState in QB (#55362)
* resetting qb state before running card on back navigation

* try something else

* adding e2e test for notebook navigation

* wait for fk call in test

* increase timeout

* e2e adjustment
2025-03-24 09:56:37 -03:00
github-automation-metabase
b927a8def2 Bump ring/ring-core from 1.13.0 to 1.13.1 (#55604)
Inspect dependency changes here: https://github.com/ring-clojure/ring/blob/1.13.1/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-24 12:27:20 +00:00
github-automation-metabase
6b9387b268 Bump ch.qos.logback/logback-classic from 1.5.17 to 1.5.18 (#55597)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-24 12:26:06 +00:00
github-automation-metabase
380da21796 Bump cider/cider-nrepl from 0.52.1 to 0.53.0 (#55598)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.53.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-24 12:25:52 +00:00
github-automation-metabase
da45d95ac3 Bump org.eclipse.jetty.websocket/websocket-jetty-server from 11.0.24 to 11.0.25 (#55601)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-24 14:13:14 +02:00
Ngoc Khuat
0f5a6253e3 Fix query limit for alerts (#55610) 2025-03-24 11:19:45 +00:00
Alexander Solovyov
4050d70935 ci: Add manual workflow for deploying Athena JDBC driver (#55519) 2025-03-24 10:56:14 +02:00
Oreon Lothamer
92c9e8736d paginate pr-env job id retrieval (#55590) 2025-03-21 20:05:41 -10:00
Mahatthana (Kelvin) Nomsawadi
746b6ed780 Let embedders select exposed entities (#55463)
* Control visible entities in multi-stage data picker (#54845)

* Add props to DataSelector, and keeps the same behaviors.

* Read entity_types from URL search params

* Fix type errors

* Fix SDK not rendering multi-stage data picker

* Add redux slice tests

* Add E2E tests

* WIP add integration tests

* Add all integration tests

* Put tests file in a proper folder

So the SDK build process doesn't check test file types

* Cover more E2E scenarios

* Cover the new code with a test

* Add more assertions to make sure more paths are tested

* Fix imports

* Make functions easier to understand

* Fix test case name typo

Co-authored-by: Nicolò Pretto <info@npretto.com>

* Clarify embed state type

* Address review: Make code more concise

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>

* Control visible entities in simple data picker (#55329)

* Filter simple data picker by "entity_types"

* Add a happy path for multi-stage data picker E2E test

* Fix loading a wrong entity

* Control visible entities on new item menu dropdown (#55331)

* Control visible entities on new item menu dropdown

* Hide action following product discussion

* Make a new menu item more accessible

* Add tests

* Control visible entities in Browse sidebar (#55332)

* Control visible entities in Browse sidebar

* Add relevant tests

* Fix test case typos

Co-authored-by: Nicolò Pretto <info@npretto.com>

* Add comment to clarify magic value

Co-authored-by: Nicolò Pretto <info@npretto.com>

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-03-22 09:48:30 +07:00
Eric Normand
62cce4b7af [Integration branch] Cast string to date custom expression function (#55435) 2025-03-21 23:03:36 +00:00
Nick Fitzpatrick
4e0ca8b1d3 use-escape-to-close-modal, fix closing entity picker on esc (#55549)
* use-escape-to-close-modal, fix closing entity picker on esc

* add test for duplicate modal

* adding comment
2025-03-21 18:10:31 -03:00
Case Nelson
aebf3c8a2d support: Add snowplow logging for starburst-legacy-impersonation (#55569)
* support: Add snowplow logging for starburst-legacy-impersonation

* Fix tests
2025-03-21 14:57:53 -06:00
Eric Normand
50b372feff [INTEGRATION] splitPart() custom expression function (#55429)
* Empty

* Add split-part backend (#55425)

* feat: prepare fe part of split-part (#55483)

* Add split-part backend

* feat: prepare fe part of split-part

* rename function and add test

* use postgres for testing

* add test for an error

* add db flag

* remove docs page

* update copy

---------

Co-authored-by: Eric Normand <ericwnormand@gmail.com>

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
2025-03-21 20:44:41 +00:00
Alexander Polyankin
3ca34fbcf6 Multi-stage filter picker in chill mode (#55052) 2025-03-21 20:09:15 +00:00
Oreon Lothamer
78801d0533 point to correct workflow for pr-env lookup (#55580) 2025-03-21 09:53:45 -10:00
Eric Normand
6909e8d742 Frontend and Backend for url-pathname (#55353) (#55375)
* feat: prepare fe part of url-pathname

* fix dropdown styling

* fixup example

* rename function to path and update example

* Backend for url-pathname

* Rename to path()

* Backend tests for `path()`

* Frontend and Backend for url-pathname (#55353)

* feat: prepare fe part of url-pathname

* fix dropdown styling

* fixup example

* rename function to path and update example

* Backend for url-pathname

* Rename to path()

* Backend tests for `path()`

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>

* Fix kondo

* Fix kondo

* feat: prepare fe part of url-pathname (#55291)

* fix description

* fix styling

* cleanup

* fix rebase

* fix rebase

* add tests

* add tests

* update test

* fix test

* address review

* prevent url translations

* make tests less flaky

* update copy

* add category

* remove docs page and add feature flag

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-03-21 19:24:10 +00:00
Aleksandr Lesnenko
31eefe0d39 specify renderHook renderer explicitly (#55572) 2025-03-21 19:23:57 +00:00
Oleksandr Yakushev
0267393d72 [sync-metadata] Use equalsIgnoreCase to match fields instead of lowercasing (#55239) 2025-03-21 21:03:40 +02:00
Romeo Van Snick
8f617a8d78 Clean up custom expression compiler (#54415)
* Convert typeinferencer to typescript

* Split up diagnostics

* Split of lib check from diagnostics function

* Move getDatabase to util file

* Move isErrorWithMessage to utils

* Add getExpressionMode helper

* Simplify branches

* Move resolveMBQLField to separate module

* Simplify expressions import

* Remove unused options

* Fix type of mock env

* Move compiler to separate file

* Remove unused arguments to compiler

* Move passes to separate file

* Return expression from diagnose

* Remove unused processSource helper

* Fix types in passes

* Make resolving optional in compiler

* Add fuzz testing for compiler

* Mock legacy mbql to clause in fuzz test

* Remove need for compare

* Use default parameters

* Remove compare and compareSeed

* Remove unused recursive-parser

* Remove fuzz testing for recursive parser

* Remove unused arguments

* Colocate helper with the tests that use it

* Use compileExpression in formatter tests

* Use compileExpression in typeinferencer tests

* Order compiler passes

* Move StartRule and ClauseType to metabase-lib/v1/expressions

* Remove useShorthands pass

* Fix token escaping in pratt compiler #54751

* Remove POPULAR_ functions and aggregations

* Move compiler passes out of pratt compiler

* Make getMBQLName optional

* Add missing adjustBooleans pass

* Type startRule in compiler

* Move resolverPass to field-resolver

* Add isCompilerPass helper

* Allow use of short-circuiting for disabling passes

* Only render friendly errors

* Mark ExpressionError and ResolverError as user-friendly

* Add check for missing comma in argument list

* Simplify diagnostic checks

* Always return error and expression

* Make compileExpression and diagnoseAndCompile generic to StartRule

* Remove diagnoseAndCompileExpression helper

* Remove unused completer utils

* Move enclosingFunction to expressions module

* Fix typeinferencer tests

* Fix e2e test

* Detect cycles

* Inline passes

* Flatten compiler

* Remove prevError

* Remove default from diagnoseAndCompile type definition

* Use try/catch to simplify diagnoseAndCompile

* Wrap diagnostic errors in their own type

* Remove unnecessary wrapping of diagnostic error

* Move errors to top-level expression module

* Remove duplicate error types in expressions

* Fix error format in tests

* Add comments to passes

* Add tests for passes

* Fix lint

* Fix type imports

* Flesh out references in test data with base-type

* Use fleshed out field reference in all test cases

* Add boolean expression to test data

* Port recursive-parser tests for compiler

* Fix support for unary +

* Add cast support to test database

* Move cast calls to separate test

* Add test for escaping identifiers

* Unskip test

* Fix compiler tests to support top-level literal

* Typo

* Use normal quotes

* Fix typeinferencer for value clause

* Use all passes by default

* Fix pratt compiler tests

* Unskip garbage test

* Use dedent from ts-dedent

* Remove ClauseType helper for expression and make everything use Lib.ExpressionClause

* Coerce clause to be expression clause in filter and aggregation pickers

* Fix diagnostic test

* Wrap diagnostic error in a DiagnosticError

* Use instanceof to check type of error

* Do not assume all diagnostic errors are human-friendly
2025-03-21 19:51:50 +01:00
Romeo Van Snick
55fefac833 Add placeholder to custom expression editor (#55537)
* Add placeholder to custom expression editor

* Ignore placeholder in e2e test
2025-03-21 19:48:43 +01:00
github-actions[bot]
a36e2fca46 Add Slovenian Localization + Synchronize Translations (#55307)
* Update translation sources 2025-03-17

* Update translations

* don't add lithuanian yet

* language is always locale

* Fix the `ttag` i18n calls for pluralized strings

Pluralized strings *without* the number interpolated into them (eg.
"Month" and "Months") were not getting found by `i18n/trun` in CLJS,
which made them fall back to English.

This fixed the `ttag/msgid` call to be correctly formed in both cases.

* update some localized strings

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
2025-03-21 11:38:35 -06:00
Jeff Bruemmer
4353626e7a fix links (#55548) 2025-03-21 13:23:53 -04:00
dpsutton
4a068f02b3 Handle snowflake timeouts (#55546)
We are running a probe query on snowlfake to see if the current db user
can see views

```
select true from X where 1 <> 1 limit 0
```

Something like this.

But on large views, it seems snowflake does not quickly determine this
has no rows and it can take a while.

This leads to the connection being closed. Then in the error handler we
attempt to rollback. But if the connection is closed _this_ throws and
we have now thrown from the error handler and we break sync.

This does two things
1. set a timeout on sql statements. This does 10 seconds.
2. If a timeout occurs, assume that they _can_ see the object

The idea is that timeouts might happen but it's trying to run a query
that it would quickly reject if the permissions were lacking. So
timeouts mean you can see the data, it's just taking a while
2025-03-21 12:13:36 -05:00
Sébastien
ccaddac0c4 closes viz-358 precision for scientific notation (#55542) 2025-03-21 18:05:33 +01:00
Sébastien
bc3b10d93c closes viz-230 no color picker for waterfall series (#55530) 2025-03-21 18:05:16 +01:00
Stas Gavrylov
460a36571a WRK-116: Add custom cron scheduling option to Schedule (#55472)
* WRK-116: Add custom cron scheduling option to Schedule. Integrate in Alerts notifications

* WRK-116: Remove 'every' label for custom schedule option. Introduce 'separate' group for GroupControlsTogether.
2025-03-21 18:46:13 +02:00
Riley Thompson
a34c663134 Bring Clickhouse driver into Metabase repo (#54740)
* Bring Clickhouse driver into Metabase repo

---------

Co-authored-by: Luiz Arakaki <luiz.arakaki@metabase.com>
2025-03-21 12:37:18 -04:00
Sébastien
43b23ec5c5 Closes VIZ-498 can't change back to dollar sign in header (#55167)
* closes VIZ-498 can't change back to dollar sign in header

* added unit test

* fixup
2025-03-21 17:36:02 +01:00
Edward Paget
f385ca3b47 feat: enable the field scanning task for audit db (#55379) 2025-03-21 16:27:31 +00:00
Edward Paget
0bff778586 feat: add embedding stats to token request (#55491)
* feat: add embedding stats to token request

Adds the embedding_users, internal_users, domains, and query_execution_*
stats to the token check request in order to track embedding usage.

This creates a new internal_stats module to share code between the
anonymously reported stats the stats for the token check request to
avoid some circular depedencies. This also seperates creation of a stat
and how it is reported, so we could move over other stats calculated for
the phone home metric.

* temp! add a logging statement to figure out why CI is different

* fixup! exclude api-key email

* fixup! exclude api-key/internal type users
2025-03-21 16:22:07 +00:00
Phoomparin Mano
5bd573c163 docs(sdk): indicate support for react 19 (#55527)
* update docs and cli

* unify wording for cli message

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-03-21 23:22:03 +07:00
bryan
9ff6f46311 fix localhost:* in embedding app origins sdk (#55481)
* fix localhost:* in embedding app origins sdk

We need to call the setting's getter directly, and not use
`setting/get-value-of-type`. The setter it adds localhost:* which is required.

* add test

* test fix

* update module config

* improve test feedback

* fix ci
2025-03-21 10:14:56 -06:00
Timofey Kachalov
84f4b08e52 Enable shoppy compatibility testing on CI (#55536) 2025-03-21 19:58:19 +04:00
Jeff Bruemmer
104e1d59d8 remove unused images (#55544) 2025-03-21 11:53:54 -04:00
Jeff Bruemmer
c725834726 docs - accessibility notes (#55493)
* accessibility notes

* update accessibility page
2025-03-21 11:23:04 -04:00
Aleksandr Lesnenko
ea33b84c8f use whitelabel colors in the static viz (#55231)
* use whitelabel colors in the static viz

* Fix backend whitelabel test for app colors

* update CI

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-03-21 10:34:27 -04:00
Edward Paget
0cb3f4157d fix: return 404 when logout without session (#55464)
* fix: return 404 when logout without session

* fixup! remove #p
2025-03-21 14:09:53 +00:00
Mahatthana (Kelvin) Nomsawadi
54c3894552 Reduce noise in SDK Slack channel (#55513) 2025-03-21 09:20:03 +00:00
Oisin Coveney
ecc332187a Use SDK-specific ID types and reconcile the changes (#55448) 2025-03-21 10:48:08 +02:00
Timofey Kachalov
2b192818f6 docs(sdk): Extract embedding docs code snippets to separate files and type-check them (#55253) 2025-03-21 12:45:29 +04:00
Nicolò Pretto
6f3d2566eb test: add renderHookWithProviders helper (#55449)
* test: add renderHookWithProviders helper

* remove defaults from getTestStoreAndWrapper and destructure options to
only pass down the correct args
2025-03-21 09:40:59 +01:00
Darth Spectrum
4379a56a85 Not retrying to send notifications to missing slack channels (#55180)
Fixes #49647
2025-03-21 09:42:31 +02:00
Tyler Plude
c29938b1ea Fix cond fmt of null vs empty str in table static viz (#55386)
* Fix cond fmt of null vs empty str in table static viz

* Adding unit test

* Add TextWrapper support in json exports

* Updating unit tests with TextWrapper
2025-03-21 00:44:59 +00:00
Alexander Polyankin
ce6a272e22 [Integration branch] Literals in expressions - value support (#55202)
* Empty

* Add `value` support in the expression editor (#55203)

* Literals in filters tests (#55283)

* E2E tests for literals in custom columns (#55288)

* E2E tests for literal custom columns in other clauses and fixes (#55295)

* Move changes from the FE branch

* Move changes from the FE branch

* Move changes from the FE branch

* Fix filter schema and false = false filter (#55417)

* Fix date/string literals effective type (#55427)

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Fix date/string literals effective type

* Forbid top-level constants until the BE is fixed (#55459)

* Use matches

* Make test flaky

---------

Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
2025-03-20 20:10:13 -04:00
Nathan Voxland
3fa59859db Store created-by-id in the gsheets config (#55191) 2025-03-20 17:10:03 -05:00
metamben
5071cef855 Use actual time zone marker (Z) when parsing offset times (#54987)
Fixes #53724

Also remove (date)time formats moment cannot handle anyway.
2025-03-20 23:26:29 +03:00
Edward Paget
63d22989e9 fix: use custom dns resolver when fetching geojson (#55460) 2025-03-20 13:27:28 -05:00
Alex Yarosh
6b0449351f Update mongodb.md (#55470) 2025-03-20 14:02:13 -04:00
Tyler Plude
0a3c48b0c1 Fix sig-figs-after-decimal (#55377)
* Fix number formatter for small decimals

* Fixing bug when decimal is not ; Removed param as input value should always be numerical
2025-03-20 10:43:28 -07:00
Uladzimir Havenchyk
bbcac9ead3 ci: set default number of times for running e2e stress test (#55462) 2025-03-20 20:37:50 +03:00
Aleksandr Lesnenko
a1f7d7fba0 Apply fix from 51937 to new minibar cell (#55477) 2025-03-20 17:11:31 +00:00
Phoomparin Mano
f3a1576201 ci(sdk): run embedding sdk component tests across react 18 and 19 (#55405)
* add script to change react version

* cleanup version

* cleanup version change script

* setup workflow

* fix workflow dependencies

* cleanup workflow dependencies

* fix clojure missing

* setup @cypress/react

* combine cypress harness packages

* add clarification messages

* remove @cypress/react18

* remove backup files

* cleanup package.json

* cleanup cypress test harness

* clarify cross React version tests

* clarify messages

* change react version after making appdb snapshot

* log dependencies in change-react-version

* revert me - use fake uberjar to speed up testing

* update test jar

* mkdir for testing purposes

* remove react 17 from matrix

* clarify React 17

* remove testing config

* let git handle the backup and restore mechanism

* move the artifact download step for a better diff
2025-03-20 23:25:51 +07:00
Nicolò Pretto
b196a4e0c3 ci(sdk): adds embedding-sdk-tests-result (#55344)
* ci(sdk): adds embedding-sdk-tests-result

* ci: should run the sdk tests as part of the embedding-sdk workflow

* let's try without concurrency

* rename "frontend" -> "embedding SDK"
2025-03-20 12:40:03 +01:00
Alexander Polyankin
d6e3e3d187 [Integration branch] Add integer(<value>) MBQL function for Postgres (#55364)
* Integration

* Support for `text` MBQL function on the FE (#55274)

* Cast text backend on postgres (#55292)

* Add `text()` custom expression that casts to text

* Add :cast to list of all possible features

* Complete testing plan

* Fix kondo warnings

* Fix test

* Empty

* Add e2e tests (#55361)

* Fix failed tests for text() function (#55374)

* Add UI for integer() function, with e2e tests (#55366)

* Set category

* Set category

* Set category

* Set category

* Fix tests

* Cast integer backend (#55381)

* integer() custom expression with simple tests

(more tests coming)

* MOAR tests

* EVEN MOAR tests

* Change type to BigInteger

---------

Co-authored-by: Eric Normand <ericwnormand@gmail.com>
2025-03-20 01:56:43 +00:00
Aleksandr Lesnenko
9dfa4dcdef Data grid cell selection (#54775) 2025-03-19 21:03:30 -04:00
Oleksandr Yakushev
7d5fcecf28 [pivot] Optimize CLJC pivot exsport for csv files (#55235) 2025-03-19 22:21:45 +00:00
Alexander Solovyov
d6dc7e5f3c [serdes] introduce (partial) schema coercion for Dashboard (#55354)
This adds coercion support for serialization and adds a very limited partial schema for a Dashboard, in hopes that
this grows to be a full schema for our data models at some point.

fixes #54941
2025-03-19 21:38:43 +00:00
Alexander Polyankin
94d46b2290 [Integration branch] Add text(<value>) MBQL function for Postgres (#55268) 2025-03-19 19:52:39 +00:00
Filip Hric
cbc59ff0b2 run only previously failed tests when rerunning pipeline (#54900) 2025-03-19 12:54:30 -06:00
Aleksandr Lesnenko
61ba3c325e Tanstack data grid table interactive dashcards (#54703) 2025-03-19 18:36:33 +00:00
Raphael Krut-Landau
e7dea2105d Add e2e test that filter values are sandboxed #54539 2025-03-19 14:34:49 -04:00
Oisin Coveney
928683dc71 fix(sdk): Fix ad-hoc question view when clicking into SDK dashboard (#55254)
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-03-19 17:37:06 +02:00
Ryan Laurie
90f891214e Sync Localizations with Crowdin (#52334)
* sync translations with crowdin

* remove poeditor integration

* fix run name

* update to new project

* sync

* path

* move to config

* not master lol

* kick ci

* update crowdin config

* remove croatian

* roflcopter

* token

* maybe fetch harder

* test code - revert this

* test

* more tokens

* just use the cli

* line breaks

* le facepalm

* no verify

* token swap

* auto approve

* revert

* remove zh e2e test

* remove test code

* don't backport translations

* don't backport translations
2025-03-19 08:24:24 -06:00
Ryan Laurie
7e5d8c9f4a Support huge piles of open backports (#55342)
* support huge piles of open backports

* correct string
2025-03-19 08:06:31 -06:00
Romeo Van Snick
0c9bc4fab2 Do not reopen helptext when selecting completion (#55280)
* Do not reopen helptext when selecting completion

* Add e2e tests for help text and suggestions
2025-03-19 14:07:07 +01:00
Alex Yarosh
4ee726ee16 docs: add Learn redirects for Maps (#55367)
* Update map.md

* Update map.md
2025-03-19 09:00:01 -04:00
Oisin Coveney
2d4a7d05df fix(sdk): Entity ID support for CreateDashboardModal (#55358) 2025-03-19 13:25:40 +02:00
github-automation-metabase
b8f7bff12b Bump io.netty/netty-buffer from 4.1.118.Final to 4.1.119.Final (#54568)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-19 12:56:03 +02:00
Ngoc Khuat
e7af871ca1 Add display type for notification subscription (#54954) 2025-03-19 10:47:15 +00:00
Romeo Van Snick
331c9bd7e2 Add function browser to the custom expression editor (#55102)
* Add FunctionBrowser component

* Move header into CombineColumns for consistency

* Render the function browser

* Allow wrapping shortcuts

* Render toolbar buttons on top again

* Add missing Lib import

* Fix e2e test

* Use ellipsis in placeholder

* Add test-id to function browser

* Add e2e tests for function browser

* Add category to help text configs

* Only render supported functions in function browser

* Convert to helptext in getFilteredClauses

* Group functions by category

* More e2e tests

* Add empty state to function browser search

* Add more breakpoints for expression editor layout

* Move function browser item into its own component

* Increase width of function browser

* Add case to functions

* Remove unnecessary maw prop

* Sort functions

* Add tests for FunctionBrowser

* Remove nested component definitions

* Use standard breakpoints

* Add spacing between toolbar buttons

* Fix functions test

* Add category to distinct-if

* Fix tests that were broken by sorting

* Fix unit test examples

* Add more unit tests for filtering

* Do not enter parentheses when there are no arguments to the clause

* Sort by displayName

* Sort by structure

* Add e2e about clauses with no args

* Fix sorting test

* Fix font sizes for function browser

* Fix function browser spacing

* Allow replacing selection with function browser
2025-03-19 10:13:32 +01:00
Oisin Coveney
d094e67e54 Remove dashboardActions and dashboardProps spreading in favor of explicit props (#55175) 2025-03-19 07:14:12 +00:00
Kamil Mielnik
c5d7b545ee Fix - App crashes when editing segment field details in data reference (#55333)
* Fix #55322

* Repro #55322

* Simplify diff
2025-03-19 13:43:30 +07:00
Raphael Krut-Landau
34ef924bce Add e2e tests that parameter values can be sandboxed (#54655) 2025-03-18 22:32:53 -04:00
Ngoc Khuat
aa3db88a58 [Notification] Fix task history report when channel failed to send and we skip it (#55312) 2025-03-19 10:33:00 +09:00
Fraser
62af27038b Replace Confirm with ConfirmModal (#55310)
* Replace Confirm with ConfirmModal
2025-03-19 13:02:26 +13:00
Luis Paolini
8f425c9fee Upgrade jspdf to 3.0.1 (#55363) 2025-03-18 20:15:47 -03:00
Aleksandr Lesnenko
c381149964 loki-update should update only diff (#55246) 2025-03-18 20:38:05 +00:00
Nick Fitzpatrick
6850c93eaa For your consideration hoc (#54933)
* Context Driven Indicator Menu

* add unit tests

* unit test adjustments

* Ho
C time

* hasSeenAll

* cleanup, passing tests

* adjusting some tests, PR feedback

* more small adjustments. Starting to add docs

* hopfully final adjustments

* adjusting storybook path
2025-03-18 17:16:51 -03:00
Braden Shepherdson
0195ff7ecd [refs] Support remapped columns in lib; handle more ident cases (#55311)
Closes QUE-764.

Adds support for returning "remapped" columns, which have not been
supported in the library previously.

- Refactor `lib.field/remapped-field` to `lib.metadata`
- Add `lib.metadata.calculation/remapped-columns`


Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-03-18 19:48:24 +00:00
Edward Paget
55b4c2446a fix: improve startup by not scheduling all dbs (#55297)
* fix: improve startup by not scheduling all dbs

Improve long startup times by not scheduling tasks for all dbs on
startup. Due to the lack of bulk operations in quartz if an installation
has 500 dbs we need to load and scan through all associated db scanning
triggers 500 times for all dbs which means loading about 500k records in
1000 operations.

This is generally pretty fast on a per operation basis (about .5s
in local development), but on some postgresql installations this can
blow up to a few seconds per db, which makes the whole operation take 40
minutes plus. Additionally there maybe both lock contention and resource
contention between the quartz scheduler and the main app thread that
draws out this time.

Instead we want to init the schedule and put it into standby mode -- where
we can schedule tasks but are not executing them -- before we process
the configuration file. That we can schedule all necessary tasks as part
of loading the database from the config file and not need to then
iterate all database to schedule their tasks later in the startup.

Long term, it would be good to support rescheduling tasks using a bulk
operation in quartz (there are TODOs in their code base for supporting
this) rather than needing to update each trigger individually.

* fixup! doc string for check-health! function
2025-03-18 18:47:45 +00:00
Alex Yarosh
460ced3b6f docs: overhaul maps docs (#55313)
* map comparison

* docs: maps overhaul

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* review feedback

* Apply suggestions from code review

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-03-18 18:16:00 +00:00
Alexander Solovyov
87f6d7e8f7 fix some mage installer logic (#55277)
* fix some mage installer logic

* make `cd bin && ./mage` work

get the absolute path, + cd to mb repo root in subshell

---------

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2025-03-18 17:44:00 +00:00
Luis Paolini
e7bf5d57ed Update root folder Dockerfile (#54110)
Update the clojure version
2025-03-18 14:11:42 -03:00
Noah Moss
c8314f52cf Migrate Chinese site & user locales from zh to zh_CN (#55287) 2025-03-18 12:50:20 -04:00
Phoomparin Mano
588abf10ed feat(sdk): do not setup sandboxing and show user switcher if using a sample database (#55105)
* do not setup sandboxing if using a sample database

* do not ask for tenancy columns if using a sample database

* alter copywriting when in sample database mode

* improve copywriting for scenarios with a sample database

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* fix misleading comments

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-03-18 16:28:28 +00:00
Alex Yarosh
5dd9e138a8 Update expressions-list.md (#55350) 2025-03-18 12:06:16 -04:00
Alex Yarosh
fea7185b21 Update introduction.md (#55349) 2025-03-18 16:02:53 +00:00
Oisin Coveney
3c63deb4bb Remove InteractiveQuestionProviderWithLocation since it's really not necessary (#55165) 2025-03-18 17:53:42 +02:00
github-automation-metabase
7e816edff6 Bump io.github.eerohele/pp from 7ac1bc56de95520ff4938df05e3518e9b051415d to 9598f4c72b528480a85ea41651c45b08d1717428 (#55242)
Inspect dependency changes here: 7ac1bc56de...9598f4c72b

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-18 11:49:11 -04:00
William
b92b5d2e68 Backfill job handles many duplicates (#55228)
The backfill job originally retried up to 20 times and then gave up.  However, some instances apparently have ~150
duplicates or more, so 20 retries is insufficient.  In addition, 2 db calls per conflict is sort of a problem when the
conflict count is O(duplicates^2).  This bumps up the retry limit and reduces the db calls to 1 per 50 conflicts.
2025-03-18 14:40:12 +00:00
Kamil Mielnik
76cabfcf73 SEM-149 Hide unused semantic types (FE only) (#55327)
* Hide deprecated semantic types

* Add tests

* Update tests
2025-03-18 21:21:25 +07:00
Kamil Mielnik
9a8dc14501 Fix - Prevent browser close/go back while changes are unsaved (#55161)
* Disallow navigating from model/{slug}/query and model/{slug}/metadata to model/{slug} when there are unsaved changes

* Reset state

* Simplify reset

* Use appropriate redux action when programmatically invoking navigation

* Disallow navigating from metric/{slug}/query and metric/{slug}/metadata to metric/{slug} when there are unsaved changes

* Remove mentions on inexisting /metric/metadata and /metric/{slug}/metadata routes

* Rename test

* Add repro for #32037 (models)

* Improve assertions

* Fix state cleanup

* Fix flaky test

* Deal with race conditions

* Add repro for metrics

* Correctly reset ui state when cancelling editing a model/metric

* Add repro for editing model's query

* Remove log

* Add a comment
2025-03-18 21:21:20 +07:00
Jeff Bruemmer
b57516c465 update site urls (#55337) 2025-03-18 10:19:06 -04:00
Stas Gavrylov
be7d1b04df WRK-129: Add 'by the minute' option to Schedule (#55184)
* WRK-129: Add 'by the minute' option to Schedule. Add NotificationSchedule component
2025-03-18 16:12:25 +02:00
Stas Gavrylov
6be9eb6905 Fix incorrect condition to hide parameters section in SubscriptionSidevar (#55320)
* Fix incorrect condition to hide parameters section in SubscriptionSidebar
* Add unit tests for advanced filtering parameters display
2025-03-18 14:10:08 +00:00
Ngoc Khuat
ab9103a67f [Notification] Handle description for new schedule types (#55249) 2025-03-18 13:38:18 +00:00
Nick Fitzpatrick
8b4e79dd79 fixing hover state on time grouping dropdown (#55284) 2025-03-18 10:08:47 -03:00
Alexander Polyankin
c38c616056 Remove source-table being accessed directly in the QB (#55267) 2025-03-18 09:07:44 -04:00
Jeff Bruemmer
60d9c209e7 minor modal message fix (#55217) 2025-03-18 09:03:53 -04:00
Phoomparin Mano
87354c136f fix(sdk): mark all react-dom dependency requests as external for React 19 compatibility (#55071)
* fix externals configuration to enable compatibility

* tweak externals configuration
2025-03-18 19:04:08 +07:00
Mahatthana (Kelvin) Nomsawadi
0be73a6e90 Add a new embedding selector + make selector names consistent (#55260) 2025-03-18 11:36:51 +00:00
Mahatthana (Kelvin) Nomsawadi
57bd674360 Update embedding team codeowners files (#55317) 2025-03-18 11:36:30 +00:00
Filip Hric
9a4605143f remove filiphric from e2e tests codeowners (#55316) 2025-03-18 10:31:40 +01:00
Romeo Van Snick
c7a03ed080 Custom expression close on exit modal (#55047)
* Revert "Skip tests that deal with the click outside and escape behaviour of the custom expression editor"

This reverts commit 2c05bc08c2.

* Revert "Remove CloseModal component"

This reverts commit ad1795e05a.

* Revert "Move usePreventClosePopover into utils"

This reverts commit de31b21282.

* Add PreventPopoverExit util

* Remove use of non-existant hook

* Prevent popover from closing on outside click or escape

* Rename argument to avoid confusion with double negatives

* Prevent custom expression editor from closing in aggregation sidebar

* Allow exiting the component when navigating away from custom expression editor

* Add a comment explaining why the useClickOutside does not work

* Add comment on how CloseModal works

* Remov empty file

* Add comment on what children should be

* Allow overriding cancel button text on ConfirmModal

* Allow passing more props to ConfirmModal

* Fix primary button on ConfirmModal

* Use ConfirmModal for custom expression editor

* Fix e2e test

* Remove second message in closemodal

* Update loki
2025-03-18 09:01:00 +01:00
Uladzimir Havenchyk
5aeb52544a ci: decrease build job timeout (#55264) 2025-03-18 09:32:39 +03:00
Ryan Laurie
34722e2025 Add Basic Admin Setting Component (#55063)
* add admin settings input widget

* stupid typescript

* stupid me

* silly typescript

* rename component
2025-03-17 17:25:57 -06:00
Gustavo Saiani
425043a096 Update links (#55298) 2025-03-17 18:06:33 -03:00
Uladzimir Havenchyk
c0c045a568 fix(qb): do not cut layout with two sidebars (#55163)
* fix(qb): do not cut layout with two sidebars

do not show data reference sidebar automatically on small screens

* rename wrapper
2025-03-17 20:13:49 +00:00
Jeff Bruemmer
cc9b45c6dd docs - sdk edits (#55056) 2025-03-17 20:03:29 +00:00
Aleksandr Lesnenko
d0efa299de move crypto-browserify to dev deps (#55279) 2025-03-17 19:25:46 +00:00
Alexander Polyankin
a22366e29f Remove unused metabase-lib/v1 code (#55262)
* Remove StructuredQuery

* Remove query base classes

* Remove query base classes
2025-03-17 13:16:03 -04:00
Jeff Bruemmer
0de7a3047d docs - update generated docs (#55275) 2025-03-17 12:35:23 -04:00
John Swanson
bcbf3e946b dev: just warn if can't watch UserKeyValue schemas (#55178)
If you run an uberjar with `MB_RUN_MODE=dev`, you get an exception
because you try to run the `watch-directory!` bit (which only works for
actual files) in an uberjar environment.

Let's just print a warning but continue along.
2025-03-17 16:29:50 +00:00
Ryan Laurie
fd976b7237 fix temporal strings for i18n (#55270) 2025-03-17 15:58:38 +00:00
Alexander Polyankin
0804a5ebca Improve Select all/none labels (#55109) 2025-03-17 10:16:22 -04:00
Romeo Van Snick
95b6eeec4c Custom expression better examples (#55048)
* Rename arg to caseInsensitive

* Add matcher for internal [:dimension name]

* Add formatting support for internal dimension clause

* Use raw MBQL in examples

* Format examples at certain width

* Remove unused suggest code

* Fix unit test for help text

* Add unit test for rendering examples on multiple lines in HelpText

* Improve spacing

* Make sure that all help texts can be formatted properly

* Add custom formatExample helper to format example expressions

* Use useAsync to format example

* fixup! Add custom formatExample helper to format example expressions

* Add HighlightExpression component

* Export all modules
2025-03-17 14:23:17 +01:00
Anton Kulyk
52b92aa7f5 Fix object detail view ignores link formatting (#55200)
* Fix `row` type to be `RowValue[]`

* Use richer `clicked` object in object detail view

* Fix column settings not available in detail view

* Add e2e test
2025-03-17 12:47:52 +00:00
Alexander Polyankin
efb52f7916 Remove StructuredQuery from metabase-lib/v1 (#55223) 2025-03-17 11:40:41 +00:00
Romeo Van Snick
6b8c581ea6 Fix Custom Expression snippet completion when error occurs (#55164)
* Avoid rerendering editor when error change

* Add delay support to CustomExpression.type

* Add test for breaking snippets
2025-03-17 12:07:10 +01:00
Kamil Mielnik
db12bcbd4f Fix - Filtering the semantic types list is super annoying (#54965)
* Rename Select to LegacySelect

* Convert frontend/src/metabase/lib/core.js to TypeScript

* Format code

* Extract SemanticTypePicker

* Fix type

* Fix styling

* Fix nulls

* Add nothingFoundMessage

* Extract DefaultSelectItem

* Add CurrencyPicker

* Optimize

* Add checked icon to CurrencyPicker

* Improve overflow in SelectItem

* Add FkTargetPicker

* Style font-weights to be the same as in other inputs around

* Fix colors

* Add a comment

* Fix imports

* Style dropdowns

* Make currency input full width

* Add Combobox component

* Show currency symbol next to value

* Modernize field settings button

* Modernize FieldVisibilityPicker

* Update tests

* Update test

* Update and merge tests

* Update tests

* Remove bold, fix padding and move components to their own dirs

* Update unit tests

* Update e2e tests

* Update tests

* Reduce flakiness

* Add comment

* Repro #53595

* Replace CSS modules overrides with props

* Fix symbol styling for selected option in CurrencyPicker
2025-03-17 14:45:27 +07:00
Ngoc Khuat
22d48678bb Quartz guide (#55068) 2025-03-17 16:41:17 +09:00
github-automation-metabase
39a1a17303 Bump net.snowflake/snowflake-jdbc from 3.22.0 to 3.23.1 (#55245)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-17 04:46:42 +00:00
github-automation-metabase
26c0cdaf94 Bump org.clojure/tools.reader from 1.5.1 to 1.5.2 (#55244)
Inspect dependency changes here: https://github.com/clojure/tools.reader/blob/v1.5.2/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-17 04:40:39 +00:00
github-automation-metabase
119579dc6c Bump org.clj-commons/hickory from 0.7.5 to 0.7.7 (#55243)
Inspect dependency changes here: https://github.com/clj-commons/hickory/compare/Release-0.7.5...Release-0.7.7

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-17 13:27:04 +09:00
github-automation-metabase
bb688aff2e Bump com.github.seancorfield/honeysql from 2.6.1281 to 2.7.1295 (#55240)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1295/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-17 13:26:51 +09:00
Fraser
e1f1d8e6ed Replace ConfirmContent with ConfirmModal (#54947)
* Replace ConfirmContent with ConfirmModal
2025-03-17 13:42:16 +13:00
Fraser
db090a59c0 Use the new ConfirmModal in DeleteConfirmModal (#54946)
* Use the new ConfirmModal in DeleteConfirmModal

* Delete ConfirmDeleteModal and use ConfirmModal directly
2025-03-17 13:41:05 +13:00
Alex Yarosh
b6e05875da docs: hiding columns (#55233)
* hiding columns

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-03-15 19:57:25 +00:00
Aleksandr Lesnenko
b1b183f7b9 render cartesian charts when the dimension column is not available (#54870) 2025-03-14 23:40:20 -04:00
Noah Moss
ea73a601b7 Shared FE/BE pivots (#53000)
* POC - moving two pivot functions into CLJC

* Debug logs in frontend pivot impl

* POC continued

* setting isCollapsed consistently

* Working replication of valuesByKey map construction

* sorting logic

* hook up new code to the FE impl

* Fixing small potential bug in valuesByKey

* Fixing bug in clojure vs javascript string key for valuesByKey

* fix valueColumns key name

* Some performance improvements + cleanup

* A couple more attempts at perf improvements

* Fix bugs

* port format-values-in-tree

* WIP add-subtotals

* @tsp - Improved build-values-by-key perf; some debug perf lines in frontend land

* @tsp - in progress conversion of add-subtotals

* @tsp - working converted Pivot.add_subtotals

* @tsp - fixing bug in add-subtotal mapcat recursion

* @tsp - add-subtotal restoring map to mapcat (oops)

* @tsp - adding working Pivot.add_value_column_nodes to replace addValueColumnNodes

* @tsp - removing debug logs & perf timing logs

* Appease whitespace linter

* More formatting code ported, cleanup

* Fix bugs, cleanup

* Fix some tests

* Start hooking up the BE, fix some bugs

* Fix lint/formatting errors

* Fix comparator + i18n

* Fix another module issue

* Test using js-specific i18n function

* Revert "Test using js-specific i18n function"

This reverts commit 9a8604b583885f1c35f48507112e3a142ca0d3a0.

* Bump up timeout on cypress assertion

* WIP - migrate row section getter to cljc

* fix tests

* Fix e2e test

* Switch exports over to fully using CLJC code paths, delete now-unused code

* Delete outdated postprocess tests

* Bug fix

* Fix build

* cleanup, consolidation

* fix function call

* more cleanup

* empty test ns

* misc cleanup/docstrings

* WIP tests

* more tests and refactor

* small fix

* fix getting column title for value columns

* Fix some tests

* Fix another test

* Revert a couple changes

* Fix some more tests

* Fix more tests, fix default values for pivot viz settings

* Ensure headers respect format-rows? settings in exports, and fix more
tests

* Fix lint issues

* fix another test

* Fix a test, a little cleanup

* Try to fix another test by setting format-rows middleware to false for subscription attachments

* Revert "Try to fix another test by setting format-rows middleware to false for subscription attachments"

This reverts commit d860522a6d17c27e67afabccf119039508c96cca.

* Update formatting logic to fix another test

* Fix conditional formatting

* Fix last BE test

* remove test not needed anymore

* Fix drill through + more cleanup

* clean ns

* remove old code from .clj-kondo/config.edn

* add a comment + tweak keywords

* perf improvements and refactoring the CSV export path

* Performance improvements

* Fix bad rebase

* more perf improvements

* fix test

* lint

* oops, fix test

* more optimizations, memoize backend formatting

* fix range-based conditional formatting

* remove unused function

* add some new backend unit tests

* fix FE type checks - caused by an experiment that I didn't revert fully

* address PR review feedback

* fix up tests

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-03-14 22:49:11 +00:00
Uladzimir Havenchyk
33072d65d4 ci: adjust timeouts to catch possible build stucks earlier (#55151)
* ci: adjust timeouts to catch possible build stucks earlier

* adjust memory

* Update .github/workflows/e2e-tests.yml

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-03-14 22:38:55 +00:00
William
c43780e97f Add background job to backfill entity ids (#54060)
We are adding entity_ids to dbs, tables, and fields, but existing rows don't have entity_ids yet, and newly created dbs/tables/fields don't have entity_ids when created. This job adds those missing ids.
2025-03-14 21:21:15 +00:00
Oleksandr Yakushev
e8c6375b24 [pivot] Use m.u.performance/juxt* when constructing pivots (#54555) 2025-03-14 23:19:49 +02:00
Jeff Bruemmer
e477f074fd docs - include deprecated in env vars, not in config template (#54873)
* include deprecated in env vars, not in config template

* whitespace

* tests

* config file test

* whitespace

* combine functions

Co-authored-by: bryan <bryan.maass@gmail.com>

* format

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-03-14 20:59:40 +00:00
Alexander Solovyov
10be466d6f skip actions when duplication a dashboard: they raise an exception right now (#55197)
Ideally, we'd copy them too, but we need to decide if we should duplicate them or not (do a deep or shallow copy) is a
too hard to make immediately, and this at least will unblock people being unable to duplicate dashboard with actions
defined.

somewhat improves on #38224
2025-03-14 20:34:55 +00:00
Riley Thompson
e09377b3de Add Mongo support for mage start-db (#54939)
* add start-db mongo to mage

* different container names for different versions

* image -> container

* move eol url to db info
2025-03-14 16:14:59 -04:00
bryan
5505ebc3dd setup discouraged-tag linting for #p (#55187)
* setup discouraged-tag linting for #p

- this is fine to use in dev, but shouldn't get comitted
  so this will fail kondo linting.

* sample #p commit (check linting)

* Revert "sample #p commit (check linting)"

This reverts commit 171130c668.

I added it to double check the linter will complain correctly
2025-03-14 20:02:50 +00:00
Noah Moss
70ef40a740 Revert "Ensure that ad-hoc questions show visualization (#55156)" (#55210)
This reverts commit 106ee4f4ef.
2025-03-14 19:55:15 +00:00
Edward Paget
6a89c7502c feat: send setting information via snowplow (#54981)
* feat: send setting information via snowplow

* fixup! return full values for locale

* fixup! kondo

* fixup! remove #p

* fixup! newline
2025-03-14 19:52:51 +00:00
bryan
a19ce07aa7 mage installer (#54994)
* moves mage to mage_core, adds installer at mage

- not sure if this will always work or not

* respond to review

* review2

* review3
2025-03-14 18:48:20 +00:00
Luiz Arakaki
33592a3528 add api keys to config.yml
API Key Configuration via config.yml
Overview
This PR adds support for configuring API keys through the config.yml file in Metabase Enterprise. This enhancement allows administrators to define and manage API keys declaratively through configuration, making it easier to set up and maintain API access across different environments.

Features
Adds support for defining API keys in config.yml under the api-keys section
API keys can be configured with:
name (required)
group ("admin" or "all-users")
creator (email of the user to assign it, user must exist in the instance or be created in the config file, must be superuser)
Automatically creates API keys on Metabase startup if they don't already exist
Skips creation of API keys that already exist (based on name)
Validates configuration including:
Required fields
Valid group values
Creator permissions
Example Configuration
version: 1
config:
  api-keys:
    - name: "My Admin API Key"
      group: admin
      description: "API key for admin operations"
      creator: admin@metabase.com
    - name: "My All Users API Key"
      group: all-users
      description: "API key for general operations"
      creator: admin@metabase.com
Security Considerations
API keys are only created by admin users
Keys are properly hashed before storage
Existing keys are preserved to maintain continuity
Group validation ensures keys have appropriate permission levels
Use Cases
Automated deployment and configuration
Infrastructure as code
Consistent API key setup across environments
DevOps automation
Testing
Unit tests cover key creation, validation, and error cases
Tests for configuration parsing and application
Validation of group permissions
Error handling for invalid configurations
This enhancement is part of Metabase Enterprise's advanced configuration capabilities, providing more flexibility in managing API access through configuration files.
2025-03-14 15:35:09 -03:00
Alexander Polyankin
241dc386b1 DistinctIf in the expression editor (#55129) 2025-03-14 18:22:43 +00:00
Aleksandr Lesnenko
95e0a447a7 fix empty tooltip on the help menu item (#55198) 2025-03-14 18:21:08 +00:00
Anton Kulyk
47d4ebb437 Fix drill through for "empty" pie chart slices (#55188)
* Add repro test

* Use null instead of "empty" label in click object
2025-03-14 18:06:22 +00:00
William
99e8f5ff70 Add distinct-where function to mbql (#55131)
Add distinct-where custom expression function
2025-03-14 16:57:09 +00:00
Oleksandr Yakushev
ed5a723b0a [mongodb] Optimize post-processing of Mongo queries (#54881) 2025-03-14 18:44:00 +02:00
Jeff Bruemmer
6320ee4fe2 docs - remove auth flows (#55185)
* remove auth flows

* add description
2025-03-14 12:25:12 -04:00
Noah Moss
3da9eadd09 Use timezoned timestamp for export filenames (#54872)
* Use timezoned timestamp for export filenames

* clean ns

* tweak docstring

* add unit test + make namespace aliases consistent

* use new function in xlsx exports
2025-03-14 16:18:29 +00:00
github-automation-metabase
3a404dcc3b Bump org.clojure/tools.reader from 1.5.0 to 1.5.1 (#54885)
Inspect dependency changes here: https://github.com/clojure/tools.reader/blob/v1.5.1/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-14 16:15:25 +00:00
github-automation-metabase
b7f887c6c0 Bump com.github.seancorfield/honeysql from 2.6.1270 to 2.6.1281 (#54882)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.6.1281/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2025-03-14 16:10:30 +00:00
Edward Paget
710e5da548 feat: add sdk embedding to snowplow features (#54988)
* feat: add sdk embedding to snowplow features

* fixup! remove extra ?
2025-03-14 10:46:20 -05:00
Nick Fitzpatrick
cde799a53a hide empty tooltips with empty hints in PermissionsSelectOption (#55145) 2025-03-14 12:22:34 -03:00
Oisin Coveney
106ee4f4ef Ensure that ad-hoc questions show visualization (#55156) 2025-03-14 15:22:18 +00:00
Nicolò Pretto
77e231de6c fix(sdk): don't set the color scheme on the host app (#54918) 2025-03-14 16:02:02 +01:00
Nathan Voxland
f94deea7a8 Don't allow a migrate down if you are running an old version of metabase (#54984) 2025-03-14 09:48:52 -05:00
Edward Paget
b7648138de feat: add malli schema, test converage to ldap api (#55130)
* feat: add malli schema, test converage to ldap api

Restores the malli schema that was causing e2e tests to fail on the
first attempt and updates those e2e tests to look for the new error
message returned when the api request is rejected due to schema
validation issues.

Expand test cases around ldap connection testing errors so those
messages can be caught on future api changes.

* fixup! error capitalization
2025-03-14 09:23:16 -05:00
Oisin Coveney
2ec9773d05 Use InteractiveQuestion to create StaticQuestion (#54700) 2025-03-14 14:05:57 +00:00
Romeo Van Snick
b1063dd9f3 Custom expression repros (#55107)
* Add reproduction for #54638

* Add reproduction for #54722

* Add reproduction for #31964

* Correct user of metabase issue in test name

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Correct use of issue name in test title

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Use addCustomColumn helper

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Use helpers to open filter and summarize popovers

* Check for textbox role instead on cm-content class

* Just use enter

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-03-14 14:28:17 +01:00
Braden Shepherdson
e91e344bd4 [refs] Put :idents on column lists returned by MBQL lib (#54777)
I enforced this by checking the return values of `visible-columns` and
`returned-columns`. I want to check that in (for dev and test only) but
it fails tests currently.

The trouble is that cards don't have `:ident` in their `result_metadata`.
That's coming later, so the enforcement flag is disabled for now.
2025-03-14 12:27:27 +00:00
Chris Truter
47bae0413d Remove pin on kixi-stats (#55152) 2025-03-14 10:00:11 +00:00
Oisin Coveney
fb1bf78398 Add template strings (#55150) 2025-03-14 09:27:24 +00:00
github-automation-metabase
20e3f6c3bb Bump potemkin/potemkin from 0.4.7 to 0.4.8 (#54887)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
2025-03-14 08:56:18 +00:00
Oisin Coveney
129cd93aa6 feat(sdk): Add DownloadWidget and DownloadWidgetDropdown (#54546) 2025-03-14 08:25:45 +00:00
Kamil Mielnik
dbd6176658 Fix styling (#55101) 2025-03-14 14:22:41 +07:00
Nick Fitzpatrick
08884decff Adm 464 disabled input text color (#55054)
* formula

* adding text-disabled color for input
2025-03-14 02:51:26 -03:00
Luis Paolini
bcf8d922cf Add doc for alternate hostname (#55139)
docs for https://github.com/metabase/metabase/pull/51948
2025-03-13 20:52:23 -04:00
Aleksandr Lesnenko
59c9fd5006 fix model reproductions and filters flakes (#54950)
* fix model reproductions flake

* try a different approach
2025-03-13 19:18:57 -04:00
Edward Paget
b0618df0be fix: more efficient query for execution stats (#55126) 2025-03-13 21:39:45 +00:00
Raphael Krut-Landau
63f7907c2d Simplify Schedule component and improve Schedule story (#54727) 2025-03-13 15:15:52 -04:00
Sloan Sparger
89c0e17f85 [CI] Fix e2e admin database page flakes (#55099) 2025-03-13 12:57:47 -05:00
bryan
7ceebc1df7 mage update (#55108) 2025-03-13 17:09:55 +00:00
Uladzimir Havenchyk
38edfe5102 refactor: convert ParameterFieldWidget to ts (#54916) 2025-03-13 20:01:06 +03:00
Jeff Bruemmer
30cccd3811 docs - note on self-hosted upgrades (#55096) 2025-03-13 12:19:33 -04:00
Uladzimir Havenchyk
dba810264c fix: update filter widget value when we reset value to the default one (#54915)
* rework filters reset tests to work with real data

* fix test

* fix stupid issue

* rename methods

* rework fix and fix the test
2025-03-13 19:09:30 +03:00
Alex Yarosh
e75a354792 Update mysql.md (#55095) 2025-03-13 10:33:29 -04:00
metamben
5000cfec10 Use source column type in drills (#54871)
* Resolve day bucketed columns and do the resolution without bucketing
2025-03-13 14:08:46 +00:00
Timofey Kachalov
7bc0c091b9 test(sdk): Perform type-checking of Embedding SDK CLI snippets (#54972) 2025-03-13 18:07:27 +04:00
Oisin Coveney
1f760489a4 feat(sdk): Ensure that all dashboards use entity ID the same way (#55010) 2025-03-13 15:55:43 +02:00
Romeo Van Snick
220038a90c Bump axios for dependabot alert #188 (#55074) 2025-03-13 14:41:04 +01:00
Oisin Coveney
77456687f0 Remove all mentions of saveToCollection (#54983) 2025-03-13 13:45:45 +02:00
Oisin Coveney
0494356eb9 Add stable IDs for SaveQuestion / InteractiveQuestion (#55024) 2025-03-13 13:45:27 +02:00
Oisin Coveney
65cd90a5b6 feat(sdk): Add entity IDs to CollectionBrowser (#54985) 2025-03-13 13:27:20 +02:00
Phoomparin Mano
7a3dceb4e2 Fix React console errors on unrecognized props in styled components (#55081)
* do not forward unrecognized props

* make shouldForwardProps more explicit
2025-03-13 18:02:53 +07:00
Oisin Coveney
fa41120629 feat(sdk): Add stable ID support where missing (#54975) 2025-03-13 09:47:11 +00:00
Oisin Coveney
bd72a75db8 refactor(sdk): Add targetCollection and deprecate saveToCollection (#54971) 2025-03-13 11:43:47 +02:00
Dan Stone
b998d1e9ff Truncate slack header titles and links if the exceed block limits (#54956)
* Truncate mrkdwn links

They could exceed block limits

* Truncate header block text

* Remove incorrect (testing) block in escaping test

* Make length consts under test public

* Add link truncation test

* Add header truncation tests
2025-03-13 09:33:09 +00:00
Romeo Van Snick
bc2a2ebf22 Custom expression multiline UI (#54084)
* Use lezer parser for custom expressions (#53540)

* Add @lezer/generator

* Add missing value on Token

* Add script to generate lezer grammar parser

* Add @lezer/lr

* Add more tests to tokenizer

* Add lezer grammar for custom expressions

* Generate lezer parser for custom expressions

* Convert TOKEN and OPERATOR to enums

* Make Token type more specific

* Add isReference to identifier token

* Typo

* Add more tests for tokenizer

* Add tokenize alternative that uses lezer grammar

* Remove old tokenizer

* Update location of grammer in generate rule

* Add test cases for tokens that share a prefix

* Merge tokens when necessary

* Only add character error when text is 1 character long

* Reduce the need to manually merge nodes

* Stop the iteration when node is found

* Update tests to be more specific

* Simplify tokenize

* Uncommit edge cases

* Generate parser as js

* Move previous tokenizer tests into expressions folder

* Add typing to unit test

* Allow escaping [] in reference

* Add test for escaping closing bracket

* Handle invalid parses manually

* Add support for signed expressions

* Document parser more

* Add custom tokenizer for Reference

* Make tests more explicit

* Fix e2e test

* Merge old test suite into tokenizer test suite

* Move @lezer/generator to devDependencies

* Custom expression suggestions (#53679)

* Add new suggesters for custom expressions

* Add test for joined fields

* Move complete into separate folder

* Split up completions into separate files

* Split up completion tests too

* Copy more tests from legacy completer

* Fix types

* Lezer highlight for custom expressions (#53651)

* Rename generated parser to lezer

* Add lezer highlighting rules to parser

* Add HighlightExpression component

* Use HighlightExpression in expression HelpText

* Add type annotation to highlighter

* Add test for highlight

* Simplify unit test

* Move syntax highlighting to shared module

* Rename util.tsx to util.ts

* Add monospace font variable

* Use monospace font from theme for syntax block

* Use relative font size in HighlightExpression

* Use mantine var for border-radius

* Add test id to example

* Fix tests that rely on example content

* Move highlighting code to metabase/ui/syntax

* Replace ACE with codemirror in custom expression editor (#53746)

* Rename generated parser to lezer

* Add lezer highlighting rules to parser

* Add HighlightExpression component

* Use HighlightExpression in expression HelpText

* Add type annotation to highlighter

* Add test for highlight

* Simplify unit test

* Move syntax highlighting to shared module

* Rename util.tsx to util.ts

* Add monospace font variable

* Use monospace font from theme for syntax block

* Use relative font size in HighlightExpression

* Use mantine var for border-radius

* Add test id to example

* Fix tests that rely on example content

* Move highlighting code to metabase/ui/syntax

* Replace custom expression editor with CodeMirror editor

* Add test mock for CodeMirror

* Colocate custom expression tests (#53812)

* Remove unused DISPLAY_QUOTES

* Colocate custom expressions diagnostic tests

* Colocate custom expressions process tests

* Colocate custom expressions recursive-parser tests

* Colocate custom expressions typeinferencer tests

* Colocate custom expressions completer tests

* Colocate custom expressions format tests

* Colocate custom expressions resolver tests

* Colocate custom expressions index tests

* Colocate custom expressions pratt compiler tests

* Colocate fuzz tests with custom expressions code

* Update paths for fuzz tests

* Fix types in fuzz test

* Fix types in process test

* Remove unused var

* Remove unused var in generator

* Merge types for custom expressions (#53902)

* Add missing expression types to metabase-types

* Add more explicit types to matchers

* Use Expression type from metabase-types everywhere instead of custom type

* Move matchers to separate file

* Further use Expression types for matchers

* Add types for Metric and Segment matchers

* Fix types in format

* Fix missing types

* Clean up imports

* Split string helpers into separate submodule

* Split identifier helpers into separate submodule

* Avoid importing from index file in expressions module

* Render suggestions and help text in new custom tooltip (#53760)

* Add new help text component for custom expression editor

* Add new suggestions listbox for custom expression editor

* Add helper to find help text by function name

* Add enclosingFunction helper that is more forgiving to broken syntax

* Add new tooltip component for custom expression editor

* Add extension to render custom react tooltips

* Render suggestions in custom tooltip

* Export custom types

* Remove old expression editor popover components

* Add typings to process

* Add missing shortcuts

* Fix example font size

* Fix type imports

* Fix click on helptext

* Stop click propagation

* Fix process types

* Remove superflouous optional chain

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Fix types whith optional expressionIndex

* Use imports instead of React namespace

* Use index for key

* Rename util to utils

* Remove unused box shadow

* Remove brackets around placeholder names

* Resize tooltip to avoid it overflowing the window

* Fix line height for args

* Fix missing key icons

* Fix chevron alignment

* Fix types

* Move Listbox resizing classes to Tooltip

* Fix completion template for functions with no arguments

* Add unit tests for enclosingFunction

* Add darker background to expression example

* Remove bold from function call

* Fix imports

* Fix HelpText tests

* Add custom color for highlighted syntax argument

* Use colors from design system

* Fix blurring when switching to a different tab

* Remove trailing comma

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Split up effect

* Remove background from template arguments

* Improve tooltip position

* Fix Popover position when selection changes

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Fix custom expression editor e2e tests (#53761)

* Fix e2e tests for custom expressions

* Fix unit test

* Fix e2e tests

* Fix types

* Fix moveToStart and moveToEnd by using Home/End

* Add test for popover position

* Remove JSDoc in favor of inline comments

* Add examples of side effects

* Remove shouldContain helper in favour of value()

* Add comment to wait

* Use CustomExpressionEditor helper instead of @formula

* Add wait to reduce flakiness

* Add back in the useful comment about popover position

* Remove superflouous cy.viewport call

* Add helper to accept completion

* Rename helper to verifyHelptextPosition

* Convert comments to cy.logs

* Make sure we don't avoid testing the regression

* Allow customising key with which to accept completion

* Use acceptCompletion helper

* Fix tooltip position bug

* Remove unnused wait

* Add selectCompletion helper

* Fix helper using H

* Add better emulation of copy/paste in reproduction

* Ignore ts error

* Multiline formatter for the custom expression editor (#53973)

* Make type name meaningful

* Add more tests for not isnull, etc

* Remove unreachable code

* Add isEmpty matcher

* Pass query to format tests

* Add stronger types to formatStringLiteral

* Fix CallOptions import

* Implement multiline formatter as a prettier plugin

* Reimplement legacy formatter as new formatter with infinite print width

* Use the new formatter in the expression editor

* Remove legacy expression format files

* Document utils

* Simplify Expression type further

* Fully type test cases

* Remove cast in test

* Add more tests and fix formatting

* Use recurse helper to recurse into path children

* Prefix logical operators

* Improve formatting of logical connectors

* Wait for expression editor to be ready

* Avoid passing unknown html props

* Use selectCompletion helper

* Remove unused @ts-expect-error

* Align UI more to design

* Remove shortcuts in suggestions popover

* Disable popular functions in completions

* Render shortcuts as separate component

* Move NameInput to separate component

* Fix button location when no name input is present

* Remove unused ExpressionWidgetInfo component

* Avoid flicker of shortcut buttons

* Tweak name input padding

* Deduplicate styleTags in Editor

* Do not format on blur and pass through all valid changes

* Split of diagnose and compile step

* Remove unused props

* Do not trigger completion on focus

* Show update button when no name is passed

* Expose expression types

* Use diagnoseAndCompileExpression in lint extension too

* Add toolbar with format button

* Only show popover when user has interacted with editor

* Throw ResolverError when types mismatch

* Fix missing highligh for boolean

* Render errors

* Disable format button when the expression contains an error

* Remove shortcut and popular function completion

* Move Shortcut type to component that uses it

* Fix blur for CustomExpression helper

* Add format helper

* Fix e2e tests

* Fix format helper

* Fix blur helper

* Use actual ellipsis in placeholder

* Add helper for nameInput

* Remove buttons from tab sequence once hidden

* Do not autofocus shortcuts

* Hide shortcuts when error occurs

* Allow reading multiline value

* Fix e2e tests

* Fix unit tests

* Add more tests for multiline custom expression editor

* Debounce error checking

* Add max height to tooltip

* Fix formatting

* Document changing reproduction

* Test wording

* Disable format button when expression is empty

* Do not try compiling when source is empty

* Cancel changes when source changes

* Autofocus editor

* Use Tooltip to mark button

* Remove default autoFocus on button

* Simplify shortcuts show and hide style

* Move shortcuts styles to parent element

* Fix line number alignment

* Add a gap between Cancel and Done buttons

* Always close helptext when suggestions are being shown

* Add usePreventClosePopover hook

* Prevent closing popover from the custom expression editor

* Add tests for not closing on click outside and escape

* Move toolbar down

* Fix e2e tests

* Add format_code icon

* Use correct icon for formatting code

* Use new format code icon in native editor too

* Update Loki Snapshots

* Merge useEffect cases into one

* Allow clicking the shortcuts

* Debounce validation

* Fix React update loop

* Prevent flicker in the listbox completions

* Tweak the linting delay

* Hide shortcuts when there is an error

* Only prevent closing popover when editor is rendered

* Fix width and height for editor widget

* Fix format button positioning

* Fix button alignment in expression editor

* Allow blurring tooltip by clicking nothing

* Add button role to header

* Show modal when clicking outside of editor

* Allow closing editor when it's empty

* Add tests for clicking outside of expression editor

* Fix missing onClose handler

* Add bigger timeout

* Rename Format to Auto-format

* Hide format button when there is an error or editor is empty

* Fix label names in test

* Fix format button test

* Deduplicate tests for exiting the editor

* Fix test

* Fix repro

* Only prevent closing popover when the source has changed

* Fix e2e test

* Hide lint point

* Fix types

* Fix tooltip helptext layout

* Update loki reference

* Only show format button when the expression was validated

* Scale the expression editor with the screen width

* Move usePreventClosePopover into utils

* Remove CloseModal component

* Remove custom PreventCloseContext from Popover

* Skip tests that deal with the click outside and escape behaviour of the custom expression editor

* Remove canPreventCloseHandlers from ClausePopover

* Add lineWrapping to editor

* Fix loki

* Fix loki screenshots

* Fix e2e test

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-03-13 10:03:48 +01:00
William
a258b878f2 SQL Server doesn't cast when compiling uuid field filters (#54996)
Apparently, a filter like `blah in (cast([uuid] as uuid))` is fine in postgres, but sqlserver doesn't like it very
much.  This gives sql server the syntax it needs.
2025-03-13 08:32:44 +00:00
Jeff Bruemmer
3e84a67233 docs - include sdk videos (#54980)
* include sdk videos

* remove queries
2025-03-12 19:42:45 -04:00
Ryan Laurie
c4b56e2920 Add Settings Hooks (#54935)
* add settings hooks

* less hax

* fix type
2025-03-12 17:05:39 -06:00
Aleksandr Lesnenko
b299b37501 mark tooltip specs flaky (#55060) 2025-03-12 23:05:22 +00:00
Ryan Laurie
28c37766de fix bug in env var url component (#54937) 2025-03-12 17:05:06 -06:00
Uladzimir Havenchyk
4413c19c09 rework filters reset tests to work with real data (#54991)
* rework filters reset tests to work with real data

* fix test

* fix stupid issue

* rename methods
2025-03-12 22:05:45 +00:00
Edward Paget
dec524e3f7 fix: bump saml20 library for assertion sig fix (#55055)
Bumps the version of the saml library in order to pull in the fix for messages without top-level signatures, but with assertion signatures.
2025-03-12 21:19:45 +00:00
bryan
9620f5d384 [github action] Update github PRs with links to linear issues (#54779)
* first crack at linear pr link bot

* try it again

* bump actions versions

* bump

* try again

Added Node.js setup step
Added dependency installation step for node-fetch
Changed the ES module import to a CommonJS require statement
Changed variable name from fetch to nodeFetch for clarity

* extract script

* use the right graphql query

* add debug

* look at the right part of the linear api response

* lets see the issue numbers

* again

* again

* again

* again

* again

* again

* again

* again

* again

* fix formatting

* remove ???'s

* improve logging

* check all magic closing words

* refine checking logic

* test

* some review responses

* again

* make github object a thing

* install octokit

* install octokit again

* install octokit again

* running

* running

* running

* running

* running

* delimit message with spaces

* delimit message with spaces

* delimit message with spaces

* delimit message with spaces

* test

* only try to close metabase/metabase issues

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-03-12 13:33:09 -06:00
bryan
0fc06d0a45 fix if statement ordering (#55046) 2025-03-12 18:39:25 +00:00
bryan
f23dc6cb09 mage stats repl (#54993) 2025-03-12 11:47:19 -06:00
lbrdnk
a70efb20c2 Add describe-fields query logging (#55039) 2025-03-12 18:40:49 +01:00
Stas Gavrylov
af2a0dc1b0 Add typescript-plugin-css-modules to improve autocomplete (#55009)
* Add typescript-plugin-css-modules

* Fix TS errors related to className prop
2025-03-12 19:30:28 +02:00
bryan
645d38ff4e never unhide tables w/ cruft settings (#54998)
* never update hidden table visibility_types

* apply the same logic to table recreation

* testing: cruftyness doesnt unhide tables in syncs
2025-03-12 11:25:36 -06:00
Ngoc Khuat
43149ed615 Prevent concurrent init notification and send pulse trigger tasks (#55000) 2025-03-12 15:53:25 +00:00
Alexander Polyankin
809647806d Add E2E tests for bigint values in query results (#54929) 2025-03-12 11:42:16 -04:00
Alexander Solovyov
376b9530a9 CD for internal-tools (#55029) 2025-03-12 14:58:13 +00:00
Edward Paget
8ef101c649 fix: default saml to use http-post binding (#55017)
* fix: default saml to use http-post binding

* fixup! use library release
2025-03-12 14:47:32 +00:00
Aleksandr Lesnenko
f99da3d0f6 make tooltip scrollable (#53730)
* make tooltip scrollable

* specs
2025-03-12 14:42:21 +00:00
Oisin Coveney
70daac31ba Change name of files from Result -> DefaultView (#55014) 2025-03-12 14:40:44 +00:00
Oisin Coveney
6586b589c8 fix(sdk): Popovers not working on Safari (#55012) 2025-03-12 14:20:52 +00:00
Uladzimir Havenchyk
1948044e1d upgrade rspack and swc. includes memory fix (#54970) 2025-03-12 14:13:32 +00:00
Oisin Coveney
4f090e349d Convert cardId to questionId for consistency (#55013) 2025-03-12 14:11:09 +00:00
github-automation-metabase
dd8cff3854 Bump org.jsoup/jsoup from 1.18.3 to 1.19.1 (#54886)
Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.19.1/CHANGES.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-12 13:26:51 +00:00
github-automation-metabase
097f4858a5 Bump com.github.seancorfield/next.jdbc from 1.3.994 to 1.3.1002 (#54883)
Inspect dependency changes here: https://github.com/seancorfield/next-jdbc/blob/v1.3.1002/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-12 15:09:48 +02:00
Filip Hric
9b0866e41b tag tests as flaky (#54957) 2025-03-12 12:45:40 +00:00
Phoomparin Mano
1e590475c9 feat(sdk): experimental react 19 version range support (#54904)
* support react 19 version range in embedding sdk

* sync supported react versions

* add oxford comma

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* revert docs and cli updates as we want to do a silent release

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-03-12 15:15:24 +07:00
Ngoc Khuat
90e3218d66 [Notification] Deadline-based priority queue (#54647) 2025-03-12 02:36:16 +00:00
Fraser
e33e273491 Replace BulkDeleteConfirmModal with ConfirmModal (#54997) 2025-03-12 14:07:07 +13:00
Alexander Polyankin
2781834c49 Remove empty section title from AccordionList (#54860) 2025-03-11 19:51:12 +00:00
Ryan Laurie
0cf6f48ffe Remove legacy setup checklist (#54599)
* remove legacy setup checklist
2025-03-11 13:22:47 -06:00
Konstantin Darutkin
27ffe25aae feat: add data-grid-customization (#54752) 2025-03-11 18:22:11 +00:00
Ryan Laurie
59c81f57e9 Add use-toast hook (#54819)
* add use-toast-hook

* use the new toast hook

# Conflicts:
#	frontend/src/metabase/admin/performance/components/ModelPersistenceConfiguration.tsx

* bonus change slipped in

* use those callbacks
2025-03-11 11:54:20 -06:00
Sloan Sparger
47cb73d999 [DB Routing] Reorganize database page (#54627)
* add new database header, make layout adjustments

* start building connection section

* reorganize connection info section content, migrate danger info section

* reorg

* flow rewired together mostly, connection details form is now in a modal

* make section content components the entire section for better hide/show logic, remove old code comments, show proper engine name in edit db header, hide model actions section if no actions can be taken

* lots of polishing

* fix BE punctuation

* test e2e fixes in ci

* more test fixes

* more test fixes

* fix unit tests

* fix last failing unit test

* fix last e2e test?

* final polish pass from self review

* fix model persistence section and its related tests, reorganize the tests

* fix model persistence section and its related tests, reorganize the tests

* impl feedback from arakaki around creation flow and date format

* clean up last commit

* make modal scroll container limited to the body, remove use of force to find inputs in cypress tests

* impl PR feedback
2025-03-11 12:44:13 -05:00
Timofey Kachalov
dcce112be0 Use a proper sample app release branch (#54857) 2025-03-11 21:18:04 +04:00
Edward Paget
f067c2844a fix: question stats are calculated in sql query (#54932)
* fix: question stats are calculated in sql query

Previously instances could OOM when calculating these question stats if
they had too many cards because we load all these cards into memory.

We were doing this full calculation because we have some data we want to
calculate metrics over stored as json in a text column. This uses native
mysql/mariadb and postgresql json fuctions to calculate those metrics
inside the database prevent us from needing to load everything. That
also means we no longer calculate these json-based metrics for metabase
instances running h2.

* fixup! use older path_exists json function
2025-03-11 11:21:53 -05:00
Stas Gavrylov
e9edc39a9e Make postcss-modules eslint plugin conditional to fix VS Code (#54978) 2025-03-11 16:04:06 +00:00
Nemanja Glumac
489be7cbcd Empty states for the native editor (#54438)
* Add a native editor placeholder text

Resolves CLO-3674

* Keep the "data reference" panel open by default

Resolves CLO-3675

[ci skip]

* Add empty state for snippet sidebar

Resolves CLO-3684

* Empty state for query results panel

Resolves CLO-3676

* More refined way to initialize data reference

* Update copy in e2e tests

* Fix more tests

* Open data reference whenever native editor is open

* Do not alter the initializeQB flow

* Close the data reference sidebar when question settings are open

* Fix a failing Mongo test

* Address review comment
2025-03-11 16:06:54 +01:00
Ryan Laurie
842c421454 fix release notes generation (#54977) 2025-03-11 08:38:55 -06:00
Jeff Bruemmer
eb884a97cd docs - poeditor -> crowdin (#54973)
* crowdin link

* more links

* links
2025-03-11 13:56:24 +00:00
Oisin Coveney
0fbbf95479 Change end to flex-end to remove rspack warnings (#54899) 2025-03-11 12:13:29 +00:00
Nicolò Pretto
1436293fe4 make sdk not error on type error (#54964) 2025-03-11 12:31:07 +01:00
Ngoc Khuat
17bc5eaf31 when an alert failed to execute, make sure task history's status is failed (#54949) 2025-03-11 11:03:33 +00:00
Sébastien
37ec722486 avoid ref on fn component error in console (#54959) 2025-03-11 10:00:44 +00:00
Phoomparin Mano
576567b379 fix(sdk): remove react-router console error in LegendLabel when in React 19 (#54926) 2025-03-11 06:51:50 +00:00
Mahatthana (Kelvin) Nomsawadi
59d5f32f10 fix(sdk): Improve _.compose type + fix SDK type (#54850)
* Improve _.compose type + fix SDK types

* Use a simpler type overloading

* Fix Englishz

* Fix type errors

* Add a comment to clarify extrat type overload

* Clarify the source of code
2025-03-11 06:03:42 +00:00
Ngoc Khuat
590ddeba8f [Notification] fix exception during init notification triggers and skip inactive notifications (#54879)
* make sure init notification skips inactive notifications

* probably going to fix the exception stuff
2025-03-11 13:43:02 +09:00
Fraser
928c6db5c6 Refactor model caching widget to tsx and switch to css modules (#54572)
* Refactor model caching widget to tsx and switch to css modules

* Update cron example to valid one

* Translate or in cron tooltip
2025-03-11 12:48:32 +13:00
Ryan Laurie
001d9b6a5f update some e2e spec timings (#54877) 2025-03-10 16:31:21 -06:00
bryan
bc1a66fcf3 don't try to destructure the setting when missing (#54942)
* don't try to destructure the setting when missing

* also on gsheets status
2025-03-10 22:27:31 +00:00
Riley Thompson
c8a767ece6 Abandon fingerprinting if connecting to DB fails (#54697) 2025-03-10 21:55:01 +00:00
bryan
3d677c736c add deps required by defenterprise{,-schema} (#54875) 2025-03-10 17:15:20 -04:00
bryan
1158d45637 update gsheets setting visibility (#54930) 2025-03-10 20:07:13 +00:00
Nick Fitzpatrick
de4ca7278c Legacy permission and cloud migration modals (#54922) 2025-03-10 16:59:15 -03:00
Eric Normand
2ba1dc95a1 Increase stage limit to 1000 and clarify error message. (#54917) 2025-03-10 14:07:00 -05:00
Alexander Polyankin
311044f5b4 Repro for "Multiple bucketing menus can be opened simultaneously" (#54859) 2025-03-10 14:15:33 -04:00
Alexander Polyankin
0113bac8c7 Fix leaving native query editor with parameters (#54863) 2025-03-10 14:15:18 -04:00
Phoomparin Mano
b178fee0c4 fix(sdk): mark react-dom/client as external to fix warnings in React 19 (#54919) 2025-03-11 00:52:28 +07:00
Phoomparin Mano
44107fdb93 Make pivot tables draggable compatible with React 19 (#54914)
* prevent react-draggable usage in pivot tables

* simplify refs
2025-03-10 23:57:40 +07:00
Alexander Polyankin
c27c08c753 Sortable cleanup (#54865) 2025-03-10 16:14:38 +00:00
Kamil Mielnik
788994f16d Fix - SQL view is opened when creating a question on small screens (#54267)
* Add reproduction for #54124

* Allow closing of sidebar

* Initial fix for #54124

* Add a hook

* Fix translations

* Extract hook

* Revert "Allow closing of sidebar"

This reverts commit 6caa95823e.

* Revert "Add reproduction for #54124"

This reverts commit 781e9af5f3.

* Implement new spec

* Drop redundant ref

* Beautify

* Revert "Fix translations"

This reverts commit 7b8ad142f9.

* Add extra assertion

* Repro #54124

* Refactor

* Merge effects

* Simplify useNotebookScreenSize's return value

* Fix check

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-03-10 14:59:07 +00:00
bryan
b117dc258a Google Sheets Integration - Feature Branch (#51436)
* add fall-through for ignored embedding requests

* Gsheets mb api (#51307)

* send flag to show "connect gsheets" button to FE

* clean up docstring + add etl-connections condition

* metabase api WIP

* align APIs

* include site-url in the HM temp-url api call

* cleanup

* update HM<->MB api to be working (minus temp-url)

* cleanup

* remove some notes

* indentation + linting

* add tests

* fix typo

* remove illustrative (when true ...)

* add frontend for gsheets sync

* update frontend to use changed API

* Gsheets integration: more api alignment (#51492)

* add frontend for gsheets sync

* update frontend to use changed API

* wip

* cleanup

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>

* fix: declare gsheet setting fn before using in getter

* fix: delay u.secret instantiation to prevent build race condition

See https://metaboat.slack.com/archives/CKZEMT1MJ/p1734605793293989

* build: push ee-extra to dev repo, not ee

Cloud wants ee-extra, not just ee

* move settings out of auth middleware ns

- update kondo modules
- add metabase.api.auth ns

* More cleaning up

- update docstring
- remove declares + use {set,get}-value-of-type{!,}
- remove nil state from gsheets setting

* rely on more hm stubs

* save folder_owner to gsheets

* gsheets and hm http client => enterprise

+ move tests too

* require the right namespace

* add migration for is_gsheet to metabase_table

* Gsheets service account be flow (#51997)

* update setup flow to use service-account

* align GET api/ee/gsheets/service-account response

* align the HM service account endpoint

* fix migration yaml

* update test for service accounts

* indentation + migration quibble

* improve error messages + kondo housekeeping

* remove unreachable if-let branch + fix serdes test

* add is_gsheet to mock and test data

* add gsheets setting to serialization test

* fix fe-type-check

* typechecker

* [kondo] defendpoint -> defendpoint2

* Gsheets table management (#52145)

* include dwh ∈ GET /api/ee/upload-management/tables

* cljfmt

* simplify preliminary gsheet definition

* archive cards is a query param

* gsheets: update polling logic + better errors (#52162)

* update polling logic + better errors

* codify protocol for polling folder done-ness

* align on FE polling logic + the real sync complete

* [WIP] testing happy path

* status should be "active"

- remove a bunch of extra debugging

* remove outdated tests + cljfmt

* check admin + use the connection's id w/ delete

- cleanup

* fix :delete /folder + schema on :get /folder

* Gsheets frontend (#51946)

* non-oauth UI

* update api and add disconnect modal

* update illustration and add error displays

* add gsheets sync status

* better copy

* remove test code'

* fix bad api error

* updates to sync status

* Update sidebar entrypoint

* gate things behind the right features

- only show gsheets button
- http requests to /api/ee/gsheets/*

* model/Table has a db_id column not database_id

* add and use simple events

* differentiate failure modes

* + tests and error status codes

* make form submit on enter

* reset gsheet status when there is no gdrive conn

* add debug info

* FIXME FOR TESTING - disable feature checks

* fail on sync error + partially allow deletes

* add database page entrypoint

* FIXME FOR TESTING - set token-status-cache-ttl to 1 second (vs 12 hrs)

* only show _active_ dwh tables

* fix config.edn (howd it break tho?)

* handle multiple gdrive connections

- on delete, delete them all
- when looking at syncing, look at the most recent one

* add auto-cruft-tables to metabase_database.setting

- Here's the contract:

There should be an array of strings located at: db > settings >
"auto-cruft-tables". Each string will get fed into re-pattern. The table
names get lowercased before getting matched on. That list of regexes is
combined with our built in list of crufty regex patterns. We use re-find
to match them against the lower-cased table names. If there's a match we
will mark the table crufty (this is called a "Hidden Table" in the UI).
This way, if someone names their sheet `I'mUnique____dlt_loads` or
whatever they can at least fish it out of the hidden section.

Note: It will get set back to being crufty (aka what the ui calls
hidden) on the next sync... but this is configurable so we can fine-tune
the regexes to match the tables we want to hide more closely.

Examples:

If you put ["a"] in the config.yml: any table with A or a in it will be
marked hidden. So be sure to use anchors for the suffix or what-not. For
our thing, I think we want something like:

* add bunch of tests for auto-cruft

* mocked api tests

* add commment + mock hm responses

* documentation

* when multiple gdrive conns, sort by status, then created-at time

* cleanup

* joda time Instant/ofEpochSecond 0 -> t/instant 0

* if no gdrive conns are found, reset state

- add gdrive sorting tests

* indentation

* fix complete sync state and add error state

* update sync unit tests

* update sync unit tests

* add frontend analytics events

* don't show reconnect copy from DB page

* Add 10 minute timeout for polling connection

- return errors as json-encoded :error in the response body
- minor cleanup how we auto cruft tables (no change to behavior)
- add script for running the flow locally: from the repl

* better FE sync state and form validation

* refresh setting on error

* remove fake error state

* Delete connections on reset

- Change order of timeout checks in :get /folder handler
- add auto-cruft-columns setting

* update gsheets routes to use the new ns-handler

* loosen up gdrive link validation

* update regex

* add docstring to dynamic timeout var

* simplify api use via gdrive conn id

- move ->config into hm.client ns

* recover from suddenly-missing gdrive conn @ id

* cleanup hm.client

- indentation

fix [[make-request]] args

* fail to load invalid + present cruft patterns

* remove some extra comments + use hm-delete-conn

* fix update-table-metadata

- (no longer update nil -> nil)

* auto cruft columns

- pull the regex comparrison code into crufty ns
  - reuse it on 2
- add defsetting so having the setting on the database doesn't complain
- pass database down into field syncing + grab vis types

* indent

* fix a few tests

* fix gsheets tests

* add harbormaster client test

* kondo + cljfmt

* migrate to underscores for auto_cruft_*

- add tests for field + fix schema for table syncs

* use kebab-case for settings but accept snake_cased

* cljfmt + kebab case stragglers

* fix update-field-metadata-if-needed! signature

* fixing tests

* rename macro double -> run-twice

* remove test code

* prettier

* cruft settings are db-local

* Fix search index update job restart issue (#53229)

* more idiomatic crufty db-local settings

* add auto cruft fields test

* bump gsheets sync timeout to 10 seconds

* handle going back to loading state

* kondo + add empty cruft tables test

* add get folder timeout test, update dox,

- remove regex folder check

* add cruft columns config.yml setup tests

* remove def + actually run the test

* test code for bruyan

* reset gsheets status on every error response

* save dbId and actually show it

* bust cache on gsheets setting

* solve initial-sync-status-table-only-test failure

* Update src/metabase/sync/sync_metadata/crufty.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* Update enterprise/backend/src/metabase_enterprise/advanced_config/file/databases.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* Update enterprise/backend/src/metabase_enterprise/advanced_config/file/databases.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* Update enterprise/backend/src/metabase_enterprise/gsheets.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* respond to Noah's review comments

* kondo

* update modal copy

* update error copy

* status click target update

* improve crufty/name? api

* modularize gsheets

* remove temp gsheets

- token status checks happen once per 12h
- remove hm/conn and mb/sync-info from :get /folder response

* gdrive-conn is now unused

* remove comment

* fix modules

* add docstring

* add harbormaster module

* kondo

* fix the tests

* module linter

* fix typo

* cljfmt

* setup api-key setting before reading it

* sort ns

* ::snowplow/simple_event -> :snowplow/simple_event

* hard code error message

* remove test code

* update frontend tests

* update module linter config

* add simple schema snowplow event schema

* fix schema name

* update some tests

* add a test

* better docstring

* better docstrings

* fix e2e tests

* fix fe token mock

* respond to review comments

+ fix timeout 50000 -> 5000
+ make internal regex function private

* build: push ee-extra to dev repo, not ee

Cloud wants ee-extra, not just ee

* fix strings

* remove resolved comment

* adds prometheus metrics to gsheets api

- :metabase-gsheets/sync-creation-begin
- :metabase-gsheets/sync-creation-ok
- :metabase-gsheets/sync-creation-error
  - failure-reason is one of:
  - "timeout" - gsheets.api/sync-complete? didn't return true after 10 minutes
  - "status_error" - HM said the sync connection had status == error
- :metabase-gsheets/connection-deleted

* Refines prometheus events

They are now:

- :metabase-gsheets/connection-creation-began
- :metabase-gsheets/connection-creation-ok
- :metabase-gsheets/connection-creation-error {:reason "status_error"}
- :metabase-gsheets/connection-creation-error {:reason "timeout"}
- :metabase-gsheets/connection-deleted

* comment

* allow resolution of snake_cased setting names

* review responses

* add logging if any part of the batch-delete fails

* remove unused schema

* Revert "remove unused schema"

This schema is actually used! 🎉

This reverts commit f5dbd78051.

* update loki icon reference image

* switch off flaky test setup

* mark date filter picker tests flaky (#54866)

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Filipe Silva <filipematossilva@gmail.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-03-10 14:41:39 +00:00
Luis Paolini
26b310be01 Fixes https://github.com/metabase/metabase/issues/12987 (#51692) 2025-03-10 14:34:55 +00:00
Alexander Solovyov
3332a7d59e disable backend codeowners (#54831) 2025-03-10 10:57:11 +00:00
Chris Truter
f10b22c2f2 Scrap the ability to resolve table names, just use ids (#54839) 2025-03-10 10:48:34 +00:00
Stas Gavrylov
5ec66916c3 WRK-114, WRK-115: Update Alerts scheduling component (#54788)
* WRK-114,WRK-115: Replace SchedulePicker with Schedule in Alerts.

Integrated a newer feature-rich component for Alerts scheduling.
Fixed bug related to incorrect handling of '*' values in minute and hour
alerts.

* Remove scaling transition from popInFromBottom animation.

This transition used for all modals led to a bug with sizing in some
Mantine components, when they were used inside a modal:
https://github.com/mantinedev/mantine/issues/6967#issuecomment-2417439117
2025-03-10 12:44:57 +02:00
John Swanson
9c6fe31a4c Fix schema-wide data permissions for huge schemas (#54858) 2025-03-10 03:02:51 -07:00
Mahatthana (Kelvin) Nomsawadi
89054f1a73 ci(sdk): Fix mysterious sdk deployment failure on 52 (#54890)
* Reuse Personal Access Token on all tasks

* Fix permission when pushing to GitHub

* Use annotated tag for better information

* Remove steps for faster testing

* Revert "Remove steps for faster testing"

This reverts commit 8bd5d2e07f.
2025-03-10 08:48:10 +00:00
Fraser
262a69e01b Create confirm modal component (#54632)
* Create confirm modal component and use in query builder
2025-03-10 11:30:02 +13:00
Oleksandr Yakushev
19e805d085 test: Reuse source database in load_from_h2 tests (#54165) 2025-03-08 18:18:28 +02:00
Nick Fitzpatrick
1bf46c862f Migrating composed modals to simple modals (#54685)
* Migrating composed modals to simple modals

* fixup
2025-03-08 09:36:45 -04:00
Ryan Laurie
5088ddb83a Refactor SettingHeader (#54823)
* Refactor SettingHeader

* use divs

* index to ts

* index to ts

* fix title

* add boxprops
2025-03-08 00:21:08 +00:00
Nick Fitzpatrick
80e982b224 Fixing select dropdown in append data modal collection view (#54864) 2025-03-07 18:17:56 -04:00
Ryan Laurie
90490efa14 mark date filter picker tests flaky (#54866) 2025-03-07 21:41:37 +00:00
Ryan Laurie
727c8c7ff4 Use PAT for git tagging (#54868)
* use PAT for git tagging

* use token more
2025-03-07 21:01:40 +00:00
Ryan Laurie
fbb5088df3 Allow sending release notes to website (#53418)
* allow sending release notes to website

* use generic version

* cleanup and add tests

* whitespace

* linkify website changelog
2025-03-07 12:29:56 -07:00
Ryan Laurie
f78fa85411 fetch settings using RTK Query (#54687)
* fetch settings using RTK Query

* type fixes

* 💪

* fix type 🤞
2025-03-07 12:13:41 -07:00
bryan
b05fd4f511 adds cljfmt-updated task (#54861) 2025-03-07 18:47:40 +00:00
Filipe Silva
fe66a8f862 fix: download all clj deps before builds (#54852)
Prevents a race condition where both clojure and shadow-cljs would be
downloading deps at the same time.
2025-03-07 18:23:26 +00:00
Aleksandr Lesnenko
e4a6d8a81e feat(sdk): Revamp TableInteractive visualization component: update header styles, add text wrapping, and row indices (#54399)
* use tanstack datagrid for the table visualization implementation
2025-03-07 18:18:19 +00:00
Anton Kulyk
769bd1ee1b Fix "decimals" viz setting ignored when formatting numbers (#53053)
* Respect "decimals" setting when formatting compact numbers

* Update loki screenshots
2025-03-07 17:07:05 +00:00
Alexander Polyankin
da5e954e63 Fix initial focus of the filter modal (#54817) 2025-03-07 11:41:35 -05:00
metamben
5a9d4baa53 Allow single argument between parameters on the backend (#54848)
Backend part of the fix for #54364
2025-03-07 15:52:46 +00:00
Nathan Voxland
4f7b3c27cf Added additional API tests for /public and /api/public (#54756) 2025-03-07 09:21:50 -06:00
Chris Truter
40ba06c779 Expire pending search indexes eventually (#54834) 2025-03-07 16:20:31 +02:00
Dan Stone
1fc41425ff Drop public channel requirement for slack images (#54276)
* Prefer slack_file for images, so metabase no longer requires a public files channel

This removes the requirement to have a public files channel so share
images or other files in slack bot posts. Simplifying the integration
and lessening requirements to get setup.

It enables the posting of images files directly to public or private
channels without sharing - improving privacy and security.

* Files channel deprecation note

* Drop slack-files-channel requirement from slack /settings API

* Remove remaining files-channel calls

* Remove files channel input from SlackSetupForm

* Remove slack-files-channel from SettingsManagerSettings

* Remove slack-files-channel from API docs

* Drop files channel configuration guidance

* Remove slack channel prompt/description

* Instead of polling files.read reuse the complete call

There was an accidental introduction of files.read.

The goal is to preserve the previous behaviour of reusing
completeUploadExternal.

This limits the oauth scope requirements of the bot token.

* If more than 50 slack blocks, send using multiple messages

* Escape mkdwn special-processing chars in card links

* Simplify slack attachment uploading

- Its easy to mapv
- (cond) over nested (if)s
- Fix out of date docstring

* Remove slack-files-channel from config-template.md

* Remove metabase_files check from e2e suite
2025-03-07 14:11:51 +00:00
Phoomparin Mano
2917e8c418 Replace defaultProps in styled and functional components (#54725)
* cleanup defaultProps in BaseItemsTable

* cleanup StrategyFormLauncher and QuestionModerationSection

* cleanup BookmarkToggle and TableSimple

* cleanup additional styled components

* cleanup PermissionsSelect and SmartScalarSettingsWidget

* additional styled default props cleanup

* cleanup defaultProps

* cleanup remaining defaultProps

* cleanup type imports

* cleanup IconContainer

* cleanup NodeRootProps

* remove text.0

* forward ref for BookmarkButton

* cleanup DoneButton

* default to ContentTable instead

* forward ref for legend description icon

* forward ref for more icons

* forward ref for more icons

* forward sortingIcon ref

* forward IconButtonWrapper ref

* merge classes for items table
2025-03-07 20:37:18 +07:00
Chris Truter
e83347e888 Create search index within transaction (#54832)
Not all drivers will actually do DDL statements transactionally, but it doesn't hurt to try.
2025-03-07 12:43:04 +00:00
Chris Truter
55067acdb0 Revert search indexing error workaround in #52072 (#52111)
- Fix flake by disabling index (cop out)
- Make h2 implementation thread-safe
- Small optimization
- Hide some log noise
2025-03-07 12:39:28 +00:00
Jeff Bruemmer
ce06b0b2da update banner (#54800) 2025-03-07 07:34:14 -05:00
Alexander Polyankin
699acf861a Remove unused temporal interval translations (#54826) 2025-03-07 06:41:04 -05:00
Phoomparin Mano
87c2542531 Replace findDOMNode in core components (#54650)
* replace use of findDOMNode in core components

* do not wrap input in div

* always populate scrollElementRef

* remove scrollElement from TokenField

* do not export _TokenField

* remove scrollElementRef

* use appropriate ref container

* cleanup root container

* use the scrollingContainerRef instead

* pass the elementRef directly

* use full-width container

* remove full-width container

* use display contents to preserve layout

* attach listRootRef conditionally

* try to update Loki snapshots

* modify snapshots

* fallback to scrollingContainer instead of elementRef

* revert loki snapshot

* revert loki snapshot to master
2025-03-07 13:54:27 +07:00
Alexander Polyankin
d8ce2f9efe Fix a case when the template tag's type was changed and the original question was an MBQL query (#54804)
* Do not use originalQuestion when changing the template tag's type

* Do not use originalQuestion when changing the template tag's type

* Fix test

* Fix

* Fix

* Fix

* Fix

* Fix
2025-03-06 17:23:32 -05:00
Uladzimir Havenchyk
2bc8821ac4 fix: select dataset editor header column after reordering by the corner (#54692)
* fix: select dataset editor header column after reordering by the corner

* enable fix

* use index

* rename method
2025-03-06 21:43:24 +00:00
Ryan Laurie
4cba32d8bb Enable multi-arch builds in publish workflow (#54473)
* build multi-arch arm image

* refactor artifact fetching and containerizing

* fixes after testing

* use old master for caution's sake

* enable multi-arch in publish workflow

* sync
2025-03-06 14:08:50 -07:00
Nathan Voxland
b93b078706 Hash id in core_session table (#53266) 2025-03-06 15:04:18 -06:00
Nathan Voxland
04693bc9d1 Don't update dashboard updated_by if only last_viewed_at changes (#54613) 2025-03-06 13:18:44 -06:00
Tyler Plude
52baee0550 Fix frontend parsing of allowed iframe hosts (#54111)
* Fix frontend parsing of allowed iframe hosts

* Adding spec for allowed domain list parsing change
2025-03-06 11:17:57 -08:00
bryan
68d6537dd7 update download jar (#54811) 2025-03-06 18:38:38 +00:00
Filipe Silva
4fb7432514 fix: add socket to cloud dev aliases (#54803) 2025-03-06 18:34:28 +00:00
Alexander Polyankin
ef154c5fd2 Make expression editor not crash on missing entities (#54768)
* Make expression editor not crash on missing entities

* Review comments
2025-03-06 18:13:42 +00:00
Case Nelson
78cd2283cd support: More logging for field sync. (#54774)
Part of #54559

This adds `trace` level logging to:
- `metabase.driver.athena`
- `metabase.sync.sync-metadata.fields.sync-instances`

That should help us diagnose sync issues where describe-fields and
fingerprinting seem to be out of sync.
2025-03-06 10:58:32 -07:00
Jeff Bruemmer
a0cab0ce80 docs - note on literals with special characters (#54806)
* note on literals with triple braces

* edit
2025-03-06 17:38:06 +00:00
bryan
45f541521b eid-translation module (#54542) 2025-03-06 09:41:33 -07:00
Alexander Polyankin
2bcf0ca5e8 Fix offset intervals translations (#54772) 2025-03-06 11:40:16 -05:00
Alexander Polyankin
e4c50175c2 Clarify parsing & escaping of filter values (#54771) 2025-03-06 11:28:03 -05:00
Nicolò Pretto
bbd40b5997 fix: CheckboxTooltip should have only 1 child (#54798) 2025-03-06 16:14:17 +01:00
Timofey Kachalov
8cbecd8908 Add Sample Apps compatibility with Embedding SDK tests documentation (#54723) 2025-03-06 18:17:51 +04:00
Phoomparin Mano
e476bee260 Remove findDOMNode from visualization components (#54707)
* remove findDOMNode usage in viz components

* remove type cast

* expose rootElement via ref
2025-03-06 19:59:45 +07:00
Filip Hric
16d69499f0 stabilize flaky test (#54789) 2025-03-06 13:37:43 +01:00
Filipe Silva
037c3eb57c fix: package.json script should use && (#54753)
* fix: package.json script should use &&

Followup from https://github.com/metabase/metabase/pull/54667

* fix: cloud:dev process labels were switched
2025-03-06 12:35:07 +00:00
Eric Normand
44bc8c72f2 Clean template tags when changing databases (#54453)
* Clean template tags when changing databases

* WIP add tests

* Remove println

* Make :dimension optional on :field-filter

* Don't run native queries with incomplete field filters

* Add helpful comment

* Fix cypress tests

* Remove commented code
2025-03-06 12:03:17 +00:00
Eric Normand
6406f7b2bd Fix type logic for datetimeDiff() for days on postgres (#54709)
* Subtracting 2 dates gives a number of days (integer)

* Add test for all postgres time units for datetimeDiff()
2025-03-06 11:52:57 +00:00
Ngoc Khuat
0cd7a19b1b [Notification] Dedup send queue (#54320) 2025-03-06 17:24:55 +07:00
Mahatthana (Kelvin) Nomsawadi
fa7ca671b6 ci(sdk): Send SDK release notification to Slack (#54733)
* Update Slack util

* Standardize job name

* Add slack notification for SDK

* Debug: remove other jobs

* Add failure message

* Add build successful notification

* Connect Slack jobs with real jobs

* Debug: disabled steps

* debug: mock failure

* Re-enable everything

* Update channel name
2025-03-06 06:58:14 +00:00
bryan
e1800cda38 fix examples for mage cljfmt-files (#54773)
* fix examples for mage cljfmt-files

+ test was broken

* fix tests + ./bin/mage by itself is ok
2025-03-05 22:43:40 +00:00
Oleksandr Yakushev
e9195acea6 [db-pool] Try again to address the thread deadlock caused by c3p0 (#52351) 2025-03-05 23:53:55 +02:00
Riley Thompson
fceee59fad Update required driver fields and placeholders (#53693) 2025-03-05 16:36:26 -05:00
Alexander Polyankin
4a766ed1aa Fix temporal unit interval translations (#54686) 2025-03-05 20:21:55 +00:00
Alexander Polyankin
a88224854a Repro test (#54762) 2025-03-05 14:33:27 -05:00
Alexander Polyankin
594584dbb5 Fix large filter pill text wrapping (#54757) 2025-03-05 14:33:14 -05:00
Vamsi Peri
9313a21937 New semantic layer team (#54736)
* New semantic layer team

* Update team.json
2025-03-05 19:06:17 +00:00
Alexander Polyankin
fe707e4c5e Do no singularize or pluralize table and column names in drills (#54659) 2025-03-05 13:38:40 -05:00
Alexander Polyankin
715ee2c568 Support relative-time-interval in the expression editor (#54671) 2025-03-05 13:37:05 -05:00
Luis Paolini
199c50319f Add a nitpick for postgres and impersonation (#54424)
* Add a nitpick for postgres and impersonation

Something that a customer saw, and might be interesting for posterity

* Update docs/permissions/impersonation.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-03-05 18:29:36 +00:00
Luis Paolini
b35f4f0f72 Update running-metabase-on-docker.md (#54571)
* Update running-metabase-on-docker.md

Add a note since people think that this is the official way to run Metabase

* Update running-metabase-on-docker.md

* Update running-metabase-on-docker.md

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-03-05 18:27:19 +00:00
John Swanson
561ccbc397 allow healthchecks for h2 dbs (#54674) 2025-03-05 09:47:56 -08:00
Alexander Polyankin
1316be26cd Fix token unescaping in the expression editor (#54751) 2025-03-05 17:46:58 +00:00
Jeff Bruemmer
05e28ddd34 check for anchors (#54743) 2025-03-05 12:17:46 -05:00
Nathan Voxland
57e157c082 Only include personal emails in admin recipients (#54658) 2025-03-05 10:34:11 -06:00
Nathan Voxland
fd2edb8ba8 Don't allow pulse.updated_at to change when dashboard changes (#54670) 2025-03-05 10:31:52 -06:00
Aleksandr Lesnenko
12e2dd86e2 use new endpoints for tiles in the pin map viz (#54475)
* use new endpoints to load tiles for pin map

* Fix public endpoints for unauthneticated users

* use new BE api for pin maps

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2025-03-05 11:01:20 -05:00
Edward Paget
b35022d96a fix: update saml20 for full SAML SLO support (#54285)
* fix: update saml20 for full SAML SLO support

Update metabase to use a new version of the saml20-clj library that
correctly builds and signs HTTP Redirect requests and provides support
for checking LogoutResponses.

Note right now SAML SLO cannot be enabled just through the API it
requires the following settings to work correctly:

* saml-slo-enable - must be true
* saml-identity-provider-slo-uri - must be set to the IdP's SLO endpoint
* session-cookie-samesite - must be set to none

For the samesite none cookie to work metabase must be served over SSL.
Without this setting Chrome (and other browsers) will not send the
cookie when Okta redirects to our SLO endpoint which means we can't sign
out the user session.

* fixup! kondo lints
2025-03-05 09:41:18 -06:00
Jeff Bruemmer
047053159e docs - images and links (#54734) 2025-03-05 09:35:37 -05:00
Nicolò Pretto
cbf51e6dc3 fix(sdk): wrong icon on visualization selector (#54724) 2025-03-05 15:13:59 +01:00
Jeff Bruemmer
2772090d72 docs - rename SQL snippets to snippets (#54507)
* SQL snippets to snippets

* rename file

* snippet folder
2025-03-05 08:37:03 -05:00
Ngoc Khuat
f68c0e25c0 Return http channels for admins or users with settings permissions only (#53210)
* feat(frontend): allow non admin users to create alerts (#54426)

---------

Co-authored-by: Konstantin Darutkin <spalt08@mail.ru>
2025-03-05 13:05:51 +00:00
Chris Truter
7a4c66d413 Table Data Editing APIs (#54651) 2025-03-05 10:47:39 +00:00
Nicolò Pretto
c1aeb94b8f docs: update some other docs about e2e for the sdk (#54718) 2025-03-05 10:50:04 +01:00
Alexander Polyankin
7f07975d15 Prevent from using millisecond with datetime-diff (#54531)
* Fixes

* Fix

* Fix

* Fix

* Add tests

* Add tests

* Add tests

* Fix description

* Fix description
2025-03-05 12:11:09 +03:00
Stas Gavrylov
6f6909c5aa WRK-81: Subscriptions can include unwired filters which is confusing (#54508)
* WRK-81: Hide unwired filters from subscriptions panel

* WRK-81: Refactor AddEditEmailSidebar to TypeScript.

* WRK-81: Refactor AddEditSlackSidebar to TypeScript

* Hide parameters section if none are connected. Update typings
2025-03-05 10:59:26 +02:00
Mahatthana (Kelvin) Nomsawadi
70cada082b Update stable tag (#54710) 2025-03-05 08:39:58 +00:00
Roman Abdulmanov
5755ee06f6 Disabled feature merged notifications (#54713) 2025-03-05 11:10:04 +03:00
Phoomparin Mano
6a15b7f463 Remove the legacy isModal context from ModalContent (#54660) 2025-03-05 13:44:51 +07:00
Ngoc Khuat
f283daa3f0 Moduralize notification (#54556)
* moduralize notification, tests are passing

* kondo and clj-format

* test fixes

* fix some spacing

* test fixes
2025-03-05 04:14:47 +00:00
bryan
ba3e008d41 Metabase Automation Genius Engine (#54091)
* booting up mage

* indent -> format

* formatter help

* Kondo commands

* Clear cache when running Kondo

* start-db command

* Add aliases in deps.edn

* comments + more

* subsume new commands into bb

* add mage_verbose env var

* add tests

* refine tests + check github action output

* run the tests

* add mage tests to backend workflow instead

* min version + rip out b/ask!

* Fix start-db latest

* actually call it with --help

* add readme entry for bb tasks

* move project-root-dir into util

* add mb download jar + cleanup bb.edn

* cleanup + fix jar downloader

* run tests

* finish removing bask

* add mage and jar downloader

* setup ./bin/mage entrypoint [responding to user research]

* uopdate examples

* update readme

* add todos

* add autotab + deprecate obsolete scripts

* migrate instructions for cljfmt over to mage

* respond to ./bin/mage kondo-updated master

* linting branding, clean up cli for fmt

* fix comment

* more tests

* better explainations of what mage is doing

* remove empty task -new-task!

fix start-db

* handle missing deps-edn-hash

* make start-db work with mysql and maria

* improve ux + simplify option and arg parsing

* add optional :usage-fn to task definitions

* cljfmt-* {-c}, and jar-download working

* last bit of cleanup

* docs

* add examples exit-codes test: ./bin/mage -test-examples

* add deprecation warns to old shell scripts + docs

* remove typo

* better errors

* typos

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-03-04 16:56:11 -07:00
Oisin Coveney
22557bf7b6 Convert rest of RuleEditor to Mantine (#54476) 2025-03-04 22:20:06 +00:00
Alexander Polyankin
96fed1a4c2 Show an error message when overwriting a card with a cycle (#54610)d
* Fix bug

* Fix bug
2025-03-04 16:54:30 -05:00
Oisin Coveney
6e784167ea Convert RulePreview to Mantine (#54472) 2025-03-04 21:24:39 +00:00
Oisin Coveney
0e6d999f8f Convert ColorRange + RuleBackground to Mantine (#54469) 2025-03-04 21:24:23 +00:00
Alexander Polyankin
a9379e2579 Do not display the raw data toggle when displaying table, even with reordered columns (#54668) 2025-03-04 15:21:33 -05:00
Uladzimir Havenchyk
fb645c672d fix: clear dashboard url from undefined when filter is removed (#54600)
* fix: clear url when filter is removed

* add e2e test
2025-03-04 22:36:11 +03:00
Filipe Silva
d768c1e51e build: fixes for cloud dev (#54667)
* fix: :dev-start would not call start!

* build: cloud:dev npm script for when working in cloud
2025-03-04 19:14:12 +00:00
Oisin Coveney
d1aa6ff450 Convert RuleListing to Mantine (#54471) 2025-03-04 10:54:36 -08:00
Oisin Coveney
9eea43baee Convert RuleDescription to Mantine (#54470) 2025-03-04 10:50:23 -08:00
Timofey Kachalov
0ba3bfecb8 Integrate Sample Apps e2e tests with CI (#54579) 2025-03-04 22:07:22 +04:00
Alex Yarosh
f3189fcc43 docs: Update Usage analytics (#54657)
* Update usage-analytics.md

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-03-04 17:49:01 +00:00
Konstantin Darutkin
8d82cbafd6 fix(frontend): update single alert condition style (#54587) 2025-03-04 17:19:20 +00:00
Nicolò Pretto
9da93a751d docs(sdk): update the command to run sdk e2e (#54666) 2025-03-04 18:17:20 +01:00
Nicolò Pretto
b427265c7d fix(sdk): move import of mantine css to index file of sdk (#54602)
* fix(sdk): move import of mantine css to index file of sdk

* put back the css in core app
2025-03-04 18:03:51 +01:00
Phoomparin Mano
d45816434e Bump react-virtualized to 9.22.5 to unblock React 19 (#54645)
* bump react-virtualized to 9.22.6

* bump the types for react-virtualized to latest in DefinitelyTyped

* try using 9.22.5 instead of 9.22.6
2025-03-05 00:01:52 +07:00
Phoomparin Mano
ded9cde3b2 Bump react-grid-layout to 1.4.4 to unblock React 19 (#54644)
* bump react-grid-layout to 1.4.4

* bump the types for react-grid-layout to latest in DefinitelyTyped
2025-03-04 23:44:07 +07:00
Carlos Sánchez Páez
9f8fd15204 54138 Upgrade node to v22 in Dockerfile & docker-compose (#54436)
* 54138 Upgrade node to v22 in Dockerfile & docker-compose

* Update docker-compose.yml

---------

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
2025-03-04 11:30:48 -05:00
Luis Paolini
12db805680 Update activating-the-enterprise-edition.md (#54430)
* Update activating-the-enterprise-edition.md

Added proxy for containers

* Update docs/installation-and-operation/activating-the-enterprise-edition.md

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-03-04 12:34:29 +00:00
Mahatthana (Kelvin) Nomsawadi
f4171427b2 feat(sdk): Simple data picker (#54489)
* Simple data picker UI (#52964)

* Add SimpleDataPicker base component

* Finish the flattened list version of the simple data picker

* Add selected entity state

* Fix the new simple data picker got run with loki accidentally

* Update frontend/src/metabase/embedding-sdk/components/SimpleDataPicker/SimpleDataPicker.tsx

Co-authored-by: Nicolò Pretto <info@npretto.com>

* Fix selected data source icon color

* Add an empty state

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>

* Real simple data picker (#52965)

* Connect data to the data picker

* Sort the entities alphabetically

* Make sure the data picker icon is always table

* Fix unit tests

* Fix interactive embedding E2E tests

* Force table icon on the DataPickerTarget for simple data picker

* Remove commented out code

* Remove tests that don't apply to the new simple data picker

* Fix passing wrong table ID

* Ensure we can only join data from same DB

* Make component name better

* todo

* better simple data picker UX

* Add multi stage embedding data picker back

* Able to force complex data picker in interactive embedding

* Fix tests for simple data picker

* Add old tests back

* Add simple data picker tests back

* Fix unit tests

* Fix SDK tests

* Remove ability to force multi stage data picker

* Add cross-db join tests for simple data picker

* Simplify code

* Fix popover not closing since Mantine prop changes

* Add simple data picker data source ordering tests

* Fix conflicts from merging master

* poc async plugins

* Remove SDK plugins poc code

* Fix unit tests after moving code to EE folder

* Mock search query explicitly

Co-Authored-By: Alexander Polyankin <alexander.polyankin@metabase.com>

* Don't modify cljs objects

Co-Authored-By: Alexander Polyankin <alexander.polyankin@metabase.>

* Reduce the ambiguity around NaN value

Co-Authored-By: Alexander Polyankin <alexander.polyankin@metabase>

* Remove dependency from an unrelated module

Co-Authored-By: Alexander Polyankin <alexander.polyankin@metabase>

* Fix SDK unit tests not running because EE plugins

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase>

* Fix embedding data picker not filtering by selected database (#54272)

* Fix embedding data picker not filtering by selected database

* Add an E2E test

* Fix SavedEntityPicker doesn't filtered out items in a selected DB

* Fix TypeScript types

* Address review, not passing unnecessary props

* Fix failed tests by using the same snippet in the past

* Hide metrics/saved questions from multi-stage data picker (#54409)

* Hide metrics from multi-stage data picker

* Hide saved questions from multi-stage data picker

* Modify saved questions tests

* Modify metrics tests

* Address review: create a new test suite and put tests there

* Adjust the data picker min-height according to review

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase>
2025-03-04 10:05:45 +00:00
Roman Abdulmanov
86338d9a8b removed GH project urls (#54639) 2025-03-04 12:18:05 +03:00
Mahatthana (Kelvin) Nomsawadi
a3647a71c5 refactor: "Get embedding code" width too narrow (#54574)
* A more idiomatic fix

* Add an assertion
2025-03-04 07:41:29 +00:00
Sébastien
0fbe8cf3b1 Closes viz-474: conditional formatting polish (#54483)
* :x

* fixup

* useToggle -> useDisclosure

* deprecate useToggle in favor or useDisclosure
2025-03-04 08:33:21 +01:00
Ngoc Khuat
92ff77263a Robustly initialize notification triggers (#54577) 2025-03-04 04:29:52 +00:00
Raphael Krut-Landau
91f4922e15 Increase e2e test coverage for sandboxing (#53776)
Let's improve coverage of sandboxing in e2e tests.

These tests cover the following kinds of sandboxing policies:
* Filter by regular column
* Filter by custom column
* Use a custom view to filter a table

The tests verify that these sandboxing policies correctly affect:
* Saved questions
* Models
* Questions based on questions
* All of the above, when viewed in a dashboard
* Adhoc questions
* Filter values
2025-03-03 21:02:07 -05:00
Ryan Laurie
9a65e0b6c4 Build multi-arch arm images (#54156)
* build multi-arch arm image

* refactor artifact fetching and containerizing

* fixes after testing

* backwards compatibility

* use old master for caution's sake

* update release code tests

* just bash it
2025-03-03 21:53:42 +00:00
Noah Moss
874c11e806 Guard enforced-sandboxes-for-user against nil user-ids (#54605)
* guard enforced-sandboxes-for-user against nil user-ids

* add comment

* Fix e2e test

* try again to fix e2e test
2025-03-03 16:52:06 -05:00
Oisin Coveney
cd06480c6b fix(sdk): Fix ColorSelector in Conditional Formatting (#54402) 2025-03-03 13:07:18 -08:00
Uladzimir Havenchyk
d71862d041 fix: close date filter on esc (#54499)
* fix: close date filter on esc

* fix test

* fixup
2025-03-03 21:03:50 +00:00
Alexander Polyankin
92a5a6816d Repro for "Date filter translations: Key not being translated" (#54619) 2025-03-03 20:43:16 +00:00
Nick Fitzpatrick
c76be91169 Updating InputWithSelectPrefix to Mantine components (#54536)
* updating InputWithSelectPrefix to Mantine components

* fixing the border, and tests
2025-03-03 14:39:28 -06:00
Alexander Polyankin
9ef9186dd7 Fix duplicates introduced by column sync (#54611) 2025-03-03 20:11:44 +00:00
Oisin Coveney
609d4923f9 Add "for React" to SDK in legalese modal and settings page (#54534) 2025-03-03 12:02:15 -08:00
Oisin Coveney
752e9246e5 fix(sdk): Fix ColorRangeSelector in Conditional Formatting (#54450) 2025-03-03 12:01:32 -08:00
Nick Fitzpatrick
f12e332019 add ability to style SpecialTagInput, update MultiAutocomplete styles (#54533)
* add ability to style SpecialTagInput, update MultiAutocomplete styles

* get outta here, stupid

* adjusting padding
2025-03-03 15:43:33 -04:00
John Swanson
b112fa202a Healthcheck endpoint for databases (#54446)
* Healthcheck endpoint for databases

* Update test/metabase/api/database_test.clj

Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>

---------

Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
2025-03-03 11:18:59 -08:00
Alexander Polyankin
dd66622ec9 Remove extra queries on public & embedded dashboard load (#52993) 2025-03-03 18:03:48 +00:00
Case Nelson
0252fb2aa0 fix: Cast LocalDateTime to date in oracle (#54529)
* fix: Cast LocalDateTime to date in oracle

Fixes #53371

Remember that oracle Date is a timestamp type with seconds resolution.
This changes our inlining of LocalDateTime values to use a date rather
than timestamp if the LocalDateTime has no millisecond part.

We can see `timestamp` causes full scan:
```
SQL> explain plan for select * from test where d > timestamp '1970-01-01 00:00:00';
SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY());
--------------------------------------------------------------------------
| Id  | Operation	  | Name | Rows  | Bytes | Cost (%CPU)| Time	 |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |	 |     1 |    35 |     2   (0)| 00:00:01 |
|*  1 |  TABLE ACCESS FULL| TEST |     1 |    35 |     2   (0)| 00:00:01 |
--------------------------------------------------------------------------
```

We can see `to_date` causes idx scan for both date and timestamp LHS.
```
SQL> explain plan for select * from test where d > to_date('1970-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS');
SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY());

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
|   0 | SELECT STATEMENT		    |	    |	  1 |	 35 |	  0   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID BATCHED| TEST  |	  1 |	 35 |	  0   (0)| 00:00:01 |
|*  2 |   INDEX RANGE SCAN		    | IDX_D |	  1 |	    |	  0   (0)| 00:00:01 |

SQL> explain plan for select * from test where ts > to_date('1970-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS');
SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY());
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
|   0 | SELECT STATEMENT		    |	     |	   1 |	  35 |	   0   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID BATCHED| TEST   |	   1 |	  35 |	   0   (0)| 00:00:01 |
|*  2 |   INDEX RANGE SCAN		    | IDX_TS |	   1 |	     |	   0   (0)| 00:00:01 |
```

* Fix kondo
2025-03-03 11:01:03 -07:00
Ryan Laurie
954b21a88a Fix invisible close icons on some legacy modals (#54056)
* fix invisible close icons on some legacy modals

* fix alignment
2025-03-03 10:46:52 -07:00
Alexander Polyankin
8529330c88 Make :time-interval work with 0 instead of :current in the UI (#54525) 2025-03-03 12:35:07 -05:00
Nick Fitzpatrick
1e4a44f00a updating mantine patch (#54598) 2025-03-03 12:13:18 -04:00
John Swanson
7f51520b96 Override some deps licenses (#54589) 2025-03-03 15:59:23 +00:00
Jeff Bruemmer
f0098c980a clarify cloud (#54592) 2025-03-03 10:47:21 -05:00
Chris Truter
c5f6a34cc1 Add prometheus info metric (#54523) 2025-03-03 17:41:13 +02:00
github-automation-metabase
9d4fa545a7 Bump thheller/shadow-cljs from 2.28.20 to 2.28.21 (#54170)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-03 10:31:45 -05:00
Sloan Sparger
572a75bfad [Cards in Dashboards] Allow changing save location when saving a modified dashboard question (#54526)
* fix

* add unit tests
2025-03-03 09:24:06 -06:00
Noah Moss
bc514f1f2f Fix pivot csv export with multiple pivot cols and no row totals (#54540)
* Fix pivot csv export with multiple pivot cols and no row totals

* revert re-enabling a couple tests since they fail on mysql
2025-03-03 10:15:17 -05:00
Timofey Kachalov
18e077c721 Update sample app ports in documentation (#54575) 2025-03-03 19:12:43 +04:00
Timofey Kachalov
a7b8a23519 Run cypress tests against the nodejs sample app (#54250) 2025-03-03 19:00:54 +04:00
Jeff Bruemmer
0a32925830 docs - note on license (#54586)
* note on license

* Update docs/embedding/sdk/quickstart.md
2025-03-03 09:27:41 -05:00
Mahatthana (Kelvin) Nomsawadi
6e9dd0f77c Remove unnecessary step that updates GH CLI (#54581) 2025-03-03 13:58:46 +00:00
John Swanson
e22e19509c Allow impersonated users to hit cache again (#54521)
* Allow impersonated users to hit cache again

As part of this I refactored a bit: `impersonation` is now its own
module, used by the `advanced-permissions` module.

The real changes are in:

- `middleware.cache`, where we're no longer not caching impersonated users,

- `metabase.impersonation.middleware`, where we're adding a key to the
  query if it'll be impersonated, and

- `metabase.query-processor.util/select-keys-for-hashing`, where we're
  selecting that key as part of the query hash.

- a new test in `metabase-enterprise.impersonation.cache-test`, an e2e
  test which verifies that impersonated users get a different cache than
  non-impersonated users.

* Fix throwing when sandbox/gtap both enforceable

`enforce-impersonations?` was returning `false` because due to the
sandbox, we had "unrestricted" data access from another group (the
sandboxed group).

i refactored a bit:

- `enforced-impersonations-for-db?` now is responsible for throwing in the
sandbox conflict case, rather than `connection-impersonation-role`.

- this way, if there's a conflicting sandbox, we'll throw before we even
check to see whether those impersonations will be enforced (rather than
checking and deciding "nope, they have unrestricted access so we won't
enforce them.")

* kondo yay
2025-03-03 05:36:36 -08:00
Chris Truter
919a393bf3 Recalculate columns for Upload model when updating (#54069)
* Recalculate metadata for derived models when updating Upload table
* Preserve modified metadata
* Test for display names being consistent
* Less ominous language
2025-03-03 15:35:28 +02:00
Romeo Van Snick
06f0eee2d2 Remove the ACE editor (#54558)
* Remove ace styles

* Remove ace-builds types

* Remove ace-builds alias from webpack and rspack config

* Remove ace mocks

* Remove ace packages

* Remove ace references in jest config

* Remove ace global in jest mock
2025-03-03 10:21:28 +01:00
Sébastien
be318cf2d5 Auto formatting adapts to currency style if needed (#54349)
* wip

* test

* fix

* fixup
2025-03-03 09:41:04 +01:00
github-automation-metabase
b44f22b6fa Bump org.slf4j/slf4j-api from 2.0.16 to 2.0.17 (#54566)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-03 07:13:07 +00:00
github-automation-metabase
08847cdf6b Bump ch.qos.logback/logback-classic from 1.5.16 to 1.5.17 (#54561)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-03 07:05:39 +00:00
github-automation-metabase
3517c25fea Bump io.github.tonsky/clj-reload from 0.8.0 to 0.9.0 (#54563)
Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-03 06:56:46 +00:00
github-automation-metabase
6ab2325841 Bump cider/cider-nrepl from 0.52.0 to 0.52.1 (#54562)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.52.1/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-03 13:48:49 +07:00
github-automation-metabase
e112875105 Bump org.apache.sshd/sshd-core from 2.14.0 to 2.15.0 (#54565)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-03 13:48:26 +07:00
github-automation-metabase
e4497bfe8a Bump metabase/saml20-clj from 2.2.7.173 to 3.0.0.175 (#54564)
Inspect dependency changes here: https://github.com/metabase/saml20-clj/compare/v2.2.7.173...head

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-03-03 13:47:58 +07:00
Romeo Van Snick
cc946a888f Move Custom Expression editor to CodeMirror (#54253)
* Use lezer parser for custom expressions (#53540)

* Add @lezer/generator

* Add missing value on Token

* Add script to generate lezer grammar parser

* Add @lezer/lr

* Add more tests to tokenizer

* Add lezer grammar for custom expressions

* Generate lezer parser for custom expressions

* Convert TOKEN and OPERATOR to enums

* Make Token type more specific

* Add isReference to identifier token

* Typo

* Add more tests for tokenizer

* Add tokenize alternative that uses lezer grammar

* Remove old tokenizer

* Update location of grammer in generate rule

* Add test cases for tokens that share a prefix

* Merge tokens when necessary

* Only add character error when text is 1 character long

* Reduce the need to manually merge nodes

* Stop the iteration when node is found

* Update tests to be more specific

* Simplify tokenize

* Uncommit edge cases

* Generate parser as js

* Move previous tokenizer tests into expressions folder

* Add typing to unit test

* Allow escaping [] in reference

* Add test for escaping closing bracket

* Handle invalid parses manually

* Add support for signed expressions

* Document parser more

* Add custom tokenizer for Reference

* Make tests more explicit

* Fix e2e test

* Merge old test suite into tokenizer test suite

* Move @lezer/generator to devDependencies

* Custom expression suggestions (#53679)

* Add new suggesters for custom expressions

* Add test for joined fields

* Move complete into separate folder

* Split up completions into separate files

* Split up completion tests too

* Copy more tests from legacy completer

* Fix types

* Lezer highlight for custom expressions (#53651)

* Rename generated parser to lezer

* Add lezer highlighting rules to parser

* Add HighlightExpression component

* Use HighlightExpression in expression HelpText

* Add type annotation to highlighter

* Add test for highlight

* Simplify unit test

* Move syntax highlighting to shared module

* Rename util.tsx to util.ts

* Add monospace font variable

* Use monospace font from theme for syntax block

* Use relative font size in HighlightExpression

* Use mantine var for border-radius

* Add test id to example

* Fix tests that rely on example content

* Move highlighting code to metabase/ui/syntax

* Replace ACE with codemirror in custom expression editor (#53746)

* Rename generated parser to lezer

* Add lezer highlighting rules to parser

* Add HighlightExpression component

* Use HighlightExpression in expression HelpText

* Add type annotation to highlighter

* Add test for highlight

* Simplify unit test

* Move syntax highlighting to shared module

* Rename util.tsx to util.ts

* Add monospace font variable

* Use monospace font from theme for syntax block

* Use relative font size in HighlightExpression

* Use mantine var for border-radius

* Add test id to example

* Fix tests that rely on example content

* Move highlighting code to metabase/ui/syntax

* Replace custom expression editor with CodeMirror editor

* Add test mock for CodeMirror

* Colocate custom expression tests (#53812)

* Remove unused DISPLAY_QUOTES

* Colocate custom expressions diagnostic tests

* Colocate custom expressions process tests

* Colocate custom expressions recursive-parser tests

* Colocate custom expressions typeinferencer tests

* Colocate custom expressions completer tests

* Colocate custom expressions format tests

* Colocate custom expressions resolver tests

* Colocate custom expressions index tests

* Colocate custom expressions pratt compiler tests

* Colocate fuzz tests with custom expressions code

* Update paths for fuzz tests

* Fix types in fuzz test

* Fix types in process test

* Remove unused var

* Remove unused var in generator

* Merge types for custom expressions (#53902)

* Add missing expression types to metabase-types

* Add more explicit types to matchers

* Use Expression type from metabase-types everywhere instead of custom type

* Move matchers to separate file

* Further use Expression types for matchers

* Add types for Metric and Segment matchers

* Fix types in format

* Fix missing types

* Clean up imports

* Split string helpers into separate submodule

* Split identifier helpers into separate submodule

* Avoid importing from index file in expressions module

* Render suggestions and help text in new custom tooltip (#53760)

* Add new help text component for custom expression editor

* Add new suggestions listbox for custom expression editor

* Add helper to find help text by function name

* Add enclosingFunction helper that is more forgiving to broken syntax

* Add new tooltip component for custom expression editor

* Add extension to render custom react tooltips

* Render suggestions in custom tooltip

* Export custom types

* Remove old expression editor popover components

* Add typings to process

* Add missing shortcuts

* Fix example font size

* Fix type imports

* Fix click on helptext

* Stop click propagation

* Fix process types

* Remove superflouous optional chain

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Fix types whith optional expressionIndex

* Use imports instead of React namespace

* Use index for key

* Rename util to utils

* Remove unused box shadow

* Remove brackets around placeholder names

* Resize tooltip to avoid it overflowing the window

* Fix line height for args

* Fix missing key icons

* Fix chevron alignment

* Fix types

* Move Listbox resizing classes to Tooltip

* Fix completion template for functions with no arguments

* Add unit tests for enclosingFunction

* Add darker background to expression example

* Remove bold from function call

* Fix imports

* Fix HelpText tests

* Add custom color for highlighted syntax argument

* Use colors from design system

* Fix blurring when switching to a different tab

* Remove trailing comma

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Split up effect

* Remove background from template arguments

* Improve tooltip position

* Fix Popover position when selection changes

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Fix custom expression editor e2e tests (#53761)

* Fix e2e tests for custom expressions

* Fix unit test

* Fix e2e tests

* Fix types

* Fix moveToStart and moveToEnd by using Home/End

* Add test for popover position

* Remove JSDoc in favor of inline comments

* Add examples of side effects

* Remove shouldContain helper in favour of value()

* Add comment to wait

* Use CustomExpressionEditor helper instead of @formula

* Add wait to reduce flakiness

* Add back in the useful comment about popover position

* Remove superflouous cy.viewport call

* Add helper to accept completion

* Rename helper to verifyHelptextPosition

* Convert comments to cy.logs

* Make sure we don't avoid testing the regression

* Allow customising key with which to accept completion

* Use acceptCompletion helper

* Fix tooltip position bug

* Remove unnused wait

* Add selectCompletion helper

* Fix helper using H

* Add better emulation of copy/paste in reproduction

* Ignore ts error

* Multiline formatter for the custom expression editor (#53973)

* Make type name meaningful

* Add more tests for not isnull, etc

* Remove unreachable code

* Add isEmpty matcher

* Pass query to format tests

* Add stronger types to formatStringLiteral

* Fix CallOptions import

* Implement multiline formatter as a prettier plugin

* Reimplement legacy formatter as new formatter with infinite print width

* Use the new formatter in the expression editor

* Remove legacy expression format files

* Document utils

* Simplify Expression type further

* Fully type test cases

* Remove cast in test

* Add more tests and fix formatting

* Use recurse helper to recurse into path children

* Prefix logical operators

* Improve formatting of logical connectors

* Wait for expression editor to be ready

* Avoid passing unknown html props

* Use selectCompletion helper

* Remove unused @ts-expect-error

* Always close helptext when suggestions are being shown

* Keep completion identity constant

* Fix unit test

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-03-02 12:25:24 +01:00
bryan
46df39bffc Bump #p version, add :dev-start alias, and dev app allows #p (#54398)
* dev mode starts webapp + works with hashp

- starts app in one go with :dev-start

* docstring

* docs

* fix ci

* reorder dev deps
2025-02-28 16:04:54 -07:00
Oisin Coveney
a6cdb8e7f4 SDK legalese text overflow (#54541) 2025-02-28 22:26:34 +00:00
Eric Normand
2f84e20584 Allow zoom on joined binned column (#54226)
* Add condition for join alias to match source alias

* Add test for zoom order of joined fields

* Improve nil handling in test

* Remove unneeded dependency

* WIP Check not using generous? true

* Remove `:generous?` option

* Get rid of unused require
2025-02-28 21:20:53 +00:00
Case Nelson
d47b1af7c4 fix: nested field refs from join-alias with spaces (#54231)
* fix: nested field refs from join-alias with spaces

Fixes: #37600

Join aliases get escaped by drivers (truncation and/or tr space to
underscore). However, when join fields are referenced in future stages,
the references were not being renamed and so the query was being created
with invalid columns from the previous stage.

* Fix tests, drop methods namespace

* Re-assoc info after conversion

* Just change query, none of the mw keys

* Add before/after mw for escape join alias to be able to use and capture converted pmbql queries

* Fix kondo errors

* Fix nest-breakouts

* Fix breakouts tests

* Field rename should happen in add-alias-info.

* Fix tests

* Don't use card name for collection name

* Format rows for sqlite

* Uncomment assertion
2025-02-28 14:12:21 -07:00
Nick Fitzpatrick
7a926d81a9 Various UI Polish (#54501)
* lots of UI fixes

* adjusting focus color with theme

* updating z-index in tests

* only change focus color

* updating loki screenshots

* e2e adjustments, PR feedback
2025-02-28 16:48:57 -04:00
Nemanja Glumac
b1b5efe9be Empty states for events (#54157)
Resolves CLO-3630
Resolves CLO-3627
Resolves CLO-3629
Resolves CLO-3626
Resolves CLO-3660
2025-02-28 21:25:13 +01:00
Riley Thompson
127724f0a0 Add support for filtering Mongo UUIDs with string patterns (#54390) 2025-02-28 19:10:50 +00:00
Ryan Laurie
5eb9ee24ad allow configuration of mantine tooltip bg color (#54524) 2025-02-28 17:59:19 +00:00
Sloan Sparger
afa15c0588 [Impersonation] Adds e2e test for enforcement of impersonation on cached questions (#54456)
* adds e2e test for enforcement of impersonation when working with cached questions

* assert response is cached for admin users
2025-02-28 10:47:01 -06:00
appleby
b9414bb439 Fix e2e test flake for issue 29943 reproduction (#54304)
Rather than dragging the Custom column left by a fixed -100 px, drag the Total column right 10 px past the right edge
of the Custom column's bounding box. The idea is to make the test more flake resistant since (1) we drag based on the
size of the target column header rather than a fixed offset, (2) since there are no more columns to the right of
Custom, it's OK if we overshoot the distance slightly.
2025-02-28 08:18:20 -08:00
bryan
ece8c586a9 defendpoint returns a thunk + add call-core-fn (#54395) 2025-02-28 08:57:45 -07:00
Alberto Perdomo
a5a7e5188d Update interactive-embedding-quick-start-guide.md (#54485)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-02-28 15:54:50 +00:00
Sloan Sparger
b46b264806 [Cards in Dashboards] Save dashboard question directly to tab (#53580)
* wip - got the FE working w/o a real endpoint for DQs created from a dashboard

* progress

* wire in real endpoint with some ugly code

* get working for copy form and clean up code

* fix failing unit tests

* fix failing e2e tests

* fix tab select hidden when creating a question directly from a dashboard

* adds unit test coverage

* add e2e tests

* fix console warn when tab id field is not used in formik form

* small fixes

* fix flakes from two modals sometimes being opened at the same time
2025-02-28 09:44:13 -06:00
Case Nelson
6b8dd38c3e fix: BigQuery ClassNotFound in future (#54474)
Follow up to #52990

When `future` is called clojure uses `Executors.newCachedThreadPool`
This means that the Threads remain in a pool for up to a minute.

That means that if `future` gets called anywhere before
`classloader/the-classloader` is called then that `Thread` can remain in
the pool with a bad classloader. Then when BigQuery's `future` tries to
`Class/forName` `BigQuery$JobOption` it will be calling it from the
classloader context of that initial `future` call and not be able to
find the class.

This adds a very early call to `classloader/the-classloader` in `init!`
and a safety call to it right in BigQuery. In the long term we should
probably be much more strict and explicit about the executors we use.
2025-02-28 08:32:40 -07:00
Kamil Mielnik
2c42eef428 Fix - Uncaught TypeError when making native query parameter required (#54494)
* Fix #52812

* Fix types

* Repro #52812

* Add logs

* Bring back lost values

* Simplify code
2025-02-28 15:04:48 +00:00
Uladzimir Havenchyk
7a3c5f26d4 fix quarter picker styles (#54457)
* fix quarter picker styles

* update loki screenshots

* screenshots
2025-02-28 14:59:20 +00:00
Filip Hric
f6ae0f2844 stabilize flaky test (#54480) 2025-02-28 15:51:18 +01:00
Riley Thompson
9a37543f40 Handle non-JSON native mongo queries (#54210) 2025-02-28 14:49:54 +00:00
Romeo Van Snick
5ca7303e3c Use CodeMirror for code samples (#54268)
* Add @codemirror/legacy-modes package

* Add @codemirror/lang-html

* Add @codemirror/lang-javascript

* Add @xiechao/codemirror-lang-handlebars

* Add CodeBlock component

* Add custom metabase syntax highlighter for codemirror

* Use custom highlighing

* Render code sample using CodeBlock

* Add @codemirror/lang-python

* Add python support

* Restructure code

* Add classname to CodeBlock

* Deduplicate codemirror packages

* Add erb support

* Improve syntax highlighting

* Remove fold gutter

* Remove unused TextEditor

* Remove unused ace imports

* Add highlighted text to CodeBlock

* Fix tests

* Fix e2e test

* Disable current line highlighting

* Add the nonce plugin to Codemirror

* Sort languages

* Rename variable to be more descriptive

* Remove TODO

* Rename util to utils

* Find all occurences of highlighted text in source

* Use explicit classes in highlight

* Remove reliance on overriding based on language

* Remove null in signature

* Remove unused classnames

* Initialise highlighted text statefield

* Add e2e test for disappearing highlighted texts

* Replace all jade references with pug

* Remove erb support and replace it with HTML

* Add comment as to what is being tested

* Remove javascript as a code language
2025-02-28 15:48:02 +01:00
Braden Shepherdson
ce13e14c70 [refs] Include parent_id when hashing Fields to be unique (#53933)
Nested fields (Mongo, Postgres JSON unfolding, etc.) can have the same
name within one table, if their parent paths are different.

Including the parent (if any) as part of a Field's `serdes/hash-fields` makes the hashes truly unique.
2025-02-28 14:35:19 +00:00
Alexander Polyankin
858efafed7 Fix field-id propagation in filter parts (#54448) 2025-02-28 09:34:49 -05:00
Romeo Van Snick
81e9289400 Dependabot fixes octokit dompurify (#54406)
* Udpate @octokit/rest to address regex vulnerabilities

* Update tsx to fix esbuild vuln

* Fix types
2025-02-28 15:24:13 +01:00
Oisin Coveney
8850ab249f Convert components of RuleEditor to Mantine (#54104) 2025-02-28 06:24:08 -08:00
Uladzimir Havenchyk
a5e8e826b0 fix: prevent icon overflow on resize (#54189)
* fix: prevent icon overflow on resize

* add repro

* adapt join step to smaller screens
2025-02-28 17:20:27 +03:00
Braden Shepherdson
81a4a369ab [MBQL Lib] Joins added after summaries have no :fields (#54344)
When you add a summary clause (aggregation or breakout), any `:fields`
clauses are removed from the stage and its joins.

However the reverse order was not correct: a join clause added after
summaries would keep its specified `:fields` clause, or get the default
`:fields :all`. This change fixes that quirk.
2025-02-28 08:52:49 -05:00
Ngoc Khuat
3cdbe363c7 Fix alerts double sending on stats (#54478) 2025-02-28 19:47:39 +07:00
Nick Fitzpatrick
e75592cc22 Mantine UI Regressions part 1 (#54312)
* ui regressions

* updating reference images

* update loki screenshots

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
2025-02-28 08:42:12 -04:00
Sloan Sparger
d19309da1c [Cards in Dashboards] Use last selected collection for default save location if more recent than a dashboard (#53571)
* use the last saved collection if the use saved to a collection more recently than saving to a dashboard

* make changes not affect models/metrics, fix e2e tests

* unit tests

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-02-28 08:21:12 -04:00
Kamil Mielnik
ceb20066a0 Enable custom no-color-literals ESLint rule (#54427)
* Enable no-color-literals rule

* Fix all strings in the file being highlighted if only one of them violates the rule

* Silence violations

* Revert "Fix all strings in the file being highlighted if only one of them violates the rule"

This reverts commit 11a3c6aca7.

* Fix all strings in the file being highlighted if only one of them violates the rule
2025-02-28 14:08:17 +07:00
Aleksandr Lesnenko
f724e1b58d add tanstack data grid (#54375)
* add tanstack data grid

* review

* drop forwardref
2025-02-28 03:59:11 +00:00
Remi Kristelijn
9895b2d76f fix: remove aria-expanded where it is not allowed (#53833) 2025-02-27 21:05:36 -05:00
Aleksandr Lesnenko
b7e0843d42 fix tooltip content overflows (#54444) 2025-02-27 17:38:29 -05:00
Jeff Bruemmer
1f6e7546d2 fix typo (#54464) 2025-02-27 17:17:37 -05:00
Noah Moss
01993856fc New tiles APIs to support parameterization and public sharing/embedding (#54150)
* New tiles APIs to support parameterization

* Public + embedding endpoints

* fix up tests, light refactor

* address feedback

* fix test
2025-02-27 17:13:43 -05:00
Alexander Polyankin
4f0eeaae99 Change offset help text (#54455) 2025-02-27 22:09:17 +00:00
Sloan Sparger
66ef7ccc70 [Cards in Dashboards] Allow dashboards w/o questions saved inside it to be shallow cloned (#53780)
* revert the removal of shallow cloning a dashboard, prevent shallow copy if dashboard has a dashboard question

* load dashboard in copy modal to avoid cases where provided entity is incomplete and does not contain dashcard data

* type fix

* add e2e test coverage

* remove old e2e test

* address pr feedback and add test coverage for case

* fix lint
2025-02-27 15:51:50 -06:00
Jeff Bruemmer
b1c4f96690 docs - SDK questions (#54451) 2025-02-27 16:02:00 -05:00
Fraser
2b690f30fa Check caching schedule setting value exists (#54392) 2025-02-28 09:45:40 +13:00
Uladzimir Havenchyk
f6dd88a771 fix: MonthPicker styles after migration to mantine v7 (#54352)
* fix monthpicker styles after migration to mantine v7

* fixup

* fix styles

* update loki screenshots
2025-02-27 23:05:18 +03:00
John Swanson
af12aba3ec Add a clj-kondo hook for bad single-quotes in i18n (#54149)
For i18n, we had a lot of things like

```
(tru "this user's string will be broken")
```

During i18n, we use `java.text.MessageFormat` to format messages. These
have a great idea: you can format messages with parameters like `{0}`, or
escape these cases with single-quotes like `'{0}'` when you actually
want the string "{0}". And of course, you can escape a single-quote
itself just by doubling it, so "''" becomes a "'".

All this makes sense. But then they had a problem. What if there's an
unescaped single-quote in the argument to MessageFormat?

A lesser program might have thrown an exception here, but not
MessageFormat! Nay! We must persist, lads, not give up at the first sign
of trouble!

Instead, let's just decide that the programmer probably *meant* to close
that single-quote! So, for example, "This user's message is totally
frickin broken" is interpreted AS IF you'd written "This user's message
is totally frickin broken'" (which ends up as "This users message is
totally frickin broken"), which - doubtless - is what you intended.

Unfortunately there are *some* few cases where - IT TURNS OUT - we don't
actually want this behavior! For example,

```
(deferred-tru "Key to retrieve the JWT user's email address.")
```

becomes "Key to retrieve the JWT users email address." Which is slightly
annoying.

So: let's have a kondo rule that will enforce statically that you don't
have unescaped single-quotes in your template strings for `tru`,
`deferred-tru`, `trs`, or `deferred-trs`.
2025-02-27 18:51:57 +00:00
appleby
f617c87173 Fix drills for mapped model metadata (#54057)
* Fix underlying-records and pivot drills for mapped model metadata

* Fix zoom-in.timeseries drill for mapped model metadata

* Fix zoom-in.binning drill for mapped model metadata

* Fix zoom-in.geographic drill for mapped model metadata

* Replace breakout->filterable-column with breakout->resolved-column

* Fix sort drill for mapped model metadata

* Restrict fix to possible-model-mapped-breakout-column?

* Add e2e tests

* Move shared e2e helpers into outer scope

* Add tests for source-card-type and source-card-is-model?

* Fix indentation

* Remove unused require

* Rename local vars from filterable-column to resolved-column

The old name was a holdover from before the function got renamed.

* Cleanup some->> -> some->

This pipeline used to have more parts that required some->>. Since the only remaining func wants the resolved-column
threaded as the first arg, switch to some-> instead and drop the now useless lambda.
2025-02-27 10:17:05 -08:00
Braden Shepherdson
902b2b69ce [refs] Make lib.convert internal; use lib/query etc. to convert (#54211)
Fixes QUE-681.


Drops `metabase.lib.convert` from the "exported" namespaces under `lib` module, and refactors all usage to
prefer `lib/query` and friends. These require a `MetadataProvider` where `lib.convert/->pMBQL` does not, but
since most of the calls were in QP middleware there was already one handy.

A few API handlers were calling `lib.convert/->pMBQL` and some of those require new `MetadataProvider`s.

Note that currently `lib.convert/->pMBQL` and `->legacy-MBQL` are still exported from `metabase.lib.core`,
and used a few places in the QP! That's an unfortunate temporary measure, and I've started the ball rolling
on alternative ways to factor both of the main offenders (like `annotate/aggregation-name` called from some
drivers).
2025-02-27 12:33:59 -05:00
Alexander Polyankin
3b7be3eda7 Add support for bigint in formatting (#54376) 2025-02-27 11:20:43 -05:00
Timofey Kachalov
1a03bcc59c Convert Visualization.jsx to typescript (#54303) 2025-02-27 20:18:16 +04:00
Nicolò Pretto
54a7b1c707 fix(sdk): expose the correct type for saveToCollection (#54428) 2025-02-27 16:32:00 +01:00
Oisin Coveney
b58d497885 Ensure that markdown files also include prop changes (#54382)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-02-27 13:35:44 +00:00
Alexander Polyankin
8118cb1933 Support large integers in query results (#54308)
* PoC

* Base pass

* First pass

* First pass

* First pass

* First pass

* Basic test

* Basic test

* Basic test

* Basic test

* Basic test

* Basic test

* Basic test

* Basic test

* Basic test

* Basic test

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes
2025-02-27 07:03:11 -05:00
Uladzimir Havenchyk
6ac028a9bc Revert "upgrade rspack and swc (#54131)" (#54417)
This reverts commit 4875aba153.
2025-02-27 15:58:19 +04:00
Raphael Krut-Landau
cf7a3fa6af Widen the 'Get embedding code' popover so we can see the copy link button (#54414)
Closes #54407

Before:

![widen-get-embedding-popover--before.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/utGnP2ljFMMNOgi82vVn/b08058f1-4b63-4331-9067-b4e629b338fd.png)

After:

![widen-get-embedding-popover--after.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/utGnP2ljFMMNOgi82vVn/3aef6862-fa57-4275-a52a-420563c0f623.png)
2025-02-27 06:34:29 -05:00
Filip Hric
8a3b6323bf fix flaky test (#54408) 2025-02-27 11:10:54 +01:00
Phoomparin Mano
fb25682fe8 feat(sdk): use questionId={new} for creating new questions (#54323) 2025-02-27 13:18:40 +07:00
Aleksandr Lesnenko
2d561440a0 Reduce usage of legacy tooltip (#53447)
* reduce usage of legacy tooltip

* update Link component tooltip

* update e2e specs

* fix tooltip usages

* lint

* unit specs

* forward ref

* specs

* smart scalar tooltip color

* use tooltip secondary color

* drop flaky legacy tooltips and popovers from loki tests

* one more usage
2025-02-27 06:16:59 +00:00
Jeff Bruemmer
1071dbbcc5 docs - base url for api docs (#54374) 2025-02-27 00:44:07 +00:00
Ryan Laurie
ee401487ca optional sql server 2017 (#54389)
* optional sql server 2017

* disable sqlserver 2017 tests
2025-02-26 22:34:32 +00:00
Oisin Coveney
0c7e18ac30 Convert ChartSettingsTableFormatting components to TS (#54103) 2025-02-26 21:06:16 +00:00
Oisin Coveney
cee7052c31 Add for React in two places on the core app (#54234) 2025-02-26 12:45:40 -08:00
Aleksandr Lesnenko
b974b6bc1c support markdown in the link description tooltip (#53097) 2025-02-26 14:41:12 -05:00
Jeff Bruemmer
5c2132facb Update interactive-embedding-quick-start-guide.md (#54377) 2025-02-26 13:50:03 -05:00
Alberto Perdomo
c9f655bef9 Updates to SDK docs (#54363)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-02-26 17:51:10 +00:00
Jeff Bruemmer
fe5c9864d1 dashboardCardMenu (#54366) 2025-02-26 12:45:41 -05:00
Alberto Perdomo
22fb69ebbc SDK - Document color theming limitation (#54351)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-02-26 16:18:37 +00:00
github-automation-metabase
a562562dd4 Update Readme version references and published npm version to 0.54.3-nightly (#54348) 2025-02-26 16:01:02 +00:00
Denis Berezin
e9705f56ec Fixed Question Notifications UI issues after mantine upgrade (#54327) 2025-02-26 18:19:05 +03:00
Riley Thompson
ea38120e5a Cast column to float for Redshift and SQLServer AVG (#53756)
* cast to float for redshift avg

* cast sqlserver avg as float

* remove ::floors-average

* fix test comparison
2025-02-26 09:19:34 -05:00
John Swanson
fbf8c6db83 Remove unused cards in usage analytics (#53598)
[ADM-159: Get rid of unused questions in Usage Analytics](https://linear.app/metabase/issue/ADM-159/get-rid-of-unused-questions-in-usage-analytics)
2025-02-26 05:39:29 -08:00
Kamil Mielnik
2c23bc8284 Repro #54236 (#54326) 2025-02-26 18:52:40 +07:00
Nicolò Pretto
789f1d5002 fix(sdk): move some emotion to css, scope it to .mb-wrapper and use it in the sdk (#54202)
* fix(sdk): move some css to css, scoped it to .mb-wrapper and use it in
the sdk

* make the dashboard test not flake if they render 6 or 7 rows
2025-02-26 11:57:27 +01:00
Filip Hric
c9a9a33e65 fix a test (#53878) 2025-02-26 11:55:30 +01:00
Uladzimir Havenchyk
208e191c12 ci: fix flaky test about sticky panel (#54125)
* fix flaky test about sticky panel

* rework fix

* drop waitFor

* fixup
2025-02-26 12:09:21 +03:00
Phoomparin Mano
250b47b0d8 feat(sdk): cli should ask to remove the instance early if one exists (#53545) 2025-02-26 15:20:18 +07:00
Ngoc Khuat
72538ba54b [Notification] Alert refactor WIP (#51101)
* [Notification] First Notification API (#50770)

* [Notification] CRUD notification APIs (#50921)

* [Notification] Send notification card (#51120)

* [Notification] Send notification APIs (#51267)

* [Notification] Migrate alerts (#50724)

* [Notification] send card notification tests (#51447)

* [Notification] use malli registry (#51439)

* [Notification] Create notification API use current user as creator (#51676)

* [Notification] module readme (#51657)

* [Notification] CRUD api permissions  (#51561)

* [Notification] Send notification APIs (#51267)

* [Notification] add spec update tests (#51630)

* [Notification] management api (#51649)

* [Notification] Transaction emails (#51688)

* [Notification] add spec update tests  (#52078)

* [Notification] send emails about alerts when update card (#52087)

* [Notification] POST /api/notification/send do not requires creator_id (#52374)

* [Notification] Fix unable to send test to webhook (#52502)

* [Notification] Card notification archive when send_once = true (#52375)

* [Notification] unsubscribe notification APIs (#52109)

* [Notification] Quartz trigger management (#52431)

* [Notification] Publish events (#51852)

* [Notification] confirmation email when setting up alert (#52494)

* [Notification] Remove alerts APIs except GET and DELETE (#52012)

* [Notification] unsubscribe notification UI (#52186)

* New UX for Question alerts (#51647)

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2025-02-26 08:36:48 +01:00
Nemanja Glumac
ecb1d83170 Point all hosting-related upsells to the main Cloud upsell (#53951)
The Product decision was to point all existing upsells 
(that were previously leading to https://www.metabase.com/cloud) 
to the existing, central Cloud upsell in the app.

This makes it easier to initiate the migration directly from within the app.
2025-02-25 23:10:46 +00:00
Jeff Bruemmer
0376d71bd7 docs - sdk edits (#54311) 2025-02-25 17:19:36 -05:00
Fraser
cbc1ab534f Use CSS Modules and add border-radius to Entity Picker input (#53869) 2025-02-26 11:15:17 +13:00
Oisin Coveney
17578a74c3 fix(sdk): [EMB-154] Pivot table visualization settings tabs caused jarring width change (#54023) 2025-02-25 14:05:22 -08:00
Nick Fitzpatrick
493430dffd Adding DatePicker, Embed, Overlay and other loki tests back (#54310) 2025-02-25 17:37:50 -04:00
Uladzimir Havenchyk
3bd9329f5d refactor: rework click behavior buttons to mantine (#53769)
* rework click actions buttons to mantine

* use new button and wrap text
2025-02-25 23:09:38 +03:00
Tyler Plude
d5834ea250 Introduce attachment-row-limit and enforce download-row-limit minimum of 1048576 (#52134)
* Removing unused require

* Raising download-row-limit min to 1048576

* Removing unused require

* Raising download-row-limit min to 1048576

* Fix default to not be nil; remove useless unit test

* Change to 2**20 - 1 to account for header row

* Restore more efficient row total values in downloads row limits test

* Improve docstring for env var

* Testing if removing broken unit test fixes all of CI

* Adding new MB_ATTACHMENT_ROW_LIMIT env var; fixing unit test that dependend on old mb-row-download behavior

* Fixing nil support in min call by moving safe-min to u/safe-min and using that over clojure.core/min

* Fixing condition that tests if we're in a subscription email to include check for :pulse

* Removing default value for download-row-limit; updating limit logic; fixing test

* Fixing cljfmt

* Addressing PR feedback

* Fix circular dependency

* Fix imports for modules

* Fixing broken import

* Adding missing doc string
2025-02-25 11:39:58 -08:00
Remi Kristelijn
8c792da0d1 Enable zoom on mobile (#53830) 2025-02-25 12:05:02 -07:00
Timofey Kachalov
01bad49f5b fix(sdk): Add missing support of mapQuestionClickActions plugin for InteractiveDashboard (#54240) 2025-02-25 22:39:42 +04:00
John Swanson
07b490db9f Fix two bugs in DQ updates/creation (#54292)
- allow not specifying a `collection_id` when creating a new
card (inferring it from the `dashboard_id` instead)

- correctly check perms on the *dashboard*'s `collection_id` when moving
a card to a dashboard
2025-02-25 10:34:18 -08:00
Oisin Coveney
7c67445fbe Ensure that other popovers close when a new one is opened (#54214) 2025-02-25 10:23:20 -08:00
Jeff Bruemmer
c46fba0914 update image and add version note (#54294) 2025-02-25 13:01:53 -05:00
Jeff Bruemmer
70e81f8304 docs - sdk questions edits (#54279) 2025-02-25 13:01:41 -05:00
Nemanja Glumac
c953d31f79 Upsells follow up (#53727)
* Clean up the upsell exports

Resolves CLO-3582

* Get rid of styled components in upsells

Resolves CLO-3567

* Define urls in a single place

Resolves CLO-3566

* Tidy up the cloud upsell

* Tidy up `UpsellBanner`

* Nit: Format the sentence correctly

* Use safer approach when setting color for the `UpsellGem`
2025-02-25 18:42:34 +01:00
Sébastien
3cebfb8f19 Fixed conditional formatting for numerical primary/foreign keys (#54139)
* conditional formatting for numerical primary/foreign keys

* clearer conditionals?

* import
2025-02-25 18:39:15 +01:00
Nicolò Pretto
75b6a348d7 fix warning about missing ref on forwardref for FullWidthContainer (#54252) 2025-02-25 18:21:09 +01:00
Nicolò Pretto
af88536cef fix(sdk): add forwardRef to remove 'Function components cannot be given (#54280)
refs' console.error
2025-02-25 17:03:33 +00:00
Phoomparin Mano
837df59223 fix(sdk): deprecate the CreateQuestion component (#54212) 2025-02-26 00:00:53 +07:00
Jeff Bruemmer
4c90b40871 Update quickstart-with-sample-app.md (#54284) 2025-02-25 16:55:06 +00:00
Stas Gavrylov
6975288d2d Remove Unsubscribe link from unsaved subscription test email for non-users (#54242) 2025-02-25 16:38:27 +00:00
Ryan Laurie
fd9c44866d add some nice logging about skipping snapshots in e2e tests (#53757) 2025-02-25 16:31:55 +00:00
Alexander Polyankin
f3ff38b8da Fix a case with broken dates and timelines (#54271) 2025-02-25 16:24:21 +00:00
Nemanja Glumac
0b254b23c7 Remove unused timeline-related entries from services.js (#54188) 2025-02-25 17:04:36 +01:00
Timofey Kachalov
d60b09d348 Adjust SDK version compatibility warning color (#54260) 2025-02-25 19:58:08 +04:00
Oisin Coveney
f77ff5e492 fix(sdk): Rename saveToCollectionId to saveToCollection (#54225)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-02-25 22:06:30 +07:00
github-automation-metabase
6ef61ccb1a Update Readme version references and published npm version to 0.54.2-nightly (#54261) 2025-02-25 14:45:55 +00:00
Jeff Bruemmer
57c292adfd docs - display as image (#54200)
* Update table.md

* headings

* Update docs/questions/visualizations/table.md
2025-02-25 09:09:28 -05:00
Alberto Perdomo
8737e62f1a Remove beta label for SDK (#53925)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-02-25 14:00:11 +00:00
Jeff Bruemmer
bf5de5ca23 docs - sdk pages (#54224)
* Update JWT SSO authentication documentation

* links

* edits
2025-02-25 08:55:20 -05:00
Nicolò Pretto
76add4254f sdk debug info component (#54201)
* sdk debug info component

* remove extra BUILD_TIME

* move the component to components/public so it gets automatically wrapped in the nextjs compat layer
2025-02-25 13:44:54 +00:00
Timofey Kachalov
3a55dcde58 Always run Pivot Table queries immediately (#54195) 2025-02-25 16:30:05 +04:00
Uladzimir Havenchyk
d878b0eb25 deprecate emotion (#54177)
* deprecate emotion

* drop enterprise folder

* Update frontend/src/metabase/.eslintrc

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>

---------

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2025-02-25 15:20:51 +03:00
Phoomparin Mano
65b050eb7d feat(sdk): use new querying layout for create question flow (#53976) 2025-02-25 12:11:01 +00:00
Romeo Van Snick
a56a344ef3 Allow closing Native editor sidebar reference (#54197)
* Add reproduction for #54124

* Allow closing of sidebar
2025-02-25 10:51:50 +01:00
dpsutton
80b6e485cb fix redshift (#54232)
```clojure
upload-test=> (driver/allowed-promotions :redshift)
{}
upload-test=> (mt/transitive {})
nil
```

just have to expect the allow-list of `{}` rather than nil
2025-02-25 08:53:14 +00:00
Nathan Voxland
536b5f4fd6 Support bulk-fetching personal collection names to improve performance (#53572) 2025-02-24 16:37:13 -06:00
Riley Thompson
d1ad389d45 Gracefully handle null arrays in results (#54203) 2025-02-24 17:31:14 -05:00
Tyler Plude
e2dfb4d715 Fix static fix thai translations (#54155) 2025-02-24 18:58:26 -03:00
Tyler Plude
2536241c25 Fix static viz to respect custom formatting (#54154) 2025-02-24 13:25:53 -08:00
Riley Thompson
48c31a60af Fix mongo uuid not displaying correctly (#53564)
* Fixes the display by checking if the Mongo binary data is a UUID and converting it if so.

* Fixes the filtering by changing how we infer the base type so we can differentiate UUIDs and binData

* Fixes the existing UUID tests so that they use BSON UUIDs instead of strings.
2025-02-24 20:49:25 +00:00
Oisin Coveney
8f1578ec5c Use SELECT 1 instead of SELECT * FROM ORDERS (#54151) 2025-02-24 12:39:46 -08:00
Riley Thompson
db4c1e8f1a Destroy DB in count of grouping tests (#53700) 2025-02-24 14:38:27 -05:00
Phoomparin Mano
33a64e993f fix(sdk): improve example component import paths in cli (#53473) 2025-02-25 01:57:35 +07:00
Dan Stone
e4bd3a44a7 Take the :type of implicit action parameters from the table field, not what is saved in the database (#53914)
* Add implicit actions schema change test

* For now, we define the column set as being determined by models
  - this can break actions if new required columns are added
* Type changes however should be reflected in the derived parameters
* Drops, renames behaviour remains undefined for now

* Fix field :type change being ignored by implicit action params

* Add round trip test for implicit action params
2025-02-24 17:55:51 +00:00
John Swanson
174db1c92e Allow duplicating dashboard but not with DQs (#53766)
If you try to shallow-copy a dashboard but it has DQs, throw a 400.

(Also, when copying a dashboard, don't copy cards that are archived.)
2025-02-24 09:26:20 -08:00
Kyle Doherty
b5b19eacd5 Storybook cleanup (#53982)
* set up our own sort order, do some initial renaming

* consolidate viz stories into one folder

* Move app section specific components / patterns into app folder

* mark old components as deprecated in storybook

* group ui components under components

* add additional new components to proper folder

* move utils to components directory

* move data display to components

* move old core components into components directory w/ caveats

* move parameters stories into components

* move old segmented control to deprecated folder

* move deprecated radio to components folder

* move status components into components/feedback

* tweak order of pages

* run test-visual:loki-update

* rename colors_Default to Colors_Default

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-02-24 12:25:26 -05:00
Nick Fitzpatrick
e6e4ced878 Small UI fixes (#54198)
* Fixing some UI issues

* fixing query builder header icon
2025-02-24 13:23:37 -04:00
Jeff Bruemmer
05392dde3e docs - sdk quickstart (#54161) 2025-02-24 11:20:29 -05:00
Kamil Mielnik
20e70189c0 Fix - Variable type picker covered by field picker (#54184)
* Upgrade mantine to 7.17.0

* Fix #52811

* Repro #52811
2025-02-24 21:45:13 +07:00
Nick Fitzpatrick
aa501351a6 Upgrading Mantine to 7.17 (#54163) 2025-02-24 10:10:06 -04:00
Mahatthana (Kelvin) Nomsawadi
83cbb31e36 Fix summarize sidebar bucket label not visible when selected (#54176)
* Fix summarize sidebar bucket label not visible when selected

* Make binning label visible when adding a dimension
2025-02-24 14:08:35 +00:00
Nicolò Pretto
231e16b876 chore: restore no-restricted-imports rules for enterprise folder (#53436)
* chore: restore no-restricted-imports rules for the sdk

* fix imports + add eslint-ignore for when we can't

* address feedback on PR: export BadgeProps + use types we already had

* also change enterprise/frontend/.eslintrc

* add comment to explain why we copy paste them

* "name": "@storybook/testing-library" -> @storybook/test

* add eslint ignore for an import used in a utils file for stories
2025-02-24 14:13:13 +01:00
Mahatthana (Kelvin) Nomsawadi
12b56354ee Fix embedding SDK admin settings typo (#54134)
* Fix embedding SDK admin settings typo

* quickstarttttttt

* Fix unit tests
2025-02-24 12:50:06 +00:00
Nicolò Pretto
1008b43a55 ci: make the sdk e2e run on draft prs and comment non-used stub (#54137) 2025-02-24 12:26:14 +01:00
Dan Stone
2eb5285fa9 On csv upload allow column promotion from boolean to int / float (#52607)
* On csv upload allow column promotion from boolean to int / float

* Fix incorrect arglist

* Add postgres support for bool -> int, float upload migrations

* Improve compatibility with old drivers

* Rename alter-upload-columns to alter-table-columns

* Formatting, sparking joy

* Flip alter-column-using-hsql-expr arg order

* Docstring tweak alter-column-using-hsql-expr

* More symmetry with existing tests, redshift

* Add driver changelog note re `alter-table-columns!`

* Prefer ::driver over :default

* Allow drivers to specify the promo allowlist

* Prefer parser errors for redshift upload promos

* Ensure promo tests respect driver allowlist

* Make index-test/transitive available as a test util

* Add transitivity test

* Add allowlist note about transitivity requirement

* s/upload-promotion-allowlist/allowed-promotions/g

* Prefer case over condp

* Unlearn boolean/predicate habit

bikeshed: Personal style vs metabase style:
e.g I prefer flags/booleans to not have ?, reserving that only for
questions i.e predicates

* Fix alignment

* s/internal-allowed-promotions/translate-type-keywords/g

* Fix wierd comment line break

* Fix missing potemkin import
2025-02-24 11:05:29 +00:00
Denis Berezin
82768f0750 Fix new dashboard subscription button UI (#54152) 2025-02-24 12:41:45 +03:00
Uladzimir Havenchyk
4875aba153 upgrade rspack and swc (#54131) 2025-02-24 11:33:44 +03:00
Ngoc Khuat
6804aeefae Fix unit for notification send prometheus metrics (#54164) 2025-02-24 10:04:47 +02:00
Kamil Mielnik
9ae89b2b1a Fix - Card reference in a native query with a long title does not wrap (#54123)
* Fix #53171

* Repro #53171

* Handle undefined message
2025-02-24 15:04:18 +07:00
Kamil Mielnik
1e1dbb259c Remove redundant "in" in a translation string (#54122) 2025-02-24 15:02:32 +07:00
Kamil Mielnik
a9c0eb0571 Fix - Alignment in DateOffsetIntervalPicker 2025-02-24 15:02:14 +07:00
Timofey Kachalov
ec7d155054 Always set a ref in PivotTable to properly scale it (#54126) 2025-02-24 11:42:43 +04:00
Kamil Mielnik
79ab5476bc Fix - Resize handle misplaced in Notebook view (#54079)
* Fix #53817

* Fix another usage
2025-02-24 08:07:04 +01:00
Alex Yarosh
12f7f98e23 docs: caching and impersonation (#54153)
* caching impersonation

* Update docs/configuring-metabase/caching.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-02-21 23:08:55 +00:00
Maxime Pauvert
f0cb2d0f48 Update map.md (#54143) 2025-02-21 17:47:43 -05:00
Nemanja Glumac
bad4e01917 Empty states for collections (#54136)
Resolves CLO-3623
Resolves CLO-3638

* Replace artwork for collection empty state

* Fix the deprecated prop warning

* Update the "New" menu trigger

* Remove previous artwork

* Update the copy
2025-02-21 21:47:40 +01:00
Denis Berezin
a6f36291b6 Fix disabled Select text display (#54085) 2025-02-21 21:22:51 +03:00
Case Nelson
efcd6f3190 tech-debt: move sync.concurrent out of sync module (#54092)
Moving this fixes a circular dependency with sync and
models.database health check.
2025-02-21 09:39:44 -07:00
Nemanja Glumac
6211123deb Empty states for "It's ok" modals (#54101)
Resolves CLO-3624
* Add SVG assets

* Update the modal UI

Resolves CLO-3631
Resolves CLO-3632
Resolves CLO-3637
2025-02-21 16:35:57 +01:00
Alberto Perdomo
da12a8741d SDK - initialSqlParameters is only supported in SQL questions (#54114)
Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
2025-02-21 14:46:21 +00:00
Phoomparin Mano
7ad55f5099 fix(sdk): fix visual artifacts in binning options (#53961)
* add trigger button class with visibility

* add visibility clauses

* Remove empty file

* Colocate visibility logic

So we don't have to repeat this logic on every call site

* Fix E2E tests

* Remove leftover prop type

* Passing ref since we need it for popover

* Fix the rest of the failed e2e tests

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-02-21 14:40:14 +00:00
Alexander Polyankin
3e8fe57187 Removes impl files (#54078) 2025-02-21 09:33:45 -05:00
Eric Normand
5cbbfeb4a8 Convert back to original type when binning by day (mysql) (#53777)
* Convert back to original type when binning by day (mysql)

* Use h2x/->datetime instead of custom one in mysql

* Interpret base-type into database-type

* Remove println

* Undo using base-type to derive database-type

* Fix mysql date binning to maintain type

* Improve postgres bucketing test

* Fix test

* Refactor for clarity

* Whitespace

* Track type info when casting unix timestamps and date strings

* Track type when casting temporal strings (psql)

* Revert changing test (fix instead)

* Add very helpful comment

* Add very helpful and useful comment
2025-02-21 17:05:54 +03:00
Uladzimir Havenchyk
5a0a238277 refactor: replace emotion with css modules (#53981)
- replace emotion components with mantine
- replace emotion styles with css modules
2025-02-21 16:54:28 +03:00
Aleksandr Lesnenko
6a95864afa fix series names overflow available space in viz settings (#54112) 2025-02-21 08:50:46 -05:00
Nicolò Pretto
ff1d319d12 devex: add user selector for the sdk storybook (#54075) 2025-02-21 13:40:19 +01:00
Timofey Kachalov
c4e499cd2a fix(sdk): Add dir attribute for PublicComponentStylesWrapper (#54082) 2025-02-21 16:24:34 +04:00
Nicolò Pretto
39bd897d09 chore: remove css import from sdk storybook (#54081) 2025-02-21 11:18:25 +01:00
Sébastien
73be8e8a83 Allowing users to show/hide values on their stacked series (#53835)
* allowing users to show/hide values on their stacked series

* fixup

* not showing the new widget when settings[graph.show_stack_values] === total
2025-02-21 10:18:36 +01:00
Sébastien
4de9c8d5fd Allow users to format their durations (#53898)
* added duration formatting

* added a test

* .
2025-02-21 10:18:10 +01:00
Timofey Kachalov
98da9ea0ee Remove the custom override of use-popover (#53969) 2025-02-21 13:14:45 +04:00
Timofey Kachalov
39c57131e6 Fix alert icon box-sizing (#52378) 2025-02-21 13:14:02 +04:00
Jeff Bruemmer
0981abbfdd docs - notes on EIDs and static embedding (#54098) 2025-02-20 15:41:19 -05:00
Cam Saul
ca614e63f1 Restore deleted hook file (#54096) 2025-02-20 19:14:04 +00:00
Alexander Polyankin
2a6318acfd Check for min arg count in expressions (#54012) 2025-02-20 13:38:17 -05:00
github-automation-metabase
02e29320bb Bump clj-kondo/clj-kondo from 2024.11.14 to 2025.02.20 (#54048)
* GH job to auto-upgrade backend deps weekly

* Run on push to this branch

* Run on this branch

* Disable reviewers

* Should open PR against master

* Exclude Kondo for now

* Try tagging backend dev with `reviewers`

* Run against `master`

* Set `master` as the base

* Add backend team as reviewers for deps.edn

* Enable auto-merge

* Fix antq config

* Use squash-merge

* Try creating PR using GH CLI

* Set commit username

* Set GH token

* Manually create branch

* Better branch name

* Checkout master before creating commit

* Set fetch-depth 0

* Leverage git stash

* Git diff

* Fix

* Unique branch name

* Push branch to origin

* Re-enable auto-merge

* Use GH Actions bot as author

* Open separate PRs for each dep bump

* Fix GH Action config

* Update Action name

* Fix script

* Final cleanup

* Bump clj-kondo/clj-kondo from 2024.11.14 to 2025.01.16

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.01.16/CHANGELOG.md

* Bump clj-kondo/clj-kondo from 2024.11.14 to 2025.01.16

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.01.16/CHANGELOG.md

* Bump Methodical & Toucan 2 for updated Kondo configs

* Update some Kondo configs

* Fix Kondo errors

---------

Co-authored-by: Cam Saul <github@camsaul.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-02-20 18:33:38 +00:00
Ngoc Khuat
acddb50a3b Track notification wait time and total send time (#54080) 2025-02-21 00:18:04 +07:00
Nicolò Pretto
28b11beef3 fix: remove typo from packages we remove from the filter list (#54072) 2025-02-20 17:59:16 +01:00
Alex Yarosh
ed3430dc1a Update editor.md (#54086) 2025-02-20 11:48:34 -05:00
Case Nelson
78077ba2e0 feat: Reduce cost of initial field scanning (#53387)
* feat: Reduce cost of initial field scanning

Setting a Field `has_field_values` to `:autolist` moves from classify
based on fingerprinting to the initial Field creation only based on
semantic and base types.

Querying for field values and receiving too many values or too many
bytes will no longer delete FieldValues or change Field
`has_field_values` but rather set the `has_more_values` to true.

During sync, if a `has_field_values` is `:autolist` or `:list` but
FieldValues is nil, we will not fetch a new cache of FieldValues. This
way, the only way to cache new FieldValues would be by triggering an
adhoc request to `GET /api/field/:id/values`.

* Unmark FKs as auto-list

* Fix tests to manually activate field values for param_values

* Add search to e2e helper when filter has more

* Fix e2e tests

* Fix helper

* Fixing more tests

* Fix e2e test
2025-02-20 09:06:32 -07:00
Konstantin Darutkin
398cb39a1a test: repro tests for #32750 and #41831 (#54076) 2025-02-20 15:10:18 +00:00
Edward Paget
5b153e5b54 fix: hide sqlite from engines on cloud hosting (#53702)
* fix: hide sqlite from engines on cloud hosting

* fixup! set custom driver heirarchy
2025-02-20 08:37:49 -06:00
Alexander Polyankin
10fba041f1 [Tests] BigInteger in filters - public & embedded questions & dashboards (#53955) 2025-02-20 09:11:58 -05:00
Konstantin Darutkin
465fe5aef7 fix: WRK-70 wording (#54070)
* fix: WRK-70 wording

* fix: review issues
2025-02-20 14:07:47 +00:00
Nemanja Glumac
20bf09ffc8 Upsell Performance Tools (#53720)
* Add upsell component for performance tools

* Make `tools` a regular route

When the "audit_app" feature flag is missing, we will show the upsell.
This now applies to all non-enterprise routes, which removes the need
for the route guard.

It also greatly simplifies the tools "plugin" system.

The logic is now as follows:
1. If the feature flag is enabled, the route shows enterprise component
(erroring questions page)
2. if the feature flag is not present, the route falls back to the upsell component

* Get rid of styled components

* Center the tools upsell

* Delete test case that's not valid anymore

* Add e2e coverage
2025-02-20 14:46:27 +01:00
Sébastien
dc43e40f47 Fewer warnings in the console (#53528)
* fewer warnings in the console

* fixed test
2025-02-20 13:15:04 +01:00
Uladzimir Havenchyk
89f67a2870 drop unused styled files (#54013) 2025-02-20 12:05:54 +00:00
Timofey Kachalov
636d817e71 Fix global css reset for svg elements (#53928) 2025-02-20 11:34:38 +04:00
github-automation-metabase
6127271a89 Bump io.netty/netty-buffer from 4.1.117.Final to 4.1.118.Final (#54043)
* Bump io.netty/netty-buffer from 4.1.117.Final to 4.1.118.Final

Inspect dependency changes here:

* Fix missing newline at end of file

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-02-20 01:56:10 +00:00
github-automation-metabase
87b712c945 Bump com.amazonaws/aws-java-sdk-core from 1.12.780 to 1.12.782 (#54052)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-02-20 01:36:35 +00:00
Riley Thompson
d4304f2211 Convert java.sql.Arrays to Clojure vectors (#53551)
Implements `read-column-thunk [:sql-jdbc Types/ARRAY]` to convert `java.sql.Array`s to Clojure vectors.
2025-02-20 00:16:08 +00:00
github-automation-metabase
29678e13c7 Bump com.microsoft.sqlserver/mssql-jdbc from 12.8.1.jre11 to 12.9.0.jre11-preview (#54051)
Inspect dependency changes here:

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 23:35:48 +00:00
github-automation-metabase
00995815a9 Bump io.github.clojure/tools.build from 0.10.6 to 0.10.7 (#54038)
Inspect dependency changes here: https://github.com/clojure/tools.build/blob/v0.10.7/CHANGELOG.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 23:30:30 +00:00
github-automation-metabase
5b217313a7 Bump com.facebook.presto/presto-jdbc from 0.290 to 0.291 (#54046)
Inspect dependency changes here:

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 23:29:51 +00:00
github-automation-metabase
2fd421e7c1 Bump org.xerial/sqlite-jdbc from 3.48.0.0 to 3.49.1.0 (#54050)
Inspect dependency changes here: https://github.com/xerial/sqlite-jdbc/compare/3.48.0.0...3.49.1.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 23:26:05 +00:00
github-automation-metabase
32d65255dd Bump io.github.tonsky/clj-reload from 0.7.1 to 0.8.0 (#54039)
Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.8.0/CHANGELOG.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 23:25:54 +00:00
Cam Saul
df62a1a7da GH job to auto-upgrade backend deps weekly (#53934) 2025-02-19 16:25:23 -07:00
github-automation-metabase
41ad985ce7 Bump com.google.cloud/google-cloud-bigquery from 2.46.0 to 2.48.0 (#54042)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.48.0/CHANGELOG.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 23:19:15 +00:00
github-automation-metabase
9ec45e2325 Bump com.oracle.database.jdbc/ojdbc17 from 23.6.0.24.10 to 23.7.0.25.01 (#54045)
Inspect dependency changes here:

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 23:18:58 +00:00
github-automation-metabase
50bbfc20da Bump lambdaisland/deep-diff2 from 2.11.216 to 2.12.219 (#54040)
Inspect dependency changes here: https://github.com/lambdaisland/deep-diff2/blob/v2.12.219/CHANGELOG.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 23:15:31 +00:00
github-automation-metabase
0e0b8187aa Bump com.clojure-goes-fast/clj-async-profiler from 1.6.0 to 1.6.1 (#54034)
Inspect dependency changes here: https://github.com/clojure-goes-fast/clj-async-profiler/blob/1.6.1/CHANGELOG.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 23:11:59 +00:00
github-automation-metabase
f61ca1f637 Bump com.amazonaws/aws-java-sdk-core from 1.12.780 to 1.12.781 (#54049)
Inspect dependency changes here:

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 15:06:57 -08:00
github-automation-metabase
f54ef358e8 Bump io.netty/netty-common from 4.1.117.Final to 4.1.118.Final (#54044)
Inspect dependency changes here:

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 15:04:47 -08:00
github-automation-metabase
54a3958e83 Bump org.apache.tika/tika-core from 3.0.0 to 3.1.0 (#54041)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-02-19 15:03:38 -08:00
github-automation-metabase
37bccd57f0 Bump com.clojure-goes-fast/clj-memory-meter from 0.3.0 to 0.4.0 (#54035)
Inspect dependency changes here: https://github.com/clojure-goes-fast/clj-memory-meter/blob/0.4.0/CHANGELOG.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 15:02:37 -08:00
github-automation-metabase
ef6f8a3445 Bump com.github.seancorfield/next.jdbc from 1.3.981 to 1.3.994 (#54036)
Inspect dependency changes here: https://github.com/seancorfield/next-jdbc/blob/v1.3.994/CHANGELOG.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-19 15:02:13 -08:00
Noah Moss
220d92c651 Ensure CLJS/CLJC files get translations included in the FE bundle (#53984)
* Ensure CLJS/CLJC files get translated included in the FE bundle

* Fix backend test

* clean ns

* add e2e test

* Fix another e2e test
2025-02-19 14:14:02 -05:00
Filip Hric
6b58f641bc tag test as flaky (#53980) 2025-02-19 19:47:58 +01:00
Alexander Solovyov
02b7effe1a update athena driver to 3.4.0 (#53979) 2025-02-19 19:28:17 +01:00
Nemanja Glumac
a92d113b3e Fix "Migrating to Metabase Cloud" for local dev instances (#53971) 2025-02-19 19:15:36 +01:00
Chris Truter
59974f065a Helper to simplify retrying jobs on failure (#53960) 2025-02-19 16:55:51 +00:00
Noah Moss
07591c1787 Add back discarding-rff for preemptive caching, and expand backend and e2e test coverage (#53639)
* WIP: e2e querying test for preemptive caching

* WIP restructure BE tests for better coverage

* Misc cleanup

* revert some unneeded changes

* Fix tests

* Revert some typo fixes to avoid polluting this PR

* Refactor cypress test

* Try again to fix Cypress test in CI

* Address feedback

* fix tests

* fix tests again
2025-02-19 10:41:14 -05:00
Konstantin Darutkin
524658912e fix: WRK-67 new action modal is too hard to close (#53905)
* fix: the-new-action-modal-is-too-hard-to-close

* refactor: do not use absolute positioning

* test: add tests for click outside

* fix: review issues
2025-02-19 15:35:50 +00:00
Kamil Mielnik
eecde2f2a2 Fix - Redundant GET /api/action request when viewing non-model object details (#53032)
* Fix #50266

* Add a boolean cast

* Add repro for #50266

* Improve test name

* Add RTK Query API middleware to storybook store

* Add the effect cleanup

* Fix "Promise was collected" error

* Fix other hooks

* Add missing RTK Query middleware in storybook

* Fix "Promise was collected" error

* Clean up the effect

* Fix tests

* Fix storybook setup correctly
2025-02-19 22:08:26 +07:00
Kamil Mielnik
0b7a11ef8c Fix "Promise was collected" error in visual tests (#53889)
* Add missing RTK Query middleware in storybook

* Fix "Promise was collected" error
2025-02-19 12:43:47 +00:00
Phoomparin Mano
8423d6382a fix(sdk): hide "New Question" in EditableDashboard sidebar (#53908) 2025-02-19 18:23:56 +07:00
Alexander Polyankin
96ee8b4181 Support BigInteger in filter display names (#53916) 2025-02-18 21:13:01 -05:00
Raphael Krut-Landau
b4af3f80d3 Fix env vars in embedding quickstart doc (#53931)
We're now using `VITE_METABASE_INSTANCE_URL` and `VITE_AUTH_PROVIDER_URI`: https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/blob/main/.env.example
2025-02-18 17:30:02 -05:00
Braden Shepherdson
aef9e6f5d0 [refs] Use the new entity_id on Fields as their idents (#53609)
`entity_id` columns on Databases, Tables and Fields are new in #53076.

This PR uses `entity_id` on Fields as their `:ident` in the metadata,
rather than the concatenated names previously used.

The names were a bit too fragile, since occasionally people rename
Fields or Tables in the appdb to retain the identity of something that
got renamed in place in their data warehouse. (That isn't exactly
supported, but it's also not blocked.)

With random (or hashed and saved) `entity_id`s for Fields used as their
`:ident`s instead, references to fields will not need to be updated if
fields or tables are renamed but their `entity_id`s preserved.

**On memoization**

Since the `entity_id` is `NULL` for existing fields and they're only
being populated in the background, we need to populate them on demand
when reading metadata. Since fields depend on their tables and tables on
their databases, this meant a lot of extra appdb reads at first.

This change includes memoization added to `serdes/hydrated-hash`, such
that any table or database only gets read once, and memoized forever.
There's a big comment about the memory impact of this; in summary it
should be safe since this is on demand, and holds only DBs/tables
and not fields.

A later PR will add a background job as mentioned, that will populate
all the `entity_id` columns with hashed values. After that, the cache
will always be empty.

Note that this memoization is not going to work if a table or field is
renamed before the background job catches up! I consider this an
acceptable loss - renaming fields is an admin action that requires
editing the appdb. The guide for doing that can include making sure all
`entity_id` fields are populated first.
2025-02-18 15:19:21 -05:00
bryan
da0ad760c9 auto cljfmt on commit hook (#53922) 2025-02-18 19:40:56 +00:00
Ryan Laurie
298e277678 remove settings access as a requirement to use the bug reporter (#53795) 2025-02-18 18:50:00 +00:00
Filip Hric
f1ccaa92bb fix flaky test (#53906) 2025-02-18 19:42:42 +01:00
Filip Hric
0e79002c65 fix flaky test (#53904) 2025-02-18 19:42:31 +01:00
Edward Paget
6825c1d661 fix: use standard user order sort for group list (#53722)
* fix: use standard user order sort for group list

* fixup! remove alba from user fixtures

* fixup! better user model creation

* fixup! remove test-user? filter

* fixup! remove added test and use exisiting sort test
2025-02-18 12:15:37 -06:00
Edward Paget
f71261ed85 fix: allow google auth when throttling is disabled (#53788) 2025-02-18 12:08:19 -06:00
Edward Paget
93231acba1 fix: allow password reset if google sso disabled (#53865)
* fix: allow password reset if google sso disabled

* fixup! correct arg type to keyword in message test

* fixup! remove empty line

* fixup! add public docstring

* fixup! add temp google client id
2025-02-18 10:52:26 -06:00
Stas Gavrylov
4d3579d86c Add stasgavrylov to team directory (#53915) 2025-02-18 18:18:16 +02:00
Aleksandr Lesnenko
b527e6fb4d fix mantine viz settings widgets (#53801) 2025-02-18 10:19:30 -05:00
Roman Abdulmanov
1efe670d4e Removed beta badge for the SDK (#53596) 2025-02-18 15:06:32 +00:00
Ngoc Khuat
5fa8d46476 Buckets for notification send duration ms histogram (#53882) 2025-02-18 20:40:55 +07:00
Nicolò Pretto
f5a0c34650 fix: <Text span not being a span (#53876)
* fix: <Text span not being a span

* convert all `span` to `component="span"` in the codebase
2025-02-18 13:56:53 +01:00
Nicolò Pretto
4decb23b5f fix: text color not being brand in embed modal (#53877) 2025-02-18 13:56:38 +01:00
Konstantin Darutkin
e556e552b3 chore: add spalt08 as a team member (#53886) 2025-02-18 12:05:15 +00:00
Romeo Van Snick
22eda01994 Fix usage of native editor in some e2e tests (#53581)
* Use NativeEditor.type in test

* Use NativeEditor.type in all tests that aren't

* Stop using .as(editor) for native editor

* Do not return anything from startNewNativeQuestion to avoid confusion

* Fix more tests

* Fix movetostart/movetoend
- Ctrl + A is "select all" on non-apple machines, but on apple machines it's same as "home"

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-02-18 10:50:10 +01:00
Mahatthana (Kelvin) Nomsawadi
12bf97e256 Disallow console.log in unit tests (#53871) 2025-02-18 09:05:10 +00:00
Alexander Polyankin
fa3b58002b Make BigInteger dashboard id parameters work (#53808) 2025-02-18 04:05:54 +00:00
Phoomparin Mano
8af4499d47 fix(sdk): auto-select sample database tables in cli (#53654)
* auto-select tables in sample databases

* use people, orders and products

* use non-underscore variants
2025-02-18 04:32:42 +07:00
Phoomparin Mano
62a82340e1 docs(sdk): document sample components generated by cli (#53695)
* document sample cli components

* document the demo providers

* update docs
2025-02-18 04:31:31 +07:00
Phoomparin Mano
f957817f70 feat(sdk): asks whether to add a db right before adding db connection in the cli (#53680) 2025-02-18 04:05:16 +07:00
Noah Moss
bb27e2f96c Error explicitly when sandboxing/impersonation configs conflict (#53849)
* Error explicitly when sandboxing/impersonation configs conflict

* Fix tests

* Fix kondo warning, use consistent ns aliases

* Fix another test

* Cleanup, consistent aliases

* Add an extra check of *current-user-id*
2025-02-17 15:55:24 -05:00
Oleksandr Yakushev
ca0a16e7d7 [pulse] Optimize memory usage email notification rendering (#53717) 2025-02-17 23:06:25 +03:00
appleby
a304019cf6 Fix brush filters for longitudes that lie outside the normal -180 to 180 range (#53342)
* Wrap east/west filterBounds to [-180,180] in LeafletMap.jsx

* Split filters that cross the antimerdian into two parts in update-lat-lon-filter

If the bounds cross the 180th meridian, split the filter into two parts ORed togehter. One part covering the
[west, 180] range and the other covering [-180, east].

* Add tests for bounds crossing the antimerdian

* Rename longDelta to lngDelta to conform to standard leaflet abbreviation

* Review feedback: use shorthand notation for east and west filterBounds

* Add e2e tests

* Fix existing e2e test

realMouseDown expects to have x and y coords passed in an options map.

* Use common pinMapSelectRegion test helper in new e2e tests
2025-02-17 12:04:59 -08:00
John Swanson
bcc2c7a00f Allow specifying a dashboard tab for DQs (#53615)
When creating a DQ, or moving a card to a dashboard, allow specifying a
dashboard_tab_id (the tab to move it to).
2025-02-17 11:52:39 -08:00
github-automation-metabase
917ff25970 Update Readme version references and published npm version to 0.54.1-nightly (#53851) 2025-02-17 19:36:25 +00:00
Alex Yarosh
34d30973f0 docs: Funnel chart (#53792)
* funnel docs

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* steps

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-02-17 18:36:09 +00:00
Jeff Bruemmer
7789855a1b api docs (#53846) 2025-02-17 18:17:07 +00:00
Alex Yarosh
df459b77dc Update model-persistence.md (#53807) 2025-02-17 12:35:01 -05:00
Nicolò Pretto
2e731dbbd8 fix(sdk): filter out some deps that may require @types/react (#53821) 2025-02-17 18:14:52 +01:00
Nicolò Pretto
d3f0a4b1b2 fix(sdk): handle 'personal' for collectionId when creating dashboards and in the collection browser (#53553)
* wip logic to handle 'personal' for collectionId when creating dashboards

* unit test for useCreateDashboardApi supporting 'personal'

* add e2e test for createdashboardmodal

* collection browser support for 'personal'

* some actual decent logic

* change jest tests to use root collcetion

* fix type error in stories

* fix create dashboard modal support for root

* yeah i shouldn't have commited a .only

* self review, better docs + removed un-used type

* typo

* another step of self review: changed comments and removed useless
beforeEach

* updated docs

* Apply suggestions from code review

Co-authored-by: Phoomparin Mano <poom@metabase.com>

* re-format file after suggestions were applied from gh

* refactor(e2e): use cy.wait().then instead of let =

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-02-17 17:54:21 +01:00
Jeff Bruemmer
57a82b636f Update mustache to include docs metadata (#53832) 2025-02-17 16:34:57 +00:00
Noah Moss
e0b0640b10 Enable pivot tables with only pivot columns (#52864)
* Enable pivot tables with only pivot columns

* Re-add one condition so that tests pass

* Tweak logic

* Fix logic again, and add cypress test

* Try again to fix conditional
2025-02-17 09:59:39 -05:00
bryan
d98832fb18 make links in slack bug report descriptions clickable (#53782)
* pull description out into a mrkdwn block,

- which gets links parsed out automatically

* cljfmt fix
2025-02-17 13:44:33 +00:00
Sébastien
cfda0fb8ed Field select fix (#53759)
* fixed color selection and reordering on columns

* test

* added drag and drop expectation
2025-02-17 14:14:00 +01:00
Alexander Polyankin
1aa96ab121 filter-bigint.cy.spec.ts flaky test fix (#53806)
* Fix flaky bigint test

* Fix flaky bigint test

* Fix flaky bigint test

* Fix flaky bigint test

* Perf fix

* Perf fix

* Perf fix
2025-02-17 12:10:03 +01:00
Filip Hric
e380d347a6 Dev 344 remove flaky tag from tests that are stable (#53669)
* add eslint rule that prevents incorrect order of helpers

* remove flaky tags and stabilize tests
2025-02-17 09:58:51 +01:00
Fraser
d8ed6a46df Ensure menu text hover colors correctly with inherit (#53433)
* Ensure menu text hover colors correctly with inherit

* Remove Text component from Menu Items
2025-02-17 08:45:38 +13:00
Cam Saul
c14d89e731 [Backend modularization] public-sharing module and fix bad config c… (#53800)
* [Backend modularization] `public-sharing` module and fix bad config changes

* One more pass

* Another pass
2025-02-15 06:07:23 +00:00
Alexander Polyankin
6e1690db35 Fix flaky bigint test (#53802)
* Fix flaky bigint test

* Fix flaky bigint test

* Fix flaky bigint test
2025-02-15 05:26:56 +00:00
Tyler Plude
ed6b817ff1 Fix trend lines in slack alerts VIZ-272 (#53711)
* Enable results metadata during qp/process-query as it seems to also control insights which we need for slack alert trendlines

* Removing outdated alerts w/ models test
2025-02-14 15:51:27 -08:00
Tyler Plude
121718dd5a Fixing broken description column in static viz tables (#53726)
* Fixing broken description column in static viz tables

* Fixing unit tests
2025-02-14 15:51:09 -08:00
bryan
fd00f8dcfb Wrap analytics into a module (#53476)
* wrap analytics into a module

* cleanup

* update config + use the analytics core api

* break circular dependency

* whitespace linter

* tests were using snowplow/first-user-creation

* ::snowplow/x -> :snowplow/x

* snowplow -> analytics

* indent

* indent2

* break cyclic dep

- add dev/mermaid.clj

* break another cycle

* remove internal api namespace references

* remove more internal api namespace access

* and another

* prometheus -> analytics

* allow access of activity-feed.init

* remove duplicate require

* fix e2e test + spelling + docs
2025-02-14 22:51:33 +00:00
Cam Saul
9a7cbd0ba4 [Backend modularization] model-persistence module (#53573)
* [Backend modularization] `model-persistence` module

* Move persistence-related API endpoints

* Event schema improvements.

* Convert custom Kondo macro to custom hook

* Update modules config
2025-02-14 22:11:06 +00:00
Case Nelson
7402c31488 fix: add logging during connection health checks (#53781)
* fix: add logging during connection health checks

Trying to get ahead of #52458, add logs around startup health checks

* Add log for when health check is queued
2025-02-14 21:36:22 +00:00
Ryan Laurie
369d49c8d6 Fix rerun workflow again (#53753)
* use workflow name instead of id

* remove test code
2025-02-14 13:58:18 -07:00
Jeff Bruemmer
8db50e3bfe docs - remove duplicate entry (#53779)
* Update other-env-vars.md

* remove dupes
2025-02-14 20:48:42 +00:00
Cam Saul
bc54de38b3 [Backend modularization] SSO module (#53729)
* [Backend modularization] SSO module

* Test fixes 🔧

* Test fix 🔧
2025-02-14 20:44:00 +00:00
Cam Saul
56131a0fd8 [Backend modularization] login-history module (#53723)
* [Backend modularization] `login-history` module

* CODEOWNERS

* Test fix

* Test fix 🔧
2025-02-14 19:39:34 +00:00
lbrdnk
d5a493eb9a Querying generative testing milestone 1 (#53300)
* Use with-generator

* Replace for tu.rng

* Add ref to workflow, rename env

* Rename vars

* Remove former random ns

* Typo

* Adjust log level

* random-query-from

* Use random-query-from

* Adjust random exception handling

* Add with-gentest kondo hook

* Initial version of with-gentest

* Logging in test assertions

* Workflow, env var names, logging

* Remove redundant code

* Newline

* Seed for non exceptional queries

* Naming

* Cleanup

* Atom for seed

* Cleanup

* Whitespace

* Kondo

* Temporarily fix schema and suppress full-join, to be rebased out later

* Update .github/workflows/generative-query-test.yml

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* Update test/metabase/test/gentest.clj

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* Remove stale comment

* Use tu.rng

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-02-14 19:51:42 +01:00
Aleksandr Lesnenko
143c024538 fix missing pointer cursor on viz options action button (#53731) 2025-02-14 14:04:08 -04:00
Nicolò Pretto
1e1a8ffa0e fix(sdk): filterout @types/react from the generated package.json (#53747) 2025-02-14 18:32:09 +01:00
Case Nelson
bfacd62e02 fix: handle ambiguous snowflake connections (#53645)
* fix: handle ambiguous snowflake connections

* fix tests that were passing in boolean

* Better normalization check for private-key-id

* Fix formatting
2025-02-14 10:16:21 -07:00
Cam Saul
d58ba412ae [Backend modularization] session module (#53718)
* [Backend modularization] `session` module

* Add CODEOWNERS
2025-02-14 10:08:03 -07:00
Cam Saul
6d60452933 [Backend modularization] improve deps graph tooling (#53643) 2025-02-14 10:06:24 -07:00
Cam Saul
909be60ee0 [Backend modularization] cloud-migration module (#53578) 2025-02-14 10:03:23 -07:00
Jeff Bruemmer
54444ef9ed docs - notes on db version support (#52136) 2025-02-14 14:53:05 +00:00
Edward Paget
8634f23926 chore(ci): update sql server runner to ubuntu 22 (#53683) 2025-02-14 08:45:32 -06:00
Romeo Van Snick
4bc0070a57 Update esbuild to fix dependabot alert (#53740)
* Update esbuild to fix dependabot alert

* Update esbuild in release folder
2025-02-14 14:24:32 +01:00
Alexander Polyankin
d9b7bcd251 Fix dashboard drills and between filters with BIGINT (#53705)
* Improve ID test

* Improve ID test

* Improve ID test

* Improve ID test

* Add a test

* Between test

* Between test

* Between test

* Between test

* tests

* tests

* tests

* tests

* tests

* tests

* tests

* tests

* tests

* tests

* tests

* tests

* tests

* tests

* tests
2025-02-14 12:00:26 +00:00
Nemanja Glumac
2687cc4b61 Upsell Cloud (#53632)
* Make the UpsellBigCard more flexible

The product requirements for the Cloud upsell dictate that
the main CTA doesn't directly lead to Metabase website like in
all other cases. It opens a Migration modal instead.

UpsellBigCard had to be adjusted to enable that.

* Add Upsell Cloud component


* Resolve CLO-3576

* Use the cloud upsell instead of the previous CTA

* Adjust the UI

* Update stories

* Update related test

* Fix e2e test

* Add context for translators

* Adjust the vertical spacing
2025-02-14 11:17:35 +00:00
Romeo Van Snick
39372f2b1a Update mocha to fix dependabot issue with serialize-javascript (#53739) 2025-02-14 11:25:46 +01:00
Romeo Van Snick
e4a00c17fc Update elliptic to ^6.6.1 (#53738) 2025-02-14 11:25:37 +01:00
Nicolò Pretto
e88873a099 chore: remove suppressNextjsWarning() call from mantine (#53690)
* chore: remove suppressNextjsWarning from mantine

* also change cjs in case some builds uses that
2025-02-14 09:47:33 +01:00
metamben
8290d9d56e Export metabase.query-analysis.native-query-analyzer/tables-for-native (#53712) 2025-02-14 06:07:29 +02:00
appleby
92ad76a065 Do not :return-drills-for-dimensions? for column header drills (#52716)
* Don't :return-drills-for-dimensions? for header-context-only drills

Dimensions can never have a "missing" value, i.e. (nil? value), and so none of these drills will ever apply when
called with a context built from dimension-contexts.

* Add comment with updated table for Pivot Cell clicks
2025-02-13 16:38:46 -08:00
Fraser
670d5274cc Push button to the end of the table cell (#53496) 2025-02-14 11:59:37 +13:00
Cam Saul
0b4dd2e756 [Backend modularization] tiles module (#53577)
* [Backend modularization] `tiles` module

* Field IDs cannot be zero
2025-02-13 21:56:09 +00:00
Braden Shepherdson
b6d08d7bb4 [refs] Don't randomize entity_ids for databases, tables or fields (#53704)
#53076 added `:hook/entity-id` for databases, tables and fields, but this is incorrect behaviour.

The sync process periodically detects new tables and fields and adds them to the appdb. If multiple instances of Metabase are connected via serdes, and linked to the same data warehouses, then eg. a new table would get duplicated before the serdes process would be run.

Instead, the `entity_id`s should be based only on the hashes, the same as serdes for databases, tables and fields.
2025-02-13 21:54:19 +00:00
Nick Fitzpatrick
156a329589 fixing some composed modals, porting badge component (#53716) 2025-02-13 17:51:43 -04:00
Cam Saul
3b627d1bb9 [Backend modularization] More pulse module cleanup (#53579)
* [Backend modularization] `pulse` module cleanup

* Move Pulse API endpoints into `pulse` module

* Move metabase.api.alert into `pulse` module

* Fix docstring

* Move Card and Dashboard pulse-updating code into the `pulse` module

* cljfmt
2025-02-13 20:44:50 +00:00
metamben
3cc92a3ba6 Remove unused type (#53701)
The linter is complaining.
2025-02-13 20:31:03 +00:00
Nathan Voxland
843f81aa22 Fetch permissions for all databases when looking up db permissions (#53491)
Extracted db permission caching to a function so that it can be called on demand when we know we will need to check a lot
2025-02-13 13:34:57 -06:00
Nick Fitzpatrick
2ea0a694d6 Remove css vars on unit tests (#53703)
* remove css vars on unit tests

* weird lint issue
2025-02-13 15:21:03 -04:00
Jeff Bruemmer
4b97475050 docs - md links (#53606) 2025-02-13 12:27:17 -05:00
Eric Normand
7ef645bd27 Cast date binning back to date in postgres (#53499)
* Cast date binning back to date in postgres

* Remove unnecessary conversion to timestamp

* Fix existing test.

* Test that temporal columns don't change type when binned.

* Fix bucketing for postgres days

* Improve comment about casting interval addition

* Select single field in test for robustness

* Tag :to_timestamp to avoid other areas adding a type

* Whitespace

* Remove blank line at end of file

* Don't cast if type is nil.

* Add alias to native query in test

* Fix redshift
2025-02-13 17:19:11 +00:00
Eric Normand
3bb9478215 Pass temporal unit when listing quick-filter options. (#53626)
* Pass temporal unit when listing quick-filter options.

* Use with-temporal-bucket like a gentleman

* Use lib.temporal-bucket/temporal-bucket

* Whitespace
2025-02-13 17:16:48 +00:00
Edward Paget
42cbd634a2 fix: allow update last_used_at in read-only mode (#53633)
* fix: allow update last_used_at in read-only mode

* fixup! use temporary settings helper

* fixup! kondo
2025-02-13 16:40:09 +00:00
Phoomparin Mano
b0900d88f0 feat(sdk): add Next.js compatibility to embedding cli (#50281)
* check if the project is a nextjs project

* add nextjs imports and exports for nextjs projects

* add comments

* add notice on analytics.css and link to guide

* fix typo

* update snippet

* normalize path

* quote import path

* update generated directory

* use fileName for sampleComponents

* remove getImportSnippet

* use nextjs imports from the compatibility layer

* remove use client and export default from snippets

* fix checkIsInNextJsProject import

* add use client directive to pages with useReducer

* add suggestions on module resolution

* make import paths reasonable for next.js

* add example _app.tsx snippet

* trim snippets for Next.js

* show custom app snippets separately for next

* auto-generate custom app

* fix file extension

* do not show the react import step in nextjs

* add default root layout or app

* refine root layout generation logic

* add comments on root layout generation

* add next.js route to app and pages router

* add notes on API routes

* only generate AnalyticsPage when not using nextjs

* use writeFileSync

* create directory if it does not exist

* add messages on route created

* remove AppProps type from snippets

* inform users that a custom root layout has been added

* wait for root layout snippets to be ready

* use the correct layout file name in message

* cleanup snippet message

* highlight the layout file

* temporarily remove the moduleResolution warning

* cleanup messages helper

* cleanup exports

* cleanup analytics page snippet

* restore analytics.css

* add more info on the default provider

* fix whitespace in imports

* add a use-client directive to EmbeddingProvider

* highlight the analytics demo route

* add a sans-serif font by default

* do not show the Express server message if Express server is not there

* use glob to simplify path matching

* make analytics page snippet function pure

* make custom app snippet function pure

* add support for src directory

* add source prefix in router resolution

* trim layout snippet header and add eta

* strip the source prefix from import paths

* make src dir a constant

* add lightweight margin reset to sample analytics.css

* consistent source prefix

* parameterize the route name

* cleanup snippet whitespace

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* rename to getNextJsPagesWrapperOrAppWrapperSnippet

* consolidate snippets file

* inline hasNextJsCustomAppOrRootLayout

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-02-13 23:32:46 +07:00
Phoomparin Mano
af7227e8d9 feat(sdk): pro license setup in cli defaults to false (#53655) 2025-02-13 23:05:12 +07:00
Alexander Polyankin
2ed9f0ac7c BIGINT (INT64) support in parameters (#53630) 2025-02-13 11:02:45 -05:00
Phoomparin Mano
8aa6ee0ed7 feat(sdk): add the instance url to the cli's login json file (#53469) 2025-02-13 22:20:47 +07:00
Phoomparin Mano
8a651a248b feat(sdk): abort cli with message when react version is unsupported (#53656)
* improve unsupported react version message

* do not allow continuing when React version is unsupported

* updated sample url to nextjs
2025-02-13 22:20:12 +07:00
Nathan Voxland
d56da1a054 Renamed cleanup-session to cleanup-session! (#53481) 2025-02-13 09:19:13 -06:00
Filip Hric
4ed93618c2 add eslint rule that prevents incorrect order of helpers (#53666) 2025-02-13 15:55:00 +01:00
Kamil Mielnik
a13e45b0ec Fix - Frozen UI after viewing a table with missing fields in the metadata browser (#53600)
* Add repro for #53194

* Add comments

* Fix typos

* Fix #53194

* Fix test

* Abandon ref approach, instead make sure that hook deps don't change on every render (tableId)

* Drop use-safe-async-function

* Revert changes to fix tests

* Revert
2025-02-13 14:54:08 +00:00
Mahatthana (Kelvin) Nomsawadi
4bb25512dc Speed up SDK build (#53537)
* Speed up SDK build

* Update package.json

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

* Update yarn.lock since package.json changed

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-02-13 13:02:02 +00:00
Ngoc Khuat
a0378ba230 Notification metrics (#53289) 2025-02-13 12:11:37 +00:00
Kamil Mielnik
842fa1a0fe Fix no-unused-vars ESLint rule config (#53648)
* Fix no-unused-vars config by adding sole underscore checks

* Fix unused underscores
2025-02-13 18:10:50 +07:00
Mahatthana (Kelvin) Nomsawadi
ac4f6f6663 Fix type failures from merge conflicts (#53647) 2025-02-13 09:26:01 +00:00
Kamil Mielnik
9c00839e0a Fix - Field tooltip text overflowing in filter modal (#53045)
* Fix #50731

* Revert first fix as design team said there's a better way

* Remove HackyInvisibleTargetFiller

* Use max-width instead of width to prevent overflow if there's less than 300px available

* Add a repro for #50731
2025-02-13 14:30:38 +07:00
Cam Saul
f88dafb8be [Backend modularization] Module linter 2.0 and other MEGA improvements (#53583)
* [Backend modularization] Module linter 2.0

* Much improved linting

* Amazing module deps graph helper tools

* Remove stray println

* Sort namespaces

* Test fixes 🔧
2025-02-12 17:35:12 -08:00
Noah Moss
6168ee8c88 Bump icu4j (#53544) 2025-02-12 17:57:11 -05:00
Oleksandr Yakushev
633f657a1c [mbql] Use more efficient keywordize-keys during normalization (#53432) 2025-02-12 21:42:23 +00:00
Ryan Laurie
4edfe1377a update rerun job to work with new master test workflow (#53635) 2025-02-12 14:34:04 -07:00
William
dc72ee9722 String fields fetch field type info from :field_ref as well as :source_metadata (#53569)
When wrapping literal values in :value clauses, fields with string-type ids (for example, fields after an aggregation)
were getting their type info from source-metadata.  When the field in question was a postgres enum, the source
metadata was missing important data.  Fetching info from both source-metadata and the type info of field-ref fixes
that.
2025-02-12 15:28:43 -06:00
Noah Moss
ce285ce1af Revert discarding-rff for preemptive caching (#53631) 2025-02-12 21:16:01 +00:00
Braden Shepherdson
4972d25abe [refs] Add entity_id columns to databases, tables, fields (#53076)
These three entities have previously used their names as their serdes
keys. The names are still used for serdes but we want opaque, stable
`entity_id`s as well so that they can be used as `:ident`s in the field
refs overhaul. Then the name of a database, schema, table or field can
be changed without its `:ident` changing, and therefore without breaking
any questions that reference it.

* Updating the v2 serdes baseline export - it has `entity_id`s now

* Updating the exported audit database; it has entity_ids now

* Fix MySQL appdbs

Use lower case for all table/field names; hard-code the schema
"PUBLIC". (The actual schema for appdb is ignored.)
2025-02-12 21:13:34 +00:00
Nemanja Glumac
3a3d8028ec Use gap instead of spacing Mantine components (#53629) 2025-02-12 20:56:06 +00:00
Alexander Polyankin
f0abe274a7 Unify parameter parsing utils (#53610) 2025-02-12 15:34:21 -05:00
Alexander Polyankin
73737673cf Cleanup bigint usage in QB filters (#53607) 2025-02-12 15:34:12 -05:00
Ryan Laurie
2df4df7a8c Adjust Smoke Tests (#53542)
* run all smoke tests on OSS tests regularly

* skip certain smoke tests for oss v EE

* or not and

* union

* update prerelease tests

* run smoke tests on OSS except EE
2025-02-12 12:51:06 -07:00
Nemanja Glumac
1e486af5ee Upsell whitelabel (#53566)
* Add upsell for whitelabel/appearance

The most important change this PR introduces is a whitelabel route that's now present in the OSS and starter plans. How this works now:

- When the whitelabel token feature is not present, the route `/admin/settings/whitelabel` shows the upsell page
- When the whitelabel token feature gets activated, the route `/admin/settings/whitelabel` gets redirected to `/admin/settings/whitelabel/branding` and the upsell page is not visible anymore.
2025-02-12 20:45:52 +01:00
Jeff Bruemmer
a101797f95 docs - note on questions into models (#53620) 2025-02-12 14:00:59 -05:00
Ryan Laurie
621ea1feca Mantine v7 (#51144)
* Mantine v7-1 squash

update deps

update UI configs

easy fixes

happy little typescript

updates after rebase

test fixes

fix rebase issues

admin-2, collections, custom-columns, dashbaord and dashboard-cards suites

fix clause popovers

fixing rebase issue

more rebase sadness:

more e2e

autocomplete adjustment

fixing nested popovers

adjusting a couple more pickers

more e2e fixes

fix mantine provider, searchbox errors

unit test adjustments

theme colors, filter labels

Relative Date Picker

more unit test fixes

* e2e adjustments

* [MANTINE] ci: find css variables that are used but never defined (#52947)

* ci: find css variables that are used but never defined

* only search in frontend and enterprise/frontend

* whitelist mantine css variables

* temporarily allow some css variables

* read mantine variables directly from mantine css file

* UI Regressions

* lint and type fixes. green unit test

* Cherry pick updates to the never defined variables script (#53049)

* Update bin/find-never-defined-css-variables/find-never-defined-css-variables.ts

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* test: checks that it doesn't confuse definitions with usages

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* more adjustments for e2e tests

* adjustments

* embedding sdk green, maybe unit tests?

* loki regressions

* test(sdk): migrate theme provider test to e2e to work with mantine v7 (#53290)

* test: migrate theme provider test to e2e to work with mantine v7

* re-put there things i removed by mistake

* preview and type fixes

* I think I'm making this better?

* fixing colors, unit tests

* scoping css vars and static classes, other things

* class prefix, scoping input css

* small adjustments

* shamelessly poach Nicolo's commit

* small fixes, should make Kamil happy :)

* finally green!

* type check

* chartsettingsinput fixes

* silly number types

* Adjustments for loki tests

* type fix

* undo Question View Download changes

* adjusting smart scalar

* updating loki reference

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-02-12 14:56:43 -04:00
Alex Yarosh
3579cd040e docs: usage analytics when upgrading (#53619)
* Update usage-analytics.md

* Update docs/usage-and-performance-tools/usage-analytics.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-02-12 18:34:11 +00:00
Ryan Laurie
97330f0ae4 Smooth out some rough edges for local e2e tests (#53576)
* smooth out some rough edges for local e2e tests

* note for the normies

* remove premium embedding token

* add note about h2 app db

* update config file stuff
2025-02-12 11:00:19 -07:00
Alex Yarosh
fb97b96f69 Update activating-the-enterprise-edition.md (#53613) 2025-02-12 12:30:18 -05:00
Edward Paget
4bea4abf5a fix: return 204 on nonpersisted card unpersist (#53554)
changes API behaviour to give us a 204 instead of 404 status code when
calling unpersist on a card that does not have a persistedinfo model
2025-02-12 10:59:28 -06:00
lbrdnk
10cb07dfa3 Fix typos and add tests (#53449) 2025-02-12 16:28:31 +01:00
Gustavo Saiani
a0fc9340c6 Update link (#53603) 2025-02-12 14:41:14 +00:00
Nemanja Glumac
9c6e187fdb Introduce the Upsell Big Card component (#53495) 2025-02-12 15:19:03 +01:00
Romeo Van Snick
495776dc1e Pass missing native extras when switching databases (#53302)
* Allow passing native extras to withDifferentDatabase

* Pass empty nativeExtras when switching databases

* Add reproduction for 53299

* Do not pass nativeExtras to withDifferentDatabase

* Do not update native-extras when chaning databases

* Remove with-extras overload on with-different-database

* Remove native-extras for with-different-database call sites

* Remove required throw from test

* Remove collection requirement from test
2025-02-12 14:51:04 +01:00
Ngoc Khuat
c9af783134 small fixes I found during hackathon (#53593) 2025-02-12 13:23:48 +00:00
Cam Saul
520f30b3f3 [Backend modularization] indexed-entities module (#53563)
* [Backend modularization] `indexed-entities` module

* Fix CODEOWNERS

* Update .github/CODEOWNERS

Co-authored-by: bryan <bryan.maass@gmail.com>

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-02-11 23:53:10 +00:00
Cam Saul
8a0e48b038 [Backend modularization] segments module (#53559) 2025-02-11 23:09:46 +00:00
Riley Thompson
d19d0bd01a Convert Postgres array columns to vectors (#53151)
* convert pgarray to java array

* convert array to vector early

* add test and todo comment

* fix whitespace

* add tests for caching and emailing

* whitespace

* use feature and test other drivers

* update test names

* deduplicate native array methods

* remove vertica

* remove http from array agg test

* remove let
2025-02-11 16:19:58 -05:00
Noah Moss
fc4a83f9fa Perf & correctness fixes for preemptive caching (#53328)
* Two potential performance fixes for preemptive caching

* Test fixing, cleanup

* Address feedback

* Update cache.clj

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Fix tests + update function name

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-02-11 15:49:19 -05:00
Alexander Polyankin
ac982ba47b type/BigInteger support in filters in the QB (#53326) 2025-02-11 20:32:58 +00:00
Cam Saul
5cdb9aeb17 [Backend modularization] More xrays module cleanup (#53426)
* [Backend modularization] More `xrays` module cleanup

* Rename test namespaces

* Sort namespaces

* Test fixes 🔧
2025-02-11 20:28:20 +00:00
Romeo Van Snick
972530b4b4 Fix model native editor render loop (#53526)
* Remove explicit focus call on mount

* Only call onSelectionChanged when the selection changes
2025-02-11 21:15:31 +01:00
Uladzimir Havenchyk
3353942052 fix: allow using long name in save question modal (#53232)
* fix: allow using long name in save question modal

* fixup

* adjust styles

* fix e2e test

* fix selector

* fix test
2025-02-11 17:48:00 +00:00
Jeff Bruemmer
1b6b0e4e65 model details (#53549) 2025-02-11 12:44:50 -05:00
Jeff Bruemmer
e3f5a8fa02 docs - dashboard duplication note (#53546) 2025-02-11 11:47:56 -05:00
Jeff Bruemmer
59b1c333bc docs - Entity IDs for interactive embedding (#52992) 2025-02-11 10:59:48 -05:00
Filip Hric
a09a2afb05 fix test flake (#53530) 2025-02-11 14:37:24 +01:00
Filip Hric
445bf5fd4e fix test flake (#53519) 2025-02-11 13:18:48 +01:00
Romeo Van Snick
9625969eab Remove color for codemirror identifier token (#53480)
* Remove color for codemirror identifier token

* Add exclude to keywords for h2
2025-02-11 12:09:42 +01:00
Filip Hric
bb9c605f9e add new script to stress test workflow file (#53522) 2025-02-11 10:53:46 +00:00
Sébastien
34d4548595 fixes offset images when dnd-ing columns in dashcards (#53112)
* fixes offset images when dnd-ing columns in dashcards

* we should be grateful for e2e tests

* -> mantine style prop

* fix this in the sortable list while I'm at it
2025-02-11 11:32:37 +01:00
Uladzimir Havenchyk
5094cb83a8 fix: correct layout for duplicate modal when question name is long (#53363)
* fix: correct layout for duplicate modal when question name is long

* Update e2e/test/scenarios/question/saved.cy.spec.js

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Update e2e/test/scenarios/question/saved.cy.spec.js

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* address review

* address review

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-02-11 10:32:25 +00:00
Sébastien
3c97adc08f reset title to default now reflects reality (#53121) 2025-02-11 10:25:24 +01:00
Sébastien
756d0188e0 an attempt te reduce the spam in the dev console (#53214) 2025-02-11 10:25:11 +01:00
Phoomparin Mano
e81a4d3808 feat(sdk): show clarification messages upon running the cli (#53471)
* add clarification message to the cli

* update cli startup message

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* line-wrap the cli startup message

* use metaba.se/sdk for docs link

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-02-11 15:39:23 +07:00
Cam Saul
f236589153 [Backend modularization] revisions module (#53419)
* Revisions module

* Test fixes

* Remove legacy-metric impl

* Fix CODEOWNERS

* Cleanup

* Merge fixes
2025-02-10 22:29:23 -08:00
Mahatthana (Kelvin) Nomsawadi
0faa1b815e Improve type clarity (#53444) 2025-02-11 05:41:50 +00:00
Cam Saul
869d810773 Actions module cleanup (#53424)
* Actions module cleanup

* Sort namespaces
2025-02-11 03:28:05 +00:00
Cam Saul
7fc08ff0e1 [Backend modularization] activity-feed module (#53427) 2025-02-10 19:53:34 -07:00
Cam Saul
a9732409d7 [Backend modularization] Bookmarks module (#53417) 2025-02-10 19:47:35 -07:00
Fraser
410d7e6b53 remove unused test script (#53497) 2025-02-11 15:01:13 +13:00
Ryan Laurie
ecabdc59ec fix output var (#53498) 2025-02-10 16:39:45 -07:00
Jeff Bruemmer
da8a48b462 docs - update env var doc strings (#53268) 2025-02-10 22:06:31 +00:00
John Swanson
db26eebe3f Don't cache query results for impersonated users (#53489) 2025-02-10 14:04:42 -08:00
Ryan Laurie
7c010114d4 Allow Double (and Triple) Backports via label (#53201)
* Allow for 1-3 automatic backports via github label

remove other backport workflow

* remove test code

* fix pr ref

* remove unused env

* remove test code

* fix whitespace
2025-02-10 14:20:01 -07:00
Edward Paget
9748d41f4a Add edpaget to team files (#53490) 2025-02-10 14:55:43 -06:00
Jeff Bruemmer
ef8c3f2342 add frontmatter to api docs (#53488) 2025-02-10 15:45:02 -05:00
Nathan Voxland
f8bbd9ecc2 Limit last-id queries in SQL to improve performance (#53088) 2025-02-10 13:23:28 -06:00
Luis Paolini
6c0dedbb73 Fix multi-arch uberjar preview builds (#52897)
* Remove silent flag and re-enable multi-arch build

Check what's going on here

* test code

* fix test code

* Update Dockerfile_ubuntu

Fixes the multi-arch build

* Update Dockerfile_ubuntu

Have a feeling that the ca-certificates-java is making a mess here

* Update uberjar.yml

Add the logging to the process

* Update Dockerfile_ubuntu

* Update uberjar.yml

* Update run_metabase.sh

ensure the path lives with the user

* Update uberjar.yml

Alpine 21 is multi-arch, we should have that as well in the build script along ubuntu

* Update uberjar.yml

push explicitly all platforms

* Update uberjar.yml

Update actions to see if platform flag works

* Update uberjar.yml

This should push the multi-arch images without building again 🤞🏻

* Update uberjar.yml

return to old versions, just to keep stuff more consistent

* Update uberjar.yml

fix typo

* remove test code

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-02-10 19:10:47 +00:00
Filipe Silva
1ddf10f00a feat: use liquibase session lock instead of transaction lock (#53158)
* feat: use liquibase session lock instead of transaction lock

Prevent the migration lock class of errors in non-h2 dbs by using a liquibase session lock instead of a transaction lock.
This type of lock would clear automatically when the connection closes for any reason.

Using this approach there is no need for the metabase release lock command except with h2.
The force migration command still is applicable though, as it does more things than just release the lock.

See https://github.com/blagerweij/liquibase-sessionlock

Fix #50212

* fix: mark migration 109 as none db

From Nathan Voxland:

From a liquibase-standpoint, deleting the changesets are just fine. As long as you don't accidentally reuse the id+author+path combo in the future. Databases that already ran it will not care that it's missing and new databases will just never see it to know. So it's more of an our-standards questions.

Alternately, you can set dbms="none" to keep it in the file but not have it actually apply anywhere. That doesn't change the checksum

* fix: error when force-releasing non-h2 locks

* test: add session lock test
2025-02-10 18:29:58 +00:00
Ryan Laurie
03dc3fdd0d Streamline local e2e test running (#53095)
* WIP - lots of streamlining

* revert dotenv addition

* ci fix

* some fixes

* make component testing work

* set some default ports

* fix component test ci

* fix all the e2e tests

* fix the other sdk tests

* update e2e docs

* fix embedding more

* fix tagged tests

* documentation

* split user and derived options

* better exit behavior

* more error handling

* revert saml change

* ❤️ typescript and booleans

* fix some stuff

* fixes

* stupid lockfile

* maybe keep the lockfile

* remove unnecessary diff
2025-02-10 11:12:48 -07:00
Ryan Laurie
1b1c572c2c add alex yakushev to slack map (#53440) 2025-02-10 11:11:51 -07:00
Ryan Laurie
b16161533d Upgrade to NodeJs 22 (#53446)
* update to node 22
2025-02-10 11:06:28 -07:00
Sloan Sparger
e6f551e0a0 [CI] Fix flaky dashboard tab test v2 (#53327)
* flaky test fix v2

* add flaky prevention measure

---------

Co-authored-by: Filip Hric <filip@filiphric.sk>
2025-02-10 11:45:26 -06:00
Cam Saul
60e08be857 [Backend modularization] user-key-value module (#53416) 2025-02-10 09:41:54 -08:00
Phoomparin Mano
9d12421e41 fix(sdk): dashboard not found when switching dashboards in cli (#53452) 2025-02-11 00:08:46 +07:00
Aleksandr Lesnenko
5351d4d4a9 remove flaking legacy tooltips from visual tests (#53448)
* remove flaking legacy tooltips from visual tests

* update snapshots, remove legacy tooltip and popover stories
2025-02-10 12:55:00 -04:00
Nicolò Pretto
c03a49a87c fix(sdk): better scope for SCOPED_CSS_RESET to fix transparent (#53443)
background on buttons
2025-02-10 17:10:43 +01:00
William
52ffc412c8 param->fields looks through filterable columns (#53379)
When fetching a param's possible values, we were originally looking for concrete columns and checking result metadata.
However, if the query is against a model and has an aggregation, the thing you are filtering on isn't a concrete field
and probably isn't in result metadata.  Checking filterable-columns lets us find the appropriate field in that case.  The practical result is that we actually find remapped values for a param when it is linked to an aggregated query against a model.
2025-02-10 16:07:45 +00:00
Filip Hric
eb931d72b1 update timings on specs (#53356) 2025-02-10 17:03:11 +01:00
Phoomparin Mano
cf4f46e5c6 fix(sdk): make headers in generated cli components responsive (#53455) 2025-02-10 22:43:23 +07:00
Eric Normand
ae958b131c Check cycles on PUT to /card/:id (#53373)
* Check cycles on PUT to /card/:id

* Remove extra protection from saving cycles.

* cljfmt

* kondo

* Better threading

* Cleaner tests

* Fix test

* Better naming in metabase.api.card/dataset-query->query

* Rename `dataset-query` arg to `dq-fragment`.

* Normalize query on backend.

* Throw exceptions with user messages.

Also rework `dataset-query->query`.

* Unshadow card-type in doseq

* Make consistent use of query/dataset-query

* Remove normalization from lib.query

* Don't shadow `query`.

* Rename `dq-fragment` to `query-fragment`
2025-02-10 10:12:34 -05:00
Romeo Van Snick
dfd0a55a09 Fix json indentation (#53365)
* Use indentMore instead of inserTab

* Customise indentation for JSON-like databases

* Add highlight for brace

* Add e2e test for JSON indentation
2025-02-10 14:14:55 +00:00
Uladzimir Havenchyk
58998875a4 fix: make switcher position stable (#53402) 2025-02-10 11:55:04 +03:00
Cam Saul
e7f1a92c8a [Backend modularization] timelines module (#53391)
* `timelines` module

* Move some render-related timeline stuff into the timeline module

* Remove unused /api/card/:id/timelines endpoint

* PR feedback and test fixes 🔧
2025-02-07 19:47:13 -08:00
Oisin Coveney
9a554425e2 fix(sdk): Clean up and enhance InteractiveQuestion docs (#53283) 2025-02-08 02:44:19 +00:00
Uladzimir Havenchyk
e104ed81e5 chore: upgrade shadow-cljs to align with deps.edn (#53313) 2025-02-07 23:49:45 +03:00
Jeff Bruemmer
c20c9b7cb6 docs - various edits (#53382) 2025-02-07 20:49:17 +00:00
Alex Yarosh
db35fefdc3 docs: note about marketplaces (#53395) 2025-02-07 15:14:19 -05:00
Alex Yarosh
df3843215d docs: 53 edits (#53383) 2025-02-07 15:13:39 -05:00
Luis Paolini
28a2150c1e Flag the site url requirement (#53301)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-02-07 18:07:22 +00:00
Alex Yarosh
f31cb4c45d docs: druid basic auth (#53380) 2025-02-07 13:03:20 -05:00
Nathan Voxland
01b996ddb6 Added Session Cleanup Job (#53246) 2025-02-07 09:50:01 -06:00
John Swanson
5cad344fd0 xrays create dashboard questions (#52462)
* Create dashboard questions for x-rays

* Don't make subcollections for autogened dashboards

Before, for an admin we'd create a structure like:

```
- Our analytics
  - Automatically Generated Dashboards
    - A look at Accounts
      - Dashboard
      - Card 1
      - Card 2
      - ...
```

Or, for regular users, a structure like:

```
- Your personal collection
  - A look at Accounts
    - Dashboard (A look at Accounts)
    - Card 1
    - ...
```

Now, we'll create the following structure:

```
- Our Analytics (OR Your personal collection, for non-admins)
  - Automatically Generated Dashboards
    - Dashboard (A look at Accounts)
```

Other autogenerated dashboards will be placed alongside.
2025-02-07 07:11:25 -08:00
Mahatthana (Kelvin) Nomsawadi
924e2ecd3d fix(sdk): Fix question not found error showing briefly after navigating from dashboards (#53284)
* Fix question not found error showing after navigating from dashboards

* Add interactive dashboard tests

* Add editable dashboard tests

* Fix failed tests

* Add an assertion to ensure we display ad-hoc question
2025-02-07 12:38:24 +00:00
Chris Truter
5de615c633 Log name of missing class when implicitly deleting job (#53357) 2025-02-07 13:30:24 +02:00
Chris Truter
a260601156 Fix search for queries with single backslashes (#53296) 2025-02-07 10:50:53 +00:00
Filip Hric
926d2c617e remove all instances of describeEE, onlyOnEE and onlyOnOSS (#53240) 2025-02-07 09:27:01 +01:00
Ryan Laurie
9af191fc60 paste instead of type saml key (#53303) 2025-02-07 00:49:05 +00:00
Ryan Laurie
ef6a9bb253 One parent test job + run it on draft PRs (#53258)
* one parent test job
2025-02-06 17:07:32 -07:00
bryan
2cc56a4c13 rename enable embedding sdk alignment migration id (#53339)
* rename enable embedding sdk alignment migration id

* changeset ids must be in order
2025-02-06 23:18:56 +00:00
Fraser
d72c26b66c Remove FS_CACHE references from docs (#53338) 2025-02-07 11:25:21 +13:00
Oisin Coveney
81e6f479e9 Don't document SDK embed terms switch (#53316) 2025-02-06 21:01:13 +00:00
John Swanson
45aaf7c6d7 Allow disabling reading a setting from env vars (#53330) 2025-02-06 12:58:26 -08:00
bryan
a5f6687798 update enable-embedding-sdk based on embedding-app-origins-sdk (#53263)
* update enable-embedding-sdk based on embedding-app-origins-sdk

|enable-embedding-sdk key exists? | then we:
|---------------------------------|---------
|false                            | no-op
|true                             | set enable-embedding-sdk to true when `embedding-app-origins-sdk` exists

* actually need to set it to false when embedding-app-origins-sdk dne

* reformat liquibase migration

* make the query run on h2, too

* per-db sql + update comment

* use preconditions to simplify update sql
2025-02-06 13:23:55 -07:00
Filip Hric
eeeb6bbc5c add visibility check before saving dashboard (#53292) 2025-02-06 20:28:27 +01:00
Oisin Coveney
b71e299854 Drop from sdk legalese copy (#53315) 2025-02-06 17:19:19 +00:00
Case Nelson
95fe8fa5f2 fix (ci): Set longer timeout to ensure we get a successful connection attempt (#53312) 2025-02-06 10:12:49 -07:00
Nicolò Pretto
9cef486ea3 chore(sdk): make FlexibleSizeComponent private (#53304) 2025-02-06 18:04:44 +01:00
Romeo Van Snick
3e71b70d8d Type mbql required features (#53293)
* Type requiredFeatures as DatabaseFeature

* Add missing database features from MBQL
2025-02-06 17:51:41 +01:00
Dan Stone
84c99be11a Allow private slack channels to be returned for alerts/subscriptions (#53128)
* Allow private slack channels to be listed for alerts/subscriptions.

Requires the groups:read scope to see private channels
 * manifest.yaml changed so new installations get it by default
 * things are kept compatible if the token does not have the scope
 * you can manually add the scope to the app in slack.
  private channels will then up when the channels are refreshed

* Update the slack manifest.yaml inlined in the docs

* Add re-installation guidance to slack docs for `groups:read`

* Ensure slack token is set in conversations-list test

* Refactor conversations-list to take :private-channels opt

* Add refresh-channels-and-usernames! test to check groups:read behaviour
2025-02-06 16:38:35 +00:00
Ryan Laurie
da360af2d0 flaky tab test (#53309) 2025-02-06 16:25:42 +00:00
Aleksandr Lesnenko
ecfae75734 fix invalid pivot table columns in click behavior (#53013)
* fix invalid pivot table columns in click behavior

* spec
2025-02-06 12:19:32 -04:00
Sébastien
47108c9f94 no more super tiny remove button for condition rules (#53295) 2025-02-06 16:40:43 +01:00
Sloan Sparger
6c6372f6bc [Dashboards] Prevent duplicate edit dashboard calls from breaking dashboard save (#53132)
* prevent duplicated SET_EDITING_DASHBOARD dispatches from overriding edit dashboard state if the editing dashboard is the same dashboard

* small improvements

* add test coverage

* impl pr feedback
2025-02-06 09:00:57 -06:00
Filip Hric
5e5f44878d unmark tests as flaky (#53298)
* unmark as flaky: should not reload the model for record in the same model

* unmark as flaky: scenarios > search should allow users to paginate results

* unmark as flaky: scenarios > model indexes should be able to see details of a record outside the first 2000

* unmark as flaky: should be able to search model index values and visit detail records
2025-02-06 14:54:47 +00:00
Cam Saul
c9d6609021 [Backend modularization] More search module cleanup (#53269)
* [Backend modularization] Search module cleanup

* Sort namespaces
2025-02-06 14:19:08 +02:00
Sébastien
e5044f2cb8 Dashcard titles no longer interactive when editing the dashboard (#53168)
* dashcard titles no longer interactive when editing the dashboard

* added test
2025-02-06 10:52:58 +01:00
Sébastien
ce24e63aca viz settings tabs don't scroll anymore, only the content does (#53178)
* viz settings tabs don't scroll anymore, only the content does

* e2e
2025-02-06 09:51:38 +01:00
Cam Saul
3cd46419dd Add custom linter to make sure requires are on newlines (#53272) 2025-02-06 09:57:42 +07:00
Nick Fitzpatrick
b09343c050 add estimated size to Search Results virtual list in entity picker (#53226) 2025-02-05 20:24:57 -04:00
Ryan Laurie
53ee36832a remove unused labeled trigger for backend tests (#53235) 2025-02-05 17:13:29 -07:00
Case Nelson
6136047dff Add legacy handling for snowflake password (#53181) 2025-02-05 16:47:27 -07:00
Jeff Bruemmer
1c755054c9 docs - note on upgrading to pro (#51585)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-02-05 23:02:06 +00:00
github-actions[bot]
bed2c3d442 Update Translations for v53 (#52775)
* Add new strings for v53

* Update translations

* Update translations

* kick ci

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-02-05 22:29:20 +00:00
Sloan Sparger
fa27b5e744 fixes unnoticed race condition in dashboard tab test (#53267) 2025-02-05 15:24:22 -07:00
Nemanja Glumac
a4b2ccd657 Upsell Advanced Permissions (#53080)
* Remove the custom permissions upsell component

* Implement upsell for advanced permissions

This applies to both:
- `/admin/permissions/data/group` and
- `/admin/permissions/data/database/` routes.

* Remove the old feature from the enterprise feature level permissions
2025-02-05 21:00:20 +01:00
lbrdnk
570cd10c3c Fix use of offset with external remapping (#53118)
* Fix use of offset with external remapping

* whitespace

* Address review remarks
2025-02-05 20:33:59 +01:00
Sloan Sparger
7c13028d7f [Dashboards] Mark dashboard as dirty if tabs are edited (#53204)
* make dashboard dirty if tabs are edited and add test coverage for leaving dashboard after editing a dashboard or its tabs

* handle rename tab, add rename tab test coverage, simplify test coverage

* makes ci ts happy

* clean up test a bit

* rename helper
2025-02-05 11:45:08 -06:00
Alexander Polyankin
94379d8a54 Fix memoization of extensions in CodeMirror (#53241)
* Renaming

* Memoize

* Memoize
2025-02-05 12:35:34 -05:00
appleby
4ca935e2cf Fix quick filter drill for trend charts (#53135)
* Return column corresponding to aggregation value in SmartScalar getCurrentMetricData

Closes #46168

The returned clicked object had the `value` from the aggregation cell, but the `column` from the date dimension, which
breaks the quick filter drill (and probably others).

Instead, return the `column` that corresponds to the `value`.

* Add e2e test for smartscalar quick filter drill
2025-02-05 09:11:40 -08:00
Nemanja Glumac
2634a5ff83 Remove the postcss-presets-env warning about the partially supported end value (#53220) 2025-02-05 18:06:55 +01:00
Chris Truter
efd7c708b2 Use env vars in backend process (#53237)
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-02-05 18:16:18 +02:00
Filip Hric
4949cf3847 mark additional tests as flaky (#53243) 2025-02-05 16:15:10 +00:00
Chris Truter
566f21d1ae Fix search index update job restart issue (#53229) 2025-02-05 15:40:51 +00:00
Phoomparin Mano
29bcb43082 fix(sdk): remove unsafe lifecycle errors from DashboardGrid (#53213)
* remove unsafe lifecycles from visualization component

* add e2e tests

* remove extra comma in test helpers

* only run tests under strict mode when a flag is passed

* extract console assertion to a test helper

* update tests for known console errors

* swap new and previous props

* combine old state for transform props to state

* combine initial state

* use getDerivedStateFromProps to fix failures

* only store a subset of lastProps to compare

* remove timeline events check from getDerivedStateFromProps

* reset state when timeline events changed

* get rid of mutation in strict mode

* remove existing state spread from state updates

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* remove deriveStateFromProps from constructor

* use sdkProviderProps to pass provider props

* replace UNSAFE_componentWillReceiveProps with getDerivedStateFromProps

* add unsafe lifecycle check for DashboardGrid

* lastProps is already part of DashboardGrid state

* optional chain state.initialCardSizes

* remove state comparison logic

* fix misleading hasVisibleDashcardsChanged condition

* fix editor issue

* remove unused dashcardData from lastProps

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-02-05 22:25:10 +07:00
lbrdnk
8250c46747 [WIP] Querying generative test (#53183)
* Add generative test

* Use per test generator with adjustable seed

* Add workflow file

* Temporarily add trigger

* Make rand function work with default generator

* Update log4j2 test config

* Info log level

* Whitespace

* Add iteration count and env to make run on-demand

* cljfmt

* cljfmt
2025-02-05 16:02:51 +01:00
Oisin Coveney
26e2e158ee Add legalese modal to present SDK terms (#53139) 2025-02-05 06:55:57 -08:00
Uladzimir Havenchyk
1124000465 fix: allow replacing a question with a long name (#53217) 2025-02-05 17:47:24 +03:00
Nicolò Pretto
6cd6235289 lets see how many things break in ci (#53107) 2025-02-05 15:36:14 +01:00
Filip Hric
2d60b9cb44 disable video recording on snapshots and delete videos on successful tests (#53169) 2025-02-05 14:57:12 +01:00
Phoomparin Mano
cb8266362c fix(sdk): remove unsafe lifecycle errors from Visualization (#52885)
* remove unsafe lifecycles from visualization component

* add e2e tests

* remove extra comma in test helpers

* only run tests under strict mode when a flag is passed

* extract console assertion to a test helper

* update tests for known console errors

* swap new and previous props

* combine old state for transform props to state

* combine initial state

* use getDerivedStateFromProps to fix failures

* only store a subset of lastProps to compare

* remove timeline events check from getDerivedStateFromProps

* reset state when timeline events changed

* get rid of mutation in strict mode

* remove existing state spread from state updates

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* remove deriveStateFromProps from constructor

* use sdkProviderProps to pass provider props

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-02-05 20:39:54 +07:00
Ryan Laurie
39860ebb86 better interactivity check for opening sidebar (#52539) 2025-02-05 13:01:34 +01:00
Nicolò Pretto
61a58edaf9 fix(sdk): remove error about stageIndex prop being passed to dom element (#53165) 2025-02-05 10:43:52 +01:00
William
6e5293fdfa Don't infer join aliases when replacing a join (#53081)
When replacing a join, we were taking a valid join (with a correctly set up join alias), dropping the alias, creating
a new alias, and then inferring which fields belonged to the new alias.  This caused issues when joining models using
a field that could plausibly belong to either model, because we inferred that the lhs join condition belonged to the
rhs model.  This in turn confused the join naming code and caused us to refer to the lhs as "previous results" instead
of the correct table name.

With the new code, if we want to rename the new join, we explicitly replace the old alias with the new alias instead
of just removing the new alias and inferring what goes with what.  This avoids potentially incorrect inferences and
fixes this issue (and possibly others?).
2025-02-05 03:14:44 -06:00
Raphael Krut-Landau
c8f0e188a2 Add e2e tests checking high-visibility pages in top locales (#53203)
Last year we had a P1 where a high-visibility page in Brazilian Portuguese was broken. Let's add some basic e2e tests that check high-visibility admin/webapp pages (accessible in one click from the homepage) in our most popular locales.
2025-02-04 22:40:03 -05:00
Nemanja Glumac
74fc3b9db9 Introduce the Upsell Banner component (#53099) 2025-02-05 00:21:08 +01:00
Alex Yarosh
f02be4f3f7 docs: in clarification (#53182) 2025-02-04 17:21:19 -05:00
Alexander Solovyov
1ead33339c update to latest GraalVM JS version (#53155) 2025-02-04 23:57:11 +03:00
Nick Fitzpatrick
a70d20d135 fixed logo to support opacity and color props. looks correct in admin… (#53167)
* fixed logo to support opacity and color props. looks correct in admin app now

* adding back fill=currentColor
2025-02-04 16:04:17 -04:00
Phoomparin Mano
faa7c736d0 fix(sdk): echarts tooltip is cut off below the viewport height (#52822) 2025-02-05 01:24:38 +07:00
Sloan Sparger
b31ce245b7 Close CSV upload modal on escape press (#52913)
* close csv upload on escape

* fix unit test
2025-02-04 12:12:17 -06:00
Sloan Sparger
9e0f6e1703 Fix home page Metabot spacing on large screens (#52916) 2025-02-04 12:10:43 -06:00
Sloan Sparger
4ba2882740 [Cards in Dashboards] Trash UI when removing last dashcard for a dashboard question (#52781)
* update ui to show trash icon, tooltip, and undo message if the dashcard being removed is the last dashcard for a dashboard question

* add e2e test, fix types
2025-02-04 12:03:05 -06:00
Ryan Laurie
39a48c4539 mark browse metrics flakes as flaky (#53176) 2025-02-04 10:50:12 -07:00
Fraser
0bbab5f051 Add fraserdrops to team lists (#53150) 2025-02-05 06:43:53 +13:00
Uladzimir Havenchyk
42e50fbdcc convert header breadcrumbs components to typescript (#53110)
* convert header breadcrumbs components to typescript

* fix breadcrumbs

* tweaks
2025-02-04 16:39:37 +00:00
Phoomparin Mano
a2794d6ae2 feat(sdk): apply theming to interactive question modules (#52513)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-02-04 20:39:28 +07:00
Alberto Perdomo
e871e538b1 Update SDK usage wording (#53105)
* Update authentication.md

* Fix formatting in * below table
2025-02-04 13:23:01 +00:00
Filip Hric
feb7db2c06 ensure that the link abstracted from element is not empty (#53160) 2025-02-04 13:36:40 +01:00
Alexander Solovyov
30970aa4ac update snowflake (#53154) 2025-02-04 18:24:17 +07:00
Nathan Voxland
7d11423cef Support not specifying is_group_manager in /api/user calls on Pro (#52977) 2025-02-03 17:21:44 -06:00
Riley Thompson
123c1232fd Order the query in expression-using-aggregation-test (#53093)
* order query in test

* sort instead of order for h2
2025-02-03 17:37:52 -05:00
appleby
9b4a091817 Fix breakout by drill through context menu for multi-stage queries (#52925)
* Add pivot-drill-details

Similar to filter-drill-details and combine-columm-drill-details.

pivot-drill-details returns the info needed by FE to render the pivot drill popover UI.

* Merge pivot-types into pivot-drill-details

* Add e2e test

* Revert unintentional whitespace change

* Re-enable Breakout by e2e test

* Re-enable multi-stage pivot drill tests

* Add pivot drill test for query with explict join
2025-02-03 14:31:23 -08:00
Victor Vieux
0b1c5003eb Add hostname support to BigQuery (#51948)
* Add hostname support to BigQuery

* Fix formatting

---------

Co-authored-by: Case Nelson <snoe@snoe.ca>
Co-authored-by: Case Nelson <case@metabase.com>
2025-02-03 15:50:12 -06:00
Case Nelson
eca452c45f Check connectivity on startup (#52934)
* Check connectivity on startup

* Fix format and kondo and some tests

* Allow h2 connection testing

* Address review

* Fix cyclic dependency, don't care about checking sample db

* Fix kondo/fmt

* Fix another cyclic dep

* Fix macro

* Fix kondo

* Fix h2, check is_sample is_audit
2025-02-03 14:40:09 -07:00
Nathan Voxland
69a72b9db8 Elide data in task_history.details which can get very large (#53002) 2025-02-03 14:20:08 -06:00
lbrdnk
443860bff5 Fix enum filtering on postgres (#52982)
* Fix filtering enum values on source card or model

* Add test

* Add logging

* Adjust virtual-table-metadata-test

* Adjust test

* Adjust test

* cljfmt

* Add dynamic-database-types-lookup

* Avoid redundant db calls

* Defualt impl arity

* cljfmt

* Constraint to initialized qp
2025-02-03 18:19:18 +01:00
Phoomparin Mano
f442920bb8 fix(sdk): fix minWidth console error in dashboard grid (#52880) 2025-02-04 00:18:42 +07:00
Nathan Voxland
9bd43494a6 Symbol for swedish krona is "kr" not "Skr" (#52921) 2025-02-03 09:50:27 -06:00
Braden Shepherdson
4968758f1d [chore] Bump BE deps at the start of Metabase 54 (#52853)
Fixes #52843.
 
* Redshift: Adding an explicit dep on `aws-java-sdk-core`

This is listed as an optional dep, but it seems that at least one class
from it (`com.amazonaws.util.StringUtils`) is now dynamically required
by our driver - tests were throwing `NoClassDefFoundError`s without it.

Redshift tests are passing locally with this dependency added.
2025-02-03 18:26:27 +03:00
Ryan Laurie
a6392f245a Dont run redshift upload tests on PRs (#53094)
* dont run redshift upload tests on PRs
2025-02-03 14:15:39 +00:00
Filip Hric
4fd4f14456 stabilize flaky tests (#53106) 2025-02-03 13:49:28 +01:00
Nicolò Pretto
12bb4b9e77 fix(entity-id): show 404 for entity id that starts with digits (#52896)
* fix(entity-id): show 404 for entity id that starts with digits

* simplify logic by removing support for sequential ids with slugs for the
tab

* clean up the tests and rename things
2025-02-03 13:44:07 +01:00
Alexander Solovyov
9c806a5c27 update hawk to silence warnings about algo.generic/abs override (#53104) 2025-02-03 15:36:06 +07:00
Sébastien
be5b292ba3 Proper title for cards when visualization is in error (#52680)
* proper title for cards when viz in error

* addressed PR feedback
2025-02-03 07:09:51 +01:00
Oleksandr Yakushev
e2fd234cc2 [csv-export] Follow-up optimizations to CSV pivotted export (#52810) 2025-02-02 08:41:33 +00:00
Cam Saul
ee16b43e3b [Backend modularization] permissions module (#52868)
* Squash

* Add missing API namespace

* Well moving the tests seemed to fix stuff

* Test fix 🔧
2025-02-01 04:14:03 +00:00
Alex Yarosh
4142c00db9 Update week.md (#53090) 2025-01-31 22:01:35 +00:00
Jeff Bruemmer
e58b3bc5dd Update connecting.md (#53087) 2025-01-31 21:57:56 +00:00
Jeff Bruemmer
c9dfcb2f47 docs - various link fixes (#53084)
* link

* another link
2025-01-31 16:52:02 -05:00
Alex Yarosh
1e17d6903d docs: percentile in usage analytics (#53078)
* docs: percentile in usage analytics

* Update docs/usage-and-performance-tools/usage-analytics.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-31 16:37:02 -05:00
Alex Yarosh
50d9099ca0 docs: add pics to week of year docs (#53068)
* week of year viz

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-31 20:26:03 +00:00
William
8b23d477dd Recognize year-of-era (#52930)
Year of era aggregations weren't working because our legacy malli schema didnt recognize it as a valid temporal unit.
Adding it to the schema makes it work.
2025-01-31 14:25:32 -06:00
Riley Thompson
0f0799898b Fix all-indexes->field-ids generating queries with too many parameters (#52835)
* partition indexes and use separate queries

* test no exception thrown

* improve helper func name

* improve test

* remove test debugging

* address pr comments
2025-01-31 20:16:52 +00:00
Noah Moss
13417eebb7 Delete legacy-no-self-service email (#53061) 2025-01-31 15:16:15 -05:00
Tyler Plude
ca6e3dba41 Fix min extent histogram (#52932)
* Fix normalized stacked histogram minimum extent #48021

* Adjusting technique for respecting min/max y axis extents in normalized stacked charts

* Fixing stackType? and adjusting comment

* Adding new visual story test

* Update Loki Snapshots

* Update Loki Snapshots

* Updating loki reference after flake

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-01-31 11:58:17 -08:00
Aleksandr Lesnenko
fc4024b973 fix row chart font in pdf exports (#53052) 2025-01-31 14:40:26 -05:00
Case Nelson
858fbb555f Ensure the classloader is in task thread contexts (#52990)
This should ensure tasks will find classes in our plugin system. The
issue arose when `submit-task!` was called to sync an unhidden bigquery
table before any query was run on the main thread before hand.

This ensures that if either of these tasks runs before classloader has
been set, that their threads will inherit it.

`task.cache/pool` was found as an audit of other threads that may
exhibit this behavior.

Testing this from source is not possible right away since the
classloaders behave so differently between jars and sources.
2025-01-31 12:39:43 -07:00
Uladzimir Havenchyk
6033ae8983 chore: disable cljs live reload by default (#52894)
* chore: disable cljs live reload by default

* fixup
2025-01-31 19:27:53 +00:00
Uladzimir Havenchyk
5d498f51a1 chore: migrate emdedding-cli to rspack (#52949) 2025-01-31 22:14:01 +03:00
Eric Normand
87e1260760 Don't cast dates when doing a dateadd on h2 (#52928)
* Don't cast dates when doing a dateadd.

* Add test for date binned by week
2025-01-31 20:05:19 +01:00
Nick Fitzpatrick
3dd914fcaa Filter personal recent dashboards for the "Add to Dashboard" modal (#52927)
* Filter personal recent dashboards for the "Add to Dashboard" modal

* e2e adjustment
2025-01-31 14:47:09 -04:00
Nemanja Glumac
ea9fe96a71 Upsell Uploads and Storage (#52974) 2025-01-31 19:31:16 +01:00
Alberto Perdomo
916dd6bff7 Revise wording about shared user accounts when using SDK (#52986)
---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-31 18:30:24 +00:00
Jeff Bruemmer
e800fc7438 docs - api info (#52920) 2025-01-31 17:29:41 +00:00
Ryan Laurie
06064dfbaa quarantine flaky search pagination test (#53050) 2025-01-31 09:16:20 -07:00
Nicolò Pretto
5fcaa3c884 ci: find css variables that are used but never defined (#52910)
* ci: find css variables that are used but never defined

* only search in frontend and enterprise/frontend

* Update bin/find-never-defined-css-variables/find-never-defined-css-variables.ts

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* test: checks that it doesn't confuse definitions with usages

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-01-31 16:43:29 +01:00
lbrdnk
be1e70f51c Databricks #48585 follow-up (#48855)
* Remove redundant function

* Address test remarks

* Address remark
2025-01-31 15:09:11 +00:00
Alexander Polyankin
945237b09c Fix parameter popover width when the datepicker changes its width (#52985) 2025-01-31 15:02:24 +00:00
Alexander Polyankin
5fe517a03e Port native queries to MBQL lib (#52991) 2025-01-31 09:46:33 -05:00
Kamil Mielnik
ea53020156 Fix - Segment filter misaligned in filter modal (#53038)
* Fix #50734

* Add repro for #50734

* Add a comment

* Update comment
2025-01-31 14:32:36 +00:00
Luiz Arakaki
e1665c9674 Remove Exasol and Ocient (#52924) 2025-01-31 14:29:52 +00:00
Kamil Mielnik
b4a34ab899 Fix - Empty tooltip shown when save button is disabled (#53033)
* Fix #51035

* Add repro for #51035
2025-01-31 21:16:37 +07:00
Braden Shepherdson
969c1babd3 [cleanup] Delete lib.metadata/stage and stage-column (#52842)
These date from the beginnings of the `metabase.lib` codebase,
and are unused outside of a couple of tests.

I deleted the tests for these functions specifically, and updated a few
other tests that used these functions to retrieve columns on a query.

Prework for #49182.
2025-01-31 13:24:06 +00:00
Nicolò Pretto
59d45e5ef4 chore(sdk): remove build step from test-cypress-open-component-sdk (#52957) 2025-01-31 10:52:37 +00:00
Chris Truter
75e9be30f6 Lofi quartz debugging (#53029) 2025-01-31 11:49:44 +03:00
Chris Truter
dff830c1f6 More robust handling of search negation (#52976) 2025-01-31 08:00:34 +00:00
Kamil Mielnik
e40425322f Fix - Can't edit field descriptions from the edit mode of "learn about my data" (#52959)
* Start refactoring Field to TS

* Revert "Start refactoring Field to TS"

This reverts commit 88af47fdac.

* Add description input

* Use translation

* Make placeholder match data model page UI

* Add repro for #37907
2025-01-31 14:19:22 +07:00
Kamil Mielnik
f7f23dcf3e Fix - Incorrect document title when query fails (#52953)
* Fix #49270

* Turn it into an action for consistency

* Add a repro for #49270
2025-01-31 14:18:33 +07:00
Sébastien
93ed751688 Last axis label is now there on row charts (#52948)
* last axis label is now there

* updated screenshots

* unit test
2025-01-31 07:55:49 +01:00
Case Nelson
c806f3a599 fix: Mongodb handle let with alias with space (#52862) 2025-01-30 23:27:20 -07:00
Tyler Plude
426446b9fc Fixing xlsx pivot table exports to respect table column names (#52638)
* Fixing xlsx pivot table exports to respect table column names

* Adding fallback to column title to use display_name if custom title is empty; fixing kondo error

* Fix cljfmt spacing

* Adding unit test for xlsx pivot exports respecting custom column name

* Improving logic to be more idiomatic
2025-01-30 18:54:53 -08:00
Cam Saul
2cef7a8695 CI driver job tweaks (#53015)
* CI driver job tweaks

* SQL Server timeout after 30 minutes

* Ok maybe don't make the matrix fail-fast
2025-01-31 02:51:59 +00:00
Aleksandr Lesnenko
8ce4383355 allow numeric category columns to be considered as number columns (#52718) 2025-01-31 02:27:34 +00:00
Aleksandr Lesnenko
12cd25af26 apply custom separators to compactly formatted numbers (#52634)
* apply custom separators to compactly formatted numbers

* Update Loki Snapshots

* Update Loki Snapshots

* Update Loki Snapshots

* Update Loki Snapshots

* loki

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-01-30 21:15:44 -05:00
Cam Saul
55afff90af Fix Toucan 2 table name for unresolved models (#52939)
* Fix Toucan 2 table name for unresolved models

* Add explanation
2025-01-31 01:56:18 +00:00
Cam Saul
d27bcffb5f OpenAPI dox generation part 2 (#52998)
* OpenAPI dox generation part 2

* Fix docstring

* metabase.billing.billing => metabase.billing.api

* Fix dox generation code fr fr

* Revert changes to dox for now

* Remove define-routes

* Fix missing routes

* Fix even more missing routes

* Third time's a charm

* Remove extra newlines at end of file
2025-01-30 17:41:35 -08:00
Oisin Coveney
aaae17f296 Add tests for file downloads from the public link sharing popover (#52779) 2025-01-30 23:01:54 +00:00
Oleksandr Yakushev
bc26890905 ci: Cache final H2 app DB scheme when running tests (#51523) 2025-01-31 00:58:27 +02:00
Alex Yarosh
0e988ff8a0 docs: week of year (#52877)
* docs: week of year

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-30 17:40:43 -05:00
Noah Moss
afce736c7f Move filters for perms-related t2 selects into the honeysql :where clauses (#52865) 2025-01-30 22:09:17 +00:00
Case Nelson
1d81ce41b1 Only add views to dynamic datasets (#52979)
Databricks has static test data, by creating views we run the risk of
concurrent test runs seeing the temporary views or those views not
getting cleaned up if a job gets killed.

This is part of ENG-14545
2025-01-30 17:00:52 -05:00
Nick Fitzpatrick
eef8ad7901 updating the Logo SVG (#52908) 2025-01-30 17:25:41 -04:00
Cam Saul
66ff9f2c04 OpenAPI dox generation & request routing overhaul PART 1 (#52987)
* Will this work?

* Add updated api.macros

* Add missing file

* Test fix 🔧

* Backport more stuff

* Backport tests
2025-01-30 13:20:03 -08:00
Oisin Coveney
70d4582f67 fix(sdk): Remove ExplicitSize findDOMNode console errors (#52253) 2025-01-30 12:39:36 -08:00
Nemanja Glumac
703db28acd Upsell Better Support (#52955)
* Add upsell component for better support

* Implement upsell for better support on a troubleshooting page

* Snow better support upsell only for OSS

* Update import path

* Remove whitespace

* Account for smaller screens
2025-01-30 18:50:31 +01:00
Ryan Laurie
8949f1598a tag model index search tests as flaky (#52969) 2025-01-30 17:19:05 +00:00
Alexander Polyankin
ebe179780b Reuse getMappingOptionByTarget in ParameterTarget component (#52903) 2025-01-30 10:32:38 -05:00
Nicolò Pretto
4b5c8caa1e fix(entity-id): don't call to the card endpoint if the entity id starts with digits (#52892)
* fix(entity-id): don't make call to the card endpoint if the entity id
starts with digits

* prevent `isXXXPath` to return true if the path is the one of entity ids
2025-01-30 08:29:48 -07:00
Romeo Van Snick
a746d081b7 Disable flaky tests for native editor (#52943)
* Remove flaky tags in e2e/test/scenarios/native/native.cy.spec.js

* Remove flaky tags in e2e/test/scenarios/native/native_subquery.cy.spec.js

* Remove flaky tags in e2e/test/scenarios/native/native-reproductions.cy.spec.js

* Remove flaky tag from admin test that uses native editor

* Remove flaky tag from visualization test that uses native editor

* Remove flaky tag from dashboard test that uses native editor

* Add helper to clear browser cache

* Reduce flakiness in autocomplete test

* Remove flaky tag in e2e/test/scenarios/native-filters/native-filters-reproductions.cy.spec.js
2025-01-30 16:26:01 +01:00
lbrdnk
0f5b4944e3 Make deduplication of returned-columns available in pivoting (#52914)
* WIP Move deduplication from js wrapper into returned-columns

* Move deduplication into pivoting code
2025-01-30 15:47:37 +01:00
Alexander Solovyov
69c2c29e0e [search] create index tables with nanoid instead of uuid (#52942) 2025-01-30 14:19:04 +00:00
Filip Hric
fe5de91ff7 fix flaky helper causing flakes (#52954) 2025-01-30 15:15:32 +01:00
Ryan Laurie
666bf41aa2 Auto reset data db for writable db tests (#52784) 2025-01-30 06:51:02 -07:00
Chris Truter
48f792ab99 Hopefully fix e2e search flakes (#52944) 2025-01-30 16:26:03 +03:00
Mahatthana (Kelvin) Nomsawadi
220e18db22 ci: Fix SDK cross-version testing failure after test util refactor when cutting 54 (future) (#52941)
* Fix SDK cross-version testing failure after test util refactor (#52900)

* Revert the code before the fix

* Revert "Revert the code before the fix"

This reverts commit be11146bf1.

* Another attempt by checking out the whole e2e dir

* Can't checkout twice it will override everything 😭

* Reset everything back to the start

* Add missing files

* Keep only the latest webpack config

* Clarify the temporary bandaid with a comment

* Ensure when we cut 54, we won't ran into SDK cross-version testing
2025-01-30 09:21:13 +00:00
Filip Hric
697bfef8d7 introduce tree-shaking of helpers by adding them to the Cypress object (#52042)
* second attempt at treeshaking

* add eslint rules to disallow direct helper imports
2025-01-30 10:13:46 +01:00
Uladzimir Havenchyk
2d6c18162b fix: reload model after applying prev revision (#52849)
* fix: reload model after applying prev revision

* add tests

* fix lint

* reuse helpers
2025-01-30 06:04:04 +00:00
Oisin Coveney
cd209344c6 feat(sdk): Add option to remove dashboard footer (#52555)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-01-29 17:25:23 -08:00
Alexander Solovyov
a451a506a0 update oracle driver to jdk17+ (#52895)
* update oracle driver to jdk17+

* another place with java 11
2025-01-30 00:54:07 +03:00
Eric Normand
3cc73019c5 Stop drilling down past day in DateType (#52869)
* Stop drilling down past day in DateType

* Distinguish date and datetime drill-down

* Rename local and add comment
2025-01-30 00:50:51 +03:00
Braden Shepherdson
bba632c41e [refs] Make lib.tu/* into functions, not top-level defs (#52841)
Future work on the refs overhaul #49182 changes how queries are
represented. To enable testing that new behaviour at a per-test level,
we can't let global queries like `lib.tu/venues-query` be defined once
and reused forever: in that case, tests of the new refs would see global
queries defined under old refs, and vice versa.

This change transforms the global queries, cards and other helpers in
`lib.test-util` from static `def`s to functions, so they build the
queries etc. in the context of the current test.

(If this introduces a performance hit for the lib tests, we can update
the functions to cache the two versions up front and choose between them
at runtime. So far it does not seem to have made a significant impact.)
2025-01-29 16:10:48 -05:00
Alexander Polyankin
0d0a53e0fd Set max length for question name (#52793) 2025-01-29 20:13:32 +00:00
Uladzimir Havenchyk
e8cec5b900 chore: migrate static-viz build to rspack (#52734) 2025-01-29 23:07:10 +03:00
Case Nelson
7f1147c96a Add describe-database check to view tests (#52912)
* Add describe-database check to view tests

* Check for the correct view-name
2025-01-29 12:39:28 -07:00
Noah Moss
cc0cbb27b3 Ensure relevant models are loaded when running preemptive caching task (#52855)
* Ensure relevant models are loaded when running preemptive caching task

* typo

* Fix linter
2025-01-29 14:04:00 -05:00
Romeo Van Snick
cc928b793b Replace ACE with CodeMirror in the native query editor (#51632)
* Use CodeMirror 6 (#50484)

* Add @uiw/react-codemirror

* Add language plugins for codemirror

* Add @codemirror/autocomplete

* Add basic codemirror editor

* Add selection handler to CodeMirror editor

* Set height

* Add basic styling to codemirror editor

* Add custom selection background

* Add simple theme with font settings

* Move extensions to a separate file

* Implement right click on selection

* Add language support

* Add @codemirror/language

* Add @lezer/highlight

* Add custom syntax colors

* Hightlight tags

* Add highlight for matching bracket

* Add completions

* Add snippet completions

* Make the editor full height by default

* Remove duplicate dependencies

* Match autocomplete colors with ace editor

* Render completion items in subgrid

* Tweak completion margin

* Use nesting

* Add hover state on completions

* Make getTagAtCursor more sueful

* Move matchTagAtCursor to utils

* Avoid work when there's no need

* Implement onCursorMoveOnCardTag

* Move autocomplete into language helper

* Disable language completions when inside a tag

* Allow open ended tags to return without suffix

* Add testid to codemirror editor

* Update test helpers

* Fix native subquery tests

* Fix native reproductions

* Fix snippet tests

* Remove ensureAceEditorClosed helper

* Add nativeEditorType helper

* Fix action tests

* Do not use native editor helper for custom expression test

* Add more native editor helpers

* Fix model metadata tests

* Use better type helpers

* Add more TODO comments

* Fix sharing test

* Simplify e2e helper

* Use native editor type helper

* Fix clearNativeEditor helper

* Fix missing namespace

* Update Loki Snapshots

* Remove unused lang extension

* Be explicit about h2 engine

* Nest language plugin return

* Export useLazyGetCardQuery

* Add completions for referenced card columns

* Split up autocompleters

* Simplify completion info

* Use cached cards

* Move useMemoized to util

* Add TODO comment about engine type

* Fix subquery test

* Use helpers in native reproduction

* Fix e2e test meta helper

* Do not assume we've seen all suggestions when narrowing down

* Fix selectAll

* Unskip unbroken test

* Fix broken reproduction

* Increase the delay for autocompletions to kick in

* Fix nativeEditorSelectAll on non-Mac systems

* Rename completer

* Move completers to separate file and make them handle their own dependencies

* Add autocomplete endpoints to metabase/api

* Use autocompletion hooks from metabase/api

* Reuse AutocompleteMatchStyle type

* Simplify helper

* Whitespace formatting

* Test sub-limit completion

* Fix reproduction

* Add tests for matchTagAtCursor

* Remove commented out code

* Typos

* Clarify why we disable rtk-query's cache

* Simplify cx call

* Use Cypress.platform over navigator.platform

* Tweak fold caret position

* Pass font to cm-content too

* Add synteax highlighting for the name token

* Rename AutocompleteSuggestionsRequest to AutocompleteRequest

* Fix broken overflow on notebook preview

* Add more fonts to monospaceFontFamily

* Use the same line height as the ACE editor

* Autocomplete much faster

* Handle overflow in completion meta

* Use shared object

* Add padding to editor scroll pane

* Add more fonts to monospaceFontFamily

* Set line-height to normal

* Fold on parens, braces and brackets

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>

* Namespace native editor e2e helpers (#51093)

* Add namespace for helpers

* Replace H.nativeEditor with namespaced version

* Replace H.focusNativeEditor with namespaced H.NativeEditor.focus()

* Replace H.nativeEditor completions helpers with namespaced versions

* Replace H.nativeEditorSelectAll with namespaced version

* Replace H.nativeEditorClear with namespaced version

* Replace H.nativeEditorType with namespaced version

* Use NativeEditor.type where possible

* Fix imports

* Replace H.focusNativeEditor with namespaced H.NativeEditor.focus()

* Use NativeEditor.type where possible

* Use NativeEditor.clear where possible

* Do not call NativeEditor

* Add missing backspace in helpers

* Fix case of selectall

* Remove use of focus().as(...)

* Fix NativeEditor.get call

* Fix e2e test

* Remove focus where it is wrong

* Fix text replacement test

* Add small delay

* Remove ACE version of the Native editor (#51437)

* Remove sql_behaviour

* Remove getEngineNativeAceMode

* Remove CARD_TAG_REGEX

* Do not re-export ACE_EDITOR_ID

* Remove AceEditor

* Remove ACE_EDITOR_ID from NativeEdiror mock

* Remove AceEditor reference in test

* Remove intermediate editor

* Update Loki Snapshots

* Fix formatting

* Fix broken test

* Various fixes for the native editor revamp (#52321)

* Deduplicate schema completions

* Align description to the right

* Add keyword description to comletions

* Render completion description in normal font

* Set indentation to use tabs

* Remove boost from completions

* Stop cmd+enter from entering a newline

* Use same indentation as previous line when pressing Enter

* Remove empty resize handler in CodeMirrorEditor

* Add defaults to NativeEditor.type

* Make config parameter optional

* Add custom keymaps for next and previous completions

* Add custom interpolations for previous and next completion

* Add helpers up and down arrows

* Add reproduction for #48712

* Add tests for suggestion issues

* Allow completing from inside a word

* Add unit test for useSchemaCompletions

* Add unit test for useSnippetCompletions

* Add unit test for useCardTagCompletion

* Add unit test for useReferencedCardCompletion

* Accept completion with tab

* Do not indent with tab, but just insert a tab

* Use Lib.Query in CodeMirrorEditor

* Simplif CodeMirror editor prop and ref names

* Add simple unit test for CodeMirrorEditor

* Use isNotNull helper

* Use Lib.Query in NotebookNativePreview

* Handle nil in engine

* Handle empty engine

* Use correct meta kay in test

* Reduce flakiness in dashboard test

* Reduce flakiness in native test

* Add completion for query locals

* Make database optional

* Add test for locals

* Add test for command enter

* Add tests for indenting with tab

* Handle non-darwin platform in test

* Allow typing {tab}

* Add test for indentation

* Handle quoted locals

* Add typing to source

* Improve syntax highlighting for mongo

* WIP: add custom keywords completion for mongo

* Make collection_id optional

* Remove test return

* Handle SQLDialct shape

* Handle keyword completion all in the completer

* Lift completers out of language plugin

* Move language helpers to separate file

* Simplify keywords extraction

* Add tests for keyword completion

* Add more mongo keywords

* Fix quoted local test

* Add suggestion tests for mongo

* Fix e2e test with NativeEditor

* Update Loki Snapshots

* Fix e2e test with NativeEditor

* Revert "Update Loki Snapshots"

This reverts commit 7d1ea82579.

* Revert "Revert "Update Loki Snapshots""

This reverts commit fd7b552770.

* update screenshot

* Fix autocomplete API calls in the new native query editor (#52688)

* Enable autoFocus

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-01-29 18:39:22 +01:00
Nick Fitzpatrick
687fe82667 Fix nav bar highlighting when creating a new question (#52847) 2025-01-29 12:37:34 -04:00
Alexander Polyankin
b4a28c6a6f Fix setting "Display as Link" in model metadata (#52749) 2025-01-29 11:25:30 -05:00
Aleksandr Lesnenko
4f899500f6 drop codenotify (#52690) 2025-01-29 15:56:35 +00:00
Chris Truter
ee6550bfbe Add metrics around default and active engines (#52893) 2025-01-29 15:56:17 +00:00
Uladzimir Havenchyk
07967d1d54 ci: do not cache yarn registry (#52658) 2025-01-29 12:42:36 +00:00
Kamil Mielnik
674a2ef295 Remove deprecated custom Cypress API commands (#52878)
* Remove empty file

* Replace API commands usages with helpers

This is an automated change:

find e2e -type f \( -name "*.spec.*" \) -exec sed -i 's/cy.archiveCollection/H.archiveCollection/g; s/cy.archiveDashboard/H.archiveDashboard/g; s/cy.createCollection/H.createCollection/g; s/cy.createDashboard/H.createDashboard/g; s/cy.createDashboardWithQuestions/H.createDashboardWithQuestions/g; s/cy.createNativeQuestion/H.createNativeQuestion/g; s/cy.createNativeQuestionAndDashboard/H.createNativeQuestionAndDashboard/g; s/cy.createQuestion/H.createQuestion/g; s/cy.createQuestionAndAddToDashboard/H.createQuestionAndAddToDashboard/g; s/cy.createQuestionAndDashboard/H.createQuestionAndDashboard/g; s/cy.editDashboardCard/H.editDashboardCard/g' {} +

* Manually adjust imports

* Remove API commands

* Update calls with whitespace after `cy.`

* Update imports
2025-01-29 17:59:24 +07:00
Filip Hric
f5531c1b7c fix path in codeowners (#52881) 2025-01-29 11:46:47 +01:00
Uladzimir Havenchyk
85f0815d4d chore: cleanup storybook patches (#52805) 2025-01-29 13:22:43 +03:00
Kamil Mielnik
a034598d14 Fix - Wrong value shown in the filter modal (#52594)
* Sync state in useStringFilter

* Sync state in useBooleanOperatorFilter

* Sync state in useBooleanOptionFilter

* Add FilterModalResult type

* Fix setTab type

* Make comments work as JSDocs

* Move FilterModalResult

* Add filter modal context

* Drop FilterModalHeader and use FilterSearchInput directly

* Start to use context in BooleanFilterEditor

* Start to use context in TimeFilterEditor

* Start to use context in DateFilterEditor

* Start to use context in CoordinateFilterEditor

* Start to use context in NumberFilterEditor

* Start to use context in StringFilterEditor

* Start to use context in DefaultFilterEditor

* Stop drilling isSearching

* Fix tests

* Stop drilling version prop

* Remove FilterModalBody and FilterModalFooter exports

* Make naming consistent

* Remove props drilling

* Remove props drilling

* Remove props drilling

* Inline FilterTabContent into FilterModalBody

* Revert "Inline FilterTabContent into FilterModalBody"

This reverts commit cfd5738e52.

* Remove props drilling

* Sort attributes

* Consolidate imports

* Fix a mistake

* Improve JSDoc

* Revert "Sync state in useBooleanOptionFilter"

This reverts commit 33a979dfdf.

* Update approach after merging refactoring branch

* Add a repro for string filters

* Go back and forth on search input

* Assert operator

* Move effect to concrete hook

* Add test for boolean filters

* Fix time filters

* Revert "Move effect to concrete hook"

This reverts commit 82b94f4345.

* Move effect outside use-time-filter

* Improve naming

* Remove TODO

* Extract setup48319

* Rename setup48319 to setupCustomColumns

* Rename handle* to on*

* Fix coordinate filters

* Fix default filters

* Fix number filters

* Revert 1st approach

* Use key prop

* Remove detailed tests and leave only one

* Use current value

* Add a test for "version" hack

* Use only version for the key

* Rename version to remountKey and add explanatory comments

* Rename forceDescendantsRemount to forceRemountDescendants

* Rename
2025-01-29 14:24:42 +07:00
Chris Truter
415864829a Initialize zeros for labeled counter metrics (#52834) 2025-01-29 07:14:06 +00:00
Sébastien
55f2b55347 Fix ultra wide tooltips (closes #52199) (#52455)
* fix ultra wide tooltips (closes #52199)

* all tooltips wrap now, and better test

* sturdier test

* use setup() in test case

* removed unncessary code path
2025-01-29 07:23:47 +01:00
Sébastien
a04fbad1c4 Sets the proper autofocus when navigating to a specific setting through the hash (#52588)
* autofocus is now properly set when using a hash in settings

* tests

* fix types in tests

* better type in test
2025-01-29 07:23:35 +01:00
appleby
414d7c21c6 Convert nil values to :null in dimension-contexts (#52692)
* Add lib.drill-thru.common/js->drill-value

* Ignore :null values in zoom-in.geographic

* Ignore :null values in zoom.in-binning

* Convert nil :values in dimensions to :null in dimension-contexts

* Add tests
2025-01-28 17:15:03 -08:00
Sloan Sparger
d951556eb1 [Cards in Dashboards] Allow duplicating questions into dashboards (#52750)
* allow duplicating questions into a dashboard

* add model test, fix copy of entity picker modals for models
2025-01-28 16:11:16 -06:00
Alex Yarosh
23b1ee90f4 docs: java 21 (#52858) 2025-01-28 17:01:33 -05:00
Cam Saul
54d9d77892 Remove defendpoint 1 (#52785) 2025-01-28 14:32:48 -07:00
Riley Thompson
8a2b0538f1 Use features instead of hard-coded driver names in tests (#52758)
* use features instead of hard coding drivers in tests

* fix formatting

* fix details-name-is-db feature

* bad conn details helper instead of features

* address pr comments

* exclude vertica from materialized view tests

* fix whitespace
2025-01-28 21:26:05 +00:00
Luiz Arakaki
3d960aeb80 Update Usage analytics YAMLs for 53 release (#52833)
Update YAMLs for 53 release.
Move all questions into usage analytics dashboards. In some cases, questions had to be duplicated in order to be moved to dashboards.
2025-01-28 17:46:48 -03:00
Oisin Coveney
71c3a2bab6 ci(sdk): Make 53 the latest in release workflow (#52789) 2025-01-28 12:02:48 -08:00
Oisin Coveney
20a474a2f2 Bump master to 54 nightly (#52790) 2025-01-28 12:00:07 -08:00
Case Nelson
5fb2f158ec Handle legacy secrets double encoded with base64 (#52836) 2025-01-28 11:24:49 -07:00
Ryan Laurie
24a9ab15e4 disable broken multi-arch container (#52839) 2025-01-28 10:56:13 -07:00
Noah Moss
9c1d83d272 Don't try to cancel a statement that has already been closed (#52762) 2025-01-28 12:39:01 -05:00
Oleksandr Yakushev
8ce2ee9f06 [test] Don't pprint values in malli= unless necessary (#52830) 2025-01-28 19:34:46 +02:00
Sloan Sparger
38e44a29bc [Cards in Dashboards] Revision history copy change (#52423)
* update copy and avoid showing two messages about moving when going between collections and dashboards in different collections

* pr feedback

* impl pr feedback
2025-01-28 10:47:07 -06:00
Abed Habli
b74a5a7056 Update google-sign-in.md (#52826) 2025-01-28 17:34:08 +01:00
Nicolò Pretto
9863ce2a11 fix: some css variables were not defined (#52808) 2025-01-28 17:18:45 +01:00
Nicolò Pretto
810fe8e072 extract function from component (#52820) 2025-01-28 17:16:44 +01:00
Sloan Sparger
7c096d3e5d [Cards in Dashboards] Fix dashboard on the go bug #52821 2025-01-28 16:08:18 +00:00
Nemanja Glumac
e800e56f96 Empty states: dashboards (#52639)
* Add dashboard empty states

* Separate empty states from the actual dashboard content

* Fix public dashboards view

* Add translation context

* Localize the `alt` tag

* Make sure the content doesn't get cut off
2025-01-28 17:07:26 +01:00
Nick Fitzpatrick
c177bbcee7 For your consideration - collection menu (#52709)
* For your consideration - collection menu

* type adjustment

* CI green?

* conditional for recommended

* adjusting e2e
2025-01-28 11:45:56 -04:00
Nicolò Pretto
783fa00d69 mark "should allow users to paginate results" as flaky as it fails with (#52816)
a new e2e grouping
2025-01-28 15:25:10 +00:00
Filip Hric
8638b3c780 add rule to prevent unsafe element filtering (#52432)
* add rule to prevent unsafe element filtering

* add eslint-disable comments for all files affected by the new eslint rule

* add tests for eslint rule
2025-01-28 16:22:25 +01:00
Sébastien
1a4aa1a5cb slightly tweaked the font size in gauge to make sure middle label is always visible (#52740) 2025-01-28 15:39:36 +01:00
Ryan Laurie
4b2db972d7 Build releases on java 21 for 53 (#52795)
* use java 21 for 53

* fix unit test
2025-01-28 07:00:45 -07:00
Uladzimir Havenchyk
e4c5f2fce7 chore: reduce flakiness on loki screenshots (#52751)
* chore: reduce flakiness on loki screenshot

* add try/catch

* add another check

* fixup

* increase timeout
2025-01-28 16:09:31 +03:00
Vamsi Peri
8c03762cc5 Update team.json (#52794) 2025-01-28 11:48:57 +00:00
William
760f65f7e5 Account for DATEFIRST in sql server (#52636)
In sql server, language settings change what day weeks start on.  The sql server driver assumes that weeks always
start on sunday (ie the US default), which means that if you change the db to french, our math is off and we start
calculating weeks and days of the week wrong.  This adds back in an offset based on DATEFIRST to fix that.
2025-01-28 10:47:17 +00:00
Mahatthana (Kelvin) Nomsawadi
0f488296d8 ci(sdk): embedding e2e workflow fixes for 53 branch (#52800)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2025-01-28 10:33:30 +00:00
Nicolò Pretto
e242f00b64 support entity ids with /entity/ routes (#52659)
* POC of entity id aware route

* wip e2e tests

* clean up logic

* changing approach as everything was broken

* revert unwanted changes

* Revert "revert unwanted changes"

This reverts commit f6ce10ac7b.

* reset routes to master

* /by-entity-id/ routes

* update tests to check for subpaths and search param preservation

* cleaning up un-needed code

* simplified even more the logic by merging the two config maps to one
array

* pass down router instead of single props

* split the tests to their files

* fix typo in test

* adds a test for a unlikely to be needed scenario

* fix import after merging master

* fix e2e copy

* /by-entity-id/ -> /entity/ as per product decision

* tag the test as flaky as it fails depending on the order of test files
being run
2025-01-28 11:03:23 +01:00
Cam Saul
3bbae3d595 Make public dashcards download endpoint match FE expectations (#52763)
* Fix public dashcards download endpoint

* Finally handle form-encoded bodies correctly
2025-01-28 01:08:20 +00:00
Cam Saul
19f17b54f8 Auto-rewrite (most) defendpoint forms in card.clj (#52569)
* Auto-rewrite defendpoint forms in card.clj

* Test fixes 🔧

* Test fixes 🔧

* Test fix 🔧

* Test fix 🔧

* cljfmt
2025-01-28 00:24:38 +00:00
Nathan Voxland
89d1513395 Limit amount of data stored in the in-memory log (#52548)
Limit amount of data stored in the in-memory log
2025-01-27 18:10:55 -06:00
Luis Paolini
b9eae7d152 Fix the Dockerfile (#52761)
seems like debian doesn't ship java 21, so I added the one from Temurin following https://adoptium.net/en-GB/installation/linux/
2025-01-27 21:07:08 -03:00
Cam Saul
57e371f5dc Auto-rewrite defendpoint forms in ldap.clj (#52565)
* Auto-rewrite defendpoint forms in ldap.clj

* Let's just try to get LDAP merged without being fancy

* Kondo
2025-01-27 15:40:54 -08:00
Ryan Laurie
77291ab895 allow dashes in hashes for e2e failure notification (#52764) 2025-01-27 16:12:39 -07:00
Cam Saul
1e83d3d38d Auto-rewrite defendpoint forms in dashboard.clj (#52481)
* Auto-rewrite defendpoint forms in dashboard.clj

* Auto-rewrite defendpoint forms in dashboard.clj

* Fix tests
2025-01-27 23:06:06 +00:00
Cam Saul
e4451b2f77 Auto-rewrite defendpoint forms in dataset.clj (#52552)
* Auto-rewrite defendpoint forms in dataset.clj

* Auto-rewrite defendpoint forms in dataset.clj

* Auto-rewrite defendpoint forms in dataset.clj

* Test fixes 🔧

* More test fixes 🔧

* A few more test fixes.

* Test fixes 🔧

* Test fixes 🔧

* Finally handle form-encoded bodies correctly
2025-01-27 15:02:30 -08:00
Nathan Voxland
e8797bc340 Don't email "new login" detected emails on embedded logins (#52286)
- Cleaned up session management
- Don't send "new device" email from embedded logins

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-01-27 16:36:53 -06:00
Ryan Laurie
6f02407835 Disable query analysis (update e2e test) (#52754)
* pass through env vars

* fix e2e test

* Revert "pass through env vars"

This reverts commit d10c7bbaea.
2025-01-27 13:59:26 -07:00
Dan Stone
62eb4a6dbe Fix blank eid not creating a new entity on load (#52517) 2025-01-27 18:37:39 +00:00
Jeff Bruemmer
eaa13e8a6b docs - moving questions into dashboards (#52755) 2025-01-27 13:36:34 -05:00
Nemanja Glumac
4ddf02cc2b Empty states: dashboard subscriptions (#52717)
* Improve empty states for dashboard subscriptions

* Prevent the title jumping when opening email subscription
2025-01-27 19:25:46 +01:00
Hervé Labas
fb65c38b84 Add desc systematically + reporter info (#52725) 2025-01-27 10:54:01 -07:00
Noah Moss
d4a9b80e2b Avoid cartesian products in pivot csv exports (#52551)
* Avoid cartesian products in pivot csv exports

* Get row and column sorting working properly

* Add a bunch of unit tests

* Test fixes, various tweaks to better match the FE output

* Fix another test

* address feedback
2025-01-27 12:37:06 -05:00
Chris Truter
ee727307c4 Disable query analysis by default (#52728) 2025-01-27 11:56:51 -05:00
Oisin Coveney
b29716d856 Convert expression popover to mantine to fix z-index issues (#52719) 2025-01-27 16:55:31 +00:00
Hervé Labas
63703cfb15 Added missing Metric mention (#52584) 2025-01-27 15:31:01 +00:00
Aleksandr Lesnenko
36bbfeec80 fix only one comparison can be added (#52644) 2025-01-27 15:29:20 +00:00
Kamil Mielnik
41441f6090 Add a repro for #32840 (#52742) 2025-01-27 15:14:20 +00:00
Filip Hric
d0859d5455 fix flaky test (#52731) 2025-01-27 15:57:31 +01:00
Alexander Polyankin
89a0a1a66a Fix converting nested mongo questions to native (#52645) 2025-01-27 09:52:34 -05:00
Mahatthana (Kelvin) Nomsawadi
a904c1e5be fix(sdk): Fix nextJS compatibility layer missing components (#52672)
* Fix nextJS compat missing components

* Remove leftover console.log

* Make code easier to understand

* Make the code more explicit
2025-01-27 14:11:30 +00:00
Mahatthana (Kelvin) Nomsawadi
3365b33beb Manually revert 88141a8 (#52736) 2025-01-27 12:34:04 +00:00
Chris Truter
7bc578d008 Track search index queue size as prometheus gauge (#52737) 2025-01-27 12:26:42 +00:00
Kamil Mielnik
a7b8f79b03 Refactor - React Context in FilterModal (#52651)
* Add FilterModalResult type

* Fix setTab type

* Make comments work as JSDocs

* Move FilterModalResult

* Add filter modal context

* Drop FilterModalHeader and use FilterSearchInput directly

* Start to use context in BooleanFilterEditor

* Start to use context in TimeFilterEditor

* Start to use context in DateFilterEditor

* Start to use context in CoordinateFilterEditor

* Start to use context in NumberFilterEditor

* Start to use context in StringFilterEditor

* Start to use context in DefaultFilterEditor

* Stop drilling isSearching

* Fix tests

* Stop drilling version prop

* Remove FilterModalBody and FilterModalFooter exports

* Make naming consistent

* Remove props drilling

* Remove props drilling

* Remove props drilling

* Inline FilterTabContent into FilterModalBody

* Revert "Inline FilterTabContent into FilterModalBody"

This reverts commit cfd5738e52.

* Remove props drilling

* Sort attributes

* Consolidate imports

* Fix a mistake

* Improve JSDoc

* Rename handle* to on*
2025-01-27 10:17:44 +00:00
John Swanson
bb909363a2 Do not clean sandboxing queries (#52710) 2025-01-25 05:39:51 +00:00
Cam Saul
a99a7dd117 Auto-rewrite defendpoint forms in session.clj (#52570)
* Auto-rewrite defendpoint forms in session.clj

* Auto-rewrite defendpoint forms in session.clj

* Remove &request anaphor and make it a normal arg

* Add test

* Defendpoint 2.1

* base-handler => handler

* Fix Kondo errors

* Make sure async exception handling is done correctly
2025-01-24 19:02:15 -08:00
Cam Saul
13e237e007 Auto-rewrite defendpoint forms in table.clj (#52642)
* Auto-rewrite defendpoint forms in session.clj

* Auto-rewrite defendpoint forms in session.clj

* Revert changes to session

* Auto-rewrite endpoints in table.clj

* Restore session.clj

* OK unrestore session

* Fix macroexpansion

* Support non-map HTTP request bodies

* Remove &request anaphor and make it a normal arg

* Add test

* Defendpoint 2.1

* base-handler => handler

* Fix Kondo errors

* Update src/metabase/api/table.clj

Co-authored-by: bryan <bryan.maass@gmail.com>

* Update src/metabase/api/table.clj

Co-authored-by: bryan <bryan.maass@gmail.com>

* no more `&request`

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-01-24 19:01:57 -08:00
Cam Saul
1a60acc0e6 Convert /public endpoints to defendpoint 2, second try (#52715) 2025-01-24 17:04:26 -08:00
Cam Saul
91953b7c96 defendpoint 2.2: auto-infer route regexes based on schemas (#52649)
* defendpoint 2.2

* Remove unused stuff

* PR feedback from @escherize
2025-01-24 17:04:01 -08:00
Cam Saul
6e5360ed78 Rewrite all remaining defendpoints except those in public.clj (#52708)
* Remove defendpoint-async

* Rewrite all the rest of the remaining defendpoints except for those in public

* Remove card endpoints from this PR

* Update src/metabase/setup/api.clj

Co-authored-by: bryan <bryan.maass@gmail.com>

* cljfmt

* Test fixes 🔧

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-01-24 17:02:43 -08:00
Cam Saul
399e8944ad Rewrite defendpoints in testing.clj and EE saml.clj (#52646) 2025-01-24 23:59:01 +00:00
Cam Saul
eca1f09ffe Auto-rewrite sandboxing REST API endpoints (#52640)
* Auto-rewrite sandboxing REST API endpoints

* attribute_remappings should be optional

* Test fix 🔧
2025-01-24 23:16:09 +00:00
Noah Moss
d65e48e6e1 Make preemptive caching toggle a FE plugin (#52131)
* Make preemptive caching toggle a FE plugin

* make sure we expose the premium feature to the FE

* fix BE test
2025-01-24 17:00:28 -06:00
Jeff Bruemmer
41a300da8c note on excel cell limit (#52713) 2025-01-24 17:12:15 -05:00
givemesomefaces
d83f37e5af XLSX Export truncate String cells to 32767 chars (#51706)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-01-24 16:46:25 -05:00
Cam Saul
060e5930d0 Drop Java 11/17 Support (#52620)
* Drop Java 11/17 Support

* Update Dockerfile

Change the Java version of the builder as well

* mention that we are dropping support for earlier Java in docs

---------

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2025-01-24 13:37:27 -08:00
Cam Saul
b941c552f0 Auto-rewrite even more defendpoints (#52641)
* Auto-rewrite more defendpoints

* Test fixes 🔧

* Test fixes 🔧
2025-01-24 20:16:16 +00:00
Cam Saul
768cb9514f defendpoint 2.1: 3x performance boost (#52647)
* Remove &request anaphor and make it a normal arg

* Add test

* Defendpoint 2.1

* base-handler => handler

* Fix Kondo errors
2025-01-24 13:14:08 -07:00
Cam Saul
fa3b30034e Auto-rewrite SCIM endpoints (#52633) 2025-01-24 13:02:25 -07:00
Cam Saul
b8b539de91 Auto-rewrite defendpoints in channel module (#52632) 2025-01-24 12:59:55 -07:00
Alberto Perdomo
878a67a293 Add caveat about SDK client filtering (#52681)
* Add caveat about SDK client filtering
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-24 19:58:49 +00:00
Riley Thompson
ff747db23e Fix flaky date-string->range driver test (#52590)
* mock time using with-redefs

* remove parallel

* use with-clock
2025-01-24 19:13:53 +00:00
Sloan Sparger
889664c71f [Cards in Dashboards] Prevent saving to other dashboards when creating a dashboard question (#52406)
* adds back prop that prevented feature from working

* fix e2e
2025-01-24 13:46:16 -04:00
Sloan Sparger
c584246f18 [Cards in Dashboards] Bulk move dashboard question candidates (#52171)
* throw down ui

* pixel freaking perfect

* wire in real endpoint for fetching dashboard question candidates

* wire in move endpoint

* loading and error handling for mutation

* persist info step acknowledgement

* optionally show item in menu, fix flickering of info modal is acked previously, add a toast on successful bulk move

* fix some of the failing existing tests

* add unit tests for collection menu

* add unit tests for main migration modal

* add e2e test

* fix failing unit test

* fix another failing unit test

* fix candidates result being stale if dashcards added/removed from dashboards creates/removes candidates

* adjust url of feature

* copy feedback

* fix type-check

* scope feature to only admins

* use pagination to fetch count but not items when detecting if to show the migration tool menu item

* test + style improvements, impl pr feedback

* fix unit tests, add unit coverage for is admin
2025-01-24 11:16:00 -06:00
appleby
a5207cbab4 Disable drill thrus for native queries with template-tag variables (#52485)
* Add lib.native/has-template-tag-variables?

* Disable drills for native queries with template tag variables

Closes #49051

* Re-export lib.native/has-template-tag-variables? from lib.core

* Add tests for disabled drills for native queries with variables

* Review feedback
2025-01-24 08:31:06 -08:00
Chris Truter
3155b1cd2a Mark metrics-search as flaky (#52668) 2025-01-24 09:13:30 -07:00
Oisin Coveney
3a8cf256d0 Convert LoadingAndErrorWrapper to TS (#52475) 2025-01-24 07:37:39 -08:00
Uladzimir Havenchyk
f81d575f9d chore: upgrade undici package with a security fix (#52656)
* chore: upgrade undici package with a security fix

* remove resolution for source-map-js
2025-01-24 17:37:57 +03:00
Chris Truter
8473fdb650 Move weight updates to a PUT (#52582) 2025-01-24 17:34:40 +03:00
Alexander Solovyov
9543678121 start prometheus when sending metrics if it was not started yet (#52652) 2025-01-24 17:24:20 +03:00
Alexander Polyankin
d9674eb215 Remove an empty query stage after a drill from dashboards (#52631) 2025-01-24 09:21:28 -05:00
Alexander Polyankin
1f7cd46a28 Close clause popovers when dnd is active (#52616) 2025-01-24 09:21:11 -05:00
Chris Truter
c09ff48c6c Simplify and shorten upload table names (#52581)
Closes: https://github.com/metabase/metabase/issues/52116

Note that of icu4j was already a dependency, via graalvm. 

We have just made it explicit now, ~~and updated to the latest version.~~ ([upgrading version breaks rendering](https://github.com/metabase/metabase/actions/runs/12926546646/job/36049844305?pr=52581))

```
org.graalvm.js/js 22.3.5
  . org.graalvm.regex/regex 22.3.5
    . org.graalvm.truffle/truffle-api 22.3.5
    . com.ibm.icu/icu4j 71.1
  . org.graalvm.truffle/truffle-api 22.3.5
    . org.graalvm.sdk/graal-sdk 22.3.5
  . org.graalvm.sdk/graal-sdk 22.3.5
  . com.ibm.icu/icu4j 71.1
```
2025-01-24 13:33:59 +00:00
Uladzimir Havenchyk
18e423c8df fix: allow passing aggregation instead of expression (#52628)
* allow passing aggregation instead of expression

* add e2e test
2025-01-24 11:00:33 +00:00
Timofey Kachalov
a58c82bec5 Refactor use-embed-font hook (#52447) 2025-01-24 14:38:04 +04:00
Chris Truter
1a413c114b Always schedule new trigger (#52600) 2025-01-24 06:50:39 +00:00
Cam Saul
adedaf3677 Auto-rewrite defendpoint forms in persist.clj (#52562)
* Auto-rewrite defendpoint forms in persist.clj

* Auto-rewrite defendpoint forms in persist.clj
2025-01-23 19:06:53 -08:00
Cam Saul
f35c2c286b Auto-rewrite defendpoint forms in timeline.clj (#52564) 2025-01-23 19:06:19 -08:00
Cam Saul
86eefeff09 Auto-rewrite defendpoint forms in google.clj (#52626) 2025-01-24 02:35:37 +00:00
Cam Saul
3b3771be4e Auto-rewrite defendpoint forms in task.clj (#52558) 2025-01-23 18:07:33 -08:00
Cam Saul
4b60e5ab18 Auto-rewrite defendpoint forms in slack.clj (#52568) 2025-01-24 01:55:02 +00:00
Cam Saul
92b0983353 Auto-rewrite defendpoint forms in embed.clj (#52567)
* Auto-rewrite defendpoint forms in embed.clj

* Auto-rewrite defendpoint forms in embed.clj

* Auto-rewrite defendpoint forms in embed.clj
2025-01-23 17:47:02 -08:00
Cam Saul
9d5cf6baaf Auto-rewrite defendpoint forms in revision.clj (#52625) 2025-01-24 01:01:01 +00:00
Cam Saul
c453d347e8 Auto-rewrite remaining defendpoint forms in src/metabase/api/api_key.clj (#52624)
* Auto-rewrite defendpoint forms in src/metabase/api/api_key.clj

* Auto-rewrite defendpoint forms in src/metabase/api/api_key.clj

* Fix formatting

* Auto-rewrite defendpoint forms in api_key.clj

* Auto-rewrite defendpoint forms in api_key.clj
2025-01-24 00:55:10 +00:00
Cam Saul
91c6427e1f Auto-rewrite defendpoint forms in segment.clj (#52559) 2025-01-23 16:43:57 -08:00
Cam Saul
a5ccd65d08 Auto-rewrite defendpoint forms in timeline_event.clj (#52560) 2025-01-23 16:43:24 -08:00
Eric Normand
fedd7d2485 Test: Oracle compares dates (no time) correctly (#52606)
* Test: Oracle compares dates (not time) correctly

* Indentation

* Parameterize test to clarify only type changes
2025-01-23 17:23:17 -06:00
Alexander Polyankin
ee22e2895f Fix recents in the entity picker for tables in joins (#52630) 2025-01-23 21:47:08 +00:00
Cam Saul
77269788b6 Auto-rewrite defendpoint forms in preview_embed.clj (#52566)
* Auto-rewrite defendpoint forms in preview_embed.clj

* Auto-rewrite defendpoint forms in preview_embed.clj
2025-01-23 13:54:57 -07:00
Cam Saul
efa723617e Auto-rewrite defendpoint forms in setting.clj (#52563) 2025-01-23 13:52:18 -07:00
Cam Saul
dc674ad1f6 Auto-rewrite defendpoint forms in native_query_snippet.clj (#52561) 2025-01-23 13:47:15 -07:00
Ryan Laurie
c349e6fc00 Properly tag external db tests (#51875)
* update ci file change deps

* update tags
2025-01-23 20:46:29 +00:00
Cam Saul
4995c330e7 Auto-rewrite defendpoint forms in model_index.clj (#52557) 2025-01-23 13:40:05 -07:00
Uladzimir Havenchyk
df32bd3af1 chore: upgrade storybook to v8 (#51699)
* updated some flaky screenshots
* simplified ci job
* updated types
* registered visualizations and added a way to register multiple visualizations in storybook
* replaced @storybook/testing-library with @storybook/test
2025-01-23 20:15:11 +00:00
Jeff Bruemmer
b188dafad9 Update converttimezone.md (#52617) 2025-01-23 14:04:20 -05:00
John Swanson
0c1593e9b4 Paginate the DQ candidates endpoints (#52533)
* Paginate the DQ candidates endpoints

* Paginate in Clojure

I think this should be fine - the number of cards we're working with
should be relatively small, since this is working one collection at a time.

* CR response
2025-01-23 18:57:01 +00:00
Ryan Laurie
2e13505d19 Split up slow e2e test spec (#52416)
* split the chonky tests up

* est timings

* update timings
2025-01-23 11:48:13 -07:00
Dan Stone
dde841f26e Do not ignore full_stacktrace on import (#52580) 2025-01-23 18:37:46 +00:00
Alexander Polyankin
ebaf8a84c6 Add repro for "Cannot filter on enum fields on dashboards" (#52602) 2025-01-23 13:24:46 -05:00
Alexander Polyankin
86d9c905b5 Remove an external link from convert-timezone description (#52603) 2025-01-23 12:52:24 -05:00
Cam Saul
3e5c7bda5e Auto-rewrite defendpoint forms in database.clj (#52543)
* Auto-rewrite defendpoint forms in database.clj

* Some cleanup

* Update src/metabase/api/database.clj

Co-authored-by: bryan <bryan.maass@gmail.com>

* cljfmt

* Auto-rewrite defendpoint forms in database.clj

* Test fix?

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-01-23 09:21:33 -08:00
John Swanson
839b090013 Exclude DQs from DQ candidate endpoint (#52516)
* Exclude DQs from DQ candidate endpoint

... oops

I also moved the `(= (:collection_id card) (:collection_id dashboard))`
check out of `card/sole-dashboard-id`, since it's not really part of
being a sole dashboard.

* Add `dashboard_id IS NULL` to the query

... instead of filtering them out in clojure.
2025-01-23 11:20:53 -06:00
William
37aaa66a85 Allow passing aggregation functions to coalesce (#52505)
This was already legal-ish, as [:* 1 [:sum ...]] was a valid argument to coalesce.  However, you couldn't pass in the
sum directly.  Under the hood, NumericExpressionArg allowed aggregations, but ExpressionArg didn't.  Presumably, the
one is supposed to be a superset of the other, and this change made that actually be true.
2025-01-23 10:51:49 -06:00
Filip Hric
0e7b66ae44 improve rules around unscoped-selectors rule (#52509)
* improve rules around unscoped-selectors rule

* add a test for newly added rules
2025-01-23 16:49:41 +01:00
Ryan Laurie
8a5eb47579 quarantine flaky tests (#52589) 2025-01-23 06:47:19 -07:00
Ngoc Khuat
19acff81ae Fix dashboard subscription sometimes shows empty result (#52571) 2025-01-23 11:13:25 +00:00
lbrdnk
e98220607a Add reproduction for #49433 (#52553) 2025-01-23 10:29:36 +01:00
Sébastien
eccfcf2c17 Trim tab names on blur (closes #50797) (#52397)
* Trim tab names on blur (closes #50797)

* cleaner tests
2025-01-23 10:02:17 +01:00
Phoomparin Mano
f32093aac1 ci(sdk): skip flaky tooltip test on ci (#52577) 2025-01-23 15:55:01 +07:00
Chris Truter
7c71973684 Register prometheus endpoint metrics (#52534) 2025-01-23 08:24:18 +00:00
Phoomparin Mano
9e9292d5e4 Revert public.clj changes from #52490 (#52574) 2025-01-23 13:53:43 +07:00
Phoomparin Mano
e3cdbbf7a8 fix(sdk): fix save question form's cancel button height (#52504) 2025-01-23 12:55:26 +07:00
Phoomparin Mano
88141a8fca fix(sdk): echarts tooltip is cut off below the viewport height (#52310) 2025-01-23 12:55:16 +07:00
Cam Saul
5b8adfe4df Auto-rewrite defendpoint forms in util.clj (#52486)
* Auto-rewrite defendpoint forms in util.clj

* Test fix 🔧
2025-01-22 19:50:45 -08:00
Cam Saul
87f5ff5025 Auto-rewrite defendpoint forms in pulse.clj (#52549)
* Auto-rewrite defendpoint forms in pulse.clj

* Don't ignore ALL the deprecated namespaces <3

* Test fixes 🔧
2025-01-22 19:50:12 -08:00
Cam Saul
1e4bf6a9ea Auto-rewrite defendpoint forms in search.clj (#52550)
* Auto-rewrite defendpoint forms in search.clj

* Auto-rewrite defendpoint forms in search.clj

* Auto-rewrite defendpoint forms in search.clj
2025-01-22 19:18:25 -08:00
Sloan Sparger
f3715931c0 [Cards in Dashboards] Update question save location filter to exclude items without can_write access (#52395)
* filter out collections and dashboards where can_write is false from recents tab in collection picker

* move modal filter out locations you can not save to from recents tab

* add e2e test

* pr feedback - make cleaner and add comment
2025-01-22 20:04:04 -06:00
Cam Saul
61dbcc3c4e Auto-rewrite defendpoint forms in field.clj (#52544)
* Auto-rewrite defendpoint forms in field.clj

* Auto-rewrite defendpoint forms in field.clj
2025-01-23 01:46:37 +00:00
Cam Saul
97ce719dc1 Auto-rewrite (some) defendpoint forms in session.clj (#52542) 2025-01-22 14:49:00 -08:00
Tyler Plude
74b7088daa Fixes bug where scaled column is not respected in xlsx exports (#50518) (#52482)
* Fixes bug where scaled column is not respected in xlsx exports

* Fixing associated scaled value export unit test
2025-01-22 14:26:19 -08:00
Cam Saul
7ca14ce129 Auto-rewrite defendpoint forms in permissions.clj (#52541)
* Auto-rewrite defendpoint forms in permissions.clj

* Auto-rewrite defendpoint forms in permissions.clj
2025-01-22 13:45:46 -08:00
Raphael Krut-Landau
1ba4aba2d0 [Deets in Sheets]: Relationships tab (#52057)
This PR adds a Relationships tab to the question info sidesheet that shows where the question/model is used, and which tables are linked to it.

![image](https://github.com/user-attachments/assets/ccfb3e8e-923f-41b7-a45f-ca171141695d)
2025-01-22 16:30:06 -05:00
Jeff Bruemmer
d077d441d5 docs - remove paid features docs section (#52545)
* remove paid features docs section

* redirect
2025-01-22 16:09:14 -05:00
Cam Saul
b9d2bbe034 Auto-rewrite defendpoint forms in automagic_dashboards.clj (#52471)
* Auto-rewrite defendpoint forms in src/metabase/api/automagic_dashboards.clj

* Manual cleanup

* Auto-rewrite defendpoint forms in bookmark.clj

* Manual cleanup

* Auto-rewrite defendpoint forms in automagic_dashboards.clj

* Fix endpoints with no route params but no regexes

* Auto-rewrite defendpoint forms in automagic_dashboards.clj

* Auto-rewrite defendpoint forms in automagic_dashboards.clj

* Auto-rewrite defendpoint forms in automagic_dashboards.clj

* Don't include changes to dev namespace

* Revert changes to bookmark

* Some manual cleanup

* Show should be optional
2025-01-22 20:32:59 +00:00
Cam Saul
3aadc1e6bb Auto-rewrite defendpoint forms in user.clj (#52488) 2025-01-22 20:31:52 +00:00
Ryan Laurie
333eca8d45 reset webhook tester (#52538) 2025-01-22 13:10:24 -07:00
Cam Saul
3f01cd254d Auto-rewrite defendpoint forms in user_key_value.clj (#52489)
* Auto-rewrite defendpoint forms in user_key_value.clj

* Auto-rewrite defendpoint forms in user_key_value.clj

* Auto-rewrite defendpoint forms in user_key_value.clj

* Cleanup + fixes 🔧
2025-01-22 12:05:11 -08:00
Cam Saul
c7fe1a2484 Auto-rewrite defendpoint forms in cache.clj (#52476)
* Auto-rewrite defendpoint forms in cache.clj

* Auto-rewrite defendpoint forms in cache.clj

* Auto-rewrite defendpoint forms in cache.clj

* Auto-rewrite defendpoint forms in cache.clj

* Fix schema for PUT /api/cache

* Fix cache schema (part 2)
2025-01-22 19:50:34 +00:00
Cam Saul
dddd710ac8 Auto-rewrite defendpoint forms in public.clj (#52490)
* Auto-rewrite defendpoint forms in public.clj

* Auto-rewrite defendpoint forms in public.clj
2025-01-22 18:43:58 +00:00
Alexander Polyankin
a82a386525 Fix numeric parameter value parsing when there are no connected database fields (#52484) 2025-01-22 18:27:15 +00:00
Nemanja Glumac
4b5ddbd97f Exclude e2e-tests-result from Slack notifications (#52530)
* Exclude `e2e-tests-result` from Slack notifications

* Update .github/workflows/rerun-workflows.yml

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

* Keep the flaky job check separate

* missing paren

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-01-22 18:50:24 +01:00
Cam Saul
776e0c65cf Auto-rewrite defendpoint forms in cloud_migration.clj (#52478) 2025-01-22 10:38:42 -07:00
Cam Saul
2f21dd6596 Auto-rewrite defendpoint forms in bookmark.clj (#52472)
* Auto-rewrite defendpoint forms in bookmark.clj

* Manual cleanup
2025-01-22 10:38:03 -07:00
Cam Saul
dae1de739f Auto-rewrite defendpoint forms in src/metabase/api/api_key.clj (#52470)
* Auto-rewrite defendpoint forms in src/metabase/api/api_key.clj

* Auto-rewrite defendpoint forms in src/metabase/api/api_key.clj

* Fix formatting
2025-01-22 10:37:00 -07:00
Ryan Laurie
ac46c14f5f remove useless jobs (#52532) 2025-01-22 10:24:12 -07:00
dpsutton
758921c1a3 Better error messages when embedding against oss (#52445)
Fixes #51972

Error message in oss:
```
❯ http get localhost:3000/auth/sso/ -pb
{
    "message": "The auth/sso endpoint only exists in enterprise builds",
    "status": "ee-build-required"
}
```

Working endpoint on ee (but an error message about what it needs)

```
❯ http post localhost:3000/auth/sso/logout -pb
{
    "errors": {
        "cookies": "map where {metabase.SESSION -> <map where {:value -> <value must be a non-blank string.>}>}"
    },
    "specific-errors": {
        "cookies": {
            "metabase.SESSION": [
                "missing required key, received: nil"
            ]
        }
    }
}
```

Running tests:

```
;; without enterprise on classpath
clj -X:dev:test :only metabase.server.auth-wrapper-test

Running tests in metabase.server.auth-wrapper-test
Ran 1 tests in 3.761 seconds
4 assertions, 0 failures, 0 errors.
{:test 1, :pass 4, :fail 0, :error 0, :type :summary, :duration 3760.932417, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
All tests passed.

;; with enterprise on classpath
clj -X:dev:ee:test :only metabase.server.auth-wrapper-test
0 assertions, 0 failures, 0 errors.
{:test 1, :pass 0, :fail 0, :error 0, :type :summary, :duration 3705.00675, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
All tests passed.
```

with enterprise has 0 assertions

and in
2025-01-22 09:32:44 -06:00
Raphael Krut-Landau
15f83e691d [Deets in Sheets] Add actions link to question info sidesheet (#52422) 2025-01-22 09:41:23 -05:00
Raphael Krut-Landau
d913e17690 [Deets in Sheets] Remove model detail links (#52349) 2025-01-22 09:40:50 -05:00
Raphael Krut-Landau
2fe63c903f [Deets in Sheets] Add fields to question info sidebar (#51907) 2025-01-22 09:40:16 -05:00
Filip Hric
643e7647f9 add a guarding assertion and remove eslint-disable (#52510) 2025-01-22 14:19:37 +01:00
John Swanson
61e74eb120 Use official docker image for Mongo (#42870)
The `circleci/*` images were deprecated in late 2021 and replaced by
`cimg/*` images. But we can just use the official images.
2025-01-22 04:43:00 -08:00
Alexander Solovyov
1df2e40a59 [search] track indexing errors (#52452) 2025-01-22 15:17:00 +03:00
Phoomparin Mano
3879be8bde docs(sdk): add proficiency labs color scheme to storybook (#52507) 2025-01-22 19:08:04 +07:00
Kamil Mielnik
1d5b5c6b33 Fix - Actions can't be made public (#52314)
* Do not render "Make public" toggle in Create Action Modal

* Disable the "make public" toggle and add a tooltip explaining why it's disabled
- Use Mantine's Switch
- Use Mantine's Tooltip

* Add a repro for #51282

* Update test name

* Fix tests

* Update unit tests

* Add unit test repro for #51282

* Remove e2e repro for #51282

* Format code

* Format code
2025-01-22 09:44:25 +00:00
Sébastien
43bf9c58c8 Fixes ellipsis button hidden when dash card title is empty string (#52305)
* fix unknown attribute error

* fix another error message about unknow HTML attribute

* fix invisible ellipsis when title is empty string

* added e2e test
2025-01-22 10:37:30 +01:00
Kamil Mielnik
9290125217 Add a repro for #7108 (#52429) 2025-01-22 14:39:48 +07:00
Kamil Mielnik
3efcf2c860 Fix - Default names for date and number filters are off (#52369)
* Update labels

* Revert "Update labels"

This reverts commit be632aec2e.

* Simplify the fix

* Update unit tests

* Update test

* Revert "Simplify the fix"

This reverts commit a9c267c4c0.

* Update labels

* Update test

* Make it work in native editor

* Revert "Update unit tests"

This reverts commit 3614a8ff2f.

* Update test

* Update test

* Update test

* Update test
2025-01-22 14:39:24 +07:00
Tyler Plude
7f3816a47a Using 1 as max value in minibar chart rendering logic if the column i… (#51937)
* Using 1 as max value in minibar chart rendering logic if the column is pure percent

* Adding MiniBar unit spec

* Prettier --write

* fixing eslint errors

* polish specs

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-01-21 23:20:59 -08:00
Alexander Polyankin
9315a633b3 Fix loader flicker and double scrollbars with the entity framework in Admin -> Data model -> Segments (#52411) 2025-01-22 04:13:36 +00:00
Cam Saul
98907d2f58 Auto-rewrite defendpoint forms in collection.clj (#52479)
* Auto-rewrite defendpoint forms in collection.clj

* cleanup

* Test fixes
2025-01-21 17:29:28 -08:00
Cam Saul
ffa6bedead Auto-rewrite defendpoint forms in cards.clj (#52477) 2025-01-21 16:30:01 -08:00
Cam Saul
79143aa539 Defendpoint 2 misc fixes (#52473)
* Defendpoint 2 misc fixes

* More fixes 🔧

* Remove some requires for faster loading; always make all query params optional

* Fix comment

* Make :boolean default false as well
2025-01-21 16:29:43 -08:00
Cam Saul
23f0e9405f Auto-rewrite defendpoint forms in activity.clj (#52474)
* Auto-rewrite defendpoint forms in activity.clj

* Auto-rewrite defendpoint forms in activity.clj

* Formatting

* Auto-rewrite defendpoint forms in activity.clj

* Auto-rewrite defendpoint forms in activity.clj
2025-01-21 15:48:42 -08:00
Nick Fitzpatrick
aff8e8e792 Update keyboard command palette nav to support ctrl + enter (#52285)
* Update keyboard command palette nav to support ctrl + enter

* add support for meta key, don't close on ctrl + click

* adding settings routes
2025-01-21 19:45:44 -04:00
Nemanja Glumac
c0dddcc3ae Empty states: models (#52205)
Add or visually upgrade the empty states for models.
This is primarily targeting the `/browse/models` page.
2025-01-22 00:36:52 +01:00
Cam Saul
c06e0293b5 Auto rewrite legacy defendpoint 1 forms (part 1) (#52294)
* Auto rewrite defendpoint ones

* My bird is typing

* Make sure response format matches old defendpoint format

* Cleanup

* Clean up alert tests

* Test fixes 🔧

* One last test fix 🔧

* Make actions execute body optional
2025-01-21 15:07:51 -07:00
Uladzimir Havenchyk
61e3d00fb2 tests(e2e): disable cypress_split summary (#52392)
* tests(e2e): disable cypress_split summary

* update test to trigger ci
2025-01-22 00:25:08 +03:00
Uladzimir Havenchyk
d2b8c0bf08 fix: use white color for icon on hover (#52440) 2025-01-21 19:14:50 +00:00
Sloan Sparger
65c112a89c Prevent Dashboard from reloading when clicking move, duplicate, and trash options in context menu (#52456)
* use Link component instead of a tags to avoid reloading the page

* fix typo

* Update frontend/src/metabase/dashboard/components/DashboardHeader/buttons/DashboardActionMenu.tsx

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>

* Update frontend/src/metabase/dashboard/components/DashboardHeader/buttons/DashboardActionMenu.tsx

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>

---------

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2025-01-21 13:14:46 -06:00
Uladzimir Havenchyk
f8a65475c0 chore(qb): drop useless divider (#52441) 2025-01-21 18:47:33 +00:00
Uladzimir Havenchyk
3267710d8d fix: update labels in the exclude date options (#52389)
* fix: update label in the exclude date options

* update tests

* update tests

* fix tests

* update loki screenshots
2025-01-21 21:43:19 +03:00
Jeff Bruemmer
0fcb08f545 enterprise only (#52151) 2025-01-21 13:05:00 -05:00
Jeff Bruemmer
80449f3cb6 docs - iframe and link variables (#52457)
* iframe and link variables

* vars
2025-01-21 12:59:13 -05:00
Raphael Krut-Landau
0efd740217 Prevent unsafe usage of localeCompare and related functions (#52399)
As a follow-up to #52284, this PR adds lint rules banning the pattern that caused a P1 (#48144). These rules require us to use the browser default with `String.localeCompare` and related functions in the `Intl` library. Since we cannot pass these functions our own locale codes, since some of these are in the wrong format.

This is designed to be a good-enough, "80 percent of the value with 20 percent of the effort" solution, even though better solutions could be pursued such as aligning FE and BE around an international standard (BCP 47).

- [x] Tests have been added/updated to cover changes in this PR
2025-01-21 12:24:44 -05:00
Oleksandr Yakushev
4f6373a71d [db-pool] Retry acquiring the connection one in tests to reduce flakiness (#52360) 2025-01-21 18:12:26 +02:00
Oleksandr Yakushev
b94b107b81 Bump HoneySQL (#52359) 2025-01-21 18:10:32 +02:00
Timofey Kachalov
af094941c8 fix(sdk): add theme change transition to the root element (#52427) 2025-01-21 19:40:03 +04:00
Alex Yarosh
af75dec737 docs: QB UI updates (#52393)
* UI updates

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-21 15:38:56 +00:00
Aleksandr Lesnenko
00059659bf allow selecting non-metric columns for tooltips of cartesian charts (#52180) 2025-01-21 10:29:13 -05:00
Chris Truter
85d3b4907b More reindexing up into the restore snapshot API (#52442) 2025-01-21 15:24:57 +00:00
dpsutton
abad978404 Add an order by to the batched truncation (#52417)
This is a strange one. But in practice, this was still doing a seq scan
on postgres.

```sql
clean=# explain DELETE FROM query_execution WHERE id IN (SELECT id FROM query_execution WHERE started_at <= '2025-01-02 01:10:15.651839+00' LIMIT 50000);
                                                           QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------
 Delete on query_execution  (cost=526084.17..1066675.96 rows=0 width=0)
   ->  Nested Loop  (cost=526084.17..1066675.96 rows=50000 width=34)
         ->  Unique  (cost=526076.73..526326.73 rows=50000 width=32)
               ->  Sort  (cost=526076.73..526201.73 rows=50000 width=32)
                     Sort Key: "ANY_subquery".id
                     ->  Subquery Scan on "ANY_subquery"  (cost=0.00..522174.32 rows=50000 width=32)
                           ->  Limit  (cost=0.00..521674.32 rows=50000 width=4)
table scan >>>>>              ->  Seq Scan on query_execution query_execution_1  (cost=0.00..1704153.49 rows=163335 width=4)
                                       Filter: (started_at <= '2025-01-01 19:10:15.651839-06'::timestamp with time zone)
         ->  Bitmap Heap Scan on query_execution  (cost=7.44..11.46 rows=1 width=10)
               Recheck Cond: (id = "ANY_subquery".id)
               ->  Bitmap Index Scan on query_execution_pkey  (cost=0.00..7.44 rows=1 width=0)
                     Index Cond: (id = "ANY_subquery".id)
(13 rows)

```

The odd thing is that it is sensitive to what timestamp you use. Here's
the same query but with a timestamp in 2024:

```sql
clean=# explain DELETE FROM query_execution WHERE id IN (SELECT id FROM query_execution WHERE started_at <= '2024-12-19 01:10:15.651839+00' LIMIT 50000);
                                                             QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------
 Delete on query_execution  (cost=225736.06..641819.90 rows=0 width=0)
   ->  Nested Loop  (cost=225736.06..641819.90 rows=28490 width=34)
         ->  HashAggregate  (cost=225724.95..226009.85 rows=28490 width=32)
               Group Key: "ANY_subquery".id
               ->  Subquery Scan on "ANY_subquery"  (cost=122917.34..225653.72 rows=28490 width=32)
                     ->  Limit  (cost=122917.34..225368.82 rows=28490 width=4)
                           ->  Bitmap Heap Scan on query_execution query_execution_1  (cost=122917.34..225368.82 rows=28490 width=4)
                                 Recheck Cond: (started_at <= '2024-12-18 19:10:15.651839-06'::timestamp with time zone)
                                 ->  Bitmap Index Scan on idx_query_execution_started_at  (cost=0.00..122910.22 rows=28490 width=0)
                                       Index Cond: (started_at <= '2024-12-18 19:10:15.651839-06'::timestamp with time zone)
         ->  Bitmap Heap Scan on query_execution  (cost=11.11..15.12 rows=1 width=10)
               Recheck Cond: (id = "ANY_subquery".id)
               ->  Bitmap Index Scan on query_execution_pkey  (cost=0.00..11.11 rows=1 width=0)
                     Index Cond: (id = "ANY_subquery".id)
(14 rows)
```

And this is because the db engine knows that most of my data is around
2025 and will just hit the whole table rather than hit an index and then
go return most of the table.

The logic we want here is basically, "work up the index on created_at
until we get to a notion of recent".

If we add an order by, we're close to that and things go much faster
again

```sql
clean=# explain DELETE FROM query_execution WHERE id IN (SELECT id FROM query_execution WHERE started_at <= '2025-01-02 01:10:15.651839+00' order by id asc LIMIT 50000);
                                                                         QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------
 Delete on query_execution  (cost=851615.84..1392207.62 rows=0 width=0)
   ->  Nested Loop  (cost=851615.84..1392207.62 rows=50000 width=34)
         ->  Unique  (cost=851608.39..851858.39 rows=50000 width=32)
               ->  Sort  (cost=851608.39..851733.39 rows=50000 width=32)
                     Sort Key: "ANY_subquery".id
                     ->  Subquery Scan on "ANY_subquery"  (cost=0.55..847705.98 rows=50000 width=32)
                           ->  Limit  (cost=0.55..847205.98 rows=50000 width=4)
                                 ->  Index Scan using query_execution_pkey on query_execution query_execution_1  (cost=0.55..2767566.54 rows=163335 width=4)
                                       Filter: (started_at <= '2025-01-01 19:10:15.651839-06'::timestamp with time zone)
         ->  Bitmap Heap Scan on query_execution  (cost=7.44..11.46 rows=1 width=10)
               Recheck Cond: (id = "ANY_subquery".id)
               ->  Bitmap Index Scan on query_execution_pkey  (cost=0.00..7.44 rows=1 width=0)
                     Index Cond: (id = "ANY_subquery".id)
(13 rows)
```
2025-01-21 09:05:53 -06:00
Timofey Kachalov
abfda359b0 Fix passing a font for static embedded question (#52368) 2025-01-21 19:01:18 +04:00
Oisin Coveney
3757a89594 Add overflow auto for dropdown (#52409) 2025-01-21 06:33:41 -08:00
Aleksandr Lesnenko
34624003cf bump tolerance (#52408) 2025-01-21 09:19:03 -05:00
Uladzimir Havenchyk
8590ba6448 chore: drop clj linting and formatting from pre-commit hook (#41602)
It caused problems as lint-staged stashes files and if developer is not familiar with the mechanism, he thinks that his work is lost. To avoid confusion we remove this git hook
2025-01-21 16:27:04 +03:00
Dan Stone
6e125a6802 Add wotbrew to team files (#52383) 2025-01-21 09:44:51 +00:00
Timofey Kachalov
a4665a7234 Improve theme transitions (#52259) 2025-01-21 12:36:25 +04:00
Ryan Laurie
f435376eaa fix impersonation test (#52418) 2025-01-21 01:21:09 +00:00
Riley Thompson
296e2258b9 Fix Postgres XML column visualization (#52400)
* convert xml col to string

* add test

* remove unnecessary .getObject call to fix eastwood

* remove ^:parallel from test

* use mt/test-driver
2025-01-20 23:30:03 +00:00
Sloan Sparger
db5d327471 Skip model modal if the user has accepted it previously (#52000)
* skips model popup

* fix types

* port to ts

* reorganize acknowledgement code

* improve ack api, add unit test, fix missing key prop console warning for question action menu

* move schema file to correct location, improve e2e

* Make sure we can load User KV schemas when in a JAR (#52246)

* Make sure we can load user KV schemas in a JAR

* A few minor tweaks

- removed some unused code

- added some more comments to clarify when each function is used

- move `update-user-key-value-schema!` outside the `doseq`

* Fix tests

* A bit more clarity

* actually fix tests

* move prod implementation below dev implementation; couple other tweaks

* fix fn name

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>

* remove only usage in test

* lint and unit fixes

* fix unit test for real this time

* but actually... unit tests are fixed this time

---------

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-01-20 17:13:21 -06:00
Ryan Laurie
04eb8348bc Close Stale PRs (#52394) 2025-01-20 16:01:18 -07:00
William
30b9d66619 Sync extra fields to order-by when replacing breakouts (#52338)
When we replace a breakout, we also update any related order-by.  However, we weren't updating all fields.  This
meant that the order-by and breakout weren't identical.  This was fine-ish on postgres, because they compiled to the
same thing.  However, on google bigquery, it expects that group bys and order bys will refer to the AS alias instead
of just duplicating the code for the aliased thing.  The differences between order-by and breakout meant that we
didn't realize that the one was supposed to match the other, and so we duplicated the code and bigquery barfed.
Syncing more fields fixes that.
2025-01-20 21:55:26 +00:00
Oisin Coveney
b78d8cf08f Fix flex-grow property on ChartSegmentedControl buttons (#52356) 2025-01-20 13:42:21 -08:00
Sloan Sparger
59daec2227 [Cards in Dashboards] Remove dashboard name in QB header when creating a new dashboard question (#52403) 2025-01-20 14:54:33 -06:00
John Swanson
3f11901c23 POST endpoint to actually move DQ candidates (#52218)
Also removed the sort query param for the GET endpoint, since we don't
need that.
2025-01-20 12:49:31 -08:00
Sloan Sparger
31ccb1e082 [Cards in Dashboards] Move dashboard question copy fix (#52398) 2025-01-20 14:28:07 -06:00
github-actions[bot]
795b53a82a Add new strings for v52.7 (#52315)
Co-authored-by: github-actions <github-actions@github.com>
2025-01-20 13:08:29 -07:00
Riley Thompson
ab0a7f1034 Fix Presto bytes to Honey SQL conversion (#52331)
* use presto varbinary type

* remove sqlvarbinary and add test

* replace byte/1
2025-01-20 20:01:37 +00:00
Sébastien
1c63f62431 proper team for seb (#52326) 2025-01-20 18:30:23 +01:00
Braden Shepherdson
0998f9b6e1 [refs] Joined columns get unique :idents; new test metadata (#51989)
**Joined columns**

- `join__${IDENT_OF_JOIN_CLAUSE}__${IDENT_OF_COLUMN}` for explicit
  joins
- `implicit_via__${IDENT_OF_FK_COLUMN}__->__${IDENT_OF_TARGET_COLUMN}`
  for implicit joins

These fulfill the contract for column `:ident`s:
- Unique identity within one stage of a query
- Globally unique
    - Note that the same implicitly joined column (eg.
      `Products via Orders.PRODUCT_ID`) might be referenced in
      many queries, but it's the **same column** - same `display_name`,
      types, etc.

**New test metadata**

In order to test these properly, I needed test metadata with more
permutations of FKs.

I've added three new tables to `metabase.lib.test-metadata`, which are a
simplified version of Github issues, users and comments. The tables are
`:gh/issues`, `:gh/users` and `:gh/comments`.

Some notable things:
- `:gh/users` has a `:type/Text` PK, ie. Github usernames
- `:gh/issues` and `:gh/comments` have `:type/UUID` PKs
- `:gh/issues` has **two** FKs to `:gh/users`: `:reporter-id` and
  `:assignee-id`.
- `:gh/comments` has a **self FK**: `:reply-to`
- `:gh/issues :closed-at` is a `NULL`able `:type/DateTime` column, which
  we lacked previously
2025-01-20 17:02:34 +00:00
John Swanson
5e212e931f GET dashboard question candidates (#52137)
Works for both the root and normal collections.
2025-01-20 08:54:03 -08:00
Phoomparin Mano
ea4ee806aa fix(sdk): disable dashboard card click behavior and prevent url formatting (#51290)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-01-20 22:31:46 +07:00
Phoomparin Mano
3bcf2d5989 feat(sdk): granular documentation links in usage problem banner (#52257) 2025-01-20 21:53:08 +07:00
Chris Truter
a8927594c1 Use new search in tests, if available (#51277)
Fixes a bunch of minor issues found in the process of porting over the e2e tests, in particular.
2025-01-20 15:44:38 +02:00
Filip Hric
f6b9e3b0d2 Remove deprecated open native editor helper (#51707)
* phase #1: remove all uses of openNativeEditor without a parameter

* phase #2: remove all uses with parameter

* remove useless test

* fix failing test cases

* fix failing tests

* add db id and native filter interaction

* fix flaky tests
2025-01-20 13:57:37 +01:00
Raphael Krut-Landau
9c904e8500 Remove stray file that got checked in (#52336) 2025-01-20 07:30:30 -05:00
Mahatthana (Kelvin) Nomsawadi
fbf0e7a3ad Fix error button hover color (#52373) 2025-01-20 12:16:37 +00:00
Timofey Kachalov
c6bd90065b Update static embedding code template for nodejs (#52366) 2025-01-20 14:45:21 +04:00
Timofey Kachalov
d8c45ea17c Fix empty state color for accordion list (#52308) 2025-01-20 13:41:15 +04:00
Kamil Mielnik
87316e805e Fix - Custom Expression error can sometimes be slightly misleading (#52274)
* Support multiple operators in expectOp

* Refactor

* Show errors from parser

* Revert recursive-parser changes

* Pass human-friendly operator name to expectOp

* Fix typo

* Require comma if next token is not closing parenthesis

* Add a repro for #15892

* Update existing test
2025-01-20 14:51:00 +07:00
Kamil Mielnik
74cb6fa714 Add repro for #48358 (#52313) 2025-01-20 14:50:34 +07:00
Kamil Mielnik
dd8581a3d1 Add repro for #46832 (#52311) 2025-01-20 14:50:10 +07:00
Timofey Kachalov
4ec0eac971 Fix png image paths when rendered inside Embedding SDK (#52201) 2025-01-20 11:08:19 +04:00
Oisin Coveney
85e0db50f8 Convert default usages to named usages (#52079) 2025-01-18 00:30:33 +00:00
Ryan Laurie
40e53d907b no need to reset PR comments on non-PRs (#52352) 2025-01-17 23:31:15 +00:00
Case Nelson
e3adb04fa4 perf: faster snowflake sync with describe-fields (#49625)
* perf: faster snowflake sync with describe-fields

Fixes: #49624

* Fix formatting

* Update modules/drivers/snowflake/test/metabase/driver/snowflake_test.clj

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Fix up datetime types

* Ensure describe-fields is sorted

* Fix types for venues

* Check for integer with numeric_scale

* Consistency with getColumnMetadata

* Add pks

---------

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-01-17 15:45:37 -07:00
Oisin Coveney
71bc1d85d9 Convert CreateDashboardModal to new components (#52075) 2025-01-17 22:14:27 +00:00
Oisin Coveney
91b16b4a79 Fix bad overflow on ColumnItem preventing showing and hiding columns (#52290) 2025-01-17 22:04:29 +00:00
Ryan Laurie
0b880331dd Instant e2e test updates (#51605) 2025-01-17 14:49:35 -07:00
Tyler Plude
d304dae668 When duplicating a dashboard, persist the :width setting (#51805)
* When duplicating a dashboard, persist the :width setting

* Modifying copy dashboard test to account for width setting
2025-01-17 21:23:01 +00:00
Alex Yarosh
8452fc328c docs: linked filters (#52182)
* linked filters draft

* linked filters draft

* probably should actually insert the link eh?

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* review feedback

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-17 21:21:15 +00:00
Alex Yarosh
db8f67d816 docs: sharing icon (#52281) 2025-01-17 16:17:47 -05:00
lbrdnk
9ba1a81821 [Databricks] Make dataset loading chunk-size dynamic (#52097)
* Make dataset loading chunk-size dynamic

* Update comment
2025-01-17 21:51:06 +01:00
Uladzimir Havenchyk
030b80ec5a feat(qb): update header button styling (#51905) 2025-01-17 20:50:01 +00:00
Raphael Krut-Landau
af74709b0e Don't pass locale codes to localeCompare (#52284) 2025-01-17 15:01:48 -05:00
appleby
3e046e5735 Disable pivot drill thru for multi-stage queries (#52239)
This drill thru was recently enabled for multi-stage queries in #51950, but there is a bug which causes the
QueryColumnPicker to fail if a join is present. Disable the drill thru for now while we work on a fix.

Closes #52221
Related to  #52236
2025-01-17 11:55:37 -08:00
Cam Saul
2a525ea3c1 Add Kondo linter to make sure defmultis have arglists (#52083)
* Add Kondo linter to make sure defmultis have arglists

* Appease Kondo

* cljfmt
2025-01-17 12:48:55 -07:00
Case Nelson
ec1aae01a4 feat: Add csv_upload_failed metric to Prometheus (#52219) 2025-01-17 12:28:43 -07:00
Oisin Coveney
72501e16e3 Change order of input wrapper elements (#52235) 2025-01-17 11:15:00 -08:00
Jeff Bruemmer
4bffd6b8e2 docs - azure sql (#52287) 2025-01-17 14:04:00 -05:00
Luis Paolini
be08de26b6 Upgrade postgres app db version (#50310)
* Upgrade postgres app db version

The more the marrier

* Update docs/installation-and-operation/configuring-application-database.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-17 19:01:35 +00:00
appleby
4abf0a9ec3 Return is-null filter in underlying-records drill thru if value is nil (#52295) 2025-01-17 09:02:05 -08:00
Ryan Laurie
0c6f3eb867 Balance e2e specs by runtime (#52118)
* split e2e tests by timings

* dont do a volkswagen
2025-01-17 08:49:48 -07:00
Timofey Kachalov
9a2676013a Fixed resetting the embedded preview to the default font (#52306) 2025-01-17 16:45:53 +04:00
Alexander Solovyov
be81c7f922 linked-issues.ts: codeql complained about regexp (#52302) 2025-01-17 11:10:28 +03:00
Kamil Mielnik
31be930b9c Fix - Custom column formula autocomplete overwrites part of existing formula (#52198)
* Add repro for #50925

* Add a test

* Fix the case with whitespace following an incomplete token

* Add test case with bracket identifier following an incomplete token

* Add comments

* Thanks vscode

* Fix the case with bracket identifier following an incomplete token

* Simplify unit tests

* Fix the logic

* Update comment

* Fix it

* Refactor
2025-01-17 14:53:09 +07:00
Kamil Mielnik
e43a9ee150 Fix - Confusing error message when trying to add a custom expression aggregation (#52267)
* Throw different error when using a known name that is not a metric

* Drop checking for segments as they cannot be used in aggregation expressions anyway

* Add tests

* Remove redundant withName: true

* Wrap with describe

* Make naming consistent

* Improve copy
2025-01-17 14:36:49 +07:00
Alexander Solovyov
bdfc92a707 update databricks driver - removes a few security warnings (#52263) 2025-01-17 10:55:08 +07:00
Cam Saul
87eaa5d640 Drop "long test" Kondo linter threshold from 180 to 160 (#52280)
* Drop "long test" threshold from 180 to 160

* Drop threshold from 160 => 150
2025-01-17 10:54:08 +07:00
Cam Saul
1acb027d66 Split super slow Redshift upload tests off into separate job (#52077) 2025-01-17 02:14:40 +00:00
Oisin Coveney
9908b9e539 Add popover props for interactive question dropdowns (#52225) 2025-01-16 18:11:31 -08:00
Hervé Labas
1e5ebfe653 Simplify formatting of Slack bug report (#52296) 2025-01-17 01:54:21 +00:00
Riley Thompson
9fb173967f Document and update CSV date export behaviour (#52210)
* document mongo date details

* test date time export for all drivers

* include athena in csv date export test

* use athena v3_test_data
2025-01-17 00:08:20 +00:00
Eric Normand
930cb87f98 49809 Fix sorting by unbinned date expression (#52277) 2025-01-16 23:38:28 +00:00
Noah Moss
f02832e9d9 Make sure dashboard-id is always included for preemptive caching (#52126) 2025-01-16 18:26:42 -05:00
William
63c69f5461 Cards use default values when required (#52144)
If a card with a default value doesn't actually require a value, letting people clear the default value can be useful.
However, if the card does require a value, letting people clear the default just throws an error.  This is a
completely useless result, so we should use the default value in that case.  See [here](https://metaboat.slack.com/archives/C0645JP1W81/p1719233020129649) for more info.
2025-01-16 23:00:28 +00:00
Jeff Bruemmer
f40526dc12 docs - env var updates (#51986) 2025-01-16 20:28:59 +00:00
Noah Moss
81beb333b6 Fix SCIM test faliure (#52063) 2025-01-16 18:35:06 +00:00
Cam Saul
272f682da5 [Backend modularization] sync module cleanup (#52251)
* `sync` module cleanup

* Fix another bug

* Fix some references to old namespace

* Fix references to stuff that doesn't exist anymore
2025-01-16 17:36:23 +00:00
Riley Thompson
055abbf97e Fix byte to timestamp coercion for redshift (#52242)
use from_varbyte for redshift
2025-01-16 12:26:41 -05:00
Nemanja Glumac
7997420ef7 Add a warning/disclaimer for H2 uploads (#52095)
* Add a warning/disclaimer for H2 uploads

* Expand the component test

* Use the built in margin bottom

* Show the additional warning on hosted instances only
2025-01-16 17:06:49 +00:00
Uladzimir Havenchyk
41fece6015 Revert "chore(qb): cleanup unused code" and "feat(QB): combine chart type selector with viz settings sidebar" (#52270)
* Revert "chore(qb): cleanup unused code (#51903)"

This reverts commit 68b5038d6e.

* Revert "feat(QB): combine chart type selector with viz settings sidebar (#51671)"

This reverts commit 82e4392582.
2025-01-16 19:29:10 +03:00
Filip Hric
be18f2706a revert to using selector instead of helper (#52266) 2025-01-16 16:52:06 +01:00
Nemanja Glumac
8e9558ebad Remove unused REPL connection string from Cypress backend (#52272) 2025-01-16 16:28:32 +01:00
Ryan Laurie
6ee2eb3bb3 only match issues in main repo for milestoning (#52223) 2025-01-16 07:28:57 -07:00
Jeff Bruemmer
f96fe1fdb8 docs - refresh cache automatically (#52064) 2025-01-16 09:28:51 -05:00
Uladzimir Havenchyk
ee95429b8d chore: remove metabot leftovers (#52189) 2025-01-16 13:00:09 +00:00
Sébastien
0eb4084fbc Added Sébastien to team files (#52215) 2025-01-16 13:32:29 +01:00
Ngoc Khuat
c211cb72f2 dev/seed-instance! (#52258) 2025-01-16 09:35:54 +00:00
Cam Saul
bea3c3d789 Only run old migration tests onmaster and release pushes (#52254)
* Remove `mb/once` tag since we don't use it anymore

* Add `^:mb/old-migrations-tests` tag.

* Update GH Actions config

* Cleanup

* Keep the migrations test files in order

* Quote excluded tags
2025-01-16 12:07:58 +03:00
Cam Saul
6dd40b8241 Keep deps.edn deps sorted (#52256) 2025-01-16 05:02:08 +00:00
Cam Saul
46dc35e86b [Backend modularization] channel module cleanup (#52243)
* Merge `email` module into `channel`

* Fix Kondo warnings

* Remove unneeded module API namespace

* Fix error keys

* Move `/api/channel`, `/api/email`, and `:model/Channel` into `channel` module

* Fix Kondo errors

* Cleanup

* Update templates for their new homes
2025-01-15 20:17:46 -08:00
Ryan Laurie
359c55dd2e more flakes boo (#52249) 2025-01-15 20:13:49 -07:00
Oisin Coveney
5a3f6124c6 Fix bad wrapping on long names for ColumnItem (#52245) 2025-01-16 01:10:25 +00:00
Ryan Laurie
00eeac0a40 remove ocean color scheme (#52231) 2025-01-15 23:15:58 +00:00
Nathan Voxland
69a4f865fb Don't automatically persist/cache models in EE (#52222)
In EE: don't automatically persist models. Require users to select which to persist
2025-01-15 16:49:25 -06:00
Cam Saul
4a0b85c54a [Backend modularization] setup module cleanup (#52234)
* `setup` module cleanup

* Rename metabase.api.pivots (a TEST namespace!) to metabase.query-processor.pivot.test-util
2025-01-15 22:28:35 +00:00
Cam Saul
39a58d6311 [Backend modularization] parcel out async module (#52227) 2025-01-15 21:41:43 +00:00
Oisin Coveney
f18e43a0f0 fix(sdk): Add segmented button for chart settings (#52076) 2025-01-15 21:10:41 +00:00
Luis Paolini
398e108899 update troubleshooting (#52031)
* Update running.md

Some little details about running Java apps on prod

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-01-15 17:53:39 -03:00
Luis Paolini
579c00e008 docs: Update mysql.md (#52107)
* Update mysql.md

Add a note about vitess and planetscale

* Update docs/databases/connections/mysql.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-15 15:51:19 -05:00
Timofey Kachalov
de4da6e620 Apply theme change transition styles to the ParameterFieldSet component (#52049) 2025-01-15 22:54:08 +04:00
Cam Saul
91618837bf [Backend modularization] Improved model resolution; remove metabase.models and metabase-enterprise.models (#52184)
* [Backend modularization] Remove `metabase.models`

* I guess we don't really need an ordered map

* Remove unneeded require of models

* Small fixes 🔧

* Test fix 🔧

* Fix metabase.api.embed.common

* Fix some insane code that was using symbols for raw table names

* We need to do model resolution for table names

* Don't test EE namespaces in OSS
2025-01-15 18:14:40 +00:00
Ryan Laurie
e3abb47200 quarantine flaky e2e tests (#52213) 2025-01-15 17:36:58 +00:00
Case Nelson
5d9aceb04f Secret handling in details (#51714)
* Secret handling in details

Secret handling in details was very confusing. This PR consolidates most
of the logic into models.secret around toucan2 lifecycles of
model/Database.

Some of the problems fixed here:
 - path and value confusion. It was possible to swap between uploaded
   files and file-paths and end up with the uploaded file being treated
   as a file-path and leaking to users in logs, APIs, and UIs.
 - Unclear management of secret properties in details. The
   responsibility for taking in secrets in details, saving to a Secret,
   and then ensuring those incoming secrets do not get saved in details
   was spread out all over the place. This made it possible to save a
   secret-value in details.
 - Unclear hydration of secret values for connection testing. How a
   driver was supposed to get a secret and which properties might be in
   details was unclear and inconsistent. Often mangling strings and
   files returned by Secret api was necessary.
 - Encoding problems. Uploaded files were being mangled by taking bytes
   into a string and back to bytes to save. Ensure that the bytes given
   are the bytes saved.

* Fix merge

* Fix tests

* Fix db creation

* Fix db creation in other tests

* Manually add updated_at to database

* Fix tests

* Fix tests

* Fix after-select input

* Wrap in data-uri

* Fallback for -value if base64 encoding failed

* If not data-uri, then just turn string to utf8 bytes

* Poking at oracle failures

* Oracle wrap bytes in data-uri

* Don't clean secret properties from oracle

* Fix base64 typo and add test util for data-uri wrap

* Fix snowflake test

* Another snowflake test

* Update src/metabase/models/secret.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* Update src/metabase/models/secret.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* Update src/metabase/models/secret.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* Update test/metabase/test/util.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* Update src/metabase/util/jvm.clj

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Update src/metabase/util/jvm.clj

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

---------

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-01-15 10:00:26 -07:00
appleby
020cb1505c Filter after summarize drill-thru cleanups (#52175)
* Update comment in automatic-insights drill to point to new github issue

* Move helpers from lib.drill-thru.common to lib.underlying

These funcs deal with "underlying" columns, so move them into lib.underlying.

    aggregation-sourced?
    breakout-sourced?
    strictly-underlying-aggregation?

* Consistent naming for drill-thru multi-stage query tests

* Update multi-stage query drills tests to use new test helpers

* Homogenize apis for drill thru test helpers

Rename prepend-filter-to-stage to prepend-filter-to-test-expectation-stage and make the calling interface match
that of append-filter-stage-to-test-expectation.

* cljfmt
2025-01-15 08:01:58 -08:00
Vamsi Peri
5a8d279051 Run nightly point releases at 4 pm ET (#52197) 2025-01-15 18:38:21 +03:00
Eric Normand
aae5c83334 Add ericnormand to team files (#52143)
* Add ericnormand to query team and slack map

* Fix whitespace

* Remove trailing whitespace
2025-01-15 09:02:11 -06:00
Alexander Polyankin
21630de9a4 Fix in-progress selection in the date range picker (#52141) 2025-01-15 10:01:58 -05:00
Noah Moss
0a533a9c07 Revise new table permissions logic to handle sandboxes (#52052)
* Revise new table permissions logic to handle sandboxes

* tweak new perm logic

* make sure cond has a default

* fix comments

* tweak defenterprise conditions
2025-01-15 09:40:08 -05:00
Chris Truter
c8f684a36d Handle stale search index tracking gracefully for h2 (#52084) 2025-01-15 14:10:11 +00:00
Phoomparin Mano
6ef825835a fix(sdk): fix data picker crash by using mantine popover (#52096) 2025-01-15 20:43:52 +07:00
Phoomparin Mano
304e1077ee ci(sdk): add CODEOWNERS for embedding sdk (#52110) 2025-01-15 16:23:03 +07:00
Cam Saul
a6793c4061 [Backend modularization] query-analysis cleanup (#52165)
* [Backend modularization] `query-analysis` cleanup

* Update Kondo config

* Add CODEOWNERS

* metabase.task.sweep-query-analysis => metabase.query-analysis.task.sweep-query-analysis

* Move test util

* Module linter should ignore my test-setup namespace

* Make sure query analysis init is loaded in tests that need it

* Deparallelize some of the tests
2025-01-15 07:55:41 +00:00
Filip Hric
6336fdbc98 optimize matrix builder (#52101) 2025-01-15 08:49:44 +01:00
Timofey Kachalov
4c197eeead Exclude embedding-sdk/dist for babel-loader for Embedding SDK cypress tests (#52127) 2025-01-15 11:31:55 +04:00
dpsutton
8e7d79b1b9 Fix clickhouse uploads (#52181)
This change happened in peer
https://github.com/metabase/metabase/pull/51023 and is manifesting now
it seems.

The removal of the call to `(classloader/the-classloader)` is what is
hurting us.

Only clickhouse cloud instances can be set as a suitable upload spot so
i'm doing the following changes in the local jar repro to fix it up:

```clojure
(in-ns 'metabase.driver.clickhouse)

(defmethod driver/database-supports? [:clickhouse :uploads] [_driver _feature db]
  true)

(in-ns 'metabase.public-settings)
(let [db_id 2, schema_name "default", table_prefix "upload_"]
  (t2/update! :model/Database db_id {:uploads_enabled      true
                                     :uploads_schema_name  schema_name
                                     :uploads_table_prefix table_prefix}))
```
2025-01-14 22:29:40 -06:00
Cam Saul
a5022e140d [Backend modularization] analyze module cleanup (#52179)
* [Backend modularization] `analyze` module cleanup

* Appease Kondo
2025-01-14 20:11:17 -08:00
Cam Saul
ac58570ae0 [Backend modularization] actions module cleanup (#52170) 2025-01-14 20:10:46 -08:00
Cam Saul
6a477b5172 [Backend modularization] Remove metabase.compatibility (#52177)
* [Backend modularization] Remove `metabase.compatibility`

* Fix one more ref
2025-01-14 18:28:37 -08:00
Cam Saul
16ea4a7629 [Backend modularization] Remove metabase.troubleshooting (#52173)
* Remove `metabase.troubleshooting`

* Remove Kondo config
2025-01-15 02:20:31 +00:00
Mahatthana (Kelvin) Nomsawadi
3527c911d7 fix(sdk): Standardize SDK components errors with different ID formats (#49714)
* [debug] add storybook helper

* Make error on InteractiveQuestion consistent

* Make error on StaticQuestion consistent

* [debug] static question stories

* [debug] InteractiveDashboard Stories

* Make error on InteractiveDashboard consistent

* [debug] StaticDashboard stories

* Make error on StaticDashboard consistent

* [debug] EditableDashboard stories

* Make error on EditableDashboard consistent

* Fix CreateQuestion not working after fixing entity ID states

* Add tests for InteractiveQuestion

* Add StaticQuestion tests

* Add InteractiveDashboard tests

* Add StaticDashboard tests

* Add EditableDashboard tests

* Make variable names consistent

* Extract resource not found error to a component

* Fix missing return

* Make storybook usable and reduce duplications

* Don't roll my own util

* Update error colors following the new design

* Update loki snapshots

* Fix unit test expectation to hex

* Make colors easier to understand with comments

* Update SDK error style

* Update error components copy

* Use Code from metabase/ui

* Remove change accidentally commited

* Fix InteractiveQuestion renders question not found briefly

metabase#51969
2025-01-15 02:03:19 +00:00
Cam Saul
d59316a58e Remove remaining MetaBot v2 code (#52167)
* Remove remaining MetaBot v2 code

* Remove reference to metabot v2 mocks
2025-01-14 18:02:21 -08:00
Cam Saul
85a341cf55 [Backend modularization] Metabase core module cleanup (#52156)
* Metabase `core` module cleanup

* Fix some references
2025-01-15 01:15:32 +00:00
Tyler Plude
8ea5431774 Static Viz Start of Week in Subscription Emails (#51423)
* WIP First attempt at passing start of week option to static viz bundle

* Cleaning debug lines

* set moment and dayjs start of week day setting in static viz

* reverting index.ts

* Adding backend test for checking first day of week setting is respected in static viz

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2025-01-15 00:23:11 +00:00
Tyler Plude
aed32a76c7 Removing error boundaries when log scale y axis contains both negative and positive values (#51941) 2025-01-14 23:15:00 +00:00
Cam Saul
d6864cbafe [Backend modularization] xrays module cleanup (#52148) 2025-01-14 15:02:55 -08:00
Tyler Plude
fd52f4e992 Enabling mouse wheel scroll zooming for leaflet maps (#51888)
* Enabling mouse wheel scroll zooming for leaflet maps

* Reducing wheelPxPerZoomLevel so scroll zooming works faster in leaflet maps
2025-01-14 22:59:58 +00:00
Cam Saul
914cc8f725 Revert "Revert #52018 to fix failing tests (#52080)" (#52082)
This reverts commit bf88842c89.
2025-01-14 22:10:36 +00:00
Luis Paolini
5a5cbff5c4 Update mysql.md (#52139)
* Update mysql.md

Add an additional flag as a note, since I've hit this one today with a customer

* Update docs/databases/connections/mysql.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-14 21:59:13 +00:00
Oleksandr Yakushev
18cc47efef perf: Fix performance of CSV pivot table export (#51985) 2025-01-14 21:47:44 +00:00
Alexander Polyankin
c05bfd571e Date widgets types cleanup (#52138) 2025-01-14 16:34:12 -05:00
Nemanja Glumac
6d9d394b52 Remove the "version check" from the sequence of Cypress runner steps (#52054)
* Remove the Cypress "version check" step

* Remove superfluous step from GH Actions workflows
2025-01-14 22:10:03 +01:00
bryan
dc5662b06e add Dan's mb-download script (#51010)
* add Dan's mb-download script

* add short bin/README.md
2025-01-14 20:59:26 +00:00
Nemanja Glumac
95758dfdb9 Simplify Cypress custom runner dependencies (#52051)
* Delete custom util

* Expand the documentation

* Generate HTML report in `cypress/reports`
2025-01-14 21:18:24 +01:00
Luis Paolini
699c029d78 Update activating-the-enterprise-edition.md (#52133)
* Update activating-the-enterprise-edition.md

another little nitpick, since people tend to get creative with these things and then we end up debugging endless hours

* edit

---------

Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
2025-01-14 16:46:06 -03:00
Sloan Sparger
6cd504fb02 [Cards in Dashboards] Auto-scroll to new dashboard questions (#51804)
* initial impl

* better error handling, smooth scroll for adding existing cards, clean up of code in general

* add e2e test

* fix type error

* pr feedback

* reworks implementation to consume value from url then clear it, follows existing code patterns better

* clean up and test improvements

* fix e2e tests

* fix type issues

* pr feedback
2025-01-14 13:37:17 -06:00
Cam Saul
018932f07a Skip migrations tests for non-core drivers (#52060)
* Skip migrations tests for non-core drivers

* Skip schema migrations tests for drivers

* cljfmt

* Bump Hawk
2025-01-14 19:20:18 +00:00
Luis Paolini
55ab66d6cc Update activating-the-enterprise-edition.md (#52113)
* Update activating-the-enterprise-edition.md

Add details about Zscaler

* Update docs/paid-features/activating-the-enterprise-edition.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-14 15:35:04 -03:00
Jeff Bruemmer
d8674cc61b docs - preference for docker when self-hosting (#52122) 2025-01-14 18:14:20 +00:00
Sloan Sparger
d7a3215567 [User KV] Add FE APIs for working with the user key value store (#51882)
* mostly working solution w/ tests

* add basic type impl, change interface to return obj from hook, update tests to account for both

* add types to setup mock endpoint fns
2025-01-14 11:07:41 -06:00
Nicolò Pretto
d458b6e6b9 refactor sdk imports (#52020)
* move sdk config

* extracts mode: "sdk" to renderWithSDKProviders

* move MetabasePluginsConfig

* move theme types

* move theming stuff

* moved plugins, added eslint rule

* remove duplicated file

* clean up ui.tsx

* move defineMetabaseTheme

* fix lint issue
2025-01-14 16:35:20 +00:00
Alexander Polyankin
86086df469 Consolidate logic to apply a parameter to a query (#52056) 2025-01-14 11:15:28 -05:00
Nicolò Pretto
a231c83c12 update eslint rules to restrict importing from react-redux directly (#52114) 2025-01-14 17:06:13 +01:00
Sloan Sparger
1fdc213d08 [Redux] Make core app use custom redux context (#52040)
* hacks solution together to test if everything passes CI

* real implementation, removes hacked approach

* patch types

* add test coverage for patched package

* add one more unit test
2025-01-14 09:36:45 -06:00
lbrdnk
199d4c2557 Upgrade Athena jdbc driver to 3.3.0 (#52030)
* Upgrade Athena jdbc driver to 3.3.0

* Adjust driver to conform tests
2025-01-14 16:32:07 +01:00
Chris Truter
bdfa366fe5 Run search index worker on every instance (#52108) 2025-01-14 15:27:00 +00:00
Alexander Solovyov
ad00b9478b [search] update/delete indexed entities on change (#51222) 2025-01-14 18:19:14 +03:00
Aleksandr Lesnenko
19eaa8bf78 fix mobile text cards height (#52062) 2025-01-14 09:11:36 -05:00
Timofey Kachalov
9586bca50a Fix module errors when Embedding SDK Cypress tests running in development mode (#52093) 2025-01-14 18:07:04 +04:00
Uladzimir Havenchyk
6b2a9d7a72 fix: correct layout of viz settings on dashboard with reduced motion (#51960) 2025-01-14 13:39:41 +00:00
Mahatthana (Kelvin) Nomsawadi
6624cc7e22 Update error colors following the new design (#52029)
* Update error colors following the new design

* Update loki snapshots

* Fix unit test expectation to hex

* Make colors easier to understand with comments

* Fix E2E tests
2025-01-14 10:49:17 +00:00
Timofey Kachalov
5f41d063be Fix flaky JoinStep tests (#52046) 2025-01-14 13:09:13 +04:00
Kamil Mielnik
5a4e3fcb48 Remove the old EntityListLoader and clean up (#51963)
* Make setupModelPersistenceEndpoints work with multiple models

* Make test wait for data

* Improve tags invalidation

* Improve types

* Remove entity.ListLoader usage in UploadSettingsForm (#51909)

* Remove entity.ListLoader usage from ModelCacheRefreshJobs (#51910)

* Remove entity.ListLoader usage from SavedEntityList (#51914)

* Remove entity.ListLoader usage from SearchApp (#51915)

* Remove entity.ListLoader usage from QuestionList (#51912)

* Remove entity.ListLoader usage from SearchResults (#51913)

* Remove `entity.ListLoader` from `CollectionContentView` (#51916)

* Remove entity.ListLoader usage from CollectionContentView

* CI Failure notice improvements (#51885)

* don't notify slack on flaky job failing

also add more info to failure notice

* this is nicer

* add entity insertion library (#47895)

* add entity insertion library

- this lets us use `add-load/from-script`

* update add load examples

* Update year in the README (#51923)

* reset cache when starting cypress locally (#51921)

* Don't build FE for driver tests that don't need it; shave 2 minutes off of driver tests (#51884)

* Don't build FE for driver tests

* Try this again

* Consolidate MySQL job configs

* Oops fix conditional flags for test-driver

* More MySQL consolidation

* Oops

* Add a new job that waits for all other jobs (so we can require one single job going forward)

* Restore deleted code

* Try adding a Driver Tests (Summary) workflow

* How about a nice job name

* Don't love YAML inline array syntax

* Try fixing the build-static-viz configuration again

* Try fixing the build-static-viz configuration again

* Try this again

* Fix MySQL SSL config

* Try fixing the drivers summary workflow

* re-remove docs update block (#51928)

* upload title (#51931)

* Fix formatting of month-of-year when there are 53 weeks in the year (#51892)

* New deactivated_at field on users (#51765)

* New deactivated_at field on users

* fix migration syntax

* Setting alignment to top for icons in subscription and alert emails (#51886)

* Correct docstring for series (#51840)

Minor nitpicks on some endpoint docstrings

* Dont escape chars of header dashcards (#51880)

* fix rerun job

* feat(sdk): Interactive Question Chart Settings Dropdown #50976

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Oisin Coveney <oisin@metabase.com>

* Remove `entity.ListLoader` from `CollectionItemsTable` - approach v3 (#51958)

* Break CollectionItemsTable down to avoid using Search.ListLoader

* ESLint

* Oops

* Fix auto-upload effect in ModelUploadModal

* Fix types

* Fix the effect running too often

* Remove redundant code

* Reduce diff

* Remove old EntityListLoader and rename new EntityListLoaderRtkQuery to EntityListLoader

* Remove PaginationState

* Remove EntityType

* Fix effect

* Fix effect

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-14 09:02:06 +00:00
Kamil Mielnik
18f4ba60ff Fix - Removing the source filter from a linked filter will leave the latter broken (#52034)
* Add repro for #49556

* Format code

* Fix #49556

* Format code

* Rename const
2025-01-14 08:10:31 +00:00
Kamil Mielnik
1d984403bb Remove entity.ListLoader (#51908)
* Make setupModelPersistenceEndpoints work with multiple models

* Make test wait for data

* Improve tags invalidation

* Improve types

* Remove entity.ListLoader usage in UploadSettingsForm (#51909)

* Remove entity.ListLoader usage from ModelCacheRefreshJobs (#51910)

* Remove entity.ListLoader usage from SavedEntityList (#51914)

* Remove entity.ListLoader usage from SearchApp (#51915)

* Remove entity.ListLoader usage from QuestionList (#51912)

* Remove entity.ListLoader usage from SearchResults (#51913)

* Remove `entity.ListLoader` from `CollectionContentView` (#51916)

* Remove entity.ListLoader usage from CollectionContentView

* CI Failure notice improvements (#51885)

* don't notify slack on flaky job failing

also add more info to failure notice

* this is nicer

* add entity insertion library (#47895)

* add entity insertion library

- this lets us use `add-load/from-script`

* update add load examples

* Update year in the README (#51923)

* reset cache when starting cypress locally (#51921)

* Don't build FE for driver tests that don't need it; shave 2 minutes off of driver tests (#51884)

* Don't build FE for driver tests

* Try this again

* Consolidate MySQL job configs

* Oops fix conditional flags for test-driver

* More MySQL consolidation

* Oops

* Add a new job that waits for all other jobs (so we can require one single job going forward)

* Restore deleted code

* Try adding a Driver Tests (Summary) workflow

* How about a nice job name

* Don't love YAML inline array syntax

* Try fixing the build-static-viz configuration again

* Try fixing the build-static-viz configuration again

* Try this again

* Fix MySQL SSL config

* Try fixing the drivers summary workflow

* re-remove docs update block (#51928)

* upload title (#51931)

* Fix formatting of month-of-year when there are 53 weeks in the year (#51892)

* New deactivated_at field on users (#51765)

* New deactivated_at field on users

* fix migration syntax

* Setting alignment to top for icons in subscription and alert emails (#51886)

* Correct docstring for series (#51840)

Minor nitpicks on some endpoint docstrings

* Dont escape chars of header dashcards (#51880)

* fix rerun job

* feat(sdk): Interactive Question Chart Settings Dropdown #50976

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Oisin Coveney <oisin@metabase.com>

* Remove `entity.ListLoader` from `CollectionItemsTable` - approach v3 (#51958)

* Break CollectionItemsTable down to avoid using Search.ListLoader

* ESLint

* Oops

* Fix auto-upload effect in ModelUploadModal

* Fix types

* Fix the effect running too often

* Remove redundant code

* Reduce diff

* Fix effect

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-14 08:06:51 +00:00
Cam Saul
ce53e5256a Optimize Backend & Driver Tests (#52072) 2025-01-14 06:28:08 +00:00
Cam Saul
bf88842c89 Revert #52018 to fix failing tests (#52080)
This reverts commit 6fbe8727ff.
2025-01-13 18:54:42 -08:00
Cam Saul
9ec0de7013 Improved MySQL/MariaDB and Postgres test job partitioning (#52070) 2025-01-13 17:57:25 -08:00
Ryan Laurie
3ad2fa7f1a Single backend check (#52065)
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-01-13 16:04:32 -08:00
Cam Saul
ffb64be70d Split H2 app DB and driver test jobs (#52069) 2025-01-13 15:36:30 -08:00
Ryan Laurie
baec00f266 single frontend required check (#52066) 2025-01-13 16:14:38 -07:00
Cam Saul
02d1dfee1e metabase.<module>.init namespaces (#52003)
* `metabase.<module>.init` namespaces

* Fix Kondo errors

* Fix Kondos

* Oops this only works if we load the init namespace

* Fix ns sorting
2025-01-13 15:07:27 -08:00
Ryan Laurie
b46bedc781 One driver check (#52002)
* wip - one driver check

* fix the syntax

* whitespace

* learn to javascript yo

* plz

* Update .github/workflows/drivers.yml

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

---------

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-01-13 14:21:10 -08:00
bryan
fb06daf9b7 Make test run from its own namespace (#52008) 2025-01-13 13:51:42 -07:00
Noah Moss
dca2d5367e Refactor collection list query for performance (#51929)
* Don't select entire collections for permission checks

* Pull collection perm checks out as a CTE (wip)

* Cljfmt

* Refactor, fix tests

* Move comment, formatting fixes

* do a single query to fetch both the limited results and the total row count

* select more fields from collections

* inline values in the CTE to get it to work on H2

* fix e2e tests

* fix handling of limit = 0 edge case

* inline last ID
2025-01-13 15:41:01 -05:00
Jeff Bruemmer
d0d18d0774 docs - update links (#52047) 2025-01-13 14:38:47 -05:00
Alexander Polyankin
500f598ce8 Consolidate date filter clause creation in parameters (#51924) 2025-01-13 19:14:26 +00:00
appleby
4d83649cf8 Fix pivot drill thru for multi-stage queries (#51950)
* Fix pivot drill thru for multi-stage queries

* Add tests for multi-stage queries in pivot drill tests

* Fix e2e test
2025-01-13 10:14:28 -08:00
Nathan Voxland
6de41bd362 Encrypt cache (#51803)
Encrypt query_cache if encryption is enabled
2025-01-13 11:19:57 -06:00
Alexander Polyankin
97fe3a63f7 Fix 53rd week formatting (#52038) 2025-01-13 17:18:03 +00:00
Ryan Laurie
51398067a7 request reviews from filip for e2e test changes (#51968) 2025-01-13 09:49:41 -07:00
Abed Habli
6e1b34c8fe Typo (#52023) 2025-01-13 16:04:49 +00:00
Alex Yarosh
92c1f6fa99 Update static-embedding.md (#52036) 2025-01-13 16:00:54 +00:00
Timofey Kachalov
26d2d76ba6 Add sanex3339 to team files (#52026) 2025-01-13 18:45:35 +04:00
Chris Truter
6fbe8727ff Enable realtime search indexing without experimental flag (#52018) 2025-01-13 12:41:42 +00:00
Mahatthana (Kelvin) Nomsawadi
84c33f06f5 Add Code component from Mantine (#51962) 2025-01-13 12:18:15 +00:00
Mahatthana (Kelvin) Nomsawadi
6d33e3192a Fix SDK release process failure (#52015)
* debug

* [debug] upgrade gh version

* Fix the gh cli by using the latest version

* Fix gh not using the latest version
2025-01-13 12:01:02 +00:00
Chris Truter
836a66e42f Add trace logging for search index queue, and fix timer (#52017) 2025-01-13 11:10:30 +00:00
Chris Truter
87cf284db9 Ensure with-dynamic-redefs is only used with functions (#51899) 2025-01-13 10:10:24 +00:00
github-automation-metabase
bbac4354bb Update Readme version references and published npm version to 0.53.1-nightly (#52016) 2025-01-13 07:52:49 +00:00
Ngoc Khuat
b994cb167a [Notification] reduce memory footprint (#51708) 2025-01-13 02:51:21 +00:00
Alexander Polyankin
58f32ff108 Fix parameter mappings reset logic (#51973) 2025-01-11 03:33:09 +00:00
Cam Saul
a9d08f63d6 New command to generate static index.html page for OpenAPI/Scalar API documentation (#51872)
* Split Kondo lint fixes off into #51747

* Merge changes from #51660

* Reworked API documentation generation code

* Oops Markdown not YAML

* BIG documentation generation improvements

* Don't try to style tables ourselves

* Fix lint errors

* Fix tests 🔧

* Fix Kondo warnings

* Update OpenAPI dox generator to handle Defendpoint v2

* Update OpenAPI dox generator to handle Defendpoint v2

* Test fixes 🔧

* Fix uberjar compilation

* Static OpenAPI documentation generation

* change output to docs/api.html

* Update test

* PR feedback from @escherize

* add api.html

* Deprecate the old `defendpoint`

* Nuke the old version of the API documentation code (new version will be merged in #51872)

* Remove empty file

* Disable output validation in prod

* Fix the way we define defendpoint 2 handlers

* Fix deps.edn

---------

Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
2025-01-10 18:46:02 -08:00
Aleksandr Lesnenko
d1ff0969cf allow changing x-axis column settings (#51953) 2025-01-11 02:19:57 +00:00
appleby
27c6fe4864 Fix zoom-in.geographic drill thru for multi-stage queries (#51891)
* Update docstring in zoom-in.timeseries

The comment is stale. Construction of dimensions from row data is now done in available-drill-thrus.

* Fix zoom-in.geographic drill thru for mutli-stage queries

* Fix return type schema for lib.underlying/top-level-column

* Add append-filter-stage-to-test-expectation to drill-thru test-utils

* Add tests for multi-stage queries to zoom-in.geographic tests
2025-01-10 12:36:14 -08:00
Aleksandr Lesnenko
3aaecdb612 fix pivot table is not rendered until resized (#51951) 2025-01-10 20:23:20 +00:00
Riley Thompson
c1c331166a Make sync timezone log human readable (#51883)
* make timezone log human readable

* add test

* use .getId

* fix formatting

* address pr comment
2025-01-10 20:06:21 +00:00
Nemanja Glumac
12b366a2c5 Remove the custom --folder flag when running Cypress (#51964) 2025-01-10 20:06:39 +01:00
Sloan Sparger
352d96b5a6 [Cards in Dashboards] Allow creating dashboards from entity picker (#51745)
* add New Dashboard button and rework Create a new collection button to New Collection

* fix failing e2e tests

* fix unit tests

* allows users to create a new dashboard to save their dashboard question into

* remove usage of ref

* adds e2e test coverage for creating a dashboard on the go for a new question

* add unit tests

* fix type error

* clean up

* make test less flaky
2025-01-10 12:41:00 -06:00
Aleksandr Lesnenko
c2b755bc2c allow disabling table pivot when new columns were added (#51893)
* allow disabling table pivot when new columns were added

* specs
2025-01-10 18:13:05 +00:00
appleby
bf2f6678b2 Fix quick-filter drill thru for multi-stage queries (#51807)
* Fix quick-filter drill thru for multi-staged queries

* Add column-by-name and append-filter-stage to drill-thru test utils

* Add quick-filter tests for multi-stage queries

* Allow drill-thru tests to pass an update fn for :custom-{query,native,row}

The update fn will get passed the default value for the test case based on query-table and query-type. This allows
callers to easily modify or extend the default, rather than having to look it up or recreate it from scratch.

    ;; same as the standard test query, but with an extra filter stage
    :custom-query #(lib.drill-thru.tu/append-filter-stage % "count")

* Use mu/defmethod and mu/defn for column-by-name and append-filter-stage

* Add lib.drill-thru.test-util/prepend-filter-to-stage

* Add lib.drill-thru.tu/test-drill-variants-with-merged-args

A helper function to make it easy to call test-returns-drill or test-drill-application with minor variations of some
base case (for example, drill behavior should remain unchanged when called with a query with filter stage after
aggregations).

* Use test-drill-variants-with-merged-args for quick-filter multi-stage tests

* Add multi-stage quick-filter tests for a couple of unaggregated queries

* Use lib.drill-thru.tu/column-by-name in metabase.lib.drill-thru-test

* Use lib.drill-thru.tu/column-by-name in lib.drill-thru.test-util.canned

* Support skipping tests in test-drill-variants-with-merged-args

* Allow variant-case to be a fn in test-drill-variants-with-merged-args

* Clean up test formatting

* Reduce diff
2025-01-10 10:07:59 -08:00
lbrdnk
2d56f4deb9 Upgrade hive-jdbc dependency (#51902)
* Upgrade hive-jdbc
2025-01-10 18:30:02 +01:00
Alex Yarosh
7402b0ee8e docs: H1 edits (#51940)
* H1 edits

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* review suggestions

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-10 17:16:49 +00:00
Oisin Coveney
48f876956a fix(sdk): Ensure that styles within the custom expression editor still work (#51878) 2025-01-10 09:08:00 -08:00
Ryan Laurie
e0f42d499d make flaky job detection case-insensitive (#51965) 2025-01-10 08:26:03 -08:00
Ryan Laurie
6d669a7808 add filip (#51966) 2025-01-10 08:46:56 -07:00
Sloan Sparger
19830af9d2 [Cards in Dashboards] Fix focus getting lost in nested Save question modals (#51743)
* restore form focus on modal close to handle nested modal Esc dismissal

* add test coverage
2025-01-10 09:30:17 -06:00
Ryan Laurie
8020d35532 only push oss version number tag (#51944) 2025-01-10 07:53:28 -07:00
Uladzimir Havenchyk
68b5038d6e chore(qb): cleanup unused code (#51903)
* feat(QB): combine chart type selector with viz settings sidebar

* fix typecheck

* fix unit tests

* chore(e2e): create helpers for viz settings and viz type buttons

* fix some tests

* fix most of the e2e tests

* fixup

* more fixes

* another test

* add a warning

* revert cross test changes

* chore: cleanup unused code

* render component directly
2025-01-10 12:53:24 +00:00
Oisin Coveney
08f0bf86aa feat(sdk): Interactive Question Chart Settings Dropdown #50976 2025-01-09 18:07:25 -08:00
Ryan Laurie
8f1b27b774 fix rerun job 2025-01-10 01:48:23 +00:00
Tyler Plude
2244872a0f Dont escape chars of header dashcards (#51880) 2025-01-09 17:22:32 -08:00
Luis Paolini
1ea72c0b64 Correct docstring for series (#51840)
Minor nitpicks on some endpoint docstrings
2025-01-09 19:15:35 -03:00
Tyler Plude
8ce65f0ec8 Setting alignment to top for icons in subscription and alert emails (#51886) 2025-01-09 12:02:59 -08:00
Noah Moss
ed2182b89c New deactivated_at field on users (#51765)
* New deactivated_at field on users

* fix migration syntax
2025-01-09 14:51:55 -05:00
Alexander Polyankin
c3eafa1eb1 Fix formatting of month-of-year when there are 53 weeks in the year (#51892) 2025-01-09 19:01:57 +00:00
Jeff Bruemmer
69bbddbb31 upload title (#51931) 2025-01-09 18:54:15 +00:00
Ryan Laurie
81e84ccddc re-remove docs update block (#51928) 2025-01-09 10:42:30 -07:00
Cam Saul
7829b67c22 Don't build FE for driver tests that don't need it; shave 2 minutes off of driver tests (#51884)
* Don't build FE for driver tests

* Try this again

* Consolidate MySQL job configs

* Oops fix conditional flags for test-driver

* More MySQL consolidation

* Oops

* Add a new job that waits for all other jobs (so we can require one single job going forward)

* Restore deleted code

* Try adding a Driver Tests (Summary) workflow

* How about a nice job name

* Don't love YAML inline array syntax

* Try fixing the build-static-viz configuration again

* Try fixing the build-static-viz configuration again

* Try this again

* Fix MySQL SSL config

* Try fixing the drivers summary workflow
2025-01-09 09:08:06 -08:00
Ryan Laurie
9e681c801f reset cache when starting cypress locally (#51921) 2025-01-09 10:06:40 -07:00
Nemanja Glumac
8f1e55bdb1 Update year in the README (#51923) 2025-01-09 17:43:08 +01:00
bryan
4f2207b4a9 add entity insertion library (#47895)
* add entity insertion library

- this lets us use `add-load/from-script`

* update add load examples
2025-01-09 08:48:19 -07:00
Ryan Laurie
fe092c1156 CI Failure notice improvements (#51885)
* don't notify slack on flaky job failing

also add more info to failure notice

* this is nicer
2025-01-09 07:48:02 -07:00
Uladzimir Havenchyk
82e4392582 feat(QB): combine chart type selector with viz settings sidebar (#51671)
* feat(QB): combine chart type selector with viz settings sidebar

* fix typecheck

* fix unit tests

* chore(e2e): create helpers for viz settings and viz type buttons

* fix some tests

* fix most of the e2e tests

* fixup

* more fixes

* another test

* add a warning

* revert cross test changes
2025-01-09 12:10:50 +00:00
Uladzimir Havenchyk
9afbb6d62c feat(QB): show small Join and CC icons for aggregation without breakout (#51655)
* chore(QB): show small Join and CC icons for aggregation without breakout

* fix linting

* tests

* use compact prop and add another test

* revert provider

* fix memo
2025-01-09 14:15:09 +03:00
Kamil Mielnik
8ceed8d65e Port all entities to use new EntityListLoaderRtkQuery (#51496)
* Fix typo

* Fix broken memoization

* Use undefined instead of 0

* Introduce entityOptions

* Fix memoization

* Enable EntityListLoaderRtkQuery for alerts (#51501)

* Port bookmarks to use new `EntityListLoaderRtkQuery` (#51502)

* Fix types

* Enable EntityListLoaderRtkQuery for bookmarks

* Revert "Fix types"

This reverts commit f855c3a460.

* Enable EntityListLoaderRtkQuery for dashboards (#51503)

* Enable EntityListLoaderRtkQuery for persisted models (#51505)

* Enable EntityListLoaderRtkQuery for pulses (#51507)

* Enable EntityListLoaderRtkQuery for revisions (#51509)

* Enable EntityListLoaderRtkQuery for persisted segments (#51512)

* Enable EntityListLoaderRtkQuery for snippets (#51513)

* Enable EntityListLoaderRtkQuery for persisted questions (#51508)

* Enable EntityListLoaderRtkQuery for actions (#51515)

* Port tables to use new `EntityListLoaderRtkQuery` (#51518)

* Enable EntityListLoaderRtkQuery for tables

* Fix polling

* Port timelines to use new `EntityListLoaderRtkQuery` (#51516)

* Enable EntityListLoaderRtkQuery for timelines

* Add missing options

* Fix flaky test

* Port groups to use new `EntityListLoaderRtkQuery` (#51504)

* Enable EntityListLoaderRtkQuery for groups

* Bind action creators

* Fix flaky test

* Port users to use new `EntityListLoaderRtkQuery` (#51514)

* Enable EntityListLoaderRtkQuery for users

* Add missing options

* Fix crash

* Reimplement pagination

* Enable EntityListLoaderRtkQuery for search (#51568)

* Port schemas to use new `EntityListLoaderRtkQuery` (#51511)

* Enable EntityListLoaderRtkQuery for persisted schemas

* Add missing options

* Temporary commit
- just to save work at EOY

* Fix file upload

* Fix unit tests

* Fix data being set for different entityQuery

* Port collections to use new `EntityListLoaderRtkQuery` (#51519)

* Enable EntityListLoaderRtkQuery for collections

* Add missing options

* Improve typing

* Fix data being set for different entityQuery

* Fix destructuring crash

* Fix typing

* Pass options to RTK query where missing

* Use undefined instead of 0 for reloadInterval

* Port snippet collections to use new `EntityListLoaderRtkQuery` (#51847)

* Enable EntityListLoaderRtkQuery for snippet collections

* Introduce custom useListQuery

* Reduce diff

* Reduce diff
2025-01-09 14:55:02 +07:00
Cam Saul
f0842c1ce8 Defendpoint 2.0 (#51559)
* Split Kondo lint fixes off into #51747

* Merge changes from #51660

* Reworked API documentation generation code

* Oops Markdown not YAML

* BIG documentation generation improvements

* Don't try to style tables ourselves

* Fix lint errors

* Fix tests 🔧

* Fix Kondo warnings

* Update OpenAPI dox generator to handle Defendpoint v2

* Update OpenAPI dox generator to handle Defendpoint v2

* Test fixes 🔧

* Fix uberjar compilation

* PR feedback from @escherize

* Deprecate the old `defendpoint`

* Nuke the old version of the API documentation code (new version will be merged in #51872)

* Remove empty file

* Disable output validation in prod

* Fix the way we define defendpoint 2 handlers
2025-01-08 17:02:13 -08:00
Cam Saul
9c9dc1f0c1 Fix Kondo linter for with-temp and add linters for Malli explain/validate (#51747)
* DEFENDPOINT 2.0

* Remove blank file

* Fix Kondo linter for with-temp and add linters for Malli explain/validate

* Fix Kondo errors and reformat

* Revert unneeded change
2025-01-09 00:04:38 +00:00
William
f1b714aead Actions preprocess queries before compiling (#51724)
We need to preprocess queries (and use the results) to ensure that we properly cast arguments in where clauses
2025-01-08 23:52:44 +00:00
Ryan Laurie
b133ca22f3 Dot X Releases (#51257)
* first crack at dot x releases

* updates based on testing

* fix some white space
2025-01-08 16:45:23 -07:00
Noah Moss
ccdd98bc68 Premium features module + reorganization (#51700)
* start moving code around

* WIP fixes

* Test reorg, some more fixes

* Test fixes

* cljfmt, fix a test

* more cljfmt and linting

* cleanup, formatting fixes

* remove debugging code

* format again

* add some ns docstrings
2025-01-08 17:20:13 -05:00
Uladzimir Havenchyk
6d285d9311 feat(QB): change visual style of the buttons so that they all look active (#51666)
* chore(QB): change visual style of the buttons so that they all look active

* show readonly items as transparent

* adjust colors
2025-01-08 21:09:13 +00:00
Cam Saul
81ce63f45f Fix Liquibase CLI alias (#51192)
* Fix Liquibase CLI alias

* Only run setup-db! for dbDoc

* Revert job/trigger name changes

* Appease linters
2025-01-08 19:57:01 +00:00
Ryan Laurie
f3e7f3e1c2 mark the flakiest tests as such (#51869) 2025-01-08 11:12:30 -07:00
Jeff Bruemmer
84b67702a8 docs - link updates (#51870) 2025-01-08 12:58:52 -05:00
Case Nelson
dab495cf6f Set key auth as the default auth method, put warning password (#51249)
* Set key auth as the default auth method, put warning on username and password

* Fix password / keyfile existing at once

* Address review
2025-01-08 10:23:07 -07:00
Case Nelson
bd15d5d577 fix: Change pool acquireRetryAttemps to 0 (#51296)
* fix: Change pool acquireRetryAttemps to 1

Fixes: #51176

* Address PR review and only test dbs with username auth

* Fix model ref

* Exclude hive-like connections

* Ensure user and password
2025-01-08 10:22:25 -07:00
Braden Shepherdson
8d23fd7406 Adding :idents to columns returned by MetadataProviders (#50158)
Updates JVM, JS and unit test `MetadataProvider` implementations to include `:ident` fields for all columns.

These idents need to be globally unique and serdes portable; therefore they are not randomized.
Instead they are built from the database, schema, table and field names, eg.

```clojure
{:ident "field__Sample Database__PUBLIC__Orders__CREATED_AT"
 #_...}
```

**Note:** These `:ident` fields are not included on `/query_metadata` and other such API calls (currently).
They could be, but they can just as easily be synthesized from the DB, table and field in the JS metadata
implementation.
2025-01-08 16:12:53 +00:00
Uladzimir Havenchyk
dc33029e96 feat(QB): rename last to previous in date filters (#51650)
* chore(QB): rename last to previous in date filters

* update tests

* update e2e test

* fix test
2025-01-08 16:09:20 +00:00
Noah Moss
b339c31147 auto create serialization users as inactive (#51816) 2025-01-08 15:50:42 +00:00
Braden Shepherdson
8980b64c6d [refs] Clean up backfill warnings on cards at startup (#51802)
These warnings started with #50100, because the `sweep-query-analysis`
tasks had under-populated Toucan 2 queries against `:model/Card`.
2025-01-08 15:40:01 +00:00
Alexander Polyankin
933dfd793a Consolidate numeric type system checks (#51808) 2025-01-08 09:57:34 -05:00
Aleksandr Lesnenko
c1db02efac fix parameter placeholder encoding on iframe urls (#51818) 2025-01-08 14:37:07 +00:00
Oleksandr Yakushev
cd9e7c6634 perf: Optimize metabase.formatter/strip-trailing-zeroes (#51774) 2025-01-08 15:13:55 +02:00
Uladzimir Havenchyk
58cb47d6ae feat(QB): make viz icon stable independently from the viz type (#51670) 2025-01-08 15:59:27 +03:00
Uladzimir Havenchyk
a0ae2a8f28 chore(e2e): create helpers for viz settings and viz type buttons (#51674) 2025-01-08 08:23:55 +00:00
William
3339090e34 Convert aggregation order-bys to reference by index instead of uuid before hashing (#51800)
When you order by an aggregation, mbql v2 references the aggregation by uuid.  However, that makes the query hash to a different value each time, because you get a different uuid each time you hash it.  Converting the query to reference by index during the hashing process fixes this.
2025-01-08 05:27:51 +00:00
Oisin Coveney
dcea62b5e3 Don't truncate 'Generate Key' label (#51838) 2025-01-07 16:11:33 -08:00
Riley Thompson
298bdfe88d Add rileythomp to team files (#51837)
* add rileythomp to team files

* add back newline at eof
2025-01-07 17:19:43 -05:00
Ryan Laurie
90321968d5 Cache logins in e2e tests (#51715) 2025-01-07 21:12:31 +00:00
Ryan Laurie
7b7da72b9c Make JWT provider URI optional (#51832)
* make jwt provider URI optional

* prettier
2025-01-07 14:10:09 -07:00
Noah Moss
6445bc91c6 correctly hide preemptive caching toggle for root config (#51823) 2025-01-07 15:26:14 -05:00
Jeff Bruemmer
beff8ddec7 docs - in function for custom expressions (#51719) 2025-01-07 20:14:14 +00:00
Jeff Bruemmer
8ef3001c62 docs - relocate contributing file (#51764) 2025-01-07 15:09:48 -05:00
Oisin Coveney
ec35920631 Convert ChartSettingFieldsPartition to mantine (#51223) 2025-01-07 11:56:56 -08:00
Raphael Krut-Landau
e204b56332 Small a11y improvements (#51577) 2025-01-07 14:06:27 -05:00
Jeff Bruemmer
b70ec4e804 docs - note on bigquery structs (#51822) 2025-01-07 13:49:01 -05:00
Raphael Krut-Landau
fdafb79120 Fix flaky unit test of JoinStep (#51789) 2025-01-07 10:07:18 -08:00
Jeff Bruemmer
daf0185322 docs - mb-disable-scheduler (#51812) 2025-01-07 17:38:18 +00:00
Jeff Bruemmer
aff0dc9790 docs - add enterprise-only key to SDK blockquote (#51815) 2025-01-07 12:30:30 -05:00
Nathan Voxland
c120c35891 Improved encryption management (#51546)
* Ensure database is fully encrypted if key is set, fail f database is encrypted and key is not set
* Added "remove-encryption" command as a more obvious alternative to rotate-encryption-key with an empty key
2025-01-07 10:10:25 -06:00
Alexander Polyankin
58b9992f1f Quarter picker in parameters (#51770) 2025-01-07 11:07:14 -05:00
Nathan Voxland
5434b36d03 Handle exception in rollback better (#51675)
Handle exception in rollback better
2025-01-07 09:20:55 -06:00
Alexander Polyankin
4686618c33 Fix string, temporal, category type check functions (#51796)
* Fix type checks

* Fix type checks

* Fix type checks

* Fix type checks

* Remove disabled "compare-aggregations" drill

* Remove disabled "compare-aggregations" drill

* Remove dead code

* Remove dead code
2025-01-07 09:55:10 -05:00
Alexander Polyankin
01242bdb26 Change label (#51788) 2025-01-07 09:53:41 -05:00
Alexander Polyankin
29dafe465f Remove disabled compare-aggregations drill (#51798)
* Remove disabled compare-aggregations drill

* Remove disabled "compare-aggregations" drill
2025-01-07 09:52:50 -05:00
Nathan Voxland
05c93c8b21 Update setting table name reference to :model/setting (#51783)
Update setting table name reference to :model/Setting
2025-01-06 19:51:53 -06:00
Cam Saul
009c1bfdff Update API dox (#51795) 2025-01-06 16:48:07 -05:00
Noah Moss
ccfaf2e9ab Preemptive caching FE (#51684)
* fix broken link on BE

* Frontend

* update switch styles

* Fix type errors

* Fix BE tests

* fix malli schema

* logic tweak - don't show the switch if the target model is database

* cljfmt

* Add cypress test

* localize strings

* simplify form updates

* remove unneeded description style

* remove unused enabled? prop

* revert unintended change to cypress helper
2025-01-06 16:29:58 -05:00
Sloan Sparger
9ff67b56fc Fix FormTextInput styling (#51721) 2025-01-06 13:39:32 -06:00
Jeff Bruemmer
bb3abf74e1 links (#51784) 2025-01-06 16:56:01 +00:00
Ngoc Khuat
fdb3a1f127 put field usage behind a feature flag and turn it off by default (#51677) 2025-01-06 16:10:45 +00:00
Oleksandr Yakushev
83fe7b1d3f [svg] Limit the lifetime of a cached Truffle JS engine to sidestep apparent memory leaks (#51685) 2025-01-05 16:16:28 +02:00
appleby
c1bf4fb520 Fix compare-aggregations drill for multi-stage queries (#51608) 2025-01-03 13:05:05 -08:00
appleby
50e10e1b78 Fix the zoom-in.binning drill thru for multi-stage queries (#51489)
* Make renaming options optional in lib.underlying/top-level-column

* Construct dimensions from row data in available-drill-thrus

Construct dimensions from row data once in available-drill-thrus, rather than doing it in each drill that needs it
separately. The dimensions must be constructed in available-drill-thrus since some drills are expected to
return-drills-for-dimensions?, but this also has the side benefit of reducing code duplication by lifting the
rows->dimensions conversion up into a single place.

* Fix the zoom-in.binning drill thru for multi-stage queries

* Add tests for zoom-in.binning with multi-stage queries

* cljfmt

* Explicitly disable the automatic-insights drill for multi-stage queries

Previously, this drill will was implicitly disabled for multi-stage queries because the FE would not pass dimensions
for queries with underlying breakouts / aggregations. Now that dimensions are reconstructed in available-drill-thrus,
automatic-insights drill is available again, but if you try to actually run the drill you get a big scary "Something
went wrong" error, so just explicitly disable the drill until we fix it.

* Update test/metabase/lib/drill_thru/zoom_in_bins_test.cljc

Co-authored-by: Braden Shepherdson <braden@metabase.com>

* Review feedback: not-empty -> seq

* Reivew feeback: shadow rather than using a single-quote suffix

* Review feedback: underyling -> underlying

---------

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2025-01-03 13:03:32 -08:00
Jeff Bruemmer
d053b2fe80 docs - separate google sign-in and ldap docs (#51746)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-01-03 15:10:15 -05:00
Ryan Laurie
ae97cbde23 Enable N-parallelism for e2e tests (#51433) 2025-01-03 08:23:13 -07:00
Jeff Bruemmer
4eeccde961 Add link to support matrix (#51737) 2025-01-03 10:05:35 -05:00
Roman Abdulmanov
322b8958c8 Update urls (#51732) 2025-01-03 11:51:53 +00:00
Mahatthana (Kelvin) Nomsawadi
2ed72d106b Fix static embedding missing dark theme on some date widgets (#51661)
* Fix date widgets dark theme

* Update more outdated loki snapshots

* Add a story to theme date filters missing dark theme

* Theme relative current widget and co.

* Theme date exclude widget

* Theme relative date interval widget and co.

* Update more snapshots from border color change

* Fix comment on the wrong line

* Fix light theme story switching + mock relative date stories

* Review: Remove unused function arg

* Update snapshots that change once a year 🤦
2025-01-03 09:13:57 +00:00
Ryan Laurie
fe13ca6859 Happy new year e2e test fixes (#51720) 2025-01-02 14:31:29 -07:00
Uladzimir Havenchyk
5c011ed5ec chore: drop a duplicated test (#51653)
* chore: drop a duplicated test

* cleanup naming
2025-01-02 14:05:06 -07:00
Bruno Bergher
4bc96006af Workflow: Slack Notification for New Feature Requests (#51709)
Tells the PMs when new feature requests come in.
2025-01-02 16:41:59 +00:00
Braden Shepherdson
73fe6a603c [refs] Ensure all column-creating clauses have idents on read (#50100)
That is: aggregations, breakouts, expressions and joins.

Nothing is consuming these yet, but the BE populates them when reading cards.

MBQL changes
=============

These new `:ident`s have been present for new clauses for a few weeks, but now they'll be generated for existing queries on read.

The new idents are stable, including across serialization. They aren't written back until the card is saved again.

Backfilling
===========

Here's the constraints for generating idents for pre-existing clauses:

- If the same query exists across serdes instances, produce the same ident
- Globally unique, even if:
    - two cards have identical queries
    - two stages of the same card have identical `:count` aggregations.
    - a single stage has multiple aggregations of the same type
    - a single stage has duplicate breakouts with different time granularity
- Never change, even if the query does
    - mbql-lib assumes these are (in theory) randomly generated, and never examines or updates them.
    - If new clauses are added, they get random idents.
    - If clauses are removed, that's no problem.
    - If clauses are edited (eg. changing an expression name) then the BE *would* generate a new ident!
        - But when the card gets saved, the original ident with the original expression name is enshrined forever as the ident - it just needs to be unique!

The backfilled idents have this form:

```clojure
"${kind}_${entity_id of the card}@${stage-number}__${name or index}"
;; eg. 
"aggregation_ThisIsAValidNanoIdxxx@0__1"
"breakout_ThisIsAValidNanoIdxxx@1__1"
"expression_ThisIsAValidNanoIdxxx@0__exprname"
"join_ThisIsAValidNanoIdxxx@1__alias"
```
2024-12-31 16:47:03 +00:00
Ryan Laurie
e9d13a38c1 split up query stage e2e test file (#51583)
* split up query stage tests

# Conflicts:
#	e2e/test/scenarios/dashboard-filters-2/dashboard-filters-query-stages.cy.spec.ts

* update for merge to master

* fix
2024-12-31 09:34:09 -07:00
Alex Yarosh
dea02a4d22 Docs: bell icon - master version (#51696)
* alerts

* bell
2024-12-31 11:26:32 -05:00
Ngoc Khuat
84dc6f75ee toucan2 consistent model alias (#51660) 2024-12-31 05:35:35 +00:00
lbrdnk
8985d95122 Add test for external contribution (#51693) 2024-12-30 22:11:44 +03:00
Alexander Viala Bellander
263256f7ab Add M2M Oauth to Databricks Driver (#51476)
* Add M2M Oauth to Databricks Driver

* Add toggle for PAT/M2M Oauth

Introduces a 'Use Personal Access Token' toggle button which shows different UI components when setting up the connection. The implementation was inspired by @snoe in #51249

* Address feedback from @ibrdnk

Addresses the feedback related to #pullrequestreview-2515818008

* Default M2M, Add conditional Merge, Reduce whitespace

* Update docs/databases/connections/databricks.md

Co-authored-by: Jeff Bruemmer <jeffbruemmer@gmail.com>
2024-12-30 16:05:41 +01:00
Uladzimir Havenchyk
be4a57cf78 feat(QB): update view sql/hide sql button style (#51651)
* chore(QB): update view sql/hide sql button style

* update e2e tests
2024-12-28 12:37:44 +00:00
Noah Moss
68101f50f2 Ensure collections' effective_location is batch hydrated when hydrating effective_parent (#51673) 2024-12-27 15:08:34 +00:00
Oleksandr Yakushev
393308bc5c perf: Make registered? and initialized? checks faster for already initialized drivers (#51023) 2024-12-26 14:47:00 +00:00
Nemanja Glumac
4b64ef287b Remove the unused and deprecated fetch-mock-jest (#51663) 2024-12-26 14:43:52 +03:00
Alexander Polyankin
eb596a48f0 Use MonthPicker from mantine for dashboard parameters to enable selection of months in the future (#51645) 2024-12-24 16:49:15 -05:00
Oisin Coveney
0502dd8a8e Fix ChartSettingsPopover style/z-index issues (#51154) 2024-12-23 19:02:24 -08:00
Alexander Polyankin
670ee25906 Replace old DatePicker in dashboard & search parameters (#51596) 2024-12-23 22:09:21 +00:00
metamben
7dfe9d4cc4 Fix typo (#51638) 2024-12-23 21:38:21 +00:00
Aleksandr Lesnenko
5444d94a13 Fix glitching series on hover in Safari (#51611)
* nasty hack but works

* apply to safari only

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2024-12-23 15:32:44 -05:00
Aleksandr Lesnenko
97a47fe9db allow parametrized link cards (#51428) 2024-12-23 20:05:13 +00:00
Jeff Bruemmer
189703e895 docs - env vars in config files (#51642) 2024-12-23 14:14:18 -05:00
Oisin Coveney
c170d97352 Convert ChartsettingOrderedItems to match ChartSettingSelect (#51332) 2024-12-23 10:17:07 -08:00
Phoomparin Mano
1a8e6132b2 feat(sdk): make editable dashboard grid border color themeable (#51060) 2024-12-24 00:08:12 +07:00
Phoomparin Mano
4a9e296160 docs(sdk): fix initial parameter props name in dashboards (#51625) 2024-12-24 00:04:51 +07:00
Jeff Bruemmer
6ee87dcc9b docs - question in dashboards (#51366) 2024-12-23 10:45:13 -05:00
Romeo Van Snick
b7950cd10e Partial rollback of FieldValuesWidget to v50 (#51183)
* Reset FieldValuesWidget to v50 state

* Revert some changes in SingleSelectListField to v50

* Make onSearchChange optional

* Use RowValue instead of string

* Add test-ids to FieldValuesWidget inputs

* Add testing matrix for all parameter combinations

* Add filter matrix test to github workflow

* Fix unit test

* Render custom option value when it exists

* Fix e2e test

* Fix remove value helper

* Fix e2e test

* Render custom label on TokenField

* Update Loki Snapshots

* Use css colors for TokenFieldItem

* Make TokenField dark-mode aware

* Make TokenFieldItem dark-mode aware

* Update Loki Snapshots

* Fix e2e test after merge

* Add listbox role to tokenfield values

* Fix more e2e tests

* Fix e2e test for listbox

* Remove commented out code

* Fix e2e test

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2024-12-24 02:30:13 +11:00
Uladzimir Havenchyk
21e2b99ec6 chore: drop unused emotion components (#51598)
* chore: drop unused emotion components

* more cleanup
2024-12-23 13:59:31 +03:00
Uladzimir Havenchyk
72b3cc3f48 chore: remove not used index files (#51591)
* chore: remove unused files

* more files to drop

* fixup

* more files

* chore: remove not used index files
2024-12-23 13:59:19 +03:00
lbrdnk
aab7f5baee Fix method definitions (#51473) 2024-12-23 10:55:50 +01:00
Phoomparin Mano
0361bdd557 bump master to 53-nightly (#51575) 2024-12-23 05:57:35 +00:00
Alexander Solovyov
7c276e3bbf [serdes] extract tabId in click_behavior (#51588)
also, somewhat relatedly, create `elide-fk` function to skip pieces of data holding FKs to deleted targets
2024-12-21 10:07:23 +00:00
appleby
0b44617a5d Fix summarize-column and summarize-column-by-time drills for multi-stage queries (#51553)
* Fix summarize-column drill for multi-stage queries

* Fix the summarize-column-by-time drill for multi-stage queries
2024-12-20 17:19:01 -08:00
John Swanson
7ff5975436 Simple API for storing KV pairs per-user (#48376)
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2024-12-20 18:48:40 -05:00
Uladzimir Havenchyk
bcac621fa8 chore: replace global icon selector with local (#51566) 2024-12-21 01:12:17 +03:00
Noah Moss
bea199498e Batch query_execution, audit_log and view_log truncations (#51490) 2024-12-20 16:57:30 -05:00
Uladzimir Havenchyk
5583a5c29a chore: remove unused files (#51574) 2024-12-21 00:09:14 +03:00
Jeff Bruemmer
96b843e41c remove changelog toggle in release notes (#51479) 2024-12-20 15:35:45 -05:00
Oleksandr Yakushev
8b8147a807 ci: Fix be-tests stub (#51545) 2024-12-20 20:19:55 +00:00
lbrdnk
79b33141f7 Add debug logging for chain filter query (#51481)
* Add debug logging for chain filter query

* Comment
2024-12-20 20:51:25 +01:00
lbrdnk
28a1629790 Add description to metric API responses (#51448)
* Generate suggested_name on card read

* Add test

* Comment

* Naming and comment

* Use m/assoc-some
2024-12-20 20:51:14 +01:00
Sloan Sparger
f42b605299 [Cmd Palette] Do not show admin and settings links to users who do not have access (#50887)
* fixes showing admin links to not admins in the command palette

* updates calculation to take into account EE advanced permissions allowing certain users permissions to change settings who are not admins

* admin routes for non-admins

* fix unit tests

* actually fix unit tests

* adding checks for other permissions

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-12-20 15:45:40 -04:00
Alexander Polyankin
c2de5b5e5f Date picker cleanup for parameter changes (#51587)
* Remove canUseRelativeOffsets

* Remove canUseRelativeOffsets

* Types

* Types
2024-12-20 18:45:30 +00:00
Oleksandr Yakushev
6a3aa35832 Minor refactoring of cancellation-related code (#49815) 2024-12-20 19:22:54 +02:00
Oleksandr Yakushev
48ae90a5b1 ci: Only run driver tests when testing Databricks driver (#51543) 2024-12-20 18:23:09 +02:00
William
ff06e1b900 Pass uuids as strings to SQL Server (#51484)
Azure Synapse doesn't like it when you give it a uuid parameter, even though synapse does support uuids in general.
Converting those uuids to strings beforehand fixes this error, and regular SQL Server is also fine with that.
2024-12-20 09:48:55 -06:00
Nick Fitzpatrick
53af5593bd Adjust initialDashboardId calculation (#51291)
* adjust initialDashboardId calculation

* e2e adjustments

* unit test adjustment

* PR Feedback
2024-12-20 11:45:43 -04:00
Sloan Sparger
be1eac5e39 [Cards in Dashboards] Prevent dashboard from appearing in breadcrumbs when not on a DQ page (#51554)
* prevent dashboard from appearing in breadcrumbs when not on a DQ page

* updating unit test with location

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-12-20 11:43:22 -04:00
Aleksandr Lesnenko
718f667515 fix broken radio buttons in viz settings (#51558) 2024-12-20 15:42:47 +00:00
Noah Moss
4452359c58 Update migration to allow query_execution.parameterized to be null (#51549) 2024-12-20 10:41:22 -05:00
Raphael Krut-Landau
428b0c9f86 Show errors from backend in Create API key modal (#51395) 2024-12-20 15:36:54 +00:00
Nicolò Pretto
91ddc60070 add tests for support of xx-YY locales in embed/public-links (#51456)
* fix: add supports for xx-YY locales in embed/public-links

* Generate locales.json

* [WIP] Read locales.json

* wip FE implementation

* refactor + unit and sdk component tests

* fixes after the merge, plus tests and cleand up logic

* fix file name in string

* change FE logic to use locales from the instance settings

* revert json generation

* remove leftover comment

* add comment about the code to keep in sync

* migrate e2e tests for static/public to use #locale=de-CH so we test that
it's using the fallback logic

* fix kondo error
Co-authored-by: dpsutton <dan@dpsutton.com>

* fix unit test

* fix more jest tests

* cy.request -> cy.intercept

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-12-20 16:26:28 +01:00
Nicolò Pretto
bda324e42b fix(sdk): add supports for xx-YY locales in embed/public-links and sdk (#51002)
* fix: add supports for xx-YY locales in embed/public-links

* Generate locales.json

* [WIP] Read locales.json

* wip FE implementation

* refactor + unit and sdk component tests

* fixes after the merge, plus tests and cleand up logic

* fix file name in string

* change FE logic to use locales from the instance settings

* revert json generation

* remove leftover comment

* add comment about the code to keep in sync

* fix kondo error
Co-authored-by: dpsutton <dan@dpsutton.com>

* fix unit test

* fix more jest tests

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-12-20 15:11:08 +01:00
Alexander Solovyov
6fb5fdc8f4 [openapi] reduce amount of oneOf/allOf we generate in documentation (#51495) 2024-12-20 13:13:22 +00:00
Phoomparin Mano
53dee386d3 ci(sdk): make 52 the latest in release workflow (#51552) 2024-12-20 19:07:53 +07:00
Uladzimir Havenchyk
d4db9cd0e8 fix: show chevron icon in the bucket picker on hover (#51542)
* chore: rework pickers in querying folder to css modules

* more css

* more css

* more css

* fix typecheck

* fix ui

* fix ui

* drop unused code

* fix ui

* fix css

* fix unit test

* revert color changes

* fix join color

* fix showing chevron icon in the bucket picker

* address review

* oops
2024-12-20 14:54:56 +03:00
Phoomparin Mano
ec0ac2bf7a Fix non-legible text and icon colors in fullscreen dark mode (#51538) 2024-12-20 18:05:44 +07:00
Oleksandr Yakushev
963d308568 Bump Toucan2 version (#51547) 2024-12-20 00:35:52 +02:00
Aleksandr Lesnenko
f99b8baa5f show all columns in scatter tooltip by default (#51480)
* show all columns in scatter tooltip by default

* update e2e spec
2024-12-19 20:59:14 +00:00
Uladzimir Havenchyk
522910ec6b chore: rework querying steps to css modules (#51430)
* chore: rework pickers in querying folder to css modules

* more css

* more css

* more css

* fix typecheck

* fix ui

* fix ui

* drop unused code

* fix ui

* fix css

* fix unit test

* revert color changes

* fix join color
2024-12-19 23:25:07 +03:00
Noah Moss
bc4e2da39b Fix instance stats cypress test + ensure it runs in CI (#51531) 2024-12-19 15:19:52 -05:00
Aleksandr Lesnenko
9f01f0efa4 Fix pdf exports issues (#51491)
* fix horizontally trimmed content on short pages

* include filters

* update specs
2024-12-19 15:17:25 -05:00
Sloan Sparger
f29b68770f [Cards in Dashboards] Edit dashboard save changes modal adjustments (#51345)
* make making the change easy

* make easy change

* clean up

* pr feedback

* pr feedback
2024-12-19 14:05:27 -06:00
Sloan Sparger
f147c3710b [Clean-up] Allow collection clean up banner to be dismissible (#51434)
* allow collection clean up banner to be dismissable

* small change

* dismiss the banner if the user uses the clean up modal

* add test coverage
2024-12-19 14:03:04 -06:00
Aleksandr Lesnenko
a8634811a0 support parametrized iframe urls (#51374)
* support parametrized iframe urls

* spec

* copy fix
2024-12-19 14:27:42 -05:00
Nemanja Glumac
482f6bbff4 Try a band-aid fix for native editor e2e flakes (#51528) 2024-12-19 18:49:17 +00:00
Oisin Coveney
ec4192eb9d Convert ChartSettingSelect to Mantine (#50977) 2024-12-19 18:14:58 +00:00
Aleksandr Lesnenko
41bac38d80 quarantine flakes caused by problems with typing in the native editor (#51520) 2024-12-19 17:48:35 +00:00
Oleksandr Yakushev
cfe322223b perf: Add fastpaths to url? and email? predicates (#51522) 2024-12-19 19:24:55 +02:00
Alexander Polyankin
f314f6d56a Add more binning options for coordinates (#51472) 2024-12-19 17:16:52 +00:00
Abed Habli
4304b96ce2 docs: Updating "Export dashboard as PDF" (#51506)
* Updating "Export dashboard as PDF"

* Typo

* updating the screenshot
2024-12-19 18:15:24 +01:00
Sloan Sparger
56357db89f [Cards in Dashboards] Update in-dashboard question creation flow (#51246)
* revert previous solution and move code into question question picker

* convert QuestionPicker to typescript

* port to css module

* refine button styles

* fix some e2e

* fix last failing e2e

* fe implementation for sessions

* fix styles if only one button is showing

* user css va for border colors

* fix failing unit tests and move new unit tests into existing file i had not noticed

* fix lint
2024-12-19 10:02:28 -06:00
Ryan Laurie
b04cfa86a6 quarantine flaky native tests (#51510) 2024-12-19 14:51:16 +00:00
Nicolò Pretto
7a4d682dde fix(types): fix type error on textCard in static-dashboard.cy.spec.tsx (#51450) 2024-12-19 13:34:01 +01:00
Nicolò Pretto
83cbbd7e45 add sdk theme selector to storybook + split the storybook sdk config into its own folder (#51122)
* add sdk theme selector to storybook

* let's try to split the storybook
2024-12-19 13:29:57 +01:00
John Swanson
4e451b4692 fix error copy when trying to move card->dash (#51233) 2024-12-19 04:12:43 -08:00
Uladzimir Havenchyk
71735c6722 chore: rework pickers in querying folder to css modules (#51427)
* chore: rework pickers in querying folder to css modules

* more css

* fix ui

* fix ui

* drop unused code
2024-12-19 06:03:17 +00:00
Noah Moss
dd021f0862 Preemptive caching backend (#50816) 2024-12-18 20:04:54 -05:00
bryan
6c933f2d91 Don't crash for ignored status codes in embedding responses (#51408)
* short circuit tracking for ignored requests

- add fall-through for ignored embedding requests

* add test for ignored status codes

* remove cruft

* add logging for unknown clients or statuses

* Fix some e2e tests in custom-column and view-data (#51431)

* warn on reflection!

---------

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-18 22:23:56 +00:00
appleby
4cfbd67ce2 Revert to using secrets.GITHUB_TOKEN for the auto-approve PR step (#51413)
Using secrets.METABASE_AUTOMATION_USER_TOKEN causes the auto-approve PR step to fail with an error like

  Can not approve your own pull request

Revert to using secrets.GITHUB_TOKEN instead, which matches what the auto-backport.yml workflow does and what this
workflow did previously.
2024-12-18 10:51:38 -08:00
Alexander Polyankin
f024e79c85 Add field values e2e test (#51424) 2024-12-18 17:10:48 +00:00
Aleksandr Lesnenko
6d4b695b5f add percentages to sankey tooltip (#51193)
* add percentages to sankey tooltip

* another tooltip variant

* specs

* lint
2024-12-18 16:47:11 +00:00
Raphael Krut-Landau
500b0e6d06 Fix some e2e tests in custom-column and view-data (#51431) 2024-12-18 09:52:02 -05:00
Alexander Solovyov
8f49ab0dd0 [serdes] make logs and errors a bit more consistent (#51390) 2024-12-18 14:12:01 +00:00
Oleksandr Yakushev
aa8a386e34 ci: trim stacktrace of intentional exceptions thrown during testing (#51443) 2024-12-18 16:31:45 +03:00
Phoomparin Mano
00a087bb52 fix(sdk): update define function names in Next.js compat (#51071) 2024-12-18 20:21:44 +07:00
Abed Habli
41e4defd29 Typo (#51440) 2024-12-18 13:37:15 +01:00
Oisin Coveney
bb32a4111b Convert ChartSettingInputNumeric to Mantine (#51165) 2024-12-18 11:51:45 +00:00
Kamil Mielnik
94372d6fa6 Implement new EntityListLoader that uses RTK Query hooks (#51341)
* Add EntityListLoaderRtkQuery boilerplate

* Add loaded prop

* Add metadata prop to children

* Improve typing for entity selectors

* Add missing selector typing

* Adjust list loader

* Drop dispatchApiErrorEvent, entityAlias

* Add listName prop

* Conditionally use entityListLoaderRtkQuery

* Add transformResponse

* Enable new loader for database entity

* Update typing

* Add todo

* Remove actionCreators

* Update TODO

* Use loadListLegacy

* Fix condition

* Add dynamic reload* prop to children

* Handle onLoaded prop

* Reproduce isReloading behavior with isLoading

* Add support for reloadInterval prop

* Fix list state path when query is empty

* Migrate sample database endpoint

* Update type

* Simplify transformResponse

* Use modern syntax

* Type the wrapper

* Name the wrapper components

* Improve typing
2024-12-18 17:44:06 +07:00
Uladzimir Havenchyk
c29f2e382d chore: rework mix components to css modules (#51220)
* chore: rework mix components to css modules

* more css

* more css

* more css

* more css

* rework last pieces of emotion to css modules

* remove failing test

* address review

* fix view button styling

* fix view button styling

* drop not needed change
2024-12-18 09:26:09 +00:00
Uladzimir Havenchyk
084384db11 tests(jest): add ES module is-absolute-url to the transform ignore (#51438) 2024-12-18 11:49:30 +03:00
Jeff Bruemmer
e1a1e73128 lychee to lint doc links (#51422)
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-12-17 16:49:20 -05:00
Nick Fitzpatrick
a59eba3e63 Entity picker search dashboard questions (#51367)
* scoping search to dashboard questions, adding dashboard questions to everywhere search results in entity picker

* e2e tests
2024-12-17 17:36:24 -04:00
Jeff Bruemmer
685c36f599 docs - remove release page (#51410)
* remove release page

* links

* remove workflow
2024-12-17 13:51:54 -05:00
Raphael Krut-Landau
3d01b319e5 Test that we can go back from the notebook editor (#50972)
This PR builds on #50420 by adding an e2e test that the user can press the back button to return from the notebook editor to the homepage. Previously this was impossible due to a pop-under bug (#50971).
2024-12-17 13:21:49 -05:00
Raphael Krut-Landau
93a703a911 fix(sdk): Control stacking without distinct z-indexes (#49442)
This PR introduces a simple way of avoiding pop-under bugs:
* First, we **give all overlays the same z-index.** It's 200, above everything else. SDK users can change this value.
* Second, we **prevent eager portal rendering**. On master, overlays are appended to the DOM inside an empty div, called a "portal". This portal is appended on mount. It stays hidden until the overlay is opened. In this branch, we stop portals from rendering eagerly. Instead, portals are only appended when the overlay is opened, and removed when the overlay is closed. This way, the most recently opened overlay is always last in the DOM. 

Since the most recently opened overlay is last in the DOM, and since all overlays have the same z-index, the most recently opened overlay always appears on top.

This PR:
* closes #51256
* closes #45468
* closes #49466
* closes #50943
* closes #50971 
* provides a more robust solution for two issues that previously received a quick, "minimum viable fix": #45469 and #48256
* improves the health of the codebase by removing hacks
2024-12-17 12:48:14 -05:00
Nicolò Pretto
ec2f229fe1 fix(sdk): migrate to custom redux context to allow using the sdk on host apps that use redux (#51382)
* step1: add MetabaseReduxProvider and make our hooks + connect fn use it

step1: add MetabaseReduxProvider and make our hooks + connect fn use it

* step 2: run codemod to change the imports

step 2: run codemod to change the imports

* step 3: manual fixes

* step 4: e2e test for sdk
2024-12-17 18:37:54 +01:00
Chris Truter
f19101b970 Replace Search Index setting with a table (#51338) 2024-12-17 16:08:43 +00:00
Phoomparin Mano
cce25745a7 ci(sdk): skip flaky mantine styles test for sdk (#51404) 2024-12-17 22:40:56 +07:00
Denis Berezin
fd32386973 Migrate dashboard and question actions menus to Mantine (#51229) 2024-12-17 18:36:18 +03:00
Alexander Polyankin
5548e70d57 Avoid frequent setState calls in the add parameter popover in dashboards (#51373) 2024-12-17 10:28:28 -05:00
Alexander Solovyov
ea928cdb2c test to check ms/QueryVectorOf works (#51385) 2024-12-17 16:32:29 +02:00
Raphael Krut-Landau
7bfb4662d1 Add stories for overlays (#49501) 2024-12-17 09:29:10 -05:00
Ngoc Khuat
a238b9310f Send pulse asynchronously with a small pool size (#51380) 2024-12-17 13:38:38 +00:00
Nick Fitzpatrick
f9b87a3f6b adjusting webhook test response ui (#51043)
* adjusting webhook test response ui

* missed i18n, updating test to check for test response

* show response on error, not success

* parse the request as json response

---------

Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-12-17 08:52:22 -04:00
Uladzimir Havenchyk
7178d0fba9 deps: upgrade rspack (#51377) 2024-12-17 10:28:33 +00:00
Chris Truter
775feb1aa1 Add prometheus metric for search errors (#51357) 2024-12-17 12:19:14 +02:00
Kamil Mielnik
cc15ee649e Remove the old EntityObjectLoader and clean up (#51208)
* Add EntityObjectLoaderRtkQuery boilerplate

* Incorporate EntityType logic into the new component

* Improve comment

* Add childrenProps

* Move component into its own directory, extract types to a separate file

* Add entityObjectLoaderRtkQuery and temporary mappings

* Hook up the useGetQuery hook (tables only)

* Pass all the props to children

* Add Playground

* Gather more info in the Playground

* Integrate RTK with redux store

* Adjust props passed down

* Improve typing

* Make the request hook dynamic

* Add missing id in the query

* Handle fetchMetadata

* Change requestType to fetchType

* Add rtk mappings for databases in entity framework

* Use requestType to get request state path

* Enable new component everywhere

* Use legacy loader for entities without rtk mappings

* Improve comment

* Handle fetchMetadataAndForeignTables

* Remove unused function

* Handle reload and remove

* Add TODO

* Add transformResponse option and use it for fetchIdFields

* Format code

* Remove Playground

* Remove unused getUseGetListQuery

* Add rtk mapping for alerts

* Add rtk mapping for dashboards

* Add rtk mapping for groups

* Add rtk mapping for pulses

* Remove options

* Fix permissions tests

* Fix notifications tests

* Add rtk mapping for segments

* Use params instead of body
- It's leftover because this code got reverted after body -> params refactoring for GET endpoint has been merged to master

* Add rtk mapping for snippet collections

* Add TODO

* ESLint

* ESLint

* Update TODO

* Deprecate entity HOCs

* Update TODO

* Revert other entities for now

* Revert other entities for now

* Bring tables back

* Improve todos

* Add comment

* Improve comment

* Remove TODO

* Use reload param

* Remove properties prop

This was used to short-circuit and avoid triggering api calls if we already had an object with given attributes in cache.
With RTK query now managing the cache, we don't want to reproduce this behavior.

* Remove reloadInterval

This is used in EntityListLoader, not EntityObjectLoader

* Don't use setRequestPromise action

* Fix deprecations

* Format code

* Fix flake :(

* Try to fix flake

* Revert "Try to fix flake"

This reverts commit 6408a22a37.

* Try to fix flake

* Fix UseQuery type

* Implement useGetMetadataAndForeignTables

* Fix useMemo and move things down

* Fix typo

* Bring back original hack

* Move file

* Enable RTK for alerts

* Undeprecate a test

* Enable RTK for dashboards

* Port Segments to use new EntityObjectLoaderRtkQuery (#50635)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Revert "Enable RTK for questions"

This reverts commit b9ad637ae0.

* Enable RTK for segments

* [WIP] Port Groups to use new EntityObjectLoaderRtkQuery (#50631)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Fix failing test

* Enable RTK for dashboards

* Port Snippet collections to use new EntityObjectLoaderRtkQuery (#50636)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Revert "Enable RTK for questions"

This reverts commit b9ad637ae0.

* Enable RTK for segments

* Revert "Enable RTK for segments"

This reverts commit ef65fe78f3.

* Enable RTK for snippet collections

* Fix skipToken passing

* Enable RTK for dashboards

* Port Pulses to use new EntityObjectLoaderRtkQuery (#50633)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Fix hook usage

* Enable RTK for dashboards

* Port Fields to use new EntityObjectLoaderRtkQuery (#50639)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Revert "Enable RTK for questions"

This reverts commit b9ad637ae0.

* Enable RTK for segments

* Revert "Enable RTK for segments"

This reverts commit ef65fe78f3.

* Enable RTK for snippet collections

* Revert "Enable RTK for snippet collections"

This reverts commit e1439cb28b.

* Enable RTK for fields

* Account for skipToken

* Fix fetchFieldValues

* Optimize hooks

* Format code

* Fix loading state not kicking in during first render

* Rename

* Add comment

* Use consistent reference name for revisions

* Port Questions to use new EntityObjectLoaderRtkQuery (#50634)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Rename import

* Fix weirdness
- Apparently what makes the difference here is the lack of children render pattern ({childProps => <ComposedComponent {...childProps} />})

* Refactor

* Use isFetching instead of isLoading in EntityObjectLoaderRtkQuery, replace useEffect+useState with useMemo in SavedQuestionLoader

* Change order of HOCs to prevent loading state from redundantly kicking in

* Rename import

* [WIP] Port Persisted Models to use new EntityObjectLoaderRtkQuery (#50853)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Rename import

* Fix weirdness
- Apparently what makes the difference here is the lack of children render pattern ({childProps => <ComposedComponent {...childProps} />})

* Refactor

* Use isFetching instead of isLoading in EntityObjectLoaderRtkQuery, replace useEffect+useState with useMemo in SavedQuestionLoader

* Change order of HOCs to prevent loading state from redundantly kicking in

* Port persisted models

* Port schemas (#50854)

* Port snippets (#50855)

* Port timelines (#50858)

* Do TODOs

* Port timeline events (#50857)

* Port users (#50866)

* Port Collections to use new EntityObjectLoaderRtkQuery  (#50869)

* Port collections

* Fix imports

* Drop unused params

* Add missing property

* Fix collection not getting loaded

* Replace useCollectionQuery with useGetCollectionQuery

* Remove useCollectionQuery

* Format code

* Skip request on null id

* Revert "Remove useCollectionQuery"

This reverts commit 9b1068e611.

* Revert "Replace useCollectionQuery with useGetCollectionQuery"

This reverts commit 0c5ee660a3.

* Fix test

* Implement EntityName with RTK query

* git merge --squash 50323-port-other-entities

* Use entity getName selector

* Update comment

* Remove BaseEntity

* Improve typing

* git merge --squash 50323-port-other-entities

* Enable RTK for dashboards

* Deprecate the component

* Remove entityObjectLoader usage

* Remove old EntityObjectLoader and replace it with new one

* git merge --squash 51213-entity-loader
2024-12-17 07:48:52 +00:00
Ngoc Khuat
5a52987617 remove translation for slack error (#51375) 2024-12-17 06:29:49 +00:00
Tyler Plude
11f501e810 Make formatter integral? dependent on scale (#50609)
* Fix unexpected rounding in csv & json exports when column multiplier is non integral

* Fixing table unit test

* Adding WIP test

* Adding test case for validating new scaling logic is applied appropriately in exports

* Reverting id-or-name change and adjusting new scaling unit test

* Updating formatting to fix cljfmt in CI

* removing debug def

* Preserving integral behavior if scale is nil
2024-12-16 21:09:18 -08:00
Raphael Krut-Landau
e0a2a322ba Remove some console errors due to prop forwarding (#51358) 2024-12-16 18:30:57 -05:00
Raphael Krut-Landau
19d7f3d58a Deprecate the openNativeEditor helper in favor of the startNewNativeQuestion helper (#51109) 2024-12-16 16:42:19 -05:00
Sloan Sparger
fc85504079 [Cards in Dashboards] Reduce requests made for dashboards (#51084)
* reduce requests made by CollectionBreadcrumbs by using the dashboard on the question

* fix unit tests
2024-12-16 14:13:50 -06:00
github-automation-metabase
ef01a0f9f1 Update Readme version references and published npm version to 0.52.4-nightly (#51365) 2024-12-16 19:14:52 +00:00
Ryan Laurie
08b11e1dfa update release notes utm (#51353) 2024-12-16 12:06:00 -07:00
Braden Shepherdson
4cba79cdf1 [refs] Ignore :idents when comparing queries (#51349)
`query=` logic was returning false negatives when two queries were identical except for their `:ident`s.

This broke Metrics UI, for example, since it makes up a query based on the "old" and "new" metrics, and
compares those queries.

Now `:ident`s are ignored by `query=`, so two queries of the same shape are equal.
2024-12-16 13:26:45 -05:00
Nicolò Pretto
a21280000a simplify font config by not providing sans-serif fallback (#51343) 2024-12-16 19:04:42 +01:00
Phoomparin Mano
601c4f7412 ci(sdk): add package.json to sdk exports block (#51328) 2024-12-16 23:54:58 +07:00
Nick Fitzpatrick
7008d38317 Entity picker improvements (#50527)
* visial changes

* adding filter popover to collections tab

* proper key value

* filtering search results

* remove filtering on search, auto-focus search on modal open

* sweeping e2e adjustments

* Green e2e??

* adjusting unit test

* PR Feedback

* raffi feedback

* fixing shouldShowItem, adding max height

* expect-expect

* more e2e adjustments
2024-12-16 12:30:57 -04:00
Nick Fitzpatrick
e480527e92 PopoverWithRef, plus some other stuff (#49306)
* PopoverWithRef, plus some other stuff

* removing commented code

* I've done terrible things

* cleanup

* adding comments

* lets see what this breaks

* e2e adjustmnet

* removing unused component
2024-12-16 12:28:41 -04:00
Kamil Mielnik
e56e508989 Port EntityName to use RTK Query (#51052)
* Add EntityObjectLoaderRtkQuery boilerplate

* Incorporate EntityType logic into the new component

* Improve comment

* Add childrenProps

* Move component into its own directory, extract types to a separate file

* Add entityObjectLoaderRtkQuery and temporary mappings

* Hook up the useGetQuery hook (tables only)

* Pass all the props to children

* Add Playground

* Gather more info in the Playground

* Integrate RTK with redux store

* Adjust props passed down

* Improve typing

* Make the request hook dynamic

* Add missing id in the query

* Handle fetchMetadata

* Change requestType to fetchType

* Add rtk mappings for databases in entity framework

* Use requestType to get request state path

* Enable new component everywhere

* Use legacy loader for entities without rtk mappings

* Improve comment

* Handle fetchMetadataAndForeignTables

* Remove unused function

* Handle reload and remove

* Add TODO

* Add transformResponse option and use it for fetchIdFields

* Format code

* Remove Playground

* Remove unused getUseGetListQuery

* Add rtk mapping for alerts

* Add rtk mapping for dashboards

* Add rtk mapping for groups

* Add rtk mapping for pulses

* Remove options

* Fix permissions tests

* Fix notifications tests

* Add rtk mapping for segments

* Use params instead of body
- It's leftover because this code got reverted after body -> params refactoring for GET endpoint has been merged to master

* Add rtk mapping for snippet collections

* Add TODO

* ESLint

* ESLint

* Update TODO

* Deprecate entity HOCs

* Update TODO

* Revert other entities for now

* Revert other entities for now

* Bring tables back

* Improve todos

* Add comment

* Improve comment

* Remove TODO

* Use reload param

* Remove properties prop

This was used to short-circuit and avoid triggering api calls if we already had an object with given attributes in cache.
With RTK query now managing the cache, we don't want to reproduce this behavior.

* Remove reloadInterval

This is used in EntityListLoader, not EntityObjectLoader

* Don't use setRequestPromise action

* Fix deprecations

* Format code

* Fix flake :(

* Try to fix flake

* Revert "Try to fix flake"

This reverts commit 6408a22a37.

* Try to fix flake

* Fix UseQuery type

* Implement useGetMetadataAndForeignTables

* Fix useMemo and move things down

* Fix typo

* Bring back original hack

* Move file

* Enable RTK for alerts

* Undeprecate a test

* Enable RTK for dashboards

* Port Segments to use new EntityObjectLoaderRtkQuery (#50635)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Revert "Enable RTK for questions"

This reverts commit b9ad637ae0.

* Enable RTK for segments

* [WIP] Port Groups to use new EntityObjectLoaderRtkQuery (#50631)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Fix failing test

* Enable RTK for dashboards

* Port Snippet collections to use new EntityObjectLoaderRtkQuery (#50636)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Revert "Enable RTK for questions"

This reverts commit b9ad637ae0.

* Enable RTK for segments

* Revert "Enable RTK for segments"

This reverts commit ef65fe78f3.

* Enable RTK for snippet collections

* Fix skipToken passing

* Enable RTK for dashboards

* Port Pulses to use new EntityObjectLoaderRtkQuery (#50633)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Fix hook usage

* Enable RTK for dashboards

* Port Fields to use new EntityObjectLoaderRtkQuery (#50639)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Revert "Enable RTK for questions"

This reverts commit b9ad637ae0.

* Enable RTK for segments

* Revert "Enable RTK for segments"

This reverts commit ef65fe78f3.

* Enable RTK for snippet collections

* Revert "Enable RTK for snippet collections"

This reverts commit e1439cb28b.

* Enable RTK for fields

* Account for skipToken

* Fix fetchFieldValues

* Optimize hooks

* Format code

* Fix loading state not kicking in during first render

* Rename

* Add comment

* Use consistent reference name for revisions

* Port Questions to use new EntityObjectLoaderRtkQuery (#50634)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Rename import

* Fix weirdness
- Apparently what makes the difference here is the lack of children render pattern ({childProps => <ComposedComponent {...childProps} />})

* Refactor

* Use isFetching instead of isLoading in EntityObjectLoaderRtkQuery, replace useEffect+useState with useMemo in SavedQuestionLoader

* Change order of HOCs to prevent loading state from redundantly kicking in

* Rename import

* [WIP] Port Persisted Models to use new EntityObjectLoaderRtkQuery (#50853)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Rename import

* Fix weirdness
- Apparently what makes the difference here is the lack of children render pattern ({childProps => <ComposedComponent {...childProps} />})

* Refactor

* Use isFetching instead of isLoading in EntityObjectLoaderRtkQuery, replace useEffect+useState with useMemo in SavedQuestionLoader

* Change order of HOCs to prevent loading state from redundantly kicking in

* Port persisted models

* Port schemas (#50854)

* Port snippets (#50855)

* Port timelines (#50858)

* Do TODOs

* Port timeline events (#50857)

* Port users (#50866)

* Port Collections to use new EntityObjectLoaderRtkQuery  (#50869)

* Port collections

* Fix imports

* Drop unused params

* Add missing property

* Fix collection not getting loaded

* Replace useCollectionQuery with useGetCollectionQuery

* Remove useCollectionQuery

* Format code

* Skip request on null id

* Revert "Remove useCollectionQuery"

This reverts commit 9b1068e611.

* Revert "Replace useCollectionQuery with useGetCollectionQuery"

This reverts commit 0c5ee660a3.

* Fix test

* Implement EntityName with RTK query

* git merge --squash 50323-port-other-entities

* Use entity getName selector

* Update comment

* Remove BaseEntity

* Improve typing

* git merge --squash 50323-port-other-entities

* Enable RTK for dashboards

* Deprecate the component
2024-12-16 23:01:32 +07:00
Kamil Mielnik
38cc13c3d3 Fix actions loading (#51281)
* Fix flaky test

* Fix flake in all tests

* Use useGetActionQuery in ActionExecuteModal

* Remove use-action-query

* Remove Actions.load usage in ActionCreator

* Remove unused initialAction prop

* Remove redundant prop

* Use entityCompatibleQuery

* Update unit tests to account for RTK Query refetching

* Fix unit tests

* Fix unit tests

* Fix unit tests
2024-12-16 23:00:20 +07:00
Kamil Mielnik
bb854dbd50 Upgrade RTK from 2.3.0 to 2.5.0 (#51333) 2024-12-16 22:40:28 +07:00
Ryan Laurie
d619950925 Clean up hasBeenReleased checks (#51308)
* don't check for enterprise release tag anymore

* use oss tag for release channel tagging

* add error catcher

* don't trigger release log from tag job
2024-12-16 08:05:38 -07:00
Uladzimir Havenchyk
0fbb656080 fix(View Details): calculate row after vertical and horizontal scroll (#51302) 2024-12-16 14:56:15 +00:00
Nicolò Pretto
869efcea7a docs(sdk): document the compatibility layer for nextjs (#51173)
* wip nextjs compat docs

* explain how to do manual wrapping

* doocs

* better explanation of the index file

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

* Update docs/embedding/sdk/next-js.md

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-16 15:06:05 +01:00
Demetrio
bf6759b08d Add basic auth on druid JDBC driver (#50905) 2024-12-16 14:18:14 +01:00
Nicolò Pretto
86b994e7a5 fix(sdk): wrap InteractiveDashboard with renderOnlyInSdkProvider (#51224) 2024-12-16 14:12:32 +01:00
Oisin Coveney
4bbd4cc2aa fix(sdk): Fix alignment of ColorSelector in SDK Chart Settings (#51000) 2024-12-16 13:01:25 +01:00
Kamil Mielnik
9dbfd5bc08 Remove entity.Loader (#51216)
* Get rid of enitity.Loader in PinnedQuestionLoader

* Set errorIcon

* Get rid of enitity.Loader in TargetClickMappings

* Remove duplication

* Get rid of enitity.Loader in LinkedField

* Convert metabase-lib/v1/metadata/utils/schema.js to TS

* Extract useGetSchemas

* Revert "Extract useGetSchemas"

This reverts commit 2271bd3aa7.

* Mark optional props as optional

* Properly handle skipToken

* Remove Schema.Loader from FieldMappingSelect
- This was added to fix metabase#19451 but seems no longer needed as the repro passes without it
- See 83f4097e87

* Update unit tests to use number as DatabaseId

* Extract DataSourceCrumbs and refactor it to TS

* Extract SourceDatasetBreadcrumbs and refactor it to TS

* Extract SourceQuestionBreadcrumbs and refactor it to TS

* Remove Questions.Loader from SourceQuestionBreadcrumbs

* Drop entity.Loader

* Update unit tests

* Drop checkNotNull usage
2024-12-16 10:15:53 +00:00
Chris Truter
2021f7daec Remove unnecessary transaction around query analysis (#51321) 2024-12-16 10:09:34 +00:00
Oleksandr Yakushev
6e72ffbb53 [ci] Actually test against different JDK versions (#51313) 2024-12-14 15:33:44 -05:00
appleby
da9d62a0e7 Fix distribution drill thru for multi-stage queries (#51247)
* Add missing -test suffix to zoom-in-timeseries test name

* Add missing -test suffix to underlying-records test name

* Fix distribution drill thru for multi-stage queries

Ensure the distribution drill thru is not returned by available-drill-thrus when a user clicks on an aggregation or
breakout column, even if there are additional query stages after the last aggregation / breakout stage.
2024-12-13 23:58:35 +00:00
Oleksandr Yakushev
912ee7b034 Bump c3p0 version (#51188) 2024-12-14 01:55:47 +02:00
Aleksandr Lesnenko
5bc378d9ca fix pie chart incorrect settings memoization (#51305) 2024-12-13 18:49:55 -05:00
Ryan Laurie
0e415e664c Just one Release (#51184)
* only create a single release for each release

* remove dead file

* little bug fixes

* update tests

* add link to metabase cloud in release notes

* remove checksums from release notes
2024-12-13 16:10:42 -07:00
Nathan Voxland
4df1c417a9 Don't compute a different hash key if they only differ on the order of values in a parameter (#51186)
Don't compute a different hash key if they only differ on the order of values in a parameter
2024-12-13 16:08:40 -06:00
Uladzimir Havenchyk
6f8ff73343 chore: cleanup query_builder nad querying folders from unused code (#51274) 2024-12-14 00:44:51 +03:00
Uladzimir Havenchyk
70c6be8670 chore: cleanup of unused styles and components (#51273) 2024-12-14 00:19:26 +03:00
Ryan Laurie
7ab0c413a4 pin to master (#51294) 2024-12-13 20:40:56 +00:00
Nick Fitzpatrick
ed61e82fa4 surface errors in move confirmation modal (#51239)
* surface errors in move confirmation modal

* woops...
2024-12-13 16:40:47 -04:00
appleby
bd36ca40cc Update underlying-records drill to use code in lib.drill-thru.common (#51254)
Some funcs were added to lib.drill-thru.common for the recent fix to the zoom-in.timeseries drill. Update the
underlying-records drill to use the common lib code rather than duplicating it.
2024-12-13 12:22:29 -08:00
Braden Shepherdson
2970dc54d5 [refs] Preserve :idents in replace-clause (#51251)
`replace-clause` is for editing an existing clause, which should
*preserve* its identity. But the new clause was getting its own
random ident which didn't match the original.

I've added tests for this, and fixed the `lib.remove-replace` logic to
make them pass.

Hat tip to Mike for catching this case!
2024-12-13 19:06:41 +00:00
William
24249e76da Implement cumulative aggregators in mongo (#51135)
Previously, cumulative aggregators were being done in clojure after the mongo query was finished.  However, this
didn't work on multi-step queries where the cumulative aggregator wasn't the last step (for example, do a cumulative
sum and then filter the result).  Implementing cumulative operators directly in mongo fixes this issue.
2024-12-13 18:48:22 +00:00
Raphael Krut-Landau
6059f92ca2 Update test to use revert icon (#50956)
We changed the time_history icon in this context to a revert icon in #46050 but never updated this test. This PR fixes that.
2024-12-13 12:58:16 -05:00
Oisin Coveney
4a0c62775f Convert ChartSettingInput to Mantine (#51162) 2024-12-13 18:06:43 +02:00
Oisin Coveney
f768b844c3 Convert ChartSettingsRadio to mantine (#51210) 2024-12-13 18:06:34 +02:00
Oisin Coveney
79817b4f15 Convert ChartSettingToggle to Mantine (#51161) 2024-12-13 18:05:55 +02:00
Aleksandr Lesnenko
b7a030022b prevent backport command from creating backports on open PRs (#51242) 2024-12-13 10:30:29 -05:00
Kyle Doherty
cd650bfd69 Update uberjar.yml to builde feature-visualizer (#51284)
Adds feature-visualizer to the branches for this workflow to help automate deployment to our staging env.
2024-12-13 10:17:09 -05:00
Kamil Mielnik
cd71625a45 npx browserslist@latest --update-db (#51280) 2024-12-13 14:38:58 +00:00
Chris Truter
2d01597302 Use pr-str so log data is parseable (#51275) 2024-12-13 15:12:39 +03:00
Oisin Coveney
afc1963a9b Convert ChartSettingSegmentedControl to Mantine (#50994) 2024-12-13 11:57:20 +02:00
Kamil Mielnik
08771ef685 Fix - Updating a filter via click behavior will not populate the field on actions (#51108)
* Fix #51020

* Add a repro for #51020

* Improve test name

* Update comment and naming

* Improve diff

* Add repro for when primary key is not called 'id'

* Update repro

* Drop prefetchesInitialValues & getValuesForUpdate

It's unclear what the real intention behind these two was, but it's clear that it made two differences:
(1) It decreased the probability of overwriting someone else's changes (if someone else saved them after we opened the form)
(2) It decreases the payload sent over the wire

(1) We can ignore this, as this problem is prevalent everywhere in our app
(2) This is negligible

Dropping these is simpler than enhancing getValuesForUpdate with extra logic for primary keys (and who knows what else)

* Break beforeEach into 2

* Remove no longer valid test
2024-12-13 15:18:15 +07:00
Uladzimir Havenchyk
4882239cd9 chore: rework view components to css modules (#51219)
* chore: rework view components to css modules

* fixup

* fix styling
2024-12-13 11:04:48 +03:00
Aleksandr Lesnenko
6fa8ff4779 Split dashboard PDF exports into pages (#49917)
* save only grid on fixed width dashboards

* split export pdf into pages

* trim dashboard export pdf into pages

* specs

* add padding to pdf pages

* dark mode
2024-12-13 03:53:56 +00:00
dpsutton
db1c4f3741 guard against a stage number in matching (#51262)
* guard against a stage number in matching

old:

`{"category":["dimension",["field",5,{"base-type":"type/Integer"}]]}`

new:

`{"state":["dimension",["field",48,{"base-type":"type/Text"}],{"stage-number":0}]}`

(comment
  (let [login-attributes {"state" "CA"}
        field-ids #{55 46 54 48 50 56 51 47 57 45 53 52 49}
        attribute_remappings {"state" [:dimension
                                       [:field
                                        48
                                        {:base-type :type/Text}]
                                        ;; this stage-number is optional. Newer versions have it since https://github.com/metabase/metabase/issues/46914
                                       {:stage-number 0}]}]
    (into {} (for [[k v] attribute_remappings
                   ;; get attribute that map to fields of the same table
                   :when (contains? field-ids
                                    (lib.util.match/match-one v [:dimension [:field field-id _]] field-id))]
               {k (get login-attributes k)})))
  )

* formatting fix
2024-12-12 20:54:42 -05:00
Alexander Polyankin
321c37ca1c Add e2e tests for if (#51245) 2024-12-13 01:28:51 +00:00
Raphael Krut-Landau
a0d13128dc Use the time_history icon to display when a question was last updated (#50952) 2024-12-12 18:58:11 -05:00
bryan
8c08ebbf3d update tracking for embedding-sdk-react and embedding-iframe x-metabase-clients (#51179)
* skip tracking non react-sdk x-metabase-clients

- Do not do promethus tracking for sdk.
- tracking ignores x-metabase-client headers when they're not == "embedding-sdk-react"

* cleanup indentation

* add prometheus tracking counters for iframe

* remedy 24h query execution inaccuracy
2024-12-12 22:03:32 +00:00
Nathan Voxland
d0137526c8 Allow config files to have literal values enclosed in {{{ ... }}} (#51129)
Allow config files to have literal values enclosed in {{{ ... }}}
2024-12-12 15:09:07 -06:00
John Swanson
f88e47c127 Fix autoplacement when a dashboard has empty tabs (#51180)
We were getting the `dashboard_tab_id` from the existing cards on the
first tab... but if no such card exists (the first tab is empty) then we
end up with a dashboard with tabs, but a card with
`dashboard_tab_id=null`, which doesn't show up.

This also fixes a bug in the revision history: we were publishing an
event for the dashboard being updated. The object was the updated
dashboard, but it had the old dashcards that we'd hydrated in order to
autoplace. We can dissoc the dashcards to ensure that the handler
hydrates them with the fresh, updated dashcards.
2024-12-12 11:51:36 -08:00
Alexander Polyankin
591599bf4e Add in and notIn custom expression functions (#51148) 2024-12-12 14:42:38 -05:00
Ryan Laurie
f5a22e7a3b fix-release-log (#51238) 2024-12-12 12:33:52 -07:00
Hervé Labas
83e55c8dce Update data.md (#51234)
Tiny typo
2024-12-12 18:35:12 +00:00
Phoomparin Mano
f9545b8740 Backport the webpack config from 51171 to master (#51212)
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-12-13 00:38:50 +07:00
Jeff Bruemmer
f7c5f1f2f5 note on static embeds (#51181) 2024-12-12 11:32:07 -05:00
Sloan Sparger
fb7ae7d97c [Cards in Dashboards] Fix no items appearing in personal collection (#51140)
* checks if there are dashboards in the personal collection to check if we should show items below

* adding e2e test

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-12-12 09:19:11 -06:00
Uladzimir Havenchyk
aae8d818ad chore: rework qb styles of view sidebars to css modules (#51136)
* chore: rework qb styles of view sidebars to css modules

* do not use text

* fix view sidebar styles

* naming

* more css

* more css

* fix color

* rework bucket button override

* rework modal right section content override

* Update frontend/src/metabase/query_builder/components/SidebarContent/SidebarContent.tsx

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* remove probably unused file

* change order

* pass color properly

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-12-12 18:17:18 +03:00
Sloan Sparger
b1de8b8bfd [Cards in Dashboards] Bug fix - Query builder breaks with DQ in root collection as init value (#51191)
* fixes error cases when initial question picker value is a DQ in a dashboard in the root collection

* fix type issue
2024-12-12 09:01:18 -06:00
Filip Hric
7ab2e5ecff Enable bug reporting (#50856)
* add bug report to command palette and profile menu

add bug report to command palette and profile menu

* refactor and update diagnostic window modal

* add analytics to track bug reporter modal activity

* add file id to to the upload-file method

* add the ability to collect browser information for diagnostic window

* implement feedback from PR comments

* Update frontend/src/metabase/components/ErrorPages/ErrorDiagnosticModal.tsx

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>

* implement feedback from PR comments #2

* rename "file a bug" to "report an issue"

* resolve conflict

* fix lint issues

* fix bad merge conflict resolution

* fix failing onboarding tests

---------

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-12 15:21:08 +01:00
Nick Fitzpatrick
e8ebd956f4 delete old dashcards when moving question from QB view (#51187) 2024-12-12 09:46:18 -04:00
Chris Truter
1200eb2f10 More logging around search index maintenance (#51206) 2024-12-12 13:12:13 +00:00
Jeff Bruemmer
70b4ad81e9 logo link (#51177) 2024-12-12 07:47:21 -05:00
Chris Truter
82f13b6742 Better diagnostic info when Search Index is not ready (#51201) 2024-12-12 11:34:37 +00:00
Nicolò Pretto
528222e7e2 docs(sdk): simpler documentation for building the sdk locally (#51064)
* wip: better documentation for developers that need to run the sdk
locally

* morning fixes

* remove developers-guide/sdk in favor of dev.md in the sdk folder

* add note about using the sdk with link to the docs

* fix mising word

* addressed feedback

* added notes about the envs for sdk e2e test
2024-12-12 11:59:51 +01:00
Nemanja Glumac
62caae9946 Prevent newly opened items from expanding outside viewport (#51008)
* Prevent newly opened items from expanding outside viewport

* Expand the unti test coverage

* Use the existing helper

* Change scroll view to center

This works better because it ensures that the top bar doesn't cover the element.

* Update frontend/src/metabase/home/components/Onboarding/Onboarding.tsx

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>

* Extract the `stopVideo` function

* Fix the type name

* Set the top scroll margin on the `main` element

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-12-12 11:59:05 +01:00
Romeo Van Snick
a04af019b9 Update nanoid and path-to-regexp (#51198)
* Force nanoid onto 3.3.8

* Force path-to-regexp to 0.1.12
2024-12-12 20:55:39 +11:00
Phoomparin Mano
29b070c07a Manual backport workflow fixes from 51171 (#51196) 2024-12-12 15:56:24 +07:00
Ngoc Khuat
33e50fa799 Change migration added in #50735 from v52 to v53 (#51194) 2024-12-12 08:52:06 +00:00
Ryan Laurie
876eedc92a Make release log updates smarter (#49340)
* make release log updates smarter

* fix a bunch of stuff after testing
2024-12-11 17:18:35 -07:00
Braden Shepherdson
1d8541ca43 [refs] lib.convert preserves :idents through a round trip (#51133)
Closes #49682. Closes #49683.

Updates `lib.convert` and legacy MBQL normalization to allow
`:ident`s, and fixes some QP middleware and utils so they can
still match up refs correctly.

No user-visible impact.

Newly created queries will have `:ident`s generated for joins,
aggregations, etc. by the previous PR. This starts saving them
into appDBs. It is still acceptable to have missing idents at
this stage, including for new queries created without the lib.

Pre-existing clauses don't have refs added yet.


* Fix loading in segments

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-12-11 23:29:28 +00:00
Nick Fitzpatrick
53568b2570 removing broken assertion (#51182) 2024-12-11 22:26:01 +00:00
John Swanson
2ed4ad3d7c Lock revisions before adding more (#51158)
Our revision system has a race condition in the case of two concurrent requests to modify the same object. You can reproduce the exact issue here by opening two `psql` shells. In each one, run

```
begin;
insert into revision (model, model_id, user_id, timestamp, object, most_recent, metabase_version) values ('Dashboard', 1, 1, '2024-01-01T00:00:00Z', '{}', true, 'v1.0.0') returning id;
update revision set most_recent = false where model='Dashboard' and model_id = 10 and id != [[the id from above]];
```

after running all of the above, `commit` the transaction and note that **two** revisions are now marked as `most_recent`.

This is the way our revision system works: `t2/before-insert` sets `most_recent=true`, while `t2/after-insert` updates all the *other* revisions with `most_recent=false`.

The issue here is that when each transaction is running, it doesn't see
the uncommitted result of the other transaction (the new revision), so
the UPDATE does not set `most_recent` to `false` for either new
revision.

The solution here is to just select all existing `revision`s for this
model `FOR UPDATE`. This effectively locks the revisions for a single
entity, so we can't concurrently update revisions for the same entity.
2024-12-11 12:06:25 -08:00
Jeff Bruemmer
208deba6e6 docs - if alias (#51168) 2024-12-11 17:48:15 +00:00
Case Nelson
3f629276d8 Quiet snowflake logging (#51138)
It looks like snowflake introduced some very noisy logging in their
code.

9b7c9eb3e0 (diff-7859cac7243b3b9668df0770c96e264a1be2be06eefbbf7bba63904104028495L743)

This should reduce the noise and allow our code to handle and log the
exceptions.
2024-12-11 10:17:06 -07:00
Uladzimir Havenchyk
b06e6e9c34 chore: rework qb template tags to css modules (#51137)
* chore: rework qb template tags to css modules

* more css

* more css

* more css

* fix styles

* nobody uses less bottom padding

* Update frontend/src/metabase/query_builder/components/template_tags/TagEditorParamParts/TagEditorParam.module.css

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-12-11 16:03:39 +00:00
Sloan Sparger
e81c4137fc [Cards in Dashboards] Fix bulk move runtime error (#51146)
* fix runtime error caused by bulk moving dashboard questions where one question did not have an existing dashboard

* fix oopsie
2024-12-11 09:53:25 -06:00
Chris Truter
3f367ac9a3 Ignore interpolated expressions in query analysis (#51151) 2024-12-11 15:27:36 +00:00
github-automation-metabase
10986403a0 Add v0.51.8 to the list of releases (#51153)
* Add v0.51.8 to the list of releases

* ordering

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
2024-12-11 15:05:06 +00:00
Chris Truter
3b2fdbb676 Basic Search Index support for h2 (#51042) 2024-12-11 14:45:37 +00:00
Ngoc Khuat
9acb577c10 Fix alert condition text (#51117) 2024-12-11 19:46:54 +07:00
Alexander Solovyov
b62505f15b [search] track total search indexing time as prometheus metric (#51095) 2024-12-11 14:38:39 +03:00
Kamil Mielnik
ceacccd0b1 Port all entities to use new EntityObjectLoaderRtkQuery (#50623)
* Add EntityObjectLoaderRtkQuery boilerplate

* Incorporate EntityType logic into the new component

* Improve comment

* Add childrenProps

* Move component into its own directory, extract types to a separate file

* Add entityObjectLoaderRtkQuery and temporary mappings

* Hook up the useGetQuery hook (tables only)

* Pass all the props to children

* Add Playground

* Gather more info in the Playground

* Integrate RTK with redux store

* Adjust props passed down

* Improve typing

* Make the request hook dynamic

* Add missing id in the query

* Handle fetchMetadata

* Change requestType to fetchType

* Add rtk mappings for databases in entity framework

* Use requestType to get request state path

* Enable new component everywhere

* Use legacy loader for entities without rtk mappings

* Improve comment

* Handle fetchMetadataAndForeignTables

* Remove unused function

* Handle reload and remove

* Add TODO

* Add transformResponse option and use it for fetchIdFields

* Format code

* Remove Playground

* Remove unused getUseGetListQuery

* Add rtk mapping for alerts

* Add rtk mapping for dashboards

* Add rtk mapping for groups

* Add rtk mapping for pulses

* Remove options

* Fix permissions tests

* Fix notifications tests

* Add rtk mapping for segments

* Use params instead of body
- It's leftover because this code got reverted after body -> params refactoring for GET endpoint has been merged to master

* Add rtk mapping for snippet collections

* Add TODO

* ESLint

* ESLint

* Update TODO

* Deprecate entity HOCs

* Update TODO

* Revert other entities for now

* Revert other entities for now

* Bring tables back

* Improve todos

* Add comment

* Improve comment

* Remove TODO

* Use reload param

* Remove properties prop

This was used to short-circuit and avoid triggering api calls if we already had an object with given attributes in cache.
With RTK query now managing the cache, we don't want to reproduce this behavior.

* Remove reloadInterval

This is used in EntityListLoader, not EntityObjectLoader

* Don't use setRequestPromise action

* Fix deprecations

* Format code

* Fix flake :(

* Try to fix flake

* Revert "Try to fix flake"

This reverts commit 6408a22a37.

* Try to fix flake

* Fix UseQuery type

* Implement useGetMetadataAndForeignTables

* Fix useMemo and move things down

* Fix typo

* Bring back original hack

* Move file

* Enable RTK for alerts

* Undeprecate a test

* Enable RTK for dashboards

* Port Segments to use new EntityObjectLoaderRtkQuery (#50635)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Revert "Enable RTK for questions"

This reverts commit b9ad637ae0.

* Enable RTK for segments

* [WIP] Port Groups to use new EntityObjectLoaderRtkQuery (#50631)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Fix failing test

* Enable RTK for dashboards

* Port Snippet collections to use new EntityObjectLoaderRtkQuery (#50636)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Revert "Enable RTK for questions"

This reverts commit b9ad637ae0.

* Enable RTK for segments

* Revert "Enable RTK for segments"

This reverts commit ef65fe78f3.

* Enable RTK for snippet collections

* Fix skipToken passing

* Enable RTK for dashboards

* Port Pulses to use new EntityObjectLoaderRtkQuery (#50633)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Fix hook usage

* Enable RTK for dashboards

* Port Fields to use new EntityObjectLoaderRtkQuery (#50639)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Revert "Enable RTK for questions"

This reverts commit b9ad637ae0.

* Enable RTK for segments

* Revert "Enable RTK for segments"

This reverts commit ef65fe78f3.

* Enable RTK for snippet collections

* Revert "Enable RTK for snippet collections"

This reverts commit e1439cb28b.

* Enable RTK for fields

* Account for skipToken

* Fix fetchFieldValues

* Optimize hooks

* Format code

* Fix loading state not kicking in during first render

* Rename

* Add comment

* Use consistent reference name for revisions

* Port Questions to use new EntityObjectLoaderRtkQuery (#50634)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Rename import

* Fix weirdness
- Apparently what makes the difference here is the lack of children render pattern ({childProps => <ComposedComponent {...childProps} />})

* Refactor

* Use isFetching instead of isLoading in EntityObjectLoaderRtkQuery, replace useEffect+useState with useMemo in SavedQuestionLoader

* Change order of HOCs to prevent loading state from redundantly kicking in

* Rename import

* [WIP] Port Persisted Models to use new EntityObjectLoaderRtkQuery (#50853)

* Revert "Enable RTK for dashboards"

This reverts commit dd74f51b63.

* Enable RTK for groups

* Revert "Enable RTK for groups"

This reverts commit bbf6954cfa.

* Enable RTK for pulses

* Revert "Enable RTK for pulses"

This reverts commit cabcc7e297.

* Enable RTK for questions

* Rename import

* Fix weirdness
- Apparently what makes the difference here is the lack of children render pattern ({childProps => <ComposedComponent {...childProps} />})

* Refactor

* Use isFetching instead of isLoading in EntityObjectLoaderRtkQuery, replace useEffect+useState with useMemo in SavedQuestionLoader

* Change order of HOCs to prevent loading state from redundantly kicking in

* Port persisted models

* Port schemas (#50854)

* Port snippets (#50855)

* Port timelines (#50858)

* Do TODOs

* Port timeline events (#50857)

* Port users (#50866)

* Port Collections to use new EntityObjectLoaderRtkQuery  (#50869)

* Port collections

* Fix imports

* Drop unused params

* Add missing property

* Fix collection not getting loaded

* Replace useCollectionQuery with useGetCollectionQuery

* Remove useCollectionQuery

* Format code

* Skip request on null id

* Revert "Remove useCollectionQuery"

This reverts commit 9b1068e611.

* Revert "Replace useCollectionQuery with useGetCollectionQuery"

This reverts commit 0c5ee660a3.

* Fix test

* Extract dedicated providePermissionsGroupListQueryTags

* Format code

* Fix test setup
2024-12-11 09:50:10 +00:00
Kamil Mielnik
ce49352589 Remove EntityLink (#51044)
* Get rid of Database.Link usage in TableBrowser

* Fix browseDatabase typing

* Get rid of Collection.Link usage in DashboardMoveModal

* Get rid of Collection.Link usage in QuestionMoveToast

* Style links consistently

* Remove EntityLink

* Use database from the store if it's already there

* Remove filter

* Fix typo

* Use ts-pattern

* Bring spacing back

* Extract components for links

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-12-11 16:10:27 +07:00
Sloan Sparger
219ca91f6d Questions in Dashboards Milestone 1 (#47784)
* BE: Dashboard Questions

Setting this makes the card a "dashboard internal card" that should only
be used within a single dashboard, is moved along with the dashboard, etc.

prevent invalid inserts/updates

POST /api/card for dashboard internal cards

GET /api/collection/:id/items

Search

PUT /api/card/:id

WIP: last bits of card-in-dashboard API

Sticking point here is the copy, I think I need to do a small refactor
to make the code less hairy.

rm line

optionally show DQs for collection items

copying dashboards 🎉

wip

quick fix

Disallow moving dashboard questions & test archive

remove unused columns

fix argument order 🤦

serdes for dashboard questions

serialization baseline tests

Fix tests in `metabase.models.card`

Fix download exports test

Lint migrations file

cljfmt

cljfmt, again

the cljfmt job in CI doesn't run on this branch, it runs on the PR
branch merged with `origin/master` - which is nice, because it catches
cljfmt issues that would happen if you merged, but don't happen on your
branch, but also confusing, because it catches issues like
"metabase.api.common is never used", and then you stare at the file for
a while like "YES IT IS" before realizing what's going on.

migration to add idx for report_card.dashboard_id

don't rollback the `report_card.dashboard_id` bits

a couple missed API changes

- no DQs w/o DashboardCards in search

- no DQs in autocomplete

- fix check for "currently a dashboard question" in card validation

Fix some comments, clean up some existing code

Before, `cards-to-copy` returned just two lists of cards: those to
discard (no permissions) and those to copy. But `maybe-duplicate-cards!`
had some extra logic: if the card was a `model`, don't copy it, just
reference it.

I modified `cards-to-copy` to return three lists instead: cards to copy,
cards to discard, *and* cards to reference. This was initially just used
for making sure we copy Dashboard Questions instead of referencing them
- but I realized we could use the same for Models as well. I moved the
logic for models to `cards-to-copy` instead: if the card is a Model,
return it in the `reference` list instead of the `copy` list.

Fix commented-out test

cljfmt

Optionally include dashboard questions in search

Add a test for failing card name change

Opt. include dashboard questions for autocomplete

Update src/metabase/api/dashboard.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

PR review response

lint migrations

quick impl of dashboard items

copied from collection items. should be firmed up for real going
forward. notable divergences:
- i'm not doing any limit/offset in the query
- i'm not including limit/offset in the response
- no reuse. just grabbed it to unblock nick

```
❯ http get "localhost:3000/api/dashboard/22/items" x-api-key:$API_KEY -pb
{
    "data": [
        {
            "archived": false,
            "archived_directly": false,
            "collection_id": 20,
            "collection_position": null,
            "collection_preview": true,
            "database_id": 48,
            "dataset_query": {
                "database": 48,
                "query": {
                    "source-table": 360
                },
                "type": "query"
            },
            "description": null,
            "display": "table",
            "entity_id": "_TmF-T7m_bBVxV_jfaNtM",
            "id": 192,
            "last-edit-info": {
                "email": "dan@metabase.com",
                "first_name": "dan",
                "id": 1,
                "last_name": "sutton",
                "timestamp": "2024-09-13T22:13:30.220311Z"
            },
            "last_used_at": "2024-10-01T17:48:36.128915Z",
            "model": "card",
            "moderated_status": null,
            "name": "Cynthia Example"
        }
    ],
    "models": [
        "card"
    ],
    "total": 1
}
```

contrast with collection items:

```
❯ http get "localhost:3000/api/collection/root/items?models=card&limit=1" x-api-key:$API_KEY -pb
{
    "data": [
        {
            "archived": false,
            "can_delete": false,
            "can_restore": false,
            "can_write": true,
            "collection_id": null,
            "collection_position": null,
            "collection_preview": true,
            "database_id": 4,
            "description": null,
            "display": "table",
            "entity_id": "e_jABu05u9nT9ocgfQWfZ",
            "fully_parameterized": true,
            "id": 143,
            "last-edit-info": {
                "email": "dan@metabase.com",
                "first_name": "dan",
                "id": 1,
                "last_name": "sutton",
                "timestamp": "2024-08-27T14:11:15.214254Z"
            },
            "last_used_at": "2024-08-27T14:11:27.138735Z",
            "location": null,
            "model": "card",
            "moderated_status": null,
            "name": "Collection + query on sleep question"
        }
    ],
    "limit": 1,
    "models": [
        "card"
    ],
    "offset": 0,
    "total": 13
}
```

Clean up last-edit-info and exclude archived cards

before: over-selecting, copy-paste function to clean it up.
after: reuse (bulk-aware) query that annotates with last-edit-info, ALSO
EXCLUDE CARDS

also condensed query a bit. was each field on a separate line for no
real reason.

`location` on dashboards

dashcards are still active for archived DQs

WIP: autoplace dashcards for dashboard cards

more wip for autoplacement

WIP for moving DQs

more WIP on moving DQs/autoplacement

delete old dashcards when moving to new dashboard

populate `here` on dashboards in coll items

reject moving card if in another dashboard

fix silly typo

allow optionally deleting old dashcards on move

WIP

add dashboard details to recents

untested wip

fix auto delete of old dashcards for move

Add another test for DQs getting unarchived

Fix dashboard details on recents, with a test

Archive and unarchive DQs when used/unused

including in revisions

Handle reversions containing unowned DQs

lint

Tests and fixes for dashboard items endpoint

remove stray #p

fix a test

Add more tests for DQs/reversions

Fix/update tests for updating DQs

Don't revert to dashcards with archived cards

This is the existing behavior, we should keep it.

lint

small fixes for recents tests

add more tests

Autoplace Dashboard Questions on creation

Improve autoplace to be like frontend

I'd hacked together something - this actually makes autoplacement work
the same way on the frontend and backend.

fix a couple tests

`delete_old_dashboards` as a query param

Fix autoplace for tabbed dashboards

and add a test

do not autoplace DQs when duplicating a dashboard

This was resulting in us accidentally creating two dashcards for a
duplicated DQ.

add effective location to collections on dash

add dashboard_count to (card) collection items

autoplace on unarchive, better error messages

Exclude DQs from dashboard if archived directly

DOH

workaround a bug with "changing" a type

Fix bug causing dashboard cards to be removed

small refactor autoplacing / removing dashcards

Create Dashboard revisions on autoplace/remove

When we modify Dashboard Questions, we autoplace or autoremove relevant
cards from the Dashboards involved. For example, we remove DashCards
from the old dashboard if we're moving to a new dashboard, and we
autoplace DashCards into the new dashboard.

When we do this, publish an event that the dashboard itself has changed.
This updates the revision history for the dashboard so that you can
revert correctly.

Note that when using the revision history, DQs will automatically be
archived or unarchived as necessary. So e.g. if you manually archive a
DQ, then go to the Dashboard and revert, the DQ will be auto-unarchived.
If you go to the dashboard and remove all cards for a DQ, the DQ will be
archived - if you then manually unarchive it, it'll be autoplaced on its
dashboard again.

Fix bug on card modification

The conditions here were wrong. Say you had a card on dashboard 1 that
was archived. If you specified `{:dashboard_id 1 :archived false}`, it
would be correctly autoplaced on the dashboard. But if you just
specified `{:archived false}`, the "new dashboard ID" is nil.

The logic here is pretty painful, because to figure out the resulting
value for something like `dashboard_id` we can't just get it from the
old version or the changes. Instead, we need to:

- check to see whether it's changing, then

- if it changed, use the version from the update, otherwise

- use the old version

The same is true for `archived`.

After we figure out the old dashboard_id, new dashboard_id, and whether
the card will end up archived or not, we can actually do the checks we
need:

- if we're ending up an unarchived card on a dashboard, autoplace

- if we're moving from one dashboard to another, or moving from a
dashboard to a collection (and the user told us to), auto-remove

offset/limits for dashboard items

Reuse some code between dashboard/collection items

Fix some failing tests in api.dashboard

I was getting stack overflow errors when running these tests. I followed
along with the demonstartion
[here](https://github.com/metabase/metabase/pull/43496) to fix.

cljfmt

add additional tests

Always delete dashcards when archiving a DQ

If we're archiving a DQ, let's delete the dashcards so this appears in
the revision history.

publish revision when autoplacing

Publish dashboard events when cards are autoplaced

new endpoint to get dashboards a card is in

allow moving to a dashboard deleting old dashcards

fix the migrations 😭

fix migration IDs

* work on dedicated dashboard question page

* wip on dashboard page for handling dashboard questions

* hacking linking to dashboard for question and books marks - does not handle navigating to the correct tab yet

* make it easier to change the dashboard_id for hacking

* misc. changes

* action menu and dashbcard action updates

* enables trashing dashboard questions from the dashboard view, enables undoing of that case, updates archive state for dedicated dashboard question page

* wip - mostly done creation flow

* wip

* add question directly on dashboard flow

* significant clean up of fe code, revert some wierd differences between base branch, allows selecting dashboard when duplicating a question

* type fixes

* clean up isDashboardQuestion checks, fixes bug where save question form name and description state would get cleared after selecting a dashboard from the picker, fixed bug where editing a dashboard question and choosing save as new question would only let you save it to the dashboard the original question was on

* implement bulk of team feedback

This commit accomplishes the following things:
- Updates copy of the dashboard/collection picker
- Fixes the tooltip copy for the add question button in the edit dashboard view
- Removes the ability to trash a dashboard question + dashboard view removes rather than trashes the question
- Adds option in dashboard edit view to add a native or notebook question

* prompt to save rather than discard changes when leaving a dashboard while editing to create a new question

* include dashboard questions in search results

* fix lint & kick CI

* type fixes

* fix unit tests

* two small fixes

* wip on failing e2e tests

* bulk e2e test fix

* fixed most tests worth fixing - leaving the ones that need to be replaced

* Dashboard Question as a source

* replace dashcard flow

* starting to update collection picker to treat dashboards as folders

* fix spelling mistake

* fix bad resolution and stop double adding newly created dashboard questions to their dashboards

* allow dashboards in collection picker

* remove checkbox to only clone dashboard w/o cards, fix collection id calculation for saving a question when defaults to a dashboard

* rough pass at allowing questions to be moved to, from, and between dashboards

* building state path with initial value as a dashboard

* simplify moving code and fix encountering BE error

* add confirm modals when moving a dashboard question to a collection or another dashboard, allow users to keep or remove dashcards for a dashboard question getting moved to a collection

* improve the breadcrumbs data consistency, fix bug in moving logic and dump user in edit state of dashboard when moving from collection to dashboard

* dynamic select button text

* Search showing available models

* hopefully this resolves some type sadness

* handle inconsistent state issues between latest question and query builder internal state

* default question picker to showing dashboards as folders

* silly type things

* disallow saving metrics | models | events to dashboards, added back ability to keep or remove dashboard ca
rds when moving a DQ to a collection, fixed dedicated DQ page not appearing archived after archiving the parent dashboard

* use currentData instead of data for collection breadcrumbs

* dashboards are not folders when they are empty

* fix moving question to Our Analytics, Update sidesheet question into for DQs, always allowed to select a dashboard for moving question

* confirm moving questions into dashboards

* trying to sort out types

* types are still a mess

* only regular questions can be moved into a dashboard

* adjusting some unit tests

* add e2e tests for dashboard questions

* should have happy linter and unit tests

* fix some type errors

* loading state

* e2e test fixes

* more fixed tests

* loading state message

* filter series options, fix create new collection logic

* fix some more e2e tests

* e2e test adjustments

* even more e2e tests fixes

* fix named export

* more e2e test fixes

* fixing some e2e stuff

* hopefully final e2e adjustments

* last failing e2e (for now)

* More BE: Dashboard Questions

add dashboard question dimension to stats

Handle series correctly

and test for them

Don't restore archived-directly questions

* unit test adjustments, linter changes

* obey the linter

* unit tests for new breadcumb functionality

* allow creating a question directly to a dashboard

* More BE: Dashboard Questions

use dashboard constants for default size

add missing sql clause

add dummmy alias to subquery

* more cards in dashboards e2e tests

* rebase whoopsie

* more tests

* fix types

* More BE: Dashboard Questions

include dashboard info on coll items & cards

include dashboard info in search

also modify the moderation info a bit, now all three endpoints return
the same shape for `dashboard` (if present):

```
{:id dashboard-id
 :name dashboard-name
 :moderation_status moderation-status-if-present}
```

Bulk endpoints for checking dashboards and moving

For now the move endpoint just runs everything in a transaction and
spits out an error if anything failed. I'd like to take more time to
think of the exact shape of the result we want in the case of an error,
even though I think ideally we should allow partial success.

* reproduce card-pocalypse

* adding dashboard link to search results

* more trash tests

* lint fixes

* fix crash when archiving dashboard with virtual cards

* add loading state to archive modal

* obey the clojure linter

* More BE: Dashboard Questions

cljfmt and fix tests

small test fix

* more e2e tests

* embedding tests

* type fix

* More BE: Dashboard Questions

two more small test fixes

more test fixes

* add sdk tests

* another test

* add series removal e2e test

* More BE: Dashboard Questions

yet another test 😭

work around old MariaDB limitations

* permission check and confirmation modal when moving cards into dashboards

* e2e adjustments

* add some missing tests

* prettier + rebase fixes

* fix search result bug

* Entity syncing when moving a question from a collection to a dashboard

* hello rebase hades

* gree dashboard-questions suite

* fix more e2e tests

* happy little test fixes

* Sloan Feedback

* fix move modal error swallowing

* fix embedding test

* fixes breadcrumbs for embedding, fixes associated failing tests, and updates some tests to account for reduction in # of requests

* fix embedding e2e tests

* Bryan's review response

* fix usage of `offset-paging`

* fix request count errors

* fix unit test

* finish feedback from FE code review

* CR response for Noah

* bad sloan

* no need for dashboards in ad hoc

* get the dash name from the question object

* fix migrations again

* fix test + kondo

* lint fix

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-12-10 13:51:37 -06:00
Braden Shepherdson
1770e0d228 Revert "[refs] lib.convert preserves :idents through a round trip (#50085)" (#51128)
This reverts commit 7c6b8bee37, #50085.
2024-12-10 19:41:23 +00:00
Nemanja Glumac
0cecef1c38 Dismissible "How to use Metabase" sidebar link (#50536)
* Add new user-level setting

* Add selector

* Make link dismissible from the sidebar

* Transfer the onboarding link to the main "gear" menu

* Add E2E test to cover the link dismissal behavior

* Add tests for the settings menu link

* Fix tests

* Provide useful comment in the e2e test

* Provide contextual explanations to translators
2024-12-10 19:36:50 +00:00
Jeff Bruemmer
4a47bd20f0 docs - api update (#51124)
* api docs

* intro
2024-12-10 18:55:26 +00:00
bryan
600e4aec03 Count and Categorize Public Views in query executions table (#51079)
* We need to look at the context field to categorize public views

* pull poll-unil into util ns

* fix comment typo

* add test

* update docstring

* remove true? call, it will return `true` on pass

* improve poll-until
2024-12-10 18:25:51 +00:00
Alexander Polyankin
c9b18c5fc6 Migrate legacy exclude date filters on read (#51014) 2024-12-10 17:33:04 +00:00
Uladzimir Havenchyk
d95746367e chore: rework qb expressions to css modules (#50864)
* chore: rework qb expressions to css modules

* use correct code for syntax

* use box instead of text

* replace text with box

* cleanup ts

* cleanup

* fix styles

* fix lint

* fix colors

* fix styles
2024-12-10 20:25:50 +03:00
appleby
1f8b62c4ea Fix the zoom-in.timeseries drill for multi-stage queries (#50970)
* Fix the zoom-in.timeseries drill for multi-stage queries

If no dimensions are provided to the zoom-in.timeseries drill, then attempt to find the matching dimension from the FE-provided row data instead, if present.

Related to https://github.com/metabase/metabase/issues/46932

* Only return zoom-in.timeseries drills for clicks on aggregated columns
2024-12-10 08:22:09 -08:00
Raphael Krut-Landau
6d4ea59746 Use Mantine's Portal not BodyComponent (#49494)
This PR removes the deprecated `BodyComponent` HOC in favor of Mantine's `Portal` component. This helps pave the way for https://github.com/metabase/metabase/pull/49442

### How to verify

1. Perform an action that triggers an undo toast (e.g., move a question into the trash)
2. Verify the undo toast appears correctly at the bottom of the screen
3. In a collection, drag and drop items to verify the drag preview renders correctly

### Testing

This change is covered by the following tests:
* `collections.cy.spec.js > "should be able to drag an item to the root collection (metabase#16498)"`
* `collection-pinned-overview.cy.spec.js:269: "should be able to pin a visualization by dragging it up"`

Note the following comment, however, which mentions the limitations of our drag-n-drop e2e tests:

(from https://github.com/metabase/metabase/blob/92d6150/e2e/test/scenarios/collections/collection-pinned-overview.cy.spec.js#L282-L289)
```
    // this test can give us some degree of confidence, but its effectiveness is limited
    // because we are manually firing events on the correct elements. It doesn't seem that there's
    // a way to actually simulate the raw user interaction of dragging a certain distance in cypress.
    // this will not guarantee that the drag and drop functionality will work in the real world, e.g
    // when our various drag + drop libraries start interfering with events on one another.
    // for example, this test would not have caught https://github.com/metabase/metabase/issues/30614
    // even libraries like https://github.com/dmtrKovalenko/cypress-real-events rely on firing events
    // on specific elements rather than truly simulating mouse movements across the screen
```
2024-12-10 11:12:32 -05:00
Alexander Polyankin
5607cb71c0 Move default filter parts to MBQL lib (#50957) 2024-12-10 16:08:11 +00:00
Jeff Bruemmer
99a1cdb660 docs - locale params (#51001)
* locale params

* formatting

* note on UI vs content

* interactive embedding

* language update

* plans blockquote

* asterisk
2024-12-10 10:58:35 -05:00
Alexander Polyankin
ebb3f14c39 Add :if as an alias to :case in the expression editor (#50702) 2024-12-10 15:15:21 +00:00
Braden Shepherdson
7c6b8bee37 [refs] lib.convert preserves :idents through a round trip (#50085)
Closes #49682. Closes #49683.

Updates `lib.convert` and legacy MBQL normalization to allow
`:ident`s, and fixes some QP middleware and utils so they can
still match up refs correctly.

No user-visible impact.

Newly created queries will have `:ident`s generated for joins,
aggregations, etc. by the previous query, and this will start
saving them into appDBs.

Pre-existing clauses don't have refs added yet.

* Fix loading in segments

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-12-10 15:04:21 +00:00
Roman Abdulmanov
41c73023b6 Add 52 as the release branch (#51113) 2024-12-10 18:50:22 +04:00
Alexander Polyankin
ad25f3c0eb Add :if mbql sugar function (#51069)
* Desugar if

* Add if to MBQL lib

* Add if to MBQL lib

* Add if to MBQL lib
2024-12-10 09:43:31 -05:00
Uladzimir Havenchyk
130f406b4f chore: migrate ViewHeader components to css modules (#50907)
* chore: migrate ViewHeader components to css modules

* fix typecheck

* cleanup styles

* more css

* fix styles

* more css

* more css

* fix css specificity

* fixup
2024-12-10 17:31:37 +03:00
Uladzimir Havenchyk
10f52f57ef chore: rework qb DatasetEditor styles to css modules (#50909)
* chore: rework qb DatasetEditor styles to css modules

* fix color

* fixup

* fix styles

* fix styles
2024-12-10 14:28:48 +00:00
Alexander Polyankin
ccd6b59b34 Do not match inner clauses with -filter-parts (#51089) 2024-12-10 08:43:37 -05:00
Chris Truter
faf82bd8d5 Track which search models are affected by deletes (#51096)
For now, we've decided not to trigger index updates when elements are deleted, due to the overhead that toucan2 would add.

We have the code to calculate what *should* be done, so we might as well keep it around in a test that documents these relationships. 

It's good to be mindful of the implications, and we could even use this information to do manual calls from the relevant deletion call sites.
2024-12-10 15:32:11 +02:00
Nemanja Glumac
cb71e0e908 Fix the "invite" screenshot (#51098) 2024-12-10 14:20:44 +01:00
Oisin Coveney
b88e7431b6 feat(sdk): Modify Interactive Question Layout (#50152) 2024-12-10 14:27:47 +02:00
Ngoc Khuat
0c4d8284b0 [Notification] insert and replace instead of truncate (#50735) 2024-12-10 12:14:35 +00:00
lbrdnk
a96a840c78 Avoid logging stacktrace in streaming (#51053)
* Avoid logging trace

* Demote log to warning
2024-12-10 09:59:56 +00:00
Uladzimir Havenchyk
84f6a327fa chore: rework dataref styles to css modules (#50911)
* chore: rework dataref to css modules

* fix pane

* fix styles

* fixup

* fix styles

* fix styles

* Update frontend/src/metabase/query_builder/components/SidebarContent/SidebarContent.tsx

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* rename questionid to NodeListItemId

* fix color

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-12-10 12:47:13 +03:00
Kamil Mielnik
4904ae048f Replace Actions API handlers in entities with RTK Query (#50936)
* Add list/create/update/delete to actions api

* Add api mappings in entity framework

* Port actions to RTK

* Remove old api mappings

* Fix a test

* Fix test

* Fix test

* Fix test

* Fix method

* Fix types

* Define request types

* Remove ActionsApi.create

* Fix deleting actions

* Fix invalidation

* Fix invalidation

* Remove redundant spreads

* Remove type attribute from UpdateActionRequest
2024-12-10 09:04:48 +00:00
github-automation-metabase
115d77dfbe Add v0.52.2 to the list of releases (#51085)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-12-09 19:33:05 -05:00
Jeff Bruemmer
a1aff9440f note on public links (#51081) 2024-12-09 17:15:04 -05:00
Jeff Bruemmer
f3edd784f0 docs - generate config file (#44444) 2024-12-09 20:37:12 +00:00
Phoomparin Mano
c40657ff3a feat(sdk): use metabase type prefix and re-export types (#50862) 2024-12-10 02:33:15 +07:00
Nathan Voxland
110079b65b If multiple limit or offset arguments are passed, only use the 1st one (#50964)
If multiple limit or offset arguments are passed, only use the 1st one
2024-12-09 13:25:30 -06:00
Phoomparin Mano
fba8aab8ac feat(sdk): combine title props in interactive question (#50660) 2024-12-10 01:23:30 +07:00
William
f256f2d2eb Nested joins ignore temporal units (#50962)
The underlying issue is that nest-query/nest-expression included temporal units when copying over joined fields into the nested query. This caused both the nested query and the parent query to include the "extract the unit from the date" code. In cases where the extraction didn't change the type, this duplication wasn't a big deal. However, for temporal units like hour-of-day, the first extraction changed the type of the field from date to string, and then the second extraction broke.  This change ensures that the inner query doesn't try to extract temporal units, which should avoid the duplicate extractions.
2024-12-09 18:15:08 +00:00
Phoomparin Mano
9f3e0bc68a feat(sdk): move non-auth config options to provider (#50585)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-12-10 00:44:43 +07:00
Phoomparin Mano
5313e018e8 feat(sdk): support sql parameters in interactive questions (#50728) 2024-12-09 23:43:19 +07:00
Nicolò Pretto
c0eab4452e feat(sdk): next sdk compatibility layer (#50230)
* wip next sdk compat

* better code generation, dts works

* Last line of file should end in a newline character

* feat(sdk): make MetabaseProvider not break ssr

* aUpdate enterprise/frontend/src/embedding-sdk/package.template.json

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* address pr comments

* refactor(sdk): use relative paths when fixing d.ts files

* make types work on moduleResolution: node

* add loading text

* fix(sdk): #50736 make sure we don't break the host app if a sdk
component is rendered outside of the provider for a render

* fix: this should make types work for real?

* self review fixes

* update test for PublicComponentWrapper

* Update enterprise/frontend/src/embedding-sdk/components/private/PublicComponentWrapper/PublicComponentWrapper.tsx

Co-authored-by: Phoomparin Mano <poom@metabase.com>

* remove unused component

* eslint-disable-next-line for MetabaseProvider

* list tsx as dependency

* /next -> /nextjs

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-09 17:12:27 +01:00
Nicolò Pretto
179554e564 feat(sdk): detect if session.id is not a string (#50890)
* feat(sdk): detect if session.id is not a string

* use yup, also validate exp as we use it
2024-12-09 16:27:37 +01:00
Phoomparin Mano
dbd60f5c47 feat(sdk): use public-facing question type in event handlers (#50867)
* introduce public metabase question type

* revise internal question type

* update stories

* use public question type in dashboard card plugins

* add tests for transforming question properties

* add tests for question description

* re-export the MetabaseQuestion type

* fix lint imports

* change publicQuestion to sdkQuestion

* name cannot be null if the card is present
2024-12-09 18:21:10 +07:00
Oisin Coveney
59c5690bd6 Add story for QuestionSettings (#50998) 2024-12-09 08:22:44 +00:00
Mahatthana (Kelvin) Nomsawadi
5197e318d7 Fix embed loader not translated with #locale (#50841)
* Fix embed loader not translated with #locale

* Fix unit tests

* Add E2E tests

* Fix a case where the lcoale is failed to load

* Simplify conditions in `LocaleProvider`

Co-authored-by: Nicolò Pretto <info@npretto.com>

* Make E2E tests faster

Co-authored-by: Nicolò Pretto <info@npretto.com>

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-09 01:50:41 +00:00
Mahatthana (Kelvin) Nomsawadi
fbe206dfba Make Loki's embedding scroll stories more resilient (#50991) 2024-12-09 01:50:29 +00:00
Oleksandr Yakushev
168bd09275 Bump Malli version (#51022) 2024-12-08 22:17:50 +02:00
Cam Saul
41b212a654 [Backend modularization] metabase.server.core and metabase.request.core API namespaces; update Kondo (#50839)
* WIP

* metabase.request.cookies namespace

* Server API namespace

* `metabase.server` => `metabase.server.instance`

* Reformat code

* Revert indentation changes

* Unrevert comment

* Oops delete moved file

* Don't be lazy CAM!!!

* Add TODO

* Please cljfmt

* Bump Kondo version to fix metadata ignores in namespaces being ignored

* Update Kondo and enable a few more linters

* Update Clojure linux install script location

* Ok so apparently the old URL does work

* Make sure things live in the right places

* Why do I always have to clean up other people's messes

* Fix formatting

* People need to knocc it off with writing slow tests

* Fix another test that took 45 SECONDS

* Fix Kondo warning
2024-12-07 09:35:13 +00:00
Case Nelson
b2fade6394 feat: Introduce describe-indexes (#49982)
* feat: Introduce describe-indexes

Fixes: #49981

Introduce a faster sync with describe-indexes that follows describe-fields
and describe-fks to allow for a database wide sync step rather per table
describe-table-indexes.

Implement for psotgres

* Fix formatting

* Add tests

* Update src/metabase/driver.clj

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Update src/metabase/driver.clj

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Address PR review

* Fix null schema check

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-12-06 21:31:36 +00:00
metamben
8f93e5550d Support FE display functions for during function (#50965)
* Support FE display functions for during function

Fixes #50942
2024-12-06 21:00:47 +00:00
Ryan Laurie
c3c2e8ee18 pin webhook tester to v1 (#51007) 2024-12-06 12:34:39 -07:00
Aleksandr Lesnenko
b03d6f7e2b Fix missing tooltip on waterfall total bar (#50917)
* fix scatter chart tooltip shows irrelevant info

* remove outdated spec as we always show the tooltip_column setting

* fix missing tooltip on the total bar on waterfall charts
2024-12-06 12:40:14 -05:00
Alexander Polyankin
da0397c091 Move specific date filter parts to MBQL lib (#50953) 2024-12-06 10:42:59 -05:00
Chris Truter
47200643e1 Fix race between jobs accessing the search index (#50990) 2024-12-06 17:08:06 +02:00
Chris Truter
6c22043070 Encapsulate default models to search (#50938) 2024-12-06 15:07:00 +00:00
Chris Truter
34401cccab Fix rollback to version 50 with null query_field values (#50982) 2024-12-06 14:59:33 +00:00
Aleksandr Lesnenko
e80c600db5 Render negative values on PieChart (#50837)
* fix pie chart ignores negative values

* fix incorrect handling of zero only values

* fix rebase
2024-12-06 13:30:34 +00:00
13851 changed files with 1797731 additions and 1700283 deletions

View File

@@ -0,0 +1 @@
Fix flakey test $ARGUMENTS

View File

@@ -0,0 +1 @@
Fix issue $ARGUMENTS

View File

@@ -0,0 +1 @@
Fetch unresolved comments for this branch's PR, then fix them

View File

@@ -0,0 +1 @@
Repro issue $ARGUMENTS in a failing test

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,144 @@
{:linters
{:metabase/test-helpers-use-non-thread-safe-functions
;; TODO -- seems silly to maintain different blacklists and whitelists here than we use for the deftest `^:parallel`
;; checker...
{:explicitly-safe
#{ ;; these toucan methods might actually set global values if it's used outside of a transaction,
;; but since mt/with-temp runs in a transaction, so we'll ignore them in this case.
toucan2.core/delete!
toucan2.core/update!
toucan2.core/insert!
toucan2.core/insert-returning-instance!
toucan2.core/insert-returning-instances!
toucan2.core/insert-returning-pk!
toucan2.core/insert-returning-pks!
clojure.core.async/<!!
clojure.core.async/>!!
clojure.core.async/alts!!
clojure.core.async/close!
clojure.core.async/poll!
clojure.core.memoize/memo-clear!
clojure.core/conj!
clojure.core/persistent!
clojure.core/reset!
clojure.core/swap!
clojure.core/volatile!
clojure.core/vreset!
clojure.core/vswap!
clojure.java.jdbc/execute!
methodical.core/add-aux-method-with-unique-key!
methodical.core/remove-aux-method-with-unique-key!
next.jdbc/execute!
;; Definitely thread safe
metabase.test.util.dynamic-redefs/patch-vars!
;; TODO: most of these symbols shouldn't be here, we should go through them and
;; find the functions/macros that use them and make sure their names end with !
;; best way to do this is try remove each of these and rely on kondo output to find places where it's used
clojure.test/grant-collection-perms!
clojure.test/grant-collection-perms-fn!
clojure.test/grant-perms-fn!
clojure.test/purge-old-entries!
clojure.test/revoke-collection-perms!
clojure.test/save-results!
metabase-enterprise.advanced-permissions.models.permissions/update-db-download-permissions!
metabase-enterprise.internal-user/install-internal-user!
metabase-enterprise.sso.integrations.saml-test/call-with-login-attributes-cleared!
metabase.actions.actions/perform-action!
metabase.actions.models/insert!
metabase.analytics.snowplow-test/fake-track-event-impl!
metabase.analytics.snowplow/track-event-impl!
metabase.app-db.core/finish-db-setup!
metabase.app-db.core/migrate!
metabase.app-db.core/setup-db!
metabase.app-db.schema-migrations-test.impl/run-migrations-in-range!
metabase.app-db.setup/migrate!
metabase.app-db.setup/setup-db!
metabase.channel.email-test/reset-inbox!
metabase.channel.email/send-email!
metabase.cmd.dump-to-h2/dump-to-h2!
metabase.cmd.load-from-h2/load-from-h2!
metabase.content-verification.models.moderation-review/create-review!
metabase.core.core/ensure-audit-db-installed!
metabase.driver.mongo-test/create-database-from-row-maps!
metabase.driver.postgres-test/create-enums-db!
metabase.driver.postgres-test/drop-if-exists-and-create-db!
metabase.driver.sql-jdbc.execute/execute-statement!
metabase.indexed-entities.models.model-index/add-values!
metabase.driver.sql-jdbc.connection.ssh-tunnel-test/start-mock-servers!
metabase.driver.sql-jdbc.connection.ssh-tunnel-test/stop-mock-servers!
metabase.indexed-entities.task.index-values/job-init!
metabase.model-persistence.models.persisted-info/ready-database!
metabase.model-persistence.task.persist-refresh/job-init!
metabase.model-persistence.task.persist-refresh/refresh-tables!
metabase.model-persistence.task.persist-refresh/schedule-persistence-for-database!
metabase.models.on-demand-test/add-dashcard-with-parameter-mapping!
metabase.permissions.core/grant-application-permissions!
metabase.permissions.core/grant-collection-read-permissions!
metabase.permissions.core/grant-collection-readwrite-permissions!
metabase.permissions.core/grant-full-data-permissions!
metabase.permissions.core/grant-native-readwrite-permissions!
metabase.permissions.core/grant-permissions!
metabase.permissions.core/revoke-application-permissions!
metabase.permissions.core/revoke-data-perms!
metabase.permissions.core/update-data-perms-graph!
metabase.permissions.core/update-group-permissions!
metabase.permissions.models.collection.graph-test/clear-graph-revisions!
metabase.permissions.models.collection.graph-test/do-with-n-temp-users-with-personal-collections!
metabase.permissions.models.permissions/grant-application-permissions!
metabase.permissions.models.permissions/grant-collection-read-permissions!
metabase.permissions.models.permissions/grant-collection-readwrite-permissions!
metabase.permissions.models.permissions/grant-full-data-permissions!
metabase.permissions.models.permissions/grant-native-readwrite-permissions!
metabase.permissions.models.permissions/grant-permissions!
metabase.permissions.models.permissions/revoke-application-permissions!
metabase.permissions.models.permissions/revoke-data-perms!
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.pulse.send/send-notifications!
metabase.pulse.send/send-pulse!
metabase.query-processor.streaming.interface/begin!
metabase.query-processor.streaming.interface/finish!
metabase.query-processor.streaming.interface/write-row!
metabase.sample-data.impl/try-to-extract-sample-database!
metabase.settings.models.setting-test/test-user-local-allowed-setting!
metabase.settings.models.setting-test/test-user-local-only-setting!
metabase.settings.models.setting.cache/restore-cache!
metabase.settings.models.setting/set!
metabase.settings.models.setting/validate-settings-formatting!
metabase.setup.core/create-token!
metabase.sso.ldap-test-util/start-ldap-server!
metabase.sync.core/sync-database!
metabase.sync.sync-metadata.fields.sync-metadata/update-field-metadata-if-needed!
metabase.sync.sync-metadata/sync-db-metadata!
metabase.sync.util-test/sync-database!
metabase.sync.util/store-sync-summary!
metabase.task.core/delete-task!
metabase.task.impl/delete-task!
metabase.test.data.bigquery-cloud-sdk/execute!
metabase.test.data.impl.get-or-create/set-test-db-permissions!
metabase.test.data.impl/copy-db-tables-and-fields!
metabase.test.data.impl/get-or-create-database!
metabase.test.data.impl/get-or-create-default-dataset!
metabase.test.data.interface/create-db!
metabase.test.data.interface/destroy-db!
metabase.test.data.oracle/create-user!
metabase.test.data.oracle/drop-user!
metabase.test.data.sql-jdbc.load-data/make-insert!
metabase.test.data.users/clear-cached-session-tokens!
metabase.test.initialize/do-initialization!
metabase.test.initialize/initialize-if-needed!
metabase.test.util.log/ensure-unique-logger!
metabase.test.util.log/set-ns-log-level!
metabase.test.util/do-with-temp-env-var-value!
metabase.test.util/restore-raw-setting!
metabase.test.util/upsert-raw-setting!
metabase.test/initialize-if-needed!
metabase.test/test-helpers-set-global-values!
metabase.test/with-temp-env-var-value!
metabase.upload.impl-test/set-local-infile!
metabase.util.files/create-dir-if-not-exists!
metabase.warehouse-schema.models.field-values/create-or-update-full-field-values!}}}}

View File

@@ -1,5 +0,0 @@
(ns macros.common
"Helpers for common Metabase macro shapes so we don't have to define the same macroexpansions over and over.")
(defn ignore-unused [symb]
(vary-meta symb assoc :clj-kondo/ignore [:unused-binding]))

View File

@@ -1,12 +0,0 @@
(ns macros.metabase.api.card-test
(:require [macros.common]))
(defmacro with-ordered-items
[collection model-and-name-syms & body]
`(let ~(into []
(comp (partition-all 2)
(mapcat (fn [[model binding]]
[(macros.common/ignore-unused binding) model])))
model-and-name-syms)
~collection
~@body))

View File

@@ -1,17 +0,0 @@
(ns macros.metabase.api.collection-test
(:require [macros.common]))
(defmacro with-collection-hierarchy! [bindings & body]
`(let [~(macros.common/ignore-unused 'a) nil
~(macros.common/ignore-unused 'b) nil
~(macros.common/ignore-unused 'c) nil
~(macros.common/ignore-unused 'd) nil
~(macros.common/ignore-unused 'e) nil
~(macros.common/ignore-unused 'f) nil
~(macros.common/ignore-unused 'g) nil]
~bindings
~@body))
(defmacro with-some-children-of-collection! [collection-or-id-or-nil & body]
`(let [~(macros.common/ignore-unused '&ids) ~collection-or-id-or-nil]
~@body))

View File

@@ -1,7 +0,0 @@
(ns macros.metabase.api.common)
(defmacro define-routes
"Macro for api.common/define-routes"
[& args]
`(do (def ~'routes "docstring" nil)
~@args))

View File

@@ -1,13 +0,0 @@
(ns macros.metabase.api.embed-test)
(defmacro with-embedding-enabled-and-temp-card-referencing!
[table-kw field-kw [card-binding] & body]
`(let [~card-binding [~table-kw ~field-kw]]
~@body))
(defmacro with-embedding-enabled-and-temp-dashcard-referencing!
[table-kw field-kw [dash-binding card-binding dashcard-binding] & body]
`(let [~dash-binding [~table-kw ~field-kw]
~(or card-binding '_) nil
~(or dashcard-binding '_) nil]
~@body))

View File

@@ -1,13 +0,0 @@
(ns macros.metabase.api.public-test)
(defmacro with-sharing-enabled-and-temp-card-referencing!
[table-kw field-kw [card-binding] & body]
`(let [~card-binding [~table-kw ~field-kw]]
~@body))
(defmacro with-sharing-enabled-and-temp-dashcard-referencing!
[table-kw field-kw [dash-binding card-binding dashcard-binding] & body]
`(let [~dash-binding [~table-kw ~field-kw]
~(or card-binding '_) nil
~(or dashcard-binding '_) nil]
~@body))

View File

@@ -0,0 +1,24 @@
(ns macros.metabase.collections.api-test)
(defmacro with-collection-hierarchy! [bindings & body]
`(let [~'a nil
~'b nil
~'c nil
~'d nil
~'e nil
~'f nil
~'g nil]
~'a
~'b
~'c
~'d
~'e
~'f
~'g
~bindings
~@body))
(defmacro with-some-children-of-collection! [collection-or-id-or-nil & body]
`(let [~'&ids ~collection-or-id-or-nil]
~'&ids
~@body))

View File

@@ -0,0 +1,13 @@
(ns macros.metabase.embedding.api.embed-test)
(defmacro with-embedding-enabled-and-temp-card-referencing!
[table-kw field-kw [card-binding] & body]
`(let [~card-binding [~table-kw ~field-kw]]
~@body))
(defmacro with-embedding-enabled-and-temp-dashcard-referencing!
[table-kw field-kw [dash-binding card-binding dashcard-binding] & body]
`(let [~dash-binding [~table-kw ~field-kw]
~(or card-binding '_) nil
~(or dashcard-binding '_) nil]
~@body))

View File

@@ -1,4 +0,0 @@
(ns macros.metabase.models.params.chain-filter-test)
(defmacro chain-filter [& _]
`(metabase.models.params.chain-filter/chain-filter nil nil))

View File

@@ -1,9 +0,0 @@
(ns macros.metabase.models.query-analysis-test
(:require [macros.common]))
(defmacro with-test-setup [& body]
`(let [~(macros.common/ignore-unused 'card-id) 1
~(macros.common/ignore-unused 'table-id) 2
~(macros.common/ignore-unused 'tax-id) 3
~(macros.common/ignore-unused 'total-id) 4]
~@body))

View File

@@ -1,9 +0,0 @@
(ns macros.metabase.models.user-test)
(defmacro with-groups [bindings & body]
`(let ~(into []
(comp (partition-all 3)
(mapcat (fn [[group-binding properties members]]
[group-binding [properties members]])))
bindings)
~@body))

View File

@@ -0,0 +1,4 @@
(ns macros.metabase.parameters.chain-filter-test)
(defmacro chain-filter [& _]
`(metabase.parameters.chain-filter/chain-filter nil nil))

View File

@@ -0,0 +1,13 @@
(ns macros.metabase.public-sharing.api-test)
(defmacro with-sharing-enabled-and-temp-card-referencing!
[table-kw field-kw [card-binding] & body]
`(let [~card-binding [~table-kw ~field-kw]]
~@body))
(defmacro with-sharing-enabled-and-temp-dashcard-referencing!
[table-kw field-kw [dash-binding card-binding dashcard-binding] & body]
`(let [~dash-binding [~table-kw ~field-kw]
~(or card-binding '_) nil
~(or dashcard-binding '_) nil]
~@body))

View File

@@ -0,0 +1,13 @@
(ns macros.metabase.queries.api.card-test)
(defmacro with-ordered-items
[collection model-and-name-syms & body]
`(let ~(into []
(comp (partition-all 2)
(mapcat (fn [[model binding]]
[binding model])))
model-and-name-syms)
~collection
~@(->> (partition-all 2 model-and-name-syms)
(map second))
~@body))

View File

@@ -0,0 +1,12 @@
(ns macros.metabase.query-analysis.models.query-analysis-test)
(defmacro with-test-setup [& body]
`(let [~'card-id 1
~'table-id 2
~'tax-id 3
~'total-id 4]
~'card-id
~'table-id
~'tax-id
~'total-id
~@body))

View File

@@ -0,0 +1,18 @@
(ns macros.metabase.query-analysis.task.test-setup)
(defmacro with-test-setup!
"Set up the data required to test the Query Analysis related tasks"
[& body]
`(let [~'c1 1
~'c2 2
~'c3 3
~'c4 4
~'archived 5
~'invalid 6]
~'c1
~'c2
~'c3
~'c4
~'archived
~'invalid
~@body))

View File

@@ -1,13 +0,0 @@
(ns macros.metabase.related-test
(:require [macros.common]))
(defmacro with-world [& body]
`(let [~(macros.common/ignore-unused 'collection-id) nil
~(macros.common/ignore-unused 'metric-id-a) nil
~(macros.common/ignore-unused 'metric-id-b) nil
~(macros.common/ignore-unused 'segment-id-a) nil
~(macros.common/ignore-unused 'segment-id-b) nil
~(macros.common/ignore-unused 'card-id-a) nil
~(macros.common/ignore-unused 'card-id-b) nil
~(macros.common/ignore-unused 'card-id-c) nil]
~@body))

View File

@@ -0,0 +1,9 @@
(ns macros.metabase.server.statistics-handler-test)
(defmacro with-server
[_ _ [connector chan-start-handle chan-finish-handle chan-done-request] & body]
`(let [~connector nil
~chan-start-handle nil
~chan-finish-handle nil
~chan-done-request nil]
~@body))

View File

@@ -1,13 +0,0 @@
(ns macros.metabase.task.setup.query-analysis-setup
(:require [macros.common]))
(defmacro with-test-setup!
"Set up the data required to test the Query Analysis related tasks"
[& body]
`(let [~(macros.common/ignore-unused 'c1) 1
~(macros.common/ignore-unused 'c2) 2
~(macros.common/ignore-unused 'c3) 3
~(macros.common/ignore-unused 'c4) 4
~(macros.common/ignore-unused 'archived) 5
~(macros.common/ignore-unused 'invalid) 6]
~@body))

View File

@@ -1,5 +0,0 @@
(ns macros.metabase.test.persistence)
(defmacro with-persistence-enabled! [[persist-fn-sym] & body]
`(clojure.core/let [~persist-fn-sym (fn [])]
~@body))

View File

@@ -0,0 +1,9 @@
(ns macros.metabase.users.models.user-test)
(defmacro with-groups! [bindings & body]
`(let ~(into []
(comp (partition-all 3)
(mapcat (fn [[group-binding properties members]]
[group-binding [properties members]])))
bindings)
~@body))

View File

@@ -0,0 +1,20 @@
(ns macros.metabase.xrays.related-test)
(defmacro with-world [& body]
`(let [~'collection-id nil
~'metric-id-a nil
~'metric-id-b nil
~'segment-id-a nil
~'segment-id-b nil
~'card-id-a nil
~'card-id-b nil
~'card-id-c nil]
~'collection-id
~'metric-id-a
~'metric-id-b
~'segment-id-a
~'segment-id-b
~'card-id-a
~'card-id-b
~'card-id-c
~@body))

View File

@@ -1,6 +0,0 @@
(ns macros.metabase-enterprise.advanced-permissions.api.util-test
(:require [macros.common]))
(defmacro with-impersonations! [impersonations-and-attributes-map & body]
`(let [~(macros.common/ignore-unused '&group) ~impersonations-and-attributes-map]
~@body))

View File

@@ -0,0 +1,5 @@
(ns macros.metabase-enterprise.database-routing.e2e-test)
(defmacro with-temp-dbs! [bindings & body]
`(let [~@(interleave bindings (repeat nil))]
~@body))

View File

@@ -0,0 +1,6 @@
(ns macros.metabase-enterprise.impersonation.util-test)
(defmacro with-impersonations! [impersonations-and-attributes-map & body]
`(let [~'&group ~impersonations-and-attributes-map]
~'&group
~@body))

View File

@@ -1,12 +1,18 @@
(ns macros.metabase-enterprise.query-reference-validation.api-test
(:require [macros.common]))
(ns macros.metabase-enterprise.query-reference-validation.api-test)
(defmacro with-test-setup! [& body]
`(let [~(macros.common/ignore-unused 'card-1) 1
~(macros.common/ignore-unused 'card-2) 2
~(macros.common/ignore-unused 'card-3) 3
~(macros.common/ignore-unused 'card-4) 4
~(macros.common/ignore-unused 'card-5) 5
~(macros.common/ignore-unused 'coll-2) 100
~(macros.common/ignore-unused 'coll-3) 200]
`(let [~'card-1 1
~'card-2 2
~'card-3 3
~'card-4 4
~'card-5 5
~'coll-2 100
~'coll-3 200]
~'card-1
~'card-2
~'card-3
~'card-4
~'card-5
~'coll-2
~'coll-3
~@body))

View File

@@ -1,6 +1,6 @@
(ns macros.metabase-enterprise.sandbox.test-util
(:require [macros.common]))
(ns macros.metabase-enterprise.sandbox.test-util)
(defmacro with-gtaps! [gtaps-definition & body]
`(let [~(macros.common/ignore-unused '&group) ~gtaps-definition]
`(let [~'&group ~gtaps-definition]
~'&group
~@body))

View File

@@ -1,59 +1,112 @@
(ns macros.metabase-enterprise.serialization.test-util
(:require [macros.common]))
(ns macros.metabase-enterprise.serialization.test-util)
(defmacro with-world [& body]
`(let [~(macros.common/ignore-unused 'db-id) nil
~(macros.common/ignore-unused 'table-id) nil
~(macros.common/ignore-unused 'table) nil
~(macros.common/ignore-unused 'table-id-categories) nil
~(macros.common/ignore-unused 'table-id-users) nil
~(macros.common/ignore-unused 'table-id-checkins) nil
~(macros.common/ignore-unused 'venues-pk-field-id) nil
~(macros.common/ignore-unused 'numeric-field-id) nil
~(macros.common/ignore-unused 'name-field-id) nil
~(macros.common/ignore-unused 'latitude-field-id) nil
~(macros.common/ignore-unused 'longitude-field-id) nil
~(macros.common/ignore-unused 'category-field-id) nil
~(macros.common/ignore-unused 'category-pk-field-id) nil
~(macros.common/ignore-unused 'date-field-id) nil
~(macros.common/ignore-unused 'users-pk-field-id) nil
~(macros.common/ignore-unused 'user-id-field-id) nil
~(macros.common/ignore-unused 'checkins->venues-field-id) nil
~(macros.common/ignore-unused 'last-login-field-id) nil
~(macros.common/ignore-unused 'collection-id) nil
~(macros.common/ignore-unused 'collection-id-nested) nil
~(macros.common/ignore-unused 'user-id-temp) nil
~(macros.common/ignore-unused 'personal-collection-id) nil
~(macros.common/ignore-unused 'pc-felicia-nested-id) nil
~(macros.common/ignore-unused 'pc-nested-id) nil
~(macros.common/ignore-unused 'pc-deeply-nested-id) nil
~(macros.common/ignore-unused 'metric-id) nil
~(macros.common/ignore-unused 'segment-id) nil
~(macros.common/ignore-unused 'dashboard-id) nil
~(macros.common/ignore-unused 'root-dashboard-id) nil
~(macros.common/ignore-unused 'card-id) nil
~(macros.common/ignore-unused 'card-arch-id) nil
~(macros.common/ignore-unused 'card-id-root) nil
~(macros.common/ignore-unused 'card-id-nested) nil
~(macros.common/ignore-unused 'card-id-nested-query) nil
~(macros.common/ignore-unused 'card-id-native-query) nil
~(macros.common/ignore-unused 'card-id-pivot-table) nil
~(macros.common/ignore-unused 'dashcard-id) nil
~(macros.common/ignore-unused 'dashcard-top-level-click-id) nil
~(macros.common/ignore-unused 'dashcard-with-click-actions) nil
~(macros.common/ignore-unused 'dashcard-with-textbox-id) nil
~(macros.common/ignore-unused 'card-id-root-to-collection) nil
~(macros.common/ignore-unused 'card-id-collection-to-root) nil
~(macros.common/ignore-unused 'pulse-id) nil
~(macros.common/ignore-unused 'pulsecard-root-id) nil
~(macros.common/ignore-unused 'pulsecard-collection-id) nil
~(macros.common/ignore-unused 'card-id-template-tags) nil
~(macros.common/ignore-unused 'card-id-filter-agg) nil
~(macros.common/ignore-unused 'card-id-temporal-unit) nil
~(macros.common/ignore-unused 'snippet-id) nil
~(macros.common/ignore-unused 'snippet-collection-id) nil
~(macros.common/ignore-unused 'snippet-nested-collection-id) nil
~(macros.common/ignore-unused 'nested-snippet-id) nil
~(macros.common/ignore-unused 'card-id-with-native-snippet) nil
~(macros.common/ignore-unused 'card-join-card-id) nil]
`(let [~'db-id nil
~'table-id nil
~'table nil
~'table-id-categories nil
~'table-id-users nil
~'table-id-checkins nil
~'venues-pk-field-id nil
~'numeric-field-id nil
~'name-field-id nil
~'latitude-field-id nil
~'longitude-field-id nil
~'category-field-id nil
~'category-pk-field-id nil
~'date-field-id nil
~'users-pk-field-id nil
~'user-id-field-id nil
~'checkins->venues-field-id nil
~'last-login-field-id nil
~'collection-id nil
~'collection-id-nested nil
~'user-id-temp nil
~'personal-collection-id nil
~'pc-felicia-nested-id nil
~'pc-nested-id nil
~'pc-deeply-nested-id nil
~'metric-id nil
~'segment-id nil
~'dashboard-id nil
~'root-dashboard-id nil
~'card-id nil
~'card-arch-id nil
~'card-id-root nil
~'card-id-nested nil
~'card-id-nested-query nil
~'card-id-native-query nil
~'card-id-pivot-table nil
~'dashcard-id nil
~'dashcard-top-level-click-id nil
~'dashcard-with-click-actions nil
~'dashcard-with-textbox-id nil
~'card-id-root-to-collection nil
~'card-id-collection-to-root nil
~'pulse-id nil
~'pulsecard-root-id nil
~'pulsecard-collection-id nil
~'card-id-template-tags nil
~'card-id-filter-agg nil
~'card-id-temporal-unit nil
~'snippet-id nil
~'snippet-collection-id nil
~'snippet-nested-collection-id nil
~'nested-snippet-id nil
~'card-id-with-native-snippet nil
~'card-join-card-id nil]
~'db-id
~'table-id
~'table
~'table-id-categories
~'table-id-users
~'table-id-checkins
~'venues-pk-field-id
~'numeric-field-id
~'name-field-id
~'latitude-field-id
~'longitude-field-id
~'category-field-id
~'category-pk-field-id
~'date-field-id
~'users-pk-field-id
~'user-id-field-id
~'checkins->venues-field-id
~'last-login-field-id
~'collection-id
~'collection-id-nested
~'user-id-temp
~'personal-collection-id
~'pc-felicia-nested-id
~'pc-nested-id
~'pc-deeply-nested-id
~'metric-id
~'segment-id
~'dashboard-id
~'root-dashboard-id
~'card-id
~'card-arch-id
~'card-id-root
~'card-id-nested
~'card-id-nested-query
~'card-id-native-query
~'card-id-pivot-table
~'dashcard-id
~'dashcard-top-level-click-id
~'dashcard-with-click-actions
~'dashcard-with-textbox-id
~'card-id-root-to-collection
~'card-id-collection-to-root
~'pulse-id
~'pulsecard-root-id
~'pulsecard-collection-id
~'card-id-template-tags
~'card-id-filter-agg
~'card-id-temporal-unit
~'snippet-id
~'snippet-collection-id
~'snippet-nested-collection-id
~'nested-snippet-id
~'card-id-with-native-snippet
~'card-join-card-id
~@body))

View File

@@ -1,329 +0,0 @@
(ns hooks.clojure.core
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.common]))
;;; TODO -- seems silly to maintain different blacklists and whitelists here than we use for the deftest `^:parallel`
;;; checker... those lists live in the Clj Kondo config file
(def ^:private symbols-allowed-in-fns-not-ending-in-an-exclamation-point
'#{;; these toucan methods might actually set global values if it's used outside of a transaction,
;; but since mt/with-temp runs in a transaction, so we'll ignore them in this case.
toucan2.core/delete!
toucan2.core/update!
toucan2.core/insert!
toucan2.core/insert-returning-instance!
toucan2.core/insert-returning-instances!
toucan2.core/insert-returning-pk!
toucan2.core/insert-returning-pks!
clojure.core.async/<!!
clojure.core.async/>!!
clojure.core.async/alts!!
clojure.core.async/close!
clojure.core.async/poll!
clojure.core.memoize/memo-clear!
clojure.core/conj!
clojure.core/persistent!
clojure.core/reset!
clojure.core/swap!
clojure.core/volatile!
clojure.core/vreset!
clojure.core/vswap!
clojure.java.jdbc/execute!
methodical.core/add-aux-method-with-unique-key!
methodical.core/remove-aux-method-with-unique-key!
next.jdbc/execute!
;; Definitely thread safe
metabase.test.util.dynamic-redefs/patch-vars!
;; TODO: most of these symbols shouldn't be here, we should go through them and
;; find the functions/macros that use them and make sure their names end with !
;; best way to do this is try remove each of these and rely on kondo output to find places where it's used
clojure.test/grant-collection-perms!
clojure.test/grant-collection-perms-fn!
clojure.test/grant-perms-fn!
clojure.test/purge-old-entries!
clojure.test/revoke-collection-perms!
clojure.test/save-results!
metabase-enterprise.advanced-permissions.models.permissions/update-db-download-permissions!
metabase-enterprise.internal-user/install-internal-user!
metabase-enterprise.sso.integrations.saml-test/call-with-login-attributes-cleared!
metabase.actions/perform-action!
metabase.analytics.snowplow-test/fake-track-event-impl!
metabase.analytics.snowplow/track-event-impl!
metabase.api.public-test/add-card-to-dashboard!
metabase.cmd.dump-to-h2/dump-to-h2!
metabase.cmd.load-from-h2/load-from-h2!
metabase.core/ensure-audit-db-installed!
metabase.db.schema-migrations-test.impl/run-migrations-in-range!
metabase.db.setup/migrate!
metabase.db.setup/setup-db!
metabase.db/migrate!
metabase.db/setup-db!
metabase.driver.mongo-test/create-database-from-row-maps!
metabase.driver.postgres-test/create-enums-db!
metabase.driver.postgres-test/drop-if-exists-and-create-db!
metabase.driver.sql-jdbc.execute/execute-statement!
metabase.email-test/reset-inbox!
metabase.email/send-email!
metabase.models.action/insert!
metabase.models.collection.graph-test/clear-graph-revisions!
metabase.models.collection.graph-test/do-with-n-temp-users-with-personal-collections!
metabase.models.field-values/create-or-update-full-field-values!
metabase.models.model-index/add-values!
metabase.models.moderation-review/create-review!
metabase.models.on-demand-test/add-dashcard-with-parameter-mapping!
metabase.models.permissions/grant-application-permissions!
metabase.models.permissions/grant-collection-read-permissions!
metabase.models.permissions/grant-collection-readwrite-permissions!
metabase.models.permissions/grant-full-data-permissions!
metabase.models.permissions/grant-native-readwrite-permissions!
metabase.models.permissions/grant-permissions!
metabase.models.permissions/revoke-application-permissions!
metabase.models.permissions/revoke-data-perms!
metabase.models.permissions/update-data-perms-graph!
metabase.models.permissions/update-group-permissions!
metabase.models.persisted-info/ready-database!
metabase.models.setting-test/test-user-local-allowed-setting!
metabase.models.setting-test/test-user-local-only-setting!
metabase.models.setting.cache/restore-cache!
metabase.models.setting/set!
metabase.models.setting/validate-settings-formatting!
metabase.permissions.test-util/with-restored-perms!
metabase.pulse.send/send-notifications!
metabase.pulse.send/send-pulse!
metabase.query-processor.streaming.interface/begin!
metabase.query-processor.streaming.interface/finish!
metabase.query-processor.streaming.interface/write-row!
metabase.sample-data/try-to-extract-sample-database!
metabase.setup/create-token!
metabase.sync.sync-metadata.fields.sync-metadata/update-field-metadata-if-needed!
metabase.sync.sync-metadata/sync-db-metadata!
metabase.sync.util-test/sync-database!
metabase.sync.util/store-sync-summary!
metabase.sync/sync-database!
metabase.task.index-values/job-init!
metabase.task.persist-refresh/job-init!
metabase.task.persist-refresh/refresh-tables!
metabase.task.persist-refresh/schedule-persistence-for-database!
metabase.task/delete-task!
metabase.test.data.bigquery-cloud-sdk/execute!
metabase.test.data.impl/copy-db-tables-and-fields!
metabase.test.data.impl/get-or-create-database!
metabase.test.data.impl/get-or-create-default-dataset!
metabase.test.data.impl.get-or-create/set-test-db-permissions!
metabase.test.data.interface/create-db!
metabase.test.data.interface/destroy-db!
metabase.test.data.oracle/create-user!
metabase.test.data.oracle/drop-user!
metabase.test.data.sql-jdbc.load-data/make-insert!
metabase.test.data.users/clear-cached-session-tokens!
metabase.test.initialize/do-initialization!
metabase.test.initialize/initialize-if-needed!
metabase.test.integrations.ldap/start-ldap-server!
metabase.test.util.log/ensure-unique-logger!
metabase.test.util.log/set-ns-log-level!
metabase.test.util/do-with-temp-env-var-value!
metabase.test.util/restore-raw-setting!
metabase.test.util/upsert-raw-setting!
metabase.test/initialize-if-needed!
metabase.test/test-helpers-set-global-values!
metabase.test/with-temp-env-var-value!
metabase.upload-test/set-local-infile!
metabase.util.files/create-dir-if-not-exists!
metabase.util.ssh-test/start-mock-servers!
metabase.util.ssh-test/stop-mock-servers!})
(defn- end-with-exclamation?
[s]
(str/ends-with? s "!"))
(defn- explicitly-safe? [qualified-symbol]
(contains? symbols-allowed-in-fns-not-ending-in-an-exclamation-point qualified-symbol))
(defn- explicitly-unsafe? [config qualified-symbol]
(contains? (get-in config [:linters :metabase/validate-deftest :parallel/unsafe]) qualified-symbol))
(defn- unsafe? [config qualified-symbol]
(and (or (end-with-exclamation? qualified-symbol)
(explicitly-unsafe? config qualified-symbol))
(not (explicitly-safe? qualified-symbol))))
(defn- non-thread-safe-form-should-end-with-exclamation*
[{[defn-or-defmacro form-name] :children, :as node} config]
(when-not (and (:string-value form-name)
(end-with-exclamation? (:string-value form-name)))
(letfn [(walk [f form]
(f form)
(doseq [child (:children form)]
(walk f child)))
(check-node [form]
(when-let [qualified-symbol (hooks.common/node->qualified-symbol form)]
(when (unsafe? config qualified-symbol)
(hooks/reg-finding!
(assoc (meta form-name)
:message (format "The name of this %s should end with `!` because it contains calls to non thread safe form `%s`. [:metabase/test-helpers-use-non-thread-safe-functions]"
(:string-value defn-or-defmacro) qualified-symbol)
:type :metabase/test-helpers-use-non-thread-safe-functions)))))]
(walk check-node node))
node))
(defn non-thread-safe-form-should-end-with-exclamation
"Used to ensure defn and defmacro in test namespace to have name ending with `!` if it's non-thread-safe.
A function or a macro can be defined as 'not thread safe' when their funciton name ends with a `!`.
Only used in tests to identify thread-safe/non-thread-safe test helpers. See #37126"
[{:keys [node cljc lang config]}]
(when (or (not cljc)
(= lang :clj))
(non-thread-safe-form-should-end-with-exclamation* node config))
{:node node})
(comment
(require '[clj-kondo.core :as clj-kondo])
(def form (str '(defmacro a
[x]
`(fun-call x))))
(def form "(defmacro a
[x]
`(some! ~x))")
(def form "(defun f
[x]
(let [g! (fn [] 1)]
(g!)))")
(str (hooks/parse-string form))
(hooks/sexpr (hooks/parse-string form))
(binding [hooks/*reload* true]
(-> form
(with-in-str (clj-kondo/run! {:lint ["-"]}))
:findings))
(do (non-thread-safe-form-should-end-with-exclamation* (hooks/parse-string form)) nil))
(defn- ns-form-node->require-node [ns-form-node]
(some (fn [node]
(when (and (hooks/list-node? node)
(let [first-child (first (:children node))]
(and (hooks/keyword-node? first-child)
(= (hooks/sexpr first-child) :require))))
node))
(:children ns-form-node)))
(defn- lint-require-shapes [ns-form-node]
(doseq [node (-> ns-form-node
ns-form-node->require-node
:children
rest)]
(cond
(not (hooks/vector-node? node))
(hooks/reg-finding! (assoc (meta node)
:message "All :required namespaces should be wrapped in vectors [:metabase/require-shape-checker]"
:type :metabase/require-shape-checker))
(hooks/vector-node? (second (:children node)))
(hooks/reg-finding! (assoc (meta node)
:message "Don't use prefix forms inside :require [:metabase/require-shape-checker]"
:type :metabase/require-shape-checker)))))
(defn- require-node->namespace-symb-nodes [require-node]
(let [[_ns & args] (:children require-node)]
(into []
;; prefixed namespace forms are NOT SUPPORTED!!!!!!!!1
(keep (fn [node]
(cond
(hooks/vector-node? node)
;; propagate the metadata attached to this vector in case there's a `:clj-kondo/ignore` form.
(vary-meta (first (:children node)) (partial merge (meta require-node) (meta node)))
;; this should also be dead code since we require requires to be vectors
(hooks/token-node? node)
(vary-meta node (partial merge (meta require-node)))
:else
(printf "Don't know how to figure out what namespace is being required in %s\n" (pr-str node)))))
args)))
(defn- ns-form-node->ns-symb [ns-form-node]
(some-> (some (fn [node]
(when (and (hooks/token-node? node)
(not= (hooks/sexpr node) 'ns))
node))
(:children ns-form-node))
hooks/sexpr))
(defn- module
"E.g.
(module 'metabase.qp.middleware.wow) => 'metabase.qp"
[ns-symb]
(some-> (re-find #"^metabase\.[^.]+" (str ns-symb)) symbol))
(defn- ignored-namespace? [ns-symb config]
(some
(fn [pattern-str]
(re-find (re-pattern pattern-str) (str ns-symb)))
(:ignored-namespace-patterns config)))
(defn- module-api-namespaces
"Set API namespaces for a given module. `:any` means you can use anything, there are no API namespaces for this
module (yet). If unspecified, the default is just the namespace with the same name as the module e.g.
`metabase.db`."
[module config]
(let [module-config (get-in config [:api-namespaces module])]
(cond
(= module-config :any)
nil
(set? module-config)
module-config
:else
#{module})))
(defn- lint-modules [ns-form-node config]
(let [ns-symb (ns-form-node->ns-symb ns-form-node)]
(when-not (ignored-namespace? ns-symb config)
(when-let [current-module (module ns-symb)]
(let [allowed-modules (get-in config [:allowed-modules current-module])
required-namespace-symb-nodes (-> ns-form-node
ns-form-node->require-node
require-node->namespace-symb-nodes)]
(doseq [node required-namespace-symb-nodes
:let [clj-kondo-ignore (some-> (meta node) :clj-kondo/ignore hooks/sexpr set)]
:when (not (contains? clj-kondo-ignore :metabase/ns-module-checker))
:let [required-namespace (hooks/sexpr node)
required-module (module required-namespace)]
;; ignore stuff not in a module i.e. non-Metabase stuff.
:when required-module
:let [in-current-module? (= required-module current-module)]
:when (not in-current-module?)
:let [allowed-module? (or (= allowed-modules :any)
(contains? (set allowed-modules) required-module))
module-api-namespaces (module-api-namespaces required-module config)
allowed-module-namespace? (or (empty? module-api-namespaces)
(contains? module-api-namespaces required-namespace))]]
(when-let [error (cond
(not allowed-module?)
(format "Module %s should not be used in the %s module. [:metabase/ns-module-checker :allowed-modules %s]"
required-module
current-module
current-module)
(not allowed-module-namespace?)
(format "Namespace %s is not an allowed external API namespace for the %s module. [:metabase/ns-module-checker :api-namespaces %s]"
required-namespace
required-module
required-module))]
(hooks/reg-finding! (assoc (meta node)
:message error
:type :metabase/ns-module-checker)))))))))
(defn lint-ns [x]
(lint-require-shapes (:node x))
(lint-modules (:node x) (get-in x [:config :linters :metabase/ns-module-checker]))
x)

View File

@@ -0,0 +1,52 @@
(ns hooks.clojure.core.defmulti
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.common]))
(defn- check-arglists [report-node arglists]
(letfn [(reg-bad-arglists! []
(hooks/reg-finding!
(assoc (meta report-node)
:message ":arglists should be a quoted list of vectors [:metabase/check-defmulti-arglists]"
:type :metabase/check-defmulti-arglists)))
(reg-bad-arg! []
(hooks/reg-finding!
(assoc (meta report-node)
:message ":arglists should contain actual arg names, not underscore (unused) symbols [:metabase/check-defmulti-arglists]"
:type :metabase/check-defmulti-arglists)))
(underscore-arg? [arg]
(and (symbol? arg)
(str/starts-with? arg "_")))
(check-arglist [arglist]
(cond
(not (vector? arglist)) (reg-bad-arglists!)
(some underscore-arg? arglist) (reg-bad-arg!)))]
(if-not (and (seq? arglists)
(= (first arglists) 'quote)
(seq (second arglists)))
(reg-bad-arglists!)
(let [[_quote arglists] arglists]
(doseq [arglist arglists]
(check-arglist arglist))))))
(defn- defmulti-check-for-arglists-metadata
"Make sure a [[defmulti]] has an attribute map with `:arglists` metadata."
[node]
(let [[_defmulti _symb & args] (:children node)
[_docstring & args] (if (hooks/string-node? (first args))
args
(cons nil args))
attr-map (when (hooks/map-node? (first args))
(first args))
arglists (some-> attr-map hooks/sexpr :arglists seq)]
(if-not (seq? arglists) ; should be a list or at least list-like
(hooks/reg-finding!
(assoc (meta node)
:message "All defmultis should have an attribute map with :arglists metadata. [:metabase/check-defmulti-arglists]"
:type :metabase/check-defmulti-arglists))
(check-arglists attr-map arglists))))
(defn lint-defmulti [x]
(defmulti-check-for-arglists-metadata (:node x))
x)

View File

@@ -0,0 +1,76 @@
(ns hooks.clojure.core.defn
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.common]))
(defn- end-with-exclamation?
[s]
(str/ends-with? s "!"))
(defn- explicitly-safe? [config qualified-symbol]
(contains? (get-in config [:linters :metabase/test-helpers-use-non-thread-safe-functions :explicitly-safe])
qualified-symbol))
(defn- explicitly-unsafe? [config qualified-symbol]
(contains? (get-in config [:linters :metabase/validate-deftest :parallel/unsafe]) qualified-symbol))
(defn- unsafe? [config qualified-symbol]
(and (or (end-with-exclamation? qualified-symbol)
(explicitly-unsafe? config qualified-symbol))
(not (explicitly-safe? config qualified-symbol))))
(defn- non-thread-safe-form-should-end-with-exclamation*
[{[defn-or-defmacro form-name] :children, :as node} config]
(when-not (and (:string-value form-name)
(end-with-exclamation? (:string-value form-name)))
(letfn [(walk [f form]
(f form)
(doseq [child (:children form)]
(walk f child)))
(check-node [form]
(when-let [qualified-symbol (hooks.common/node->qualified-symbol form)]
(when (unsafe? config qualified-symbol)
(hooks/reg-finding!
(assoc (meta form-name)
:message (format "The name of this %s should end with `!` because it contains calls to non thread safe form `%s`. [:metabase/test-helpers-use-non-thread-safe-functions]"
(:string-value defn-or-defmacro) qualified-symbol)
:type :metabase/test-helpers-use-non-thread-safe-functions)))))]
(walk check-node node))
node))
(defn non-thread-safe-form-should-end-with-exclamation
"Used to ensure defn and defmacro in test namespace to have name ending with `!` if it's non-thread-safe.
A function or a macro can be defined as 'not thread safe' when their funciton name ends with a `!`.
Only used in tests to identify thread-safe/non-thread-safe test helpers. See #37126"
[{:keys [node cljc lang config]}]
(when (or (not cljc)
(= lang :clj))
(non-thread-safe-form-should-end-with-exclamation* node config))
{:node node})
(comment
(require '[clj-kondo.core :as clj-kondo])
(def form (str '(defmacro a
[x]
`(fun-call x))))
(def form "(defmacro a
[x]
`(some! ~x))")
(def form "(defun f
[x]
(let [g! (fn [] 1)]
(g!)))")
(str (hooks/parse-string form))
(hooks/sexpr (hooks/parse-string form))
(binding [hooks/*reload* true]
(-> form
(with-in-str (clj-kondo/run! {:lint ["-"]}))
:findings))
(do (non-thread-safe-form-should-end-with-exclamation* (hooks/parse-string form)) nil))

View File

@@ -0,0 +1,119 @@
(ns hooks.clojure.core.ns
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.common]
[hooks.common.modules :as modules]))
(defn- ns-form-node->require-node [ns-form-node]
(some (fn [node]
(when (and (hooks/list-node? node)
(let [first-child (first (:children node))]
(and (hooks/keyword-node? first-child)
(= (hooks/sexpr first-child) :require))))
node))
(:children ns-form-node)))
(defn- lint-require-shapes [ns-form-node]
(doseq [node (-> ns-form-node
ns-form-node->require-node
:children
rest)]
(cond
(not (hooks/vector-node? node))
(hooks/reg-finding! (assoc (meta node)
:message "All :required namespaces should be wrapped in vectors [:metabase/require-shape-checker]"
:type :metabase/require-shape-checker))
(hooks/vector-node? (second (:children node)))
(hooks/reg-finding! (assoc (meta node)
:message "Don't use prefix forms inside :require [:metabase/require-shape-checker]"
:type :metabase/require-shape-checker)))))
(defn- lint-requires-on-new-lines [ns-form-node]
(let [[require-keyword first-require] (-> ns-form-node
ns-form-node->require-node
:children)]
(when-let [require-keyword-line (:row (meta require-keyword))]
(when-let [first-require-line (:row (meta first-require))]
(when (= require-keyword-line first-require-line)
(hooks/reg-finding! (assoc (meta first-require)
:message "Put your requires on a newline from the :require keyword [:metabase/require-shape-checker]"
:type :metabase/require-shape-checker)))))))
(defn- require-node->namespace-symb-nodes [require-node]
(let [[_ns & args] (:children require-node)]
(into []
;; prefixed namespace forms are NOT SUPPORTED!!!!!!!!1
(keep (fn [node]
(cond
(hooks/vector-node? node)
;; propagate the metadata attached to this vector in case there's a `:clj-kondo/ignore` form.
(let [symbol-node (first (:children node))]
(hooks.common/merge-ignored-linters symbol-node require-node node))
;; this should also be dead code since we require requires to be vectors
(hooks/token-node? node)
(hooks.common/merge-ignored-linters node require-node)
:else
(printf "Don't know how to figure out what namespace is being required in %s\n" (pr-str node)))))
args)))
(defn- ns-form-node->ns-symb-node [ns-form-node]
(some (fn [node]
(when (and (hooks/token-node? node)
(not= (hooks/sexpr node) 'ns))
node))
(:children ns-form-node)))
(defn- ns-form-node->ns-symb [ns-form-node]
(some-> (ns-form-node->ns-symb-node ns-form-node)
hooks/sexpr))
(defn- lint-modules [ns-form-node config]
(let [ns-symb (ns-form-node->ns-symb ns-form-node)]
(when-not (modules/ignored-namespace? config ns-symb)
(when-let [current-module (modules/module ns-symb)]
(let [required-namespace-symb-nodes (-> ns-form-node
ns-form-node->require-node
require-node->namespace-symb-nodes)]
(doseq [node required-namespace-symb-nodes
:when (not (contains? (hooks.common/ignored-linters node) :metabase/modules))
:let [required-namespace (hooks/sexpr node)
error (modules/usage-error config current-module required-namespace)]
:when error]
(hooks/reg-finding! (assoc (meta node)
:message error
:type :metabase/modules))))))))
(defn- lint-namespace-name [ns-form-node]
(when-let [ns-symb-node (ns-form-node->ns-symb-node ns-form-node)]
(when-not (contains? (hooks.common/ignored-linters ns-symb-node) :metabase/namespace-name)
(let [parts (str/split (str (hooks/sexpr ns-symb-node)) #"\.")]
(when (and (<= (count parts) 2)
(#{"metabase" "metabase-enterprise"} (first parts))
;; exclude test namespaces for now
(not (str/ends-with? (last parts) "test")))
(hooks/reg-finding! (assoc (meta ns-symb-node)
:message "Metabase namespaces should have the form metabase[-enterprise].<module>.* [:metabase/namespace-name]"
:type :metabase/namespace-name)))))))
(defn lint-ns [x]
(doto (:node x)
lint-require-shapes
lint-requires-on-new-lines
(lint-modules (modules/config x))
lint-namespace-name)
x)
(comment
(lint-ns
{:node (hooks/parse-string
(pr-str
'(ns hooks.clojure.core.ns
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.common]
[hooks.common.modules :as modules]))))}))

View File

@@ -0,0 +1,75 @@
(ns hooks.clojure.core.require
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.common.modules :as modules]))
(defn- lint* [node current-ns config required-namespaces]
{:pre [(map? node)
(simple-symbol? current-ns)
(map? config)
(sequential? required-namespaces)
(every? simple-symbol? required-namespaces)]}
(when-not (modules/ignored-namespace? config current-ns)
;; ignore namespaces outside of the module system
(when-let [current-module (modules/module current-ns)]
(doseq [required-namespace required-namespaces]
;; ignore namespaces outside of the module system.
(when (modules/module required-namespace)
(when-let [error (modules/usage-error config current-module required-namespace)]
(hooks/reg-finding! (assoc (meta node)
:message error
:type :metabase/modules))))))))
(defn- unwrap-require [node]
(case (hooks/tag node)
;; some.namespace of some.namespace/some-var
:token
(let [sexpr (hooks/sexpr node)]
(if (qualified-symbol? sexpr)
(symbol (namespace sexpr))
sexpr))
;; (quote some.namespace)
:list
(let [[x y] (:children node)]
(when (and (hooks/token-node? x)
(= (hooks/sexpr x) 'quote))
(recur y)))
;; 'some.namespace
:quote
(recur (first (:children node)))
;; something like [some.namespace :as whatever]
:vector
(recur (first (:children node)))))
(comment
(unwrap-require (-> "(requiring-resolve 'metabase.notification.payload.execute/execute-dashboard)"
hooks/parse-string
:children
second)))
(defn- lint-require* [node current-ns config]
(let [[_require & args] (:children node)
required-namespaces (->> (keep unwrap-require args)
;; `require` runs through `cc/load-libs` which allows
;; #{:as :reload :reload-all :require :use :verbose :refer :as-alias}
;; as args. If you use a REPL tool that applies clj-kondo linting (e.g., Clojure MCP)
;; you may wish to `:reload` or `:reload-all` a namespace. So we shouldn't assume all
;; args are keywords:
(remove keyword?))]
(lint* node current-ns config required-namespaces)))
(defn- lint-requiring-resolve* [node current-ns config]
(let [[_requiring-resolve symb-node] (:children node)
required-namespace (unwrap-require symb-node)]
(lint* node current-ns config [required-namespace])))
(defn lint-require [x]
(lint-require* (:node x) (:ns x) (modules/config x))
x)
(defn lint-requiring-resolve [x]
(lint-requiring-resolve* (:node x) (:ns x) (modules/config x))
x)

View File

@@ -71,11 +71,7 @@
:type :metabase/i-like-making-cams-eyes-bleed-with-horrifically-long-tests)))))))
(defn- ignore? [node error-type]
(when-let [ignores (some-> node meta :clj-kondo/ignore hooks/sexpr)]
(when-let [ignores (cond
(coll? ignores) (set ignores)
(keyword? ignores) #{ignores})]
(contains? ignores error-type))))
(contains? (hooks.common/ignored-linters node) error-type))
(defn deftest-check-no-driver-keywords [node {:keys [drivers], :as _config}]
;; fail fast after we see the first error, where we see one hardcoded driver name there are likely several more and we

View File

@@ -1,7 +1,8 @@
(ns hooks.common
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.pprint]))
[clojure.pprint]
[clojure.set :as set]))
(defn with-macro-meta
"When introducing internal nodes (let, defn, etc) it is important to provide a meta of an existing token
@@ -9,6 +10,78 @@
[new-node hook-node]
(with-meta new-node (meta (first (:children hook-node)))))
;;; Kondo stores information about ignored linters as rewrite-clj forms matching how they are specified in the code, so
;;; either
;;;
;;; <vector-node [<token-node :discouraged-namespace>]>
;;;
;;; or
;;;
;;; <token-node :discouraged-namespace>
;;;
;;; these are stored in
;;;
;;; (-> node meta :clj-kondo/ignore :linters).
;;;
;;; These are not a convenient shape(s) to work with, so the next few functions abstract that shape out and work with a
;;; set of keywords like
;;;
;;; #{:discouraged-namespace}
;;;
;;; instead.
(defn- unwrap-ignored-linters [linters]
(cond
(or (hooks/vector-node? linters)
(hooks/list-node? linters))
(into #{}
(map hooks/sexpr)
(:children linters))
(hooks/keyword-node? linters)
#{(hooks/sexpr linters)}
(and (set? linters)
(every? keyword? linters))
linters
(and (sequential? linters)
(every? keyword? linters))
(into #{} linters)
(keyword? linters)
#{linters}))
(defn- wrap-ignored-linters [linters]
(hooks/vector-node (mapv hooks/keyword-node linters)))
(defn ignored-linters
"Return a set of keywords all ignored linters associated with a node by looking at its metadata."
[node]
(or (some-> node meta :clj-kondo/ignore :linters unwrap-ignored-linters)
;; deal with the old pre-2024.09 shape mentioned in https://github.com/clj-kondo/clj-kondo/issues/2414
(some-> node :meta first hooks/sexpr :clj-kondo/ignore unwrap-ignored-linters)))
(defn update-ignored-linters
"Update the `:clj-kondo/ignore` linters in `node`'s metadata. `linters` should be a set of keywords."
[node f & args]
(letfn [(apply-f [linters]
(apply f linters args))
(update-linters [linters]
(-> (or (unwrap-ignored-linters linters)
#{})
apply-f
wrap-ignored-linters))]
(vary-meta node update-in [:clj-kondo/ignore :linters] update-linters)))
(defn merge-ignored-linters
"Merge the ignored linters from `source-nodes` into `node`. You can use this to propagate
ignored linters from parent nodes to child nodes."
[node & source-nodes]
(if-let [linters (not-empty (transduce (map ignored-linters) set/union #{} source-nodes))]
(update-ignored-linters node set/union linters)
node))
;;; This stuff is to help debug hooks. Trace a function and it will pretty-print the before & after sexprs.
;;;
;;; (hooks.common/trace #'calculate-bird-scarcity)
@@ -48,9 +121,9 @@
[{{[_ & args] :children, :as node} :node}]
(let [node* (-> (hooks/list-node
(list*
(with-meta (hooks/token-node 'do) {:clj-kondo/ignore [:redundant-do]})
(update-ignored-linters (hooks/token-node 'do) conj :redundant-do)
(for [arg args]
(vary-meta arg update :clj-kondo/ignore #(conj (vec %) :unused-value)))))
(update-ignored-linters arg conj :unused-value))))
(with-meta (meta node)))]
{:node node*}))
@@ -373,6 +446,28 @@
body))]
{:node node*}))
(defn with-used-first-two-args
"For macros like
(with-limit-and-offset limit offset
...)
=>
(let [_123 limit
[_456 offset]
...)
where the first arg should be linted and appear to be used."
[{{[_ x y & body] :children} :node}]
(let [node* (hooks/list-node
(list*
(hooks/token-node 'let)
(hooks/vector-node [(hooks/token-node (gensym "_")) x
(hooks/token-node (gensym "_")) y])
body))]
{:node node*}))
(defn with-vec-first-binding
"For macros like
@@ -439,9 +534,4 @@
metadata to a node to suppress LSP warnings."
[node]
(letfn [(update-ignores [existing-ignores]
(hooks/vector-node
(cons
(hooks/keyword-node :clojure-lsp/unused-public-var)
(:children existing-ignores))))]
(vary-meta node update :clj-kondo/ignore update-ignores)))
(update-ignored-linters node conj :clojure-lsp/unused-public-var))

View File

@@ -0,0 +1,81 @@
(ns hooks.common.modules)
(defn ignored-namespace? [config ns-symb]
(some
(fn [pattern-str]
(re-find (re-pattern pattern-str) (str ns-symb)))
(:ignored-namespace-patterns config)))
(defn config [{:keys [config], :as _hook-input}]
(merge (get-in config [:linters :metabase/modules])
(select-keys config [:metabase/modules])))
(defn module
"E.g.
(module 'metabase.qp.middleware.wow) => 'qp
(module 'metabase-enterprise.whatever.core) => enterprise/whatever"
[ns-symb]
{:pre [(simple-symbol? ns-symb)]}
(or (some->> (re-find #"^metabase-enterprise\.([^.]+)" (str ns-symb))
second
(symbol "enterprise"))
(some-> (re-find #"^metabase\.([^.]+)" (str ns-symb))
second
symbol)))
(defn module-api-namespaces
"Set of API namespace symbols for a given module. `:any` means you can use anything, there are no API namespaces for
this module (yet). If unspecified, the default is just the `<module>.core` namespace."
[config module]
(let [module-config (get-in config [:metabase/modules module :api])]
(cond
(= module-config :any)
nil
(set? module-config)
module-config
:else
(let [ns-prefix (if (= (namespace module) "enterprise")
(str "metabase-enterprise." (name module))
(name module))]
#{(symbol (str ns-prefix ".api"))
(symbol (str ns-prefix ".core"))
(symbol (str ns-prefix ".init"))}))))
(defn allowed-modules
"Set of namespace symbols that `module` is allowed to use. `:any` means it's allowed to use anything."
[config module]
(get-in config [:metabase/modules module :uses]))
(defn allowed-module? [config module required-module]
(let [allowed-modules (allowed-modules config module)]
(or (= allowed-modules :any)
(contains? (set allowed-modules) required-module))))
(defn allowed-module-namespace? [config ns-symb]
(let [module (module ns-symb)
module-api-namespaces (module-api-namespaces config module)]
(or (empty? module-api-namespaces)
(contains? module-api-namespaces ns-symb))))
(defn usage-error
"Find usage errors when a `required-namespace` is required in the `current-module`. Returns a string describing the
error type if there is one, otherwise `nil` if there are no errors."
[config current-module required-namespace]
;; ignore stuff not in a module i.e. non-Metabase stuff.
(when-let [required-module (module required-namespace)]
(when-not (= current-module required-module)
(cond
(not (allowed-module? config current-module required-module))
(format "Module %s should not be used in the %s module. [:metabase/modules %s :uses]"
required-module
current-module
current-module)
(not (allowed-module-namespace? config required-namespace))
(format "Namespace %s is not an allowed external API namespace for the %s module. [:metabase/modules %s :api]"
required-namespace
required-module
required-module)))))

View File

@@ -0,0 +1,26 @@
(ns hooks.malli.error
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.common]))
(defn humanize [x]
(letfn [(check-node [node]
(when (hooks/list-node? node)
(let [[_ child] (:children node)]
(when (hooks/list-node? child)
(let [[symb] (:children child)]
(when-let [qualified-symb (hooks.common/node->qualified-symbol symb)]
(when ('#{malli.core/validate metabase.util.malli.registry/validate}
qualified-symb)
(hooks/reg-finding! (assoc (meta symb)
:message "Use malli.error/humanize with explain, NOT with validate. [:metabase/check-me-humanize]"
:type :metabase/check-me-humanize)))))))))]
(check-node (:node x))
x))
(comment
(humanize {:node (hooks/parse-string
(pr-str '(malli.error/humanize
(malli.core/validate
metabase.sync.sync-metadata.dbms-version/DBMSVersion
metabase.driver.druid.sync-test/dbms-version))))}))

View File

@@ -1,28 +0,0 @@
(ns hooks.metabase.api.automagic-dashboards-test
(:require [clj-kondo.hooks-api :as hooks]))
(comment
(def input (hooks/parse-string
"(with-indexed-model! [{:keys [model model-index model-index-value]}
{:query :some-query}]
:foo :bar :body)"))
(println (hooks/sexpr input))
(let [f (load-file ".clj-kondo/hooks/metabase/api/automagic_dashboards_test.clj")]
(f {:node input})))
(defn with-indexed-model!
[{node :node}]
(let [[_macro-call binding-and-query-info & body] (:children node)
[binding query-info] (:children binding-and-query-info)
node* (hooks/list-node
[(hooks/token-node 'do-with-indexed-model!)
query-info
(hooks/list-node
(list* (hooks/token-node 'fn)
(hooks/vector-node [binding])
body))])]
#_(println (hooks/sexpr node*))
{:node node*}))

View File

@@ -1,32 +0,0 @@
(ns hooks.metabase.api.common
(:require
[clj-kondo.hooks-api :as api]
[clojure.string :as str]
[hooks.common]))
(defn route-fn-name
"route fn hook"
[method route]
(let [route (if (vector? route) (first route) route)]
(-> (str (name method) route)
(str/replace #"/" "_")
symbol)))
(defn defendpoint
[arg]
(letfn [(update-defendpoint [node]
(let [[_defendpoint method route & body] (:children node)]
(-> (api/list-node
(list
(api/token-node 'do)
(-> (api/token-node (symbol "compojure.core" (str (api/sexpr method))))
(with-meta (meta method)))
(api/list-node
(list*
(api/token-node 'clojure.core/defn)
(-> (api/token-node (route-fn-name (api/sexpr method) (api/sexpr route)))
(with-meta (meta route)))
body))))
(with-meta (meta node))
hooks.common/add-lsp-ignore-unused-public-var-metadata)))]
(update arg :node update-defendpoint)))

View File

@@ -0,0 +1,56 @@
(ns hooks.metabase.api.macros
(:require
[clj-kondo.hooks-api :as api]
[hooks.common]))
(defn defendpoint
[arg]
(letfn [(update-defendpoint [node]
(let [[defendpoint method route & more] (:children node)
[result-schema & more] (if (= (api/sexpr (first more)) :-)
(drop 1 more)
(cons nil more))
[_docstring & more] (if (api/string-node? (first more))
more
(cons nil more))
[metadata & more] (if (api/map-node? (first more))
more
(cons nil more))
[params & body] more
[bindings schemas] (when (api/vector-node? params)
(loop [bindings [], schemas [], [x y & more] (:children params)]
(cond
(not x)
[bindings schemas]
(= (api/sexpr x) :-)
(recur bindings (conj schemas y) more)
:else
(recur (conj bindings x) schemas (cons y more)))))]
(-> (api/list-node
(list
(api/token-node 'do)
defendpoint
method
route
(api/list-node
(list*
(api/token-node 'do)
(filter some? (list* metadata result-schema schemas))))
(api/list-node
(list*
(api/token-node `let)
(api/vector-node (into []
cat
[(mapcat (fn [a-binding]
[a-binding (api/map-node {})])
(take 4 bindings))
(mapcat (fn [a-binding]
[a-binding (api/list-node (list
(api/token-node 'clojure.core/constantly)
(api/token-node 'nil)))])
(drop 4 bindings))]))
body))))
(with-meta (meta node)))))]
(update arg :node update-defendpoint)))

View File

@@ -1,17 +0,0 @@
(ns hooks.metabase.api.search-test
(:require [clj-kondo.hooks-api :as hooks]))
(defn with-search-items-in-collection [{{[_ & args] :children, :as node} :node}]
;; (println \newline)
;; (clojure.pprint/pprint (hooks/sexpr node))
(let [[created-items-sym search-string & body] args
node* (hooks/list-node
(list*
(hooks/token-node 'let)
(hooks/vector-node
[created-items-sym (hooks/token-node 'nil)])
search-string
body))]
;; (println '=>)
;; (clojure.pprint/pprint (hooks/sexpr node*))
{:node node*}))

View File

@@ -0,0 +1,14 @@
(ns hooks.metabase.app-db.schema-migrations-test.impl
(:require [clj-kondo.hooks-api :as hooks]))
(defn test-migrations
[{{[_ migration-range {[binding] :children} & body] :children} :node}]
(let [node* (hooks/list-node
(list*
(hooks/token-node `let)
(hooks/vector-node
[binding (hooks/list-node (list (hooks/token-node `fn)
(hooks/vector-node [(hooks/token-node '&) (hooks/token-node '_args)])))])
migration-range
body))]
{:node node*}))

View File

@@ -8,19 +8,18 @@
[{:keys [node]}]
(let [[_ helper-name description argvec & body] (:children node)
helper-fn-name (symbol (str (hooks/sexpr helper-name) "*"))]
{:node (hooks/list-node
(list (hooks/token-node 'do)
(hooks/list-node
(list (hooks/token-node 'defn)
(hooks/token-node helper-fn-name)
description
argvec
(hooks/list-node body)))
(hooks/list-node
(list (hooks/token-node 'def)
helper-name
description
(hooks/list-node
(into [(hooks/token-node 'fn)
argvec]
body))))))}))
{:node (-> (hooks/list-node
(list (hooks/token-node 'do)
(hooks/list-node
(list (hooks/token-node 'defn)
(hooks/token-node helper-fn-name)
description
argvec
(hooks/list-node body)))
(hooks/list-node
(list (hooks/token-node 'defn)
helper-name
description
argvec
(hooks/list-node body)))))
(with-meta (meta node)))}))

View File

@@ -1,14 +0,0 @@
(ns hooks.metabase.db.schema-migrations-test.impl
(:require [clj-kondo.hooks-api :as hooks]))
(defn test-migrations
[{{[_ migration-range {[binding] :children} & body] :children} :node}]
(let [node* (hooks/list-node
(list*
(hooks/token-node `let)
(hooks/vector-node
[binding (hooks/list-node (list (hooks/token-node `fn)
(hooks/vector-node [(hooks/token-node '&) (hooks/token-node '_args)])))])
migration-range
body))]
{:node node*}))

View File

@@ -0,0 +1,18 @@
(ns hooks.metabase.driver.mongo-test
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.common]))
(defn with-describe-table-for-sample
"Forward bindings for results of functions used in mongo's describe-table implementation."
[{{[_ _ & body] :children} :node}]
(let [node* (hooks/list-node
(list*
(hooks/token-node 'let)
(hooks/vector-node
[(hooks/token-node 'dbfields) (hooks/token-node '(delay nil))
(hooks/token-node 'ftree) (hooks/token-node '(delay nil))
(hooks/token-node 'nested-fields) (hooks/token-node '(delay nil))])
body))]
;; Avoid warnings when not all from the dbfields, ftree and nested-fields are used.
{:node (hooks.common/update-ignored-linters node* conj :unused-binding)}))

View File

@@ -0,0 +1,19 @@
(ns hooks.metabase.model-persistence.test-util
(:require
[clj-kondo.hooks-api :as hooks]))
(defn with-persistence-enabled! [x]
(letfn [(update-node [node]
(let [[_symb bindings & body] (:children node)
[fn-binding] (:children bindings)]
(-> (hooks/list-node
(list*
(hooks/token-node `let)
(hooks/vector-node
[fn-binding (hooks/list-node
(list
(hooks/token-node `fn)
(hooks/vector-node [])))])
body))
(with-meta (meta node)))))]
(update x :node update-node)))

View File

@@ -1,266 +0,0 @@
(ns hooks.metabase.models.setting
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.common :as common]))
(def ^:private ignored-implicit-export?
'#{active-users-count
admin-email
analytics-uuid
anon-tracking-enabled
api-key
attachment-table-row-limit
audit-max-retention-days
bcc-enabled?
breakout-bin-width
check-for-updates
cloud-gateway-ips
config-from-file-sync-databases
custom-homepage
custom-homepage-dashboard
database-enable-actions
deprecation-notice-version
dismissed-custom-dashboard-toast
email-configured?
email-from-address
email-from-name
email-reply-to
email-smtp-host
email-smtp-password
email-smtp-port
email-smtp-security
email-smtp-username
embedding-app-origin
embedding-secret-key
enable-password-login
enable-public-sharing
enable-query-caching
engines
enum-cardinality-threshold
follow-up-email-sent
google-auth-auto-create-accounts-domain
google-auth-client-id
google-auth-configured
google-auth-enabled
has-sample-database?
has-user-setup
help-link
help-link-custom-destination
instance-creation
is-hosted?
is-metabot-enabled
jdbc-data-warehouse-max-connection-pool-size
jdbc-data-warehouse-unreturned-connection-timeout-seconds
jwt-attribute-email
jwt-attribute-firstname
jwt-attribute-groups
jwt-attribute-lastname
jwt-configured
jwt-enabled
jwt-group-mappings
jwt-group-sync
jwt-identity-provider-uri
jwt-user-provisioning-enabled?
jwt-shared-secret
last-acknowledged-version
last-used-native-database-id
ldap-attribute-email
ldap-attribute-firstname
ldap-attribute-lastname
ldap-bind-dn
ldap-configured?
ldap-enabled
ldap-group-base
ldap-group-mappings
ldap-group-membership-filter
ldap-group-sync
ldap-host
ldap-password
ldap-port
ldap-user-provisioning-enabled?
ldap-security
ldap-sync-user-attributes
ldap-sync-user-attributes-blacklist
ldap-user-base
ldap-user-filter
load-analytics-content
map-tile-server-url
metabot-default-embedding-model
metabot-feedback-url
metabot-get-prompt-templates-url
metabot-prompt-generator-token-limit
multi-setting-read-only
notebook-native-preview-shown
notebook-native-preview-sidebar-width
notification-link-base-url
num-metabot-choices
openai-api-key
openai-available-models
openai-model
openai-organization
other-sso-enabled?
password-complexity
persist-models-enabled
persisted-model-refresh-cron-schedule
premium-embedding-token
prometheus-server-port
query-caching-max-kb
query-caching-max-ttl
query-caching-min-ttl
query-caching-ttl-ratio
redirect-all-requests-to-https
reset-token-ttl-hours
retired-setting
retry-initial-interval
retry-max-attempts
retry-max-interval-millis
retry-multiplier
retry-randomization-factor
saml-application-name
saml-attribute-email
saml-attribute-firstname
saml-attribute-group
saml-attribute-lastname
saml-configured
saml-enabled
saml-group-mappings
saml-group-sync
saml-identity-provider-certificate
saml-identity-provider-issuer
saml-identity-provider-uri
saml-keystore-alias
saml-keystore-password
saml-keystore-path
saml-user-provisioning-enabled?
send-email-on-first-login-from-new-device
send-new-sso-user-admin-email?
session-cookie-samesite
session-cookies
session-timeout
setup-token
show-database-syncing-modal
show-metabase-links
site-url
site-uuid
site-uuid-for-premium-features-token-checks
site-uuid-for-unsubscribing-url
site-uuid-for-version-info-fetching
slack-app-token
slack-cached-channels-and-usernames
slack-channels-and-usernames-last-updated
slack-files-channel
slack-token
slack-token-valid?
snowplow-available
snowplow-enabled
snowplow-url
sql-jdbc-fetch-size
ssh-heartbeat-interval-sec
ssl-certificate-public-key
startup-time-millis
token-features
token-status
toucan-name
trial-banner-dismissal-timestamp
uncached-setting
user-visibility
version
version-info
version-info-last-checked})
(defn- defsetting-lint [node setting-name docstring options-list]
(let [anon-binding (common/with-macro-meta (hooks/token-node '_) node)
;; (defn my-setting [] ...)
getter-node (-> (list
(hooks/token-node 'defn)
setting-name
(hooks/string-node "Docstring.")
(hooks/vector-node []))
hooks/list-node
(with-meta (meta node)))
;; (defn my-setting! [_x] ...)
setter-node (-> (list
(hooks/token-node 'defn)
(with-meta
(hooks/token-node (symbol (str (hooks/sexpr setting-name) \!)))
(meta setting-name))
(hooks/string-node "Docstring.")
(hooks/vector-node [(hooks/token-node '_value-or-nil)]))
hooks/list-node
(with-meta (meta node))
common/add-lsp-ignore-unused-public-var-metadata)]
(when (nil? (second (drop-while (comp not #{[:k :export?]} first) options-list)))
(when-not (contains? ignored-implicit-export? (:value setting-name))
(hooks/reg-finding! (assoc (meta node)
:message "Setting definition must provide an explicit value for :export? indicating whether the setting should be exported or not with serialization."
:type :metabase/defsetting-must-specify-export))))
{:node (-> (list
(hooks/token-node 'let)
;; include description and the options map so they can get validated as well.
(hooks/vector-node
[anon-binding docstring
anon-binding (hooks/map-node options-list)])
getter-node
setter-node)
hooks/list-node
(with-meta (meta node)))}))
(defn defsetting
"Rewrite a [[metabase.models.defsetting]] form like
(defsetting my-setting \"Description\" :type :boolean)
as
(let [_ \"Description\"
_ {:type :boolean}]
(defn my-setting \"Docstring.\" [])
(defn my-setting! \"Docstring.\" [_value-or-nil]))
for linting purposes."
[{:keys [node]}]
(let [[setting-name docstring & options] (rest (:children node))]
(defsetting-lint node setting-name docstring options)))
(defn define-multi-setting
"Rewrite a [[metabase.models.define-multi-setting]] form like
(defsetting my-setting \"Description\" :key :type :boolean)
as
(let [_ \"Description\"
_ {:type :boolean, :multi-thunk :key}]
(defn my-setting \"Docstring.\" [])
(defn my-setting! \"Docstring.\" [_value-or-nil]))
for linting purposes."
[{:keys [node]}]
(let [[setting-name docstring thunk & options] (rest (:children node))]
(defsetting-lint node setting-name docstring (concat options [(hooks/token-node :multi-thunk) thunk]))))
(comment
(defn- defsetting* [form]
(hooks/sexpr
(:node
(defsetting
{:node
(hooks/parse-string
(with-out-str
#_{:clj-kondo/ignore [:unresolved-namespace]}
(clojure.pprint/pprint
form)))}))))
(defn x []
(defsetting*
'(defsetting active-users-count
(deferred-tru "Cached number of active users. Refresh every 5 minutes.")
:visibility :admin
:type :integer
:default 0
:getter (fn []
(if-not ((requiring-resolve 'metabase.db/db-is-set-up?))
0
(cached-active-users-count)))))))

View File

@@ -0,0 +1,65 @@
(ns hooks.metabase.premium-features.defenterprise
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.common]))
(defn defenterprise [{node :node}]
(let [[_defenterprise fn-name & args] (:children node)
[docstring & args] (if (hooks/string-node? (first args))
args
(cons nil args))
[_enterprise-namespace & args] (if (hooks/token-node? (first args))
args
(cons nil args))
[options fn-tail] (loop [options (hooks/map-node []), [x y & more :as args] args]
(if (hooks/keyword-node? x)
(recur (update options :children concat [x y]) more)
[options args]))]
{:node (hooks/list-node
(list
(hooks/token-node 'let)
(hooks/vector-node
[(hooks/token-node '_options) options])
(-> (hooks/list-node
(concat
(filter some?
(list (hooks/token-node 'defn)
fn-name
docstring))
fn-tail))
(with-meta (meta node))
hooks.common/add-lsp-ignore-unused-public-var-metadata)))}))
(comment
(defn- defenterprise* [form]
(hooks/sexpr
(:node
(defenterprise
{:node
(hooks/parse-string
(with-out-str
(clojure.pprint/pprint
form)))}))))
(defn- x []
(defenterprise*
'(defenterprise score-result
"Scoring implementation that adds score for items in official collections."
:feature :any
:fallback score-result-fallback
[result]
(conj (scoring/weights-and-scores result)
{:weight 2
:score (official-collection-score result)
:name "official collection score"}
{:weight 2
:score (verified-score result)
:name "verified"}))))
(defn- y []
(defenterprise*
'(defenterprise score-result
"Score a result, returning a collection of maps with score and weight."
metabase-enterprise.search.scoring
[result]
(weights-and-scores result)))))

View File

@@ -1,65 +0,0 @@
(ns hooks.metabase.public-settings.premium-features
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.common]))
(defn defenterprise [{node :node}]
(let [[_defenterprise fn-name & args] (:children node)
[docstring & args] (if (hooks/string-node? (first args))
args
(cons nil args))
[_enterprise-namespace & args] (if (hooks/token-node? (first args))
args
(cons nil args))
[options fn-tail] (loop [options (hooks/map-node []), [x y & more :as args] args]
(if (hooks/keyword-node? x)
(recur (update options :children concat [x y]) more)
[options args]))]
{:node (hooks/list-node
(list
(hooks/token-node 'let)
(hooks/vector-node
[(hooks/token-node '_options) options])
(-> (hooks/list-node
(concat
(filter some?
(list (hooks/token-node 'defn)
fn-name
docstring))
fn-tail))
(with-meta (meta node))
hooks.common/add-lsp-ignore-unused-public-var-metadata)))}))
(comment
(defn- defenterprise* [form]
(hooks/sexpr
(:node
(defenterprise
{:node
(hooks/parse-string
(with-out-str
(clojure.pprint/pprint
form)))}))))
(defn- x []
(defenterprise*
'(defenterprise score-result
"Scoring implementation that adds score for items in official collections."
:feature :any
:fallback score-result-fallback
[result]
(conj (scoring/weights-and-scores result)
{:weight 2
:score (official-collection-score result)
:name "official collection score"}
{:weight 2
:score (verified-score result)
:name "verified"}))))
(defn- y []
(defenterprise*
'(defenterprise score-result
"Score a result, returning a collection of maps with score and weight."
metabase-enterprise.search.scoring
[result]
(weights-and-scores result)))))

View File

@@ -0,0 +1,17 @@
(ns hooks.metabase.search.api-test
(:require [clj-kondo.hooks-api :as hooks]))
(defn with-search-items-in-collection [{{[_ & args] :children, :as node} :node}]
;; (println \newline)
;; (clojure.pprint/pprint (hooks/sexpr node))
(let [[created-items-sym search-string & body] args
node* (hooks/list-node
(list*
(hooks/token-node 'let)
(hooks/vector-node
[created-items-sym (hooks/token-node 'nil)])
search-string
body))]
;; (println '=>)
;; (clojure.pprint/pprint (hooks/sexpr node*))
{:node node*}))

View File

@@ -0,0 +1,310 @@
(ns hooks.metabase.settings.models.setting
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.common :as common]))
(defn lint-defsetting-namespace [node context]
(when-not (re-matches #"^metabase(?:-enterprise)?\.[^\.]+\.settings$" (name (:ns context)))
(hooks/reg-finding! (assoc (meta node)
:message "All defsettings should live in metabase[-enterprise].<module>.settings namespaces"
:type :metabase/defsetting-namespace))))
;;; TODO -- move this into a Kondo config file in `.clj-kondo/config/`
(def ^:private ignored-implicit-export?
'#{active-users-count
admin-email
analytics-uuid
anon-tracking-enabled
api-key
attachment-table-row-limit
audit-max-retention-days
bcc-enabled?
breakout-bin-width
check-for-updates
cloud-gateway-ips
config-from-file-sync-databases
custom-homepage
custom-homepage-dashboard
database-enable-actions
deprecation-notice-version
dismissed-custom-dashboard-toast
email-configured?
email-from-address
email-from-name
email-reply-to
email-smtp-host
email-smtp-password
email-smtp-port
email-smtp-security
email-smtp-username
embedding-app-origin
embedding-secret-key
enable-password-login
enable-public-sharing
enable-query-caching
engines
enum-cardinality-threshold
follow-up-email-sent
google-auth-auto-create-accounts-domain
google-auth-client-id
google-auth-configured
google-auth-enabled
has-sample-database?
has-user-setup
help-link
help-link-custom-destination
instance-creation
is-hosted?
is-metabot-enabled
jdbc-data-warehouse-max-connection-pool-size
jdbc-data-warehouse-unreturned-connection-timeout-seconds
jwt-attribute-email
jwt-attribute-firstname
jwt-attribute-groups
jwt-attribute-lastname
jwt-configured
jwt-enabled
jwt-group-mappings
jwt-group-sync
jwt-identity-provider-uri
jwt-user-provisioning-enabled?
jwt-shared-secret
last-acknowledged-version
last-used-native-database-id
ldap-attribute-email
ldap-attribute-firstname
ldap-attribute-lastname
ldap-bind-dn
ldap-configured?
ldap-enabled
ldap-group-base
ldap-group-mappings
ldap-group-membership-filter
ldap-group-sync
ldap-host
ldap-password
ldap-port
ldap-user-provisioning-enabled?
ldap-security
ldap-sync-user-attributes
ldap-sync-user-attributes-blacklist
ldap-user-base
ldap-user-filter
load-analytics-content
map-tile-server-url
metabot-default-embedding-model
metabot-feedback-url
metabot-get-prompt-templates-url
metabot-prompt-generator-token-limit
multi-setting-read-only
notebook-native-preview-shown
notebook-native-preview-sidebar-width
notification-link-base-url
num-metabot-choices
openai-api-key
openai-available-models
openai-model
openai-organization
other-sso-enabled?
password-complexity
persist-models-enabled
persisted-model-refresh-cron-schedule
premium-embedding-token
prometheus-server-port
query-caching-max-kb
query-caching-max-ttl
query-caching-min-ttl
query-caching-ttl-ratio
redirect-all-requests-to-https
reset-token-ttl-hours
retired-setting
retry-initial-interval
retry-max-attempts
retry-max-interval-millis
retry-multiplier
retry-randomization-factor
saml-application-name
saml-attribute-email
saml-attribute-firstname
saml-attribute-group
saml-attribute-lastname
saml-configured
saml-enabled
saml-group-mappings
saml-group-sync
saml-identity-provider-certificate
saml-identity-provider-issuer
saml-identity-provider-uri
saml-keystore-alias
saml-keystore-password
saml-keystore-path
saml-user-provisioning-enabled?
sdk-iframe-embed-setup-settings
send-email-on-first-login-from-new-device
send-new-sso-user-admin-email?
session-cookie-samesite
session-cookies
session-timeout
setup-token
show-database-syncing-modal
show-metabase-links
site-url
site-uuid
site-uuid-for-premium-features-token-checks
site-uuid-for-unsubscribing-url
site-uuid-for-version-info-fetching
slack-app-token
slack-cached-channels-and-usernames
slack-channels-and-usernames-last-updated
slack-files-channel
slack-token
slack-token-valid?
snowplow-available
snowplow-enabled
snowplow-url
sql-jdbc-fetch-size
ssh-heartbeat-interval-sec
ssl-certificate-public-key
startup-time-millis
token-features
token-status
toucan-name
trial-banner-dismissal-timestamp
uncached-setting
user-visibility
version
version-info
version-info-last-checked})
(defn- lint-defsetting-export [node]
(let [[_defsetting setting-name _docstring & options] (:children node)]
(when (nil? (second (drop-while (comp not #{[:k :export?]} first) options)))
(when-not (contains? ignored-implicit-export? (:value setting-name))
(hooks/reg-finding! (assoc (meta node)
:message "Setting definition must provide an explicit value for :export? indicating whether the setting should be exported or not with serialization."
:type :metabase/defsetting-must-specify-export))))))
(defn- defsetting-replacement-node [node]
(let [[_defsetting setting-name docstring & options-list] (:children node)
anon-binding (common/with-macro-meta (hooks/token-node '_) node)
;; (defn my-setting [] ...)
getter-node (-> (list
(hooks/token-node 'defn)
setting-name
(hooks/string-node "Docstring.")
(hooks/vector-node []))
hooks/list-node
(with-meta (meta node)))
;; (defn my-setting! [_x] ...)
setter-node (-> (list
(hooks/token-node 'defn)
(with-meta
(hooks/token-node (symbol (str (hooks/sexpr setting-name) \!)))
(meta setting-name))
(hooks/string-node "Docstring.")
(hooks/vector-node [(hooks/token-node '_value-or-nil)]))
hooks/list-node
(with-meta (meta node))
common/add-lsp-ignore-unused-public-var-metadata)]
(-> (hooks/list-node
(list
(hooks/token-node 'let)
;; include description and the options map so they can get validated as well.
(hooks/vector-node
[anon-binding docstring
anon-binding (hooks/map-node options-list)])
(hooks/reg-keyword! (-> (hooks/keyword-node (keyword (hooks/sexpr setting-name)))
(with-meta (meta setting-name)))
'metabase.settings.models.setting/defsetting)
getter-node
setter-node))
(with-meta (meta node)))))
(defn defsetting
"Rewrite a [[metabase.models.defsetting]] form like
(defsetting my-setting \"Description\" :type :boolean)
as
(let [_ \"Description\"
_ {:type :boolean}]
(defn my-setting \"Docstring.\" [])
(defn my-setting! \"Docstring.\" [_value-or-nil]))
for linting purposes."
[{:keys [node], :as context}]
(lint-defsetting-namespace node context)
(lint-defsetting-export node)
(update context :node defsetting-replacement-node))
(defn define-multi-setting-replacement-node [node]
(let [[defsetting setting-name docstring thunk & options] (:children node)]
(-> (hooks/list-node
(list*
defsetting
setting-name
docstring
(hooks/token-node :multi-thunk) thunk
options))
(with-meta (meta node))
defsetting-replacement-node)))
(defn define-multi-setting
"Rewrite a [[metabase.models.define-multi-setting]] form like
(defsetting my-setting \"Description\" :key :type :boolean)
as
(let [_ \"Description\"
_ {:type :boolean, :multi-thunk :key}]
(defn my-setting \"Docstring.\" [])
(defn my-setting! \"Docstring.\" [_value-or-nil]))
for linting purposes."
[{:keys [node], :as context}]
(update context :node define-multi-setting-replacement-node))
(defn define-multi-setting-impl
[context]
(letfn [(update-node [node]
(let [[_define-multi-setting-impl setting-name & more] (:children node)]
(-> (hooks/list-node
(list*
(hooks/token-node 'do)
;; For a qualified setting name like `oss-namespace/setting`, then leave the symbol as is, so the
;; usage of that namespace/var gets recorded. Otherwise for an unqualified name convert it to a
;; keyword so we don't get unresolved var errors.
(if (and (hooks/token-node? setting-name)
(qualified-symbol? (hooks/sexpr setting-name)))
setting-name
(-> (hooks/keyword-node (keyword (hooks/sexpr setting-name)))
(with-meta (meta setting-name))))
more))
(with-meta (meta node)))))]
(update context :node update-node)))
(comment
(defn- defsetting* [form]
(hooks/sexpr
(:node
(defsetting
{:node
(hooks/parse-string
(with-out-str
#_{:clj-kondo/ignore [:unresolved-namespace]}
(clojure.pprint/pprint
form)))}))))
(defn x []
(defsetting*
'(defsetting active-users-count
(deferred-tru "Cached number of active users. Refresh every 5 minutes.")
:visibility :admin
:type :integer
:default 0
:getter (fn []
(if-not ((requiring-resolve 'metabase.app-db.core/db-is-set-up?))
0
(cached-active-users-count)))))))

View File

@@ -45,37 +45,35 @@
:unqualified/unknown)))
(defn dataset
[{{[_ dataset & body] :children} :node this-ns :ns}]
(let [noop (constantly nil)
body (case (dataset-type this-ns dataset)
;; non-symbol, qualified symbols, and unqualified symbols from the current namespace/let-bound can all
;; get converted from something like
;;
;; (dataset whatever
;; ...)
;;
;; to
;;
;; (let [_ whatever]
;; ...)
(:non-symbol :qualified :unqualified/local-def)
(list* (hooks/token-node 'let)
(hooks/vector-node [(hooks/token-node '_) dataset])
body)
[{{[_ dataset & body] :children, :as node} :node this-ns :ns}]
(let [node' (case (dataset-type this-ns dataset)
;; non-symbol, qualified symbols, and unqualified symbols from the current namespace/let-bound can all
;; get converted from something like
;;
;; (dataset whatever
;; ...)
;;
;; to
;;
;; (let [_ whatever]
;; ...)
(:non-symbol :qualified :unqualified/local-def)
(hooks/list-node
(list*
(hooks/token-node 'let)
(hooks/vector-node [(hooks/token-node '_) dataset])
body))
;; for ones that came from the dataset defs namespace or ones whose origin is unknown, just ignore them
;; and generate a `print` form:
;;
;; (print ...)
;;
;; (this used to be a `do` form (which makes a lot more semantic sense), but that resulted in warnings
;; about unused values
(:unqualified/from-dataset-defs-namespace :unqualified/unknown)
(list* (hooks/token-node noop)
body))]
{:node (with-meta (hooks/list-node (with-meta body
(meta dataset)))
(meta dataset))}))
;; for ones that came from the dataset defs namespace or ones whose origin is unknown, just ignore them
;; and generate a form like
;;
;; (do ...)
(:unqualified/from-dataset-defs-namespace :unqualified/unknown)
(hooks/list-node
(list*
(hooks/token-node `do)
body)))]
{:node (with-meta node' (meta node))}))
(defn- special-token-node?
"Whether this node is one of the special symbols like `$field`."

View File

@@ -1,11 +1,13 @@
(ns hooks.metabase.test.data.datasets
(:require [clj-kondo.hooks-api :as hooks]
[clojure.set :as set]))
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.set :as set]
[hooks.common]))
(defn- only-core-drivers?
"Whether we're for sure only testing against the 'core' drivers that are also app DB types: `:postgres`, `:mysql`, or
`:h2`. Tests like these are ok to mark `:mb/once` or `:mb/driver-tests` since we always run the full test suite
against app DB drivers anyway."
`:h2`. Tests like these are ok to mark `:mb/driver-tests` since we always run the full test suite against app DB
drivers anyway."
[node]
(let [drivers (hooks/sexpr (second (:children node)))
drivers (cond
@@ -15,14 +17,6 @@
(when drivers
(empty? (set/difference drivers #{:h2 :mysql :postgres})))))
(defn- validate-mb-once [x]
(when (:mb/once (meta (:ns x)))
(hooks/reg-finding!
(assoc (meta (:ns x))
:message (str "You should not use test-driver or test-drivers in a namespace marked ^:mb/once"
" [:metabase/validate-mb-once]")
:type :metabase/validate-mb-once))))
(defn- validate-mb-driver-tests [x]
(when-not (:mb/driver-tests (meta (:ns x)))
(hooks/reg-finding!
@@ -33,7 +27,6 @@
(defn- validate-ns-tags [x]
(when-not (only-core-drivers? (:node x))
(validate-mb-once x)
(validate-mb-driver-tests x)))
(defn test-drivers [x]
@@ -45,7 +38,7 @@
(hooks/token-node 'do)
test-drivers
(-> drivers-expr
(vary-meta update :clj-kondo/ignore #(conj (vec %) :unused-value)))
(hooks.common/update-ignored-linters conj :unused-value))
body))
(with-meta (meta node)))))]
(update x :node update-node)))

View File

@@ -0,0 +1,14 @@
(ns hooks.metabase.test.gentest
(:require
[clj-kondo.hooks-api :as hooks]))
(defn iterate*
"(iterate {:as limit-spec} [s1 val1 & more] body-form body-form...)"
[{{:keys [children] :as node} :node :as orig}]
(let [[token limit-spec bindings & body-nodes] children
node* (-> (hooks/list-node
(list token limit-spec
(hooks/list-node (list* (hooks/token-node 'let) bindings
body-nodes))))
(with-meta (meta node)))]
(assoc orig :node node*)))

View File

@@ -0,0 +1,15 @@
(ns hooks.metabase.test.util.generators.jvm
(:require
[clj-kondo.hooks-api :as hooks]))
(defn with-random-cards
"(with-random-cards <metadata-provider> <integer-count-value> & body-forms)"
[{{:keys [children] :as node} :node :as orig}]
(let [[token num-cards & body-nodes] children
node* (-> (hooks/list-node
(list token num-cards
(hooks/list-node (list* (hooks/token-node 'let)
(hooks/vector-node [(hooks/token-node '&cards) (hooks/list-node ())])
body-nodes))))
(with-meta (meta node)))]
(assoc orig :node node*)))

View File

@@ -15,3 +15,17 @@
actual-arg-count)
:type :format))))))
x)
(defn case-enum
"Lint `(case-enum ...)` like `(condp = ...)`."
[x]
(letfn [(update-node [node]
(let [[_case-enum x & more] (:children node)]
(-> (api/list-node
(list*
(api/token-node 'clojure.core/condp)
(api/token-node 'clojure.core/=)
x
more))
(with-meta (meta node)))))]
(update x :node update-node)))

View File

@@ -0,0 +1,74 @@
(ns hooks.metabase.util.i18n
(:require
[clj-kondo.hooks-api :as api]
[clojure.string :as str]
[hooks.common]))
(defn- valid-apostrophes?
"Returns true if `s` contains only doubled quotes (''') or complete placeholder-escaping quotes ('{...}'), false otherwise."
[s]
(loop [chars (seq s)]
(if (empty? chars)
true
(let [c (first chars)]
(if (= c \')
(cond
;; Doubled quotes: skip both
(and (next chars) (= (second chars) \'))
(recur (nthrest chars 2))
;; Placeholder escape. We allow for intentional escaping, like either '{0}` or '{{`, but not 'arbitrary
;; strings' So basically, just require the *next* character to be a `{`, find the next single-quote, and
;; continue on from there.
;;
;; Technically a string like "foo bar's happy but i'm not" is totally fine, but we'll say it's invalid
;; because... that inner string literal is probably not what we actually want. So since we've never done
;; this intentionally as far as I can tell, let's just remove the possibility to avoid ambiguity.
(= (second chars) \{)
(let [at-closing (drop-while #(not= \' %) (next chars))]
(if (seq at-closing)
(recur (next at-closing))
false))
;; Unpaired single quote: invalid
:else
false)
(recur (rest chars)))))))
(defn format-str-arg-node->str
[node]
(cond
;; it's just a string literal
(api/string-node? node) (api/sexpr node)
;; it's `(str "some" "strings")`
(and (api/list-node? node)
(= 'str (api/sexpr (first (:children node))))
(every? api/string-node? (rest (:children node))))
(apply str (map api/sexpr (rest (:children node))))
;; it's something else, no good
:else
(do
(api/reg-finding!
(assoc (meta node)
:message "Must be a string literal or a call to `str` with string literal arguments."
:type :metabase/validate-string-or-str-args-to-i18n))
nil)))
(defn strict-apostrophes
"Checks the node to make sure it's not a i18n call that will result in dropped apostrophes."
[{:keys [node]}]
(let [format-str-arg (second (:children node))
;; `format-str-arg` must be either a `"string"` or `(str "a call " "to" "str")` (to allow for splitting long
;; strings into shorter lines)
format-str (format-str-arg-node->str format-str-arg)]
(when-not (valid-apostrophes? format-str)
(api/reg-finding!
(assoc (meta node)
:message "Format string contains invalid single quote usage. Use '' for literals or '{...}' for escaping."
:type :metabase/validate-escaped-single-quotes-in-i18n))))
{:node node})
(def tru strict-apostrophes)
(def trs strict-apostrophes)
(def deferred-tru strict-apostrophes)
(def deferred-trs strict-apostrophes)

View File

@@ -0,0 +1,16 @@
(ns hooks.metabase.util.timing
"Custom CLJ Kondo hooks for timing-related linting rules."
(:require [clj-kondo.hooks-api :as api]))
(defn discourage-millis-duration
"Discourage slow and unreliable duration calculations using System/currentTimeMillis "
[{:keys [node]}]
(let [sexpr (api/sexpr node)]
(when (and (list? sexpr) (= (first sexpr) '-) (>= (count sexpr) 2))
(let [first-arg (second sexpr)]
(when (= first-arg (list 'System/currentTimeMillis))
(api/reg-finding!
(assoc (meta node)
:message "Avoid System/currentTimeMillis for calculating durations. Use u/start-timer and u/since-ms for more reliability."
:type :metabase/discourage-millis-duration
:level :warning)))))))

View File

@@ -0,0 +1,29 @@
(ns hooks.metabase.xrays.api.automagic-dashboards-test
(:require
[clj-kondo.hooks-api :as hooks]))
(comment
(def input (hooks/parse-string
"(with-indexed-model! [{:keys [model model-index model-index-value]}
{:query :some-query}]
:foo :bar :body)"))
(println (hooks/sexpr input))
(let [f (load-file ".clj-kondo/hooks/metabase/xrays/api/automagic_dashboards_test.clj")]
(f {:node input})))
(defn with-indexed-model!
[{node :node}]
(let [[_macro-call binding-and-query-info & body] (:children node)
[binding query-info] (:children binding-and-query-info)
node* (hooks/list-node
[(hooks/token-node 'do-with-indexed-model!)
query-info
(hooks/list-node
(list* (hooks/token-node 'fn)
(hooks/vector-node [binding])
body))])]
#_(println (hooks/sexpr node*))
{:node node*}))

View File

@@ -0,0 +1,63 @@
(ns hooks.clojure.core.defmulti-test
(:require
[clj-kondo.hooks-api :as hooks]
[clj-kondo.impl.utils]
[clojure.test :refer :all]
[hooks.clojure.core.defmulti]))
(defn- lint-defmulti [form]
(binding [clj-kondo.impl.utils/*ctx* {:config {:linters {:metabase/check-defmulti-arglists {:level :warning}}}
:ignores (atom nil)
:findings (atom [])
:namespaces (atom {})}]
(hooks.clojure.core.defmulti/lint-defmulti {:node (hooks/parse-string (pr-str form))})
@(:findings clj-kondo.impl.utils/*ctx*)))
(deftest ^:parallel defmulti-missing-arglists-test
(testing "missing arglists"
(is (=? [{:message "All defmultis should have an attribute map with :arglists metadata. [:metabase/check-defmulti-arglists]"}]
(lint-defmulti '(defmulti expand-visualization
(fn [card _ _]
(-> card :visualization first))))))))
(deftest ^:parallel defmulti-invalid-arglists-test
(testing "invalid arglists"
(are [form] (=? [{:message ":arglists should be a quoted list of vectors [:metabase/check-defmulti-arglists]"}]
(lint-defmulti form))
'(defmulti expand-visualization
{:arglists '()}
(fn [card _ _]
(-> card :visualization first)))
'(defmulti expand-visualization
{:arglists ([a])} ; unquoted
(fn [card _ _]
(-> card :visualization first)))
'(defmulti expand-visualization
{:arglists '[(a)]}
(fn [card _ _]
(-> card :visualization first)))
'(defmulti expand-visualization
{:arglists '((a))}
(fn [card _ _]
(-> card :visualization first))))))
(deftest ^:parallel defmulti-arglists-with-underscore-args-test
(testing "arglists, but some symbols are _"
(are [form] (=? [{:message ":arglists should contain actual arg names, not underscore (unused) symbols [:metabase/check-defmulti-arglists]"}]
(lint-defmulti form))
'(defmulti expand-visualization
{:arglists '([card _ _])}
(fn [card _ _]
(-> card :visualization first)))
'(defmulti expand-visualization
{:arglists '([card _bad _arg])}
(fn [card _ _]
(-> card :visualization first))))))
(deftest ^:parallel defmulti-arglists-ok-test
(testing "good"
(is (= []
(lint-defmulti '(defmulti expand-visualization
{:arglists '([card x y])}
(fn [card _ _]
(-> card :visualization first))))))))

View File

@@ -0,0 +1,76 @@
(ns hooks.clojure.core.ns-test
(:require
[clj-kondo.hooks-api :as hooks]
[clj-kondo.impl.utils]
[clojure.test :refer :all]
[hooks.clojure.core.ns]))
(defn- lint-ns [form config]
(binding [clj-kondo.impl.utils/*ctx* {:config config
:ignores (atom nil)
:findings (atom [])
:namespaces (atom {})}]
(hooks.clojure.core.ns/lint-ns {:node (hooks/parse-string
(binding [*print-meta* true]
(pr-str form)))
:config config})
@(:findings clj-kondo.impl.utils/*ctx*)))
(defn- lint-modules [form config]
(lint-ns form (assoc-in config [:linters :metabase/modules :level] :warning)))
(deftest ^:parallel module-checker-allowed-modules-test
(are [task-namespace] (=? [{:message "Module task should not be used in the api module. [:metabase/modules api :uses]"
:type :metabase/modules}]
(lint-modules
'(ns metabase.api.search
(:require
[metabase.request.core :as request]
[task-namespace :as task]))
'{:metabase/modules {api {:uses #{request}}
request {:api #{metabase.request.core}}}}))
metabase.task
metabase.task.core))
(deftest ^:parallel module-checker-api-namespaces-test
(is (=? [{:message "Namespace metabase.search.config is not an allowed external API namespace for the search module. [:metabase/modules search :api]"
:type :metabase/modules}]
(lint-modules
'(ns metabase.api.search
(:require
[metabase.search.config :as search.config]
[metabase.search.core :as search]))
'{:metabase/modules {api {:uses #{search}}
search {:api #{metabase.search.core}}}}))))
(deftest ^:parallel module-checker-api-namespaces-ignore-test
(is (empty? (lint-modules
'(ns metabase.api.search
(:require
^{:clj-kondo/ignore [:metabase/modules]}
[metabase.search.config :as search.config]
[metabase.search.core :as search]))
'{:metabase/modules {api {:uses #{search}}
search {:api #{metabase.search.core}}}}))))
(deftest ^:parallel module-checker-enterprise-test
(is (=? [{:message "Module search should not be used in the enterprise/search module. [:metabase/modules enterprise/search :uses]"
:type :metabase/modules}]
(lint-modules
'(ns metabase-enterprise.search.core
(:require
[metabase.search.core :as search]))
'{:metabase/modules {search {:api #{metabase.search.core}}}}))))
(deftest ^:parallel require-newlines-test
(binding [clj-kondo.impl.utils/*ctx* {:config {:linters {:metabase/require-shape-checker {:level :warnings}}}
:ignores (atom nil)
:findings (atom [])
:namespaces (atom {})}]
(hooks.clojure.core.ns/lint-ns {:node (hooks/parse-string "
(ns metabase.task.cache
(:require [metabase.task.bunny]
[metabase.task.rabbit]))")})
(is (=? [{:message "Put your requires on a newline from the :require keyword [:metabase/require-shape-checker]",
:type :metabase/require-shape-checker}]
@(:findings clj-kondo.impl.utils/*ctx*)))))

View File

@@ -0,0 +1,10 @@
(ns hooks.common.modules-test
(:require
[clojure.test :refer :all]
[hooks.common.modules]))
(deftest ^:parallel module-test
(are [symb expected] (= expected
(hooks.common.modules/module symb))
'metabase.qp.middleware.wow 'qp
'metabase-enterprise.whatever.core 'enterprise/whatever))

View File

@@ -1,10 +1,39 @@
(ns ^:mb/once hooks.common-test
(ns hooks.common-test
(:require
[clj-kondo.hooks-api :as api]
[clj-kondo.impl.utils]
[clojure.test :refer :all]
[hooks.common]))
(deftest ^:parallel ignored-linters-test
(doseq [ignored [":metabase/modules"
"[:metabase/modules]"
"(:metabase/modules)"]
prefix ["#_"
"^"]
:let [s (format "%s{:clj-kondo/ignore %s} [metabase.search.config :as search.config]"
prefix
ignored)]]
(testing (pr-str s)
(is (= #{:metabase/modules}
(hooks.common/ignored-linters (api/parse-string s)))))))
(deftest ^:parallel merge-ignored-linters-test
(let [node-1 (api/parse-string "#_{:clj-kondo/ignore [:a]} [:a]")
node-2 (api/parse-string "#_{:clj-kondo/ignore [:b]} [:b]")
node-3 (api/parse-string "#_{:clj-kondo/ignore [:c]} [:c]")
node-1' (hooks.common/merge-ignored-linters node-1 node-2 node-3)]
(is (= #{:a :b :c}
(hooks.common/ignored-linters node-1')))
(testing "Updated metadata should match the shape Kondo expects"
(is (=? {:clj-kondo/ignore {:linters api/vector-node?}}
(meta node-1')))
(let [children (-> node-1' meta :clj-kondo/ignore :linters :children)]
(is (= (count children) 3))
(is (every? api/keyword-node? children))
(is (= [:a :b :c]
(sort (map api/sexpr children))))))))
(deftest ^:parallel node->qualified-symbol-test
(binding [clj-kondo.impl.utils/*ctx* {:namespaces (atom nil)}]
(is (= 'metabase.util.i18n/tru

View File

@@ -1,35 +0,0 @@
(ns hooks.metabase.api.common-test
(:require
[clj-kondo.hooks-api :as api]
[clojure.test :refer :all]
[hooks.metabase.api.common]))
(deftest ^:parallel defendpoint-test
(is (= '(do
compojure.core/POST
(clojure.core/defn
POST_:id_copy
"Copy a `Card`, with the new name 'Copy of _name_'"
[id]
{id [:maybe ms/PositiveInt]}
(let [orig-card (api/read-check Card id)
new-name (str (trs "Copy of ") (:name orig-card))
new-card (assoc orig-card :name new-name)]
(-> (card/create-card! new-card @api/*current-user*)
hydrate-card-details
(assoc :last-edit-info (last-edit/edit-information-for-user @api/*current-user*))))))
(-> {:node (-> '(api/defendpoint POST "/:id/copy"
"Copy a `Card`, with the new name 'Copy of _name_'"
[id]
{id [:maybe ms/PositiveInt]}
(let [orig-card (api/read-check Card id)
new-name (str (trs "Copy of ") (:name orig-card))
new-card (assoc orig-card :name new-name)]
(-> (card/create-card! new-card @api/*current-user*)
hydrate-card-details
(assoc :last-edit-info (last-edit/edit-information-for-user @api/*current-user*)))))
pr-str
api/parse-string)}
hooks.metabase.api.common/defendpoint
:node
api/sexpr))))

View File

@@ -0,0 +1,71 @@
(ns hooks.metabase.api.macros-test
(:require
[clj-kondo.hooks-api :as api]
[clojure.test :refer :all]
[hooks.metabase.api.macros]))
(defn- is-valid-node [x]
(is (api/node? x))
(doseq [child (:children x)]
(is-valid-node child)))
(deftest ^:parallel defendpoint-test
(letfn [(defendpoint [form]
(let [node (-> form pr-str api/parse-string)]
(is-valid-node node)
(-> {:node node}
hooks.metabase.api.macros/defendpoint
:node
api/sexpr)))]
(are [form expected] (= expected
(defendpoint form))
'(api.macros/defendpoint :post "/" :- [:map [:collection_id :int]]
"Create a new [[Timeline]]."
[_route-params
_query-params
{:keys [icon], collection-id :collection_id, :as body} :- [:map
[:name ms/NonBlankString]
[:default {:optional true} [:maybe :boolean]]]]
(body icon)
(body collection-id))
'(do
api.macros/defendpoint
:post
"/"
(do
[:map [:collection_id :int]]
[:map
[:name ms/NonBlankString]
[:default {:optional true} [:maybe :boolean]]])
(clojure.core/let [_route-params {}
_query-params {}
{:keys [icon], collection-id :collection_id, :as body} {}]
(body icon)
(body collection-id)))
'(api.macros/defendpoint :post "/"
[_route-params
_query-params
body
request
respond
raise]
(try
(respond :x)
(catch Throwable e
(raise e))))
'(do
api.macros/defendpoint
:post
"/"
(do)
(clojure.core/let [_route-params {}
_query-params {}
body {}
request {}
respond (clojure.core/constantly nil)
raise (clojure.core/constantly nil)]
(try
(respond :x)
(catch Throwable e
(raise e))))))))

View File

@@ -0,0 +1,19 @@
(ns hooks.metabase.model-persistence.test-util-test
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.test :refer :all]
[hooks.metabase.model-persistence.test-util]))
(deftest ^:parallel with-persistence-enabled-test
(is (= '(clojure.core/let [persist-models! (clojure.core/fn [])]
(persist-models!)
:wow)
(as-> '(mt/with-persistence-enabled! [persist-models!]
(persist-models!)
:wow) <>
(pr-str <>)
(hooks/parse-string <>)
{:node <>}
(hooks.metabase.model-persistence.test-util/with-persistence-enabled! <>)
(:node <>)
(hooks/sexpr <>)))))

View File

@@ -0,0 +1,34 @@
(ns hooks.metabase.settings.models.setting-test
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.test :refer :all]
[hooks.metabase.settings.models.setting]))
#_{:clj-kondo/ignore [:metabase/validate-deftest]}
(deftest ^:parallel defsetting-test
(let [node (-> '(defsetting active-users-count
(deferred-tru "Cached number of active users. Refreshed every 5 minutes.")
:visibility :admin
:type :integer
:default 0
:getter (fn []
(if-not ((requiring-resolve 'metabase.app-db.core/db-is-set-up?))
0
(cached-active-users-count))))
pr-str
hooks/parse-string)]
(is (= '(let [_ (deferred-tru "Cached number of active users. Refreshed every 5 minutes.")
_ {:default 0
:type :integer
:getter (fn []
(if-not ((requiring-resolve 'metabase.app-db.core/db-is-set-up?))
0
(cached-active-users-count)))
:visibility :admin}]
:active-users-count
(defn active-users-count "Docstring." [])
(defn active-users-count! "Docstring." [_value-or-nil]))
(-> {:node node, :ns 'hooks.metabase.settings.models.setting-test}
hooks.metabase.settings.models.setting/defsetting
:node
hooks/sexpr)))))

View File

@@ -0,0 +1,33 @@
(ns hooks.metabase.util.i18n-test
(:require [clj-kondo.hooks-api :as api]
[clj-kondo.impl.utils]
[clojure.string :as str]
[clojure.test :refer [deftest testing is are]]
[hooks.metabase.util.i18n]))
(defn- warnings
[form]
(binding [clj-kondo.impl.utils/*ctx* {:config {:linters {:metabase/validate-string-or-str-args-to-i18n {:level :warning}
:metabase/validate-escaped-single-quotes-in-i18n {:level :warning}}}
:ignores (atom nil)
:findings (atom [])
:namespaces (atom {})}]
(hooks.metabase.util.i18n/strict-apostrophes {:node (api/parse-string (pr-str form))})
(mapv :message @(:findings clj-kondo.impl.utils/*ctx*))))
(deftest ^:parallel strict-apostrophes-warns
(are [form] (= ["Format string contains invalid single quote usage. Use '' for literals or '{...}' for escaping."]
(warnings (quote form)))
(metabase.util.i18n/tru "this isn't good bob")
(metabase.util.i18n/tru "'this is not good either'")
(metabase.util.i18n/tru "''this isn't''")
(metabase.util.i18n/tru "nope you can not escape 'like {{0}} so {{1}}'")
(metabase.util.i18n/tru (str "it works" "when strings" "are concatenated'"))))
(deftest ^:parallel strict-apostrophes-doesnt-warn-on-good-ones
(are [form] (= []
(warnings (quote form)))
(metabase.util.i18n/tru "this isn''t bad")
(metabase.util.i18n/tru (str "not sure why you'" "'d do this" "... but ok"))
(metabase.util.i18n/tru "you can '{{0}}' do things like that")
(metabase.util.i18n/tru "or '{{ this or }}}}}}}}}}' that")))

View File

@@ -1,4 +1,4 @@
(ns ^:mb/once hooks.metabase.util.log-test
(ns hooks.metabase.util.log-test
(:require
[clj-kondo.hooks-api :as api]
[clj-kondo.impl.utils]

View File

@@ -13,6 +13,8 @@
"test"
"enterprise/backend"
"bin/build"
"bin/lint-migrations-file"
"bin/release-list"
"modules/drivers"
".clj-kondo/src"
".clj-kondo/test"
@@ -79,261 +81,280 @@
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.advanced-permissions.api.util-test/with-impersonations! [[:inner 0]]
metabase-enterprise.cache.config-test/with-temp-persist-models [[:block 1]]
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-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.alert-test/with-alert-in-collection [[:block 1]]
metabase.api.card-test/with-cards-in-readable-collection [[:block 1]]
metabase.api.card-test/with-cards-in-writeable-collection [[:block 1]]
metabase.api.card-test/with-ordered-items [[:inner 0]]
metabase.api.card-test/with-temp-native-card! [[:block 1]]
metabase.api.card-test/with-temp-native-card-with-params! [[:block 1]]
metabase.api.collection-test/with-collection-hierarchy [[:block 1]]
metabase.api.collection-test/with-french-user-and-personal-collection [[:block 2]]
metabase.api.collection-test/with-some-children-of-collection [[:block 1]]
metabase.api.common/check [[:default]]
metabase.api.common/define-routes [[:block 0]]
metabase.api.common/let-404 [[:block 1]]
metabase.api.common.internal/auto-coerce [[:block 1]]
metabase.api.common.internal/auto-parse [[:block 1]]
metabase.api.common.internal-test/no-route-regexes [[:block 0]]
metabase.api.embed-test/do-response-formats [[:block 1]]
metabase.api.embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]
metabase.api.embed-test/with-embedding-enabled-and-temp-card-referencing [[:block 3]]
metabase.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing [[:block 3]]
metabase.api.embed-test/with-new-secret-key [[:block 0]]
metabase.api.embed-test/with-temp-card [[:block 1]]
metabase.api.embed-test/with-temp-dashcard [[:block 1]]
metabase.api.preview-embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]
metabase.api.preview-embed-test/with-new-secret-key [[:block 0]]
metabase.api.public-test/with-sharing-enabled-and-temp-card-referencing [[:block 3]]
metabase.api.public-test/with-sharing-enabled-and-temp-dashcard-referencing [[:block 3]]
metabase.api.public-test/with-temp-public-card [[:block 1]]
metabase.api.public-test/with-temp-public-dashboard [[:block 1]]
metabase.api.public-test/with-temp-public-dashboard-and-card [[:block 1]]
metabase.api.search-test/do-test-users [[:block 1]]
metabase.api.session/http-401-on-error [[:block 0]]
metabase.async.streaming-response/streaming-response [[:block 2]]
metabase.async.streaming-response-test/with-streaming-response-thread-pool [[:block 0]]
metabase.async.streaming-response-test/with-test-driver-db! [[:block 0]]
metabase.async.util/cancelable-thread [[:block 0]]
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.config/build-type-case [[:block 0]]
metabase.dashboard-subscription-test/with-link-card-fixture-for-dashboard [[:block 2]]
metabase.db.liquibase/with-liquibase [[:block 1]]
metabase.db.liquibase/with-scope-locked [[:block 1]]
metabase.db.schema-migrations-test.impl/test-migrations [[:block 2]]
metabase.db/with-application-db [[: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.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-query [[:inner 0]]
metabase.lib.util.match/match [[:inner 0]]
metabase.lib.util.match/match-one [[:inner 0]]
metabase.lib.util.match/replace [[:inner 0]]
metabase.lib.util.match/replace-in [[:inner 0]]
metabase.models.collection-test/with-collection-hierarchy [[:block 1]]
metabase.models.collection-test/with-current-user-perms-for-collections [[:block 1]]
metabase.models.collection-test/with-personal-and-impersonal-collections [[:block 1]]
metabase.models.dashboard-test/with-dash-in-collection [[:inner 0]]
metabase.models.interface/define-batched-hydration-method [[:inner 0]]
metabase.models.interface/define-simple-hydration-method [[:inner 0]]
metabase.models.params.chain-filter-test/with-clean-field-values-for-field [[:block 1]]
metabase.models.params.chain-filter-test/with-fk-field-to-field-remapping [[:block 0]]
metabase.models.params.chain-filter-test/with-human-readable-values-remapping [[:block 0]]
metabase.models.pulse-test/with-dashboard-subscription-in-collection [[:block 1]]
metabase.models.pulse-test/with-pulse-in-collection [[:inner 0]]
metabase.models.setting/defsetting [[:block 1]]
metabase.models.setting.multi-setting/define-multi-setting [[:inner 0]]
metabase.models.task-history/with-task-history [[: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.sample-data-test/with-temp-sample-database-db [[:block 1]]
metabase.server.middleware.session/as-admin [[:block 0]]
metabase.server.middleware.session/with-current-user [[:inner 0]]
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.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/native-query [[:block 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.test.data/$ids [[:inner 0]]
metabase.test.data/dataset [[:inner 0]]
metabase.test.data/mbql-query [[:inner 0]]
metabase.test.data/native-query [[:block 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.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.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.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.timeseries-query-processor-test.util/test-timeseries-drivers [[:block 0]]
metabase.timeseries-query-processor-test/run-mbql-query [[:inner 0]]
metabase.upload-test/with-upload-table! [[:inner 0]]
metabase.upload.types/with-currency [[:default]]
metabase.upload.types/with-parens [[:default]]
metabase.util/auto-retry [[: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]]
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]]
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/define-after-impl [[:default]]
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.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.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/native-query [[:block 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/native-query [[:block 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]]}}

View File

@@ -1,11 +1,11 @@
FROM mcr.microsoft.com/vscode/devcontainers/java:11
FROM mcr.microsoft.com/vscode/devcontainers/java:21
# Set up nodesource, install node, yarn, fontconfig for static viz, rlwrap for dev ergonomics
RUN ( curl -fsSL https://deb.nodesource.com/setup_18.x | bash ) \
RUN ( curl -fsSL https://deb.nodesource.com/setup_22.x | bash ) \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com \
&& apt-get update && apt-get -y install --no-install-recommends nodejs yarn rlwrap fontconfig
# install Clojure
RUN curl https://download.clojure.org/install/linux-install-1.11.1.1262.sh | bash
RUN curl https://download.clojure.org/install/linux-install-1.12.0.1488.sh | bash

View File

@@ -20,13 +20,8 @@
(clojure-mode
;; Specify which arg is the docstring for certain macros
;; (Add more as needed)
(eval . (put 'defendpoint-schema 'clojure-doc-string-elt 3))
(eval . (put 'defendpoint 'clojure-doc-string-elt 3))
(eval . (put 'defendpoint-async 'clojure-doc-string-elt 3))
(eval . (put 'define-premium-feature 'clojure-doc-string-elt 2))
(eval . (put 'api/defendpoint-schema 'clojure-doc-string-elt 3))
(eval . (put 'api/defendpoint 'clojure-doc-string-elt 3))
(eval . (put 'api/defendpoint-async 'clojure-doc-string-elt 3))
(eval . (put 'api.macros/defendpoint 'clojure-doc-string-elt 3))
(eval . (put 'defsetting 'clojure-doc-string-elt 2))
(eval . (put 'setting/defsetting 'clojure-doc-string-elt 2))
(eval . (put 's/defn 'clojure-doc-string-elt 2))

View File

@@ -1,13 +1,20 @@
/* eslint-disable import/no-commonjs */
/* eslint-disable no-undef */
const path = require("path");
// `postcss-modules` lints css modules class names, but it currently crashes
// eslint on vscode. If you use webstorm or want to run the lint for the cli, you
// can use this flag to enable it. This is set to true in CI
const shouldLintCssModules =
process.env.LINT_CSS_MODULES === "true" || process.env.CI;
const plugins = ["react", "no-only-tests", "ttag", "i18next"];
if (shouldLintCssModules) {
plugins.push("postcss-modules");
}
module.exports = {
ignorePatterns: ["!.storybook"],
rules: {
strict: [2, "never"],
"no-undef": 2,
@@ -17,11 +24,14 @@ module.exports = {
{
vars: "all",
args: "none",
varsIgnorePattern: "^_",
varsIgnorePattern: "^_.+$",
ignoreRestSiblings: true,
},
],
"no-empty": [1, { allowEmptyCatch: true }],
// Note: adding this rule to a eslint config file in a subfolder will remove
// *not* carry over the restricted imports from parent folders, you will
// need to copy them over
"no-restricted-imports": [
"error",
{
@@ -39,6 +49,7 @@ module.exports = {
],
curly: [1, "all"],
eqeqeq: [1, "smart"],
"import/no-duplicates": ["warn", { considerQueryString: true }],
"import/no-default-export": 2,
"import/no-named-as-default": 0,
"import/no-commonjs": 1,
@@ -108,11 +119,10 @@ module.exports = {
"When",
"Then",
"describeWithSnowplow",
"describeEE",
],
},
],
complexity: ["error", { max: 54 }],
complexity: ["error", { max: 55 }],
...(shouldLintCssModules
? {
"postcss-modules/no-undef-class": "error",
@@ -132,7 +142,7 @@ module.exports = {
"jest/globals": true,
},
parser: "babel-eslint",
plugins: ["react", "no-only-tests", "postcss-modules"],
plugins,
extends: [
"eslint:recommended",
"plugin:react/recommended",
@@ -143,11 +153,13 @@ module.exports = {
"plugin:import/typescript",
"plugin:depend/recommended",
"plugin:storybook/recommended",
"plugin:i18next/recommended",
],
settings: {
"import/internal-regex": "^metabase/|^metabase-lib/",
"import/resolver": {
webpack: {
config: path.resolve(__dirname, "./rspack.main.config.js"),
typescript: true,
},
},
@@ -168,7 +180,9 @@ module.exports = {
{
files: ["*.js", "*.jsx", "*.ts", "*.tsx"],
rules: {
"jtag-missing-key": "error",
"no-unconditional-metabase-links-render": "error",
"no-color-literals": "error",
"no-literal-metabase-strings": "error",
"depend/ban-dependencies": [
"error",
@@ -188,17 +202,40 @@ module.exports = {
"*.unit.spec.*",
"frontend/src/metabase/admin/**/*",
"frontend/src/metabase/setup/**/*",
"enterprise/frontend/src/metabase-enterprise/whitelabel/**/*",
"frontend/lint/**/*",
"*.stories.*",
"**/.storybook/*",
"stories-data.*",
"e2e/**/*",
"**/tests/*",
"release/**/*",
"rspack.config.js",
"rspack.main.config.js",
"rspack.embedding-sdk-package.config.js",
"rspack.embedding-sdk-bundle.config.js",
],
rules: {
"no-color-literals": "off",
"no-unconditional-metabase-links-render": "off",
"no-literal-metabase-strings": "off",
},
},
{
files: [
"*.unit.spec.*",
"frontend/lint/**/*",
"*.stories.*",
"stories-data.*",
"e2e/**/*",
"**/tests/*",
"release/**/*",
"rspack.main.config.js",
],
rules: {
"i18next/no-literal-string": "off",
},
},
{
extends: ["plugin:@typescript-eslint/recommended"],
files: ["*.ts", "*.tsx"],
@@ -220,10 +257,10 @@ module.exports = {
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
argsIgnorePattern: "^_.+$",
varsIgnorePattern: "^_.+$",
ignoreRestSiblings: true,
destructuredArrayIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_.+$",
},
],
// This was introduced in 6.0.0
@@ -246,6 +283,13 @@ module.exports = {
],
rules: {
"jest/valid-title": ["error", { ignoreTypeOfDescribeName: true }],
"jest/expect-expect": [
"error",
{
assertFunctionNames: ["expect*", "assert*"],
additionalTestBlockFunctions: [],
},
],
},
},
{
@@ -276,13 +320,32 @@ module.exports = {
message:
"You may not use base colors in the application, use semantic colors instead. (see colors.module.css)",
},
{
selector:
"CallExpression[callee.property.name='legacyQuery'] > ObjectExpression > Property[key.name='useStructuredQuery'][value.value=true]",
message: "StructuredQuery usage is forbidden. Use MLv2",
},
],
},
},
{
files: ["frontend/src/metabase/query_builder/**/*"],
rules: {
"import/no-cycle": "error",
},
},
{
files: ["docs/**/snippets/**/*.{ts,tsx,js,jsx}"],
rules: {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"import/no-commonjs": "off",
"import/no-default-export": "off",
"import/order": "off",
"import/no-unresolved": "off",
"no-color-literals": "off",
},
},
{
files: ["frontend/build/**/*.js"],
rules: {
"import/no-commonjs": "off",
},
},
],
};

272
.github/CODEOWNERS vendored
View File

@@ -1,12 +1,266 @@
# Before changing this file, make sure you have read how we use it:
# https://www.notion.so/metabase/Pull-Request-Code-Review-Guide-374f05df889748b69d67af753f9bc9b8?pvs=4#36550c04ceab40b5a8b8bee6264b090c
enterprise/backend/src/metabase_enterprise/advanced_permissions @noahmoss
enterprise/backend/src/metabase_enterprise/audit_app @noahmoss
enterprise/backend/src/metabase_enterprise/sso @noahmoss
enterprise/backend/src/metabase_enterprise/task/truncate_audit_table.clj @noahmoss
enterprise/backend/src/metabase_enterprise/internal_user.clj @noahmoss
frontend/src/metabase/ui @metabase/core-frontend-admin-webapp
src/metabase/**/*permissions* @noahmoss
src/metabase/integrations @noahmoss
snowplow/* @metabase/data
enterprise/frontend/src/embedding-sdk-package @metabase/embedding
enterprise/frontend/src/embedding-sdk-bundle @metabase/embedding
enterprise/frontend/src/embedding-sdk-shared @metabase/embedding
frontend/src/metabase/embedding-sdk @metabase/embedding
frontend/src/metabase/public/containers/PublicOrEmbeddedQuestion @metabase/embedding
frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard @metabase/embedding
frontend/src/metabase/ui @metabase/core-frontend-ux-west
# snowplow/* @metabase/data
src/metabase/analytics/prometheus.clj @metabase/cloud-ops
.github @metabase/devexp
.clj-kondo @metabase/devexp
deps.edn @metabase/backend-developers
docs @metabase/tech-writers
docs/developers-guide # exclude from tech-writer ownership
#
# Backend modules <=> teams that own them
#
# modules/drivers @metabase/drivers
src/metabase/driver/sql_jdbc/actions.clj @metabase/core-ux-east
test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-ux-east
# enterprise/backend/src/metabase_enterprise/advanced_config @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/advanced_config @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/advanced_permissions @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/advanced_permissions @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/airgap @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/airgap @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/api @metabase/devexp
# enterprise/backend/test/metabase_enterprise/api @metabase/devexp
# enterprise/backend/src/metabase_enterprise/audit_app @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/audit_app @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/auth_provider @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/auth_provider @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/billing @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/billing @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/cache @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/cache @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/content_verification @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/content_verification @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/core @metabase/devexp
# enterprise/backend/test/metabase_enterprise/core @metabase/devexp
# enterprise/backend/src/metabase_enterprise/dashboard_subscription_filters @metabase/core-ux-east
# enterprise/backend/test/metabase_enterprise/dashboard_subscription_filters @metabase/core-ux-east
# enterprise/backend/src/metabase_enterprise/enhancements @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/enhancements @metabase/core-backend-admin-webapp
# # enterprise/backend/src/metabase_enterprise/llm
# # enterprise/backend/test/metabase_enterprise/llm
# enterprise/backend/src/metabase_enterprise/query_reference_validation @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/query_reference_validation @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/sandbox @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/sandbox @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/scim @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/scim @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/search ...
# enterprise/backend/test/metabase_enterprise/search ...
# enterprise/backend/src/metabase_enterprise/serialization @metabase/core-ux-east
# enterprise/backend/test/metabase_enterprise/serialization @metabase/core-ux-east
# enterprise/backend/src/metabase_enterprise/snippet_collections @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/snippet_collections @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/sso @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/sso @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/stale @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/stale @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/stats @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/stats @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/task @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/task @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/upload_management @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/upload_management @metabase/core-backend-admin-webapp
src/metabase/actions @metabase/core-ux-east
test/metabase/actions @metabase/core-ux-east
# src/metabase/activity_feed @metabase/core-backend-admin-webapp
# test/metabase/activity_feed @metabase/core-backend-admin-webapp
# src/metabase/analytics @metabase/core-backend-admin-webapp
# test/metabase/analytics @metabase/core-backend-admin-webapp
# src/metabase/analyze @metabase/drivers
# test/metabase/analyze @metabase/drivers
# src/metabase/api @metabase/devexp
# test/metabase/api @metabase/devexp
# src/metabase/audit @metabase/core-backend-admin-webapp
# test/metabase/audit @metabase/core-backend-admin-webapp
# src/metabase/auth_provider @metabase/core-backend-admin-webapp
# test/metabase/auth_provider @metabase/core-backend-admin-webapp
# src/metabase/bookmarks @metabase/core-backend-admin-webapp
# test/metabase/bookmarks @metabase/core-backend-admin-webapp
# src/metabase/cmd @metabase/devexp
# test/metabase/cmd @metabase/devexp
# src/metabase/channel @metabase/core-ux-east
# test/metabase/channel @metabase/core-ux-east
# src/metabase/cloud_migration ...
# test/metabase/cloud_migration ...
# src/metabase/cmd @metabase/devexp
# test/metabase/cmd @metabase/devexp
# src/metabase/config @metabase/devexp
# test/metabase/config @metabase/devexp
# src/metabase/core @metabase/devexp
# test/metabase/core @metabase/devexp
# src/metabase/db @metabase/core-backend-admin-webapp
# test/metabase/db @metabase/core-backend-admin-webapp
# src/metabase/driver @metabase/drivers
# test/metabase/driver @metabase/drivers
# src/metabase/eid_translation @metabase/core-backend-admin-webapp
# test/metabase/eid_translation @metabase/core-backend-admin-webapp
# src/metabase/embed @metabase/embedding
# test/metabase/embed @metabase/embedding
# src/metabase/events @metabase/devexp
# test/metabase/events @metabase/devexp
# src/metabase/formatter @metabase/core-backend-querying
# test/metabase/formatter @metabase/core-backend-querying
# src/metabase/indexed_entities @metabase/core-backend-querying
# test/metabase/indexed_entities @metabase/core-backend-querying
# src/metabase/integrations ...
# test/metabase/integrations ...
# src/metabase/legacy_mbql @metabase/core-backend-querying
# test/metabase/legacy_mbql @metabase/core-backend-querying
# src/metabase/lib @metabase/core-backend-querying
# test/metabase/lib @metabase/core-backend-querying
# src/metabase/logger @metabase/devexp
# test/metabase/logger @metabase/devexp
# src/metabase/login_history @metabase/core-backend-admin-webapp
# test/metabase/login_history @metabase/core-backend-admin-webapp
# src/metabase/model_persistence @metabase/core-backend-querying
# test/metabase/model_persistence @metabase/core-backend-querying
# src/metabase/models @metabase/devexp
# test/metabase/models @metabase/devexp
# src/metabase/moderation @metabase/core-backend-admin-webapp
# test/metabase/moderation @metabase/core-backend-admin-webapp
# src/metabase/notification @metabase/core-ux-east
# test/metabase/notification @metabase/core-ux-east
# src/metabase/permissions @metabase/core-backend-admin-webapp
# test/metabase/permissions @metabase/core-backend-admin-webapp
# src/metabase/plugins @metabase/devexp
# test/metabase/plugins @metabase/devexp
# src/metabase/premium_features @metabase/core-backend-admin-webapp
# test/metabase/premium_features @metabase/core-backend-admin-webapp
# src/metabase/public_settings @metabase/core-backend-admin-webapp
# test/metabase/public_settings @metabase/core-backend-admin-webapp
# src/metabase/public_sharing @metabase/core-backend-admin-webapp
# test/metabase/public_sharing @metabase/core-backend-admin-webapp
# src/metabase/pulse @metabase/core-ux-east
# test/metabase/pulse @metabase/core-ux-east
# src/metabase/query_analysis @metabase/core-backend-querying
# test/metabase/query_analysis @metabase/core-backend-querying
# src/metabase/query_processor @metabase/core-backend-querying
# test/metabase/query_processor @metabase/core-backend-querying
# src/metabase/request @metabase/devexp
# test/metabase/request @metabase/devexp
# src/metabase/revisions @metabase/core-backend-admin-webapp
# test/metabase/revisions @metabase/core-backend-admin-webapp
# src/metabase/sample_data @metabase/core-backend-admin-webapp
# test/metabase/sample_data @metabase/core-backend-admin-webapp
# src/metabase/search ...
# test/metabase/search ...
# src/metabase/segments @metabase/core-backend-querying
# test/metabase/segments @metabase/core-backend-querying
# src/metabase/server @metabase/devexp
# test/metabase/server @metabase/devexp
# src/metabase/session @metabase/core-backend-admin-webapp
# test/metabase/session @metabase/core-backend-admin-webapp
# src/metabase/setup @metabase/core-backend-admin-webapp
# test/metabase/setup @metabase/core-backend-admin-webapp
# src/metabase/sso @metabase/core-backend-admin-webapp
# test/metabase/sso @metabase/core-backend-admin-webapp
# src/metabase/sync @metabase/drivers
# test/metabase/sync @metabase/drivers
# src/metabase/task @metabase/devexp
# test/metabase/task @metabase/devexp
# src/metabase/tiles @metabase/core-backend-dashviz
# test/metabase/tiles @metabase/core-backend-dashviz
# src/metabase/timeline @metabase/core-backend-dashviz
# test/metabase/timeline @metabase/core-backend-dashviz
# src/metabase/types @metabase/core-backend-querying
# test/metabase/types @metabase/core-backend-querying
# src/metabase/upload @metabase/core-backend-admin-webapp
# test/metabase/upload @metabase/core-backend-admin-webapp
# src/metabase/user_key_value @metabase/core-backend-admin-webapp
# test/metabase/user_key_value @metabase/core-backend-admin-webapp
# src/metabase/util @metabase/devexp
# test/metabase/util @metabase/devexp
# src/metabase/xrays @metabase/core-backend-querying
# test/metabase/xrays @metabase/core-backend-querying

View File

@@ -63,7 +63,8 @@ body:
attributes:
label: Information about your Metabase installation
description: |
Copy and paste the JSON from `Admin -> Troubleshooting`.
For versions >= 56, copy and paste the Diagnostic info from `Admin -> Tools -> Help`.
For versions < 56, copy and paste the Diagnostic info from `Admin -> Troubleshooting`.
_This will be automatically formatted into code, so no need for backticks._
placeholder: |
{"browser-info": {

View File

@@ -3,7 +3,7 @@
> **Warning**
>
> If that is your first contribution to Metabase, please sign the [Contributor License Agreement](https://docs.google.com/a/metabase.com/forms/d/1oV38o7b9ONFSwuzwmERRMi9SYrhYeOrkbmNaq9pOJ_E/viewform) (unless it's a tiny documentation change). Also, if you're attempting to fix a translation issue, please submit your changes to our [POEditor project](https://poeditor.com/join/project/ynjQmwSsGh) instead of opening a PR.
> If that is your first contribution to Metabase, please sign the [Contributor License Agreement](https://docs.google.com/a/metabase.com/forms/d/1oV38o7b9ONFSwuzwmERRMi9SYrhYeOrkbmNaq9pOJ_E/viewform) (unless it's a tiny documentation change). Also, if you're attempting to fix a translation issue, please submit your changes to our [Crowdin project](https://crowdin.com/project/metabase-i18n) instead of opening a PR.
Closes https://github.com/metabase/metabase/issues/[issue_number]

View File

@@ -5,7 +5,7 @@ PENDING CI / PENDING REVIEW / READY _(choose one and update accordingly)_
- Reproduces #XXXXX
### How to test this manually?
- `yarn test-cypress-open`
- `yarn test-cypress`
- `relative/path/to/the/file`
> _(For still unfixed bug)_
- Replace `it.skip()` with `it.only()` to run the test in isolation

View File

@@ -1,4 +1,5 @@
name: Wait for localhost port to be ready
name: await-port
description: Wait for localhost port to be ready
inputs:
port:
@@ -10,6 +11,18 @@ runs:
- name: Wait for port ${{ inputs.port }} to be ready
shell: bash
run: |
echo "Waiting for port ${{ inputs.port }} to be ready..."
timeout=300 # 5 minutes timeout
elapsed=0
while ! nc -z localhost ${{ inputs.port }}; do
sleep 0.1;
if [ $elapsed -ge $timeout ]; then
echo "❌ Timeout waiting for port ${{ inputs.port }} after ${timeout} seconds"
exit 1
fi
sleep 1
elapsed=$((elapsed + 1))
if [ $((elapsed % 10)) -eq 0 ]; then
echo " Still waiting for port ${{ inputs.port }}... ($elapsed seconds)"
fi
done
echo "✅ Port ${{ inputs.port }} is ready!"

View File

@@ -1,71 +0,0 @@
name: Build E2E Matrix
description: Build and output a custom matrix for E2E tests.
outputs:
matrix:
description: Parameterized matrix in JSON format
value: ${{ steps.matrix.outputs.result }}
runs:
using: "composite"
steps:
- uses: actions/github-script@v7
id: matrix
with:
script: | # js
const java = 21;
const defaultRunner = "ubuntu-22.04";
const defaultOptions = {
"java-version": java,
runner: defaultRunner,
edition: "ee",
context: "folder"
};
const testSets = [
["actions", {} ],
["admin", {} ],
["admin-2", {} ],
["binning", {} ],
["collections", {} ],
["custom-column", {} ],
["dashboard", {} ],
["dashboard-cards", {} ],
["dashboard-filters", {} ],
["dashboard-filters-2", {} ],
["embedding", {} ],
["embedding-sdk", { context: "embedding-sdk" } ],
["filters", {} ],
["filters-reproductions", {}],
["joins", {} ],
["metrics", {} ],
["models", {} ],
["native", {} ],
["native-filters", {} ],
["onboarding", {} ],
["organization", {} ],
["permissions", {} ],
["question", {} ],
["question-reproductions", {} ],
["search", {}],
["sharing", {} ],
["visualizations-charts", {} ],
["visualizations-tabular", {} ],
["oss-subset", { edition: 'oss', context: "special" } ],
["slow", { context: "special" } ],
["flaky", { context: "special" } ],
["mongo", { context: "qa-database" } ],
];
const config = testSets.map(([name, specialOptions]) => {
return {
...defaultOptions,
...specialOptions,
name,
}
});
const matrix = { include: config };
return matrix;

View File

@@ -1,132 +0,0 @@
name: Build ee-extra
description: Build Metabase Enterprise Edition with extra features
inputs:
java-version:
required: true
# build with Java 11 since that's still officially what we target as a minimum and we don't want Java >11 bytecode
# sneaking in.
default: 11
iam-role:
description: "The IAM role to assume"
required: true
runs:
using: composite
steps:
- name: Prepare Java
uses: actions/setup-java@v3
with:
java-version: ${{ inputs.java-version }}
distribution: 'temurin'
- name: Reveal its original version.properties
run: jar xf ./bin/docker/metabase.jar version.properties && cat version.properties
shell: bash
- name: get major version
id: major_version
run: echo "major_version=$(cat version.properties | grep 'tag=' | cut -d'.' -f2)" >> $GITHUB_OUTPUT
shell: bash
- name: get drivers registry
run: |
curl -OL https://raw.githubusercontent.com/metabase/metabase-registry/main/registry.yaml
shell: bash
- uses: actions/setup-node@v4
with:
node-version: lts/Hydrogen # 18.x.x
- run: rm package.json && npm install yaml
shell: bash
- name: parse drivers registry
uses: actions/github-script@v7
id: drivers_registry
with:
script: | # js
const { parse } = require('yaml');
const fs = require('fs');
const registry = parse(fs.readFileSync('registry.yaml', 'utf8'));
const drivers = registry.drivers;
const majorVersion = '${{ steps.major_version.outputs.major_version }}';
const getDriverUrl = (driverName) => {
const driver = drivers.find(driver => driver.name === driverName);
if (!driver) {
throw new Error(`Driver ${driverName} not found in the registry`);
}
const driverUrl = driver.versions[majorVersion] ?? driver.versions.default;
if (!driverUrl) {
throw new Error(`Driver ${driverName} version ${majorVersion} not found in the registry`);
}
return driverUrl;
};
const extraDrivers = {
firebolt: getDriverUrl('firebolt'),
starburst: getDriverUrl('starburst'),
exasol: getDriverUrl('exasol'),
exasol_jdbc: drivers.find(d => d.name === 'exasol').deps[0],
clickhouse: getDriverUrl('clickhouse'),
ocient: getDriverUrl('ocient'),
materialize: getDriverUrl('materialize'),
};
console.log(extraDrivers);
return extraDrivers;
- name: Download Firebolt driver
run: |
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).firebolt }}
working-directory: modules
shell: bash
- name: Download Starburst driver
run: |
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).starburst }}
shell: bash
working-directory: modules
- name: Download Exasol driver
run: |
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).exasol }}
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).exasol_jdbc }}
shell: bash
working-directory: modules
- name: Download Clickhouse driver
run: |
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).clickhouse }}
shell: bash
working-directory: modules
- name: Download Ocient driver
run: |
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).ocient }}
shell: bash
working-directory: modules
- name: Download Materialize driver
run: |
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).materialize }}
shell: bash
working-directory: modules
- name: Bundle additional drivers into the Uberjar
run: jar uf bin/docker/metabase.jar modules/*.jar
shell: bash
- name: Launch uberjar
run: >-
java --add-opens java.base/java.nio=ALL-UNNAMED -jar ./bin/docker/metabase.jar &
shell: bash
- name: Wait for Metabase to start
run: while ! curl 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
shell: bash
- name: Kill the java process
run: pkill -f metabase.jar
shell: bash
- name: configure aws credentials
if: ${{ github.ref_name == 'master' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ inputs.iam-role }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: us-east-1
- name: Login to Amazon ECR
if: ${{ github.ref_name == 'master' }}
uses: aws-actions/amazon-ecr-login@v2

View File

@@ -0,0 +1,110 @@
name: Create Backport PR
inputs:
target-version: # major version number like 34 or 86
required: true
backport-commit:
required: true
github-token:
required: true
github-token-2: # need a second token to approve the PR
required: true
runs:
using: "composite"
steps:
- id: create_backport_pull_request
name: Create backport pull request
env:
TARGET_VERSION: ${{ inputs.target-version }}
TARGET_BRANCH: release-x.${{ inputs.target-version }}.x
ORIGINAL_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
ORIGINAL_TITLE: ${{ github.event.pull_request.title }}
GITHUB_TOKEN: ${{ inputs.github-token }}
COMMIT: ${{ inputs.backport-commit }}
shell: bash
run: | # bash
git config --global user.email "metabase-bot@metabase.com"
git config --global user.name "Metabase bot"
BACKPORT_BRANCH="backport-$TARGET_VERSION-$COMMIT"
# Checkout the target branch and create a new backport branch
git checkout ${TARGET_BRANCH}
git fetch --all
git checkout -b ${BACKPORT_BRANCH}
git cherry-pick ${COMMIT} || true
CONFLICT_LIST=$(git ls-files -u)
CONFLICTS=$(git ls-files -u | wc -l)
if [ "$CONFLICTS" -gt 0 ]; then
git cherry-pick --abort
echo "Could not cherry pick because of a conflict"
echo "has-conflicts=true" >> $GITHUB_OUTPUT
# Add a shell script for resolving conflicts
echo "git reset HEAD~1" > ./backport.sh
echo "rm ./backport.sh" >> ./backport.sh
echo "git cherry-pick ${COMMIT}" >> ./backport.sh
echo "echo 'Resolve conflicts and force push this branch.\n\nTo backport translations run: bin/i18n/merge-translations <release-branch>'" >> ./backport.sh
chmod +x ./backport.sh
git add ./backport.sh
git commit -m "Add backport resolution script"
PR_BODY=$(cat <<-END
#${ORIGINAL_PULL_REQUEST_NUMBER}
> [!IMPORTANT]
> Manual conflict resolution is required.
> Checkout the branch and run \`./backport.sh\` script. Force push your changes after cherry-picking. Check the box below when done.
Conflicts:
\`\`\`shell
${CONFLICT_LIST}
\`\`\`
- [ ] Conflicts resolved
END
)
else
echo "has-conflicts=false" >> $GITHUB_OUTPUT
PR_BODY="#${ORIGINAL_PULL_REQUEST_NUMBER}"
fi
git push -u origin ${BACKPORT_BRANCH}
BACKPORT_PR_URL=$(gh pr create --base "${TARGET_BRANCH}" --head "${BACKPORT_BRANCH}" --label "was-backported" --assignee "${GITHUB_ACTOR}" --title "🤖 backported \"${ORIGINAL_TITLE}\"" --body "${PR_BODY}")
BACKPORT_PR_NUMBER=${BACKPORT_PR_URL##*/}
echo "backport_pr_number=$BACKPORT_PR_NUMBER" >> $GITHUB_OUTPUT
echo "New PR has been created: #${BACKPORT_PR_NUMBER}"
git checkout ${{ github.sha }}
- name: Auto approve backport PR
if: ${{ steps.create_backport_pull_request.outputs.has-conflicts == 'false' }}
uses: juliangruber/approve-pull-request-action@v1
with:
github-token: ${{ inputs.github-token-2 }}
number: ${{ steps.create_backport_pull_request.outputs.backport_pr_number }}
- name: Enable Pull Request Automerge
if: ${{ steps.create_backport_pull_request.outputs.has-conflicts == 'false' }}
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ inputs.github-token }}
pull-request-number: ${{ steps.create_backport_pull_request.outputs.backport_pr_number }}
merge-method: squash
- uses: ./.github/actions/notify-pull-request
if: ${{ steps.create_backport_pull_request.outputs.has-conflicts == 'true' }}
with:
include-log: false
message: Manual conflict resolution is required on \#${{ steps.create_backport_pull_request.outputs.backport_pr_number }}
- uses: ./.github/actions/notify-pull-request
if: ${{ failure() }}
with:
include-log: true
message: Something went wrong while creating backport

View File

@@ -1,12 +1,15 @@
name: Cross-branch migration test
inputs:
base-ref:
base-ref: ## Base branch PR came from
required: true
head-ref: ## Source branch of the pull request
required: true
runs:
using: "composite"
steps:
## First we deploy the base branch
- name: Check out base branch
uses: actions/checkout@v4
with:
@@ -39,10 +42,11 @@ runs:
run: kill $(cat metabase_pid)
shell: bash
## Then we deploy the PR branch to ensure it migrates up successfully
- name: Check out pull request branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
ref: ${{ inputs.head-ref }}
- name: Run backend on pull request branch
run: |
@@ -65,3 +69,38 @@ runs:
- name: Stop Metabase on pull request branch
run: kill $(cat metabase_pid)
shell: bash
## Testing that originally deploying this PR allows you to roll back to a previous release
## Reset the checksums so when we go back to the base branch, it's as if the PR branch was what was originally deployed
- name: Reset the checksums as if the PR branch was what was originally deployed
run: |
clojure -M:dev:ee:migrate reset-checksums
shell: bash
- name: Rollback the last deployment
run: |
clojure -M:dev:ee:migrate rollback last-deployment
shell: bash
- name: Re-check out base branch
uses: actions/checkout@v4
with:
ref: ${{ inputs.base-ref }}
- name: Re-run backend on base branch
run: |
clojure -M:run:ee > metabase.log 2>&1 & echo $! > metabase_pid
tail -F metabase.log &
shell: bash
- name: Wait for Metabase to start
run: |
while ! curl -s 'http://localhost:3000/api/health' | grep '{"status":"ok"}' > /dev/null; do
if ! kill -0 $(cat metabase_pid) 2>/dev/null; then
cat metabase.log
echo "Metabase process has exited."
exit 1
fi
sleep 1
done
shell: bash

View File

@@ -68,10 +68,3 @@ runs:
- name: Unzip Metabase artifact containing an uberjar
run: unzip mb.zip
shell: bash
- name: Get the version info
run: |
jar xf target/uberjar/metabase.jar version.properties
cat version.properties
mv version.properties resources/
shell: bash

View File

@@ -8,7 +8,7 @@ inputs:
description: DockerHub password/token
required: true
maildev:
description: Maildev container
description: Maildev containers
required: true
default: false
openldap:
@@ -31,6 +31,10 @@ inputs:
description: Webhook tester container
required: false
default: false
snowplow:
description: Snowplow micro container
required: false
default: false
runs:
using: "composite"
@@ -42,56 +46,68 @@ runs:
password: ${{ inputs.password }}
- name: Start Containers
run: |
shell: bash
run: | # bash
Y='\033[33m'
G='\033[1;32m'
cd e2e/test/scenarios/
docker compose up \
$([ ${{ inputs.postgres }} = true ] && echo "postgres-sample") \
$([ ${{ inputs.mysql }} = true ] && echo "mysql-sample") \
$([ ${{ inputs.mongo }} = true ] && echo "mongo-sample") \
$([ ${{ inputs.maildev }} = true ] && echo "maildev") \
$([ ${{ inputs.maildev }} = true ] && echo "maildev-ssl") \
$([ ${{ inputs.openldap }} = true ] && echo "ldap") \
$([ ${{ inputs.webhook }} = true ] && echo "webhook-tester") \
$([ ${{ inputs.snowplow }} = true ] && echo "snowplow-micro") \
-d
if ${{ inputs.maildev }}; then
echo -e "${Y}Starting maildev container..." &&
docker run -d -p 1080:1080 -p 1025:1025 maildev/maildev:2.0.5 &&
echo -e "${Y}checking maildev container..." &&
while ! nc -z localhost 1080; do sleep 1; done &&
while ! nc -z localhost 1025; do sleep 1; done &&
echo -e "${G}Maildev is up and running!"
echo -e "${Y}checking maildev-ssl container..." &&
while ! nc -z localhost 1081; do sleep 1; done &&
while ! nc -z localhost 465; do sleep 1; done &&
echo -e "${G}Maildev-ssl is up and running!"
fi
if ${{ inputs.openldap }}; then
echo -e "${Y}Starting openldap container..." &&
docker run -d -p 389:389 \
--env LDAP_ADMIN_PASSWORD=adminpass \
--env LDAP_USERS=user01@example.org,user02@example.org \
--env LDAP_PASSWORDS=123456,123465 \
--env LDAP_ROOT=dc=example,dc=org \
--env LDAP_PORT_NUMBER=389 \
bitnami/openldap:2.6.4 &&
echo -e "${Y}checking openldap container..." &&
while ! nc -z localhost 389; do sleep 1; done &&
echo -e "${G}Openldap is up and running!"
fi
if ${{ inputs.postgres }}; then
echo -e "${Y}Starting postgres container..." &&
docker run -d -p 5404:5432 -e TZ='US/Pacific' metabase/qa-databases:postgres-sample-12 &&
echo -e "${Y}checking postgres container..." &&
while ! nc -z localhost 5404; do sleep 1; done &&
echo -e "${G}Postgres is up and running!"
fi
if ${{ inputs.mysql }}; then
echo -e "${Y}Starting mysql container..." &&
docker run -d -p 3304:3306 -e TZ='US/Pacific' metabase/qa-databases:mysql-sample-8 &&
echo -e "${Y}checking mysql container..." &&
while ! nc -z localhost 3304; do sleep 1; done &&
echo -e "${G}MySQL is up and running!"
fi
if ${{ inputs.mongo }}; then
echo -e "${Y}Starting mongo container..." &&
docker run -d -p 27004:27017 metabase/qa-databases:mongo-sample-4.4 &&
echo -e "${Y}checking mongo container..." &&
while ! nc -z localhost 27004; do sleep 1; done &&
echo -e "${G}Mongo is up and running!"
fi
if ${{ inputs.webhook }}; then
echo -e "${Y}Starting webhook test container..." &&
docker run -d -p 9080:8080/tcp tarampampam/webhook-tester serve --create-session 00000000-0000-0000-0000-000000000000 &&
echo -e "${Y}checking webhook test container..." &&
while ! nc -z localhost 9080; do sleep 1; done &&
echo -e "${G}Webhook tester is up and running!"
fi
shell: bash
if ${{ inputs.snowplow }}; then
echo -e "${Y}checking snowplow micro container..." &&
while ! nc -z localhost 9090; do sleep 1; done &&
echo -e "${G}Snowplow micro is up and running!"
fi

View File

@@ -0,0 +1,105 @@
name: Fetch artifact
description: Fetches a specific artifact and downloads it to the current directory
inputs:
name:
description: The name of the artifact to fetch
required: true
output-name:
description: Optional custom name for the output jar file (defaults to metabase.jar)
required: false
default: "metabase.jar"
extract-path:
description: Directory path where the jar should be extracted (defaults to current directory)
required: false
default: "."
runs:
using: "composite"
steps:
- name: find_release_artifact
id: find_release_artifact
uses: actions/github-script@v7
with:
result-encoding: string
script: | # js
const fs = require('fs');
const artifacts = await github.rest.actions.listArtifactsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
name: "${{ inputs.name }}",
per_page: 1,
});
if (!artifacts.data?.artifacts?.[0]?.id) {
throw new Error(`No artifacts found for ${{ inputs.name }}`);
}
const artifact_id = artifacts.data.artifacts[0].id;
const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact_id,
archive_format: 'zip',
});
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/mb.zip`, Buffer.from(download.data));
- name: Extract and rename JAR
shell: bash
run: | # bash
OUTPUT_NAME="${{ inputs.output-name }}"
EXTRACT_PATH="${{ inputs.extract-path }}"
# Create a temporary directory for extraction to avoid conflicts
TEMP_DIR=$(mktemp -d)
# Extract to temporary directory
unzip mb.zip -d "$TEMP_DIR"
# Create target directory
mkdir -p "$EXTRACT_PATH"
# Find the jar and move all files from its directory
if [ -e "$TEMP_DIR/metabase.jar" ]; then
# Move all files to extract path
mv "$TEMP_DIR"/* "$EXTRACT_PATH/" 2>/dev/null || true
# Rename the jar to custom name if different
if [ "$OUTPUT_NAME" != "metabase.jar" ]; then
mv "$EXTRACT_PATH/metabase.jar" "$EXTRACT_PATH/$OUTPUT_NAME"
fi
elif [ -e "$TEMP_DIR/target/uberjar/metabase.jar" ]; then
# Move all files from uberjar directory to extract path
mv "$TEMP_DIR/target/uberjar"/* "$EXTRACT_PATH/" 2>/dev/null || true
# Rename the jar to custom name if different
if [ "$OUTPUT_NAME" != "metabase.jar" ]; then
mv "$EXTRACT_PATH/metabase.jar" "$EXTRACT_PATH/$OUTPUT_NAME"
fi
else
echo "Could not find metabase.jar in extracted files"
exit 1
fi
# Clean up temporary directory
rm -rf "$TEMP_DIR"
# Set the JAR_PATH environment variable
if [ "$EXTRACT_PATH" == "." ]; then
echo "JAR_PATH=$OUTPUT_NAME" >> $GITHUB_ENV
else
echo "JAR_PATH=$EXTRACT_PATH/$OUTPUT_NAME" >> $GITHUB_ENV
fi
- name: Verify that this is a valid JAR file
shell: bash
run: |
echo "Verifying JAR at: $JAR_PATH"
file --mime-type "$JAR_PATH"
- name: Reveal its version.properties
shell: bash
run: |
echo "Extracting version.properties from: $JAR_PATH"
jar xf "$JAR_PATH" version.properties && cat version.properties

View File

@@ -28,3 +28,5 @@ runs:
env:
PULL_REQUEST_NUMBER: ${{ inputs.pull-request-number }}
BASE_REF: ${{ inputs.base-ref }}
- run: git checkout ${{ github.sha }} # return to original commit
shell: bash

View File

@@ -0,0 +1,74 @@
name: Get Docker Info
description: Determines Docker repository and tag based on branch and edition
inputs:
branch:
description: Branch name (defaults to current branch)
required: false
default: ${{ github.head_ref || github.ref_name }}
edition:
description: Edition (ee or oss)
required: false
default: ee
owner:
description: Repository owner (defaults to current repo owner)
required: false
default: ${{ github.repository_owner }}
outputs:
repo:
description: Docker repository name
value: ${{ steps.docker-info.outputs.repo }}
tag:
description: Docker tag
value: ${{ steps.docker-info.outputs.tag }}
full_image:
description: Full Docker image name (repo:tag)
value: ${{ steps.docker-info.outputs.full_image }}
editions:
description: JSON array of editions to build
value: ${{ steps.docker-info.outputs.editions }}
runs:
using: "composite"
steps:
- name: Determine Docker info
id: docker-info
uses: actions/github-script@v7
with:
script: | # js
const branch = '${{ inputs.branch }}';
const edition = '${{ inputs.edition }}';
const owner = '${{ inputs.owner }}';
console.log(`Determining Docker info for branch: ${branch}, edition: ${edition}`);
let repo, tag, editions;
if (branch === 'master') {
// Master builds both editions with specific repos
editions = ['ee', 'oss'];
tag = 'latest';
if (edition === 'ee') {
repo = `${owner}/metabase-enterprise-head`;
} else {
repo = `${owner}/metabase-head`;
}
} else {
// All other branches only build EE to metabase-dev
editions = ['ee'];
tag = branch.replaceAll('/', '-'); // slashes make docker sad
repo = `${owner}/metabase-dev`;
}
const fullImage = `${repo}:${tag}`;
// Set outputs
core.setOutput('repo', repo);
core.setOutput('tag', tag);
core.setOutput('full_image', fullImage);
core.setOutput('editions', JSON.stringify(editions));
console.log(`Docker image: ${fullImage}`);
console.log(`Editions: ${JSON.stringify(editions)}`);

View File

@@ -1,41 +0,0 @@
name: Get latest release branch
outputs:
branch-name:
value: ${{ steps.get-latest-release-branch.outputs.result }}
runs:
using: "composite"
steps:
- uses: actions/github-script@v7
id: get-latest-release-branch
with:
result-encoding: string
script: |
const releaseBranches = await github.rest.git.listMatchingRefs({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "heads/release-x.",
});
const getVersionFromBranch = branch => {
const match = branch.match(/release-x\.(.*?)\.x$/);
return match && parseInt(match[1]);
};
const latestReleaseBranch = releaseBranches.data
.filter(branch => getVersionFromBranch(branch.ref) !== null)
.reduce(
(prev, current) =>
getVersionFromBranch(prev.ref) > getVersionFromBranch(current.ref)
? prev
: current,
{ ref: "" },
);
const latestReleaseBranchName = latestReleaseBranch.ref.replace(
/^refs\/heads\//,
"",
);
console.log(`Latest release branch: ${latestReleaseBranchName}`);
return latestReleaseBranchName;

View File

@@ -1,5 +1,13 @@
name: Notify Pull Request
inputs:
remove-previous-comment:
required: false
type: boolean
default: false
add-new-comment:
required: false
type: boolean
default: true
message:
required: true
include-log:
@@ -9,12 +17,56 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/github-script@v7
id: get-latest-release-branch
- name: Remove previous pull-request comment
uses: actions/github-script@v7
if: ${{ inputs.remove-previous-comment == 'true' && always() && github.event_name == 'pull_request' }}
with:
script: |
const pr = context.payload.pull_request ?? context.payload.issue;
if (!pr) {
console.error("This action can only be run on pull requests");
return;
}
const { owner, repo } = context.repo;
const { data: comments } = await github.rest.issues.listComments({
owner,
repo,
issue_number: pr.number,
}).catch(console.error);
if (!comments) {
return;
}
const message = "${{ inputs.message }}";
const comment = comments.find((comment) => comment.body.includes(message));
if (comment) {
await github.rest.issues.deleteComment({
owner,
repo,
comment_id: comment.id,
});
}
- name: Notify pull-request
uses: actions/github-script@v7
if: ${{ inputs.add-new-comment == 'true' && always() && github.event_name == 'pull_request' }}
id: notify-pull-request
with:
result-encoding: string
script: |
const message = "${{ inputs.message }}"
script: | # js
const pr = context.payload.pull_request ?? context.payload.issue;
if (!pr) {
console.error("This action can only be run on pull requests");
return;
}
const message = "${{ inputs.message }}";
const shouldIncludeLog = ${{ inputs.include-log }}.toString() === "true";
const author = context.payload.sender.login;
@@ -27,7 +79,7 @@ runs:
}
github.rest.issues.createComment({
issue_number: context.payload.issue.number,
issue_number: pr.number,
owner: context.repo.owner,
repo: context.repo.repo,
body,

View File

@@ -1,11 +1,14 @@
name: Prepare back-end environment
description: |
Prepare the backend. Installs jdk, Clojure, and fetches the cache for m2. The CI config fetchs `ci-test-config.json`
from master and lets us ignore tests at the var level if they are flaking.
inputs:
java-version:
required: true
default: '21'
clojure-version:
required: true
default: '1.11.1.1262'
default: '1.12.0.1488'
m2-cache-key:
description: 'Key to cache M2 packages from Maven Central'
required: true
@@ -21,9 +24,14 @@ runs:
distribution: 'temurin'
- name: Install Clojure CLI
shell: bash
continue-on-error: true
run: |
curl -O https://download.clojure.org/install/linux-install-${{ inputs.clojure-version }}.sh &&
sudo bash ./linux-install-${{ inputs.clojure-version }}.sh
- name: Fetch CI config
shell: bash
run: |
curl -o ci-test-config.json https://raw.githubusercontent.com/metabase/metabase/refs/heads/master/ci-test-config.json
- name: Check to see if dependencies should be cached
if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }}
run: echo "Commit message includes [ci nocache]; dependencies will NOT be cached"

View File

@@ -1,6 +1,12 @@
name: Prepare cypress environment
description: Cypress preparation steps
inputs:
working-directory:
description: "Optional working directory for yarn commands"
required: false
default: "."
outputs:
chrome-path:
description: Path to the custom Chrome executable
@@ -33,3 +39,4 @@ runs:
yarn cypress cache list
yarn cypress verify
shell: bash
working-directory: ${{ inputs.working-directory }}

View File

@@ -33,18 +33,5 @@ runs:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock', '**/patches/*.patch') }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/cache@v4
if: steps.node-modules-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile --prefer-offline
shell: bash

View File

@@ -1,13 +0,0 @@
name: Run Snowplow micro
runs:
using: "composite"
steps:
- name: Download Snowplow micro JAR
run: curl -L -o snowplow-micro.jar https://github.com/snowplow-incubator/snowplow-micro/releases/download/micro-1.2.1/snowplow-micro-1.2.1.jar
shell: bash
- name: Launch Snowplow micro
run: java -cp snowplow-micro.jar:snowplow com.snowplowanalytics.snowplow.micro.Main --collector-config snowplow/micro.conf --iglu snowplow/iglu.json &
shell: bash
- name: Wait until Snowplow micro is ready
run: while ! curl -s 'http://localhost:9090' | grep '404'; do sleep 1; done
shell: bash

Some files were not shown because too many files have changed in this diff Show More