Compare commits

...

474 Commits

Author SHA1 Message Date
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
4247 changed files with 489874 additions and 414805 deletions

View File

@@ -76,8 +76,13 @@
;;
;; TODO -- these should all be made thread safe if possible or renamed so they end in `!`. Then we can remove them
;; from this list because by default anything ending in `!` is considered to be thread-unsafe
;;
;; TODO (Cam 6/19/25) -- move this into the `test-helpers/config.edn` file so they can live with their friends.
:parallel/unsafe
#{clojure.core/alter-var-root
#{java.util.Locale/setDefault
java.lang.System/setProperty
java.lang.System/setProperties
clojure.core/alter-var-root
clojure.core/with-redefs
clojure.core/with-redefs-fn
metabase.actions.test-util/with-actions
@@ -96,7 +101,6 @@
metabase.test.util/with-all-users-permission
metabase.test.util/with-discarded-collections-perms-changes
metabase.test.util/with-env-keys-renamed-by
metabase.test.util/with-locale
metabase.test.util/with-model-cleanup
metabase.test.util/with-non-admin-groups-no-root-collection-for-namespace-perms
metabase.test.util/with-non-admin-groups-no-root-collection-perms
@@ -119,7 +123,6 @@
metabase.test/with-fake-inbox
metabase.test/with-group
metabase.test/with-group-for-user
metabase.test/with-locale
metabase.test/with-log-level
metabase.test/with-model-cleanup
metabase.test/with-non-admin-groups-no-root-collection-for-namespace-perms
@@ -232,6 +235,8 @@
(metabase.driver.druid.query-processor-test/druid-query-returning-rows)
(metabase.lib.util.match/match)
(metabase.lib.util.match/match-one)
(metabase.lib.util.match/match-lite)
(metabase.lib.util.match/match-lite-recursive)
(metabase.lib.util.match/replace)
(metabase.lib.util.match/replace-in)
(metabase.driver-api.core/match)
@@ -287,7 +292,9 @@
medley.core/random-uuid {:message "Use clojure.core/random-uuid instead of medley.core/random-uuid"}
metabase.driver/database-supports? {:message "Use metabase.driver.util/supports? instead of metabase.driver/database-supports?"}
metabase.lib.equality/find-column-indexes-for-refs {:message "Use lib.equality/closest-matches-in-metadata or lib.equality/find-closest-matches-for-refs instead of lib.equality/find-column-indexes-for-refs"}
next.jdbc/active-tx? {:message "Use metabase.app-db.core/in-transaction? to see if we are in a transaction"}}
next.jdbc/active-tx? {:message "Use metabase.app-db.core/in-transaction? to see if we are in a transaction"}
toucan2.core/debug {:message "Don't commit code using t2/debug"}
toucan2.tools.debug/debug {:message "Don't commit code using t2/debug"}}
:discouraged-namespace
{camel-snake-kebab.core {:message "CSK is not Turkish-safe, use the versions in metabase.util instead."}
@@ -518,6 +525,7 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.dashboards.models.dashboard-tab-test/with-dashtab-in-personal-collection hooks.common/with-one-top-level-binding
metabase.dashboards.models.dashboard-test/with-dash-in-collection! hooks.common/with-three-bindings
metabase.driver.bigquery-cloud-sdk-test/calculate-bird-scarcity hooks.metabase.query-processor-test.expressions-test/calculate-bird-scarcity
metabase.driver.mongo-test/with-describe-table-for-sample hooks.metabase.driver.mongo-test/with-describe-table-for-sample
metabase.driver.oracle-test/with-temp-user hooks.common/let-one-with-optional-value
metabase.driver/register! hooks.metabase.driver/register!
metabase.driver-api/defenterprise hooks.metabase.premium-features.defenterprise/defenterprise
@@ -690,6 +698,8 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
:name printable-namespaces}
{:pattern "^metabase\\.(?:(?:lib)|(?:legacy-mbql))\\..*"
:name metabase-lib}
{:pattern "^metabase\\.lib\\..*"
:name metabase-lib-excluding-legacy-mbql}
;;
;; QP source namespaces: `metabase.query-processor.*`, `metabase-enterprise.sandbox.query-processor.*`, and
;; `metabase.driver.*`, excluding `-test` namespaces.
@@ -770,6 +780,11 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
toucan.util.test {:message "Don't use application database inside MLv2 code"}
toucan2.core {:message "Don't use application database inside MLv2 code"}}}}
metabase-lib-excluding-legacy-mbql
{:linters
{:discouraged-var
{metabase.legacy-mbql.util/unique-name-generator {:message "Use metabase.lib.util/unique-name-generator or non-truncating-unique-name-generator"}}}}
driver-namespaces
{:linters
{:discouraged-var

View File

@@ -324,8 +324,10 @@
audit-app
config
driver
eid-translation
events
legacy-mbql
lib-be
models
notification
permissions
@@ -388,6 +390,7 @@
channel
collections
config
eid-translation
embedding
events
lib
@@ -573,15 +576,16 @@
metabase.lib.core
metabase.lib.equality
metabase.lib.field
metabase.lib.field.resolution
metabase.lib.filter
metabase.lib.ident
metabase.lib.init
metabase.lib.join.util
metabase.lib.metadata
metabase.lib.metadata.cached-provider
metabase.lib.metadata.calculation
metabase.lib.metadata.invocation-tracker
metabase.lib.metadata.protocols
metabase.lib.metadata.result-metadata
metabase.lib.normalize
metabase.lib.options
metabase.lib.query
@@ -594,6 +598,7 @@
metabase.lib.schema.expression.window
metabase.lib.schema.id
metabase.lib.schema.info
metabase.lib.schema.join
metabase.lib.schema.literal
metabase.lib.schema.metadata
metabase.lib.schema.parameter
@@ -755,17 +760,7 @@
{:team "Admin Webapp"
:api #{metabase.permissions.api
metabase.permissions.core
metabase.permissions.init
;; TODO -- move these into the API namespace.
metabase.permissions.models.application-permissions-revision
metabase.permissions.models.collection-permission-graph-revision
metabase.permissions.models.collection.graph
metabase.permissions.models.data-permissions
metabase.permissions.models.permissions
metabase.permissions.models.permissions-group
metabase.permissions.path
metabase.permissions.util
metabase.permissions.validation}
metabase.permissions.init}
:uses #{api
app-db
audit-app
@@ -885,6 +880,7 @@
config
content-verification
dashboards
eid-translation
embedding
events
legacy-mbql
@@ -1355,6 +1351,7 @@
metabase.warehouse-schema.metadata-from-qp
metabase.warehouse-schema.metadata-queries
metabase.warehouse-schema.models.field
metabase.warehouse-schema.models.field-user-settings
metabase.warehouse-schema.models.field-values
metabase.warehouse-schema.models.table
metabase.warehouse-schema.table}
@@ -1363,6 +1360,7 @@
api
app-db
audit-app
database-routing
driver
events
lib
@@ -1587,12 +1585,24 @@
api
util}}
enterprise/database-replication
{:team "Cloud"
:api #{metabase-enterprise.database-replication.api
metabase-enterprise.database-replication.init}
:uses #{analytics
api
premium-features
settings
util
enterprise/harbormaster}}
enterprise/database-routing
{:team "Admin Webapp"
:api #{metabase-enterprise.database-routing.api}
:uses #{api
config
database-routing
driver
events
lib
models
@@ -1603,6 +1613,17 @@
warehouse-schema
warehouses}}
enterprise/email
{:team "Admin Webapp"
:api #{metabase-enterprise.email.api}
:uses #{api
channel
permissions
premium-features
settings
util}}
enterprise/gsheets
{:team "Cloud"
:api #{metabase-enterprise.gsheets.api
@@ -1663,6 +1684,7 @@
app-db
collections
config
driver
legacy-mbql
lib
lib-be
@@ -1672,12 +1694,23 @@
pulse
query-processor
request
server
settings
system
users
util
warehouse-schema}}
enterprise/permission-debug
{:team "Admin Webapp"
:api #{metabase-enterprise.permission-debug.api}
:uses #{api
lib
models
permissions
query-processor
util}}
enterprise/premium-features
{:team "Admin Webapp"
:api #{}

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

@@ -139,6 +139,7 @@
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

View File

@@ -120,6 +120,10 @@
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]]
@@ -151,6 +155,8 @@
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]]

View File

@@ -315,6 +315,12 @@ module.exports = {
],
},
},
{
files: ["frontend/src/metabase/query_builder/**/*"],
rules: {
"import/no-cycle": "error",
},
},
{
files: ["docs/**/snippets/**/*.{ts,tsx,js,jsx}"],
rules: {

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

@@ -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:1.1.0 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

@@ -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

View File

@@ -1,17 +0,0 @@
# The reviewers configuration for the auto_request_review workflow
# See https://github.com/necojackarc/auto-request-review/tree/master?tab=readme-ov-file#reviewers-configuration
# for the spec
files:
# migrations related files
'resources/migrations/**':
- team:core-workflows
'src/metabase/app_db/custom_migrations.clj':
- team:core-workflows
options:
ignore_draft: true
ignored_keywords:
- DO NOT REVIEW
- WIP
enable_group_assignment: false

View File

@@ -16,10 +16,12 @@ frontend_ci: &frontend_ci
- ".github/actions/prepare-backend/**"
- ".github/workflows/frontend.yml"
frontend_sources: &frontend_sources
- *shared_sources
- "enterprise/frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
- "frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
frontend_embedding_sdk_ci: &frontend_embedding_sdk_ci
- ".github/actions/prepare-frontend/**"
- ".github/actions/prepare-backend/**"
- ".github/workflows/*embedding-sdk*.yml"
frontend_configs: &frontend_configs
- "yarn.lock"
- "**/tsconfig*.json"
- "package.json"
@@ -32,8 +34,15 @@ frontend_sources: &frontend_sources
- "webpack.static-viz.config.js"
- ".nvmrc"
frontend_sources: &frontend_sources
- *shared_sources
- *frontend_configs
- "enterprise/frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
- "frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
frontend_embedding_sdk_sources:
- *frontend_sources
- *frontend_configs
- "enterprise/frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
frontend_specs: &frontend_specs
- *shared_specs
@@ -105,25 +114,27 @@ e2e_ci: &e2e_ci
- ".github/actions/prepare-uberjar-artifact/**"
- ".github/actions/e2e-prepare-containers/**"
- ".github/actions/prepare-cypress/**"
- ".github/actions/run-snowplow-micro/**"
- ".github/workflows/e2e-*"
e2e_specs: &e2e_specs
- "**/*.cy.*.js"
- "**/*.cy.*.ts"
- e2e/!(test-host-app)**/*.cy.*.{js,ts}
e2e_cross_version: &e2e_cross_version
- ".github/workflows/e2e-cross-version.yml"
- "e2e/test/scenarios/cross-version/**"
e2e_embedding_sdk:
- *frontend_embedding_sdk_ci
- *sources
- "e2e/component/**/*.cy.*.{js,ts}"
e2e_embedding_sdk_compatibility:
- *default
- *e2e_ci
- *frontend_embedding_sdk_ci
- *frontend_sources
- "e2e/embedding-sdk-host-apps/**"
- "e2e/runner/embedding-sdk/**"
- "e2e/runner/test-host-app/**/*.cy.*.js"
- "e2e/runner/test-host-app/**/*.cy.*.ts"
- "e2e/test-host-app/**/*.cy.*.{js,ts}"
e2e_all:
- *default
@@ -137,10 +148,13 @@ snowplow:
- "snowplow/**"
documentation:
- ".typedoc/**"
- "docs/**"
- "**/*.md"
embedding_documentation:
- ".typedoc/**"
- "docs/embedding/**"
yaml:
- "**/*.yml"
- "**/*.yaml"

4
.github/team.json vendored
View File

@@ -106,7 +106,9 @@
{
"name": "Cloud",
"label": "cloud",
"members": []
"members": [
"filipesilva"
]
}
]
}

405
.github/workflows/app-db.yml vendored Normal file
View File

@@ -0,0 +1,405 @@
name: App DB Tests
on:
workflow_call:
inputs:
skip:
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}-app-db
cancel-in-progress: true
jobs:
be-tests-mariadb:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version:
- name: MariaDB 10.2
junit-name: be-tests-mariadb-10-2-ee
image: circleci/mariadb:10.2.23
env:
enable-ssl-tests: 'false'
- name: MariaDB Latest
junit-name: be-tests-mariadb-latest-ee
image: circleci/mariadb:latest
env:
enable-ssl-tests: 'false'
job:
- name: Enterprise Tests
build-static-viz: false
test-args: >-
:only '"enterprise/backend/test"'
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 1)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 0
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 2)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 1
exclude-tag: ':mb/driver-tests'
services:
mysql:
image: ${{ matrix.version.image }}
ports:
- "3306:3306"
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: circle_test
env:
# Only run old migrations tests on pushes to master or release branches. All other branches should skip tests
# with the tag `mb/old-migrations-test`. `__ADDITIONAL_EXCLUDED_TAG__` is not used anywhere outside of splicing
# it in to the command below.
__ADDITIONAL_EXCLUDED_TAG__: >-
${{
(
github.event_name == 'push' &&
(
github.ref == 'master' ||
startsWith(github.ref, 'release-')
) &&
''
) ||
':mb/old-migrations-test'
}}
# actual serious env vars below
CI: 'true'
DRIVERS: mysql
MB_DB_TYPE: mysql
MB_DB_HOST: localhost
MB_DB_PORT: 3306
MB_DB_DBNAME: circle_test
MB_DB_USER: root
MB_MYSQL_TEST_USER: root
#
# SSL config: only for mysql latest tests.
#
# set up env vars for something named "MYSQL_SSL" to run MySQL SSL tests verifying connectivity with PEM cert
# they are deliberately given a different name to prevent them from affecting the regular test run against
# the configured MySQL instance, but there is one particular test (mysql-connect-with-ssl-and-pem-cert-test)
# that overrides the MB_MYSQL_TEST_* values with them
# the MYSQL_RDS_SSL_INSTANCE vars are defined as secrets and can be altered
MB_MYSQL_SSL_TEST_SSL: ${{ matrix.version.env.enable-ssl-tests }}
MB_MYSQL_SSL_TEST_HOST: ${{ secrets.MYSQL_RDS_SSL_INSTANCE_HOST }}
MB_MYSQL_SSL_TEST_ADDITIONAL_OPTIONS: 'verifyServerCertificate=true'
# the contents of the ./resources/certificates/rds-combined-ca-bundle.pem file
MB_MYSQL_SSL_TEST_SSL_CERT: ${{ secrets.MB_MYSQL_SSL_TEST_SSL_CERT }}
MB_MYSQL_SSL_TEST_USER: metabase
MB_MYSQL_SSL_TEST_PASSWORD: ${{ secrets.MYSQL_RDS_SSL_INSTANCE_PASSWORD }}
# for historic reasons (I don't want to mess around with required jobs) the job name should be something like
# "be-tests-mariadb-10-2-ee (0)"
name: "${{ matrix.version.name }} ${{ matrix.job.name }}"
steps:
- uses: actions/checkout@v4
- name: Test ${{ matrix.version.name }}
uses: ./.github/actions/test-driver
with:
build-static-viz: ${{ matrix.job.build-static-viz }}
junit-name: ${{ matrix.version.junit-name }}
test-args: >-
${{ matrix.job.test-args }}
:exclude-tags '[ ${{ matrix.job.exclude-tag }} ${{ env.__ADDITIONAL_EXCLUDED_TAG__ }}]'
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
bucket: ${{ vars.AWS_S3_TEST_RESULTS_BUCKET }}
aws-access-key-id: ${{ secrets.AWS_TEST_RESULTS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-mysql:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version:
- name: MySQL 8.0
junit-name: be-tests-mysql-8-0-ee
image: cimg/mysql:8.0
env:
enable-ssl-tests: 'false'
- name: MySQL Latest
junit-name: be-tests-mysql-latest-ee
image: mysql:latest
env:
enable-ssl-tests: 'true'
job:
- name: Enterprise Tests
build-static-viz: false
test-args: >-
:only '"enterprise/backend/test"'
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 1)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 0
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 2)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 1
exclude-tag: ':mb/driver-tests'
services:
mysql:
image: ${{ matrix.version.image }}
ports:
- "3306:3306"
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: circle_test
env:
# Only run old migrations tests on pushes to master or release branches. All other branches should skip tests
# with the tag `mb/old-migrations-test`. `__ADDITIONAL_EXCLUDED_TAG__` is not used anywhere outside of splicing
# it in to the command below.
__ADDITIONAL_EXCLUDED_TAG__: >-
${{
(
github.event_name == 'push' &&
(
github.ref == 'master' ||
startsWith(github.ref, 'release-')
) &&
''
) ||
':mb/old-migrations-test'
}}
# actual serious env vars below
CI: 'true'
DRIVERS: mysql
MB_DB_TYPE: mysql
MB_DB_HOST: localhost
MB_DB_PORT: 3306
MB_DB_DBNAME: circle_test
MB_DB_USER: root
MB_MYSQL_TEST_USER: root
#
# SSL config: only for mysql latest tests.
#
# set up env vars for something named "MYSQL_SSL" to run MySQL SSL tests verifying connectivity with PEM cert
# they are deliberately given a different name to prevent them from affecting the regular test run against
# the configured MySQL instance, but there is one particular test (mysql-connect-with-ssl-and-pem-cert-test)
# that overrides the MB_MYSQL_TEST_* values with them
# the MYSQL_RDS_SSL_INSTANCE vars are defined as secrets and can be altered
MB_MYSQL_SSL_TEST_SSL: ${{ matrix.version.env.enable-ssl-tests }}
MB_MYSQL_SSL_TEST_HOST: ${{ secrets.MYSQL_RDS_SSL_INSTANCE_HOST }}
MB_MYSQL_SSL_TEST_ADDITIONAL_OPTIONS: 'verifyServerCertificate=true'
# the contents of the ./resources/certificates/rds-combined-ca-bundle.pem file
MB_MYSQL_SSL_TEST_SSL_CERT: ${{ secrets.MB_MYSQL_SSL_TEST_SSL_CERT }}
MB_MYSQL_SSL_TEST_USER: metabase
MB_MYSQL_SSL_TEST_PASSWORD: ${{ secrets.MYSQL_RDS_SSL_INSTANCE_PASSWORD }}
# for historic reasons (I don't want to mess around with required jobs) the job name should be something like
# "be-tests-mariadb-10-2-ee (0)"
name: "${{ matrix.version.name }} ${{ matrix.job.name }}"
steps:
- uses: actions/checkout@v4
- name: Test ${{ matrix.version.name }}
uses: ./.github/actions/test-driver
with:
build-static-viz: ${{ matrix.job.build-static-viz }}
junit-name: ${{ matrix.version.junit-name }}
test-args: >-
${{ matrix.job.test-args }}
:exclude-tags '[ ${{ matrix.job.exclude-tag }} ${{ env.__ADDITIONAL_EXCLUDED_TAG__ }}]'
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
bucket: ${{ vars.AWS_S3_TEST_RESULTS_BUCKET }}
aws-access-key-id: ${{ secrets.AWS_TEST_RESULTS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-postgres:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version:
- name: Postgres 12.x
junit-name: postgres-ee
docker-image: postgres:12-alpine
env:
enable-ssl-tests: 'false'
- name: Postgres Latest
junit-name: postgres-latest-ee
docker-image: postgres:latest
env:
enable-ssl-tests: 'true'
job:
- name: Driver Tests
build-static-viz: false
test-args: >-
:only-tags [:mb/driver-tests]
- name: Enterprise Tests
build-static-viz: false
test-args: >-
:only '"enterprise/backend/test"'
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 1)
build-static-viz: true
test-args: >-
:only '"test"'
:exclude-tags [:mb/driver-tests]
:partition/total 2
:partition/index 0
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 2)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 1
exclude-tag: ':mb/driver-tests'
name: "${{ matrix.version.name }} ${{ matrix.job.name }}"
env:
# Only run old migrations tests on pushes to master or release branches. All other branches should skip tests
# with the tag `mb/old-migrations-test`. `__ADDITIONAL_EXCLUDED_TAG__` is not used anywhere outside of splicing
# it in to the command below.
__ADDITIONAL_EXCLUDED_TAG__: >-
${{
(
github.event_name == 'push' &&
(
github.ref == 'master' ||
startsWith(github.ref, 'release-')
) &&
''
) ||
':mb/old-migrations-test'
}}
# actual serious env vars below
CI: 'true'
DRIVERS: postgres
MB_DB_TYPE: postgres
MB_DB_PORT: 5432
MB_DB_HOST: localhost
MB_DB_DBNAME: mb_test
MB_DB_USER: mb_test
MB_POSTGRESQL_TEST_USER: mb_test
# SSL tests are only enabled for the postgres-latest job.
MB_POSTGRES_SSL_TEST_SSL: ${{ matrix.version.env.enable-ssl-tests }}
MB_POSTGRES_SSL_TEST_SSL_MODE: verify-full
MB_POSTGRES_SSL_TEST_SSL_ROOT_CERT_PATH: 'test-resources/certificates/us-east-2-bundle.pem'
services:
postgres:
image: ${{ matrix.version.docker-image }}
ports:
- "5432:5432"
env:
POSTGRES_USER: mb_test
POSTGRES_DB: mb_test
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- uses: actions/checkout@v4
- name: Test ${{ matrix.version.name }} (${{ matrix.job.name }})
uses: ./.github/actions/test-driver
with:
build-static-viz: ${{ matrix.job.build-static-viz }}
junit-name: 'be-tests-${{ matrix.version.junit-name }}'
test-args: >-
${{ matrix.job.test-args }}
:exclude-tags '[ ${{ matrix.job.exclude-tag }} ${{ env.__ADDITIONAL_EXCLUDED_TAG__ }}]'
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
bucket: ${{ vars.AWS_S3_TEST_RESULTS_BUCKET }}
aws-access-key-id: ${{ secrets.AWS_TEST_RESULTS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
app-db-tests-result:
needs:
- be-tests-mariadb
- be-tests-mysql
- be-tests-postgres
runs-on: ubuntu-latest
timeout-minutes: 5
name: app-db-tests-result
if: always() && !cancelled()
steps:
- name: Check job status
uses: actions/github-script@v7
env:
needs: ${{ toJson(needs) }}
with:
script: | # js
const needs = JSON.parse(process.env.needs);
const jobs = Object.entries(needs).map(
([jobName, jobValues]) => ({
name: jobName,
result: jobValues.result
}));
// are all jobs skipped or successful?
if (jobs.every(job => (job.result === 'skipped' || job.result === 'success'))) {
console.log("");
console.log(" _------. ");
console.log(" / , \_ ");
console.log(" / / /{}\ |o\_ ");
console.log(" / \ `--' /-' \ ");
console.log(" | \ \ | ");
console.log(" | |`-, | ");
console.log(" / /__/)/ ");
console.log(" | | ");
console.log("");
console.log("All app db tests have passed (or have been skipped). Cam is very proud of you.");
process.exit(0);
}
// otherwise, something failed
console.log("");
console.log(" .::::::::::. .::::::::::. ");
console.log(" .::::''''''::::. .::::''''''::::. ");
console.log(" .:::' `::::.... ....::::' `:::. ");
console.log(" .::' `:::::::| |:::::::' `::. ");
console.log(" .::| |::::::|_ ___ __|::::::| |::. ");
console.log(" `--' |::::::|_()__()_|::::::| `--' ");
console.log(" ::: |::-o::| |::o-::| ::: ");
console.log(" `::. .|::::::| |::::::|. .::' ");
console.log(" `:::. .::\-----' `-----/::. .:::' ");
console.log(" `::::......::::' `::::......::::' ");
console.log(" `::::::::::' `::::::::::' ");
console.log("");
console.log("App db tests have failed. You have been sentenced to MetaJail.");
jobs.forEach((job) => {
if (job.result !== 'success') {
console.log(`${job.name} - ${job.result}`);
}
});
process.exit(1);

View File

@@ -1,21 +0,0 @@
# Config is in .github/auto_request_review.yml
name: Auto Request Review
on:
pull_request:
types: [opened, ready_for_review, reopened, synchronize]
jobs:
auto-request-review:
# Don't run on forked repos
if: ${{ !github.event.pull_request.head.repo.fork }}
permissions:
contents: read
pull-requests: write
name: Auto Request Review
runs-on: ubuntu-latest
steps:
- name: Request review based on files changes and/or groups the author belongs to
uses: necojackarc/auto-request-review@v0.13.0
with:
token: '${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}'

View File

@@ -5,6 +5,7 @@ on:
types: [auto_merge_enabled, review_requested, labeled, unlabeled, synchronize]
branches:
- "master"
merge_group:
jobs:
backport-reminder:

View File

@@ -3,6 +3,7 @@ name: Prevent backport.sh from being merged
on:
pull_request:
types: [opened, synchronize, reopened]
merge_group:
jobs:
check-backport-script:

21
.github/workflows/claude.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Claude Assistant
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned, labeled]
pull_request_review:
types: [submitted]
jobs:
claude-response:
runs-on: ubuntu-latest
steps:
- run: git config --global --add safe.directory /__w/metabase/metabase
- uses: actions/checkout@v4
- uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}

26
.github/workflows/coverage.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Test coverage
on:
schedule:
- cron: '40 1 * * *' # every day at 1:40
jobs:
fe-test-coverage:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Run frontend unit tests
run: yarn run test-unit --silent --coverage
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
flags: front-end
token: ${{ secrets.CODECOV_TOKEN }}

View File

@@ -5,6 +5,19 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "resources/migrations/**"
workflow_dispatch:
inputs:
base-ref:
description: 'Base reference for the migration test'
required: true
type: string
head-ref:
description: 'Head reference for the migration test'
required: true
type: string
env:
BASE_REF: ${{ inputs.base-ref || github.base_ref }}
HEAD_REF: ${{ inputs.head-ref || github.head_ref }}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
@@ -13,19 +26,21 @@ concurrency:
jobs:
migrations-h2-ee:
runs-on: ubuntu-22.04
timeout-minutes: 5
timeout-minutes: 10
env:
CI: 'true'
MB_DB_TYPE: h2
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cross-branch-migration-test
with:
base-ref: ${{ github.base_ref }}
base-ref: ${{ env.BASE_REF }}
head-ref: ${{ env.HEAD_REF }}
migrations-postgres-12-ee:
runs-on: ubuntu-22.04
timeout-minutes: 5
timeout-minutes: 10
env:
CI: 'true'
MB_DB_TYPE: postgres
@@ -46,11 +61,12 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/cross-branch-migration-test
with:
base-ref: ${{ github.base_ref }}
base-ref: ${{ env.BASE_REF }}
head-ref: ${{ env.HEAD_REF }}
migrations-postgres-latest-ee:
runs-on: ubuntu-22.04
timeout-minutes: 5
timeout-minutes: 10
env:
CI: 'true'
MB_DB_TYPE: postgres
@@ -71,11 +87,12 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/cross-branch-migration-test
with:
base-ref: ${{ github.base_ref }}
base-ref: ${{ env.BASE_REF }}
head-ref: ${{ env.HEAD_REF }}
migrations-mysql-8-0-ee:
runs-on: ubuntu-22.04
timeout-minutes: 5
timeout-minutes: 10
env:
CI: 'true'
MB_DB_TYPE: mysql
@@ -92,11 +109,12 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/cross-branch-migration-test
with:
base-ref: ${{ github.base_ref }}
base-ref: ${{ env.BASE_REF }}
head-ref: ${{ env.HEAD_REF }}
migrations-mysql-latest-ee:
runs-on: ubuntu-22.04
timeout-minutes: 5
timeout-minutes: 10
env:
CI: 'true'
MB_DB_TYPE: mysql
@@ -117,11 +135,12 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/cross-branch-migration-test
with:
base-ref: ${{ github.base_ref }}
base-ref: ${{ env.BASE_REF }}
head-ref: ${{ env.HEAD_REF }}
migrations-mariadb-10-2-ee:
runs-on: ubuntu-22.04
timeout-minutes: 5
timeout-minutes: 10
env:
CI: 'true'
MB_DB_TYPE: mysql
@@ -138,11 +157,12 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/cross-branch-migration-test
with:
base-ref: ${{ github.base_ref }}
base-ref: ${{ env.BASE_REF }}
head-ref: ${{ env.HEAD_REF }}
migrations-mariadb-latest-ee:
runs-on: ubuntu-22.04
timeout-minutes: 5
timeout-minutes: 10
env:
CI: 'true'
MB_DB_TYPE: mysql
@@ -159,4 +179,5 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/cross-branch-migration-test
with:
base-ref: ${{ github.base_ref }}
base-ref: ${{ env.BASE_REF }}
head-ref: ${{ env.HEAD_REF }}

View File

@@ -18,10 +18,15 @@ jobs:
env:
SOURCE_BRANCH: ${{ github.head_ref || github.ref }}
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- name: Report changed docs files exist
run: |
echo "A change in the docs directory was detected."
echo "A PR with changes in the docs directory was detected."
echo "Sending workflow trigger to create/update the corresponding PR in docs repo."
echo "source branch: $SOURCE_BRANCH"
echo "target branch: $TARGET_BRANCH"
echo "pr number: $PR_NUMBER"
- name: Trigger repo dispatch
uses: actions/github-script@v7
@@ -33,5 +38,7 @@ jobs:
repo: "docs.metabase.github.io",
event_type: "docs_update",
client_payload: {
dispatch_type: "docs_update",
source_branch: process.env.SOURCE_BRANCH,
target_branch: process.env.TARGET_BRANCH}});
target_branch: process.env.TARGET_BRANCH,
pr_number: process.env.PR_NUMBER}});

View File

@@ -0,0 +1,43 @@
name: Docs Close Detected
on:
pull_request:
types:
- closed
branches:
- 'master'
- 'release-x.[0-9]+.x'
paths:
- 'docs/**'
jobs:
push_and_merge_workflow_to_docs_metabase_github_io_job:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
env:
SOURCE_BRANCH: ${{ github.head_ref || github.ref }}
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- name: Report changed docs files exist
run: |
echo "A PR with changes to the docs directory was closed."
echo "Sending workflow trigger to close corresponding PR in docs repo."
echo "source branch: $SOURCE_BRANCH"
echo "target branch: $TARGET_BRANCH"
echo "pr number: $PR_NUMBER"
- name: Trigger repo dispatch
uses: actions/github-script@v7
with:
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
script: | #js
github.rest.repos.createDispatchEvent({
owner: "${{ github.repository_owner }}",
repo: "docs.metabase.github.io",
event_type: "docs_close",
client_payload: {
dispatch_type: "docs_close",
source_branch: process.env.SOURCE_BRANCH,
target_branch: process.env.TARGET_BRANCH,
pr_number: process.env.PR_NUMBER}});

View File

@@ -17,10 +17,15 @@ jobs:
env:
SOURCE_BRANCH: ${{ github.head_ref || github.ref }}
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- name: Report changed docs files exist
run: |
echo "A PR with changes to the docs directory was merged."
echo "Sending workflow trigger to merge corresponding PR in docs repo."
echo "source branch: $SOURCE_BRANCH"
echo "target branch: $TARGET_BRANCH"
echo "pr number: $PR_NUMBER"
- name: Trigger repo dispatch
uses: actions/github-script@v7
@@ -32,5 +37,7 @@ jobs:
repo: "docs.metabase.github.io",
event_type: "docs_merge",
client_payload: {
dispatch_type: "docs_merge",
source_branch: process.env.SOURCE_BRANCH,
target_branch: process.env.TARGET_BRANCH}});
target_branch: process.env.TARGET_BRANCH,
pr_number: process.env.PR_NUMBER}});

View File

@@ -12,8 +12,38 @@ concurrency:
cancel-in-progress: true
jobs:
# This job will determine if the tier 3 driver tests should be skipped.
# It will always run first.
determine-driver-skips:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_team_and_branch.outputs.skip }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check if tier3 drivers should run
id: check_team_and_branch
run: |
IS_MASTER_OR_RELEASE="${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') }}"
HAS_TEAM_LABEL="${{ contains(github.event.pull_request.labels.*.name, '.Team/Drivers') || contains(github.event.pull_request.labels.*.name, '.Team/Querying') || contains(github.event.pull_request.labels.*.name, '.Team/SemanticLayer') }}"
echo "Is master or release: ${IS_MASTER_OR_RELEASE}"
echo "Has '.Team/Drivers' or '.Team/Querying' or '.Team/SemanticLayer' label: ${HAS_TEAM_LABEL}"
if [[ "${IS_MASTER_OR_RELEASE}" == "true" ]]; then
echo "skip=false" >> $GITHUB_OUTPUT
echo "Merging into master or a release branch. Tier 3 driver tests will run."
elif [[ "${HAS_TEAM_LABEL}" == "true" ]]; then
echo "skip=false" >> $GITHUB_OUTPUT
echo "A relevant team label is present. Tier 3 driver tests will run."
else
echo "skip=true" >> $GITHUB_OUTPUT
echo "Not labeled with required team and not merging into master/release. Tier 3 driver tests will be skipped."
fi
shell: bash
be-tests-athena-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -60,6 +90,7 @@ jobs:
MB_BIGQUERY_TEST_ACCESS_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_ACCESS_TOKEN }}
MB_BIGQUERY_TEST_REFRESH_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_REFRESH_TOKEN }}
MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON: ${{ secrets.MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON }}
MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON_ROUTING: ${{ secrets.MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON_ROUTING }}
name: BigQuery
steps:
- uses: actions/checkout@v4
@@ -129,7 +160,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-druid-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -164,7 +196,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-druid-jdbc-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -199,7 +232,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-databricks-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -233,7 +267,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-databricks-multi-catalog-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -314,7 +349,7 @@ jobs:
enable-ssl-tests: 'false'
- name: MySQL 8.0
junit-name: be-tests-mysql-8-0-ee
image: cimg/mysql:8.0
image: mysql:8.0
env:
enable-ssl-tests: 'false'
- name: MySQL Latest
@@ -324,28 +359,8 @@ jobs:
enable-ssl-tests: 'true'
job:
- name: Driver Tests
build-static-viz: false
test-args: >-
:only-tags [:mb/driver-tests]
- name: Enterprise Tests
build-static-viz: false
test-args: >-
:only '"enterprise/backend/test"'
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 1)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 0
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 2)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 1
exclude-tag: ':mb/driver-tests'
services:
mysql:
@@ -403,7 +418,6 @@ jobs:
- name: Test ${{ matrix.version.name }}
uses: ./.github/actions/test-driver
with:
build-static-viz: ${{ matrix.job.build-static-viz }}
junit-name: ${{ matrix.version.junit-name }}
test-args: >-
${{ matrix.job.test-args }}
@@ -421,7 +435,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-mongo:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
@@ -470,7 +485,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-mongo-ssl:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
@@ -534,7 +550,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-mongo-sharded-cluster-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -567,7 +584,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-oracle:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
@@ -657,29 +675,8 @@ jobs:
enable-ssl-tests: 'true'
job:
- name: Driver Tests
build-static-viz: false
test-args: >-
:only-tags [:mb/driver-tests]
- name: Enterprise Tests
build-static-viz: false
test-args: >-
:only '"enterprise/backend/test"'
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 1)
build-static-viz: true
test-args: >-
:only '"test"'
:exclude-tags [:mb/driver-tests]
:partition/total 2
:partition/index 0
exclude-tag: ':mb/driver-tests'
- name: EE App DB Tests (Part 2)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 1
exclude-tag: ':mb/driver-tests'
name: "${{ matrix.version.name }} ${{ matrix.job.name }}"
env:
# Only run old migrations tests on pushes to master or release branches. All other branches should skip tests
@@ -724,7 +721,6 @@ jobs:
- name: Test ${{ matrix.version.name }} (${{ matrix.job.name }})
uses: ./.github/actions/test-driver
with:
build-static-viz: ${{ matrix.job.build-static-viz }}
junit-name: 'be-tests-${{ matrix.version.junit-name }}'
test-args: >-
${{ matrix.job.test-args }}
@@ -742,7 +738,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-presto-jdbc-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -871,6 +868,10 @@ jobs:
MB_SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.MB_SNOWFLAKE_TEST_WAREHOUSE }}
MB_SNOWFLAKE_TEST_PK_USER: METABASE PK
MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY }}
MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY_2: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY_2 }}
MB_SNOWFLAKE_TEST_PK_PUBLIC_KEY: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PUBLIC_KEY }}
MB_SNOWFLAKE_TEST_PK_PUBLIC_KEY_2: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PUBLIC_KEY_2 }}
# RSA Role testing:
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_DEFAULT_USER: RSA_ROLE_TEST_DEFAULT_USER
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_CUSTOM_USER: RSA_ROLE_TEST_CUSTOM_USER
@@ -898,7 +899,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-sparksql-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -931,7 +933,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-sqlite-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -959,7 +962,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-sqlserver:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
@@ -1009,7 +1013,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-starburst-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
@@ -1046,7 +1051,8 @@ jobs:
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-vertica-ee:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:

View File

@@ -5,7 +5,7 @@ on:
jobs:
files-changed:
name: Check which files changed
name: "SDK cross-version E2E > Check which files changed"
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
@@ -21,6 +21,7 @@ jobs:
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
name: "SDK cross-version E2E > [Backport only] Get build requirements"
if: |
!cancelled()
runs-on: ubuntu-22.04
@@ -54,6 +55,7 @@ jobs:
};
build:
name: "SDK cross-version E2E > Build uberjar"
needs: [files-changed, get-build-requirements]
if: |
!cancelled()
@@ -85,6 +87,7 @@ jobs:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar-cross-version
resolve-sdk-version:
name: "SDK cross-version E2E > Resolve SDK version"
if: |
!cancelled()
runs-on: ubuntu-22.04
@@ -117,19 +120,21 @@ jobs:
};
e2e-tests:
name: "SDK cross-version E2E > Run e2e tests"
needs: [get-build-requirements, build, resolve-sdk-version]
if: |
!cancelled() && needs.build.result == 'success'
runs-on: ubuntu-22.04
timeout-minutes: 45
name: e2e-tests-embedding-sdk
env:
MB_EDITION: ee
DISPLAY: ""
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
TZ: US/Pacific # to make node match the instance tz
@@ -138,12 +143,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Prepare Docker containers
uses: ./.github/actions/e2e-prepare-containers
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Needed to omit newly added tests for functionality that is not yet released
- name: Sparse checkout tests from SDK release commit
uses: actions/checkout@v4
@@ -229,15 +228,3 @@ jobs:
const summary = formatSummary(results);
await core.summary.addRaw(summary).write();
e2e-tests-skipped-stub:
needs: [e2e-tests]
if: |
!cancelled() &&
needs.e2e-tests.result == 'skipped'
runs-on: ubuntu-22.04
timeout-minutes: 5
name: e2e-component-tests-embedding-sdk-cross-version
steps:
- run: |
echo "Didn't run due to conditional filtering"

View File

@@ -9,11 +9,11 @@ on:
jobs:
files-changed:
name: Check which files changed
name: "SDK e2e > Check which files changed"
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
e2e_all: ${{ steps.changes.outputs.e2e_all }}
e2e_embedding_sdk: ${{ steps.changes.outputs.e2e_embedding_sdk }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
@@ -25,6 +25,7 @@ jobs:
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
name: "SDK e2e > [Backport only] Get build requirements"
if: |
!cancelled() &&
contains(github.base_ref || github.ref, 'release-x')
@@ -59,10 +60,11 @@ jobs:
};
build-uberjar:
name: "SDK e2e > Build uberjar"
needs: [files-changed, get-build-requirements]
if: |
!cancelled() &&
needs.files-changed.outputs.e2e_all == 'true'
needs.files-changed.outputs.e2e_embedding_sdk == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 25
env:
@@ -90,9 +92,10 @@ jobs:
- name: Prepare uberjar artifact
uses: ./.github/actions/prepare-uberjar-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar-sdk-tests
e2e-tests:
name: "SDK e2e > Run e2e tests (React ${{ matrix.react-version }})"
needs: [get-build-requirements, build-uberjar]
if: |
!cancelled() &&
@@ -103,16 +106,17 @@ jobs:
matrix:
react-version: [18, 19]
fail-fast: false
name: React ${{ matrix.react-version }}
env:
MB_EDITION: ee
DISPLAY: ""
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
CYPRESS_IS_EMBEDDING_SDK: true
CYPRESS_IS_EMBEDDING_SDK: "true"
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
@@ -120,16 +124,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Prepare Docker containers
uses: ./.github/actions/e2e-prepare-containers
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Retrieve uberjar artifact for ee
uses: actions/download-artifact@v4
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar-sdk-tests
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
@@ -180,7 +178,7 @@ jobs:
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
- name: Upload Cypress Artifacts upon failure
- name: "SDK e2e > Upload Cypress Artifacts upon failure"
uses: actions/upload-artifact@v4
if: failure()
with:
@@ -190,7 +188,7 @@ jobs:
./logs/test.log
if-no-files-found: ignore
- name: Publish Summary
- name: "SDK e2e > Publish Summary"
if: failure()
uses: actions/github-script@v7
with:

View File

@@ -1,4 +1,6 @@
name: E2E Cross-version Tests
name: E2E cross-version for breaking changes
# See `bin/backward-compatibility-test.js` for the documentation of this workflow.
on:
workflow_dispatch:
@@ -36,6 +38,7 @@ on:
jobs:
generate-matrix:
name: "Breaking changes E2E > Generate matrix"
runs-on: ubuntu-latest
outputs:
matrix_json: ${{ steps.set_matrix.outputs.matrix_json }}
@@ -60,6 +63,7 @@ jobs:
TOTAL_SHARDS_INPUT: ${{ inputs.total-shards }}
build-jar:
name: "Breaking changes E2E > Build jar"
runs-on: ubuntu-22.04
timeout-minutes: 45
@@ -96,6 +100,7 @@ jobs:
if-no-files-found: error
run-breaking-changes-tests:
name: "Breaking changes E2E > Run breaking changes tests"
needs: [build-jar, generate-matrix]
runs-on: ubuntu-22.04
timeout-minutes: 45
@@ -143,8 +148,10 @@ jobs:
- name: Run the tests
env:
MB_EDITION: ee
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
CYPRESS_CI: true
run: |
node bin/backward-compatibility-test.js \

View File

@@ -66,8 +66,10 @@ jobs:
docker run -d \
-v $PWD/my-metabase:/metabase.db \
-p 3000:3000 \
-e CYPRESS_ALL_FEATURES_TOKEN=${{ secrets.ENTERPRISE_TOKEN }} \
-e CYPRESS_NO_FEATURES_TOKEN=${{ secrets.E2E_STARTER_TOKEN }} \
-e CYPRESS_MB_ALL_FEATURES_TOKEN=${{ secrets.MB_ALL_FEATURES_TOKEN }} \
-e CYPRESS_MB_STARTER_CLOUD_TOKEN=${{ secrets.MB_STARTER_CLOUD_TOKEN }} \
-e CYPRESS_MB_PRO_CLOUD_TOKEN=${{ secrets.MB_PRO_CLOUD_TOKEN }} \
-e CYPRESS_MB_PRO_SELF_HOSTED_TOKEN=${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }} \
--name metabase-${{ matrix.version.source }} \
${{ env.DOCKER_SOURCE_IMAGE }}
- name: Wait for Metabase to start on port 3000
@@ -97,8 +99,10 @@ jobs:
docker run -d \
-v $PWD/my-metabase:/metabase.db \
-p 3001:3000 \
-e CYPRESS_ALL_FEATURES_TOKEN=${{ secrets.ENTERPRISE_TOKEN }} \
-e CYPRESS_NO_FEATURES_TOKEN=${{ secrets.E2E_STARTER_TOKEN }} \
-e CYPRESS_MB_ALL_FEATURES_TOKEN=${{ secrets.MB_ALL_FEATURES_TOKEN }} \
-e CYPRESS_MB_STARTER_CLOUD_TOKEN=${{ secrets.MB_STARTER_CLOUD_TOKEN }} \
-e CYPRESS_MB_PRO_CLOUD_TOKEN=${{ secrets.MB_PRO_CLOUD_TOKEN }} \
-e CYPRESS_MB_PRO_SELF_HOSTED_TOKEN=${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }} \
--name metabase-${{ matrix.version.target }} \
${{ env.DOCKER_TARGET_IMAGE }}
- name: Wait for Metabase to start on port 3001

View File

@@ -1,4 +1,4 @@
name: E2E Embedding SDK Compatibility tests
name: "[NOT REQUIRED] SDK Compatibility tests"
on:
push:
@@ -191,6 +191,12 @@ jobs:
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
path: resources/embedding-sdk
# In order to check compatibility between Sample Apps and Embedding SDK, the job for each sample app:
# - pulls a Sample App
# - starts it
# - runs its Cypress tests against the local metabase.jar and local @metabase/embedding-sdk-react package.
# The job is not required, though if it's failing better to be sure that it's not caused by a breaking change.
# For more details see `Sample Apps compatibility with Embedding SDK tests` in `enterprise/frontend/src/embedding-sdk/dev.md`
e2e-sample-apps-tests:
needs: [get-build-requirements, get-sample-apps-data, build]
strategy:
@@ -208,8 +214,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_IS_EMBEDDING_SDK: true
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_IS_EMBEDDING_SDK: "true"
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
SAMPLE_APP_BRANCH_NAME: ${{ needs.get-sample-apps-data.outputs.branch_name }}
@@ -308,17 +314,25 @@ jobs:
run: |
exit 1
# The job checks integration of the Embedding SDK with consumer's apps that use different frameworks/bundlers,
# or when we want to test some tricky integration cases like conflicting types.
# The job
# - starts an app
# - runs its Cypress tests against the e2e test metabase instance and local @metabase/embedding-sdk-react package.
# The job is not required, though if it's failing better to be sure that it's not caused by a breaking change.
# For more details see `Embedding SDK integration tests with Host Apps` in `enterprise/frontend/src/embedding-sdk/dev.md`
e2e-host-apps-tests:
needs: [ get-build-requirements, build ]
needs: [get-build-requirements, build]
strategy:
matrix:
test_suite: [
"vite-6-host-app-e2e",
"next-15-app-router-host-app-e2e",
"next-15-pages-router-host-app-e2e",
"angular-20-host-app-e2e",
]
environment: [ "production", "development" ]
test_suite:
[
"vite-6-host-app-e2e",
"next-15-app-router-host-app-e2e",
"next-15-pages-router-host-app-e2e",
"angular-20-host-app-e2e",
]
environment: ["production", "development"]
if: |
!cancelled() && needs.build.result == 'success'
runs-on: ubuntu-22.04
@@ -330,8 +344,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_IS_EMBEDDING_SDK: true
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_IS_EMBEDDING_SDK: "true"
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
HOST_APP_ENVIRONMENT: ${{ matrix.environment }}

View File

@@ -63,8 +63,10 @@ jobs:
DISPLAY: ""
QA_DB_ENABLED: ${{ contains(fromJSON('["sql", "mongo"]'), inputs.qa_db) }}
CYPRESS_QA_DB_MONGO: ${{ inputs.qa_db == 'mongo' }}
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
MB_SNOWPLOW_AVAILABLE: true
MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro
MB_EDITION: ${{ inputs.mb_edition }}
@@ -84,6 +86,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
maildev: true
openldap: true
snowplow: true
postgres: ${{ inputs.qa_db == 'sql' }}
mysql: ${{ inputs.qa_db == 'sql' }}
mongo: ${{ inputs.qa_db == 'mongo' }}
@@ -103,8 +106,6 @@ jobs:
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Run Snowplow micro
uses: ./.github/actions/run-snowplow-micro
- name: Run Metabase
run: node e2e/runner/run_cypress_ci.js start
- name: Generate database snapshots

View File

@@ -44,8 +44,10 @@ jobs:
JOB_NAME: ${{ inputs.name }}
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
MB_EXPERIMENTAL_SEARCH_BLOCK_ON_QUEUE: true
@@ -55,13 +57,7 @@ jobs:
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
CYPRESS_QA_DB_MONGO: ${{ inputs.name == 'mongo' }}
CYPRESS_IS_EMBEDDING_SDK: ${{ inputs.name == 'embedding-sdk' }}
mongo: ${{ inputs.name == 'mongo' }}
postgres: ${{ inputs.name != 'mongo' }}
mysql: ${{ inputs.name != 'mongo' }}
openldap: true
maildev: true
webhook: true
CYPRESS_IS_EMBEDDING_SDK: "${{ inputs.name == 'embedding-sdk' }}"
steps:
- uses: actions/checkout@v4
@@ -71,11 +67,12 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
maildev: true
openldap: ${{ env.openldap }}
postgres: ${{ env.postgres }}
mysql: ${{ env.mysql }}
mongo: ${{ env.mongo }}
webhook: ${{ env.webhook }}
openldap: true
webhook: true
snowplow: true
postgres: ${{ inputs.name != 'mongo' }}
mysql: ${{ inputs.name != 'mongo' }}
mongo: ${{ inputs.name == 'mongo' }}
- name: Run Embedding SDK Storybook
if: inputs.name == 'embedding-sdk'
@@ -111,9 +108,6 @@ jobs:
if: github.run_attempt != '1'
run: echo "specs=$(cat failed-specs)" >> $GITHUB_ENV
- name: Run Snowplow micro
uses: ./.github/actions/run-snowplow-micro
- name: Run Metabase
run: node e2e/runner/run_cypress_ci.js start

View File

@@ -1,12 +1,7 @@
name: Embedding SDK
name: SDK
on:
push:
branches:
- "master"
- "release-**"
pull_request:
types: [opened, synchronize, reopened]
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
@@ -18,8 +13,9 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
documentation: ${{ steps.changes.outputs.documentation }}
e2e_embedding_sdk: ${{ steps.changes.outputs.e2e_embedding_sdk }}
frontend_embedding_sdk_sources: ${{ steps.changes.outputs.frontend_embedding_sdk_sources }}
embedding_documentation: ${{ steps.changes.outputs.embedding_documentation }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
@@ -33,8 +29,9 @@ jobs:
needs: [files-changed]
if: |
!cancelled() &&
(needs.files-changed.outputs.frontend_embedding_sdk_sources == 'true' ||
needs.files-changed.outputs.documentation == 'true')
(needs.files-changed.outputs.e2e_embedding_sdk == 'true' ||
needs.files-changed.outputs.frontend_embedding_sdk_sources == 'true' ||
needs.files-changed.outputs.embedding_documentation == 'true')
runs-on: ubuntu-22.04
timeout-minutes: 25
steps:
@@ -75,7 +72,7 @@ jobs:
embedding-sdk-docs-snippets-type-check:
needs: [files-changed, build]
if: |
needs.files-changed.outputs.documentation == 'true' &&
needs.files-changed.outputs.embedding_documentation == 'true' &&
needs.build.result == 'success'
runs-on: ubuntu-22.04
timeout-minutes: 20
@@ -127,7 +124,7 @@ jobs:
with:
remove-previous-comment: true
add-new-comment: ${{ steps.docs-generation.outcome == 'failure' && contains(steps.docs-generation.outputs.output, 'not included in the documentation') }}
message: "📝 Some exported from `@metabase/embedding-sdk-react` types reference other types that are not exported, i.e. internal types.<br><br>The internal type reference breaks API documentation generation for the SDK and also may unexpectedly increase the output size of the type declaration file.<br><br>Please check the CI logs to find the name of such type.<br><br>- If a type should be publicly available in the SDK, add a description to it or a TypeDoc annotation and export it from SDK.<br>- If a type is internal and should _not_ be publicly exposed, refactor types to prevent referencing other types that are not exported from SDK.<br><br>You can run `yarn embedding-sdk:docs:generate` locally to verify that the issue has been resolved."
message: "📝 Some exported types from `@metabase/embedding-sdk-react` reference other types that are not exported, i.e. internal types.<br><br>The internal type reference breaks API documentation generation for the SDK and also may unexpectedly increase the output size of the type declaration file.<br><br>Please check the CI logs to find the name of such type.<br><br>- If a type should be publicly available in the SDK, add a description to it or a TypeDoc annotation and export it from SDK.<br>- If a type is internal and should _not_ be publicly exposed, refactor types to prevent referencing other types that are not exported from SDK.<br><br>You can run `yarn embedding-sdk:docs:generate` locally to verify that the issue has been resolved."
include-log: true
- name: Comment on PR if 'Failed to resolve link' error happens
uses: ./.github/actions/notify-pull-request
@@ -140,7 +137,9 @@ jobs:
if: ${{ steps.docs-generation.outcome == 'failure' }}
run: exit 1
# See `Component e2e tests` in `enterprise/frontend/src/embedding-sdk/dev.md`
sdk-e2e-tests:
name: "SDK e2e tests"
uses: ./.github/workflows/e2e-component-tests-embedding-sdk.yml
needs: [build]
secrets: inherit
@@ -148,19 +147,23 @@ jobs:
cached-embedding-sdk-dist-artifact-name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
e2e-component-tests-embedding-sdk-cross-version:
name: "[Backport only] SDK e2e cross version tests"
# run on: every push on release branches, and every pr that targets a release branch
if: ${{ startsWith(github.ref, 'refs/heads/release-x.') || (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release-x.')) }}
uses: ./.github/workflows/e2e-component-tests-embedding-sdk-cross-version.yml
secrets: inherit
cross-version-for-breaking-changes:
# run on: every pr that targets a release branch
if: ${{ github.event_name == 'pull_request' && startsWith(github.base_ref, 'release-x.') }}
uses: ./.github/workflows/e2e-cross-version-for-breaking-changes.yml
secrets: inherit
with:
fe-ref: ${{ github.base_ref }}
be-ref: ${{ github.head_ref }}
# Temporarily skipped because the cypress runner crashes
# See `bin/backward-compatibility-test.js` for the documentation of this workflow.
# cross-version-for-breaking-changes:
# name: "[NOT REQUIRED - Experimental - Backport only] detect breaking changes with cross versions tests"
# # run on: every pr that targets a release branch, it does NOT run for pr targeting master
# if: ${{ github.event_name == 'pull_request' && startsWith(github.base_ref, 'release-x.') }}
# uses: ./.github/workflows/e2e-cross-version-for-breaking-changes.yml
# secrets: inherit
# with:
# fe-ref: ${{ github.base_ref }}
# be-ref: ${{ github.head_ref }}
embedding-sdk-tests-result:
needs:

View File

@@ -63,8 +63,13 @@ jobs:
fe-tests-unit:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
shard: [1, 2]
env:
SHARDS: 2 # should match matrix above
JEST_JUNIT_OUTPUT_DIR: ./target/junit
JEST_JUNIT_OUTPUT_NAME: test-report-frontend-unit.xml
steps:
@@ -75,19 +80,8 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Run frontend unit tests and collect the code coverage information
if: github.ref_name == 'master'
run: yarn run test-unit --coverage --silent
- name: Run frontend unit tests
if: github.ref_name != 'master'
run: yarn run test-unit --silent
- name: Upload coverage to codecov.io
if: github.ref_name == 'master'
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
flags: front-end
token: ${{ secrets.CODECOV_TOKEN }}
run: yarn run test-unit --silent --shard=${{ matrix.shard }}/${{ env.SHARDS }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()

View File

@@ -1,6 +1,8 @@
name: Loki Visual Regression Testing
on: [pull_request]
on:
pull_request:
merge_group:
jobs:
files-changed:

132
.github/workflows/optimize-images.yml vendored Normal file
View File

@@ -0,0 +1,132 @@
name: Auto-Optimize Docs PNG Images
on:
push:
paths:
- 'docs/**/*.png'
jobs:
optimize-images:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pngcrush and bc
run: |
sudo apt-get update
sudo apt-get install -y pngcrush bc
- name: Get changed PNG files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
with:
files: |
docs/**/*.png
- name: Optimize changed PNG files
if: steps.changed-files.outputs.any_changed == 'true'
id: optimize
run: |
echo "Optimizing PNG files with pngcrush..."
echo "Branch:" $(git_current_branch)
# Initialize tracking variables
total_files=0
total_before=0
total_after=0
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "Processing: $file"
before_size=$(stat -c%s "$file")
# Use pngcrush with maximum lossless compression settings
# -rem alla removes all ancillary chunks (metadata)
# -brute tries all filter types and compression levels
# -ow overwrites the original file
pngcrush -rem alla -brute -ow "$file"
after_size=$(stat -c%s "$file")
echo " > Before: ${before_size} bytes, After: ${after_size} bytes"
# Track totals
total_files=$((total_files + 1))
total_before=$((total_before + before_size))
total_after=$((total_after + after_size))
done
# Calculate savings
total_saved=$((total_before - total_after))
# Output results for use in commit message
echo "files_optimized=${total_files}" >> "$GITHUB_OUTPUT"
echo "bytes_saved=${total_saved}" >> "$GITHUB_OUTPUT"
echo "total_before=${total_before}" >> "$GITHUB_OUTPUT"
echo "total_after=${total_after}" >> "$GITHUB_OUTPUT"
echo "Optimization complete"
echo "Files processed: ${total_files}"
echo "Total bytes saved: ${total_saved} (${total_before} -> ${total_after})"
- name: Check for changes after optimization
if: steps.changed-files.outputs.any_changed == 'true'
id: check_changes
run: |
git add ${{ steps.changed-files.outputs.all_changed_files }}
if git diff --quiet --cached; then
echo "has_changes=false" >> "$GITHUB_OUTPUT"
echo "No changes detected after optimization"
else
echo "has_changes=true" >> "$GITHUB_OUTPUT"
echo "Changes detected after optimization"
git diff --cached --stat
fi
- name: Commit optimized images
if: steps.changed-files.outputs.any_changed == 'true' && steps.check_changes.outputs.has_changes == 'true'
env:
GITHUB_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
run: |
git config --global user.email "github-automation@metabase.com"
git config --global user.name "Metabase Automation"
git add docs/**/*.png
# Format bytes saved for human readability
bytes_saved="${{ steps.optimize.outputs.bytes_saved }}"
bytes_before="${{ steps.optimize.outputs.total_before }}"
if [ "$bytes_saved" -gt 1048576 ]; then
# Convert to MB
size_saved=$(echo "scale=1; $bytes_saved / 1048576" | bc)
size_unit="MB"
elif [ "$bytes_saved" -gt 1024 ]; then
# Convert to KB
size_saved=$(echo "scale=1; $bytes_saved / 1024" | bc)
size_unit="KB"
else
size_saved="$bytes_saved"
size_unit="bytes"
fi
# Calculate percentage reduction
if [ "$bytes_before" -gt 0 ]; then
percentage=$(echo "scale=1; $bytes_saved * 100 / $bytes_before" | bc)
git commit -m "Optimized ${{ steps.optimize.outputs.files_optimized }} images, saved ${size_saved} ${size_unit} (${percentage}% smaller)"
else
git commit -m "Optimized ${{ steps.optimize.outputs.files_optimized }} images, saved ${size_saved} ${size_unit}"
fi
git push
echo 'Files optimized:'
echo ${{ steps.changed-files.outputs.all_changed_files }}
echo 'Applied: pngcrush -rem alla -brute -ow'
- name: Output summary
if: steps.changed-files.outputs.any_changed == 'true'
run: |
if [ "${{ steps.check_changes.outputs.has_changes }}" = "false" ]; then
echo "PNG files were already optimized - no changes needed"
else
echo "PNG files optimized and committed successfully"
fi

View File

@@ -103,8 +103,14 @@ jobs:
env:
MB_EDITION: ${{ matrix.edition }}
DISPLAY: ""
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
# these are needed for backwards compatibility with release branches earlier than v55, since
# this workflow always runs from master, but we run tests from the release branch
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
# disabled because of out of memory issues
# probably related to https://github.com/cypress-io/cypress/issues/27415
CYPRESS_NO_COMMAND_LOG: 1
@@ -122,6 +128,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
maildev: true
snowplow: true
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare JDK 21
@@ -132,8 +139,6 @@ jobs:
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Run Snowplow micro
uses: ./.github/actions/run-snowplow-micro
- uses: actions/download-artifact@v4
name: Retrieve uberjar artifact for ${{ matrix.edition }}
with:

View File

@@ -250,19 +250,9 @@ jobs:
- name: Tag the docker image
run: | # sh
docker pull $DOCKERHUB_REPO\:$DOCKERHUB_VERSION
docker tag $DOCKERHUB_REPO\:$DOCKERHUB_VERSION $DOCKERHUB_REPO\:$TAG_NAME
docker image ls $DOCKERHUB_REPO
SOURCE_ID=$(docker image ls $DOCKERHUB_REPO\:$DOCKERHUB_VERSION -q)
TAGGED_ID=$(docker image ls $DOCKERHUB_REPO\:$TAG_NAME -q)
if [[ $SOURCE_ID != $TAGGED_ID ]]; then
echo "Error tagging docker image"
exit 1
fi
docker push $DOCKERHUB_REPO\:$TAG_NAME
docker buildx imagetools create --tag \
$DOCKERHUB_REPO\:$TAG_NAME \
$DOCKERHUB_REPO\:$DOCKERHUB_VERSION
push-git-tags:
permissions: write-all

View File

@@ -7,6 +7,7 @@ on:
- "release-**"
pull_request:
types: [opened, synchronize, reopened]
merge_group:
jobs:
files-changed:
@@ -71,6 +72,13 @@ jobs:
with:
skip: ${{ needs.files-changed.outputs.backend_all != 'true' && needs.static-viz-files-changed.outputs.static_viz != 'true' }}
app-db-tests:
needs: files-changed
uses: ./.github/workflows/app-db.yml
secrets: inherit
with:
skip: ${{ needs.files-changed.outputs.backend_all != 'true' }}
driver-tests:
needs: files-changed
uses: ./.github/workflows/drivers.yml
@@ -97,3 +105,8 @@ jobs:
# e2e_all_files includes all changes which trigger all e2e tests, if the list of changes files is included in the
# list of changed specs files, then only specs are changed and we can run only those specs
specs: ${{ needs.files-changed.outputs.e2e_all_files == needs.files-changed.outputs.e2e_specs_files && needs.files-changed.outputs.e2e_specs_files || '' }}
sdk-tests:
needs: files-changed
uses: ./.github/workflows/embedding-sdk.yml
secrets: inherit

View File

@@ -43,6 +43,7 @@ jobs:
command_args: |
--config locales/crowdin.yml
-e=el
-e=et
-e=es-MX
-e=gu-IN
-e=hr

View File

@@ -10,6 +10,7 @@ on:
- metabot-v3-main
- feature-visualizer
- internal-tools
- viz-1048-only-visualizer-compatible
paths-ignore:
# config files
- ".**"
@@ -20,6 +21,8 @@ on:
- "**test/**"
- "**_test.clj"
- "**/frontend/**.unit.*"
pull_request:
types: [labeled, opened, synchronize, reopened]
workflow_dispatch:
inputs:
commit:
@@ -30,6 +33,8 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 5
name: Get container info
# Skip if this is a PR without the build-docker-uberjar label
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'build-docker-uberjar')
outputs:
editions: ${{ toJson(fromJson(steps.info.outputs.result).editions) }}
ee: ${{ toJson(fromJson(steps.info.outputs.result).ee) }}

View File

@@ -6,6 +6,7 @@ on:
- 'master'
- 'release-**'
pull_request:
merge_group:
jobs:
whitespace-linter:

2
.gitignore vendored
View File

@@ -36,6 +36,7 @@
/coverage
/crate-*
/cypress
cypress.env.json
/deploy/artifacts/*
/docs/**/node_modules
/docs/**/package.json
@@ -146,6 +147,7 @@ llm-payloads
.aider*
/config.yml
CLAUDE.local.md
.claude/settings.local.json
.eslintcache

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Some files were not shown because too many files have changed in this diff Show More