Compare commits

...

1720 Commits

Author SHA1 Message Date
dan sutton
f8a74f8c30 new api method to unconditionally delete routing
this doesn't make a ton of sense in the current world where there's only
one way to route a db. But in the future, when you want to delete a
database, you don't care about how a db was routed; tear it all down and
delete all routers, all children, and then the database.
2025-08-14 21:55:55 -05:00
dan sutton
0491ca2fbd ensure we forward whether to check connection details 2025-08-14 21:55:06 -05:00
dan sutton
ce5e2d7a0a remove references to workspaces in api keys 2025-08-14 17:08:22 -05:00
dan sutton
942000bd8d delete workspace related files 2025-08-14 16:46:10 -05:00
dan sutton
d520489b0b workspace related stuff 2025-08-14 16:44:30 -05:00
dan sutton
e83c0944c0 more db routing stuff 2025-08-14 16:43:26 -05:00
dan sutton
85dd11f187 workspace creation
```
workspaces=> (binding [api/*current-user-id* 1]
               (database-routing/route-database 4
                                                [{:name "workspace_01" :details {:ssl false,
                                                                                 :password "secure_password",
                                                                                 :destination-database false,
                                                                                 :port nil,
                                                                                 :advanced-options false,
                                                                                 :schema-filters-type "all",
                                                                                 :use-auth-provider false,
                                                                                 :dbname "flight_data",
                                                                                 :host nil,
                                                                                 :tunnel-enabled false,
                                                                                 :user "workspace_user"}}]
                                                {:check-connection-details? true}))
[{:uploads_schema_name nil,
  :description nil,
  :features #{:describe-fks
              :database-routing
              :full-join
              :window-functions/cumulative
              :test/dynamic-dataset-loading
              :expressions/float
              :describe-fields
              :basic-aggregations
              :temporal-extract
              :identifiers-with-spaces
              :actions/custom
              :window-functions/offset
              :now
              :parameterized-sql
              :convert-timezone
              :expression-literals
              :nested-field-columns
              :expressions/today
              :standard-deviation-aggregations
              :test/jvm-timezone-setting
              :date-arithmetics
              :persist-models
              :expressions/integer
              :expressions/date
              :actions
              :expression-aggregations
              :percentile-aggregations
              :connection-impersonation
              :saved-question-sandboxing
              :distinct-where
              :table-privileges
              :right-join
              :left-join
              :expressions/datetime
              :expressions/text
              :native-parameters
              :uuid-type
              :schemas
              :nested-queries
              :test/uuids-in-create-table-statements
              :describe-indexes
              :expressions
              :uploads
              :set-timezone
              :regex
              :case-sensitivity-string-filter-options
              :binning
              :metadata/key-constraints
              :actions/data-editing
              :database-replication
              :transforms/table
              :transforms/view
              :datetime-diff
              :upload-with-auto-pk
              :inner-join
              :advanced-math-expressions
              :native-temporal-units
              :fingerprint
              :native-parameter-card-reference
              :split-part},
  :uploads_table_prefix nil,
  :cache_field_values_schedule "0 0 12 * * ? *",
  :router_database_id 4,
  :timezone nil,
  :is_attached_dwh false,
  :auto_run_queries true,
  :metadata_sync_schedule "0 43 * * * ? *",
  :name "workspace_01",
  :settings nil,
  :caveats nil,
  :creator_id 1,
  :is_full_sync false,
  :updated_at #object[java.time.OffsetDateTime
                      "0x7c64a1d"
                      "2025-08-06T23:33:53.726200Z"],
  :cache_ttl nil,
  :details {:ssl false,
            :password "secure_password",
            :destination-database false,
            :port nil,
            :advanced-options false,
            :schema-filters-type "all",
            :use-auth-provider false,
            :dbname "flight_data",
            :host nil,
            :tunnel-enabled false,
            :user "workspace_user"},
  :is_sample false,
  :id 7,
  :is_on_demand false,
  :engine :postgres,
  :initial_sync_status "incomplete",
  :is_audit false,
  :dbms_version nil,
  :uploads_enabled false,
  :refingerprint nil,
  :created_at #object[java.time.OffsetDateTime
                      "0x11e896b9"
                      "2025-08-06T23:33:53.726200Z"],
  :points_of_interest nil}]
```
2025-08-14 16:21:22 -05:00
Cam Saul
bf85745bbb add-alias-info => Lib and misc bug fixes (#60231)
* add-alias-info => MLv2

* Restore deleted test

* WIP

* WIP [ci skip]

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

* Remove profiling code

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

* Fix accidental edits

* Make `visible-columns` stage-only

* More minor caching improvements

* cljfmt & kondo

* More minor caching improvements

* Fix #35252

* cljfmt & kondo

* Another round of test fixes and lint fixes 🔧

* Test fixes 🔧

* Test fix 🔧

* PR feedback

* Test & Lint fixes 🔧

* Test fix 🔧

* Kondo/cljfmt

* Appease Eastwood

* cljfmt run against everything

* Revert changes to deps.edn

* Did I fixx??

* cljfmt/kondo

* Fix Oracle test failure

* Fix nested fields (MongoDB)

* cljfmt

* Nested column name fixes

* Fix Mongo for reals

* Revert BigQuery breaking stuff

* Fix equality for binned columns

* Test fix 🔧

* Remove dead :ident keys

* Fix is_verified field refs

* Fix is_verified field refs

* Some sanity checking

* Fix typo

* Fixx

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

* Fix validation of legacy expression refs inside stage parameters

* Fix aggregation names not being deduplicated

* :as-alias

* replace saigon with bangkok

* use ho chi minh as equivalent replacement

* use bangkok for sqlserver

* update us/pacific to america/los_angeles

* Test debugging

* Fix debugging

* Test fixes 🔧

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

* cljfmt

* Update deprecation notices 56 => 57

* Kick the can down the road

* Fix another busted test 🔧

* Improve field resolution even more 😒

* cljfmt

* Fix sandboxing with bad field refs.

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

* cljfmt

* I fixed it

* Appease the linter

* Test fixes 🔧

* OOOPS

* Fix test

* prettier

---------

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

* copy and spacing tweaks (#62049)

* switch to download based approach

* test

---------

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

* fix with suggestions

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

* chore: test

* extend field-values treatment to dummy tools

* no more need for ensure-field-values!

* chore: use get-or-create

* style

* remove unused require

* fix

* nil safety

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

* wip2

* fix and wip

* wip

* fiiiix

* use the component name inside the iframe

* fix tests

* use custom elements attributes in the preview

* clean up

* clean up

* merge question with new question in the iframe code

* remove SdkIframeEmbedTagSettings

* styles -> S

* restore defaultTheme functionality that was merged on master

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

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

* use ho chi minh as equivalent replacement

* use bangkok for sqlserver

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

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

Added: needs.uberjar.result == 'success' condition

* Set default output name for fetched artifacts to "metabase.jar"
2025-08-13 12:01:00 +02:00
Phoomparin Mano
2e884c4ce6 CodeMirror styling in custom expression fails in Embed JS as the CSP nonce is missing (#61959)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-08-13 16:03:53 +07:00
Phoomparin Mano
57a07bdb4c Allow downloads should show even when drills is off (#61969) 2025-08-13 16:03:26 +07:00
Chris Truter
9586169df9 Move actions to the right timezone (#62073) 2025-08-13 10:27:05 +02:00
Chris Truter
3c955df9e9 Prevent configuration of disabled database-local settings (#62018)
- Add :database-feature to SettingDefinition schema to specify required driver features
- Update validate-settable-for-db\! to check database driver feature support
- Add validation to ensure :database-feature is only used with database-local settings
- Fix validation logic to throw when driver does NOT support required feature
- Add comprehensive tests for database feature validation
- Update defsetting macro documentation with :database-feature option

This allows database-local settings like database-enable-actions and
database-enable-table-editing to require specific driver features
(e.g. :actions, :actions/data-editing) before they can be enabled.
2025-08-13 11:24:55 +03:00
Jeff Bruemmer
a36b1553ee docs - images and edits (#62064) 2025-08-12 21:09:19 +00:00
Alex Yarosh
0cfee32754 docs: DB routing new DBs (#62081)
* db routing update

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-12 20:47:58 +00:00
Nicolò Maria Mezzopera
22507a963a Fix CI workflows nesting and artifact download (#61919)
* Fix uberjar containerization and implement flexible fetch-artifact action

Resolves issues where uberjars weren't getting containerized when adding the
build-docker-uberjar label to PRs or when manually dispatching workflows.

Major changes:
- Create containerize-uberjar.yml workflow for centralized containerization logic
- Create uberjar-containerize-labeled.yml for PR label-triggered builds
- Extract containerization from uberjar.yml to avoid 3-level workflow nesting
- Add containerization to run-tests.yml for master branch pushes
- Implement flexible extract-path parameter in fetch-artifact action
- Replace preserve-structure boolean with string-based path specification
- Update all workflows to use appropriate extract-path values

The fetch-artifact action now supports:
- extract-path: "." (current directory with custom output-name)
- extract-path: "target/uberjar" (maintains original structure)
- extract-path: "custom/path" (any directory structure)

Containerization now works in all scenarios:
- Master push/merge → run-tests.yml → containerize-uberjar.yml
- PR with build-docker-uberjar label → uberjar-containerize-labeled.yml
- Manual dispatch → containerize-uberjar.yml

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

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

* Fix fetch-artifact action to avoid moving file to itself

Prevents "mv: source and destination are the same file" error when
extract-path matches the existing jar location (e.g. target/uberjar).

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

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

* Refactor fetch-artifact action to be more DRY

- Consolidate JAR path logic into a single function
- Export JAR_PATH to GITHUB_ENV for use in subsequent steps
- Remove repetitive path determination code
- Reduce lines of code from 113 to 108

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

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

* Add Docker Hub link and pull command to PR comment

Enhanced the PR comment after containerization to include:
- Docker tag name (branch with slashes replaced by dashes)
- Direct link to Docker Hub repository tag page
- Ready-to-use docker pull command

This makes it easier for developers to find and pull the built image.

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

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

* Add get-docker-info action and update workflows to utilize it for Docker image retrieval

* Refactor post-comment job to streamline Docker info retrieval and PR comment posting in containerize workflow

* Remove unnecessary blank lines in fetch-artifact and get-docker-info actions for cleaner code

* Update containerize job conditions to trigger on pull request labels for Docker builds

* revert using fetch-artifact for release artifacts
2025-08-12 10:19:08 -10:00
Alex Yarosh
e9ab99a8f1 docs: add saml to embed JS (#62074)
* Update embedded-analytics-js.md

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

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-12 19:22:24 +00:00
github-automation-metabase
a12945b800 Bump org.apache.commons/commons-compress from 1.27.1 to 1.28.0 (#61777)
Inspect dependency changes here:
2025-08-12 16:23:06 +00:00
Riley Thompson
8c049ad6fe Only test normal drivers in nested-array-query-test (#62045)
* only test normal drivers

* run tier 3 if changes in src/metabase/driver
2025-08-12 15:41:27 +00:00
github-automation-metabase
d50129f95c Bump com.github.seancorfield/honeysql from 2.7.1310 to 2.7.1340 (#61772)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1340/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 15:01:26 +00:00
Jeff Bruemmer
99c391fb9f field filter intro (#62059) 2025-08-12 08:06:53 -05:00
Anderson
47f6a9ac46 chore: add andsalves as a team member (#62041) 2025-08-12 10:04:30 -03:00
github-automation-metabase
0f0d91d824 Bump com.microsoft.sqlserver/mssql-jdbc from 12.10.0.jre11 to 13.1.1.jre11-preview (#61486)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 23:00:29 -07:00
github-automation-metabase
dd41094d50 Bump org.eclipse.jetty/jetty-server from 12.0.22 to 12.0.24 (#62001)
* Bump org.eclipse.jetty/jetty-server from 12.0.22 to 12.0.24

Inspect dependency changes here:

* Consolidate Jetty deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 22:59:35 -07:00
github-automation-metabase
676c64a2aa Bump clj-kondo/clj-kondo from 2025.04.07 to 2025.07.28 (#61771)
* Bump clj-kondo/clj-kondo from 2025.04.07 to 2025.07.28

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.07.28/CHANGELOG.md

* Fix some of the Kondo warnings -- seems like there are false positives

* Fix Kondo warnings

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 22:21:13 -07:00
github-automation-metabase
709df6c4ac Bump com.facebook.presto/presto-jdbc from 0.292 to 0.293 (#59521)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:14:27 -07:00
github-automation-metabase
f2096262fa Bump org.graalvm.polyglot/polyglot from 24.2.1 to 24.2.2 (#61248)
* Bump org.graalvm.polyglot/polyglot from 24.2.1 to 24.2.2

Inspect dependency changes here: https://github.com/oracle/graal/compare/graal-24.2.1...graal-24.2.2

* Consolidate GraalVM deps bumps

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 20:14:03 -07:00
github-automation-metabase
73763282b7 Bump org.apache.logging.log4j/log4j-core from 2.24.3 to 2.25.1 (#60904)
* Bump org.apache.logging.log4j/log4j-core from 2.24.3 to 2.25.1

Inspect dependency changes here:

* Merge other Log4j version bumps

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Cam Saul <github@camsaul.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:12:16 -07:00
github-automation-metabase
43f07d3c88 Bump net.clojars.wkok/openai-clojure from 0.22.0 to 0.23.0 (#61776)
Inspect dependency changes here: https://github.com/wkok/openai-clojure/blob/0.23.0/CHANGELOG.md
2025-08-12 02:32:30 +00:00
github-automation-metabase
ecc7d9ba86 Bump io.github.clojure/tools.build from 0.10.9 to 0.10.10 (#61775)
Inspect dependency changes here: https://github.com/clojure/tools.build/blob/v0.10.10/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-12 02:32:22 +00:00
github-automation-metabase
c9205461c1 Bump com.google.cloud/google-cloud-bigquery from 2.51.0 to 2.54.0 (#61778)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.54.0/CHANGELOG.md
2025-08-12 02:32:08 +00:00
github-automation-metabase
65974dc29d Bump clj-http/clj-http from 3.13.0 to 3.13.1 (#60246)
Inspect dependency changes here: https://github.com/dakrone/clj-http/blob/3.13.1/changelog.org

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 02:31:52 +00:00
github-automation-metabase
b452abc839 Bump djblue/portal from 0.59.2 to 0.60.2 (#61997)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.60.2/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 01:52:21 +00:00
github-automation-metabase
debcec5881 Bump io.github.seancorfield/build-uber-log4j2-handler from v2.24.0 to v2.25.1 (#60900)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-08-11 18:19:12 -07:00
github-automation-metabase
2f15322530 Bump io.netty/netty-buffer from 4.2.1.Final to 4.2.3.Final (#61250)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 18:17:56 -07:00
github-automation-metabase
cce80c3f1d Bump diehard/diehard from 0.11.13 to 0.12.0 (#59517)
Inspect dependency changes here: https://github.com/sunng87/diehard/blob/0.12.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:43:56 +00:00
github-automation-metabase
5647025c0c Bump com.github.seancorfield/next.jdbc from 1.3.1002 to 1.3.1048 (#59516)
Inspect dependency changes here: https://github.com/seancorfield/next-jdbc/blob/v1.3.1048/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:41:28 +00:00
github-automation-metabase
ebb0d64993 Bump babashka/fs from 0.5.25 to 0.5.26 (#59146)
Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.26/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:06:08 +00:00
Denis Berezin
96a1ed0b8f UX-west FE bug fixes (#61948)
* UXW-466 enterprise-login-page-logo

* fix dash subscription popover cut off #59888

* Fix collection menu tooltips position #59379
2025-08-12 02:13:18 +03:00
github-automation-metabase
8d6ba8f390 Bump ring/ring-mock from 0.6.1 to 0.6.2 (#62003)
Inspect dependency changes here: https://github.com/ring-clojure/ring-mock/compare/0.6.1...0.6.2
2025-08-11 21:14:08 +00:00
github-automation-metabase
6ee5cbf07a Bump com.nimbusds/nimbus-jose-jwt from 10.4 to 10.4.1 (#62005)
Inspect dependency changes here:
2025-08-11 21:13:05 +00:00
github-automation-metabase
aba008b9b7 Bump org.apache.tika/tika-core from 3.1.0 to 3.2.2 (#61998)
Inspect dependency changes here:
2025-08-11 21:08:59 +00:00
github-automation-metabase
a9a088ef1f Bump com.oracle.database.jdbc/ojdbc17 from 23.8.0.25.04 to 23.9.0.25.07 (#61780)
Inspect dependency changes here:

Co-authored-by: dpsutton <dan@dpsutton.com>
2025-08-11 21:05:45 +00:00
github-automation-metabase
3fc274a4cf Bump com.fasterxml.woodstox/woodstox-core from 7.1.0 to 7.1.1 (#58758)
Inspect dependency changes here: https://github.com/FasterXML/woodstox/compare/woodstox-core-7.1.0...woodstox-core-7.1.1

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:59:30 +00:00
bryan
ba8f1f3ccf mage: Replace blank lines with empty strings + mage ls (#61987) 2025-08-11 20:55:21 +00:00
github-automation-metabase
db122be70b Bump com.amazon.redshift/redshift-jdbc42 from 2.1.0.32 to 2.1.0.34 (#62004)
Inspect dependency changes here: https://github.com/aws/amazon-redshift-jdbc-driver/blob/v2.1.0.34/CHANGELOG.md
2025-08-11 20:42:57 +00:00
github-automation-metabase
9781d9b7cd Bump cider/cider-nrepl from 0.55.7 to 0.57.0 (#60245)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.57.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 13:38:13 -07:00
github-automation-metabase
3feae381dd Bump org.xerial/sqlite-jdbc from 3.49.1.0 to 3.50.3.0 (#61485)
Inspect dependency changes here: https://github.com/xerial/sqlite-jdbc/compare/3.49.1.0...3.50.3.0
2025-08-11 13:31:34 -07:00
github-automation-metabase
9c2156a025 Bump commons-net/commons-net from 3.11.1 to 3.12.0 (#61773)
Inspect dependency changes here:
2025-08-11 13:07:45 -07:00
Riley Thompson
4ac4d34af7 handle nested arrays (#61977) 2025-08-11 15:44:04 -04:00
github-automation-metabase
9a4c0bb7c3 Bump io.netty/netty-common from 4.2.2.Final to 4.2.3.Final (#61251)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-08-11 12:36:37 -07:00
github-automation-metabase
ebd8ecb06c Bump com.github.seancorfield/honeysql from 2.7.1310 to 2.7.1325 (#61481)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1325/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:27:50 -07:00
github-automation-metabase
98a9b04fb1 Bump thheller/shadow-cljs from 3.1.4 to 3.1.8 (#61484)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:26:11 -07:00
github-automation-metabase
19f1e5517a Bump djblue/portal from 0.59.2 to 0.60.1 (#61774)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.60.1/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:25:13 -07:00
Jeff Bruemmer
ee248d5fff fix typos (#62029) 2025-08-11 17:09:12 +00:00
Jacob Joseph
b3d4d009aa Update filters.md (#61983)
we removed the gear icon from filters on dashboard editing, but the docs were still referring to it
2025-08-11 12:02:04 -05:00
Gustavo Saiani
d2f01b00eb Remove promo banner (#62023) 2025-08-11 14:01:01 -03:00
Sloan Sparger
a076cca120 [Metabot] Remove non-streaming metabot code (#61988)
* remove streaming code

* remove comment
2025-08-11 11:57:10 -05:00
Riley Thompson
42e48c71e0 Enable DB routing for Starburst and Presto (#61949)
* enable db routing for starburst

* enable presto routing
2025-08-11 16:23:59 +00:00
Riley Thompson
b3a9f566df Enable athena routing (#61934) 2025-08-11 11:22:39 -04:00
Aleksandr Lesnenko
5ef76f8592 fix visualizer cards don't have dashcard description setting (#62006) 2025-08-11 11:51:21 -03:00
Jeff Bruemmer
fbc7f9668d Update embedded-analytics-js.md (#62012) 2025-08-11 08:17:27 -05:00
Nicola Mometto
4c79e29cca Archive deleted tables (#61592)
* add migration

* add table before update to correctly set deactivated_at

* no need for schema

* archive tables

* tests

* note

* include active to index

* guard against nil changes

* doc

* guard against archival

* note

* prper count

* serdes/test

* extra safety guard

* more accurate logging

* use epocSecond

* more error validation

* change suffix

* add rollback mig

* move migrations to v56

* safer
2025-08-11 14:11:12 +01:00
Thomas Schmidt
0ab4df1655 Support markdown links in Metabot response (#61732) 2025-08-11 06:55:22 +00:00
Phoomparin Mano
4b128f68a9 Update parameters section subtitle for questions in embed flow (#61968) 2025-08-09 21:44:36 +07:00
Lodewijk Wensveen
b0687c26d2 fix(formatting): round compact numbers with Intl; preserve legacy k casing (closes #59454) (#61645)
* test(formatting): add compact rounding edge cases (refs #59454)

* fix(formatting): round compact numbers with Intl; preserve legacy k casing (closes #59454)

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2025-08-09 03:29:46 -04:00
Cam Saul
c6674c0185 [Lib] make visible-columns only work on stages (#61943)
* Make `visible-columns` stage-only

* More minor caching improvements
2025-08-09 00:35:00 +00:00
John Swanson
69b313f83e Format datetimes with user locale (#61680)
Bind the `*formatting-locale*` to the user's locale (falling back to the
system locale).

Also use `i18n/site-locale` instead of `(Locale. (system/site-locale))`,
which Does The Right Thing instead of incorrectly calling the
single-arity version of `Locale.`.

Fixes [UXW-208: Dashboard card download result using date locale from
instance and ignore user
locale](https://linear.app/metabase/issue/UXW-208/dashboard-card-download-result-using-date-locale-from-instance-and)

Fixes [UXW-142: Date formatting has undefined behavior (broken on my machine)](https://linear.app/metabase/issue/UXW-142/date-formatting-has-undefined-behavior-broken-on-my-machine)
2025-08-08 15:41:27 -05:00
Marcos
d76385094e fix examples in timezone docs (#61979) 2025-08-08 14:36:42 -06:00
Denis Berezin
772e56a62e Fix tabs alignment for horizontal tabs with grow (#61895)
* Fix tabs alignment for horizontal tabs with grow

* Review fixes
2025-08-08 23:10:55 +03:00
Oleksandr Yakushev
ab2eb8a1f9 [perf] Fix metabase.util.performance cljc-related issues (#61847)
* [perf] Fix metabase.util.performance cljc-related issues

* [perf] Move faster walk implementation into clj-only namespace
2025-08-08 22:12:39 +03:00
Denis Berezin
d1dd7964c2 fix: update loki after icon change (#61974) 2025-08-08 21:48:06 +03:00
Phoomparin Mano
a1206f3886 Fix pivot tables in static embedding having white cell backgrounds in dark mode (#61939) 2025-08-08 23:16:07 +07:00
Nicolò Pretto
6c24ddee41 test(embed-js): migrate tests to use custom element api (#61965)
* test(embed-js): migrate tests to use custom element api

* use CreateApiKeyResponse

* Update e2e/test/scenarios/embedding/sdk-iframe-embedding/sdk-iframe-embedding.cy.spec.ts

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

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-08-08 15:51:03 +00:00
Nicolò Pretto
e4afb704fe test(simple-embed): add test for is-saved-enabled, initial-sql-parameters and target-collection for metabase-question (#61830) 2025-08-08 17:14:08 +02:00
Edward Paget
aedb754045 fix: login_attrs -> jwt_attrs for jwt users (#61940)
* fix: login_attrs -> jwt_attrs for jwt users

Enables the new behavior where login attributes persist between jwt
logins for existing jwt-based users.

* fixup! add rollback migration

* fixup! yaml syntax
2025-08-08 08:50:33 -05:00
Alex Yarosh
1991635e2a docs: embedded analytics js (#61955)
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-08 10:57:40 +01:00
Timothy S. Dean
8ad7691ba9 Fix revision history for old cards (#61755)
Cards created before v0.55 lack the `:card_schema` field in their revision history. When loading these old revisions, the system throws "Cannot SELECT a Card without including :card_schema" because the Card model's `after-select` expects this field to always be present.

Existing code adds the legacy default `card_schema` value (20) in `revert-to-revision!`. This PR adds the value (20) to old revisions in `revision.clj`'s `after-select`.

This allows users to view revision history and revert cards that were created before the v0.55 upgrade.
2025-08-07 19:47:40 -06:00
Denis Berezin
30df0133e7 Fix navigate forwards to a Details modal for QB (#61835)
* Fix navigate forwards to a Details modal for QB

* Add e2e tests

* Fix e2e tests
2025-08-08 03:05:35 +03:00
AlessioLaiso
c2cee019de Updates the info and info_filled icons (#61938)
* Updates the info and info_filled icons

* use currentcolor fill instead

* remove fixed width and height and rely on viewBox

* tweak svg paths slightly

* fix y position

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-07 21:06:54 +00:00
Denis Berezin
812d1eceef Fix creator list UI on search page (#61936) 2025-08-07 23:44:16 +03:00
Fraser
d7653edd9d Upgrade fetch mock to v12 (#61857) 2025-08-08 07:28:15 +12:00
Cam Saul
f294fb48b7 Fix QP preprocessing middleware disabling Malli checks (#59324)
* Fix QP preprocessing middleware disabling Malli checks

* Test fix

* Yet another fix

* WIP

* Update preprocess.clj
2025-08-07 12:17:28 -07:00
Aleksandr Lesnenko
19f3c013aa fix annoying tooltip (#61883) 2025-08-07 15:36:39 -03:00
Cam Saul
5edd511b5b Finish untangling the metadata knot (#61767)
* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

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

* Fix accidental edits

* Fix metadata calculation for joins that contain joins

* All Lib tests are passing

* The PR that fixes everything [WIP] [ci skip]

* Test fix 🔧

* Sort namespaces

* Docstring formatting

* [Lib tests] 100 failures, 33 errors.

* [Lib] 98 failures, 24 errors.

* [Lib] 76 failures, 17 errors.

* [Lib] 49 failures, 4 errors

* [Lib] 46 failures, 2 errors.

* [Lib] 15 failures, 0 errors.

* [Lib] 13 failures, 0 errors.

* All Lib tests passing

* [QP tests] 2 failures, 1 error.

* Revert :encode/cache-key

* Minor caching performance improvements

* Fix nest breakouts/cumulative aggregations

* Add some more stuff to lib.core

* Test fixes/cljfmt/kondo

* Test fix 🔧

* Test fixes and fix some busted tests

* OMG CACHE SO MUCH FASTER!!!!!

* Fix MongoDB

* Fix tests and support mock segments

* Code cleanup and test fixes 🔧

* Test fix 🔧

* Fix set versus map

* PR feedback

* cljfmt

* More PR feedback and tighten up the field resolution code a bit

* Some schema cleanup

* PR feedback

* PR feedback

* Add TODO

* PR feedback

* Remove implementation of join `visible-columns` which is the same as :default

* Remove unused Card visible columns

* Restore the Card implementation of visible columns in THIS PR.
2025-08-07 11:25:42 -07:00
Phoomparin Mano
b46048533c fix(sdk): send CORS headers for error messages when embedding is disabled (#61808) 2025-08-07 23:46:32 +07:00
Cam Saul
d0c0516fa2 Fix busted tests from #53373 (#61899) 2025-08-07 09:06:33 -07:00
Edward Paget
eeb46a43f1 fix: jwt auth doesn't wipe login_attributes (#61927)
Missed this from the big remerge, where login attributes were being
reset to an empty value on jwt login. Also fixed not including the
jwt-group-sync on the initial formik state.
2025-08-07 11:05:02 -05:00
Phoomparin Mano
31412ebe1e Remove Beta badge from Embedded Analytics JS (#61920) 2025-08-07 22:45:47 +07:00
Phoomparin Mano
5b885a5447 Temporarily replace docs and quickstart with "Try it out" (#61926) 2025-08-07 22:45:29 +07:00
Nicolò Pretto
8df9924e76 fix(sdk): targetCollection should take precedence over recent dashboard (#61874) 2025-08-07 17:40:39 +02:00
Cam Saul
f6d3a73bb3 Add mbql-5-query macro (#61898)
* Add `mbql-5-query` macro

* Remove new test
2025-08-07 09:39:55 -06:00
Luiz Arakaki
2581cc50b4 add snowflake csid as Metabase_Metabase (#61866) 2025-08-07 14:14:37 +00:00
Cam Saul
be36bd367d More Lib metadata caching improvements and faster remove-inactive-field-refs (#61897)
* More Lib metadata caching improvements

* Faster remove-inactive-field-refs middleware
2025-08-07 10:06:22 -04:00
Roman Abdulmanov
064110eaa2 feat: endpoint for retrieve embedding token from jwt (#61540)
* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Some small cleanup

- remove unnecessary try/catch clauses

- rename/rework unnecessary public wrapper fn

- make `jwt` required for the endpoint

- only return session token, not any JWT data

* Test fixes

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-08-07 08:39:01 -05:00
Phoomparin Mano
794d472d29 Tag an embed flow test "persists chart embed options" as flaky (#61865) 2025-08-07 20:28:12 +07:00
Tony-metabase
dd9668fd41 Fix Payload Type Typo for Notifications (#61823)
* Fix Payload Type for Notifications

* Update api.html
2025-08-07 14:15:26 +02:00
Nicolò Pretto
5a2c86ad40 chore(sdk): post release 56 workflow changes (#61909)
* chore(sdk): post release 56 workflow changes

* update changelogs
2025-08-07 12:22:14 +02:00
Nicolò Pretto
35a47b2418 change rspack to allow testing custom domains locally easier (#61800) 2025-08-07 09:31:05 +00:00
Jakub Chodorowicz
304d4cda21 add connection string form prefill feature (#61323)
* wip: add connection string form prefill feature;

add tests

* Refactor deprecated export format

* Skip jdbc:prefix when parsing

* Add snowflake support

* Add success message

* Add a feedback message when pasting a connection string

* Refactor field mapping

* wip use regexes to parse connection strings

* make port optional

* Add snowflake

* Add bigquery and clickhouse

* Add Athena support

* Add Amazon Redshift

* Improve clickhouse

* Add failure message

* Add databricks and druid

* Add MySQL

* Add presto

* Adapt snowflake, create objectToString helper

* Add Apache Spark

* Add SQL server

* Add Oracle

* Add Starburst

* Add vertica

* Reset connection string input on change of key

* Map only when select db and protocol matches

* Fix and refactor semicolon params parsing

* Add tracking to database string uri parsing

* create mapping config with placeholders

use placeholders also in tests

* Create engineKeys types

* Create Cypress paste command using synthetic react events

* Use fade transition for feedback animation

* Add e2e tests for connection strings form filling

* fill in display name from connection string

* Add succes failure text test

* Validate form after filling in fields

* Use more standard fallback for paste

* Remove unused regex parsing implementation

* use mass setFields for fomik setting values

* Add test case for clearing existing values, including engine select field

* Fix form fields being overwritten when pasting connection string

* Add onPaste behavior and use simpler paste mechanism in Cypress

* Fix typo

* Extract and use engineKey type and isEngineKey guard

* Make connection string field controlled by formik

Fix submit values

Fix type error

* Remove unneeded prop justify

* Run regex just for currently selected db

* Fix naming of the test file

* Add e2e db connection test

* Fix missing path in th rspack emedding setup

* Explain why connection string is not sent to BE

* use pojo instead of map for db engines config

* Revert to * export to maintain consistency

* fix connection string test

* create a more meaningful type name
2025-08-07 11:25:36 +02:00
Nicolò Pretto
211f371fd5 mock /app/embed.js in test to the dev server to have up to date version (#61598)
in e2e tests
2025-08-07 11:03:46 +02:00
Cam Saul
3a5e8d1471 QP Binning middleware => Lib (#61530)
* QP Binning middleware => Lib

* Test fixes 🔧

* Resolution should propagate fingerprints from card metadata

* Revert accidental snapshots skip
2025-08-06 16:08:45 -07:00
eliotmetabase
93ec57af84 Update Admin Webapp and DashViz to UX West (#61849)
* Update teams and modules

* Update codeowners
2025-08-06 13:48:23 -07:00
lbrdnk
e5b8670c6d Add MB_SYNC_LEAF_FIELDS_LIMIT setting (#61842)
* Add MB_MONGODB_FIELD_LIMIT setting

* Update tests

* Make the setting generic
2025-08-06 22:40:17 +02:00
lbrdnk
88b979623a Check data permissions of result metadata columns (#61740)
* Add result_metadata perms check to qp

* Check result metadata view data on card put

* Throw the exception

* Test

* Add perm check for ad-hoc referencing cards

* Docstrings

* Use seq

* Order of checks

* Apply suggestions from code review

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

* Simplify into

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-08-06 22:11:10 +02:00
Maz Ameli
458913d017 Add table link to metadata page (#61764)
* add table link to metadata page

* Table

* Add a e2e test

* Add a e2e test

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-08-06 19:21:50 +00:00
John Swanson
d9373fa6d8 Include columns that are not specifically excluded (#61761)
When streaming data for a query, we were only including columns if a)
the viz settings for the column were completely empty, or if b) the viz
settings for the columns included specifically enabling that column.

The problem occurs most clearly for things like native SQL queries.

If you construct a query like

```
SELECT id FROM venues;
```

and then set the column viz settings to *something* non-empty (most easy
way: just hide the `id` column and then show it again), and then save
the card, then change the query to:

```
SELECT id, name FROM venues;
```

then if you download the CSV for this card (even after saving it!)
you'll get a result that only contains `id` and not `name`.

A few tests needed to change here because they were implicitly assuming
the old behavior, but I don't think that's entirely intentional. This
behavior was different than the behavior in the Metabase application
proper, where UI results would show all the columns (in the above
example, they'd immediately show `id` *and* `name`).
2025-08-06 10:20:08 -07:00
Alex Yarosh
34e884c47a docs: jwt docs (#61876)
* jwt edits

* Optimized 2 images, saved 188.8 KB (46.0% smaller)

* why are y'all 'waiting for the status to be reported'

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-06 16:59:46 +00:00
Timofey Kachalov
ee9d5d3832 feat(sdk): Add "SDK incompatibility with instance" banner (#61859) 2025-08-06 19:34:36 +04:00
Riley Thompson
230784e3fb Always set connection role for Redshift (#61869) 2025-08-06 15:16:03 +00:00
Phoomparin Mano
8119bc5c8c feat(sdk): add translation context and aria-label to embedding sdk settings (#61856) 2025-08-06 21:42:42 +07:00
Phoomparin Mano
94570c4c1b Add color reset button to embed flow (#61839) 2025-08-06 21:40:16 +07:00
Timofey Kachalov
aade35f0db refactor(sdk): Minor imports/code adjustments for Hosted Bundle (#61862) 2025-08-06 18:11:28 +04:00
Timofey Kachalov
289e00d760 refactor(sdk): Add styles for custom SDK spinner loader (#61864) 2025-08-06 13:25:25 +00:00
Jakub Chodorowicz
7428fee268 Prg-108-add-gem-icon-and-free-trial-cta-in-interactive-embedding (#61714)
* Create Upsell CTA component

* Replace pro labe with gem in embed upsell

* Create and use UpsellCta in Embedding Upsell

* Rebuiltd the logic for showing links and upsells in embedding modal

* Add UpsellCta tests

* Remove unneeded hook

Fix test and URL rendering for hosted

* Remove unneeded hook useInteractiveEmbeddingCta

* Fix test not running in target build (OSS)

* Fix embedded modal ee end premium cloud tests

* Add missing translation tag

* Use single upsellcta styling
2025-08-06 11:51:04 +02:00
Timofey Kachalov
ffad0df277 refactor(sdk): Prepare e2e code for Hosted Bundle (#61852) 2025-08-06 13:12:08 +04:00
Nicolò Maria Mezzopera
d86d74ba5f PR-envs and ci skip should work together (#61448)
* feat: promote uberjar as the single uberjar creation workflow

* chore: remove useless   reuse-existing-artifacts

* refactor: streamline PR environment workflow by removing wait_for_uberjar input and simplifying uberjar retrieval

* fix: ensure default editions are used if container info retrieval fails

* chore: don't build uberjar outside of run-tests

* fix: update uberjar artifact name to use the current SHA instead of PR head SHA

* fix: update uberjar artifact names to use PR head SHA when available

* fix: update uberjar workflow to simplify input parameters and improve conditional checks

* fix: add concurrency settings to uberjar workflow

* fix: update documentation condition in run-tests workflow

* fix: add default node version

* fix: update conditions for container info retrieval and containerization steps

* fix: update default node version to 22 in uberjar workflow

* Update .github/workflows/uberjar.yml

* Update .github/workflows/uberjar.yml

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-08-06 09:08:29 +00:00
Phoomparin Mano
141cff0fe8 Fix upsell button and auth links in embedding admin settings (#61802) 2025-08-06 15:21:14 +07:00
Timofey Kachalov
cc758a125d refactor(sdk): Convert webpack.embedding-sdk.config to rspack and prepare for Hosted Bundle (#61822) 2025-08-06 10:09:46 +04:00
Cam Saul
4b8d3a1dc8 Flaky test fix for metabase.queries.api.card-test/we-can-get-a-list-of-dashboards-a-card-appears-in (#61619)
* Flaky test fix for metabase.queries.api.card-test/we-can-get-a-list-of-dashboards-a-card-appears-in

* Fix formatting

* cljfmt

* Fix Kondo warning
2025-08-05 16:18:13 -07:00
Case Nelson
c9106f66f1 fix: handle arrays in sparksql (#61690) 2025-08-05 20:58:21 +00:00
Alexander Polyankin
efac2b8f96 [Release blocker] Revert fuzzy matching changes (#61828)
* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Test fixes
2025-08-05 15:55:38 -04:00
Phoomparin Mano
ab30c325db Rename embed-iframe route to embed-js (#61803) 2025-08-06 02:47:46 +07:00
Alexander Polyankin
d11ce55c79 [Release blocker] Revert join custom columns changes (#61827) 2025-08-05 15:19:32 -04:00
Cam Saul
81b5c133b2 Ensure we're actually using a cached metadata provider in tests (somewhat faster Lib/QP tests) (#61702)
* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

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

* Fix accidental edits

* Test fix 🔧

* Sort namespaces
2025-08-05 18:58:24 +00:00
Phoomparin Mano
673c5b93ed Add enable_embedding_simple to stats.clj (#61807) 2025-08-05 22:01:08 +07:00
Ngoc Khuat
44ec7bc393 [Action v2] Undo / Redo (#61677) 2025-08-05 13:24:50 +00:00
Timofey Kachalov
62b48d1795 refactor(sdk): Prepare src/metabase code for Hosted Bundle (#61801) 2025-08-05 15:25:26 +04:00
Timofey Kachalov
da35b08918 refactor(sdk): Add x-metabase-version header to BE responses (#61799) 2025-08-05 12:35:50 +04:00
Timofey Kachalov
4a56e706eb Migrate webpack.shared.config.js to rspack (#61796) 2025-08-05 12:34:24 +04:00
Phoomparin Mano
d8a03a312f Update copy from new iframe to Embedded Analytics JS in embed flow (#61788) 2025-08-05 01:13:01 +04:00
dpsutton
81f880637b bump hive to 4.1.0 (#61766)
solves:
https://github.com/metabase/metabase/security/code-scanning/305
https://github.com/metabase/metabase/security/code-scanning/304
https://github.com/metabase/metabase/security/code-scanning/301
https://github.com/metabase/metabase/security/code-scanning/302

does not solve:
https://github.com/metabase/metabase/security/code-scanning/490
2025-08-04 15:32:00 -05:00
Oleksandr Yakushev
9a6dd6456f [pivot] Implement optimized clj->js and use it when recalculating pivots on frontend (#61241) 2025-08-04 21:22:22 +03:00
Phoomparin Mano
698be3e9f7 Revert "feat(sdk): hide tables by default in embedding data picker if there a…" (#61792) 2025-08-04 22:17:36 +07:00
Phoomparin Mano
f232f68588 Cleanup stacked card background on embed flow preview (#61782) 2025-08-04 17:29:10 +07:00
Oleksandr Yakushev
75ef744af8 [m.u.performance] Make performance namespace cross-platform (#61159) 2025-08-02 02:05:40 +03:00
Phoomparin Mano
84e35e40da feat(sdk): hide tables by default in embedding data picker if there are more than 2 models (#61022)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-08-01 21:27:33 +00:00
Riley Thompson
d3f48b79a5 Enable DB routing for Databricks (#61630) 2025-08-01 16:56:46 -04:00
Jeff Bruemmer
643695fc44 docs - update expressions list (#61727)
* date funcs

* summary
2025-08-01 15:43:19 -04:00
Jeff Bruemmer
fd29d268d3 docs - update time grouping example (#61752)
* Update time-grouping-parameters.md

* tags

* edit
2025-08-01 15:42:16 -04:00
dpsutton
1a14bd6eba submit init function, not results (#61733)
was blocking on startup
stacktrace below is representative. has a few other things like reveal
but shows that we get into a huge loop over all cards and you end up
waiting for the instance to be ready for a long time
```
	at metabase.lib.card$fn__77290$fn__77297.invoke(card.cljc:71)
	at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303$fn__77304.invoke(card.cljc:141)
	at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$mapv.invokeStatic(core.clj:7050)
	at clojure.core$mapv.invoke(core.clj:7050)
	at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303.invoke(card.cljc:141)
	at metabase.lib.card$fn__77302$fn__77308.invoke(card.cljc:120)
	at metabase.lib.card$fn__77316$card_cols_STAR_77315__77317.invoke(card.cljc:163)
	at metabase.lib.card$fn__77316$fn__77322.invoke(card.cljc:157)
	at metabase.lib.card$fn__77350$card_metadata_columns77349__77351.invoke(card.cljc:223)
	at metabase.lib.card$fn__77350$fn__77354.invoke(card.cljc:217)
	at metabase.lib.card$eval77367$_AMPERSAND_f__77368.invoke(card.cljc:257)
	at metabase.lib.card$eval77367$fn__77372.invoke(card.cljc:242)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.field.resolution$fn__80775$resolve_in_card_returned_columns80774__80776.invoke(resolution.cljc:352)
	at metabase.lib.field.resolution$fn__80775$fn__80784.invoke(resolution.cljc:346)
	at metabase.lib.field.resolution$fn__80788$resolve_in_card_or_stage_metadata80787__80789.invoke(resolution.cljc:365)
	at metabase.lib.field.resolution$fn__80788$fn__80801.invoke(resolution.cljc:358)
	at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invokeStatic(resolution.cljc:410)
	at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invoke(resolution.cljc:390)
	at metabase.lib.field.resolution$fn__80844$resolve_from_previous_stage_or_source80843__80845.invoke(resolution.cljc:440)
	at metabase.lib.field.resolution$fn__80844$fn__80861.invoke(resolution.cljc:434)
	at metabase.lib.field.resolution$fn__80865$resolve_field_ref80864__80867.invoke(resolution.cljc:471)
	at metabase.lib.field.resolution$fn__80865$fn__80878.invoke(resolution.cljc:457)
	at metabase.lib.field$eval80922$_AMPERSAND_f__80923.invoke(field.cljc:62)
	at metabase.lib.field$eval80922$fn__80925.invoke(field.cljc:60)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680$fn__74681.invoke(calculation.cljc:287)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680.invoke(calculation.cljc:286)
	at metabase.lib.metadata.calculation$fn__74679$fn__74684.invoke(calculation.cljc:275)
	at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329$fn__80331.invoke(breakout.cljc:43)
	at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$mapv.invokeStatic(core.clj:7050)
	at clojure.core$mapv.invoke(core.clj:7050)
	at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329.invoke(breakout.cljc:42)
	at metabase.lib.breakout$fn__80328$fn__80334.invoke(breakout.cljc:35)
	at metabase.lib.stage$fn__81784$breakouts_columns81783__81785.invoke(stage.cljc:59)
	at metabase.lib.stage$fn__81784$fn__81787.invoke(stage.cljc:55)
	at metabase.lib.stage$fn__81843$summary_columns81842__81844.invoke(stage.cljc:92)
	at metabase.lib.stage$fn__81843$fn__81846.invoke(stage.cljc:86)
	at metabase.lib.stage$eval81986$_AMPERSAND_f__81988.invoke(stage.cljc:290)
	at metabase.lib.stage$eval81986$fn__81996.invoke(stage.cljc:283)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:513)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:510)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.queries.models.card$dataset_query__GT_dimensions.invokeStatic(card.clj:1270)
	at metabase.queries.models.card$dataset_query__GT_dimensions.invoke(card.clj:1262)
	at metabase.queries.models.card$extract_non_temporal_dimension_ids.invokeStatic(card.clj:1277)
	at metabase.queries.models.card$extract_non_temporal_dimension_ids.invoke(card.clj:1274)
	at metabase.search.ingestion$execute_function_attr.invokeStatic(ingestion.clj:68)
	at metabase.search.ingestion$execute_function_attr.invoke(ingestion.clj:63)
	at metabase.search.ingestion$execute_all_function_attrs$fn__131886.invoke(ingestion.clj:80)
	at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1309)
	at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
	at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1314)
	at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
	at clojure.lang.PersistentHashMap.kvreduce(PersistentHashMap.java:238)
	at clojure.core$fn__8559.invokeStatic(core.clj:6987)
	at clojure.core$fn__8559.invoke(core.clj:6967)
	at clojure.core.protocols$fn__8287$G__8282__8296.invoke(protocols.clj:174)
	at clojure.core$reduce_kv.invokeStatic(core.clj:6998)
	at clojure.core$reduce_kv.invoke(core.clj:6989)
	at metabase.search.ingestion$execute_all_function_attrs.invokeStatic(ingestion.clj:76)
	at metabase.search.ingestion$execute_all_function_attrs.invoke(ingestion.clj:73)
	at metabase.search.ingestion$__GT_document.invokeStatic(ingestion.clj:87)
	at metabase.search.ingestion$__GT_document.invoke(ingestion.clj:85)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at medley.core$distinct_by$fn__15232$fn__15233.invoke(core.cljc:290)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at clojure.core$completing$fn__8562.invoke(core.clj:7010)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at toucan2.pipeline$with_init$fn__51829.invoke(pipeline.clj:327)
	at clojure.core$completing$fn__8562.invoke(core.clj:7010)
	at toucan2.jdbc.result_set$reduce_result_set.invokeStatic(result_set.clj:156)
	at toucan2.jdbc.result_set$reduce_result_set.invoke(result_set.clj:125)
	at toucan2.jdbc.query$reduce_jdbc_query.invokeStatic(query.clj:51)
	at toucan2.jdbc.query$reduce_jdbc_query.invoke(query.clj:22)
	at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invokeStatic(pipeline.clj:19)
	at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invoke(pipeline.clj:9)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
	at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
	at toucan2.pipeline$transduce_execute$with_connection_STAR___51727.invoke(pipeline.clj:78)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invokeStatic(connection.clj:13)
	at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invoke(connection.clj:11)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
	at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.pipeline$transduce_execute.invokeStatic(pipeline.clj:77)
	at toucan2.pipeline$transduce_execute.invoke(pipeline.clj:64)
	at clojure.lang.Var.invoke(Var.java:401)
	at toucan2.pipeline$transduce_compiled_query.invokeStatic(pipeline.clj:244)
	at toucan2.pipeline$transduce_compiled_query.invoke(pipeline.clj:240)
	at toucan2.pipeline$transduce_built_query.invokeStatic(pipeline.clj:252)
	at toucan2.pipeline$transduce_built_query.invoke(pipeline.clj:246)
	at toucan2.pipeline$transduce_query_primary_method_default.invokeStatic(pipeline.clj:272)
	at toucan2.pipeline$transduce_query_primary_method_default.invoke(pipeline.clj:269)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
	at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
	at toucan2.pipeline$transduce_query_STAR_.invokeStatic(pipeline.clj:278)
	at toucan2.pipeline$transduce_query_STAR_.invoke(pipeline.clj:274)
	at toucan2.pipeline$transduce_with_model.invokeStatic(pipeline.clj:293)
	at toucan2.pipeline$transduce_with_model.invoke(pipeline.clj:280)
	at toucan2.pipeline$transduce_parsed.invokeStatic(pipeline.clj:309)
	at toucan2.pipeline$transduce_parsed.invoke(pipeline.clj:295)
	at clojure.lang.AFn.applyToHelper(AFn.java:160)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$apply.invoke(core.clj:662)
	at toucan2.pipeline$reducible_fn$reify__51862.reduce(pipeline.clj:404)
	at clojure.core$transduce.invokeStatic(core.clj:7025)
	at clojure.core.Eduction.reduce(core.clj:7874)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$reduce.invoke(core.clj:6947)
	at metabase.util$rconcat$reify__16182.coll_reduce(util.cljc:1188)
	at clojure.core$transduce.invokeStatic(core.clj:7026)
	at clojure.core.Eduction.reduce(core.clj:7874)
	at clojure.core$transduce.invokeStatic(core.clj:7025)
	at clojure.core$transduce.invokeStatic(core.clj:7021)
	at clojure.core$transduce.invoke(core.clj:7012)
	at metabase.search.appdb.index$index_docs_BANG_.invokeStatic(index.clj:279)
	at metabase.search.appdb.index$index_docs_BANG_.invoke(index.clj:275)
	at metabase.search.appdb.core$populate_index_BANG_.invokeStatic(core.clj:169)
	at metabase.search.appdb.core$populate_index_BANG_.invoke(core.clj:168)
	at metabase.search.appdb.core$eval132669$fn__132671.invoke(core.clj:182)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at metabase.search.core$init_index_BANG_$iter__133794__133798$fn__133799.invoke(core.clj:91)
	at clojure.lang.LazySeq.force(LazySeq.java:50)
	at clojure.lang.LazySeq.realize(LazySeq.java:89)
	at clojure.lang.LazySeq.seq(LazySeq.java:106)
	at clojure.lang.RT.seq(RT.java:555)
	at clojure.core$seq__5488.invokeStatic(core.clj:139)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24)
	at clojure.core.protocols$fn__8266.invokeStatic(protocols.clj:74)
	at clojure.core.protocols$fn__8266.invoke(protocols.clj:74)
	at clojure.core.protocols$fn__8207$G__8202__8220.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6965)
	at clojure.core$reduce.invoke(core.clj:6947)
	at metabase.search.core$init_index_BANG_.invokeStatic(core.clj:88)
	at metabase.search.core$init_index_BANG_.doInvoke(core.clj:80)
	at clojure.lang.RestFn.invoke(RestFn.java:411)
	at metabase.search.task.search_index$init_BANG_$fn__173098.invoke(search_index.clj:38)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394$with_transaction_STAR___126395.invoke(cluster_lock.clj:61)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at metabase.app_db.connection$do_transaction$thunk__61025.invoke(connection.clj:145)
	at metabase.app_db.connection$do_transaction.invokeStatic(connection.clj:164)
	at metabase.app_db.connection$do_transaction.invoke(connection.clj:141)
	at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invokeStatic(connection.clj:201)
	at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invoke(connection.clj:174)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invokeStatic(connection.clj:249)
	at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invoke(connection.clj:245)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:58)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:212)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394.invoke(cluster_lock.clj:53)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invokeStatic(connection.clj:18)
	at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invoke(connection.clj:15)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at metabase.app_db.connection$do_with_connection_primary_method_default.invokeStatic(connection.clj:132)
	at metabase.app_db.connection$do_with_connection_primary_method_default.invoke(connection.clj:130)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
	at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invokeStatic(cluster_lock.clj:53)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invoke(cluster_lock.clj:51)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407$do_with_cluster_lock_STAR__STAR___126409.invoke(cluster_lock.clj:78)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:662)
	at metabase.util.retry$decorate$fn$reify__126370.call(retry.clj:110)
	at io.github.resilience4j.retry.Retry.lambda$decorateCallable$5(Retry.java:306)
	at metabase.util.retry$decorate$fn__126369.doInvoke(retry.clj:111)
	at clojure.lang.RestFn.invoke(RestFn.java:400)
	at metabase.util.retry$fn__126375$make126374__126376$fn__126377.invoke(retry.clj:120)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:82)
	at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:75)
	at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
	at metabase.search.task.search_index$init_BANG_.invokeStatic(search_index.clj:37)
	at metabase.search.task.search_index$init_BANG_.invoke(search_index.clj:33)
	at metabase.search.task.search_index$eval173156$fn__173157.invoke(search_index.clj:46)
	at metabase.startup.core$run_startup_logic_BANG_$fn__173079.invoke(core.clj:30)
	at metabase.startup.core$run_startup_logic_BANG_.invokeStatic(core.clj:28)
	at metabase.startup.core$run_startup_logic_BANG_.invoke(core.clj:24)
	at metabase.core.core$init_BANG__STAR_.invokeStatic(core.clj:181)
	at metabase.core.core$init_BANG__STAR_.invoke(core.clj:117)
	at metabase.core.core$init_BANG_.invokeStatic(core.clj:194)
	at metabase.core.core$init_BANG_.invoke(core.clj:189)
	at dev$init_BANG_.invokeStatic(dev.clj:143)
	at dev$init_BANG_.invoke(dev.clj:139)
	at dev$start_BANG_.invokeStatic(dev.clj:180)
	at dev$start_BANG_.invoke(dev.clj:176)
	at dev$eval206099.invokeStatic(NO_SOURCE_FILE:1)
	at dev$eval206099.invoke(NO_SOURCE_FILE:1)
	at clojure.lang.Compiler.eval(Compiler.java:7739)
	at clojure.lang.Compiler.eval(Compiler.java:7729)
	at clojure.lang.Compiler.eval(Compiler.java:7694)
	at clojure.core$eval.invokeStatic(core.clj:3232)
	at clojure.core$eval.invoke(core.clj:3228)
	at vlaaad.reveal.repl$wrap_eval$fn__37945.invoke(repl.clj:90)
	at clojure.main$repl$read_eval_print__9248$fn__9251.invoke(main.clj:437)
	at clojure.main$repl$read_eval_print__9248.invoke(main.clj:437)
	at clojure.main$repl$fn__9257.invoke(main.clj:459)
	at clojure.main$repl.invokeStatic(main.clj:459)
	at clojure.main$repl.doInvoke(main.clj:368)
	at clojure.lang.RestFn.applyTo(RestFn.java:140)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:662)
```
2025-08-01 14:25:50 -05:00
Jeff Bruemmer
debb945c57 link to intro page (#61744) 2025-08-01 19:22:18 +00:00
Phoomparin Mano
8d195dc6db Add note on useExistingUserSession's browser compatibility (#61663) 2025-08-02 02:00:22 +07:00
John Swanson
1eccdad5f4 Format scalar currencies correctly (#61664)
Previously we were treating all currency formatting as if we were in a
table, and only adding the currency symbol if `currency-in-header` were
explicitly set to `false` for the column.

When formatting a scalar value, though, we want to always add the
currency symbol inline (since there is no header in this case).

I found that `metabase.channel.render.body/format-cell` and
`metabase.formatter.core/format-number` were actually only used to
format *scalar* cells and *scalar* numbers (as opposed to cells in a
table), so I renamed them for a bit more clarity and added a new
optional argument, `scalar?`, to
`metabase.formatter.core/number-formatter`. When passed (and truthy) the
currency symbol will be splatted into the formatted number even if
`:currency-in-header` is not `false`.
2025-08-01 09:51:31 -07:00
Ryan Laurie
3f07958eae [ci run] Fix deprecated input (#61700)
* replaced deprecated Input with TextInput

* udpate a couple more things

---------

Co-authored-by: iamkabilash <iamkabilash@gmail.com>
2025-08-01 10:51:06 -06:00
Jeff Bruemmer
0947c6b604 docs - minor edits (#61735)
* minor edits

* Update docs/permissions/row-and-column-security.md

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

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-08-01 16:47:09 +00:00
Jeff Bruemmer
e62c8f1fff docs - rename data sandboxing to row and column security (#61682) 2025-08-01 12:35:02 -04:00
John Swanson
efb70a343a do not throw on empty query for /search (#61615)
instead just pass `(not-empty q)` to the search subsystem, which will
convert it to `nil` if it's empty and pass it unchanged if it's not.

I still don't think this is probably the ideal user experience when you
navigate to `/search` but it's not an error at least.
2025-08-01 08:48:45 -07:00
John Swanson
6f34845c13 Fix zero measure count issue for pivot tables (#61565) 2025-08-01 08:23:26 -07:00
Riley Thompson
11f24779e2 Always set roles on connections (#61563)
* always set roles on connections

* add deps

* include sql-jdbc.execute

* kondo warn on reflection
2025-08-01 14:51:25 +00:00
Brad Anderson
086a00ab8d Fix: UXW-382 - Public Links menu item within sharing menu is too large (#61628)
* UXW-382 Updates "Public link" menu item for admins when public links aren't enabled so it doesn't look obviously broken

* UXW-382 Updates tests

* UXW-382 Updates "enable public links" menu item to be disabled per PR feedback

* UXW-382 Swaps core styles for mantine props per PR feedback
2025-08-01 10:50:58 -04:00
Nicolò Pretto
ed82963a86 chore(sdk): bump minimum react version to 18 (#61718) 2025-08-01 16:36:02 +02:00
Edward Paget
0fe24156a3 fix: issues generating valid urls for map tiles (#61634)
* fix: issues generating valid urls for map tiles

Fixes to issues generating map tiles, one is on x-ray dashboards we need
to check that we're not in a real dashboard and send an ad hoc tile
request.

Second if the field ref sent in the request has options we need to
remove the 'base-type' option because the type will be encoded as
something like test%2FFloat and the way Jetty decodes URLs before
parsing turns it into a '/' in a position a path separator cannot be:
https://github.com/jetty/jetty.project/issues/7713

* fixup! typeguard dashbaord id

* Update maps.cy.spec.js

* fixup! better handle null field opts
2025-08-01 08:40:27 -05:00
Riley Thompson
ad3ec1b797 Enable DB routing for snowflake (#61434) 2025-08-01 09:24:24 -04:00
Jeff Bruemmer
9276aaad2a docs - update generated docs (#61689)
* config template

* api docs

* env var docs
2025-08-01 09:21:27 -04:00
Timofey Kachalov
c69ef65bff feat(sdk): Use Mantine styles with CSS layer for the SDK (#61475) 2025-08-01 17:12:25 +04:00
Nicolò Pretto
87f36432ca allow setting the default cypress browser via env CYPRESS_BROWSER (#61652)
* allow setting the default cypress browser via env CYPRESS_BROWSER

* keep --browser have higher priority than the env
2025-08-01 12:19:34 +02:00
Nicolò Pretto
00ceb1aff2 remove references to ENTERPRISE_TOKEN (#61667)
* update docs that referenced old envs CYPRESS_ALL

* remove requirement on ENTERPRISE_TOKEN that's not needed anymore
2025-08-01 12:18:09 +02:00
Nicolò Pretto
b243e4e4d4 prepare the sdk workflow for 56 release (#61704) 2025-08-01 08:31:34 +00:00
Oleksandr Yakushev
7c2347fef6 [qp] Use metabase.util.performance/postwalk instead of regular clojure.walk (#60722) 2025-08-01 06:10:20 +00:00
Ryan Laurie
ab0ed63e26 update build info for v56 (#61676) 2025-07-31 20:18:24 -06:00
Ryan Laurie
d34ddd45c2 fix release notes preview action (#61671) 2025-07-31 20:18:16 -06:00
bryan
b07b86a367 enable cider middleware in dev-start (#61678)
Co-authored-by: Raimon Grau <raimonster@gmail.com>
2025-07-31 23:18:52 +00:00
Ryan Laurie
c4db9bf7fe fix native models test (#61697) 2025-07-31 22:20:33 +00:00
Cam Saul
d389949074 Re-implementation of metabase.driver.common.parameters.* that uses Lib (#61158)
* Re-implementation of `metabase.driver.common.parameters.*` that uses Lib

* Fix Kondo warnings

* Move tests that have nothing to do with drivers to QP

* Test fixes 🔧

* Test fixes 🔧

* Try simplifying the PR
2025-07-31 18:14:41 -04:00
bryan
0a9b808754 update jar-download to handle {v,}1.56.0-beta (#61696) 2025-07-31 22:11:21 +00:00
Riley Thompson
f1057b6420 Enable DB routing for Redshift (#61390)
* db routing for redshift

* simplify test

* dataset name multimethod

* small change

* use delayed defs

* add redshift ci routing env var

* small fix

* update dataset definitions

* change back to original data
2025-07-31 17:14:50 -04:00
Jakub Chodorowicz
28bf41bb17 Replace getStoreUrl usage with useStoreUrl (#61534)
* Replace getStoreUrl usage with useStoreUrl

* Refactor getStoreUrl

* Add harcoded default store URL (live store)
2025-07-31 15:09:31 -06:00
Oleksandr Yakushev
73bcc90a68 [pivot] Replace json-roundtrip with explicit type conversions (#61384) 2025-08-01 00:09:26 +03:00
Oleksandr Yakushev
74a6335bd3 [legacy-mbql] Optimize normalize-tokens (#60721) 2025-08-01 00:03:43 +03:00
Riley Thompson
fa3b11fcde Retry have-select-privilege? on error (#61236)
* feat: driver/do-with-resilient-connection

* feat: :keep-open? option to do-with-connection-with-options

* feat: attempt describe-database with resilient connection

* feat: execute jdbc query with retry conn

* test

* avoid recursive issues

* simplify

* changelog

* type hint

* force local conn, so the connection being closed won't close outer unrealized result sets

* working test

* more test

* opts

* style

* add test for connection options

* notes

* fix test

* docstring

* Update src/metabase/driver/sql_jdbc/execute.clj

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

* logs

* better logs

* try to close conn when it's no longer valid

* pull out logic to is-conn-open

* is-conn-open? test

* clarify

* Update docs/developers-guide/driver-changelog.md

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

* update version

* chore: move tests to right namespace

* retry have select privilege on error

* add test

* improve test

* remove let

* separate connection for each test

* clean up test

* try druid jdbc ci fix

* close connection during test

* use do with resilient connection in test for druid

* formatting

* always set role if supported

* Fix clickhouse and sqlserver

* impersonation test

* use normal-driver-select

* address comments

* kondo

* remove debug

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-07-31 19:38:56 +00:00
Denis Berezin
f8f5e20c1f UXW-381 Fix collections bulk action buttons UI (#61640) 2025-07-31 19:06:57 +03:00
Alex Yarosh
06712c46e5 Update database-routing.md (#61672) 2025-07-31 15:39:59 +00:00
Brad Anderson
f9d74d1f3b Fix: UXW-28 When deleting a tab with questions saved to the dashboard, no option offered to keep and move those questions (#61526)
* UXW-28 Adds confirmation modal when deleting a tab that contains dashboard-only cards

* UXW-28 Makes confirmation modal smarter; uses short version if all questions on a tab are dashboard questions, lists affected questions if it's a mix

* UXW-28 Adds tests
2025-07-31 10:51:35 -04:00
Brad Anderson
1dffd98bd7 UXW-314 Fix action icon inconsistencies (#61639) 2025-07-31 08:48:04 -06:00
Nicola Mometto
909354fe89 Attempt to reconnect during select probing if connection is closed (#60857)
* feat: driver/do-with-resilient-connection

* feat: :keep-open? option to do-with-connection-with-options

* feat: attempt describe-database with resilient connection

* feat: execute jdbc query with retry conn

* test

* avoid recursive issues

* simplify

* changelog

* type hint

* force local conn, so the connection being closed won't close outer unrealized result sets

* working test

* more test

* opts

* style

* add test for connection options

* notes

* fix test

* docstring

* Update src/metabase/driver/sql_jdbc/execute.clj

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

* logs

* better logs

* try to close conn when it's no longer valid

* pull out logic to is-conn-open

* is-conn-open? test

* clarify

* Update docs/developers-guide/driver-changelog.md

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

* update version

* chore: move tests to right namespace

* impersonation test

* use normal-driver-select

* trigger CI

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-07-31 15:19:49 +01:00
Edward Paget
944ca02530 chore: remove stray #p (#61665)
Not sure why kondo didn't get this.
2025-07-31 09:08:50 -05:00
Vamsi Peri
a2b720a743 Delete .github/workflows/claude.yml (#61666) 2025-07-31 13:27:43 +00:00
eliotmetabase
3f19d40ca1 Temporary change to fix CI, will update modules properly (#61662) 2025-07-31 13:05:34 +00:00
Phoomparin Mano
e357c4f0db Design cleanup for embedding sdk settings page (#61653) 2025-07-31 19:57:52 +07:00
Timofey Kachalov
8563b74b89 Remove circular references in SDK package (#61657) 2025-07-31 16:16:13 +04:00
Nicolò Pretto
6558cca6a4 feat(simple-embed): parse attributes with json5 to be more permissive… (#61648)
* feat(simple-embed): parse attributes with json5 to be more permissive with quotes

* Update package.json

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

* fix tests

* Apply suggestion from @heypoom

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

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-31 11:57:30 +00:00
Phoomparin Mano
435e905ffd Hide Embed menu from "New" button if the user is not an admin (#61658) 2025-07-31 18:39:58 +07:00
Oleksandr Solovyov
3063577208 update snowflake's commons-lang3 to clear out security issue (#61656) 2025-07-31 13:38:27 +02:00
Timofey Kachalov
1c6c3681a8 Add backend-sources as triggers to SDK compatibility tests (#61650) 2025-07-31 14:28:48 +04:00
Chris Truter
84f0a92394 Assign correct MB version metadata to data-editing functions (#61647) 2025-07-31 09:31:04 +00:00
Chris Truter
9019aab71e BE support for Table Data Editing (#61490)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2025-07-31 08:34:17 +00:00
Cam Saul
abdfe5062c Faster field ref resolution (#61529)
* Remove debugging stuff

* 14 failures, 1 error.

* 10 failures, 1 error.

* 10 failures, 0 errors.

* Better log messages

* Faster field ref resolution

* Test fixes 🔧

* Some test fixes 🔧

* Remove resolve-joined-fields middleware

* Fix lib.underlying calculation of fields with join aliases

* Fix busted pivot tests

* Remove unused fn

* More resolution fixes

* drill-thru use vars so we can get updated fns in the REPL

* Consolidate the lib metadata => legacy metadata functions

* Add a pile of additional tests

* Migrate the `resolve-joined-fields` middleware (#39884)

* Support automatically removing duplicate refs in `:fields` and `:breakouts` during normalization

* More cleanup and extra tests 🔧

* Add ::mbql.s/OrderBys

* Mess with logging in resolution even more

* Order bys should be distinct ignoring keys like :base-type or namespaced keys

* I have fixed #60587

* One last round of test fixes??

* Test fix

* Code cleanup

* Fix test failures 🔧

* MongoDB test fix

* Fix Oracle test 🔧

* MongoDB test fix 🔧

* cljfmt

* e2e test fix?

* Test fix 🔧

* Less noisy logging

* Improve field resolution for implicit joins; PR feedback (part 1)

* PR feedback (part 2) and extra dox
2025-07-30 23:35:25 +00:00
eliotmetabase
adefc0f0b7 Create UX West, remove Admin Webapp and Dashviz (#61644) 2025-07-30 23:34:58 +00:00
dpsutton
fadfd67275 Test drivers on folder changes (#61633)
* Run tests if files in lib/drivers/qp are changes

check src/metabase/lib, src/metabase/query_processor, modules/drivers

we key off of team label but this is hopefully close enough to what we
really want

* run an action linter

```
❯ actionlint /Users/dan/projects/work/metabase/.github/workflows/drivers.yml
.github/workflows/drivers.yml:440:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
.github/workflows/drivers.yml:537:15: description is required in metadata of "Wait for localhost port to be ready" action at "/Users/dan/projects/work/metabase/.github/actions/await-port/action.yml" [action]
    |
537 |       - uses: ./.github/actions/await-port
    |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:587:13: description is required in metadata of "Test database driver" action at "/Users/dan/projects/work/metabase/.github/actions/test-driver/action.yml" [action]
    |
587 |       uses: ./.github/actions/test-driver
    |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:743:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
```

acitonlint seems pretty nice

not fixing the exclude-tag since that seems to work just fine

* fix syntax

* fetch base branch for file checks

to see if we changed files, need the base

* indentation is fun. super fast iteration

* resequence if before run
2025-07-30 18:28:38 -05:00
dpsutton
a204791f86 run third tier on devex team label (#61577)
* run third tier on devex team label

* empty to poke CI

* make prepare-statement private

probably good for this to be private either way, but this is done now to
kick CI and run tests that aren't running in CI

* close single quote
2025-07-30 17:09:57 -05:00
Edward Paget
4e7f0f28d3 fix: snyk set org and repo for open source limits (#61605) 2025-07-30 15:56:54 -05:00
John Swanson
a15d4122f2 Don't try to update setting as non-admin (#61567)
We're using a setting as a half-baked way to track whether we've ever
created a non-table chart. We do this regardless of whether you're an
admin or not, but the endpoint responds with a 403 if you're not an
admin.

Honestly motivation here was fixing [UXW-152: 403 thrown for non-admins
when viewing question re:
non-table-chart-generated](https://linear.app/metabase/issue/UXW-152/403-thrown-for-non-admins-when-viewing-question-re-non-table-chart)
but it feels a little silly. But... it's not *completely* unreasonable.
2025-07-30 20:47:37 +00:00
Case Nelson
8bc377369b refactor: drop with-temp from field-ref-repro tests (#61566) 2025-07-30 16:23:42 -04:00
Uladzimir Havenchyk
2ff3bb736f deps: update deps that use form-data to the fixed versions (#61582)
* deps: update deps that use form-data to the fixed versions

* downgrade jsdom
2025-07-30 20:06:09 +00:00
Uladzimir Havenchyk
badbd28565 deps: upgrade on-headers dep (#61589) 2025-07-30 20:05:11 +00:00
Nathan Voxland
c45c500628 Check for dev namespace better (#61610) 2025-07-30 14:46:08 -05:00
Uladzimir Havenchyk
a95c69a0b3 deps(release): update slack api and form-data packages (#61584) 2025-07-30 22:32:48 +03:00
Case Nelson
1319841229 dev: add the ability to run native ddl as part of dataset definitions (#61343)
* dev: add the ability to run native ddl as part of dataset definitions

* Fixing tests

* Fix kondo

* Fix tests and kondo

* Fix clickhouse tests

* Fix another clickhouse test

* Fix bigquery test

* Fix bigquery test

* Trigger Build
2025-07-30 13:24:53 -06:00
Edward Paget
e0bacfea5e feat: update group mapping text for jwt behavior (#61273)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* feat: make jwt group attribute admin configurable

* feat: update group mapping text for jwt behavior
2025-07-30 19:17:41 +00:00
Rodrigo López Dato
987ed5d7da Typo (#61624) 2025-07-30 16:01:04 -03:00
Nicolò Pretto
431afb660b feat(new-embed): log an error when the parsing of a json attribute fails (#61617)
* feat(new-embed): log an error when the parsing of a json attribute fails

* Update enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/webcomponents.ts

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

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-30 20:51:21 +02:00
Edward Paget
b11f0905f3 fix: allow scalar user-attributes (#61613)
* fix: allow scalar user-attributes

Only drop collections which cannot be converted to strings when
generating database queries.

* fixup! remove unused namespace

* fixup! use keep to retain false booleans
2025-07-30 18:42:56 +00:00
Phoomparin Mano
7eee4b5da1 docs(sdk): missing documentation for question components (#61616) 2025-07-30 18:27:12 +00:00
John Swanson
4bef26a524 Remove quotes around UUIDs in XLSX downloads (#61614)
I'm ignoring `styles` and `typed-styles` here just like the `Object`
implementation or the `String` implementation.
2025-07-30 12:31:31 -05:00
Phoomparin Mano
9edd0db967 Embed preview for simple embedding fails on production due to localhost checks (#61606) 2025-07-30 23:41:37 +07:00
Sébastien
f51780142f feat(sdk): download button is now in an always visible ... menu (#61556)
* Closes EMB-669: download button is now in an always visible ... menu

* renamed file and component

* Update Loki Snapshots

* fixed unit tests

* e2e

* e2e

* e2e

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-30 17:11:42 +02:00
Ryan Laurie
98ce261480 don't pass empty strings to question create API (#61467)
* don't pass empty strings to question create API

* add unit tests

* handle null

* even better
2025-07-30 15:10:21 +00:00
Phoomparin Mano
f7e1511dcd Update settings page and use Embedded Analytics JS as the public name (#61597) 2025-07-30 21:50:41 +07:00
Edward Paget
f1d46ecf36 feat: make jwt group attribute admin configurable (#61234)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* feat: make jwt group attribute admin configurable
2025-07-30 14:43:20 +00:00
Ngoc Khuat
f93123f2a2 Fix alert with goal archived even though goal is not met (#61586) 2025-07-30 13:37:53 +00:00
Oleksandr Yakushev
6a73a95940 [dev] Add devtools-to-flamegraph script (#61157) 2025-07-30 15:42:05 +03:00
Phoomparin Mano
40d897d7f1 Add the Beta badge to "New > Embed" menu (#61593) 2025-07-30 19:03:41 +07:00
Oleksandr Solovyov
89a7f3c1b6 update nimbus-jose-jwt (#61581) 2025-07-30 11:17:02 +00:00
Phoomparin Mano
eb671b92ab Check for simple embedding's enabled settings and token feature (#61590) 2025-07-30 17:51:01 +07:00
Rodrigo López Dato
aa0cdb546d Fix empty latest version (#61578) 2025-07-30 00:43:01 -04:00
Nathan Voxland
8132b400d2 /api/dashboard/save should use the submitter's id as creator_id (#61524) 2025-07-29 17:33:38 -05:00
Dennis Schridde
8c80f88e30 Fix race condition of ee-extra release trigger (#61559)
The workflow in the `metabase-ee-extra` repository could run before the
container image tags were created by the workflow in the `metabase`
repository, causing the former to fail.  Fix by making the image push
an explicit dependency of the ee-extra trigger.
2025-07-29 23:46:31 +02:00
Nathan Voxland
c004ea2d46 Created prototype API for dev work (#61473) 2025-07-29 16:36:13 -05:00
Luiz Arakaki
78adcf7380 Rename sandboxing row column security (#58369)
Rename sandboxing to row and column security
2025-07-29 17:15:37 -03:00
dk-gervais
7bc29f3f9a Update community-drivers.md (#61431)
Add the InterSystems IRIS Metabase driver to the list of Community Drivers
2025-07-29 15:59:32 -04:00
Edward Paget
d7cf38d3cf fix: simplify sandbox permissions management (#61542)
This works by just totally removing the permission grants created by
sandboxes. Instead we use the `gtapped-table` flag added by the
sandboxing middleware to add just the gtapped-table itself to set of
necessary table create-query permissions and exclude any joined tables
from being added to this set.

If those tables are included elsewhere in the query (not the part
created by the sandbox), they will be added to the set of tables to
check normally and the query will be blocked if the user doesn't have
query-builder perms.
2025-07-29 14:22:49 -05:00
Edward Paget
72bca32bcd fix: new child collections use parent's namespace (#60202)
Child collections are automatically created with the same namespace as
their parent collection. Since we enforce a validation that this must be
true it seems simpler for api clients to have this value set for them
rather than requiring them to supply the namespace attribute (though it
still remains optional to pass one.)
2025-07-29 14:02:29 -05:00
Edward Paget
14b2815113 feat: auto assign jwt users to groups by name (#61221)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* Update common.clj
2025-07-29 14:01:50 -05:00
Phoomparin Mano
9b0241aa11 Rename feature token name from embedding_iframe_sdk to embedding_simple (#61548) 2025-07-30 01:38:15 +07:00
Edward Paget
13a851f3c1 feat: add audit log events for groups (#60946)
As part of the tenanting project we want to emit audit events when users
join/leave tenant groups (or these groups are otherwise modified).
2025-07-29 13:01:45 -05:00
Jeff Bruemmer
9dcd19054e docs - custom smtp server (#61549)
* custom smtp server

* notes

* edits
2025-07-29 13:48:36 -04:00
Nicolò Pretto
0c64aaa4a7 custom elements api for new simple embedding (#60646)
* wip

* experiment of callback to see if it works on vue with .callback={}

* basic e2e test for dashboard

* more tests and cleanup

* remove my-app playground

* rm unused file

* use custom elements for the preview

* support for async and defer, defaulting to defer

* clean up custom elements code

* rename drills props

* Revert "experiment of callback to see if it works on vue with .callback={}"

This reverts commit 89a38dca47.

* fix theme not being restored from persisted settings

* fix: load script  for preview from instance url, make iframe loaded data
attribute work

* change the snippet to use new defer syntax

* support for exploration with question-id=new

* cleanup

* fix types

* Revert "fix types"

This reverts commit bbc8eb8b59.

* Revert "support for exploration with question-id=new"

This reverts commit 4c3f041629.

* reimplement support for exploration

* fix parameters conditional rendering

* fix linting issues

* fix embed code snippet

* fix(new-embed): allow multiple questions/dashboards on the same page

* test for multiple questions

* add note about theme

* feat(sdk): expose the title prop in StaticQuestion (#61001)

* attempot to make tests more stable

* fix types

* maybe fix tests?

* test for ci

* put back support for is-save-enabled

* H.getIframeBody -> H.getSimpleEmbedIframeContent as it should be less flaky

* restore logic

* fix exploration not working in test

* moved comment to the correct place

* potential fix for handleMessage, ignore messages from other iframes

* use question for exploration templates

* fix type errors

* skip flaky "persists default and hidden parameters"

* fix template: exploration in embed flow

* always enable embedding-simple on embed flow tests

* refactor the custom elements tests to use the generic helpers

* fix tests :fingercrossed:

* default title to true

* update helper to grab the first 37.65

* default drills to true

* we're now showing the title by default

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-29 18:57:04 +02:00
Nicola Mometto
ef8bc2ea06 reassign sem to querying (#61551) 2025-07-29 16:41:08 +00:00
Jacob Joseph
915a78f13a Update upgrading-metabase.md (#61552)
note about running on JAR with higher version.
2025-07-29 15:40:10 +00:00
Ryan Laurie
7427caa8d0 Remove release/update channel selection (#61369)
* remove release/update channel selection

* 😁

* white space is dark space in dark mode

* obey the linter

* update comment
2025-07-29 07:54:32 -06:00
Phoomparin Mano
35bc7c8b9a Fix flaky tests for simple embedding due to toasts blocking the next button (#61541) 2025-07-29 20:39:46 +07:00
Nick Fitzpatrick
ff36018fb9 Add includeDashboardQuestions to the useAvailableData check (#61507)
* Add includeDashboardQuestions to the useAvailableData check

* fix spelling
2025-07-29 09:04:10 -03:00
Nicola Mometto
b7d5408300 move me and libor to metabot (#61536) 2025-07-29 13:00:00 +01:00
Sébastien
7bc79ed0a5 Added 'hide' button to SDK problem banner (#61532) 2025-07-29 12:34:49 +02:00
Phoomparin Mano
4e87da201c Auto-enable simple embedding in embed flow instead of react sdk (#61463)
Co-authored-by: Roman Abdulmanov <roman@metabase.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-07-29 16:44:33 +07:00
github-automation-metabase
ea826ef62b Bump net.thisptr/jackson-jq from 1.3.0 to 1.4.0 (#61483)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-29 08:23:27 +00:00
Cam Saul
1270cf7271 [Lib] Remove idents part 6 (#61511) 2025-07-28 18:37:54 -07:00
Cam Saul
fc23270381 [Release blocker fix] Correctly handle remapping inside joins (#61442)
* Do not add new extra empty stages when converting a join from legacy

* Update gitignore

* Simplified fix for #60444

* Fix QUE-1607

* Test fix 🔧

* Fix QUE-1621

* Additional tests.

* Test fix 🔧

* Remove dead code -- schemas for idents in legacy MBQL schema

* Test fix 🔧

* Fix QUE-1623

* Test fix 🔧

* Fix failing tests

* Test fixes 🔧

* Make sure join metadata goes in the right place

* Additional tests

* Make sure join metadata goes in the right place

* Less verbose logging

* Test fixes 🔧

* Some extra tests 🔧

* Another test fix 🔧

* Remove unused export

* Cleanup

* Code cleanup

* Update tests 🔧

* test fixes

* Improve/fix metadata calculation

* Test fixes 🔧

* Update tests

* Test fix 🔧

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧

* PR feedback

* Test fix 🔧
2025-07-29 01:30:50 +00:00
Cam Saul
1d5a79395d Remove 'fix bad references' middleware (#61472) 2025-07-28 20:21:23 -04:00
Fraser
cc3ddf8359 Add content translation to multi-autocomplete (#61263) 2025-07-29 09:40:28 +12:00
Jeff Bruemmer
5b5c5e7298 docs - time grouping parameters for sql queries (#60951) 2025-07-28 17:20:42 -04:00
bryan
0b3df70817 force ref checkout for pull_request type trigger (#61514) 2025-07-28 12:27:36 -06:00
Jeff Bruemmer
5e7f3e9467 docs - metadata editing (#61501) 2025-07-28 14:04:32 -04:00
Edward Paget
ffb583c99e feat: separate jwt-set attributes from manual-set (#61458)
* allow tenant attributes CRUD (#60347)

wip merge user and tenant attributes

WIP use new api

Split Mapping Editor

types fixed

so much unit testing

handle null cases

update tests

update a couple more e2e tests

less silly test

make things nicer

invalidate user cache on tenant update

* feat: separate jwt-set attributes from manual-set

* fixup! typescript stuff

* feat: restore structrue-attributes merging

Co-Authored-by: Dan Sutton <dan@metabase.com>

* feat: use merged attributes in routing/sandbox/etc

Co-Authored-By: John Swanson <john.swanson@metabase.com>

* fixup! move group manager test to ee

* fixup! kondo

* fixup! modal spec

* fixup! cypress tests

* fixup! migration timestamp

* fixup! one more cherry pick oopsie

* fixup! sandboxing cypress helper fixes

* fixup! more cypress updates

* fixup! remove eslint directive

* fixup! remove 2-arity router-dbor-id->destination-db-id

All the places it was called with 2-arity were explicitly passing in
@api/current-user anyway

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Dan Sutton <dan@metabase.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-07-28 16:50:15 +00:00
Edward Paget
be8e6611c3 fix: handle headerless translations csv (#61025)
* fix: handle headerless translations csv

* fixup! PR feedback

Also fixes an issue with error line number reporting without headers

* feat: allow csv headers to be in any order

* fixup! error reporting test
2025-07-28 16:31:29 +00:00
Edward Paget
f182885389 fix: run each snyk project individually (#61430)
* fix: remove categories on push

* fix: run each project individually

* fix: run jobs in parallel with pom caching

* fixup! dry it up

* Update snyk.yml
2025-07-28 11:04:40 -05:00
Edward Paget
3bb4d5e74d chore: add more query permission test scenarios (#61095)
* chore: test deeply nested cards with mixed perms

* chore: test custom expressions and aggregations

* chore: add more tests for blocks and joins

* fixup! whitespace

* fixup! remove confusing comments
2025-07-28 15:17:23 +00:00
Ryan Laurie
17bea4176a Update diagnostic info instructions (#61504) 2025-07-28 08:59:24 -06:00
Aleksandr Lesnenko
e22ab60e01 allow hide if no results setting in visualizer (#61471) 2025-07-28 11:53:25 -03:00
Oleksandr Solovyov
04c1d21645 welcome everyone (#61316) 2025-07-28 17:07:40 +03:00
Chris Truter
e446ba2c3d Allow "blank" search for fieldvalues (#61497) 2025-07-28 14:07:13 +00:00
Oleksandr Solovyov
93390d9f57 upgrade liquibase and postgres (#59774)
---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-07-28 08:39:24 -05:00
Brad Anderson
29f56b541f UXW-35 Fixes #56249 in a way that still preserves the fix for #51611 (#61462) 2025-07-28 09:33:49 -04:00
Kamil Mielnik
d786ffbff8 SEM-527 Table picker item text overflows (#61444)
* Bring the effect back

* Add a comment
2025-07-28 16:25:08 +07:00
Roman Abdulmanov
58cfd55861 Updated team.json (#61488) 2025-07-28 09:58:19 +01:00
Phoomparin Mano
6625097d66 Update the embedding sdk admin settings to add simple embedding toggle (#61392)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-28 10:24:44 +02:00
Braden Shepherdson
ef21542b10 [MBQL Lib] Use stubs for cards and metrics in lib cache keys (#61386)
Fixes #61253.

Here's the breakdown of the issue, since it's subtle:
- These objects can contain some vanilla JS objects which in embedding
  contexts can be `Object.preventExtensions()`'d.
  - Eg. the `:visualization-settings` on a card or metric.
- `lib.metadata.cache` uses these objects as part of the cache key.
- Those become the keys of a CLJS map, which uses `cljs.core/hash`
- JS objects and arrays have pointer equality (`identical?` or `===`)
  semantics.
- The default `cljs.core.IHash/-hash` uses `goog.getUid(obj)`.
- That subtly mutates objects, adding a non-`enumerable`
  `closure_uid_123456789` property with an arbitrary sequence number.
- That's adding a property, which is a violation if
  `Object.preventExtensions()` (or `Object.freeze()`) has been used.
    - That silently does nothing by default, but throws in strict mode.

This PR modifies the cache key logic (which already has special handling
for `:lib/metadata`) to replace `:lib/type :metadata/card` and
`:metadata/metric` maps with a stub like `[:metric/card 123]`.
2025-07-28 07:43:18 +00:00
github-automation-metabase
645b55cfaf Bump commons-codec/commons-codec from 1.18.0 to 1.19.0 (#61482)
Inspect dependency changes here: https://github.com/apache/commons-codec/compare/commons-codec-1.18.0-RC1...commons-codec-1.19.0-RC1
2025-07-28 07:13:25 +00:00
Uladzimir Havenchyk
351fdc90cf chore: reduce usage of moment-timezone (#61388)
* drop unused redux functions

* drop time parsing in event cards

* replace moment types with dayjs

* use dayjs for tz guessing

* drop moment from a hook

* drop unused time functions
2025-07-28 06:02:59 +00:00
Fraser
05e78aae4a Use H helpers insteaed of commands cypress (#61403)
* Use H helpers insteaed of commands cypress
2025-07-28 09:11:50 +12:00
Fraser
b0b8348dad Remove flaky tag from content translation tests (#61439) 2025-07-28 09:11:36 +12:00
Cam Saul
831fb413cc [Lib] Misc metadata calculation and conversion bugfixes (#61437)
* Do not add new extra empty stages when converting a join from legacy

* Update gitignore

* Fix QUE-1607

* Test fix 🔧

* Fix QUE-1621

* Additional tests.

* Test fix 🔧

* Remove dead code -- schemas for idents in legacy MBQL schema

* Test fix 🔧

* Fix QUE-1623

* Test fix 🔧
2025-07-26 04:10:14 +00:00
bryan
aab42da74c remove unused dependency (#61374) 2025-07-25 21:38:12 +00:00
bryan
1dc85bcbae run known fixtures ahead of running tests (#61461) 2025-07-25 21:34:55 +00:00
Edward Paget
5e79cee71f fix: improve db drop down perf by prefiltering (#60652) 2025-07-25 15:48:09 -05:00
github-automation-metabase
23d194ca63 Bump io.github.camsaul/toucan2 from 1.0.565 to 1.0.566 (#59909)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-25 20:40:19 +00:00
Edward Paget
1cc4b87479 fix: mysql failure in saml setting test (#61460) 2025-07-25 18:40:18 +00:00
Phoomparin Mano
61d8979597 Update CORS and SSO handler to allow simple embedding client header (#61416) 2025-07-26 01:09:23 +07:00
Phoomparin Mano
206f7eaccb feat(sdk): expose the title prop in StaticQuestion (#61001) 2025-07-25 23:06:56 +07:00
Sébastien
832e2b7ac5 Viz 1323 visualizer cant combine single series chart and breakout (#61216)
* Closes VIZ-1322 VIZ-1323 looser compatibility

* fixup

* fixup

* fixed tests

* removed commented out blocks

* cleanup

* fixed unit test

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-07-25 17:33:09 +02:00
Chris Truter
dc973f0cb8 Add test coverage for search indexing during deserialization (#61047)
The test gives a bit of false confidence, as it passed before we added the forced re-indexing at the end of the import.

We probably want a way to keep the transaction open until after the ingestor has processed the messages from the toucan hooks... but that sounds quite invasive and brittle to pull off.
2025-07-25 15:14:40 +00:00
Edward Paget
08f7daa02a fix: reject dictionary locales not defined by mb (#60955)
If a locale is not defined for metabase we should not allow
content-translation dictionaries to uploaded with it. Since these
locales can't be used anyway it results in a confusing user experience.
2025-07-25 15:04:23 +00:00
Oisin Coveney
f2b8b44d48 Convert index.js/jsx to index.ts/tsx (#61373) 2025-07-25 14:30:19 +00:00
Phoomparin Mano
9d3ed0c9f2 Add defsetting and update embedding card in admin setting (#61292)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-25 21:01:05 +07:00
Oisin Coveney
0d14cb4aac Revert "Convert DashboardGrid to a functional component (#61364)" (#61449)
This reverts commit 647058ec89.
2025-07-25 13:56:19 +00:00
Oisin Coveney
647058ec89 Convert DashboardGrid to a functional component (#61364)
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-25 14:21:03 +03:00
Oisin Coveney
f58709dc20 Change InteractiveQuestion stories to SdkQuestion (#61445) 2025-07-25 13:52:36 +03:00
Phoomparin Mano
457cde39db Show simple embedding legal disclaimer and auto-enable embedding (#61375)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-07-25 17:51:45 +07:00
github-automation-metabase
3b028ee825 Bump net.snowflake/snowflake-jdbc-thin from 3.24.2 to 3.25.1 (#60910)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-25 09:14:46 +00:00
Fraser
c22ec1ebbd Remove waits from map e2e test (#61395) 2025-07-25 08:21:41 +12:00
Luis Paolini
d46d9d4dc9 Allow a width param for preview_png exporting (#61348)
* Allow a width param for exporting

* Fix linter
2025-07-24 17:20:25 -03:00
Jeff Bruemmer
08cd4c5d37 docs - user-generated content translation (#61102) 2025-07-24 18:48:15 +00:00
Tyler Plude
99a91de1b4 VIZ-1202 - Visualizer compatibility BE search filters (#60912)
* Populate search index col of non temporal dimension ids using clojure fn

* Add non_temporal_dim_ids filter param to search request

* fix kondo

* Add stub impl of new filter to in-place

* Add metadata provider cache

* Adding has-temporal-dim filter; fix tests

* fix lint

* Fix merge

* Hookup frontend to proper BE search filters; remove deprecated impl of has-temporal-dimensions

* Fix kondo

* Fix lingering refs to has-temporal-dimensions

* Fix lingering refs to has-temporal-dimensions

* fix test

* Fix test

* Remove FE compatibility code that was ported to BE; fix typing of partition helper

* Add helper for parsing non-temporal-dim-ids endpoint param; fix the conditional in FE

* remove debug let

* Add pr ref to comment

* Include dimension filter params in request only if cartesian

* remove specs that depended on checkDimensionCompatibilityForCartesianCharts

* PR feedback

* use existing dataset query transform

* Optimized 1 images, saved 76.0 KB (48.2% smaller)

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-24 11:38:54 -07:00
dpsutton
2fcd6ed374 handle strings rather than empty strings (#61426)
sqlserver returns columns with empty strings. not bad. just handle it
2025-07-24 13:38:35 -05:00
github-automation-metabase
680b24023c Bump com.taoensso/nippy from 3.5.0 to 3.6.0 (#59907)
Inspect dependency changes here: https://github.com/taoensso/nippy/blob/v3.6.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-24 18:10:22 +00:00
Jakub Chodorowicz
67aeb818ab Feature/smoother upgrade flow for customers (#61007)
* Prg-81-implement-logic-for-opening-store-and-receiving-messages (#60702)

* Add new self hosted upsell flow path

* Add upsell flow hook

* Add company name to params passed to store

* Update url parameters to snake case

* Remove redundant ampersand

* Clean up useEffect dependencies

* Add store origin to token activation message

* Improve put token mock

* Snake case return_url param

* Update messages' types

* Add source check on event

* Use dynamic store value (#60865)

* Create selector for store url

* Use dynamic store value in use upsell flow

* Improve store url selector

* Create useStoreUrl hook and deprecate getStoreUrl selector

* Increase the timeout of toast messages (#60966)

* increase the timeout of toast messages

* Send notification even if reference to store window was lost

* Add metabase window name (#60964)

* Prg-91-migrate-upsell-components-to-support-ee-upsell-flow (#60850)

* Enhance upsell functionality by adding onClick support to UpsellBanner and integrating useUpsellFlow in admin settings

Fix function name

* Use match pattern in UpsellBanner

* Add Upsell baner with click stories and tests

* Add upsell flow to dev instances banner

* Integrate upsell flow into UpsellBanner components

* Fix unrelated tests

* Improve the test assertion

* Prg-95-migrate-upsellcard-to-the-new-upsell-flow (#60989)

* Add onClock to UpsellCard component

* Migrate UpsellCard components to use self hosted upsell flow

* Disable new flow in dev instances upsell (#61048)

* Allow overriding store-url in dev env (#60967)

* Fix upsell flow with undefined store variable (#61056)

* Show failure toast even if connection with store was lost

* Add store-url to e2e default db setup

* Allow undefined store-url value in use upsell flow

* Fix failing unit tests

* Prg 96 migrate upsellbigcard to the new upsell flow (#61063)

* Migrace BigCard to use onClick

* Migrate BigCard upsells

* Add onClick to UpsellPill (#61076)

* Prg-104-run-the-new-upsell-flow-only-for-self-hosted-mb-instances (#61122)

* Disable new upsell flow on hosted instances

* Fix wrong match on UpsellBigCard

* Use getIsHosted selector

add test

* Fix e2e test - selecting upsell button

* Fix extra toast triggered with new upsells

* Add upsell flow to embedding ugprade link, remove binary notice from EE self serve (#61207)

* Fix typos

* Use existing link styles
2025-07-24 20:09:14 +02:00
Cam Saul
f197cbb591 lib/order-by should ignore duplicates (QUE-1604) (#61402) 2025-07-24 10:47:35 -07:00
bryan
85e8bcbc3d add CLA-passing email and name for bump commit (#61277) 2025-07-24 11:37:16 -06:00
bryan
50d9b94ccb run only when the Type:Documentation label set (#61427) 2025-07-24 17:25:20 +00:00
Phoomparin Mano
aa7ced174f feat(sdk): do not show "New Question" as fallback for new question (#61015) 2025-07-25 00:10:38 +07:00
bryan
7de1211bab mage -escherize-pr-summary (#61352) 2025-07-24 09:53:22 -07:00
Phoomparin Mano
fd5a433265 fix(sdk): hide the "back to previous results" button in questions (#61018) 2025-07-24 23:48:46 +07:00
Cam Saul
1bd2398307 Fix conversion of joins with :fields in last stage to legacy (QUE-1603) (#61401) 2025-07-24 09:08:59 -07:00
Nicolò Maria Mezzopera
2dc4715824 chore: Refactor sync wait times to use a constant for delay and adjus… (#61415)
* chore: Refactor sync wait times to use a constant for delay and adjust retry limits

* Update e2e/support/helpers/e2e-qa-databases-helpers.js
2025-07-24 14:38:32 +00:00
Edward Paget
e07751fe9e fix: flake dashboard card test (#60146) 2025-07-24 14:23:48 +00:00
Edward Paget
3cde309b3c fix: make test not parallel to avoid flake (#61327) 2025-07-24 09:05:00 -05:00
Kamil Mielnik
a1a437bd26 SEM-526 Filtering preview crashes when table is hidden (#61265)
* Fix crash

* Add test

* Update comment
2025-07-24 13:42:45 +00:00
Kamil Mielnik
59d8776683 SEM-362 Table picker should render anchor elements (#61272)
* Fix tags invalidation for bulk tables update

* Add MassTableVisibilityToggle

* Render mass toggle for schemas

* Add the button for dbs
- fix not-currently-selected branches in the tree not updating

* Fix types

* Align icon

* Align chevron icon

* Always show the toggle button for hidden tables

* Change color of hidden tables

* Only use ids of relevant tables

* Add tests

* Add test

* Take all visibility options into account

* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle

* Fix color

* Render table picker items as anchors

* Remove measuring elements as elements have constant size

* Fix types and tests

* Add test
2025-07-24 20:06:33 +07:00
github-automation-metabase
f5e92dbce9 Bump org.apache.commons/commons-lang3 from 3.17.0 to 3.18.0 (#60901)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-24 15:30:04 +03:00
Oisin Coveney
fea73a4f5c Rename InteractiveQuestion symbols to SdkQuestion (#61213) 2025-07-24 12:07:08 +00:00
Uladzimir Havenchyk
3a7474eadc Revert "drop typescript-plugin-css-modules with stylus dependency to unblock …" (#61391)
This reverts commit 8a4c87a136.
2025-07-24 10:56:11 +00:00
Timofey Kachalov
967745c312 Adjust API docs sort order respecting the kind (#61407) 2025-07-24 13:17:15 +04:00
Cam Saul
0cf80c77f2 [Lib] Finish removing idents (#61310)
* [Lib] Finish removing idents

* Fix Kondo warnings

* cljfmt

* Another pass at fixing Kondo warnings

* Test fix 🔧

* Test fix 🔧

* Test fixes 🔧

* A few more fixes 🔧

* Another pass

* Test fix 🔧

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧
2025-07-23 19:17:23 -07:00
Gustavo Saiani
09e2ee40e7 Update links (#61356) 2025-07-23 20:21:06 -03:00
Fraser
994e2ff647 Translate boolean content (#61366) 2025-07-24 10:32:21 +12:00
Fraser
afabd18f56 Add CLAUDE.md and copilot-instructions.md (#61313)
* Add CLAUDE.md and copilot-instructions.md
2025-07-24 10:32:08 +12:00
github-automation-metabase
a5e13bedd8 Bump org.postgresql/postgresql from 42.7.5 to 42.7.7 (#59518)
Inspect dependency changes here: https://github.com/pgjdbc/pgjdbc/blob/REL42.7.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-23 21:23:40 +00:00
bryan
5085f8ee19 rewrite clj-kondo/ignore for consistency (#61372) 2025-07-23 14:59:39 -06:00
Phoomparin Mano
341e81611e Migrate the new embed flow's snippets to use custom elements (#61330) 2025-07-23 20:38:46 +00:00
github-automation-metabase
22ddd2cba8 Bump djblue/portal from 0.59.1 to 0.59.2 (#61246)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.59.2/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 14:27:31 -06:00
bryan
3df17fd3a8 Add custom and default responses to openapi docs (#61339) 2025-07-23 13:39:29 -06:00
bryan
c3dbced191 [github actions] skip pngs optimize for merges (#61378) 2025-07-23 13:26:35 -06:00
dpsutton
8e836010fb Extra logging for temp storage (#61342)
Suspecting that instances OOM due to loading these into
memory. Increasing context and logging to help diagnose this:

When running tests:

```
clj -X:dev:test :only '["test/metabase/notification" "test/metabase/pulse"]'
...
DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 57167}
[main] DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 718167}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
```

Adding an optional preamble that is just `pr-str`'d and logging a human
readable size of the file that is saved
2025-07-23 14:26:17 -05:00
Jeff Bruemmer
634c7942cd docs - join expressions (#61376) 2025-07-23 19:20:46 +00:00
Alex Yarosh
5cdf070465 Update impersonation.md (#61380) 2025-07-23 15:15:46 -04:00
Cam Saul
f1c7740a45 add-dimension-projections middleware => Lib (#61349)
* add-dimension-projections middleware => Lib (#39877)

* Ban mt/with-column-remappings inside QP tests

* Update pivot QP code to not convert to legacy

* Rename middleware

* Use the remap metadata provider in sandboxing tests
2025-07-23 09:59:33 -07:00
github-automation-metabase
df80eb95b6 Bump commons-validator/commons-validator from 1.9.0 to 1.10.0 (#60899)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 16:40:36 +00:00
github-automation-metabase
a525192b0b Bump org.apache.logging.log4j/log4j-jcl from 2.24.3 to 2.25.1 (#60905)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 10:30:34 -06:00
Ryan Laurie
07f1e62fae correct ci skip label check (#61370) 2025-07-23 16:13:48 +00:00
Anton Kulyk
b614b303ea Fix sorting dashboard header filters (#61220) 2025-07-23 15:56:14 +01:00
Nicolò Pretto
739e461866 skip assigning milestones to embed sdk PRs, closes EMB-658 (#61361) 2025-07-23 15:43:53 +02:00
Nicolò Maria Mezzopera
cd987d88a7 feat: await for async setup function (#61365) 2025-07-23 14:11:05 +02:00
Uladzimir Havenchyk
8a4c87a136 drop typescript-plugin-css-modules with stylus dependency to unblock builds (#61362) 2025-07-23 10:36:38 +01:00
Nicolò Pretto
f3953111ce fix unknown prop handleAxis on SdkIframeEmbedSetup (#61335) 2025-07-23 07:55:13 +00:00
Kamil Mielnik
d1345439f9 Remove unused functions (#61320)
* Remove fetchRealDatabasesWithMetadata

* Remove fetchTables

* Remove useActionListQuery
2025-07-23 14:00:08 +07:00
Sébastien
73b8863eb6 Closes VIZ-703 formatting of time values is incorrect (#61195) 2025-07-23 05:28:07 +02:00
Aleksandr Lesnenko
783d3ceca4 update parameters UI (#60746)
* update parameter styles, keep only one variant

* review

* specs

* Update Loki Snapshots

* lint

* tweak ui

* Update Loki Snapshots

* review

* fix spec

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-23 00:58:37 +00:00
bryan
6d31996556 add CLA-signed metabase automation user git config (#61350) 2025-07-22 22:54:46 +00:00
github-automation-metabase
f3f462d9cc Bump org.jsoup/jsoup from 1.20.1 to 1.21.1 (#60249)
Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.21.1/CHANGES.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-22 16:47:10 -06:00
Jeff Bruemmer
1f0b41a30b add upgrade guide for SDK (#61031) 2025-07-22 20:18:57 +00:00
github-automation-metabase
1880b20c34 Bump com.amazonaws/aws-java-sdk-core from 1.12.785 to 1.12.788 (#61252)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-22 13:41:26 -05:00
Jeff Bruemmer
37cfdcfd3e docs - script to generate country codes table. (#61329)
* script to generate country codes

* link
2025-07-22 16:03:56 +00:00
Brad Anderson
a7ecc9e669 Closes VIZ-1311 - Slow loading dashcards with no average query duration shows 0 (#61035)
Tweaks slow-loading hover cards
2025-07-22 12:03:44 -04:00
Ryan Laurie
fda455fabc Enable CI skipping on PRs (#61307)
* dont run tests on pr with ci skip

* static viz too

* label instead of title
2025-07-22 09:47:26 -06:00
Sébastien
5d5f73f403 Closes VIZ-46 number formatting for remapped columns (#61201) 2025-07-22 17:35:54 +02:00
Sloan Sparger
7304c050ab [Metabot] Ensure state is saved on streamed responses (#61282) 2025-07-22 09:58:20 -05:00
github-actions[bot]
e8dee796db Update translations 2025-07-22 (#61314)
* Update translation sources 2025-07-22

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-07-22 14:55:23 +00:00
eliotmetabase
3e605c6d87 Update uberjar.yml to remove unused branches (#61306)
Remove branches that no longer exist from uberjar workflow to clean it up a bit
2025-07-22 09:00:23 -05:00
Brad Anderson
1fc73ccc47 Closes VIZ-1318 - Visualize in another way uses the Card Definition rather than the Dashboard Card (#61230)
Changes how the bug is fixed from trying to send parameters to using dataset fallbacks if a query fails
2025-07-22 09:29:14 -04:00
Ngoc Khuat
3441035d2d port the condition expression to master (#61045) 2025-07-22 09:57:12 +00:00
Oleksandr Solovyov
d530b9a45c hashp without stdout redirect (#61315) 2025-07-22 09:30:50 +00:00
github-automation-metabase
5be18b9afd Bump hiccup/hiccup from 1.0.5 to 2.0.0 (#59908)
Inspect dependency changes here: https://github.com/weavejester/hiccup/blob/2.0.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-22 07:45:53 +00:00
Fraser
0a61f6688f Move Content Translation settings and tweak copy (#61039) 2025-07-22 14:27:21 +12:00
Tyler Plude
6421b4187e Add tsplude to metabot team (#61286) 2025-07-21 17:45:15 -07:00
Cam Saul
40ce015882 Overhaul add-implicit-joins, fix/consolidate metadata normalization and other issues (#61168)
* Overhaul add-implicit-joins middleware

* Restore the wacko metadata updating code

* Ok, joins ARE allowed to have :fields.

* Fix JS tests 🔧

* Fix QUE-1563

* Test fixes 🔧

* Fix 100 more broken things

* Test fixes

* Use same distinct-ref logic as lib

* More test fixes 🔧

* Make add-alias-info better at matching things

* Consolidate the legacy result metadata schemas

* cljfmt

* Use `:decode/normalize` in the REST API for boring things like metadata

* Another round of test fixes 🔧

* Restore kondo ignore

* Another round of test fixes 🔧

* cljfmt

* PR feedback 🔧
2025-07-21 13:54:28 -07:00
github-automation-metabase
b7d02f7d6c Bump commons-io/commons-io from 2.19.0 to 2.20.0 (#61245)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-21 19:30:06 +00:00
Chris Truter
bf0624f700 Lint against incorrect time elapsed measurements (#61169) 2025-07-21 17:36:46 +00:00
Nicolò Maria Mezzopera
9f823bd747 chore: remove cy.wait in favour of waiting for element presence (#61226)
* chore: remove wait in favour of waiting for modal to disappear

* feat: wait for query to be completed to possibly avoid DB race condition

* feat: wait for the table name to be shown in the ui before clicking it

* chore: removed un-needed waits

* Update e2e/test/scenarios/admin/admin-reproductions.cy.spec.js

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-07-21 17:26:39 +00:00
Aleksandr Lesnenko
f881594d61 fix timeline events merging logic (#61239) 2025-07-21 13:02:29 -04:00
Romeo Van Snick
8401e8715d Disable :case and :coalesce type-compatibility checks (#61279)
* Disable :case and :coalesce type-compatibility checks

* Skip test
2025-07-21 16:56:26 +00:00
Jakub Chodorowicz
1cd2a7dafe Fix flaky SettingsPage test (#61009)
* Fix flaky SettingsPage test

* Use role selector
2025-07-21 17:44:14 +02:00
Romeo Van Snick
cd77efaf80 Relocate expressions code (#61120)
* Move expression widget into subfolder

* Import expression components from top-level

* Move expression helpers to metabase/querying/expressions

* Fix fuzzing paths

* Fix comment

* Add missing exports from expressions

* Remove unused exports

* Sort exports

* Add helper to get supported clauses

* Rename complete to suggestions for consistency

* Move tokenAtPos to position module

* Move assertion helpers to utils

* Split up pratt/types

* Use token text instead of slicing source

* Remove superflouous from and to on token

* Remove superflouous from, to and len on token

* Remove content helper

* Remove superflous fields on Token

* Rename compiler to compile-expression

* Fix imports

* Fix exports

* Remove eslint directives

* Move FK_SYMBOL to formatting/constants

* Use () => undefined instead of jest.fn
2025-07-21 17:35:57 +02:00
Brad Anderson
e50e3ddad8 VIZ-1287 Adds pressed state for visualizer Settings button (#61101) 2025-07-21 11:25:40 -04:00
Alexander Polyankin
b6174a8a0c Make Booleans work without Category (#61202) 2025-07-21 15:10:24 +00:00
github-actions[bot]
4956974743 Update translations 2025-07-17 (#61144)
* Update translation sources 2025-07-17

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jacob Joseph <likeshumidity@users.noreply.github.com>
2025-07-21 14:49:44 +00:00
Sébastien
2c2863cb9d Update team.json (#61254) 2025-07-21 16:32:54 +02:00
Kamil Mielnik
1e22b1971c SEM-505 The Preview button should be more noticeable and accessible (#61260)
* Move buttons into the sticky container, make preview button always present

* Update tests

* Make the preview button toggle the state
2025-07-21 21:19:45 +07:00
Rodrigo López Dato
0ff7a8887c Fix "Docker Hub" capitalization (#61268) 2025-07-21 11:03:48 -03:00
Kamil Mielnik
4e04711a2d Mass hide/unhide tables (#61206)
* Fix tags invalidation for bulk tables update

* Add MassTableVisibilityToggle

* Render mass toggle for schemas

* Add the button for dbs
- fix not-currently-selected branches in the tree not updating

* Fix types

* Align icon

* Align chevron icon

* Always show the toggle button for hidden tables

* Change color of hidden tables

* Only use ids of relevant tables

* Add tests

* Add test

* Take all visibility options into account

* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle
2025-07-21 13:56:15 +00:00
Romeo Van Snick
f38a0f6769 Allow supression of case and coalesce arg typechecks (#61264)
* Allow supression of case and coalesce arg typechecks

* Add test for ignored type-check

* Configure *suppress-expression-type-check?* in tests

* Fix formatting
2025-07-21 15:44:39 +02:00
Oisin Coveney
7e1ab4e2c7 Make sure that user plugin dashcard menu has priority over default menu (#61262) 2025-07-21 15:56:02 +03:00
Oisin Coveney
13d4abff0b Fix dashboard loading state for empty dashboards (#61052) 2025-07-21 14:46:30 +03:00
Ngoc Khuat
f1f175e4e5 Reversion the migration to fix v_alerts from 56 to 55 (#61161) 2025-07-21 12:42:36 +02:00
Nicolò Pretto
f4ac64fd80 Hide sample database mentions in <DatabaseForm> in the embedding setup (#61067)
* refactor DatabaseForm to fix unwanted changes to the embedding setup

* text-secondary

* clean up types
2025-07-21 11:00:05 +02:00
Kamil Mielnik
ff7eb5f1f5 SEM-497 Filtering preview inputs get auto-focused (#61190)
* Add autoFocus prop to filter components

* Disable autoFocus in preview

* Update unit tests

* Add test
2025-07-21 14:23:18 +07:00
Fraser
b241401b2d Fix Cloud SMTP Connection Card styling (#61115) 2025-07-21 09:41:31 +12:00
William
fea9b59511 Allow field filters and time groupings to specify an alias (#61118)
As is, field filters and time groupings assume that they can just refer to the field normally.  In queries where aliases are
used/required, this doesn't work so well.  Letting users specify the alias to use in place of the normal field
reference handles this case.

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-07-18 14:34:41 -05:00
Sloan Sparger
0374a8ac42 [Metabot] Improve loading experience logic (#61173)
* improve loading experience logic and fix bug where there are tool calls without messages causing messages to get cramed together with no space

* add a unit test
2025-07-18 14:03:46 -05:00
Aleksandr Lesnenko
d43c0a418b Fix visualizer cards crash due to inability to find the x-axis dimension column (#61180)
* fix visualizer cards crash

* reapply metabase#60892

* spec
2025-07-18 14:37:43 -04:00
Nick Fitzpatrick
d3435af399 Change styling for Home Help Component (#60180)
* Updating HomeHelpCard

* remove duplicated style
2025-07-18 15:02:22 -03:00
Alexander Polyankin
43ff1d6a13 Multiple values for native query parameters (#60984) 2025-07-18 17:45:33 +00:00
Nicolò Pretto
c4aca6545e fix(sdk): when starting from an entity id dashboard, use the numeric id (#61188)
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-18 22:18:52 +07:00
Uladzimir Havenchyk
f7288acbfe test: ensure popover contains delete permanently in trash (#61199) 2025-07-18 17:46:45 +03:00
Nicola Mometto
c57656fbfa Bigquery nested fields fix (#61193)
* scope by table-name

* add test
2025-07-18 15:09:44 +01:00
bryan
f24a7fdc18 crush every docs png in the repo (#61172) 2025-07-18 13:51:57 +00:00
Alberto Perdomo
22e6fd8d57 Update SDK NPM link in docs (#61192) 2025-07-18 15:17:13 +02:00
Nick Fitzpatrick
52d9ba6670 adjusting layout for <Tab.Tab> and <Button> components (#60992)
* adjusting layout for <Tab.Tab> and <Button> components

* update UserListElement
2025-07-18 09:55:36 -03:00
Uladzimir Havenchyk
0c2dddf2bc test: fix another flakiness in model re-mapping test (#61186) 2025-07-18 15:37:00 +03:00
Kamil Mielnik
aa691b0888 SEM-501 Add warning when multiple Entity Name field semantic types exist on the same table (#61148)
* Add warning

* Show prefixes

* Add test
2025-07-18 12:07:58 +02:00
Anton Kulyk
037cd61c9e Allow "focusing" a recently moved dashboard filter (#61085)
* Add `extraAction` prop to `undo` object

* Make `setEditingParameter` switch tab if needed

* Put a dashboard filter in the viewport

* Fix toast text appearance

* Hide "Show filter" button when moving to top nav

* Add e2e test

* Fix tests
2025-07-18 10:57:48 +01:00
Kamil Mielnik
5e08c9e9e1 SEM-390 Change copy of "Duration" to "Reset to defaults after" for log level customization (#61183)
* Update copy

* Update copy

* Bring back non-numeric prefix

* Reduce flickering (thanks @romeovs)

* Fix test
2025-07-18 16:42:34 +07:00
Oisin Coveney
2568336e90 Make ArchivedEntityBanner a context component (#60939) 2025-07-18 10:40:10 +03:00
Uladzimir Havenchyk
0ba623e4ba test: fix flakiness in model mapping test (#61146) 2025-07-18 10:39:14 +03:00
Vamsi Peri
4ff56367f9 Fix transparent background for SQL editor autocomplete suggestions (#61178)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-17 21:43:47 -04:00
Tyler Plude
c1484f5f57 Sort currency options by name not code (#60794)
* fix currency sort order in settings dropdown

* Preserve priority currency order; apply sort helper to other currency select inputs

* currency.js -> currency.ts

* move sort to cljc; revert FE changes

* rm unnecessary comment
2025-07-17 18:15:46 -07:00
Aleksandr Lesnenko
59193a2267 sort parameters in subscription sidebar (#61119) 2025-07-17 20:28:23 -04:00
Sloan Sparger
fb99cfcdc6 [Metabot] Fix horizontal scrollbar when response contains code (#61174) 2025-07-17 18:57:26 -05:00
Aleksandr Lesnenko
cfb3d5ad2e improve getParameterMappingOptions (#61113) 2025-07-17 19:43:49 -04:00
Tyler Plude
9eb27dc5c9 VIZ-1281 - Fix include-current for dashboard parameters (#60890)
* Pass parameter format options to lib

* pr feedback
2025-07-17 15:51:13 -07:00
dpsutton
9753a8a64d Ensure postgres downloads don't OOM (#60807)
* Ensure postgres downloads don't OOM

Fixes https://github.com/metabase/metabase/issues/60733

For performance reasons we set autocommit to true. this has an
unfortunate consequence that the postgres driver does not honor batch
sizes. We go through a lot of trouble to hook the streaming results of a
query to the output stream of the download, but the postgres jdbc driver
will realize all rows in memory.

A fast way forward is to set autocommit to false only when
`write?` (previous condition) or when executing a postgres download, as
reported in https://github.com/metabase/metabase/issues/60733.

How to test:
this is difficult. In CI we use

```clojure
  :ci
  {:jvm-opts ["-Xmx12g"
              "-Xms12g"
```

So hitting a query that would deterministically OOM the instance
requires a lot more muscle than we realistically want to use.

I'm running the following tests locally:

```
  :small-ram
  {:jvm-opts ["-Xmx400m"
              "-Xms400m"
              "-Dci=TRUE"]}
```

```clojure
(defn- readable [bytes]
  (cond (nil? bytes)  "0 bytes"
        (zero? bytes) "0 bytes"
        :else
        (let [units ["b" "kb" "mb" "gb" "tb"]
              magnitude   1024.0]
          (loop [[unit & remaining] units
                current (double bytes)]
            (if (and (seq remaining) (> current magnitude))
              (recur remaining (/ current magnitude))
              (format "%.1f %s" current unit))))))

(defn- consume
  [^java.io.InputStream is]
  (let [arr (byte-array 8024)]
    (loop [c 0, gas 5000000]
      (let [r (java.io.InputStream/.read is arr 0 (alength arr))]
        (cond (zero? gas)
              (throw (ex-info "Ran out of gas" {}))
              (neg? r) c
              :else (recur (+ c r) (dec gas)))))))

(deftest large-csv-test
  (mt/test-driver :postgres
    (testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
      (let [large-query "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
            result (mt/user-real-request :crowberto :post 200 "dataset/csv"
                                         {:request-options {:as :stream}}
                                         {:query       (mt/native-query
                                                        {:query large-query})
                                          :format_rows true})
            size (consume result)]
        (is (> size 2000000000)
            (format "Only consumed %s but expected ~2gb" (readable size)))))))
```

and then

```
❯ time source pg.env && DRIVERS=postgres clojure -X:dev:test:small-ram :only metabase.driver.postgres-test/large-csv-test

Running QP tests against these drivers: #{:postgres}

LONG TEST in metabase.driver.postgres-test/large-csv-test
Test took 23.358 seconds seconds to run

Ran 1 tests in 32.825 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 32825.099875, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 40.7 s.
All tests passed.
Running after-run hooks...
```

Why not add these tests now?
We probably should write a full memory regression suite. This is a great
candidate for a first one. But it seems silly to run a new CI job with
just this one job. Push back if you think i'm wrong.

Another area of pushback:
I took the lazy way when determining if a driver should have autocommit
set to false or not: i hardcoded it.

```clojure
(and (-> options :download?) (= driver :postgres))
```

The alternative is some method of a new driver multimethod or
driver-supports?. The former feels a bit heavy-weight, the latter feels
not quite right since this is almost a non-support and all other jdbc
drivers do support it, presumably?

I'm quite open to pushback here and invite comments if you see a better way.

* Can't use an if for write?

You'd think you can use an if here but the previous code used a when and
is silent on write?. Lots of tests fail relating to datasets in test
setup and uploads. Don't want to debug that in this bug fix context so
leaving a todo

* remove old arity metadata. thanks eastwood!

* Don't set autoCommit for all postgres and descendant drivers

```clojure
(ns ^:mb/memory metabase.memory.csv-test
  (:require
   [clojure.test :refer :all]
   [metabase.test :as mt]
   [metabase.driver :as driver]))

(set! *warn-on-reflection* true)

(defn- readable [bytes]
  (cond (nil? bytes)  "0 bytes"
        (zero? bytes) "0 bytes"
        :else
        (let [units ["b" "kb" "mb" "gb" "tb"]
              magnitude   1024.0]
          (loop [[unit & remaining] units
                 current (double bytes)]
            (if (and (seq remaining) (> current magnitude))
              (recur remaining (/ current magnitude))
              (format "%.1f %s" current unit))))))

(defn- consume
  [^java.io.InputStream is]
  (let [arr (byte-array 8024)]
    (loop [c 0, gas 5000000]
      (let [r (java.io.InputStream/.read is arr 0 (alength arr))]
        (cond (zero? gas)
              (throw (ex-info "Ran out of gas" {}))
              (neg? r) c
              :else (recur (+ c r) (dec gas)))))))

(def driver->query
  {:sqlite "WITH RECURSIVE generate_series(value) AS (
  SELECT 1
  UNION ALL
  SELECT value + 1 FROM generate_series WHERE value + 1 <= 1000000
)
SELECT replace(hex(zeroblob(1024)), '00', 'xx') FROM generate_series;"
   :postgres "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
   :clickhouse "SELECT repeat('x', 2048)
FROM system.numbers
LIMIT 1000000;"
   :redshift "WITH series AS (
  SELECT ROW_NUMBER() OVER () as i
  FROM stl_scan s1, stl_scan s2
  LIMIT 1000000
)
SELECT REPEAT('x', 2048) FROM series;"})

(deftest large-csv-test
  (mt/test-drivers #{:postgres :sqlite :clickhouse :redshift}
    (testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
      (let [large-query (or (driver->query driver/*driver*)
                            (throw (ex-info "Driver doesn't implement big query"
                                            {:driver driver/*driver*
                                             :available (keys driver->query)})))
            result (mt/user-real-request :crowberto :post 200 "dataset/csv"
                                         {:request-options {:as :stream}}
                                         {:query       (mt/native-query
                                                        {:query large-query})
                                          :format_rows true})
            size (consume result)]
        (is (> size 2000000000)
            (format "Only consumed %s but expected ~2gb" (readable size)))))))

(comment
  (mt/set-test-drivers! #{:postgres})
  (mt/set-test-drivers! #{:sqlite})
  (mt/set-test-drivers! #{:clickhouse})
  (mt/set-test-drivers! #{:redshift})
  (mt/test-drivers #{:redshift}
    (mt/db))

  )

```

Verify this with

```
  :small-ram
  {:jvm-opts ["-Xmx400m"
              "-Xms400m"
              "-Dci=TRUE"]}
```

and then

```
;; driver.env:
;; local clickhouse
export MB_CLICKHOUSE_TEST_password="password"
export MB_CLICKHOUSE_TEST_username="default"

;; local postgres
export MB_POSTGRESQL_TEST_USER=dan

export MB_REDSHIFT_TEST_PASSWORD=<value>
export MB_REDSHIFT_TEST_USER=<value>
export MB_REDSHIFT_TEST_DB=<value>
export MB_REDSHIFT_TEST_HOST=<value>
```

and then running:

```
❯ source driver.env && DRIVERS=redshift clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running tests in metabase.memory.csv-test/large-csv-test
Finding tests took 8.3 s.
Running 1 tests
Running before-run hooks...
Running QP tests against these drivers: #{:redshift}
..
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 188.320 seconds seconds to run

Ran 1 tests in 188.338 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 188337.678584, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 3.3 mins.
All tests passed.
Running after-run hooks...
```

redshift takes a while.

contrast with

```
❯ source driver.env && DRIVERS=clickhouse,postgres clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running QP tests against these drivers: #{:postgres :clickhouse}
...
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 46.638 seconds seconds to run

Ran 1 tests in 46.655 seconds
4 assertions, 0 failures, 0 errors.
{:test 1, :pass 4, :fail 0, :error 0, :type :summary, :duration 46655.436333, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 56.5 s.
All tests passed.
Running after-run hooks...
```

both running locally happen in ~1 minute compared to 3 minutes for redshift

* Remove commented out old arity

this funciton used to have two arities for clarity. But it wasn't
another entrypoint, it was just trying to keep things a bit cleaner. But
the result is that at the point where we used the string sql query we
didn't have the `info` map in lexical scope. Fixing this across arities
would have pushed us into 7 positional args, so you might want to switch
to a map, but honestly, it's just the same function.
2025-07-17 17:06:12 -05:00
Cam Saul
ea6a639b63 [Lib] Remove idents part 4 (#61149)
* [Lib] Remove idents part 4

* Kondo
2025-07-17 14:38:30 -07:00
bryan
2454ab7188 Mage Token Git Precommit Scanner (#60729)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-17 12:41:22 -06:00
Uladzimir Havenchyk
517f98bf5c test: fix flakiness in visualizer test (#61104) 2025-07-17 20:19:24 +03:00
Kamil Mielnik
0e75b6bbac SEM-463 Responsive buttons (#60928)
* Add ResponsiveButton component

* Prevent focus state being cut off

* Make the buttons responsive in the table section

* Make the buttons responsive in field section

* Extract useResponsiveButtons

* Add comments

* Extract useResponsiveButtons in FieldSection

* Add aria-label to the button

* Add tests

* Test tooltips

* Fix indent
2025-07-17 17:17:44 +00:00
Timofey Kachalov
82bad2ee19 Fix positioning of the Mantine Modal in SDK (#60917) 2025-07-17 20:54:03 +04:00
Phoomparin Mano
87afb2783f Reduce flakiness in new iframe embed locale test (#60973) 2025-07-17 23:33:03 +07:00
Anton Kulyk
ca73c4406e Add dashboard_filter_moved analytics event (#61084)
* Add `dashboard_filter_moved` analytics event

* Update event
2025-07-17 17:17:49 +01:00
Kamil Mielnik
e0e25ed230 Fix SEM-499 (#61131) 2025-07-17 23:11:57 +07:00
Cam Saul
2505c039bf [Lib] remove 'idents' part 3 (#60875)
* [Lib] remove 'idents' part 1

* [Lib] remove idents part 2

* [Lib] remove idents part 3

* Update tests

* Remove ident-related tests for Cards

* Remove more ident tests

* Remove more ident-related tests

* Fix Kondo warnings
2025-07-17 08:10:14 -07:00
Jeff Bruemmer
f2ce68cd98 Update saml-google.md (#61137) 2025-07-17 10:58:59 -04:00
Sloan Sparger
dc5ed72564 [Metabot] Add new teammates to Team Metabot (#61143) 2025-07-17 09:53:08 -05:00
Anton Kulyk
58717801ec Add "Move filter" menu (#60784)
* Add "move filter" menu

* Add undo

* Handle single tab dashboards

* Update text color for checked items

* Fix collapsed menu appearance

* Add tests

* Fix error when a tab doesn't have any dashcards

* Fix "Top of page" option selected color

* Use "card.title" viz setting

* Truncate long card titles

* Update "Disconnect from cards" button appearance

* Fix type error

* Make the select searchable, touch up on appearance

* Fix e2e test

* Add `moveDashboardFilter` helper

* Fix e2e test name

* Remove subtitles

* Update icon color

* Update icon color
2025-07-17 15:49:22 +01:00
bryan
92d757b132 Mage jar-download custom dir fix (#61138) 2025-07-17 14:48:37 +00:00
Nicolò Pretto
ff702a180c skip sdk compat tests as they're failing (#61136)
* skip sdk compat tests as they're failing

* make the yml pass validation
2025-07-17 14:35:22 +00:00
Phoomparin Mano
878fc256b6 Do not update new iframe embed flow preview if the same resource is chosen (#61014) 2025-07-17 20:41:16 +07:00
Alexander Polyankin
edfb5fe39c Make temporal unit variables work like regular variables (#60995) 2025-07-17 09:32:36 -04:00
Kamil Mielnik
d626289c81 SEM-512 It would be great if all toasts in Table Metadata had an Undo (#60974)
* Add undos in FieldSection

* Add undos in FormattingSection

* Add undos in MetadataSection

* Add undos in FieldItem

* Organize TableVisibilityToggle

* Add undos in BehaviorSection

* Add undos in TableSection

* Add trim()

* Never pass 2nd argument in onChange callbacks from Select

* Add undos in DataSection

* Fix SEM-499

* Add undos in RemappingPicker

* Reduce duplication

* Simplify code

* Rename

* Prevent undo loops in FieldSection

* Remove redundant param

* Refactor toasts in FieldSection

* Prevent undo loops in FormattingSection

* Prevent undo loops in MetadataSection

* Prevent undo loops in BehaviorSection

* Prevent undo loops in DataSection

* Prevent undo loops in TableSection

* Prevent undo loops in FieldItem

* Prevent undo loops in TableVisibilityToggle

* Prevent undo loops in RemappingPicker

* Reuse useMetadataToasts

* Fix types

* Fix undoing semantic type

* Update unit tests

* Update NameDescriptionInput unit tests

* Simplify argument

* Update tests, fix viz formatting inputs not respecting prop updates

* Revert "Fix SEM-499"

This reverts commit bb9f098433.

* Add more tests

* Avoid casting

* Remove redundant cast
2025-07-17 12:30:33 +00:00
Chris Truter
0adf8b5d5b Refresh Search index after loading serialized entities (#61053) 2025-07-17 12:12:33 +00:00
Oisin Coveney
9a6113cff5 Rename files, components, and types to SdkQuestion (#60996) 2025-07-17 15:12:06 +03:00
Oisin Coveney
59c1d93c76 Convert dashboard sidebar components to use dashboard context (#60715) 2025-07-17 14:56:45 +03:00
Kamil Mielnik
ff989915fb Fix flaky test (#61126) 2025-07-17 18:50:07 +07:00
Kamil Mielnik
19e9ec0cd3 SEM-503 + SEM-504 + SEM-509 + SEM-510 Micro UI/UX improvements (#60970)
* SEM-503 Add blue border to selected field

* SEM-504 Border radius of table/field name and description boxes should match that of setting cards

* SEM-509 Improve microcopy for table and field editing instructions

* SEM-510 Field descriptions could use "paragraph" text style with greater line height
2025-07-17 14:12:36 +07:00
Cam Saul
f67919695d MBQL 5 normalization should automatically add options maps (#61081) 2025-07-16 17:56:11 -07:00
Cam Saul
466f7879da [Lib] remove 'idents' part 2 (#60874)
* [Lib] remove 'idents' part 1

* [Lib] remove idents part 2

* Remove ident-related tests for Cards

* Remove more ident-related tests

* Fix Kondo warnings
2025-07-16 17:55:35 -07:00
Alexander Polyankin
bdfae3d613 Boolean variables in native queries (#60991) 2025-07-16 19:41:56 -04:00
Sloan Sparger
424bb4d19e [Metabot] Add text for search tool when being called (#61099) 2025-07-16 16:54:21 -05:00
Riley Thompson
b75ef21b91 Enable DB routing for BigQuery (#60516)
* save

* revert redshift changes

* kondo

* add ci routing var

* redshift rough work

* cleanup bigquery changes

* remove bigquery specific redefs and bindings

* add separate var for dataset

* custom routing info per driver

* update changelog

* cljfmt

* fix fe lint

* use deferred-tru

* dissoc db_routing_info for tests

* fix other tests

* fix kondo and lint

* use yaml

* fix whitespace

* change log

* kondo and eastwood

* use markdown for routing info

* remove unneeded driver method

* cleanup

* fix tests

* fix remaining test

* add fe test

* add extra info in register-lazy-loaded-driver

* address pr comment

* improve doc string

* add text-secondary color to database info markdown

* update markdown

* alphabetical order

* move db routing info from db to session properties

* FE adjustments

* dont parse extra info

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-07-16 17:20:26 -04:00
Tyler Plude
3f01f61624 VIZ-1048 - Visualizer Data Importer Improvements (#59139)
* poc

* timing logs

* Only render compatible datasets

* Build uberjar to be able to test in cloud with more data

* search index support for display

* search index support for exclude-display and has-temporal-dimensions

* fix weird filter vs index column bug

* fix temporal filter

* required ids search index filter

* fix build by removing :display from search render-terms

* adding h2 compatibility

* fixing alignment

* whitespace

* all clicks are add clicks now

* reverted labels change

* whitespace

* whitespace

* mutation -> query, load compatibles at startup

* using viz icons in dataset list

* remove exclude_display

* consolidate search endpoint

* rename display param to display_type

* allignment

* fix filter tests

* test fixes

* Closes VIZ-1185: revert "using viz icons in dataset list"

This reverts commit 7f4d177e977643f90250a5add2f946d6f35ad2a0.

* closes VIZ-1184 copy for "no results"

* closes VIZ-1183 spacing between input and results

* removed log statement

* fixed type

* fixed basics.cy.spec.ts

* fixed dashboard-questions.cy.spec.js

* fixed sharing-reproductions.cy.spec.js

* fixed snowplow-tracking.cy.spec.ts

* fixed funnels.cy.spec.ts

* fixed others

* fix import

* return new fields in results for in-place engine

* test fix

* test fix attempt

* rm backup file

* fixed more e2e tests

* fixup

* more stabilization of e2e tests

* tweak whitespace

* first attempt to fix failing postgres tests

* try a simpler approach

* closes VIZ-1227 search not triggered when no datasource is selected

* new attempt to parameterize the define-spec macro with app-db

* removing non-temporal-dimension-ids filter

* fix cljkondo

* fix test

* fixed e2e (snowplow)

* fixed e2e (funnels)

* fixed e2e (basics)

* better loading state, better typing

* reverted type change

* uncomment e2e cartesian; remove unused search param; fix bg color

* Fix query to resolve to false instead of nil

---------

Co-authored-by: Eliot Daigneault-Mestre <eliot@metabase.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-07-16 14:08:03 -07:00
metamben
4927b35f0f Stop offering expressions and aggregation being edited as columns (#61033)
* Stop offering expressions and aggregation being edited as columns

Fixes #61010

* Add repro for metabase#61010

* Add test for custom columns too

* Update expected error message in e2e test

* Detect cycles in resolver too

* Revert "Detect cycles in resolver too"

* Add e2e test for referencing custom expressions that are just wrappers

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-17 00:03:34 +03:00
Nemanja Glumac
481065bc8f Optimize writable QA DB snapshot creation process (#60898) 2025-07-16 20:47:37 +00:00
Braden Shepherdson
d10fafd538 [parameters] Use MBQL lib to query for field values from a card (#60510)
Fixes #44077. Fixes #35840.

Previously this used some custom legacy MBQL manipulation. It was
incorrect and led to a handful of bugs. Now it's a straightforward
edit of the query powered by MBQL lib.
2025-07-16 16:20:28 -04:00
Romeo Van Snick
b76a18112a Fix parameter target popover empty state (#60990)
* Add missing min-height to ParameterTargetList

* Add repro for metabase#60987

* Update list when clearing cache

* Remove minWidth

* Always disable virtualization in AccordionList

* Use Mantine Popover in DashCardCardParameterMapperButton

* Remove virtualization from AccordionList altogether

* Remove superflouous wrapper for Clause popover

* Add box sizing to dashcardmapper

* Remove withBorders prop

* Remove more unused instance properties from AccordionList

* Add repro for metabase#46767

* Add key to parameter mapping button

* Trap focus in parameter mapping popover

* Close toasts to avoid overlapping popovers

* Ignore search box in check

* Add missing tooltip

* Fix selector

* Fix selector

* Close popover when selecting value

* Revert "Remove superflouous wrapper for Clause popover"

This reverts commit 5a13c826f4.

* Use H.tooltip helper

* Use cy.trigger instead of realHover

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-16 20:43:28 +02:00
Jacob Joseph
b39cfa3b6a Update sql-parameters.md (#61096)
fixed missing double quotes
2025-07-16 18:29:41 +00:00
Riley Thompson
23eeb71330 Clear secret file memoization when DB details have changed (#60503)
* clear secret file memoization on db update

* add rsa env vars

* improve test

* add more narrow test

* improve test

* refactor snowflake private key test to create and drop user per test

* use accountadmin role

* try granting sysadmin

* try using accountadmin role

* use correct details

* throw exceptions for unimplemented methods

* clean up test code
2025-07-16 14:19:07 -04:00
Edward Paget
1e088b195a fix: don't recurse in check-block-permissions (#61078) 2025-07-16 13:09:14 -05:00
SabarigirisanSivakumarREO
5601b31019 Locale updates on LanguageStep submit (#60184) 2025-07-16 11:58:29 -06:00
SabarigirisanSivakumarREO
6c6e042e20 Update button focus styling in setup flow (#60175)
* Button focus has been updated

* fixed color usage & onlyIcon button
2025-07-16 11:58:04 -06:00
Riley Thompson
6f94207bdf Use different login and user names for sqlserver impersonation setup (#60743)
* use different login and user names for sqlserver impersonation setup

* Require role

* fix sqlserver test

* move feature supported def

* remove outdated test
2025-07-16 13:42:11 -04:00
Ryan Laurie
83178c42e9 Show Application Permission Saving Errors (#61038)
* show errors when saving permissions

* use new confirm modal
2025-07-16 17:16:34 +00:00
Ryan Laurie
366e28ab80 fix git log logic for release logs (#61012) 2025-07-16 11:04:23 -06:00
Ryan Laurie
e3a45d5996 Shard jest tests (#53638)
* shard jest tests

* dont fail fast

* remove coverage
2025-07-16 11:03:36 -06:00
Ryan Laurie
23ed37fcb3 run frontend test coverage nightly (#61077)
* run frontend test coverage nightly

* SPACE
2025-07-16 11:01:59 -06:00
Uladzimir Havenchyk
2768c95be3 test: fix flakiness in table resizing (#61064) 2025-07-16 19:30:50 +03:00
Phoomparin Mano
0b73abd44e Make new iframe embed flow's parameter placeholder text contextual (#61006) 2025-07-16 23:28:46 +07:00
Filipe Silva
1dd56e5f14 Postgres Replication to Cloud Storage (#59709)
* feat: harbormaster openapi client

* feat: pg replication backend

* feat: pg replication frontend

* ci: label for build docker job

* fix: update attached-dwh crufty tables on sync :update

Fix https://linear.app/metabase/issue/CLO-4223/mb-does-not-update-crufty-table-settings-on-config-change

* fixup: minor FE review items

* fixup: pg-replication -> database-replication

* fixup: use db driver feature in DatabaseReplicationSection

* fixup: jt link needs unique k

* fix: cache? not cache on setting
2025-07-16 11:09:01 -05:00
lbrdnk
bcd9ce522b Fix coercion overwrite (#61055)
* Fix coercion overwrite

* Adjust test
2025-07-16 17:14:17 +02:00
Uladzimir Havenchyk
87d57b5880 test: fix flakiness in dashcard resizing (#61066) 2025-07-16 18:14:04 +03:00
Nicolò Maria Mezzopera
8eec882c31 docs: add callout to driver build to the beginning of the guide (#61071) 2025-07-16 16:53:01 +02:00
Mahatthana (Kelvin) Nomsawadi
1bf726bddc feat(sdk): Create new dashboard question from EditableDashboard (#60920)
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-16 21:22:37 +07:00
Brad Anderson
75df8b0ce6 Removes blue slow-loading card border (#60998) 2025-07-16 09:37:10 -04:00
Rodrigo López Dato
788fd1922c Fix "Github" capitalization in all Markdown files (#61034) 2025-07-16 09:02:03 -04:00
Alberto Perdomo
cc23721d9c docs(sdk): add limitations around leaflet 1 (#61057)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-16 20:00:38 +07:00
Oisin Coveney
2ff890692e feat(sdk): Add withDownloads to the static question (#60976) 2025-07-16 15:46:01 +03:00
Abed Habli
8a6b842320 docs: leaf fields sync limit for MongoDB (#61011)
* adding the leaf fields limit

* updating
2025-07-16 10:00:47 +02:00
Nicolò Maria Mezzopera
c5118e2517 fix css issues in the Native Query Editor (#60929)
* feat: swap span for flex in Trigger component with chevron

* chore: use span in flex component

* feat: add small left padding to native editor action buttons

* chore: fix typo on data-testid file

* chore: force viewport to be big enough in cy test

* feat: force the test to small window and execute the drag vertically
2025-07-16 09:03:44 +02:00
Ngoc Khuat
bdc56af8e7 Simplify slack channel implementation (#60838) 2025-07-16 10:37:50 +07:00
Alexander Polyankin
e779e66621 Add missing query metadata (#61023) 2025-07-16 00:28:17 +00:00
Cam Saul
ad256b6e5c [Lib] remove 'idents' part 1 (#60873) 2025-07-16 00:04:03 +00:00
Kamil Mielnik
36b9569619 Fix flaky dashboard parameters test (#60972) 2025-07-15 19:49:45 -04:00
Tyler Plude
62d441fd36 VIZ-1151 - Fix currency setting precedence table static viz (#60808)
* Move global settings to beginning of merge

* Removing duplicate logic in favor of qp viz-settings-for-col
2025-07-15 13:31:43 -07:00
Edward Paget
4be3c78bf8 chore: bump metabase saml library version (#61017) 2025-07-15 18:51:55 +00:00
Alex Yarosh
1cdb4bf7a4 docs: impersonation docs update (#60810)
* impersonation docs update

* Optimized 2 images, saved 112.4 KB (47.2% smaller)

* Apply suggestions from code review

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

* what's up with that expected embedding check

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-07-15 14:06:38 -04:00
Cam Saul
01d9e43d56 [Lib] Improved metadata caching (#60802)
* Fix errors in cache magic

* Test fixes 🔧

* Slight improvement

* Fix Cljs macro requires

* PR feedback

* Test fix 🔧

* Test fix 🔧

* Test fix 🔧

* Test fix 🔧

* Yet another test fix 🔧
2025-07-15 17:04:46 +00:00
Aleksandr Lesnenko
eeac221f9c Revert "fix crashing chart due to invalid dimension viz setting computation (#60892)" (#60993)
This reverts commit e8dcfb5512.
2025-07-15 15:57:51 +00:00
Nemanja Glumac
025a216c41 Connect Mongo QA database using its connection string (#60895)
* Try connecting mongo via connection string

* Simplify sqlite

* Fix Mongo connection string
2025-07-15 15:47:51 +00:00
Brad Anderson
517a9f26dc Closes VIZ-1275 - Convert vanilla JS scalar code to TS (#60737) 2025-07-15 11:31:16 -04:00
metamben
031fd123fe Add repro test for #57596 (#60959) 2025-07-15 16:44:41 +03:00
Phoomparin Mano
259621b0c1 Add height of 100vh to iframe embed flow snippet (#60975) 2025-07-15 20:28:05 +07:00
Romeo Van Snick
7e185c6a02 Show error modal when turning a native question with variables into model, even when the model acknowledgement has happened (#60932)
* Add repro for metabase#56913

* Add fix for #56913
2025-07-15 15:06:42 +02:00
lbrdnk
1e57b6b256 Limit number of leaf fields synced on Mongo (#59883)
* Rewrite sync fields pipeline

* Different pipeline, 1K fields limit

* Comment test

* Adjust ordering of fields

* nil vals

* Expr

* Pipeline, adjust for null value keys, cleanup

* Swap top operator for sort group first

* New tests

* Fix var

* Cleanup

* linter

* space

* cleanup

* Docstring

* Apply suggestions from code review

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* bracket

* Update modules/drivers/mongo/src/metabase/driver/mongo.clj

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* paren

* dbfields->ftree*

* docstring

* naming, docstring, whitespace

* map inst rest map

* first second

* ftree->nested-fields

* Now redundant kondo ignore

* Remove ^:dynamic from leaf-fields-limit

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
2025-07-15 13:36:25 +02:00
Phoomparin Mano
92589063d6 feat(sdk): use entity ids directly in questions and dashboards (#60555)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-15 17:30:17 +07:00
Alexander Polyankin
62695af846 Show join condition literals in the UI (#60937)
* Tests

* Tests

* Tests

* Tests
2025-07-15 05:47:30 -04:00
Ngoc Khuat
bcc7034af9 Spec update add support for reverse PK (#60847) 2025-07-15 09:38:53 +00:00
Nicolò Pretto
fb8ea44bda Embedding specific setup flow - Milestone 3 - Follow ups (#60137)
* "I'll do this later" doesn't exit the flow (#59993)

* parallelize requests and make them use rtk query (#59563)

* parallelize requests and make them use rtk query

* fix multiple "Automatically Generated Dashboards" collections created +
update types

* add test

* EMB-459: remove 3 tables limit (#59997)

* Tweak welcome step content display (#60083)

* tweak welcome step content display

* update test after copy update

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>

* remove useForceLocaleRefresh as the context is now enough (#60145)

* adds `embedding_setup_click` event (#60315)

* embedding setup: remove last fetch call and speed up e2e (#60392)

* close EMB-487, remove last remaining fetch call

* closes EMB-534, speed up e2e

* createdDashboard -> createdDashboards

* embedding setup: use cloud token in e2e and hide appbar and database status (#60335)

* EMB-533: make the e2e test use the CLOUD pro token

* EMB-532: hide the database sync and the app bars in setup/embedding

* Update e2e/test/scenarios/onboarding/setup/setup-embedding.cy.spec.ts

* fix typo

---------

Co-authored-by: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
2025-07-15 11:18:44 +02:00
Kamil Mielnik
2480f7a42c SEM-374 Improve searchability of Table Metadata Field Type section (#60925)
* Auto-select text on focus in Select inputs with search enabled, to ease searchability

* Add tests

* Add issue tag
2025-07-15 14:47:53 +07:00
Romeo Van Snick
407a4b740e Enable cljs dev tools when not hot reloading too (#60918)
* Enable cljs dev tools when not hot reloading too

* Use separate flag for cljs dev tools
2025-07-15 08:19:29 +02:00
Ryan Laurie
b2deef2357 Remove Changelogs From Github (#60668)
* update release note templates

* keep heading

* nicer version parsing

* nicer version parsing
2025-07-14 22:39:36 +00:00
Eric Normand
df407b6b25 today() custom expression function (#60472)
* Empty

* No need for intersection in test

* Correct modestring casing

* Test datetime(number, mode) for s, ms, us, ns

* Allow uppercase and hyphens but normalize them.

* Don't allow hyphens in frontend.

* Implement unix casts for mongo

* Convert floats to long

* Use hyphenated keywords internally

* expand docstring

* Try other implementation of nanoseconds for BigQuery

* Handle sqlserver unix timestamps with multimethod

* More flexible date type handling

* Use integer division with bigquery

* datetime(number) frontend tests

* Undo change to package.json

* Empty

* Wrap code-like stuff in ``

* Add expressions/today feature

* Add legacy + lib for today()

* Basic test for today() (WIP)

* Add expressions/today feature to sql + implementation

* Finalize today() test

* Implement today() on mongo

* Better comment

* use m/find-first

* Frontend implementation

* Add today() fe test

* Improve fe test for today()

* Add a line to changelog

* Add line to changelog about expressions/today

* Handle different types better in lib schema

* Add special case for mode in formatter

* Add mode to expression options

* Add special case for mode in parser

* Error message

* Schema with options

* Add options map to legacy schema for datetime

* Remove comment

* Add unit test for mode option in compiler

* Add test for formatting the mode option in datetime

* Better round-tripping for :datetime function

* Add :mode to allowed keys for options marshalling

* Fix expression to add mode to options map

* Test datetime() legacy/lib roundtripping

* Fix normalization

* Remove println

* Mongo datetime() with options map

* Move test to custom-column spec

* Remove duplicate check

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-14 16:38:04 -05:00
Raphael Krut-Landau
6f3d0be100 In main nav, don't show 'Other users' personal collections' if there are no other users (#58419)
* In main nav, don't show 'Other users' personal collections' if there are no other users

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Fraser <fraser@metabase.com>
2025-07-15 08:54:27 +12:00
Aleksandr Lesnenko
e8dcfb5512 fix crashing chart due to invalid dimension viz setting computation (#60892)
* fix chart crashes when having multiple metric and dimension columns and invalid dimension viz setting

* replace spec
2025-07-14 20:48:57 +00:00
metamben
7f31b95e8b Add repro test for #60587 (#60945) 2025-07-14 20:40:10 +00:00
Tyler Plude
27a4319cff Prevent onChange when no changes were made (#60881) 2025-07-14 12:31:04 -07:00
Tyler Plude
c306daf323 convert colors to hex for compatibility with batik (#60800) 2025-07-14 12:30:44 -07:00
Tyler Plude
114fd199f3 show max download rows text only when format is xlsx (#60793) 2025-07-14 12:30:09 -07:00
Timothy S. Dean
935c0fb1f6 Remapping endpoint checks for common remapping definitions (#60308)
This PR fixes a bug where dashboard filters linked to multiple fields would show entity keys instead of remapped entity names when viewed by users with grouped (limited) permissions.

The solution in this PR is to add support for explicit remapping field specification.

Also resolved a separate permissions caching bug in data_permissions.clj where the use-cache? logic was inverted.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-07-14 12:57:24 -06:00
Eric Normand
5f9b11d33e datetime(number, mode) (#60389)
* Empty

* No need for intersection in test

* Correct modestring casing

* Test datetime(number, mode) for s, ms, us, ns

* Allow uppercase and hyphens but normalize them.

* Don't allow hyphens in frontend.

* Implement unix casts for mongo

* Convert floats to long

* Use hyphenated keywords internally

* expand docstring

* Try other implementation of nanoseconds for BigQuery

* Handle sqlserver unix timestamps with multimethod

* More flexible date type handling

* Use integer division with bigquery

* datetime(number) frontend tests

* Undo change to package.json

* Wrap code-like stuff in ``

* Better comment

* use m/find-first

* Add a line to changelog

* Handle different types better in lib schema

* Add special case for mode in formatter

* Add mode to expression options

* Add special case for mode in parser

* Error message

* Schema with options

* Add options map to legacy schema for datetime

* Remove comment

* Add unit test for mode option in compiler

* Add test for formatting the mode option in datetime

* Better round-tripping for :datetime function

* Add :mode to allowed keys for options marshalling

* Fix expression to add mode to options map

* Test datetime() legacy/lib roundtripping

* Fix normalization

* Remove println

* Mongo datetime() with options map

* Remove duplicate check

* Add simple bytes to compiler

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-14 13:26:57 -05:00
Alexander Polyankin
987ae15bf9 Repro test (#60943) 2025-07-14 14:25:51 -04:00
Phoomparin Mano
4bb8f9d261 Integration branch for new iframe embedding setup flow (#60304)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-07-15 00:59:45 +07:00
Uladzimir Havenchyk
42e9dbd7f0 test: add repro for a fixed issue in metabase lib (#60927)
* test: add repro for a fixed issue in metabase lib

* fixup

* fixup
2025-07-14 20:44:00 +03:00
metamben
d5590d1148 Aggregation refs in aggregation exprs (#60307)
* Add aggregation columns

* Pass expressionIndex to Expression editor in AggregationPicker

* Add expression-parts-method for aggregation references

* Add support in the query processor

* Add more tests

* Hack FE to call aggregablecolumns

* Add missing expressionMode option

* Add columnsForExpressionMode helper

* Update error message from resolver

* Add query with aggregation for tests

* Add tests for resolving aggregations

* Fix tests

* Fix CLJS tests

* Fix more tests

* Add missing docstring

* Add more unit tests

* Add unit test for aggregation completions

* Fix error message in test

* Add tests for second stage resolver

* Add tests for referencing aggregations

* Add test for resolving aggregation in next stage

* Disambiguate test name

* Fix column names returned by QP for aliased aggregations

* Fix merge issues

* Fix final test

* Address review comments

* Move aggregation tests

* Add test for detecting cycles in aggregations

* Add test about disallowing duplicate aggregation names

* Add sort helper

* Add tests for using nested aggregations as question source

* Add e2e test for nested aggregations in follow up stage

* Add tests for using nested aggregations in follow up stage with breakout

* Allow duplicate aggregation names

* Add test for changing aggregation order in underlying question

* Remove nonsensical test

* Fix test descriptions

* Fix test

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-14 19:23:19 +03:00
metamben
eb8bd3178e Add BE repro tests (#60583)
* Add BE repro test for #58314

* Add repro test for #35252

* Add repro test for #39033

* Add repro test for #27521

* Add repro test for #47734

* Add repro test for QUE-1378

* Add repro test for QUE-1374

* Add repro test for #58314

* Add repro test for #44767

Closes #44767

* Add repro test for #60498

* Add repro test for #60444

* Make test for #60444 more general
2025-07-14 19:05:41 +03:00
Fraser
a18d59447c Cloud SMTP Whitelabeling (#59528) 2025-07-14 10:34:53 -05:00
Thomas Schmidt
dcb54e1032 Add message for data source search (#60926) 2025-07-14 15:30:57 +00:00
Nicolò Pretto
6af7b4ac1e run embedding tests from run-tests (#60450)
* run embedding-sdk.yml from run-tests.yml

* remove e2e-tests-skipped-stub

* try to put back some structure

* fix name of build

* / -> › because github doesn't uses only the part after the last slash

* use > instead of chevron to make linter happy

* breaking changeS

* remove code to trigger ci
2025-07-14 16:52:21 +02:00
Kamil Mielnik
90fff3b0a5 SEM-444 Remove the "Add filter" button from the filter preview (#60844)
* Add withSubmitButton prop to Filter components

* Disable submit button in filtering preview

* Add tests
2025-07-14 21:15:28 +07:00
Kamil Mielnik
024f7a66bd Fix redundant "Not found" error message (#60913)
* Fix filtering preview background on narrow screens

* Do not show db 404 message if db is not selected

* Add test
2025-07-14 21:15:09 +07:00
Kamil Mielnik
26851eb2a9 SEM-483 For unfolded JSON subfields, the prefix gets cut aggressively (#60919)
* Measure parent to compute left section max width

* Add test

* Use Ellipsified for the prefix

* Use Ellipsified in SortableFieldItem
2025-07-14 19:59:56 +07:00
Romeo Van Snick
bd3703bd75 Add repro for "Filter Fails in Multi Level Aggregate for Model Based on SQL Questions" (#60859)
* Add repro for metabase#48772

* Add test description

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-07-14 11:35:47 +00:00
Kamil Mielnik
b4f440eb86 Fix flaky dashboard parameters test (#60916)
* Fix flaky test by adding aria-hidden on elements rendered only to perform measurements

* Revert "Fix flaky test by adding aria-hidden on elements rendered only to perform measurements"

This reverts commit 5575d6b43b.

* Fix flaky test by adding aria-hidden on elements rendered only to perform measurements

* Use hidden instead of aria-hidden

* Filter out invisible elements

* Revert adding hidden attribute
2025-07-14 18:23:01 +07:00
Uladzimir Havenchyk
4337140573 chore: drop moment from more files (#60660)
* chore: drop moment from more files

* chore: replace moment with dayjs

* update impl.cljs

* one more
2025-07-14 13:11:57 +03:00
Kamil Mielnik
e7ce3fcdd0 SEM-482 No table fields empty state (#60848)
* Show empty state when table has no fields

* Add test

* Fix flake
2025-07-14 07:50:09 +00:00
Kamil Mielnik
100ebbb282 Fix field item focus state being cut off (#60851) 2025-07-14 14:21:01 +07:00
Kamil Mielnik
268f24c51e SEM-433 Empty table preview of columns with hidden visibility (#60846)
* Show empty state in table preview when field is hidden

* Update tests

* Center the empty state vertically
2025-07-14 14:19:35 +07:00
Kamil Mielnik
3c8e46a5e2 Repro #55563 - Bigquery STRUCT types don't allow renaming in Admin -> Table Metadata (#60854) 2025-07-14 14:18:40 +07:00
Brad Anderson
4453fa8363 VIZ-968 Fixes pdf export grey boxes issue (#60879) 2025-07-11 22:08:23 -04:00
Nemanja Glumac
95af56b07c Add sqlite on demand in E2E tests (#60888) 2025-07-11 22:45:41 +00:00
Nick Fitzpatrick
dc91b7f508 Entity picker simplification (#60858)
* moving pickers into same folder, consolidate getInitialContainer hooks

* getCollectionIdPath consolidation

* getStateFromIdPath

* comitting sins to get tests passing
2025-07-11 19:04:44 -03:00
Nathan Voxland
cd735c000a Fix flaky search available-models-test (#60789) 2025-07-11 16:27:53 -05:00
bryan
02d236381f pin tj-actions/changed-files (#60811) 2025-07-11 18:16:04 -03:00
bryan
7547172e81 optimize every docs png (#60882) 2025-07-11 21:05:34 +00:00
Edward Paget
a904572fb5 fix: get source tables in multi-stage aggregations (#60872)
Fixes getting source tables in multistage aggregations. The check for
when we were in the scope of the parent card was in the wrong place in
the match which resulted in us failing to make a source-query block
immediately inside a stage with a source card.
2025-07-11 14:37:30 -05:00
Nemanja Glumac
ef3e70f1cf Remove unused Cypress command updatePermissionsSchemas (#60860) 2025-07-11 13:32:19 -06:00
Ryan Laurie
1833673602 Update internal slack + smtp settings links (#60020)
* update internal slack settings links

* update smtp urls

* update e2e tests
2025-07-11 17:30:51 +00:00
John Swanson
4060e2131d Allow configuring uploads for attached DWH (#60724)
Two changes required to allow this:

- first, for the setting itself, allow setting it if the database is
writable OR an attached DWH.

- second, a similar change to make sure `syncable_schemas` is fetchable
for the attached DWH.
2025-07-11 17:21:17 +00:00
Brad Anderson
e5725a7fc6 Fixes issue where "official" icon is incorrectly small in dash cards (#60853) 2025-07-11 12:46:02 -04:00
Sébastien
20a23a8837 closes VIZ-915 better remove all feature in tables (#60827) 2025-07-11 18:44:57 +02:00
Sébastien
c098fc30df Closes VIZ-974 column formatting for BigInts (#60814) 2025-07-11 17:48:27 +02:00
Kamil Mielnik
912dad9f4e Show empty state in table preview when there is no data (#60840) 2025-07-11 21:13:40 +07:00
Romeo Van Snick
f0da0ef86e Add repro for metabase#46337 (#60845) 2025-07-11 15:31:48 +02:00
Romeo Van Snick
909746a470 Add repro for "Invalid query error when trying to zoom in Bar visualization" (#60829)
* Add repro for metabase#42817

* Use echartsContainer helper
2025-07-11 13:03:31 +00:00
Kamil Mielnik
38de869471 SEM-423 Data loading error handling (#60626)
* SEM-239 Data model - Layout boilerplate (#57174)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* SEM-240 Data model - Table section (#57248)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Fix flaky unit tests

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* SEM-241 Data model - Field - Data section (#57420)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Simplify color

* Use type instead of interface

* SEM-297 Drop entity framework usage in `SemanticTypePicker` (#57531)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Drop entity framework in FkTargetPicker

* Make table names show up

* Clean up

* Fix types

* Fix table names

* Add tests

* Add tests

* Add tests

* Restrict imports

* Improve config

* Restrict entity framework imports

* Simplify color

* Use type instead of interface

* Lint

* SEM-267 Data model - Field - Metadata section (#57527)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Add Metadata section with display name input

* Pass table through components

* Drop entity framework in FkTargetPicker

* Revert "Pass table through components"

This reverts commit 2eb3e3a256.

* Make table names show up

* Clean up

* Fix types

* Fix table names

* Add tests

* Add tests

* Add tests

* Restrict imports

* Improve config

* Restrict entity framework imports

* Simplify color

* Use type instead of interface

* Use SemanticTypeAndTargetPicker in FieldSection

* Sort

* Lint

* Typing

* Do not use v1/metadata wrapper

* Add TextareaBlurChange

* Add description input

* Update comments

* Update icon

* Add plugin query props

* Remove redundant prop

* Remove redundant _.omit

* Fix textarea crashing due to min height on input

* Set minRows

* Fix styling

* Remove PLUGIN_FEATURE_LEVEL_PERMISSIONS plugin usage from DatasetFieldMetadataFkTargetPicker
- because that's not how it works in master

* Drop -v2 suffix for new routes, use -v1 suffix for old routes (#57637)

* SEM-242 Data model - Field - Behavior section (#57638)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Clean up timeouts on unmount

* Improve typing

* SEM-269 Data model - Field - Formatting section (#57682)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Add FormattingSection

* Sort

* Make formatting form full width

* Use style prop instead of maxWidth

* Clean up timeouts on unmount

* Improve typing

* Metadata preview boilerplate (#58015)

* Render preview

* Add preview type selector

* Fix flex layout

* Lift preview type to top component to keep the state

* Move helpers to utils

* Add unit tests for preview picker

* Add feedback to metadata editor when saving config (#58038)

* Add feedback to all table and field settings

* Add missing prop

* Metadata table and detail preview (#57887)

* Handle undefined metadata

* Render Table preview

* Add custom error component

* Add helper for error message

* Add detail preview

* Make comment more clear

* Fix type

* Fix missing props

* Metadata table picker (#57648)

* Set up TablePicker component

* Fix type in api

* Add initial TablePicker implementation

* Add schema icon

* Update url for datapicker

* Move data loading to utils

* Add loading node types

* Derive icon from type

* Try building the treepicker state asynchronously

* Build custom tree

* Add loading state

* Push url state in picker

* Sync open state with url

* Use helper to manage expanded state

* Split Node into separate file

* Expose prefetch hook

* Prefetch data to avoid showing loading states

* Add search to table picker

* Move search-related stuff into Search module

* Use Link for navigation

* Add renderLoading helper

* Remove unused prop

* Make search input sticky

* Add separate sidebar for field picker

* Render single schema but open it by default

* Translate errors

* Defer search value

* Export lazy loaders for database info

* Use top-level data fetching

* Enable virtualization

* Move loader utils into utils

* Remove Node implementation

* Simplify styles

* Pull out some logic

* Reuse results in search

* Reuse tree helpers when handling search results

* Avoid passing down isExpanded

* Memoize

* Fix initial expanded state

* Automatically expand single-schema databases

* Pass tableId to DataPicker

* Add styling for active item

* Add getUrl helper for tree nodes

* Move types to separate file

* Simplify item

* Rename Item to Results

* Simplify

* Allow wrapping everywhere

* Add loading state

* Render tracks

* Remove unused colors

* Scroll active item into view

* Fix paths

* Add missing keys

* Handle browser navigation in table picker

* Handle browser navigation in table picker

* Add more documentation

* Debounce search

* Render track even when no parent was found

* Allow rendering urls to schema's with no name

* Add value to loading nodes

* Add delay to track too

* Add explicit level to FlatItem

* Add explicit parent refence to FlatItem

* Hide nameless schemas in the tree

* Refactor

* Move key to top-level item

* Make TablePicker not depend on router

* Disable smooth scroll

* Add unit tests for TablePicker

* Unnest unnamed schemas directly

* Also fetch tables when only one schema exists

* Remeasure items when they change

* Use more precise typeing for items

* Allow clicking table nodes in search results

* Remove unused classes

* Remove unused useDispatch hook

* Remove delay on loading items

* Add custom empty state

* Typo

* Add keyboard navigation to table picker

* Use test helpers in all tests

* Add keyboard navigation to search results too

* Add custom focus state for search items

* Add unit tests for search

* Jump to parent when pressing left arrow

* Add more cases to keyboard test

* Add hover state to table picker

* Use table display name in table picker

* Flatten single schema in to database

* Rename onChange_ to handleChange

* Use folder for schema

* Make the hover and active colors the same

* Rename Data tab to Data Model

* Remove title

* Fix layout

* Field description editor (#58280)

* Use NameDescriptionInput for the field section too

* Use TextArea for description editor

* Post-merge fixes

* Metadata editing UI tweaks (#58297)

* Add background to fields

* Tweak colors for disabled inputs

* Remove icons in SectionPill

* Remove icon from one more SectionPill

* Remove lint

* Move segments to table picker (#58422)

* Add link to segments in the datamodel sidebar

* Add local state to RouterTablePicker

* Nest segments under DataModel

* Add wrapper classes to revision routes

* Fix spacing for empty state

* Add active state to segments link

* Remove DataModelApp in DataModel routes

* Fix overflow in segment form

* Merge translation strings

* Add background color to segments components

* SEM-363 Data model - Field and table name/description inputs should be sticky and have icons (#58703)

* Remove hover/focus effect and break components down into files

* Update comment

* Consolidate toasts

* Remove unused styles

* Remove redundant card

* Extract SegmentsLink

* Make name/description input sticky

* Add icons

* Remove leftovers

* Fix TS error

* Move visibility toggles to the table picker (#58284)

* Fetch hidden tables

* Fetch hidden schemas

* Add visibility toggles to the table picker

* Remove table visibility toggle in table section

* Simplify visibility toggler

* Move visibility toggle to separate file

* Add unit tests for visibility toggle

* Show table as hidden whenever there is any visibility

* Use ActionIcon

* Break up onClick handler

* Use plan Icon

* Remove data from nodes that don't need it

* Add tooltips to table visibility togglers

* Wrap icons in ActionIcon

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Cleanup

* SEM-361 Data model - Field metadata/formatting settings do not affect the preview (#58841)

* Fix SEM-361

* Fix types

* SEM-311 Table preview - no impact when changing time formatting for seconds and ms (#58927)

* Avoid using a breakout for date-time columns

* Use the same logic for every type of field

* SEM-246 Data model - Filtering preview (#58854)

* Fix SEM-361

* Fix types

* Add FilteringPreview boilerplate

* Use FilterPickerBody

* Another attempt

* Make it work for all types of filters

* Memoize query

* Clear filter input on field change

* Account for prop changes

* Fix TS error

* SEM-268 Data model - Field - Behavior section - Display values (#57684)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Add placeholder

* Add RemappingPicker boilerplate

* Clean up timeouts on unmount

* Improve typing

* Add onChange logic boilerplate

* Extract DisplayValuesPicker

* Remove redundant code

* Format code

* Add fk input boilerplate

* Disable options instead of hiding them

* Rename

* Fetch required data

* Use full data

* Implement fk remapping onChange

* Implement naming tip

* Fix state

* Extract utils

* Fix schema step errors

* Add remappings boilerplate

* Fetch remappings

* Add more modal boilerplate

* Add modal props

* Handle modal state

* Add explicit edit button

* Implement modal form

* Limit amount of Boxes

* Bring all safety checks back in

* Refactor CustomMappingModal

* Style CustomMappingModal

* Extract getHasEmptyValues

* Remove todo

* Prevent flicker

* Fix initial state of fk picker

* Use is touched

* Add CustomMappingModal unit tests

* Add DisplayValuesPicker unit tests

* Move DisplayValuesPicker

* Remove redundant tags

* Fix uncontrolled/controller input react warning

* Add explanatory tooltips for disabled options

* Fix 1px of background leaking into view

* Add missing memoization

* Reset state when cancelling

* Sync single table via UI (#58342)

* add table-manual-sync event

* add table/sync_schema endpoint

* add table sync test

* Add api helper for the sync table schema endpoint

* Add SyncTableSchemaButton component

* Add SyncTableSchemaButton to table section

* Add unit tests for SyncTableSchemaButton

* Also invalidate field-values and parameter-values

* Simplify SyncTableSchemaButton hooks

* Move useTemporaryState into a separate hook

* Apply same pattern in all buttons

* address PR review comments: use `get-database`, `with-database-routing-off`

* Pass argument to useTemporaryState

* update test

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* Fix SEM-370 (#59051)

* Post-merge conflict fix

* SEM-329 Data model - Table section - Update fields sorting interaction (#59316)

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Pixel-perfect

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* SEM-376 Data model - Resizable columns layout (#59100)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* SEM-327 Data model - Move the re-scan / discard options away from the bottom of the fields list (#59474)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* SyncOptionsModal

* Move

* Field values modal

* Responsiveness

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* Tmp

* Revert "Tmp"

This reverts commit 6e561c0de7.

* SEM-424 Tests parity - datamodel.cy.spec.js (#59548)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* SyncOptionsModal

* Move

* Field values modal

* Responsiveness

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Port test

* Fix typing

* Port test

* Port tests

* Format code, add data-testid

* Port more tests

* Refactor withDatabase to TypeScript

* Await

* Fix prop handling

* Port test

* Memoize textarea for performance

* Port test

* Port tests

* Remove unlawful getFieldDisplayName usages

* ESLint

* Add JSDoc

* Port tests

* Port tests

* Format code

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* Tmp

* Revert "Tmp"

This reverts commit 6e561c0de7.

* Fix circular dependency

* Post-merge fix

* SEM-425 Tests parity - editor.cy.spec.js (#59838)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Simplify assertion

* SEM-426 Tests parity - reproductions.cy.spec.ts (#59970)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Simplify assertion

* SEM-427 Tests parity - remaining e2e suites (#59980)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Data model - Simple flex layout (#59995)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Try simple flex layout

* Update proportions

* Remove redundant elements

* Clean up

* Use ellipsis instead of wrapping

* Pixel perfect

* Tweak constants

* SEM-448 Tests parity - unit tests (#60042)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Try simple flex layout

* Update proportions

* Remove redundant elements

* Clean up

* Use ellipsis instead of wrapping

* Pixel perfect

* Tweak constants

* Add data model unit tests boilerplate

* Optimistically remove TODOs

* Use router

* Fix element rendering in tests

* Add tests + fixes

* Port tests

* Port a test, fix a util

* Port test

* Port tests

* Port tests

* Remove old tests

* Port tests

* Remove old tests

* Port tests

* Remove old tests

* Fix disabling tables in search results

* Fix flakes

* Update tests

* Remove redundant check

* SEM-434 Missing metadata in FieldDataSelector (#60262)

* Manually override tables prop and add missing properties to Field objects
- Fixes SEM-434

* Format code

* Use field.display_name

* Memoize tables

* SEM-462 Small tweaks (#60187)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Fix events

* Use prop instead of CSS

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Add comments

* SEM-460 Show prefix for JSON-unfolded columns (#60328)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Add comments

* SEM-420 Organize e2e tests (#60379)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Move segments to a separate spec

* Organize tests

* Add comments

* SEM-420 Organize e2e tests (part 2) (#60388)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Move segments to a separate spec

* Organize tests

* Move tests

* Move tests

* Add comments

* Merge tests

* Move tests

* Use modern selectors

* Move tests

* Move tests

* Reorder tests

* SEM-420 Test new features (e2e) (#60439)

* Add new tests, simplify toasts, remove long prefix from utils

* Test toasts

* Reuse utils

* Add table picker test for no schemas

* Fix schemaless tables not shown in search

* Add sync options test

* Fix & test prefixes

* Add logs

* Format code

* Coercion strategy test

* Add tests for visibility

* Update assertions

* Add test for tooltips

* Field values tests

* Add tests for filtering

* Add preview assertion

* Refactor preview verification

* Fix showing 403 error in preview

* Add preview tests

* Add preview assertions

* Add preview assertions

* Add preview assertions

* Add preview tests

* Move modals and state handling, add tests for Esc key

* Update unit tests

* Use useDisclosure

* Add extra error status check

* Revert unnecessary changes in cross-version tests

* SEM-419 Increase test coverage (unit tests) (#60491)

* Add new tests, simplify toasts, remove long prefix from utils

* Test toasts

* Reuse utils

* Add table picker test for no schemas

* Fix schemaless tables not shown in search

* Add sync options test

* Fix & test prefixes

* Add logs

* Format code

* Coercion strategy test

* Add tests for visibility

* Update assertions

* Add test for tooltips

* Field values tests

* Add tests for filtering

* Add preview assertion

* Refactor preview verification

* Fix showing 403 error in preview

* Add preview tests

* Add preview assertions

* Add preview assertions

* Add preview assertions

* Add preview tests

* Move modals and state handling, add tests for Esc key

* Update unit tests

* Add FieldOrderPicker unit tests

* Add CurrencyPicker unit tests

* Add FkTargetPicker unit tests

* Add more tests

* Add SemanticTypeAndTargetPicker unit tests

* Remove redundant code

* Move RemappingPicker

* Use useDisclosure

* Add extra error status check

* SEM-247 Clean up old Table Metadata page code (#60557)

* Remove old metadata page

* Move humanizeCoercionStrategy

* Remove unused functions

* Fix SEM-484 (#60600)

* Add tests

* Center field error

* Do not navigate if there's an explicit param

* Show field error

* Fix schemas loading, add tests

* Revert unnecessary change

* Fix data fetching

* Improve comments

* Remove invalid test for schemas

* Optimize conditions

* When table is not found, show the empty state as if table was not selected yet

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
2025-07-11 12:02:28 +00:00
Romeo Van Snick
40b7edf160 Fix some minor Custom Expression editor annoyances (#60825)
* Use displayName for error

* Fix error position for node

* Move padding to cm-content to avoid whitespace above gutter

* Add border radius to editor to avoid overflowing container

* Fix displayname in unit test

* Fix type for position

* Add test for error position

* Add unit test for position helper
2025-07-11 12:29:58 +02:00
Kamil Mielnik
a4fe6afc7f SEM-393 Toasts and error handling (#60770)
* Add warning_triangle_filled icon

* Use warning_triangle_filled icon for error toasts in buttons

* Show error toasts consistently

* Fix error handling in table preview

* Fix error handling in object detail preview

* Update message

* Add toasts for sorting

* Add test for errors

* Add missing tests

* Update test

* Add iconColor prop to Undo and use it instead of hardcoding color in warning_triangle_filled icon
2025-07-11 09:51:10 +00:00
Uladzimir Havenchyk
8be98769a5 chore: fix circular deps in qb (#60222)
* chore: fix circular deps in qb

* fixup

* fixup

* fixup

* last circular deps

* fix export

* add a lint rule
2025-07-11 11:29:20 +03:00
Romeo Van Snick
e60f0a163c Add repro for metabase#30712 (#60773) 2025-07-11 10:29:13 +02:00
Romeo Van Snick
61b9506a96 Add test for validation for timezone strings (#60767) 2025-07-11 10:29:03 +02:00
Uladzimir Havenchyk
8f81a00d7c chore: drop unused styles (#60771) 2025-07-11 11:19:19 +03:00
Uladzimir Havenchyk
63c72dca96 chore: drop unused files (#60364) 2025-07-11 08:15:56 +00:00
Sébastien
bd114d2045 Closes VIZ-264 nested JSON no longer formatted as [object Object] (#60489)
* Closes VIZ-264 nested JSON no longer formatted as [object Object]

* added type

* fixed types

* fixed tests
2025-07-11 10:01:01 +02:00
Romeo Van Snick
2d2fe45f9b Add repro for metabase#42942 (#60783) 2025-07-11 09:57:36 +02:00
Kamil Mielnik
efb916f3fb Show empty state when there are no databases (#60760) 2025-07-11 14:22:06 +07:00
Phoomparin Mano
9623731b0d Accept entity ids in SDK-related endpoints (#60464) 2025-07-11 14:08:39 +07:00
Mahatthana (Kelvin) Nomsawadi
7e459bd7e4 Prevent SDK issues going into Metabase release changelog (#60688)
* Prevent SDK issues going into Metabase release changelog

Skip tagging Embedding SDK issues with Metabase milestone

* Fix my embarrassment
2025-07-11 06:45:26 +01:00
Sébastien
1349f50633 cleaned up e2e helper API (#60686) 2025-07-11 07:35:56 +02:00
Luis Paolini
dbe16c735b I hate warnings on Docker builds (#60799)
Removes the warnings and the line about ARM builds
2025-07-10 21:49:25 -03:00
Nemanja Glumac
b1a89304a1 Fix the "contact admin alert" when admin email is missing (#60759) 2025-07-11 00:44:17 +00:00
Aleksandr Lesnenko
bdf49733c8 fix info icon placement (#60747)
* fix info icon placement

* Update Loki Snapshots

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-10 20:41:48 -04:00
Timothy S. Dean
131ad0cbf1 Field filters in embedded questions/dashboards match case-sensitivity of app (#60669) 2025-07-10 17:35:14 -06:00
Alex Yarosh
3059ac87fd autogenerated docs master (#60741) 2025-07-10 19:10:39 -04:00
Nemanja Glumac
6415c7dd8a Fix typo in mage help (#60798) 2025-07-10 23:50:35 +02:00
Alex Yarosh
710ace99c0 notify of new users (#60795) 2025-07-10 17:19:04 -04:00
bryan
458868a7d3 Add schema to PUT settings/api/{key} (#60645) 2025-07-10 13:01:57 -06:00
Aleksandr Lesnenko
6a05532a92 simplify apply filters copy (#60748) 2025-07-10 14:59:38 -04:00
Alex Yarosh
7a469b6cda Update expressions-list.md (#60787) 2025-07-10 18:38:37 +00:00
Jacob Joseph
245d618d15 Update expressions-list.md (#60785)
Double negative was confusing. Changed "Not available" to "Unavailable"
2025-07-10 14:21:05 -04:00
Ryan Laurie
c65b100017 yarn mage (#60780) 2025-07-10 16:50:37 +00:00
Sébastien
d2e67d96e7 Closes VIZ-1283 overflow in visualizer modal (#60695) 2025-07-10 17:44:29 +02:00
Alex Yarosh
2e2a81b5d4 Update securing-embeds.md (#60774) 2025-07-10 11:20:38 -04:00
Alexander Polyankin
7b5b07435b Send correct model metadata on model creation (#60704)
* Fix model metadata

* Fix model metadata

* Fix model metadata

* Fix model metadata

* Fix test
2025-07-10 11:13:59 -04:00
Nicolò Pretto
2ae676e86d skip e2e-cross-version-for-breaking-changes.yml as cypress crashes (#60761) 2025-07-10 11:22:59 +00:00
Romeo Van Snick
050db1b5a7 Add repro for #33835 (#60706) 2025-07-10 13:17:24 +02:00
Romeo Van Snick
9e8dd7a0a0 Add repro for #26512 (#60696) 2025-07-10 13:17:14 +02:00
Kamil Mielnik
2b5ba094d2 SEM-435 Ensure that we keep the selected table even when collapsing the tree (#60694)
* Ensure that we keep the selected table even when collapsing the tree
- Fixes SEM-435

* Update tests

* Always highlight selected table

* Use aria-selected
2025-07-10 10:47:47 +00:00
Anton Kulyk
aaa4a24405 Fix couldn't click filters in dashboard edit mode with SDK (#60725)
* Fix clicking filters in SDK dashboards

* Add e2e test
2025-07-10 11:18:22 +01:00
Romeo Van Snick
9e37bd9d50 Validation for case and coalesce clause types (#59038)
* Add validation for case/if clause types

* Add e2e repro for metabase#57674

* Avoid passing nil default into expressions

* Check for type compatibility, not equality

* Allow unknoen types

* Make e2e test more refined

* Fix e2e test

* Fix clj test

* Fix e2e test

* Handle set arguments to compatible?

* Fix docstring

* Use assignable? instead of most-common-ancestor

* Allow Date/DateTime/... to mix

* Use best-return-type to determine if all types are compatible

* Handle falsy default

* Add missing map

* Update comment to clarify compatibility omission

* Unwrap schema

* Add test for malformed case expressions

* Add type check to coalaesce too

* Add check to coalesce too

* Add tests for :default false

* Add tests for temporal types

* Move combination tests to BE test

* Use separate deftests for valid and invalid case and coalesce tests

* Fold repetitive parts into are expression

* Formatting of test

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Formatting of test

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Formatting of test

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Split up more tests

* Formatting in tests

---------

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-07-10 11:19:41 +02:00
Nicola Mometto
a22a898366 relax test, ordering can be nondeterministic (#60727) 2025-07-10 09:53:16 +01:00
Romeo Van Snick
0481704c35 Inconsistent formatting (#60546)
* Add option to use instance settings for number formatting

* Format row count in datagrid Footer with instance settings

* Format row count in datagrid Footer using instance settings

* Format row in question row count using instance settings

* Add unit test for number formatting with instance settings

* Fix unit tests

* Fix e2e tests

* Update Loki Snapshots

* Add useNumberFormatter hook

* Use useNumberFormatter hook

* Add test for useNumberFormatter

* Fix types

* Update Loki Snapshots

* Move useNumberFormatter to metase/common/hooks

* Add redux to DataGrid stories

* Add missing loki references

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-10 08:25:25 +02:00
William
f46f631694 Query cycle checker understands native queries (#60731)
We check for query cycles when saving cards, but the checker only understands mbql queries.  If we have a native query
that depends on another query, the cycle checker won't go through the native query to see if it is causing a cycle.
Now, the checker understands native queries and can find cycles involving them.

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-10 04:51:03 +00:00
Alexander Polyankin
cd8f94b668 60719 repro (#60723) 2025-07-09 21:04:36 -04:00
Cam Saul
0498a66013 [Lib] Stop passing :unique-name-fn as an option (#60663)
* [Lib] Stop passing `:unique-name-fn` as an option

* Add extra test

* Fix column order

* Test fixes and PR feedback

* Fix output schema

* Test fixes!!!

* Test fix?? 🔧

* Fix file order

* Test fix

* Revert accidental e2e changes
2025-07-09 16:41:29 -07:00
bryan
11c45ea42d add docs png image optimizer workflow (#60581)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-09 23:09:17 +00:00
Chris Truter
9e6b48ee34 Fix permission check for SQL actions acting on another db (#60705) 2025-07-09 22:17:01 +00:00
Alex Yarosh
68e905aff8 docs: move embedding auth flow article to docs (#60674)
* move authflow to docs

* link maintaining
2025-07-09 21:28:46 +00:00
Uladzimir Havenchyk
fb529d6a26 deps: fix critical alert re pbkdf2 (#60685)
* deps: fix critial alert re pbkdf2

* deduplicate crypto-browserify
2025-07-09 21:11:45 +00:00
Aleksandr Lesnenko
8db1213e52 improve heading mapping ui empty state (#60424) 2025-07-09 20:34:14 +00:00
Fraser
a9d032bd40 ADM-1154 make form text inputs non-bold (#60667)
* Make FormTextArea and FormTextInput non-bold
2025-07-10 08:23:52 +12:00
Alex Yarosh
bb20b7ed53 docs: clarify export limit (#60730)
* Update exporting-results.md

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-07-09 15:26:27 -04:00
Anton Kulyk
d265195f5e Add filter collapsing logic to question dashboard cards (#60566)
* Extract `useResponsiveParameterList` hook

* Extract `CollapsibleDashboardParameterList`

* Type `getComputedSettingsForSeries`

* Extract `cardTitle`

* Extract dashcard title font style constants

* Use collapsible filter list for dashcards

* Fix flaky collapsing point check

* Add visual tests

* Add screenshots

* Fix e2e tests

* Fix card overflow

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-09 17:48:59 +01:00
Tyler Plude
21cc70fa01 Change 'Inner Ring' label to 'Breakout' for single dimension (#58723)
* Change 'Inner Ring' label to 'Breakout' for single dimension

* fix type errors
2025-07-09 10:19:20 -06:00
Kamil Mielnik
693126716b Fix flaky dashboard filters test (#60711) 2025-07-09 17:46:51 +02:00
Ryan Laurie
e85832d6a6 trigger the rest of required jobs on merge queue (#60716) 2025-07-09 09:46:08 -06:00
Nemanja Glumac
d64b9f2593 Replace database selection in setup with a new component (#60511) 2025-07-09 17:25:19 +02:00
Ryan Laurie
fdde8c1b79 run tests for merge queue (#60712) 2025-07-09 08:52:50 -06:00
Romeo Van Snick
1ac679ff90 Add repro for "Custom column that only references a table column creates all sorts of problems" (#60692)
* Add repro for #25189

* Also check that table renders
2025-07-09 14:48:43 +00:00
Romeo Van Snick
b721834025 Add repro for "Custom Expression can fail query when mixing numeric and string functions" (#60691)
* Add clickDone to enterCustomColumnDetails helper

* Add repro for metabase#12938

* Add test case for other repro in issue
2025-07-09 16:22:22 +02:00
Nemanja Glumac
02ea8ebfd2 Remove branding link from Slack notifications (#60277)
We have to remove the link altogether because we can't stop it from unfurling.
2025-07-09 15:54:16 +02:00
Alex Yarosh
be7de15ac5 docs: subscription attachments (#60673)
* Update settings.clj

* subscription attachment docs
2025-07-09 09:52:58 -04:00
Jacob Joseph
236d8de1ba Update ssh-tunnel.md (#60697)
Added a note about best practice for security and IP Whitelisting link
2025-07-09 13:31:16 +00:00
Alexander Polyankin
6514e2921c Add a repro test for 39033 (#60670) 2025-07-09 09:09:08 -04:00
Alexander Polyankin
3d241f9c9e Repro for "Models that contain Joins to the Same Table Multiple Times fail when Model Metadata is Edited" (#60671) 2025-07-09 09:08:56 -04:00
Oisin Coveney
b1cc2fb7ec Make namespaced components consistent in core and SDK (#60639) 2025-07-09 15:40:29 +03:00
Mahatthana (Kelvin) Nomsawadi
5dbb3648cf Fix typedoc help message typo (#60687) 2025-07-09 11:45:47 +01:00
dpsutton
cd647eb242 use :role on connection details for sqlserver (#60678)
* use :role on connection details for sqlserver

* empty commit to retrigger CI with team/Drivers label for driver test

* fixup test
2025-07-09 05:44:40 -04:00
Nicola Mometto
21ff1a58ea infer only one column to be entity name (#60492)
* typo

* infer only one column per table to be entity name

* tests

* fix: test

* note

* fix: don't lose other classification results!

* regr test

* use count

* more tests

* fix: only consider active fields!

* also consider visibility_type

* perf: select only if needed

* style: reduce without atom

* style: cleaner
2025-07-09 09:39:21 +01:00
Sébastien
91f9e8db22 Closes VIZ-1204 VIZ-1205 error state when removing columns and switching viz (#60543)
* Closes VIZ-1204 error state when removing columns and switching viz

* Closes VIZ-1205 ambiguous state for funnel when coming from pie
2025-07-09 08:49:00 +02:00
Kamil Mielnik
3307281472 Up-level admin metadata editing (#57325)
* SEM-239 Data model - Layout boilerplate (#57174)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* SEM-240 Data model - Table section (#57248)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Fix flaky unit tests

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* SEM-241 Data model - Field - Data section (#57420)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Simplify color

* Use type instead of interface

* SEM-297 Drop entity framework usage in `SemanticTypePicker` (#57531)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Drop entity framework in FkTargetPicker

* Make table names show up

* Clean up

* Fix types

* Fix table names

* Add tests

* Add tests

* Add tests

* Restrict imports

* Improve config

* Restrict entity framework imports

* Simplify color

* Use type instead of interface

* Lint

* SEM-267 Data model - Field - Metadata section (#57527)

* Add route and link

* Convert DataModelApp to TypeScript

* Use DataModelApp in DataModel

* Keep all routes

* Extract section components

* Add empty states

* Use ts-pattern

* Drop ts-pattern

* Disable preview

* Rename

* Add border

* Move page components to their own dirs

* Add table fetching

* Add NameDescriptionInput boilerplate

* Update table on blur

* Fix focus state and prevent empty names

* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271

* Style the Switch

* Move FieldOrderPicker

* Move SortableField

* Move NameDescriptionInput

* Make NameDescriptionInput more generic

* Use FieldOrderPicker

* Rename

* Move label into TableVisibilityInput

* Add missing return

* Add FieldOrder

* Get rid of entity framework workarounds

* Add TODO comment

* Make header sticky

* Sort

* Add field scanning section

* Discard + rescan

* Remove todo

* Remove TableVisibilityInput

* Rename FieldOrder to SortableFieldList and move it to metadata/components

* Implement getFieldIcon boilerplate

* Do not use metabase-lib/v1

* Extract tableFieldToColumnMetadata

* Fix focus state being cut off

* Extract RescanFieldsButton, add error and success states

* Extract DiscardFieldValuesButton

* Rename

* Move to metadata/components

* Style name/description input

* Add missing ttag

* Add NameDescriptionInput tests

* Add more tests

* Organize tests

* Add tests

* Add DiscardTableFieldValuesButton tests

* Add test

* Add RescanTableFieldsButton tests

* Lint colors

* Add tests for getItems

* Add tests for getFieldIcon

* Update comment

* Update test names

* Add missing effect

* Add missing effect

* Navigation onClick

* Fix flaky unit tests

* Use a link

* Explain cast

* Improve url generation

* Style active link

* Load field, display name

* Sticky header

* Add SectionPill

* Add field name and data type

* Add cast toggle

* Add CoercionStrategyPicker

* Remove getFieldIcon

* Extract TextInputBlurChange

* Update comment

* Casting toggle state sync

* CoercionStrategyPicker error state

* Extract FieldDataSection

* Reuse existing TextInputBlurChange

* Further cleanup

* Use key for FieldSection

* Lift data fetching

* Add decoration

* Use key for table as well

* Add unit tests

* Add unit tests

* Add unit tests

* Add comments

* Add Metadata section with display name input

* Pass table through components

* Drop entity framework in FkTargetPicker

* Revert "Pass table through components"

This reverts commit 2eb3e3a256.

* Make table names show up

* Clean up

* Fix types

* Fix table names

* Add tests

* Add tests

* Add tests

* Restrict imports

* Improve config

* Restrict entity framework imports

* Simplify color

* Use type instead of interface

* Use SemanticTypeAndTargetPicker in FieldSection

* Sort

* Lint

* Typing

* Do not use v1/metadata wrapper

* Add TextareaBlurChange

* Add description input

* Update comments

* Update icon

* Add plugin query props

* Remove redundant prop

* Remove redundant _.omit

* Fix textarea crashing due to min height on input

* Set minRows

* Fix styling

* Remove PLUGIN_FEATURE_LEVEL_PERMISSIONS plugin usage from DatasetFieldMetadataFkTargetPicker
- because that's not how it works in master

* Drop -v2 suffix for new routes, use -v1 suffix for old routes (#57637)

* SEM-242 Data model - Field - Behavior section (#57638)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Clean up timeouts on unmount

* Improve typing

* SEM-269 Data model - Field - Formatting section (#57682)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Add FormattingSection

* Sort

* Make formatting form full width

* Use style prop instead of maxWidth

* Clean up timeouts on unmount

* Improve typing

* Metadata preview boilerplate (#58015)

* Render preview

* Add preview type selector

* Fix flex layout

* Lift preview type to top component to keep the state

* Move helpers to utils

* Add unit tests for preview picker

* Add feedback to metadata editor when saving config (#58038)

* Add feedback to all table and field settings

* Add missing prop

* Metadata table and detail preview (#57887)

* Handle undefined metadata

* Render Table preview

* Add custom error component

* Add helper for error message

* Add detail preview

* Make comment more clear

* Fix type

* Fix missing props

* Metadata table picker (#57648)

* Set up TablePicker component

* Fix type in api

* Add initial TablePicker implementation

* Add schema icon

* Update url for datapicker

* Move data loading to utils

* Add loading node types

* Derive icon from type

* Try building the treepicker state asynchronously

* Build custom tree

* Add loading state

* Push url state in picker

* Sync open state with url

* Use helper to manage expanded state

* Split Node into separate file

* Expose prefetch hook

* Prefetch data to avoid showing loading states

* Add search to table picker

* Move search-related stuff into Search module

* Use Link for navigation

* Add renderLoading helper

* Remove unused prop

* Make search input sticky

* Add separate sidebar for field picker

* Render single schema but open it by default

* Translate errors

* Defer search value

* Export lazy loaders for database info

* Use top-level data fetching

* Enable virtualization

* Move loader utils into utils

* Remove Node implementation

* Simplify styles

* Pull out some logic

* Reuse results in search

* Reuse tree helpers when handling search results

* Avoid passing down isExpanded

* Memoize

* Fix initial expanded state

* Automatically expand single-schema databases

* Pass tableId to DataPicker

* Add styling for active item

* Add getUrl helper for tree nodes

* Move types to separate file

* Simplify item

* Rename Item to Results

* Simplify

* Allow wrapping everywhere

* Add loading state

* Render tracks

* Remove unused colors

* Scroll active item into view

* Fix paths

* Add missing keys

* Handle browser navigation in table picker

* Handle browser navigation in table picker

* Add more documentation

* Debounce search

* Render track even when no parent was found

* Allow rendering urls to schema's with no name

* Add value to loading nodes

* Add delay to track too

* Add explicit level to FlatItem

* Add explicit parent refence to FlatItem

* Hide nameless schemas in the tree

* Refactor

* Move key to top-level item

* Make TablePicker not depend on router

* Disable smooth scroll

* Add unit tests for TablePicker

* Unnest unnamed schemas directly

* Also fetch tables when only one schema exists

* Remeasure items when they change

* Use more precise typeing for items

* Allow clicking table nodes in search results

* Remove unused classes

* Remove unused useDispatch hook

* Remove delay on loading items

* Add custom empty state

* Typo

* Add keyboard navigation to table picker

* Use test helpers in all tests

* Add keyboard navigation to search results too

* Add custom focus state for search items

* Add unit tests for search

* Jump to parent when pressing left arrow

* Add more cases to keyboard test

* Add hover state to table picker

* Use table display name in table picker

* Flatten single schema in to database

* Rename onChange_ to handleChange

* Use folder for schema

* Make the hover and active colors the same

* Rename Data tab to Data Model

* Remove title

* Fix layout

* Field description editor (#58280)

* Use NameDescriptionInput for the field section too

* Use TextArea for description editor

* Post-merge fixes

* Metadata editing UI tweaks (#58297)

* Add background to fields

* Tweak colors for disabled inputs

* Remove icons in SectionPill

* Remove icon from one more SectionPill

* Remove lint

* Move segments to table picker (#58422)

* Add link to segments in the datamodel sidebar

* Add local state to RouterTablePicker

* Nest segments under DataModel

* Add wrapper classes to revision routes

* Fix spacing for empty state

* Add active state to segments link

* Remove DataModelApp in DataModel routes

* Fix overflow in segment form

* Merge translation strings

* Add background color to segments components

* SEM-363 Data model - Field and table name/description inputs should be sticky and have icons (#58703)

* Remove hover/focus effect and break components down into files

* Update comment

* Consolidate toasts

* Remove unused styles

* Remove redundant card

* Extract SegmentsLink

* Make name/description input sticky

* Add icons

* Remove leftovers

* Fix TS error

* Move visibility toggles to the table picker (#58284)

* Fetch hidden tables

* Fetch hidden schemas

* Add visibility toggles to the table picker

* Remove table visibility toggle in table section

* Simplify visibility toggler

* Move visibility toggle to separate file

* Add unit tests for visibility toggle

* Show table as hidden whenever there is any visibility

* Use ActionIcon

* Break up onClick handler

* Use plan Icon

* Remove data from nodes that don't need it

* Add tooltips to table visibility togglers

* Wrap icons in ActionIcon

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Cleanup

* SEM-361 Data model - Field metadata/formatting settings do not affect the preview (#58841)

* Fix SEM-361

* Fix types

* SEM-311 Table preview - no impact when changing time formatting for seconds and ms (#58927)

* Avoid using a breakout for date-time columns

* Use the same logic for every type of field

* SEM-246 Data model - Filtering preview (#58854)

* Fix SEM-361

* Fix types

* Add FilteringPreview boilerplate

* Use FilterPickerBody

* Another attempt

* Make it work for all types of filters

* Memoize query

* Clear filter input on field change

* Account for prop changes

* Fix TS error

* SEM-268 Data model - Field - Behavior section - Display values (#57684)

* Drop -v2 suffix for new routes, use -v1 suffix for old routes

* Move FieldVisibilityPicker

* Make FieldVisibilityPicker work with api Field

* Use FieldVisibilityType

* Fix gap

* Update tests

* Add label and description

* Add FieldValuesTypePicker

* Add canUnfoldJson and hasDatabaseFeature

* Rename

* Add UnfoldJsonPicker

* Fix typing

* Add RescanFieldButton

* Add DiscardFieldValuesButton

* Style the connector

* Fix scrolling

* Update spacing

* Add tests for FieldValuesTypePicker

* Add tests

* Add UnfoldJsonPicker tests

* Add tests

* Add tests

* Add placeholder

* Add RemappingPicker boilerplate

* Clean up timeouts on unmount

* Improve typing

* Add onChange logic boilerplate

* Extract DisplayValuesPicker

* Remove redundant code

* Format code

* Add fk input boilerplate

* Disable options instead of hiding them

* Rename

* Fetch required data

* Use full data

* Implement fk remapping onChange

* Implement naming tip

* Fix state

* Extract utils

* Fix schema step errors

* Add remappings boilerplate

* Fetch remappings

* Add more modal boilerplate

* Add modal props

* Handle modal state

* Add explicit edit button

* Implement modal form

* Limit amount of Boxes

* Bring all safety checks back in

* Refactor CustomMappingModal

* Style CustomMappingModal

* Extract getHasEmptyValues

* Remove todo

* Prevent flicker

* Fix initial state of fk picker

* Use is touched

* Add CustomMappingModal unit tests

* Add DisplayValuesPicker unit tests

* Move DisplayValuesPicker

* Remove redundant tags

* Fix uncontrolled/controller input react warning

* Add explanatory tooltips for disabled options

* Fix 1px of background leaking into view

* Add missing memoization

* Reset state when cancelling

* Sync single table via UI (#58342)

* add table-manual-sync event

* add table/sync_schema endpoint

* add table sync test

* Add api helper for the sync table schema endpoint

* Add SyncTableSchemaButton component

* Add SyncTableSchemaButton to table section

* Add unit tests for SyncTableSchemaButton

* Also invalidate field-values and parameter-values

* Simplify SyncTableSchemaButton hooks

* Move useTemporaryState into a separate hook

* Apply same pattern in all buttons

* address PR review comments: use `get-database`, `with-database-routing-off`

* Pass argument to useTemporaryState

* update test

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* Fix SEM-370 (#59051)

* Post-merge conflict fix

* SEM-329 Data model - Table section - Update fields sorting interaction (#59316)

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Pixel-perfect

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* SEM-376 Data model - Resizable columns layout (#59100)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* SEM-327 Data model - Move the re-scan / discard options away from the bottom of the fields list (#59474)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* SyncOptionsModal

* Move

* Field values modal

* Responsiveness

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* Tmp

* Revert "Tmp"

This reverts commit 6e561c0de7.

* SEM-424 Tests parity - datamodel.cy.spec.js (#59548)

* Format code

* Prevent updates when nothing changes

* Use new colors

* Make nav resizable

* Fix nav width

* Remove unused styles

* Prevent CLS in SortableList

* Add comment

* Get rid of second page component

* Make table column resizable

* Add padding and min width for the empty state

* Optimize

* Extract ResizableColumn

* Toggle preview

* Add preview and field resizing

* Extract getTableMetadataQuery

* Preview positioning and shadow

* Show scrollbar on preview overflow

* Fix resizing bounds

* Remove redundant props

* Handle Escape key

* Add comment

* Update default constraints

* Make preview non-resizable

* Fix valid Escape press detection

* Fix types

* Add support for size="sm" in SegmentedControl

* Add field sorting interaction boilerplate

* Update FieldOrderPicker to use SegmentedControl

* Extract Label component

* Update tooltips

* Update sortable field

* Rename SortableField to SortableFieldItem

* Render field list

* Align styling

* Use rem, remove Link from SortableFieldItem

* Styling

* Use field prop

* Background styling

* Fix TS error

* Editable name and description

* Watch out for error

* Allow overriding default props in EditableText

* Fix a11y

* A11y

* Prevent overflow

* Styling

* Cleanup

* Update comment

* Fixes

* Update label and hide it in sorting mode

* Update spacing

* Avoid CLS when entering sorting mode

* Auto-grow table column when possible

* Auto-magic layout

* Fix sign

* Optimize

* Optimize

* Pixel-perfect

* SyncOptionsModal

* Move

* Field values modal

* Responsiveness

* Use ellipsis on overflow

* Fix colors

* Fix name input size

* Fix description patching

* Style selected state

* Do not use EditableText for description input, add resetOnEsc prop

* Port test

* Fix typing

* Port test

* Port tests

* Format code, add data-testid

* Port more tests

* Refactor withDatabase to TypeScript

* Await

* Fix prop handling

* Port test

* Memoize textarea for performance

* Port test

* Port tests

* Remove unlawful getFieldDisplayName usages

* ESLint

* Add JSDoc

* Port tests

* Port tests

* Format code

* Use flushSync instead of setTimeout

* Try to prevent event propagation

* Fix interactivity in inputs

* Fix interactivity in inputs

* Move memoization closer to component definition

* Tmp

* Revert "Tmp"

This reverts commit 6e561c0de7.

* Fix circular dependency

* Post-merge fix

* SEM-425 Tests parity - editor.cy.spec.js (#59838)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Simplify assertion

* SEM-426 Tests parity - reproductions.cy.spec.ts (#59970)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Simplify assertion

* SEM-427 Tests parity - remaining e2e suites (#59980)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Data model - Simple flex layout (#59995)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Try simple flex layout

* Update proportions

* Remove redundant elements

* Clean up

* Use ellipsis instead of wrapping

* Pixel perfect

* Tweak constants

* SEM-448 Tests parity - unit tests (#60042)

* Add DataModel helpers

* Update test

* Add waits

* Use schemaId in test helper

* Port tests

* Fix ids

* Add more helpers

* Use helpers

* Auto-open coercion picker, humanize coercion picker labels

* Update test

* Fix typing

* Fix data fetching

* Update tests

* Refactor

* Update tests

* Update helpers

* Update reproductions.cy.spec.ts

* Fix test

* Update test

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update test

* Update test

* Update tests

* Update tests

* Typo

* Update unit tests

* Remove encodeURIComponent

* Make it clear what is schemaName and schemaId

* Rename schemaId to schemaName in table picker

* Update unit tests

* Update unit tests

* Skip soon-to-be-ported unit tests

* Attempt to fix a test

* Update test

* Update unit test

* Update test

* Revert refetching

* Try simple flex layout

* Update proportions

* Remove redundant elements

* Clean up

* Use ellipsis instead of wrapping

* Pixel perfect

* Tweak constants

* Add data model unit tests boilerplate

* Optimistically remove TODOs

* Use router

* Fix element rendering in tests

* Add tests + fixes

* Port tests

* Port a test, fix a util

* Port test

* Port tests

* Port tests

* Remove old tests

* Port tests

* Remove old tests

* Port tests

* Remove old tests

* Fix disabling tables in search results

* Fix flakes

* Update tests

* Remove redundant check

* SEM-434 Missing metadata in FieldDataSelector (#60262)

* Manually override tables prop and add missing properties to Field objects
- Fixes SEM-434

* Format code

* Use field.display_name

* Memoize tables

* SEM-462 Small tweaks (#60187)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Fix events

* Use prop instead of CSS

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Add comments

* SEM-460 Show prefix for JSON-unfolded columns (#60328)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Add comments

* SEM-420 Organize e2e tests (#60379)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Move segments to a separate spec

* Organize tests

* Add comments

* SEM-420 Organize e2e tests (part 2) (#60388)

* SEM-436 Make field description input auto-grow indefinitely

* SEM-438 Update icons for tables and fields

* SEM-439 Remove the first column with dashes from the field values preview

* SEM-441 Align color scheme for left navbar and right-side panes

* SEM-440 Have a loader for the Detail view preview

* SEM-437 Sorting mode tweaks

* SEM-446 Chips as section headers feel off

* SEM-445 Revisit the read-only version of field ID and DB name

* Make shadows exactly like in figma

* SEM-457 Top-align text with icon for tables with long names

* Remove redundant selector

* Pixel perfect padding

* Fix 'draggable' prop not kicking in

* Fix tests

* Fix flakes

* Update tests

* Add spinner when toggling table visibility and using predefined sorting order

* Show prefix in FieldItem

* Show prefix in SortableFieldItem

* Fix events

* Handle ellipsis

* Show prefix in NameDescriptionInput

* Update tests

* Update types

* Use prop instead of CSS

* Improve responsiveness

* Revert "Use prop instead of CSS"

This reverts commit 74f76d1b99.

* Move segments to a separate spec

* Organize tests

* Move tests

* Move tests

* Add comments

* Merge tests

* Move tests

* Use modern selectors

* Move tests

* Move tests

* Reorder tests

* SEM-420 Test new features (e2e) (#60439)

* Add new tests, simplify toasts, remove long prefix from utils

* Test toasts

* Reuse utils

* Add table picker test for no schemas

* Fix schemaless tables not shown in search

* Add sync options test

* Fix & test prefixes

* Add logs

* Format code

* Coercion strategy test

* Add tests for visibility

* Update assertions

* Add test for tooltips

* Field values tests

* Add tests for filtering

* Add preview assertion

* Refactor preview verification

* Fix showing 403 error in preview

* Add preview tests

* Add preview assertions

* Add preview assertions

* Add preview assertions

* Add preview tests

* Move modals and state handling, add tests for Esc key

* Update unit tests

* Use useDisclosure

* Add extra error status check

* Revert unnecessary changes in cross-version tests

* SEM-419 Increase test coverage (unit tests) (#60491)

* Add new tests, simplify toasts, remove long prefix from utils

* Test toasts

* Reuse utils

* Add table picker test for no schemas

* Fix schemaless tables not shown in search

* Add sync options test

* Fix & test prefixes

* Add logs

* Format code

* Coercion strategy test

* Add tests for visibility

* Update assertions

* Add test for tooltips

* Field values tests

* Add tests for filtering

* Add preview assertion

* Refactor preview verification

* Fix showing 403 error in preview

* Add preview tests

* Add preview assertions

* Add preview assertions

* Add preview assertions

* Add preview tests

* Move modals and state handling, add tests for Esc key

* Update unit tests

* Add FieldOrderPicker unit tests

* Add CurrencyPicker unit tests

* Add FkTargetPicker unit tests

* Add more tests

* Add SemanticTypeAndTargetPicker unit tests

* Remove redundant code

* Move RemappingPicker

* Use useDisclosure

* Add extra error status check

* SEM-247 Clean up old Table Metadata page code (#60557)

* Remove old metadata page

* Move humanizeCoercionStrategy

* Remove unused functions

* Fix SEM-484 (#60600)

* Revert unnecessary change

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
2025-07-09 13:23:50 +07:00
Uladzimir Havenchyk
fddd24fc20 tests: drop old testing library (#60551)
* tests: drop old testing library

* use act in test
2025-07-09 05:54:13 +00:00
Vamsi Peri
d8e046e6c4 Fix for claude code container issue (#60677) 2025-07-08 21:09:48 -07:00
Vamsi Peri
afbf287b9b Claude code github workflow (#60675) 2025-07-08 22:13:48 -05:00
Vamsi Peri
dd31ae3c99 Fix SQL Server connection failure when login and database users differ (#60672)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-08 23:09:54 -04:00
Nemanja Glumac
a6ac68051b List all supported upload databases in a disclaimer/warning (#60627) 2025-07-09 00:23:39 +02:00
Brad Anderson
c16f89f373 Closes VIZ-195 - Bar chart data labels jump 1px on hover (#60215)
* VIZ-195 Updates getBarLabelLayout so it can be reused for the `seriesOption` and `labelOptions`
2025-07-08 15:35:02 -04:00
Alexander Polyankin
15e65fe228 Fix Lib.isNumeric check and get rid of the "MySQL hack" (#60653)
* Get rid of the MySQL number hack

* Get rid of the MySQL number hack

* Get rid of the MySQL number hack
2025-07-08 15:31:26 -04:00
Alexander Polyankin
93896cc32c Remove broken lib/aggregation-column (#60644) 2025-07-08 15:27:46 -04:00
Cam Saul
66994fde60 Fundamentally unbreak :lib/source (#60371)
* Fundamentally unbreak `:lib/source` (QUE-1375)

* Fix pivot QP

* Test fixes?? 🔧

* Un-deprecate the ident stuff

* PR feedback

* Appease Kondo

* Update Cypress e2e test
2025-07-08 11:11:34 -07:00
John Swanson
578c449fb1 Improve usage analytics without first/last name (#60408)
Users without a first or last name previously showed up in Usage
Analytics as `null`. This change just uses either the full name (if both
`first_name` and `last_name` are present), or whichever of those values
is not `null`.

[ADM-826: Users with First Name only don't show up in Usage Analytics](https://linear.app/metabase/issue/ADM-826/users-with-first-name-only-dont-show-up-in-usage-analytics)
2025-07-08 18:09:11 +00:00
Sloan Sparger
23243c4953 [Metabot] Only use visible timeline events when sending chart configs (#60467)
* only use visible timeline events when sending chart configs

* fix unit test
2025-07-08 11:17:57 -05:00
Sébastien
1783247861 Closes VIZ-1215 more space for pie wells (#60637) 2025-07-08 18:03:21 +02:00
Sébastien
9180bcffc4 Closes VIZ-1242 visualize another way copy (#60325)
* Closes VIZ-1242 visualize another way copy

* e2e

* e2e

* e2e

* fixed e2e
2025-07-08 18:02:21 +02:00
Riley Thompson
236b6a9f16 Delete bigquery datasets > 2 hours old (#60508)
* delete datasets > 2 hours old

* Add comment back
2025-07-08 10:48:56 -04:00
Brad Anderson
b11dc5b829 M1 of Improve the experience of slow loading cards in dashboards (#60564)
* Closes VIZ-1224 - Make dashcards use chart-specific skeletons (#60090)

* Updates Dashboard cards' loading state to use already-made chart-specific loading skeletons
* Adds SankeySkeleton
* Tweaks MapSkeleton so its fill color can be overridden
* Fixes double name issue in loading skeletons in pinned questions on collections page

* Closes VIZ-1230 - Trigger spinner state when card takes longer to load (#60359)
2025-07-08 10:26:04 -04:00
Alexander Polyankin
67c3b5b82d Chars composition fix (#60629) 2025-07-08 10:25:28 -04:00
Alexander Polyankin
4e626e44bf Add repro (#60570) 2025-07-08 13:58:32 +00:00
Alexander Polyankin
21eeee9d1d Add repro (#60574) 2025-07-08 09:46:32 -04:00
Oleksandr Solovyov
fd2f983e84 stop asking team workflows to review all migrations (#60628) 2025-07-08 15:27:35 +02:00
Alexander Polyankin
58ef36ab3c Add repro (#60589) 2025-07-08 13:00:46 +00:00
Fraser
cf575553bb Fix hover selector and add menu hover story (#60616) 2025-07-08 08:28:31 -03:00
Alexander Polyankin
f685a1ad7e Fix drill thru with multi-series dashcards (#60572)
* Fix drills with series

* Add a test
2025-07-08 06:17:15 -04:00
Alexander Polyankin
498d058f6a Fix MultiStageFilterPicker leaving the query with an empty stage (#60561)
* Fix MultiStageFilterPicker leaving the query with an empty stage

* Fix MultiStageFilterPicker leaving the query with an empty stage
2025-07-08 06:16:49 -04:00
Alexander Polyankin
c1bbd72109 Add repro (#60567) 2025-07-08 06:15:24 -04:00
Alexander Polyankin
48a235c45a Add repro (#60553) 2025-07-08 06:14:48 -04:00
Sébastien
a8e91c5bfd Fixed a type (#60598)
* Fixed type

* e2e

* e2e
2025-07-08 12:00:33 +02:00
Jakub Chodorowicz
66415b0ba6 Rename source param name to content (#60504)
* Rename source param name to content

* Rename source component paremeters to location
2025-07-08 10:40:09 +02:00
Mahatthana (Kelvin) Nomsawadi
7b1ac77db0 Remove beta message from the SDK readme, it's been GA for a while (#60591) 2025-07-08 07:53:55 +01:00
Sébastien
af7deb4b9c Closes VIZ-1218 reset button on data sources (#60123)
* Closes VIZ-1218 reset button on data sources

* resets to default only for single datasources cards

* e2e

* e2e

* removed TODO

* simpler

* disable reset btn when already pristine

* revert unnecessary changes to addDataSource
2025-07-08 08:51:58 +02:00
Alexander Polyankin
78f83e6c3c Add repro (#60573) 2025-07-07 18:57:03 -04:00
Alexander Polyankin
fdfe821815 Add repro (#60577) 2025-07-07 18:56:38 -04:00
Aleksandr Lesnenko
2fa6ea0c52 filters in dashcards tracking (#60517)
* filters in dashcards tracking

* update tracking according to spec
2025-07-07 21:07:54 +00:00
Jeff Bruemmer
2de2f8d732 docs - compress images (#60579)
* compress images

* more images
2025-07-07 20:11:10 +00:00
Aleksandr Lesnenko
8599574936 show active y-axis split lines on hover (#60238)
* show y-axis split line on hover

* fix axis split line visibility on hover

* review
2025-07-07 19:45:39 +00:00
Romeo Van Snick
a97d2d1c0d Preview native query with snippet (#60559)
* Allow previewing query that only has snippets

* Add e2e test
2025-07-07 19:30:12 +02:00
Romeo Van Snick
5f8b4e95eb [Integration] Column picker improvements (#60442)
* QUE-1370: Convert AccordionList to TypeScript (#59463)

* Convert AccordionList components to typescript

* Fix types for Select

* Fix types for FilterColumnPicker

* Fix types for QueryColumnPicker

* Fix types for FormSelect

* Fix types for DataSelector

* Fix types for data-picker

* Fix types for AggregationPicker

* Move types into types module

* Simplify searchProp

* Use default export

* Fix info icons always showing

* Remove unused --accordion-list-width

* Rename T for clarity

* Parametrise Section type too

* Fix default label renderer

* Fix missing props

* Avoid calling in on non-object items

* Simplify maxHeight prop

* Move fallbacks into AccordionListCell

* Move shared props to shared type

* Sort props

* Remove styled component for AccordionList

* Rename _list

* Fix itemIsSelected signature

* Simplify callback

* Fix searchFuzzy prop default

* Fix schema picker callback

* Fix aria-selected for tests

* Omit filter description

* Fix loading state

* Remove unused searchFuzzy prop

* Remove unused searchCaseInsensitive prop

* Remove unused hideEmptySectionsInSearch prop

* Reduce this.props usage

* Do not pass aria-expanded to non-expandable items

* Rename AccordionList.unit.spec to tsx

* Remove get and use type guards

* Remove unused cast

* Rename ListItem to Item

* Avoid silly x variable name

* Fix incorrect base type for Item

* Define Item type

* QUE-1359: Add highlight when item has cursor (#59622)

* Add highlight when item has cursor

* Add repro

* Use _.times

* Test using computed style

* Use Cypress._

* QUE-1360: scroll selected item into view (#59617)

* Scroll items into view when selected

* Add e2e test for scrolling items into view

* QUE-1361: Allow using table in search and add fuzzy search (#59693)

* Flatten getRowsCached into getRows

* Use method directly in checkSectionHasItemsMatchingSearch

* Build search index when props change

* Memoize the fuse index

* Add fuzzySearch props to AccordionList

* Enable fuzzy search in Filter and Aggregation picker

* Add unit tests for fuzzy search

* Add fallback for searchProp

* Remove unused variable

* Use shallow equality for memoization

* Remove this.state

* Add tableName and tableDisplayName to filter picker search props

* Strictly type searchProp

* Fix type of default search prop

* Do not include results with bad score

* Search by custom property

* Avoid O(n²) search

* Lower the score

* Fix types in test

* Memoize search

* Pull out isSearching

* Sort results by score

* Export SearchProp types

* Coerce default search props

* Use SearchProp types in Select

* Move itemScore and sectionScore to utils

* Remove search state from state

* Simplify initial cursor method

* Fix cursor logic for sorted items

* Add comment on why a custom memoize function is needed

* Fix unit tests

* Add forwardRef back to AccordionListCell

* Make ref dependency explicit

* Fix broken merge

* Correctly move cursor through rows

* Move searchFilter into getRows

* Fix missing rows

* Lower the search threshold

* Always show section when it has a type

* Move searchThreshold to constant

* Use includes

* Remove unused type fields

* Rename index.js to index.ts

* Refactor search

* Fix types

* Simplify ItemScores

* Allow customizing threshold in strategy

* Enable fuzzy search for query column picker

* Fix substring search

* QUE-1363: Custom expression fallback (#59992)

* Add clausesForMode helper

* Add custom expressions to filter picker

* Do not require helpText for snippets

* Remove helpText arguments from expression completions

* Export expressionClauseSnippet helper

* Allow opening expression editor with custom clause snippet

* Pass expression clause to custom expression editor

* Fix types

* Add onSearchTextChange to Accordionlist

* Select expression clause when typing (

* Only show expression clauses while searching

* Always sort expression clauses last

* Remove reportTimezone arg where no longer needed

* Add expression functions to aggregation picker

* Import underscore as _

* Rename filter

* QUE-1414: Fuzzy search tests (#60257)

* Add test for fuzzy matching in filter popover

* Add tests for picking custom expression in the filter picker

* Add test for selecting expression in aggregation picker

* Add test for selecting items in AccordionList while searching

* Verify that typing non-existing clause does nothing

* Typo

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* QUE-1468: Sticky search in AccordionList (#60190)

* Make the search bar floating

* Remove overflow override

* Correctly set width

* Pass width as direct prop

* Use sticky modifier

* Make search sticky in virtualized list

* Add scroll padding for search bar

* Do not scroll searchbar into view

* Use scrollIntoView vs scrollTo

* Pass maxHeight to scroll container directly

* Remove scrollTo in tests

* Use correct scrolling container

* Remove duplicate sticky style

* Unwrap accordionpicker

* QUE-1413: Colum completion prefix (#59921)

* Allow searching by table name in custom expression completions

* More strictly filter results

* Fix unit tests

* Also disable filter on functions

* Fix unit tests

* Add lower weight to displayLabelWithTable

* Fix e2e tests

* Fix e2e test

* Use display value from longest match

* Copy indices to avoid readonly error

* Fix e2e test

* Preserve option identity

* Use first match to render

* Undo e2e test changes

* Fix e2e test

* Allow matching columns names via long display name too

* Use displayLabel

* Increase score threshold

* Fix unit tests

* Remove missing key error

* Memoize fuzzyMatcher

* Fix e2e test

* QUE-1518: join picker custom search (#60493)

* Allow searching by table name in QueryColumnPicker

* Fix scroll on QueryColumnPicker

* Add custom expressions to join column picker

* Allow selecting expression with ( in QueryColumnPicker

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-07-07 15:53:48 +00:00
Brad Anderson
6d7524138a Closes VIZ-1248 - Update Dashboard tabs so bottom border is full width (#60470)
* VIZ-1248 Tweaks dashboard tabs bottom border (per Product feedback)
* VIZ-1248 Tweaks dashboard tabs scroll arrows so they don't overlap with tab bottom border
* VIZ-1248 Tweaks dashboard tabs bottom border so it shows up on fullscreen mode but not full width
* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-07 11:41:30 -04:00
Ryan Laurie
a793753415 🧹 Remove deprecated date inputs (#60414)
* Remove deprecated date inputs

* fix tz

* design updates

* update tests
2025-07-07 09:34:40 -06:00
Alexander Polyankin
20fb8601f6 Repro for "Query builder SQL references wrong column in outermost WHERE clause" (#60548) 2025-07-07 14:55:36 +00:00
Edward Paget
790d221d1f fix: optionally add can_run_adhoc_query in items (#60021)
* fix: optionally add can_run_adhoc_query in items

Allow the can_run_adhoc_query parameter to be optionally included in the
collection items response, so that targets that are not valid for ad hoc
queries can be removed from the picker in the UI.

* split up large test
2025-07-07 09:30:58 -05:00
Romeo Van Snick
ae79ee4e32 Do not show error when snippet is active (#60445)
* Do not show error when snippet is active

* Add test for hiding errors while snippet is visible

* Also suppress error underline when snippet is active
2025-07-07 15:15:23 +02:00
Nemanja Glumac
b484fc93ed Redesign a database connection string toggle UI (#60520) 2025-07-07 15:09:37 +02:00
Sébastien
a5880551f8 Closes VIZ-1214: improve feedback on areas where columns can be dragged onto (#60281)
* vertical cartesian well -> ok

* put the logic in a hook and handled hortizontal well

* added unit tests and handled other types of wells

* reorg and style

* css tweak

* Closes VIZ-1244 Wells light up upon dragging on them, even if the column won't map

* no outline

* Closes VIZ-1216 bubble size well style (#60380)

* fixes wrong drag overlay

* much better fix for draggig overlay

* tpyo

* removed useless cast

* removed comment

* refactored test
2025-07-07 12:57:49 +02:00
Timofey Kachalov
0614a03ea2 Fix PortalContainer to respect SDK styles (#60496) 2025-07-07 13:36:38 +04:00
Nicolò Pretto
dccd4f970e fix(sdk): use supbath for /auth/sso http call (#60488) 2025-07-07 09:34:07 +00:00
Sébastien
b5c789acf0 Closes VIZ-1208: smarter detection of selected columns (#60338)
* Closes VIZ-1208: smarter detection of selected columns

* no breakout when more than one metric

* no breakdown when more than 1 metric if new col is not date

* combo _is_ cartesian
2025-07-07 11:09:31 +02:00
Ngoc Khuat
e587fa357d Fix v_alerts cron syntax error with / (slash) (#60482) 2025-07-07 09:07:22 +00:00
Sébastien
bdeca87a47 Close VIZ-967 Adding Click Behavior to a Column with a Prefix Causes Strange Formatting (#60490) 2025-07-07 09:51:02 +02:00
Phoomparin Mano
efef12dbb0 fix(sdk): make isEmbeddingSdk consistent on new iframe embed using singletons (#60349) 2025-07-07 14:32:07 +07:00
Fraser
02da4ebccc Fix inconsistent header button styles (#60108)
* Fix inconsistent editor button styles
2025-07-07 12:52:15 +12:00
Oleksandr Yakushev
0ef0f93644 [cljs] Introduce match-lite to reduce CLJS bundle size (#59421)
* [m.lib.fe-util] Introduce match-lite to reduce CLJS bundle size

* [m.lib.filter] Replace match-one with match-lite

* [m.lib.remove-replace] Replace match-one with match-lite

* Replace match-one with match-lite on all CLJC files
2025-07-06 23:41:36 +03:00
metamben
76fd1bfb52 Add repro test for #33972 (#60515)
Closes #33972
2025-07-04 23:43:22 +00:00
metamben
52fd7f457c Add repro test for #51856 (#60513)
Closes #51856
2025-07-04 21:45:08 +00:00
metamben
b1401f1a5a Add repro test for #40061 (#60507)
Closes #40061
2025-07-04 23:51:58 +03:00
Aleksandr Lesnenko
de37711918 fix question caching key in dashboard selectors (#60476) 2025-07-04 16:36:59 -04:00
Aleksandr Lesnenko
5e40b0d589 adjust inline filters popover position (#60425) 2025-07-04 20:17:47 +00:00
Oleksandr Yakushev
07267954f1 perf: Optimize remove-empty-clauses (#60461) 2025-07-04 20:16:52 +00:00
Oleksandr Yakushev
4cd5ac3743 [malli] Don't instrument multimethods when instrumentation is disabled (#60458)
* [malli] Don't munge function names when instrumentation is disabled

* [malli] Don't instrument multimethods when instrumentation is disabled
2025-07-04 21:56:15 +03:00
Anton Kulyk
bf06c662eb Fix flaky test (#60494) 2025-07-04 14:33:03 -04:00
Phoomparin Mano
9ab71b7283 chore(sdk): skip flaky test (#60495) 2025-07-04 16:24:39 +00:00
Alexander Polyankin
6acc4b0e86 Unskip repro 40635 (#60453) 2025-07-04 07:39:53 -04:00
Nemanja Glumac
c8e9ccae66 Add data (csv, db, gsheets) via the "Add data" modal (#60330)
* Introduce the option to add data from the sidebar via "Add data" modal  (#58408)

* Add CSV panel to the "Add data" modal (#59008)

* Add Metabase storage upsell to upload CSV panel (#59901)

* Add unit test coverage for the missing collection utils (#59902)

* Consolidate analytics around databases, CSV uploads and Google Sheets (#59996)

* Add Google Sheets management tab to the _Add data_ modal (#59905)
2025-07-04 13:24:41 +02:00
Timofey Kachalov
89dd4a6db2 sdk(fix): Render legacy popover within the proper portal container for the SDK (#60126) 2025-07-04 14:57:48 +04:00
Fraser
98e2dcc7c8 Update license text for airgap tokens (#60373)
* Add description for airgap tokens
2025-07-04 20:56:00 +12:00
Nemanja Glumac
148bd23161 fix(sdk)!: Remove deprecated + unused QuestionEditor and ModifyQuestion(#60374) 2025-07-04 15:32:13 +07:00
Mahatthana (Kelvin) Nomsawadi
68549e8664 fix(sdk): fix popovers can't be rendered inside modals (#60431)
* Fix popovers can't be rendered inside modals

* Fix wrapped tooltips
2025-07-04 07:21:05 +01:00
Sébastien
8adc64a632 Closes VIZ-1209 browser stalls when too many series in visualizer (#60385) 2025-07-04 07:11:08 +02:00
Sébastien
1ea95981bf Closes VIZ-1206 some settings are not preserved when changing to funnel (#60438) 2025-07-04 07:11:01 +02:00
appleby
00a24143f0 Fix join condition compilation on mongo when rhs is a literal value (#60457) 2025-07-03 17:49:15 -07:00
metamben
5feeb16ab7 Add repro test for #12679 (#60473)
Closes #12679
2025-07-04 01:15:19 +03:00
Ryan Laurie
34965e0fcb mark parameter test flaky (#60469) 2025-07-03 20:34:00 +00:00
John Swanson
7c39ff2fbe Fix a couple flaky tests (#60409)
* remove stray `t2/debug`

* fix flaky notification send test

another thread was responsible for popping off the queue so there was a
race condition here.

* fix flaky test for not calling DB

i feel bad about this but this seems to be a reasonable solution given
the situation.

Any endpoint that gets some setting inside it might emit an extra SQL
query or two. So we can't reliably check to see whether hitting a given
endpoint hits the DB.

What we can do is hit it a few times and make sure one of those times
didn't hit the DB. Which is silly... but yeah.
2025-07-03 20:17:16 +00:00
Ryan Laurie
7f724d65b0 🧹 Remove ButtonWithStatus (#60402)
* remove ButtonWithStatus

* fix button label

* e2e test update

* add intercept
2025-07-03 20:16:27 +00:00
Ryan Laurie
4c6ebf7d58 Refactor Browse Databases (#60157)
* Browse DBs WIP

* update browse card styles

* fix tests

* better markup

* brand color text
2025-07-03 13:45:23 -06:00
Alexander Polyankin
63466c8a41 [Integration branch] Make joins with custom expressions (#60036) 2025-07-03 14:47:00 -04:00
Ryan Laurie
997806cad5 Don't use hyphens in token features 😁 (#60273)
* use underscores for token features

* update tests

* fix backend test
2025-07-03 12:34:53 -06:00
dpsutton
a5c3bec1fa Swap over to mysql's images for 8.0 (#60446)
Tests fail in CI which try to set timezones in mysql to "alias" types:
'US/Pacific', etc

```
❯ grep "Failed to set timezone" test-log_formatted.json | jq -r '.message'
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Eastern' for :mysql database
Failed to set timezone 'US/Hawaii' for :mysql database
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Pacific' for :mysql database
Failed to set timezone 'US/Eastern' for :mysql database
```

on mysql image from circle CI:

```
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2025-07-03 02:00:48 |
+---------------------+
1 row in set (0.01 sec)

mysql> SET @@session.time_zone = "US/Pacific";
ERROR 1298 (HY000): Unknown or incorrect time zone: 'US/Pacific'
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2025-07-03 02:10:25 |
+---------------------+
1 row in set (0.01 sec)
```

on mysql's official image for 8.0:

```
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2025-07-03 13:51:36 |
+---------------------+
1 row in set (0.00 sec)

mysql> SET @@session.time_zone = "US/Pacific";
Query OK, 0 rows affected (0.00 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2025-07-03 06:51:41 |
+---------------------+
1 row in set (0.01 sec)
```

This happened because circle ci bumped the base image to ubuntu 22 in
511bd63787
and this has different timezone information.

Here's timezone data in their 8.0.32 image

```
ls -l /usr/share/zoneinfo/US/Pacific
lrwxrwxrwx 1 root root 22 Feb 14 21:25 /usr/share/zoneinfo/US/Pacific -> ../America/Los_Angeles
```

and in 8.0.42 (alias to latest 8.0 at time of writing)

```
ls -l /usr/share/zoneinfo/US/Pacific
/usr/bin/ls: cannot access '/usr/share/zoneinfo/US/Pacific': No such file or directory
```

Mysql's official images still have these legacy timezone aliases
2025-07-03 10:17:06 -05:00
Anton Kulyk
ababaeaa40 Improve heading filters collapsing logic (#60271)
* Support refs in parameter list components

* Rework heading element size checks

* Extract constants

* Add visual tests

* Fix e2e tests

* Add screenshots

* Revert "Fix e2e tests"

This reverts commit df4661a4a2.

* Fix e2e tests

* Remove not used ref

* Update Loki Snapshots

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-03 16:04:58 +01:00
Timothy S. Dean
9e2c462c09 Make mu/fn safe for cljs (#60299)
The mu/fn macro produces instrumented code, whose tail catches java.lang.Exception to clean up their stacktraces. This is obviously not possible in clojurescript. This adjusts the code to detect whether or not it's compiling for Clojurescript or Clojure and tweak the expansion appropriately.
2025-07-03 08:14:14 -06:00
Ryan Laurie
d80b0f7cb5 remove unused test helper (#60398) 2025-07-03 07:53:50 -06:00
Ryan Laurie
03a090e3fa move archiveCollectionModal (#60399) 2025-07-03 07:38:39 -06:00
Jakub Chodorowicz
1aecbe45ea Makes upsells dismissible (#60332)
* Enhance UpsellBanner component with dismissable feature

* Add dismissable functionality to Upsell components and update UpsellBanner integration

* Refactor UpsellWrapperDismissable to improve props handling and update UpsellBanner integration

* Refactor close icon and add tests

* Improve dismissible typing

* Adjust Banner text styling

* Add missing mocks

* Change the property to dismissible
2025-07-03 12:32:45 +02:00
Romeo Van Snick
dd8d9aaee6 Only bind ctrl-f to search on windows (#60429) 2025-07-03 11:41:24 +02:00
Nicola Mometto
0ff434acce Reduce memory pressure during BigQuery sync (#59683)
* lazier bigq describe-table

* lazier even, with one query per table

* group by in sql

* fix tests

* use by-key in sync-fields

* style

* lazier

* style

* fix completing

* batch describe

* error safe

* use information-schema

* higher default

* pre-filtering on bigq

* add reducible test

* reinstate explicit sorting, we're eager in there anyway

* bigger!

* add extra test

* Update modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk.clj

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

* spelling

* alias to xforms

* missed alias update

* comment

* remove dependency on xforms

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-07-03 09:49:22 +01:00
Anton Kulyk
c0da9fe3a1 [Feature] Filters in question dashcards (#59684)
* Enable filters in question dashcards (#59420)

* Enable inline filters on question dashcards

* Fix type errors

* Update unit tests

* Remove scale transform for `DashboardParameterList`

* Add e2e tests

* Fix unit tests

* ensure inline filters connect to only their dashcards (#59591)

* update inline filters ui (#59761)

* allow connecting inline filters to other cards on the same tab (#59764)

* disable dashcard pointer events when editing dashboard (#59768)

* disable dashcard pointer events when editing dashboard

* review

* Fix type error

* Correctly duplicate question dashcards with inline filters (#59635)

* Update parameter mappings when duplicating a card

* Add tests

* Fix e2e tests

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>

* fix heading parameter mapping layout (#60173)

* hide add filter button for users without query edit permission (#59663)

* hide add filter button for users without query edit permission

* wip

* specs

* Fix e2e test

* Fix dashcard menu layout

* Filters in dashboards M2 backend (#60162)

* question filters in email subs v1

* add a little padding

* untangle circular dependency

* fix inline parameters for slack

* fix some of the slack tests

* fix more slack tests

* fix hopefully final slack tests, and add a new one

* parameters email styling changes after pairing with Kyle

* update slack code to address comment

* fix style call

* remove now-unused function

* try to fix slack tests

* try to fix header bolding in slack

* make dashcard menu button always visible (#60411)

* make dashcard menu button always visible

* Update Loki Snapshots

* tweak styles to prevent overflow on scalar cards

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-02 16:53:41 -07:00
Aleksandr Lesnenko
42aa1cc95f set a bin range to between filter in dashboard click behavior (#59894) 2025-07-02 22:34:57 +00:00
Denis Berezin
5a07192176 Fix permission check for notifications - allow slack (#60400)
* Fix permission check for notifications - allow slack

* Fix e2e
2025-07-03 01:26:02 +03:00
Oleksandr Yakushev
5477bf1a8c [parse-param] Rewrite metabase.lib.parse-param to handcrafted parsing to drop Instaparse (#60242) 2025-07-03 01:23:42 +03:00
Aleksandr Lesnenko
91fc911887 fix trend native formatting (#60223) 2025-07-02 18:22:35 -04:00
Nemanja Glumac
1e4efe0fb8 Remove a potentially superfluous step from the default e2e snapshot (#60309) 2025-07-02 21:57:07 +00:00
Cam Saul
5372f7a813 Add Kondo warning about committing t2/debug (#60224) 2025-07-02 14:55:24 -07:00
Alberto Perdomo
7b7a81ec37 Add missing step to set JWT SSO URI (#60405) 2025-07-02 20:57:43 +01:00
Alexander Polyankin
f0bffec1ef Fix bucketed column names after the annotate PR (#60291)
* Fix bucketed column names after the annotate PR

* Fix bucketed column names after the annotate PR

* Fix bucketed column names after the annotate PR

* Unskip dashboard tests

* Unskip dashboard tests

---------

Co-authored-by: Roman Abdulmanov <roman@metabase.com>
2025-07-02 18:39:22 +00:00
Ryan Laurie
dae160df0b move AddToDashSelectDashModal (#60396) 2025-07-02 12:31:40 -06:00
Alexander Polyankin
f79a5a3b68 Removing FK->PK remapping hack (#59859) 2025-07-02 18:17:49 +00:00
Alberto Perdomo
51b6f7e41c Update SDK changelog (#60403) 2025-07-02 19:13:18 +01:00
Anton Kulyk
9e75dcffa6 Unwire inline parameters when moving a dashcard to another tab (#60144)
* Unwire inline parameters when moving a dashcard

* Add tests

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-07-02 17:45:51 +01:00
Jeff Bruemmer
93c0afb069 typo (#60393) 2025-07-02 12:28:23 -04:00
Eric Normand
6646c46d90 datetime(bytes, mode) custom expression function (#59206)
* Typo in name

* Test an implement iso and simple mode strings

* Implement simple coercion strategy for sqlite

* Implement simple coercion for clickhouse

* Implement simple coercion for vertica

* Try wrapping strings with h2x/literal

* Fix athena

* Fix Vertica concatenation

* Try other clickhouse fix

* Let's try to fix hive-like

* Typo in clickhouse!

* Fix vertica

* Smarter parsing.

* Oops extra paren

* use parseDateTime() for clickhouse

* Add snowflake.

* Fix insane Snowflake test.

* Add databricks sqlite and vertica to test

* Tests, yo

* We need all sql+mongo to support bytes

* Remove redundant limit

* Implement bytes->temporal for hive-like

* Add more dbs to bytes->temporal test

* WIP

* Update frontend schema

* Remove printlns because it's poluting the test logs

* Presto uses LocalDateTime

* Starburst uses LocalDateTime

* Use zoned tiem for sparksql

* Snowflake binary dataset type

* Sqlite BLOB datatype

* SQL Server binary type

* Add vertica binary type

* SparkSQL binary type

* BigQuery binary type

* Capitalize clickhouse binary type

* Try a different type for SparkSQL

* Implement temporal bytes coercion for sqlite

* Implement temporal bytes coercion in sql server

* Add Sqlite binary dates expectations

* Change date type for sparksql expectation for simple datestring

* Implement temporal bytes coercion in vertica

* Implement temporal bytes coercion for Oracle

* MongoDB temporal bytes coercion

* Vertica uses cast as VARCHAR, not to_char()

* Oracle binary date expected return type

* Cut off multiple databases that can't convert temporal bytes to datetimes

* kick ci

* Allow all databases except athena

* Save some code for later

* Athena temporal string coercion (simple)

* Better comment

* Clean up tests

* Use more dispatch values and implement bytes tests

* Implement isobytes coercion strategy

* Test that drivers without binary temporal coercion throw exceptions

* Fix expectation for h2 and postgres

* Implement iso bytes in mongo

* Implement iso bytes in Oracle

* Implement binary iso coercion for hive-like

* Update expected return from h2 and postgres

* Implement binary iso coercion for Starburst

* Implement redshift and presto binary iso coercion

* Remove hive-like implementation for bytes coercion

* Rename bytes-iso and bytes-simple to isobytes and simplebytes

* Implement mode dispatch for datetime

* Fix Oracle typo

* Implement sqlite binary coercion

* Update frontend text.

* Update enum

* Normalize strings to keywords in legacy

* Clean up

* Clean up databricks bytes ingestion.

* Clean up more

* Improve syntax for valid modes check

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>

* Improve text

* Add fe tests for mode strings

* Complete coercion strategy code

* Avoid directly referencing driver names

* REmove unused mode string + correct validation logic

* Better feature keywords

* Frontend test for binary cast

* Appease the Kondo

* Improve fe test

* Build new ad hoc question with native question as source

* Fix types

* Fix test description

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-02 11:01:47 -05:00
Sébastien
4b39657797 Closes VIZ-1235 update top nav filter appearance (#60197)
* Closes VIZ-1235 update top nav filter appearance

* e2e

* e2e

* eslint

* e2e

* e2e
2025-07-02 16:40:23 +02:00
Sébastien
d9eec6d01f followup on VIZ-1221 added translation (#60178) 2025-07-02 16:09:49 +02:00
Brad Anderson
131c127eb9 #60285 Brings back .CardsContainer class that was removed in #59529 (#60286) 2025-07-02 09:30:09 -04:00
Nemanja Glumac
4b527d16cb Remove unused ConfirmContent (#60355) 2025-07-02 15:12:27 +02:00
Oisin Coveney
50ba7910a0 fix(sdk): Remove fullscreen and refresh buttons from SDK dashboard as they don't make sense (#60198)
* Remove refresh, fullscreen, and by extension, the nightmode toggle from SDK

* remove SDK_DASHBOARD_VIEW_ACTIONS

* Refactor tests and stories to be a little easier to debug something like this, and use explicit keys for the dashboard actions

* Fix up a thing

* Fix unit tests

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-07-02 13:56:16 +01:00
Anton Kulyk
1de9f60d69 Fix duplicate filter names (#60333) 2025-07-02 13:25:27 +01:00
Anton Kulyk
427c8df3e3 Fix "undo" when removing a heading dashcard with filters (#60331)
* Show undo toast from redux action vs. component

* Restore parameters on undo dashcard removal

* Add e2e test

* Fix console error
2025-07-02 13:25:13 +01:00
Uladzimir Havenchyk
8321dcb44d test: reduce noise from warnings from QueryBuilder unit tests (#60321)
* test: reduce noise from warnings from QueryBuilder unit tests

* typecheck
2025-07-02 13:40:59 +03:00
Nemanja Glumac
feb1037758 Remove deprecated and unused WithPublicDashboardEndpoints (#60363) 2025-07-02 12:18:00 +02:00
Ngoc Khuat
b7a556a2b7 move metabase.util.jvm/metabase-namespace-symbols to test (#58918) 2025-07-02 09:00:03 +00:00
Fraser
cc7564e1f8 Use Indicator for update notifications (#60106)
* Use Indicator for update notifications

* Move indicator to the right side
2025-07-02 20:39:02 +12:00
Oleksandr Solovyov
4dad9fd40e ask search bots to not index openapi docs (#60376)
otherwise Google is trying to index every instance of Metabase docs
2025-07-02 08:37:18 +00:00
Timofey Kachalov
9a3a5e8d52 Improve Sample apps healtcheck logic (#60339) 2025-07-02 12:10:14 +04:00
Luis Paolini
96e51b83b1 Update build.md (#60193)
wipe remains of Java 11
2025-07-01 19:27:00 -04:00
Nemanja Glumac
835792147a Delete deprecated and unused FormCheckbox (#60356) 2025-07-02 00:28:45 +02:00
Sloan Sparger
cc112327ab [Metabot] Make streaming the default (#60311) 2025-07-01 15:37:56 -05:00
Jeff Bruemmer
3204acc748 docs - update sync scans (#60011) 2025-07-01 16:17:07 -04:00
Jeff Bruemmer
3f2f202b28 update UI copy and docs (#60216) 2025-07-01 16:16:42 -04:00
Sloan Sparger
1324a86e65 [Metabot] Better text streaming (#60226)
* wip

* save progress

* TEMP COMMIT

* go another direction

* add tests, remove debugging colors

* clean up

* add a few more unit tests

* try rounding down

* fix scrollbar flickering for some users, cancel pending animation frames on unmount
2025-07-01 14:13:34 -05:00
Timothy S. Dean
e59956db6a Make a test less flaky. (#60334) 2025-07-01 11:59:21 -06:00
Sloan Sparger
ad8f5d6944 [Metabot] Thinking + error style iteration (#60095)
* implement updated styling, refactor out error messages from message state to better control error formatting, refactor out thinking and message components from MetabotChat

* finish things up

* unit tests for tool call logic

* add missing test around message clearing after error

* fix copy in e2e test
2025-07-01 12:59:01 -05:00
Timofey Kachalov
59cd8376fe Render ComparisonPicker for SDK without a portal (#60192) 2025-07-01 21:35:10 +04:00
Timofey Kachalov
3584d9410d Replace react-beautiful-dnd with dnd-kit for ChartSettingFieldsPartition (#60167) 2025-07-01 19:53:09 +04:00
Nemanja Glumac
ab17acf66b Remove <TextButton> (#60323) 2025-07-01 17:17:58 +02:00
Jakub Chodorowicz
5d969b8913 add upsells for dev instances in admin settings (#60044)
* Create UpsellDevInstances for Embeddings pages

* Add dev instance upsell to general settings

* Add dev instancles banner

* Hide upsell in in dev mode

* Add StorePaths type

* Update links for dev instances banner

* Update store link for upsell dev instance

* Refactor DevInstanceBanner to use translation function directly for text and external links

* Add unit tests for DevInstanceBanner component

* Refactor imports for UpsellDevInstances across embedding settings components

* Refactor DevInstanceBanner to use a reusable BannerBody

* Replace ExternalLink with Anchor in DevInstanceBanner

* Add jsdoc to getStoreUrl function

* Add target blank to store url
2025-07-01 17:08:50 +02:00
Nicolò Pretto
1ba3a2259e fix embedding-reproduction test, "issue 8490" failing because it finds (#60322)
multiple elements
2025-07-01 15:41:56 +02:00
Nicolò Pretto
68c03d37c9 document the backward-compatibility-tests (#60134)
* document the backward-compatibility-tests

* Update bin/backward-compatibility-test.js
2025-07-01 10:25:39 +00:00
Mahatthana (Kelvin) Nomsawadi
1169f3f043 Fix failed host apps tests (#60259)
* Fix failed host apps tests

* Fix host app tests still are failing

* Fix bug on the file-path with only the app-host tests change

* Fix the file-path
2025-07-01 03:41:11 +01:00
Nemanja Glumac
2ab98edd41 Add toast upon successful database connection during setup (#60301) 2025-06-30 21:35:18 +00:00
Phoomparin Mano
ebcf446ad9 fix(sdk): crash when changing questionId from new to native question (#60161) 2025-07-01 02:57:30 +07:00
Jeff Bruemmer
dd02ac1df1 docs - update links (#60290)
* links

* links

* more links

* link

* cleanup
2025-06-30 15:05:10 -04:00
Nicola Mometto
4504595645 add sync test around fks (#60074)
* add test

* Update test/metabase/sync/sync_metadata/fields_test.clj

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

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-06-30 17:31:35 +01:00
appleby
fbf6038a83 Unskip e2e regression test for metabase#49305 (#60171)
metabase#49305 was fixed by #57981 which added its own test, but this regression test can now be unskipped as well.
2025-06-30 08:53:16 -07:00
Jeff Bruemmer
11cfa6679a docs - links and link fixes (#60269)
* links and link fixes

* Update docs/dashboards/subscriptions.md

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

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-06-30 14:55:22 +00:00
Jeff Bruemmer
e3688062aa docs - permissions strategies for embedding (#60164)
* edits

* links

* impersonation

* edits

* connective tissue

* summary

* remove tenant

* note on all users

* formatting

* typo

* Alex edits

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

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-06-30 10:53:41 -04:00
Nick Fitzpatrick
ecbb96c04d Mantine V8 integration branch (#58773)
* update deps

* initial date migration

* default portal reuse target node to false

* remove timezone from MonthYearPicker value

* date picker adjustment for timezone

* unit tests

* fix Quarter Picker Types

* re-apply patch, fix up unit tests

* last adjustments?
2025-06-30 08:29:01 -06:00
Oleksandr Solovyov
e121e258ed add dev.migrate/orphaned-changesets (#60128) 2025-06-30 16:16:52 +02:00
Oleksandr Solovyov
7c25b5d622 update copy on 'Only send this alert once' option (#60194) 2025-06-30 14:10:26 +00:00
Nemanja Glumac
542998e964 Fix HostAppTestSuiteName type (#60239) 2025-06-30 14:28:44 +02:00
Anton Kulyk
70c565cc2a Fix redundant API calls in object detail viz (#60191) 2025-06-30 11:42:52 +01:00
Timofey Kachalov
fcb5200ad9 Move SDK e2e sample/host app test docs into SDK dev.md file (#60068) 2025-06-30 14:01:22 +04:00
Timofey Kachalov
f854fa1b6c Fix nextjs sample app env config (#60255) 2025-06-30 09:32:58 +00:00
bryan
a15838f7af rename test version of "es.json" (#60203) 2025-06-30 11:42:48 +03:00
Sébastien
7405037f12 Closes VIZ-1104 clear settings after drillthrough (#60185) 2025-06-30 06:54:21 +02:00
Brad Anderson
4299f31087 VIZ-147 Adds saving-dom-image-overflow-visible override to dashboard card titles since html2canvas doesn't support text-overflow: ellipsis so it cuts off the text in a suboptimal way (even the ascenders/descenders) (#60225) 2025-06-27 19:14:45 -04:00
Nemanja Glumac
2a1665066e Fix "additional terms" tooltip in settings uploads (#60232) 2025-06-28 01:11:51 +02:00
Sloan Sparger
2da2dc3a03 [Metabot] Do not clear conversation history when using chart analysis or sql fixing (#60154)
* dont start new conversations when fixing sql or analyzing a chart

* fix unit test
2025-06-27 23:10:21 +00:00
Aleksandr Lesnenko
4406c4464d New apply dashboard filters UI (#59670)
* new manual filter apply ui

* apply filter -> apply
2025-06-27 18:51:21 -04:00
Cam Saul
838ae27f16 Unify QP + Lib metadata calculation + 1000 new tests (#59013)
* `annotate` middleware => MLv2

* Test fixes

* Fix #42307

* Add `lib.join/rename-join`

* Continue to iterate on `annotate` rewrite

* Squash #58712

* Less test noise

* Revert "Squash #58712"

This reverts commit 9c8d170aa4.

* Only one test failure to go!

* Add more documentation; code cleanup

* Improved column looping code.

* Test fix 🔧

* Code cleanup

* Use existing Join renaming code.

* FIX QUE-1330

* Fix #30397 / QUE-147

* Kondo cleanup

* Test fixes.

* 13384 assertions, 81 failures, 47 errors.

* 13373 assertions, 48 failures, 28 errors.

* 13400 assertions, 48 failures, 15 errors.

* 13391 assertions, 48 failures, 12 errors.

* 13401 assertions, 22 failures, 11 errors.

* 13404 assertions, 20 failures, 6 errors.

* 13407 assertions, 13 failures, 6 errors.

* 13414 assertions, 11 failures, 8 errors.

* 13412 assertions, 10 failures, 8 errors.

* Minor code cleanup

* Minor code cleanup

* 13412 assertions, 10 failures, 5 errors.

* Fix Kondo errors

* 13411 assertions, 10 failures, 5 errors.

* 13404 assertions, 7 failures, 5 errors.

* 13411 assertions, 3 failures, 5 errors.

* 13399 assertions, 2 failures, 5 errors.

* 13396 assertions, 2 failures, 4 errors.

* 13424 assertions, 2 failures, 2 errors.

* Test cleanup

* Fix deps graph

* Update lib module config

* Cleanup

* Kondo cleanup

* Minimize diff

* 13421 assertions, 3 failures, 2 errors.

* Nice refactor of big hairball test

* More beautiful refactoring

* 13474 assertions, 0 failures, 1 errors.

* Fix linter error

* Remove unused `:aggregation_index` column

* Test fixes

* Test fixes 🔧

* 14547 assertions, 1 failure, 1 error.

* Fix calling the zero arity of unique-name-generator twice

* Handful of test fixes 🔧

* Fix :converted-timezone for :convert-timezone with 3 args instead of 4

* Fix metabase.queries.api.card-test/renamed-column-names-are-applied-to-json-test

* Split up mega test

* Split up another large test

* Fix error message

* Resolve #39887. 14536 assertions, 1 failure, 0 errors.

* WOW! Is everything green now??

* Test fix 🔧

* Update issue IDs

* Update more issue IDs

* PR feedback

* A test fix 🔧

* Another test fix 🔧

* More test fixes 🔧

* Formatting

* Test fixes 🔧

* Test fixes 🔧

* More test fixes 🔧

* Less nonsense

* 6618 assertions, 115 failures, 16 errors. [Lib]

* 6637 assertions, 3 failures, 16 errors.

* 8208 assertions, 3 failures, 0 errors. [Lib]

* Almost ready??

* [Lib] 8216 assertions, 0 failures, 0 errors.

* [QP] 5330 assertions, 21 failures, 31 errors.

* [QP] 5344 assertions, 8 failures, 2 errors

* Fix QUE-1380

* Fix QUE-1410

* [QP] 5344 assertions, 8 failures, 1 errors.

* 5345 assertions, 2 failures, 1 error.

* Proper deduplication in field resolution; also, add some normalization tests

* 13563 assertions, 1 failure, 0 errors.

* 13579 assertions, 0 failures, 0 errors.

* Kondo & cljfmt

* Kondo

* Test fixes 🔧

* Disallow duplicate expression names (QUE-1412)

* Test fixes 🔧

* Test fix

* Fix QUE-1418

* Fix error messages about inline-value with MongoDB

* Fix Redshift test failure

* Fix Athena test

* Fix BigQuery tests

* Fix dumb test failure

* Card source-model-cols should work for Cards without a query.

* Fix MongoDB

* Fix Druid

* Fix some busted code formatting.

* Fix column names

* Fix column names

* Do type inference for native queries with MBQL stages if the driver returns all :type/*

* Fix column names

* Fix column names

* Fix column names

* Druid test fixes 🔧

* More test fixes 🔧

* Update more FE tests

* MBQL 5 map normalization should not normalize nil values

* Support new `:decode/mock` key for mock metadata provider

* Split up unrelated large test

* Don't add :was-binned false to refs

* Clean up the display name calculation logic for column metadata

* Update binning middleware to use 'better' column resolution logic in lib.field.resolution

* Don't calculate different display names in QP results metadata

* Properly convert join :source-metadata

* Update expected display name

* Revert making test too complicated

* Simplify the remove-inactive-field-refs middleware

* Misc code cleanup and test fixes 🔧

* Appease whitespace linter

* Add test to make sure Lib result metadata merges in :info :metadata/model-metadata

* Literally an insane number of new tests

* Add `:lib/original-display-name` to column metadata schema

* Improve error message for fix-bad-references when you use Field ID ref with native source query

* Improved field resolution logic

* Card should NOT add :lib/original-display-name all willy-nilly

* Add `:lib/source-display-name` and `:lib/ref-display-name`

* FINALLY fix display name logic??

* Revert making things private (thanks for lying to me LSP)

* Test fixes 🔧

* Remove `:lib/hide-bin-bucket?`

* Test fix

* Update notebook helpers

* Always use LONG display names for columns from the previous stage.

* Fix metabase.query-processor-test.nested-queries-test/space-names-question-test

* Make sure we use correct display names for implicitly joined columns

* Make sure BINNING gets propagated with `:lib/original-binning`.

* Make sure we correctly calculate if a column is inherited or not.

* Make sure binning info is returned in QP results and other misc fixes

* Do NOT return join alias info for columns that come from implicit joins.

* Update tests

* Some test fixes

* Don't generate wacky default join aliases

* Test fixes 🔧

* Fix more tests

* Prettier

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Use 'Unknown Field' as display name for unknown fields

* Fix incorrect use of expression refs

* Mark selected columns correctly

* cljfmt

* Update/fix backend tests again

* More fix selection fixes 🔧

* Fix equality matching for join columns

* Update tests

* Fix Kondo

* Fix line-bar-tooltips.cy.spec.js

* Add transducer version of u/index-by

* Some PR feedback

* Fix joins-reproductions.cy.spec.js 🔧

* Kondo cleanup

* Fix multiple-column-breakouts.cy.spec.ts

* Update tests

* Update tests not to expect :ident

* Update test not to expect duplicate columns

* PR feedback.

* More test fixes.

* IDK, maybe this is the last round of fixes. 🔧

* Support normalizing parameter dimensions

* Test fixes 🔧

* Fix CLJS code

* One last fix for column equality

* Update a couple of e2e tests

* Another test update

* Fix the test

* remove duplicated spec

* Even more tests (1 million tests)

* cljfmt

* Add test to make sure breakoutable-columns does not include remaps

* Fix Kondo

* skip failed tests

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-06-27 13:34:43 -07:00
Oisin Coveney
01ef763723 Consolidate SDK dashboard components (#59529) 2025-06-27 21:22:45 +01:00
appleby
974684b58d Enable the :expression-literals feature for the mongo driver (#60107)
* Enable the :expression-literals feature for the mongo driver

* Wrap :value expressions in $literal when compiling for mongo

* Add mongo compile-cond and compile-filter impls for :expression, :field, and :value

* Better codegen of compile-filter and compile-cond for :expression, :field, and :value on mongo

* Review feedback: hash-map -> array-map
2025-06-27 13:22:26 -07:00
Ryan Laurie
7ed7423614 Cleanup docker setup in CI (#60125)
* cleanup docker setup in e2e

* fix name

* pin maildev and update attachment api
2025-06-27 13:58:47 -06:00
Case Nelson
97d1a1e82a dev: separate app-db tests into its own workflow (#60207) 2025-06-27 13:12:51 -06:00
Nemanja Glumac
e872767998 Forbid assigning return values in Cypress (#60152)
* Fix violations

* Error on future violations

* Add a note to the e2e readme
2025-06-27 21:00:40 +02:00
bryan
b89726a15d send dispatch_type in the client payloads (#60219) 2025-06-27 18:37:48 +00:00
bryan
bcf6e46585 Merge -> Close (#60214) 2025-06-27 12:25:24 -06:00
Case Nelson
a3aed2ab66 dev: bigquery static datasets (#60168)
* dev: bigquery static datasets

* Check every two days

* Fix var

* Fixes for sql params and test fixes

* Fix tests

* Fix tests

* Add logging for test debug

* Fix time range

* Fix default dataset check

* Fix dataset name replace

* Ignore exceptions on tracking in case of could not serialize error

* Fix kondo

* More kondo fixes
2025-06-27 12:19:42 -06:00
bryan
57fcb1a6d1 Update docs workflow triggers (#60208) 2025-06-27 11:45:44 -06:00
Sébastien
19b4b29ce7 Closes VIZ-1145 row chart label cut off (#60179)
* Closes VIZ-1145 row chart label cut off

* Update frontend/src/metabase/visualizations/shared/components/RowChartView/utils/data-labels.unit.spec.ts

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

---------

Co-authored-by: Brad Anderson <brad@metabase.com>
2025-06-27 19:02:56 +02:00
Sébastien
547028bafd Closes VIZ-642 no more move cursor in mobile (#60188) 2025-06-27 19:01:10 +02:00
bryan
343dd2c518 Add cljfmt rule for driver/api-replace + run formatter (#59892) 2025-06-27 15:45:57 +00:00
github-actions[bot]
d834221200 Update translations 2025-06-26 (#60156)
* Update translation sources 2025-06-26

* Update translations

* comment out locale with wrong format

* let's try to just rename it?

* et

* dont import estonian (yet)

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-06-27 17:12:59 +02:00
Aleksandr Lesnenko
0fb5606341 enable table cell multiselect (#59823)
* enable table cell selection

* fix spec
2025-06-27 09:29:03 -04:00
Jakub Chodorowicz
0452a7403b Adjust License Token setup step (#59464)
* Adjust License Token setup step

# Conflicts:
#	frontend/src/metabase/setup/components/LicenseTokenStep/LicenseTokenForm.tsx

* Add License Token Step tests

* Accessbility improvements

* Use button for skip

* Fix setup flow tests

* Fix e2e setup tests

* Use existing store url and unstyled button

* fix selector usage

* Make the token error test more specific

* Simplify the full width divider styling

* Simplify Popover styles

* Fix the store link

* Use plain Button for skip

* Follow the setup pattern in tests

* Improve copy text

* Provide translation context

* Use HoverCard component instead of Popover

* Don't display license token hover card by default
2025-06-27 09:51:11 +02:00
Sébastien
90bf2749d3 Closes VIZ-1221 nicer error state for missing columns (#60003)
* Closes VIZ-1221 nicer error state for missing columns

* e2e

* handle missing card gracefully
2025-06-27 08:37:32 +02:00
Sébastien
3219571e48 Closes VIZ-1211 default colors for visualizer cards (#60115)
* Closes VIZ-1211 default colors for visualizer cards

* e2e

* .

* .
2025-06-27 08:37:15 +02:00
appleby
b39dfa529a Add xrays drill thru repro for #23820 (#59669)
* Add e2e repro for #23820

* Review feedback: exist -> be.visible

* Review feedback: drop force from click action
2025-06-26 17:58:15 -07:00
Tyler Plude
2fd83dba03 [Feature] Parameters in Dashboard Cards (#59083)
* BE support for inline_parameters field on dashboard cards

* trailing whitespace; migration fix

* Add migration condition

* fix spec

* fix serdes

* Add filters to heading dashboard cards (#59201)

* Add `isHeadingDashCard` util

* Add "Add a filter" button to heading dashcards

* Extract `AddFilterParameterMenu` component

* Add `inline_parameters` to dashcard type

* Add inline parameters to heading dashcards

* Add `parameters` prop to `DashboardParameterList`

* Disable default heading mapping UI

* Add selectors for header and inline parameters

* Display heading dashcard filters

* Persist inline parameters

* Add unit tests

* Update heading placeholder

* Add e2e test

* Fix unit tests

* Fix `setFilter` e2e helper

* Rearrange heading elements

* Show variables mapping UI for headings

* Fix shrinking filter list

* Fix e2e tests

* Fix `hasInlineParameters`

* Fix copy

* Rename e2e helper

* Revert "Rename e2e helper"

This reverts commit d49ce4b752.

---------

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

* Fix editing filters in heading dashboard cards (#59264)

* Add `isSortable` prop to parameters list component

* Disable header filters sorting

* Don't disable pointer events for header dashcards

* Hide mapping UI when heading card doesn't have vars

* Add e2e test

* Update e2e test

* Update e2e test

* Add unit tests

* Correctly remove inline filters from header dashboard cards (#59276)

* Handle removing inline parameters

* Add e2e test for removing inline parameters

* Remove inline parameters when removing a dashcard

* Add e2e test

* Run prettier

* Disable auto-wiring for inline filters (#59337)

* Disable auto-wiring after adding a new card

* Disable auto-wiring after mapping filter to a card

* Add e2e test

* Handle inline parameters when duplicating a dashboard/dashcard (#59407)

* Fix inline filters legend when exporting dashboard PDF (#59619)

* Rename CSS ID

* Rename `parametersNode` var

* Fix filter widget legend position in PDF exports

* Closes VIZ-1057 VIZ-1056 touch up filter appearance (#59325)

* Closes VIZ-1057 touch up filter appearance

* added back DashCardParameterMapper

* handleResize also when isEditing changes

* fixed warning in selector and resize observing

* spacing and sizing is g2g

* added parameters with values length in narrow mode

* fixed unit tests

* fixed e2e

* fixed e2e again

* ...

* disable inline filters sorting (#59742)

* Fix type error

* Fix backend tests for filters in dashcards (#59953)

* Fix serialization tests for filters in dashcards

* also fix metabase.dashboards.models.dashboard-card-test

* fix more tests

* fix an old migration test to create entities via raw table name

* fix another migration test

* undo serialization baseline changes

* targeted change to serialization baseline to add inline_parameters

* Correctly display inline filters in public/embedded dashboards (#59484)

* Add e2e tests

* return inline_parameters in results of public and embed dashboard endpoints

* Add tests for enabled/disabled/locked parameters

* filtered locked params out of inline parameters in embedding

* Fix filters shown in the header and in cards

* Fix e2e test

* Fix parameters display

* Update Loki Snapshots

* Fix visual tests

* Update screenshots

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>

* Fix linter error

* Render header params beneath their associated headers in dashboard subscriptions (#59890)

* Fix serialization tests for filters in dashcards

* Render inline parameters in dashboard subscription emails beneath their associated header

* Fix kondo issues

* refactor out utils.clj

* fix whitespace + import

* fix kondo

* add unit test, fix typo

* add an e2e test

* address nit

* add slack implementation

* fix test

* try to fix slack test again

* reset serialization baseline to match feature branch

* correct snapshots

* Update Loki Snapshots

* okay now it should pass

* snapshots

---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-06-26 20:30:13 -04:00
Timofey Kachalov
223e79b9c2 Adjust embedding sdk ci triggers (#60043) 2025-06-27 00:48:31 +04:00
Case Nelson
7faeda11f2 fix: driver-tier-3-check-output (#60163) 2025-06-26 20:16:08 +00:00
metamben
702230d6f4 Distinguish external remapping from explicit join (#60029) 2025-06-26 23:14:39 +03:00
John Swanson
3d9ec072e4 Fix N+1 in get card dashboards endpoint (#60139)
This endpoint should also be changed to a GET endpoint, but I'll do that
down the road.
2025-06-26 11:50:04 -07:00
Case Nelson
08cfa3d14b fix: snowflake flake with manually created datasets in static world (#60138)
* fix: snowflake flake with manually created datasets in static world

* Update modules/drivers/snowflake/test/metabase/driver/snowflake_test.clj

Co-authored-by: Riley Thompson <riley@metabase.com>

---------

Co-authored-by: Riley Thompson <riley@metabase.com>
2025-06-26 11:38:19 -06:00
Edward Paget
ab57a144aa fix: collection archive/move w/out parent perms (#60091)
* fix: collection archive/move w/out parent perms

Allow users to archive and move collections even when they do not have
read-write permissions on the parent collection.

* fixup! docstring feedback
2025-06-26 12:06:20 -05:00
Edward Paget
22a045996c fix: randomize the sample db sync schedule (#59847)
* fix: randomize the sample db sync schedule

* fixup! make sure sample dbs aren't scheduled to 43
2025-06-26 12:00:53 -05:00
Nemanja Glumac
5c468e8170 Add unique keys to the "new menu" items (#60117) 2025-06-26 16:19:40 +02:00
Braden Shepherdson
3aed5bfd73 [QP] Respect the time if absolute datetime dashboard filter provides it (#60010)
Fixes #59778

Previously this was always rounded to `:day` for a single absolute
datetime filter. (Absolute date ranges already respected the times if
provided.)
2025-06-26 14:00:00 +00:00
Sloan Sparger
50554f3001 [Metabot] Fix long prompt suggestions not wrapping (#60100) 2025-06-26 08:56:29 -05:00
Sloan Sparger
8464213a96 [Metabot] Fix too large of chart images not being able to be converted to base64 (#60105) 2025-06-26 08:55:03 -05:00
Edward Paget
67397aeadf fix: increment graph revision when parent permissions are copied (#59727)
* inc perms revision number on collection creation

also delete a misleading comment about data permissions.

The `before` and `after` fields here will be blanked out. This is
unfortunate, but this is a strictly better state of affairs from before,
when the change to permissions would not be recorded at all. At least
now we will record that it happened, and concurrent changes to the
permissions graph will fail instead of succeeding with odd/unexpected
behavior.

We'll add a remark to the revision to explain why it was created.

Co-Authored-By: Ed Paget <ed@metabase.com>

* Add tests for new behavior

Co-Authored-By: John Swanson <john.swanson@metabase.com>

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-06-26 13:52:40 +00:00
Timofey Kachalov
88bdcfe6ae sdk(fix): Render ColorSelector within ChartNestedSettingSeriesMultiple without portal (#60118) 2025-06-26 17:15:15 +04:00
Sébastien
8ca1361d47 Closes VIZ-1220 proper icons for visualizer actions (#60040) 2025-06-26 14:29:20 +02:00
Thomas Schmidt
af55313e5d Improve chart context (#60055)
* Improve chart context
  * Send query
  * Send display type
* Refactor existing code to only provide query once and not send display type on the root
* Only fetch metabot context if plugin is enabled
2025-06-26 11:34:15 +00:00
Phoomparin Mano
a41e383e0e fix(sdk): switching from existing to new question should keep query builder open (#60077) 2025-06-26 15:40:32 +07:00
Nemanja Glumac
37f6d88370 Fix the extract column e2e flake (#60102) 2025-06-25 23:04:38 +00:00
Sloan Sparger
e4003975d0 [Metabot] Fix warning no conversation id (#59966) 2025-06-25 18:02:51 -05:00
Ryan Laurie
a36337cb42 fix pre-release test environment vars (#60099) 2025-06-25 16:41:59 -06:00
Edward Paget
90f2f3b309 fix: ad hoc error messages return the hidden card (#60064)
Also update to ensure /dataset apis are run as an ad hoc context
2025-06-25 15:31:43 -05:00
Timothy S. Dean
7aba2a5695 Stop asserting requests are not canceled (#59962)
The query processor would explicitly return `nil` when a query was canceled, but then that `nil` would cause an `AssertionError` to be thrown. This is no longer the case.
2025-06-25 13:29:37 -06:00
Noah Moss
271459ead8 Use dynamic var for locale in datetime formatting for exports (#60079)
* store datetime formatting locale in a dynamic var

* add test

* fix kondo
2025-06-25 15:23:30 -04:00
Brad Anderson
b7c40b13a4 VIZ-1114 Fix static viz error caused by using css variable in svg (#60076) 2025-06-25 14:26:09 -04:00
Oisin Coveney
a024d632f4 Convert menu dashboard buttons to use dashboard context (#59975)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 18:39:15 +01:00
Sloan Sparger
14cd563b6e [Metabot] Setting hotfix (#60071) 2025-06-25 17:03:26 +00:00
Oisin Coveney
01bf8c50fa Create DashboardTitle context component (#60030) 2025-06-25 17:50:01 +01:00
Ryan Laurie
6da4c6ebe8 push multi-arch images when tagging (#60031) 2025-06-25 10:25:41 -06:00
Romeo Van Snick
2d4d1dfc47 Avoid invalid prop errors in Cypress from the mock undolisting (#60061) 2025-06-25 18:23:18 +02:00
Oisin Coveney
6c0cd33105 Convert basic dashboard buttons to use dashboard context (#59971)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 17:17:40 +01:00
Oisin Coveney
4371c14114 Convert fullscreen dashboard buttons to use dashboard context (#59972)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 17:17:34 +01:00
Oisin Coveney
2cd7b7abcd Convert edit dashboard buttons to use dashboard context (#59974)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 17:17:24 +01:00
Case Nelson
cc84b518f2 dev: don't run tier 3 driver tests unless on certain teams (#60016)
Discussion metaboat.slack.com/archives/C0669P4AF9N/p1750783492043299

With this change we only run driver tests if:

on master or release-* branches
PRs labeled with .Team/Drivers, .Team/Querying, or .Team/SemanticLayer
2025-06-25 09:58:11 -06:00
Sloan Sparger
92f2dc76e9 [Metabot] Remove AI Proxy references (#59965) 2025-06-25 10:50:07 -05:00
Jeff Bruemmer
d8e8b17d23 remove message (#60059) 2025-06-25 14:51:49 +00:00
William
60fe4437ba collection: null in native queries doesn't break things (#60008)
Apparently, it is possible to get collection: null in a card's dataset query.  It is unclear why this happens, but
this change ensures that nothing will break when it does happen.
2025-06-25 08:48:33 -05:00
Ngoc Khuat
d149e62a5c Graceful shutdown notification workers (#60005) 2025-06-25 13:29:07 +00:00
Romeo Van Snick
3f85969803 Add max width on multi-input field (#60045)
* Add max-width to overflowing field

* Add repro for metabase#59306
2025-06-25 15:27:29 +02:00
Oisin Coveney
6ccd85ae4a Convert info dashboard buttons to use dashboard context (#59976)
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-25 13:21:37 +01:00
Sébastien
ef109213a2 Closes VIZ-1181 lost series formatting options (#59985) 2025-06-25 10:05:38 +02:00
Sébastien
7bd58dd39b Closes VIZ-1217 undo/redo labels (#59990)
* Closes VIZ-1217 undo/redo labels

* test
2025-06-25 07:10:09 +02:00
Sloan Sparger
f23bca761c [Metabot] Streaming error handling and retry prompt UI (#59937)
* save progress

* refine error handling

* add test coverage

* self review

* remove left over todo

* small corrections

* fix unit test
2025-06-24 18:40:49 -05:00
Alexander Polyankin
b7e62695f1 Revert "Retract fk constraints if removed from DB (#59539)" (#60033)
This reverts commit fb2691764f.
2025-06-24 16:37:08 -07:00
Nemanja Glumac
af696da68c Update E2E token helpers (#59802)
In the past, we have run CI, and local testing with two enterprise tokens:

- all features
- no features

And this really doesn't reflect most real-world scenarios very well. We should be testing with tokens that have actual sets of features that are used in the wild, namely:

- starter cloud
- pro cloud
- pro self-hosted

Some bleeding-edge features that have not yet been implemented into our commercial plans will need to be tested with an all features token still.

This commit updates our testing helpers to use a paradigm that more accurately reflects real-world usage scenarios. Instead of setting specific features for a test, you activate a specific token.
2025-06-25 00:30:32 +02:00
Jeff Bruemmer
a23753148e Update start.md (#60026) 2025-06-24 21:26:55 +00:00
Sloan Sparger
4dcc7e5e1e [Metabot] Add streaming support (#59728)
* add BE code

* port over most of code from branch metabot/streaming w/o tests + making changes for supporting both normal requests and streamed ones

* improve test coverage, bug fixes, add support for analyze chart, error handling changes

* small bit of clean up + add unit tests for streaming

* fix some subtle bugs around request cancellation and stream processing

* Remove debugging logs

* fix be lints and things

* Improve ai service response streaming code

- Wrap initialization of response-lines reader with with-open to automatically close it after the response is done
- Remove Thread/sleep code

* Update modules config to register usage of the server module

* Remove request body destructure in the agent-streaming endpoint

* Fix reflection error

* Expand the docstring for the streaming-request function

* sort namespaces

---------

Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
2025-06-24 16:23:58 -05:00
Oisin Coveney
f5aa70d869 Convert DashboardTabs to context (#59973) 2025-06-24 22:01:32 +01:00
Brad Anderson
b039849b2b Closes VIZ-1115 - Clean up x-rays sidebar visual bug (#59739) 2025-06-24 16:48:56 -04:00
Nicola Mometto
fb2691764f Retract fk constraints if removed from DB (#59539)
* Add migration to add metabase_field_user_settings table

* Add FieldUserSettings model, handle updates to Field transparently

* Add test

* TODO

* we can't user after-update, as it doesn't reflect the proper model

write through

* respect user schema during fk sync

* test via put endpoint

* comments

* fix

* FieldUserSetting serialisation test

* fk sync test

* simplify

* PoC with realizing set of fks

* add test case

* wip: using tmp table

* unique tbl

* update test

* fix for h2

* table-by-table

* style

* fix test

* stronger test

* fix for mysql
2025-06-24 20:34:19 +00:00
Nick Fitzpatrick
5b3f0b8ada use <pattern> and <text> in svg instead of background image (#59880) 2025-06-25 01:50:27 +05:30
Nicola Mometto
93d44f7c4d Respect user-set settings during sync (#59301)
* Add migration to add metabase_field_user_settings table

* Add FieldUserSettings model, handle updates to Field transparently

* Add test

* TODO

* we can't user after-update, as it doesn't reflect the proper model

write through

* respect user schema during fk sync

* test via put endpoint

* comments

* fix

* FieldUserSetting serialisation test

* fk sync test

* simplify

* fix: clean user-set coercion-strategy/semantic-type on base-type update

* add extra test
2025-06-24 19:58:07 +00:00
Brad Anderson
723ca9e4a8 Closes VIZ-1114 - Tweaks to chart appearance in dashboard full screen dark mode (#59956)
* VIZ-1114 Updates cartesian graph lines so they're subtler in fullscreen night mode in a way that also allows them to be defined separately from the border color (if desired) in the embedding sdk

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-24 15:46:13 -04:00
Case Nelson
f96d0a7e53 dev: create and maintain static datasets for snowflake (#59734)
* dev: create and maintain static datasets for snowflake

https://www.notion.so/metabase/Dataset-hash-tracking-20e69354c901806d94adc1a5a48a83db

* Test fixes

* Remove usages of destroy-db

* Fix impersonation test

* Fix missing require

* Fix kondo

* Fix interval tests creating too many datasets

* Adding access_note rename accessed_at

* Add test to tracking-not

* Fix kondo
2025-06-24 13:29:55 -06:00
Jeff Bruemmer
625145686a cloud - update links (#60009)
* update links

* more links
2025-06-24 15:25:42 -04:00
Uladzimir Havenchyk
343445301b chore: remove not used files (#59688) 2025-06-24 22:17:48 +03:00
github-automation-metabase
363af94d50 Bump org.eclipse.jetty/jetty-unixdomain-server from 12.0.21 to 12.0.22 (#59154)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-06-24 18:19:31 +00:00
github-automation-metabase
e7900c56c0 Bump com.amazonaws/aws-java-sdk-core from 1.12.783 to 1.12.785 (#59159)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-24 18:15:42 +00:00
Nick Fitzpatrick
99eddd4aa4 Remove .only use in Homepage.cy.spec (#60014) 2025-06-24 18:12:07 +00:00
Nick Fitzpatrick
60830ca5fb Migrate new menu to Mantine (#59610)
* Migrate new menu to Mantine

* Adusting tests for new role
2025-06-24 17:47:50 +00:00
William
4ae6739cab Postgres driver throws better error message when it misinterprets ? (#59878)
? is used as a jdbc parameter placeholder and is also an operator in postgres.  If you want to use it as an operator,
you often need to escape it with ??.  This gives a better error message when that happens.
2025-06-24 12:19:25 -05:00
Sébastien
df8f88c0d9 closes VIZ-1219 restore 'edit question' for regular cards (#59982) 2025-06-24 18:04:58 +02:00
Jacob Joseph
a1ec32c4c1 Update interactive-ui-components.md (#59361)
added note that Data breadcrumbs are not affected by this setting
2025-06-24 11:26:42 -04:00
Nicolò Pretto
db76991217 remove beta badge from the sdk on the embedding homepage (#59857)
* remove beta badge from the sdk on the embedding homepage

* deprecate Badge
2025-06-24 16:49:44 +02:00
Ryan Laurie
1aef88e1a0 improve external link buttons (#59812) 2025-06-24 08:23:32 -06:00
Ryan Laurie
cfa1cac67a improve error state for settings admins (#59817) 2025-06-24 14:05:12 +00:00
Ryan Laurie
991a536af1 Consolidate getErrorMessage functions (#59876)
* consolidate error messages

* appease the linter

* fix test
2025-06-24 07:37:40 -06:00
Timofey Kachalov
02cd081cf3 Use composedPath to detect a click target for useSequencedContentCloseHandler (#59779) 2025-06-24 15:37:49 +04:00
Timofey Kachalov
027dcf9071 fix(sdk): Render ChartSettingColorPicker color picker without a portal (#59821) 2025-06-24 12:20:35 +04:00
Mahatthana (Kelvin) Nomsawadi
f234621449 Fix can't download PDF on static dashboard when titled=false and has no tabs (#59968)
* Fix dashboard PDF download button not clickable in some cases

* Fix auto complete not working on VS Code

* Add an E2E assertion
2025-06-24 08:48:16 +01:00
Timofey Kachalov
b04b0baa1c sdk(test): Pass collection id to the CollectionBrowser stories (#59787) 2025-06-24 11:19:03 +04:00
Timofey Kachalov
7a2a99379e Render ChartSettingMultiSelect without a portal for SDK (#59893) 2025-06-24 11:18:39 +04:00
Nathan Voxland
7c676d4f30 Added dev.h2/tcp-listen (#59886) 2025-06-23 16:32:04 -05:00
Nathan Voxland
756ba5c593 Test migrations when going back to an old version (#59587) 2025-06-23 16:28:52 -05:00
Jakub Chodorowicz
ca79b062e7 Add blue dot attention notice to events icon links PRG-36 (#59605)
* Add blue dot attention notice to events icon links

* Fix Collection Header tests

* Adjust offset of inidicators to bring them closer to icons

* Improve test by with better API usage
2025-06-23 22:12:08 +02:00
Uladzimir Havenchyk
bd45dd3ceb deps: downgrade rspack to address panic error (#59936) 2025-06-23 19:52:02 +00:00
Ryan Laurie
70c663d859 Remove dead code + tidy up admin settings directory (#59887)
* remove dead code + tidy up settings

* prettier

* create admin components

* update imports

* fix import
2025-06-23 13:23:47 -06:00
Aleksandr Lesnenko
a489f8cf49 fix native gridmap binning calculation (#59881) 2025-06-23 15:12:24 -04:00
Sébastien
e8056cd996 trying to remove query from Visualization.tsx (#59676) 2025-06-23 20:39:08 +02:00
Alex Yarosh
dd46aa0686 env var docs update master (#59951) 2025-06-23 18:05:53 +00:00
Ryan Laurie
64d36c81b0 hide db routing for unsupported DB engines (#59934) 2025-06-23 17:24:45 +00:00
Ryan Laurie
7d860ce9d0 make setting header inline block (#59818) 2025-06-23 11:18:59 -06:00
Braden Shepherdson
d4ddb685b5 [Parameters] Drop any :fields when (ab)using a card for field values (#59427)
Fixes #59394.

If the card we're trying to use for parameters values has an explicit `:fields` clause, that was surviving into
the final query, which causes us to generate bad SQL and throw a 500. This discards the `:fields`, which aren't
relevant when we're overwriting the query's last stage with a single breakout.
2025-06-23 17:08:31 +00:00
Phoomparin Mano
acd034425a Add ready event handler for new iframe embedding (#59714) 2025-06-23 23:26:47 +07:00
Phoomparin Mano
c3c2469f6a Option to use existing user session in new iframe embedding (#59701) 2025-06-23 22:56:59 +07:00
Aleksandr Lesnenko
14a0913f13 scroll dashboard when dragging a card (#59897) 2025-06-23 11:55:06 -04:00
appleby
e4f959e109 Add regression test for #40676 (#59763)
* Fix :display-name for field-metadata-method [:ic/reports :updated-by]

* Add regresssion test for #40676
2025-06-23 15:08:07 +00:00
Raphael Krut-Landau
3bf9bff940 Content translation: design tweaks (#59595)
* This PR addresses design feedback from @kdoh

* Show toasts on dictionary upload/download success and failure
* Move localizing user-generated content to its own settings section

* tests

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-06-23 20:36:32 +05:30
SabarigirisanSivakumarREO
2943d49d22 Fixed semantic structure on welcome page. (#59844)
Co-authored-by: Vamsi Peri <vamsi@metabase.com>
2025-06-23 11:03:35 -04:00
Raphael Krut-Landau
7ff73d789a Add simple confirmation modal to dictionary upload (#59479)
* Add simple confirmation modal to dictionary upload

* updating e2e tests

* rebase hook adjustment

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-06-23 19:03:28 +05:30
Ryan Laurie
2eb3558399 Improve Admin Nav Spacing + Active Behavior (#59811)
* fix sizing and spacing

* cleanup old code

* handle special nav highlights

* update nav tests
2025-06-23 07:32:07 -06:00
Fraser
00b07b20f6 Implement notification badge for updates (#59767)
* Implement nofication badge for updats

* Remove translation of 1

* Change to async find text
2025-06-23 06:19:42 -06:00
Romeo Van Snick
b56244edde Shortcut for formatting (#59534)
* Lift onFormatQuery to NativeQueryEditor

* Pass onFormatQuery to codemirror editor

* Lift canFormatQuery to NativeEditor

* Add format expression keymap to custom expression editor

* Add shortcut documentation

* Add helper to get NativeEditor value

* Add test for formatting using shortcut in native editor

* Add test for formatting in the custom expression editor via shortcut

* Do not allow formatting invalid expressions by shortcut

* Add test for invalid expression

* Wait for format button to be visible

* REmove unused var

* Perform the realPress on the cm editor

* Change order of keyboard event handling so that Ctrl+F handler does not kick in when pressing Ctrl+Shift+F

* Replace search keymap for native editor

* Add CodeMirror wrapper

* Use wrapped CodeMirror in NativeQueryEditor

* Use wrapped CodeMirror in custom expression editor

* Use wrapped CodeMirror in CodeEditor

* Export more from CodeMirror module

* Use highest precedence for shortcuts

* Add support for highlighted ranges to common CodeMirror editor

* Use highlightRanges prop

* Simplify code editor

* Use highlightRanges prop in Native editor

* Add highlight class

* Move shared codemirror style to CodeMirror module

* Move tag out of :global block

* Add missing import

* Fix background color

* Simplify highlights deps

* Move autofocus, autocorrect and tabIndex plugin to shared CodeMirror editor

* Disable autocorrect in SQL editor

* Memoize basicSetup

* Add snippet shortcuts

* Remove unnecessary lowercase

* Use type guard

* Addd types file

* Rename util to utils

* Destructure extension from props

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-06-23 13:47:45 +02:00
Nicolò Pretto
31cd80ece1 hide the trial banner from the iframe preview (#59854) 2025-06-23 10:51:22 +02:00
Robert Kosara
da97a51e95 Small fixes to the cumulative count and sum page (#59895)
This fixes a couple small typos and makes a few other changes while I was at it. I made the little math expressions consistent, and changed the text under "How…" since it only talks about count at first.
2025-06-20 16:34:53 -07:00
Ryan Laurie
efcc142db0 Move components to common components (#59867)
* resolve component name conflicts for Alert, NumericInput, NewItemMenu

* move components to common components

* update references

* fix more refs
2025-06-20 15:05:51 -06:00
dpsutton
f7e83b35b1 test db routing on dbs which support it (#59845)
* test db routing on dbs which support it

* remoev an extra newline

* remove hardcoded clickhouse addition

* Remove database routing support from a few more drivers

Some of these are artifacts of no data-loading support in tests and they
can be reenabled when that works:
- databricks: multi-catalog so similar to clickhouse
- presto: data loading
- spark: multi-catalog so similar to clickhouse
- vertica: dataloading

* Turn off in athena, bigquery, oracle, redshift

Change dataset name since "table" is reserved in bigquery

- athena: data loading issue. Can't diagnose yet if this is similar to
other cloud databases.

- bigquery: includes database in query in tests. Seems not in real life.

```sql
 SELECT `v4_router_data__transient_1750437202857.t`.`id` AS `id`,
       `v4_router_data__transient_1750437202857.t`.`f`  AS `f`
FROM   `v4_router_data__transient_1750437202857.t`
LIMIT  1048575
```

- oracle: unknown. i suspect a data loading issue

- redshift: includes database in query. But i think
this might be a testing artifact: we aren't creating a database each,
but a schema each and faking it. Which violates the expectation of
db-routing. So this is a testing artifact

```sql
SELECT
  "schema_173"."airports_airport"."id" AS "id",
  "schema_173"."airports_airport"."name" AS "name",
  "schema_173"."airports_airport"."code" AS "code",
  "schema_173"."airports_airport"."latitude" AS "latitude",
  "schema_173"."airports_airport"."longitude" AS "longitude",
  "schema_173"."airports_airport"."municipality-id" AS "municipality-id"
FROM
  "schema_173"."airports_airport"
LIMIT
  1048575
```

* disable snowflake

includes databases in its queries:

```clojure
(defn- query-db-name []
  ;; the store is always initialized when running QP queries; for some stuff like the test extensions DDL statements
  ;; it won't be, *but* they should already be qualified by database name anyway
  (when (driver-api/initialized?)
    (db-name (driver-api/database (driver-api/metadata-provider)))))

;; unless we're currently using a table alias, we need to prepend Table and Field identifiers with the DB name for the
;; query
;;
;; Table & Field identifiers (usually) need to be qualified with the current database name; this needs to be part of the
;; table e.g.
;;
;;    "table"."field" -> "database"."table"."field"

;; This takes care of Table identifiers. We handle Field identifiers in the [[sql.qp/->honeysql]] method for `[:sql
;; :field]` below.
(defn- qualify-identifier [[_identifier identifier-type components, :as identifier]]
  {:pre [(h2x/identifier? identifier)]}
  (apply h2x/identifier identifier-type #_(query-db-name) components))
```

* actually disable for snowflake
2025-06-20 15:46:27 -05:00
Ryan Laurie
9e5b064bc0 show error message for databases that don't support routing (#59849)
* show error message for databases that don't support routing

* add tests

* add tests
2025-06-20 13:45:57 -06:00
Alexander Polyankin
2b82fc5785 Support remapping for multiple fields (#59804) 2025-06-20 15:33:55 -04:00
Alex Yarosh
e6da8a0bf0 snowflake (#59877) 2025-06-20 19:29:35 +00:00
Ryan Laurie
a158877776 Move core components to common components (#59863)
* move core to common

* update references

* update type import
2025-06-20 13:18:19 -06:00
bryan
519a7fef26 bump docs/README.md to trigger a docs build (#59861) 2025-06-20 12:10:38 -06:00
Aleksandr Lesnenko
dc657da1cb disable metadata popovers when column header clicked (#59510) 2025-06-20 17:44:53 +00:00
Alex Yarosh
1825d9ea72 docs: more unsupported DBs for DB routing (#59864)
* more unsupported DBs

* Update docs/permissions/database-routing.md
2025-06-20 17:40:35 +00:00
Ryan Laurie
6126a40361 Move containers to common components (#59852)
* move containers to common components

* update imports
2025-06-20 11:08:06 -06:00
Alex Yarosh
24f8cefc56 Update installing-metabase.md (#59858) 2025-06-20 16:52:05 +00:00
Nicolò Pretto
9213639b44 log analytics event even if tracking is disabled (#59777) 2025-06-20 18:24:47 +02:00
Nicolò Pretto
0fa32c79f1 correct copy and icon on embed setup (#59850) 2025-06-20 16:19:31 +00:00
Ryan Laurie
44265e9d25 Move hooks/ to common/hooks (#59843)
* move hooks

* update imports
2025-06-20 16:00:50 +00:00
Brad Anderson
f475c78129 VIZ-1099 VIZ-1107 Improve dashboard look and feel - M2 Card titles and tab styles (#59659)
* VIZ-1099 Increases font-size of dash card titles
* VIZ-1099 Adds additional padding above card titles per design feedback
* VIZ-1107 Updates dashboard tabs to more closely match our standard tabs component
* VIZ-1107 Makes contrast less jarring for dashboard tabs in night mode while preserving embedding sdk customizability
* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-20 11:52:31 -04:00
Edward Paget
46588a1ef6 feat: an api for debugging permissions issues (#59583)
* feat: Add debugger API for card permissions

* fixup! initial set of PR feedback fixes

* fixup! add more information to data

* fixup! simplify queries

better arg names and docstring

* fixup! whitespace lint
2025-06-20 13:50:55 +00:00
Alex Yarosh
e32252fea4 no db routing for clickhouse (#59835) 2025-06-20 09:38:54 -04:00
Nemanja Glumac
ccf1f976ca Remove unused querying analytics (#59826) 2025-06-20 14:22:24 +02:00
Nicolò Pretto
0b5707fc97 fix: include sit-url in embedding-app-origins-interactive to make the (#59825)
preview work on cloud
2025-06-20 11:29:08 +02:00
Timofey Kachalov
d1d137319a Use dnd-kit for ChartSettingFieldsPicker (#59749) 2025-06-20 11:40:47 +04:00
github-automation-metabase
0831ff0d70 Bump io.trino/trino-jdbc from 475 to 476 (#59160)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-20 03:43:06 +00:00
github-automation-metabase
8081a68505 Bump org.bouncycastle/bcpkix-jdk18on from 1.80 to 1.81 (#59148)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-06-20 03:40:28 +00:00
github-automation-metabase
ff08209ceb Bump net.snowflake/snowflake-jdbc from 3.24.0 to 3.24.2 (#58765)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-06-20 03:39:37 +00:00
github-automation-metabase
f43e43f8ad Bump org.eclipse.jetty/jetty-server from 12.0.21 to 12.0.22 (#59153)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-20 03:33:28 +00:00
github-automation-metabase
e00ef81d03 Bump com.google.cloud/google-cloud-bigquery from 2.50.1 to 2.51.0 (#59155)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.51.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-20 03:33:13 +00:00
github-automation-metabase
2a55b86213 Bump org.mongodb/mongodb-driver-sync from 5.5.0 to 5.5.1 (#59158)
Inspect dependency changes here: https://github.com/mongodb/mongo-java-driver/compare/r5.5.0...r5.5.1

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-20 03:32:03 +00:00
github-automation-metabase
29f9071f99 Bump org.clojure/clojure from 1.12.0 to 1.12.1 (#59150)
Inspect dependency changes here: https://github.com/clojure/clojure/blob/clojure-1.12.1/changes.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-19 20:11:28 -07:00
github-automation-metabase
4bf5f38a96 Bump org.bouncycastle/bcprov-jdk18on from 1.80 to 1.81 (#59149)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-19 20:11:03 -07:00
github-automation-metabase
4cb8315580 Bump org.eclipse.jetty.ee9/jetty-ee9-servlet from 12.0.21 to 12.0.22 (#59152)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-19 20:10:54 -07:00
github-automation-metabase
cb9ac33d3b Bump io.netty/netty-common from 4.2.1.Final to 4.2.2.Final (#59157)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-06-19 20:10:11 -07:00
bryan
478cd9f933 add cloud docs (#59820) 2025-06-19 18:47:33 -04:00
Ryan Laurie
7bf69d33e0 Parse Back to prior release in release logs (#59196)
* Parse further back in release log

* escape unsafe html
2025-06-19 16:44:52 -06:00
Ryan Laurie
e89dc0b721 change fullwidth styling to match prior implementation (#59799) 2025-06-19 15:31:28 -06:00
Sloan Sparger
c1badf210c [Metabot] Do not allow root collection to be selectable as a metabot entity (#59648)
* do not allow root collection to be selectable as a metabot entity

* make can select fn optional
2025-06-19 16:30:33 -05:00
John Swanson
0e7a277d82 Disable database routing for clickhouse (#59806)
Clickhouse's databases are more like schemas, and Database Routing is
not working correctly.

For now, let's disable Database Routing for Clickhouse. In a followup PR
I'll write tests for other drivers to make sure DB routing is working
for them, if not we can disable them as well.
2025-06-19 13:53:52 -07:00
Raphael Krut-Landau
7f43a53cf0 Content translation: Add sample translations if dictionary is blank (#59569) 2025-06-19 15:46:16 -05:00
Nemanja Glumac
fb1c041353 Update e2e tokens in CI (#59754)
Updates the secrets references to the
  - "all features" token
  - "no features" token

They are now using newly generated tokens. Respectively:
- `MB_ALL_FEATURES_TOKEN`
- `MB_STARTER_CLOUD_TOKEN`
2025-06-19 22:11:38 +02:00
Edward Paget
030684868f chore: all permissions module access through core (#59416)
* chore: all permissions module access through core

* fixup! break circular dep

* fixup! some other broken kondos

* fixup! revert collections changes

* fixup! remove dynamic var from public api
2025-06-19 17:55:08 +00:00
Edward Paget
38715c57cc chore: remove dead with-allowed-... macro in card (#59660)
This macro does not do anything any longer the dynamic var it set is
only readed through the `update-card!` path and it was only used in a
path that called `t2/update!` instead.
2025-06-19 12:06:51 -05:00
Phoomparin Mano
c43bcc46d1 Allow more settings to be updated in new iframe embedding (#59487) 2025-06-20 00:04:41 +07:00
Ryan Laurie
83f7cf0fd9 quarantine flakiest e2e tests (#59759) 2025-06-19 11:41:58 -04:00
Romeo Van Snick
677473f773 Await popover to exist and have focus (#59782) 2025-06-19 17:06:35 +02:00
Ryan Laurie
a3fb318575 Use Side Nav for Performance Pages (#59702)
* performance app updates

* improve UI

* update tests

* fix db routing tests
2025-06-19 09:03:37 -06:00
Oleksandr Solovyov
e71dba060f update ring (#59775) 2025-06-19 16:00:49 +01:00
Braden Shepherdson
411f2ac8ea [MBQL lib] When removing clauses, match downstream refs correctly (#59634)
Fixes #59441.

Previously this was matching against the `returned-columns` of the
previous stage, but that's incorrect. Since we're trying to match stage
`k` refs we must match against stage `k` columns, not stage `k-1`.
2025-06-19 14:48:05 +00:00
Nicolò Pretto
58b2ac5b0d new_embedding_flow search param redirect (#59784)
* new_embedding_flow search param redirect

* add e2e test for analytics and for not messing with /setup events
2025-06-19 16:32:22 +02:00
Aleksandr Lesnenko
9e7943aeb5 fix chart crash when dimension aggregation is removed (#59740) 2025-06-19 10:15:47 -04:00
Nicolò Pretto
f8c015777c EMB-490 embeddig setup step seen event (#59712)
* EMB-490 embeddig setup step seen event

* fix types

* Update frontend/src/metabase/setup/components/EmbeddingSetup/steps/embeddingSetupSteps.ts
2025-06-19 15:41:43 +02:00
Thomas Schmidt
2b1efe414a Thomas/metabot cleanup sql context (#59674)
* Code cleanup
* Moves query analyzer to metabot-v3 module
* Consolidates SQL query analysis functionality under the metabot-v3 module to reduce cross-module dependencies
* Properly hydrate and pass schema for tables used in the native query for Metabot
* Adds tests
* Do not rely on is_native flag for fetching database schema in Metabot context
2025-06-19 13:38:38 +00:00
Nemanja Glumac
1b75ad7c5a Resolve a circular dependency in collections (#59685) 2025-06-19 13:27:05 +02:00
Alex Yarosh
51a7fdb409 docs - fix links (#59760) 2025-06-19 07:12:35 -04:00
Mahatthana (Kelvin) Nomsawadi
15dcbf0b7c fix(sdk): Fix flickered "Question new not found error" (#59696)
* Prevent flickered no question "new" found error

* Refix the bug
2025-06-19 11:50:35 +01:00
Timofey Kachalov
5703bc13d1 Apply proper SDK styling to the SortableList drag overlay (#59713) 2025-06-19 14:04:22 +04:00
Alex Yarosh
3f3b925eed redirects for category pages (#59579) 2025-06-18 21:31:50 -04:00
Alex Yarosh
6fe8a78990 docs: edit cards on dashboards (#59730)
* Update introduction.md

* Update docs/dashboards/introduction.md

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

* Update introduction.md

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-18 19:59:39 -04:00
Ryan Laurie
6a5566453f remove duplicate findRequests helper (#59726) 2025-06-18 16:58:38 -06:00
Ryan Laurie
65420ff3fd Update People + Groups Nav (take 2) (#59710)
* update people nav

* type fix

* use modern upsell

* fix e2e test, cleanup

* wider pages

* update tests

* update unit tests

* update titles and nav

* limit description width

* little updates
2025-06-18 22:56:19 +00:00
Ryan Laurie
15306c17e7 Light facelift for Tools + Troubleshooting (#59668) 2025-06-18 22:55:12 +00:00
bryan
a5acb871bb minor formatting (#59746) 2025-06-18 16:51:58 -06:00
Nathan Voxland
b10b0dce4b Make sure no inactive or archived tables and dashboards are shown in the popular items result (#59636) 2025-06-18 16:37:27 -05:00
Edward Paget
060ca28cc3 chore: remove unused partial permission checks (#59718)
These checks used to be used for the Database model's permission, but
are no longer after the move to the data permissions model
2025-06-18 20:44:23 +00:00
John Swanson
d2448daf08 Localize the trash name on memoized collection (#59662)
* Localize the trash name on memoized collection

* just defer translation on the `trash-collection`

When we're getting it explicitly rather than for all collections - for
the sake of speed here, since this was causing some issues with
serialization.

* parallelize

* docstring
2025-06-18 20:14:11 +00:00
Nick Fitzpatrick
c6a55b0f90 Fix re-rendering error modal on collection upload (#59073)
* fix re-rendering error modal on collection upload

* migrating file upload error modal, adding e2e
2025-06-19 01:36:50 +05:30
bryan
7c86d9d269 Fix docs workflow trigger action syntax (#59723) 2025-06-18 18:24:42 +00:00
bryan
9b42a0ae7b modify trigger to send source + target branches (#59575) 2025-06-18 12:03:11 -06:00
Ryan Laurie
610ee2e900 Revert "Update People + Groups Nav (#59363)" (#59703)
This reverts commit 50cf80b158.
2025-06-18 23:29:38 +05:30
Nick Fitzpatrick
658c1e4704 Small UI Fixes (#59644) 2025-06-18 22:05:07 +05:30
Nicolò Pretto
44e0478525 make database widget keyboard friendly (#59468)
* make database widget keyboard friendly

* restore role=option, as it's the correct one inside a listbox

* add unit test
2025-06-18 16:32:56 +00:00
Nicolò Pretto
b13dd15c41 embedding setup: prefill user details and update settings (#59694)
* update settings set in the processing step, closes EMB-499 and EMB-500

* EMB-486 prefill user details
2025-06-18 17:33:09 +02:00
Brad Anderson
03cf63892c Closes VIZ-162 - Stacked bar chart with mixed negative and positive values creates nonsensical percentage breakdowns in tooltips (#59138)
* VIZ-162 Updates percent calculation for stacked bar charts’ tooltips for bars with a mix of positive and negative values. Positive values are a percentage of the positive total and negative values are a percentage of the negative total.

* VIZ-162 Updates e2e tests to verify new stacked bar chart behavior
2025-06-18 10:02:28 -04:00
Timofey Kachalov
40f15d3ce7 Render Mantine and Echarts tooltips in a proper portal container for SDK (#59513) 2025-06-18 17:16:42 +04:00
Oleksandr Solovyov
f5b5de0dbd shorten filename to not overflow byte limit in some filesystems (#59625)
shorten filename to not overflow byte limit in some filesystems

in particular ext4 limits file name by 255 *bytes*, not chars, which is doable by using 3-byte chars

fixes #59233
2025-06-18 16:12:56 +03:00
Ryan Laurie
50cf80b158 Update People + Groups Nav (#59363) 2025-06-18 12:58:34 +00:00
Nicola Mometto
40d2b1bfa1 increment failed-fingerprints rather than the throwable object (#59627)
* increment failed-fingerprints rather than the throwable object

* fix: continue? needs updated stats
2025-06-18 11:18:50 +01:00
Uladzimir Havenchyk
bc4750a562 fix: css layout of time grouping errors (#59658) 2025-06-18 10:27:16 +03:00
Ryan Laurie
4523266d6c update metabot nav (#59440) 2025-06-18 00:40:27 +00:00
appleby
46fc871718 Add e2e reproduction for #35067 (#59584)
* Add e2e reproduction for #35067

Closes #35067

* Inline single-use query
2025-06-17 14:33:05 -07:00
Nicola Mometto
8150ee9bbd perf: filter json fields first (#59631) 2025-06-17 15:25:39 -04:00
Stas Gavrylov
4f376c4ce5 Fix storybook docs examples rendering (#59639) 2025-06-17 22:03:04 +03:00
Jeff Bruemmer
8540e3cc26 dev notes (#59643) 2025-06-17 14:51:45 -04:00
Sloan Sparger
3220b41358 [Metabot] Update the metabot team (#59649)
* update the metabot team

* remove trailing comma
2025-06-17 13:30:15 -05:00
Nathan Voxland
e00e7d8668 Clear checksums when rolling back from 55 (#59570) 2025-06-17 13:13:12 -05:00
Nathan Voxland
99dbd78088 Correct saving of pivot card metadata (#59283) 2025-06-17 13:03:41 -05:00
lbrdnk
7437bfc147 Add coerced-string-nums-dataset (#59568)
* Add coerced-string-nums-dataset

* Adjust coercion strategy
2025-06-17 19:33:19 +02:00
Nicolò Pretto
f67b4aae0e EMB-501 and EMB-503, review wording on the last step and flip order of code and preview (#59612)
* emb-501: Review wording so that it's not perceived as working

* EMB-503: Flip order of code and preview

* update top sentence
2025-06-17 18:43:05 +02:00
Alex Yarosh
3a9e1d2380 Update metrics.md (#59629) 2025-06-17 12:04:21 -04:00
Nathan Voxland
4e98918192 Support passing an environment file to jar-download (#59574) 2025-06-17 09:15:50 -05:00
Edward Paget
ab5465ec9b fix: card before update to not always force update (#59559) 2025-06-17 08:26:25 -05:00
Stas Gavrylov
653d9e616e Add TZ option to Cypress config to stabilize local testing (#59453) 2025-06-17 14:43:10 +03:00
Nicolò Pretto
21c90d92c3 set embedding-homepage visible as soon as we can (#59476)
* set embedding-homepage visible as soon as we can

* cleanup test

* reorder because it makes more sense

* Update frontend/src/metabase/setup/components/EmbeddingSetup/steps/UserCreationStep.tsx

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

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-06-17 11:49:59 +02:00
Mahatthana (Kelvin) Nomsawadi
6165712a53 Ignore ?locale search param in result downloads (#59243)
* Fix can't download static SQL question\

when a parameter only expects a single value

* Ignore `?locale` search param in result downloads

* Finish the comment

* Fix public action tests failing

* Address review: Call side-effect explicitly

* Preserve same behavior

* Flip boolean to make it easier to read

* Improve boolean condition

* revert the use of `isEmbeddingSdk` env until #59602 is fixed

* Add missing condition to retain the same behavior

* Fix more failing tests duh!

* Fix should sync logic for real this time.
2025-06-17 10:34:44 +01:00
Sloan Sparger
269009d1f3 [Metabot] Analyze chart improvements (#59449) 2025-06-17 06:44:05 +00:00
Thomas Schmidt
aa5dab0b8c Bot 188 sql features in chat (#59382)
* Use Metabot for FixSQL Button

* Enrich context with sql schema if user is viewing a native query (or the editor)
2025-06-17 07:53:08 +02:00
John Swanson
d710fb129f fix a flake (#59424)
just no reason to hardcode an ID like this.
2025-06-16 14:28:07 -07:00
Noah Moss
36573b38fa support pivots with between 31 and 63 breakouts (#59494) 2025-06-16 16:22:28 -04:00
Uladzimir Havenchyk
c7fb35e7fc test: fix flaky test (#59547)
* test: fix flaky test

* one more attempt

* debug

* one more time

* one more time

* one more time
2025-06-16 23:05:31 +03:00
bryan
558af5e372 add 'mage alias' fix help w/o bb installed (#59322) 2025-06-16 13:57:12 -06:00
Luis Paolini
537d4169ee Update upgrading-metabase.md (#58477)
* Update upgrading-metabase.md

Adding a note about upgrading between major versions

* Update upgrading-metabase.md

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-16 14:54:12 -04:00
Jacob Joseph
5846360d58 Update table.md (#59490)
Fixed wrong header level (was h2, should be h3)
2025-06-16 13:23:04 -04:00
lbrdnk
4410db3aea Fix searching for uuid column values in dashboard filter (#59272)
* Fix searching for uuid column values in dashboard filter

* Adjust so only the uuid fields are remapped for search

* Address review remarks
2025-06-16 18:51:56 +02:00
Alex Yarosh
59326bee8c update link (#59557) 2025-06-16 12:45:25 -04:00
Sébastien
f463fa21bc Closes VIZ-917 two data points for one series (second try) (#59546)
* trying

* no comment
2025-06-16 18:07:47 +02:00
Brad Anderson
a1cf3cbe6b Reverts VIZ-1080, needs more time for review (#59550)
* Reverts VIZ-1080, needs more time for review

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-16 11:41:07 -04:00
Raphael Krut-Landau
010c5510fc Fix padding in Heading visualization component (#59555)
This fixes a bug where the padding on a Heading would disappear when it was edited.

Before:

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/utGnP2ljFMMNOgi82vVn/b3cd934b-320b-4202-9619-1e1cad7b046d.png)

After:

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/utGnP2ljFMMNOgi82vVn/cc35902e-309a-4b02-8f6b-5d14295015e9.png)
2025-06-16 11:35:51 -04:00
Jeff Bruemmer
ba4b0a30c8 docs - note on db routing (#59549)
* note on db routing

* note on connection swapping

* add warning

* edits

* revisions
2025-06-16 11:13:23 -04:00
Ngoc Khuat
dc92ed99e3 Fix v_alerts incorrectly classify by the minute and custom schedule (#58468) 2025-06-16 14:45:00 +00:00
Nicolò Pretto
3e9ef060ed MVP of Embedding setup flow (#58853)
* Add embedding setup flow with multi-step wizard. Add EmbeddingSetup component with welcome, data connection, processing, and final steps. Create setupEmbeddingSettings action for configuring embedding and JWT. Add CodeSnippet component for displaying code examples. Set up proper routing for the embedding setup flow.

* Update embedding setup flow to actually create the database and handle errors. Update DataConnectionStep to display error messages.

* Fix linter errors in EmbeddingSetup component and setupEmbeddingSettings action

* Setup embedding flow: Remove SchemaSelectionStep, fix imports and types

* Fix linter errors and finalize embedding setup flow with navigation and original content restored

* Add EmbeddingSetupWrapper to provide context for embedding setup flow

* Fix table fetching in TableSelectionStep to use metadata endpoint

* Implement model and dashboard creation in ProcessingStep using /api/card endpoint

* Fix useEffect and useCallback dependencies and import order in TableSelectionStep

* working flow

* small tweaks

* sidebar with steps

* update snippet to use iframe embed

* better "Need assistance" positioning

* fix and refactor database and tables steps

* style final step

* bottom part of /final

* done step and idk i'm tired

* remove chevron and add syntax highlight as per feedback on the loom

* fix user not being loaded

* welcome step and final step

* remove dead code

* add query builder

* more stuff

* add comment about keepMounted

* set the proper settings during setup, fixes EMB-462 and EMB-461

* hide DatabaseStatus, fixes EMB-458

* "do later" -> link to /, closes EMB-456

* attempt at setting a max width, maybe closes EMB-454

* fix icons

* fix scrollbar on tall pages

* to refactor: wip link between setup and onboarding

* fix jumpy layout while moving across pages

* fix DatabaseStatus showing up after landing to the homepage

* Revert "to refactor: wip link between setup and onboarding"

This reverts commit b4c19da37d.

* wip user step

* revert changes to database status, we don't need those changes now that we're not in the routes that use the App component

* prevent going to setup/embedding if setup is already done

* table search

* restore original position of metabot to keep diff cleaner

* category + icon on search input

* restore routes structures

* add widht and height, fixes EMB-480

* remove "Need assistance" link, closes EMB-479

* change content in DoneStep, closes EMB-478

* removed /embed from the url

* empty set for search + layout adjustements, closes EMB-481

* removing things i commited by mistake

* locale selector, closes EMB-466

* cleanup unused code

* fix loading not being centered in table selection loading

* fix processingStatus i18n issue

* Remove undefined CSS custom property

* Revert "fix loading not being centered in table selection loading"

This reverts commit 8fda19338a.

* re-do the centering

* close EMB-473, refactor to be only one page

* move CodeSnippet in the file where it's used, it's not a generic
component for now

* Add a basic embedding onboarding E2E test (#59323)

* Add a basic E2E test

* Add missing import

* Finish assertions

* Wait for DB sync

* Hide DB sync status, so Cypress could click a button

* Fix test on CI

* Fix E2E after upstream change

* Some adjustment to make CI passes

* Wait for loader to disappear to avoid failing CI

* Simulate being on cloud

* Addresses review feedback

* fix sidebar steps, titles and visibility

* fix another wrong string

* Update frontend/src/metabase/setup/components/EmbeddingSetup/EmbeddingSetupSidebar.tsx

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* address pr feedbback

* fix error ui in table selection

* add useForceLocaleRefresh to table step

* update label on test too

* more label updates

* Properly refetch database API

* Add DB sync retries assertion

* fix the retry of the database sync

---------

Co-authored-by: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-06-16 16:20:31 +02:00
Riley Thompson
1d89072891 Add regression tests for clickhouse (#59348)
* add regression tests

* Add issue references

* make double comment test driver agnostic

* make tests more agnostic

* format

* make another test agnostic

* add prometheus metrics

* add driver query metrics test

* test against failed count

* move clickhouse native tests back, remove parallel from metrics query test

* fix kondo

* add todo attribution

* disable 0.8.4 broken tests, re-enable 0.8.6 broken tests
2025-06-16 10:16:58 -04:00
Uladzimir Havenchyk
35fa63c63a fix: allow dragging editor border to completely hide it (#59335)
* fix: allow dragging editor border to completely hide it

* add test

* cleanup

* add animation

* fix leftovers

* fix overflow
2025-06-16 12:13:09 +00:00
metamben
76da6d5382 Resolve visibility in query instead of filtering with mi/can-read? (#59360)
* Resolve visibility in query instead of filtering with mi/can-read?

---------

Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
2025-06-16 12:09:22 +00:00
Romeo Van Snick
c3674747f4 Close table header popover with escape (#59262)
* Manually close popover on escape

* Add repro for metabase#55673

* Revert "Manually close popover on escape"

This reverts commit cce85f0882.

* Trap focus in click actions popover

* Remove unneeded closeOnEscape
2025-06-16 12:00:22 +02:00
Fraser
e537911bc3 Scroll element into view before checking visibility (#59531) 2025-06-16 20:37:49 +12:00
Timofey Kachalov
c21360e3bd Update the SDK version for the latest npm tag (#59532) 2025-06-16 08:31:56 +00:00
Timofey Kachalov
7ba6f246f3 Fix sample app dev bundle tests (#59511) 2025-06-16 12:13:50 +04:00
Jakub Chodorowicz
33fc7acca9 Dev-601-format-storybook-folders-with-prettier (#59190)
* Format with prettier .storybook folder

* Skip reformatting mockServiceWorker file

* Format storybook folders with prettier on pre-commit
2025-06-16 09:16:22 +02:00
Ryan Laurie
6d5393cfeb Settings Visual Updates (#59140)
* Routing + Nav

* Add SettingsSection everywhere

* Remove tabs from WhiteLabel pages

* Remove tabs from auth pages

---------

Co-authored-by: Fraser McIntosh <fraser@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-16 09:38:58 +12:00
Raphael Krut-Landau
0860a98a1e Support translation of user-generated content in statically embedded questions and dashboards (#56879) 2025-06-13 21:23:44 -04:00
Aleksandr Lesnenko
f040ca027c fix object id column size (#59505)
* fix object id column size

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-13 20:47:42 -04:00
appleby
876368b12d Add some tests for implicitly-joinable visible-columns (#59227)
* Add missing :ident to :model/products-and-reviews mock card

* Add tests for implicitly-joinable visible-columns

* Add more context and cross-reference the comment about implicit-self-join-test

* Put keyword first when looking up entries in lib.tu/mock-cards
2025-06-13 16:45:31 -07:00
Alex Yarosh
8b0cd97ab9 relativedatetime truncates (#59501) 2025-06-13 18:57:40 -04:00
Uladzimir Havenchyk
39b274db1b Native time groupings (#58180)
* process-query supports temporal-unit template tags in native queries (#57295)

The query processor understands temporal-unit template tags and can parse and compile
`{{mb.time_grouping('param', 'table.column')}}` appropriately.  This does not include lib or frontend support and this
feature is not yet usable outside of manually making a query and passing it to qp/process-query.

* Update metabase.lib.native to understand mb.time_grouping parameters (#57506)

This adds lib support for time_grouping parameters. To do that, it pulls out the parsing logic from the driver code and pulls it into lib, where both the driver and lib can use it. The frontend still doesn't support these parameters, so while you can technically type in and run a query with a time_grouping parameter, the frontend behaves oddly if you try.

* implement frontend for time grouping in native queries (#57849)

* Update metabase.lib.native to understand mb.time_grouping parameters

* move parse-param tests

* keep picky behavior of old tagfinding

* fix ns alias

* fix ns declaration for cljs

* add lib tests for finding function tags

* remove resurrected file

* fix rebased code

* fix linting

* update doc string

* fix modules

* implement frontend for time grouping in native queries

* fix modules

* fix validation bug

* update sidebar

* fix typecheck

* fix styles

* use correct icon

---------

Co-authored-by: William Zimrin <william@metabase.com>

* implement dashboard mapping to time grouping parameters (#57931)

* Update metabase.lib.native to understand mb.time_grouping parameters

* move parse-param tests

* keep picky behavior of old tagfinding

* fix ns alias

* fix ns declaration for cljs

* add lib tests for finding function tags

* remove resurrected file

* fix rebased code

* fix linting

* update doc string

* fix modules

* implement frontend for time grouping in native queries

* fix modules

* fix validation bug

* update sidebar

* fix typecheck

* fix styles

* implement dashboard mapping to time grouping parameters

* filter columns properly

* fixup

* fixup

* temporal-unit tags use variable targets

* fix backend tests

* use variable

* cleanup

* add handling for required params

* update copy and fix required toggle usage

---------

Co-authored-by: William Zimrin <william@metabase.com>

* tests for native query time grouping (#58091)

* Update metabase.lib.native to understand mb.time_grouping parameters

* move parse-param tests

* keep picky behavior of old tagfinding

* fix ns alias

* fix ns declaration for cljs

* add lib tests for finding function tags

* remove resurrected file

* fix rebased code

* fix linting

* update doc string

* fix modules

* implement frontend for time grouping in native queries

* fix modules

* fix validation bug

* update sidebar

* fix typecheck

* fix styles

* implement dashboard mapping to time grouping parameters

* filter columns properly

* fixup

* fixup

* temporal-unit tags use variable targets

* fix backend tests

* use variable

* cleanup

* add handling for required params

* update copy and fix required toggle usage

* reset default value if time grouping option is excluded from the list of available options

* add tests

* drop not planned test

---------

Co-authored-by: William Zimrin <william@metabase.com>

* add tests for mapping of native query to temporal unit parameter (#58161)

* rework tag editor sidebar and related files to typescript (#58283)

* revert default required logic (#58568)

* revert default required logic

* fix test

* add native query validation of time grouping syntax (#58426)

* add basic fe validation for native queries

* fixup

* add cljs function for validating native queries

* make validate function take a full query and work in cljs

* add backend/cljc tests for validate-native-query

* improved error messages for validate-native-query tests

* use a new dianostics method from lib

* fix clj linting

* update sidebar styling

* fix initial state

* adjust error styling

* fix tests and drop not valid anymore code

* fix linting

* favor first template tag found and update tags when type changes

* validate that temporal unit function parameters aren't empty

* add e2e tests

* convert day/week/month/quarter/year groupings to dates

* fix empty param

* only convert days to dates

* finally actually make date conversion work correctly?

* address review

* adjust tests to the latest changes

---------

Co-authored-by: William Zimrin <william@metabase.com>

* rename test

* update native query time grouping tests to be more comprehensive (#58814)

* Fix time grouping tests (#58878)

* validate time unit parameters and fix bug (#58993)

* Fix and test nil values for native time groupings (#59062)

* add e2e tests for optional usage of time grouping (#59045)

* add e2e tests for optional usage of time grouping

* cleanup

* fixup

* update test

* fix class reference

---------

Co-authored-by: William <william@metabase.com>
2025-06-13 18:49:29 -04:00
Tyler Plude
184d6a5b6d Fixes import warnings in shared js color getter bundle (#58445)
* Fixes import warnings in shared js color getter bundle

* fix static viz backend errors

* remove commented line

* pr feedback
2025-06-13 15:43:22 -07:00
Nathan Voxland
2628e7874d Added validation for email-from-name (#59330) 2025-06-13 17:12:59 -05:00
Alex Yarosh
5b83c629d9 docs: update pivot docs (#59492)
* pivots

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-13 20:37:25 +00:00
Aleksandr Lesnenko
18ff09c54a adjust measured cells spacing (#59475)
* adjust measured cells spacing

* Update Loki Snapshots

* update specs for new widths

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-13 19:24:02 +00:00
William
3e0e2c6b99 Add setting to disable reusing a dashboard's last used parameters (#59293)
Set MB_DASHBOARDS_SAVE_LAST_USED_PARAMETER to false to disable saving.
2025-06-13 14:22:46 -05:00
Uladzimir Havenchyk
c55139ed0c chore: cleanup native editor after refactoring (#59281)
* chore: cleanup native editor after refactoring

* rename type

* fix types
2025-06-13 17:56:55 +00:00
Jeff Bruemmer
623523c6fc docs - alert note (#59481)
* note on disposable alerts

* edit

* alerts permissions note

* summary

* phrasing
2025-06-13 13:52:31 -04:00
Riley Thompson
7d306e5884 Revert clickhouse to 0.8.4 (#59470)
* revert to 0.8.4

* manually revert changes that depended on 0.8.6

* other fixes for 0.8.4
2025-06-13 12:28:51 -04:00
Edward Paget
eabbba2463 fix: make the jwt idp uri a required setting (#59344)
The SDK now requires the jwt uri to be set to function in version 55
this enforces that requirement on the admin page.
2025-06-13 16:21:12 +00:00
Nathan Voxland
2c567ae30f Removed query analysis backend code (#58816) 2025-06-13 10:39:47 -05:00
Sloan Sparger
135ba04d91 [Metabot] Guard ai entity analysis (#59339)
* guard ai entity analysis

* fix types

* add token feature to BE

* Add :ai_entity_analysis premium feature to token feature test

* iteration

* fix bad reference

---------

Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
2025-06-13 09:00:36 -05:00
Brad Anderson
2f1de41467 VIZ-1020 Updates text card "extra large" breakpoint version so it's only applied on full-width dashboards since fixed-width dashboards don't have enough height to display it without scrollbars (#59437) 2025-06-13 09:38:20 -04:00
metamben
172fe61ae5 Select the most viewed tables when generating SQL queries (#59359)
Fixes BOT-181
2025-06-13 15:17:42 +02:00
Oisin Coveney
18a8fdbf6d remove isJwtProviderSet booleans (#59459) 2025-06-13 14:35:00 +03:00
Sloan Sparger
f41897df9d add a startNewConversation helper (#59423) 2025-06-13 13:32:36 +02:00
Oisin Coveney
64887b6369 Rename initialDashboardId to dashboardIdProp (#59457) 2025-06-13 10:06:50 +00:00
Oisin Coveney
fa9d884b60 Convert TitleAndDescription to typescript (#59413) 2025-06-13 11:52:14 +03:00
Oisin Coveney
055e8b0b66 [EMB-327] MS1: Add Dashboard Context (#57595) 2025-06-13 11:44:59 +03:00
Mahatthana (Kelvin) Nomsawadi
a442965526 Remove unnecessary horizontal scroll on static embed sharing modal (#59230)
* Remove unnecessary horizontal scroll on static embed sharing modal

* Fix undefined CSS custom property via linter

* fix tests

* Fix the style regression from the previous commit
2025-06-13 04:27:23 +01:00
Fraser
52dd381e5b Replace deprecated LeaveConfirmationModal (#54999)
* Replace deprecated LeaveConfirmationModal
2025-06-13 10:20:02 +12:00
Brad Anderson
490320b47e VIZ-1079 VIZ-1080 - Improve dashboard look and feel with low-hanging polish - M1 "just do" (#59267)
* VIZ-1079 Tweaks dash card border, shadow, and radius
* VIZ-1080 Removes left padding from section headings and text cards (excludes edit mode)

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-06-12 18:18:31 -04:00
Edward Paget
4b90bd4e78 fix: improve effective children performance (#59004)
* fix: improve effective children performance

on the /items endpoint by reusing the permission CTE

Co-Authored-by: John Swanson <john.swanson@metabase.com>

* fix: remove n+1 hydration call for card children

* fix: remove case/whens in sort statements

* fix: scope search results for modal to collections

Co-Authored-By: Nathan Voxland <nathan@metabase.com>

* fix: function to convert to collection items

* fixup! PR suggestion

Co-Authored-By: Ryan Laurie <ryan@metabase.com>

* fixup! add row-lock fixture for mariadb flake

* add debug for failing test

* fixup! make sure api/bit->boolean is called first

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Ryan Laurie <ryan@metabase.com>
2025-06-12 22:14:27 +00:00
Nick Fitzpatrick
019b997680 adding Native Query Editory shortcuts to glossary (#59372) 2025-06-13 00:46:24 +05:30
lbrdnk
44bf519b74 Use substring optimization on any text fields (#59061)
* Use substring optimization on any text fields

* Add integration test for coercion
2025-06-12 21:13:04 +02:00
Cam Saul
c686b3a7b9 More misc QP/Lib cleanup (#59354)
* Support type deduction for `case` and `coalesce`

* Revert accidental changes

* Fix CLJS tests

* More misc QP/Lib cleanup

* Test fixes 🔧

* Test fixes 🔧

* Add `:type/HasDate` and `:type/HasTime` to the type hierarchy

* Additional fix 🔧

* Improved type calculation logic

* Fix QUE-1358

* Test fixes 🔧
2025-06-12 16:31:33 +00:00
Nemanja Glumac
0fd603f9cc Revert the "Add data modal" from master (#59364)
* Revert "Address review comments from #58408 (#58785)"

This reverts commit ed6e5591e3.

* Revert "Introduce the option to add data from the sidebar via "Add data" modal  (#58408)"

This reverts commit de780f53cd.

* Reflect changes from #58405
2025-06-12 10:30:58 -06:00
Nicolò Pretto
eb6fa6052c test: add basic tests for interactive embedding with sso (#58698) 2025-06-12 16:40:29 +02:00
Timofey Kachalov
8a8217b323 Update react-virtualized-to-9.22.6 (#59343) 2025-06-12 18:28:15 +04:00
Timofey Kachalov
3b9bcc1158 Remove back push filters for embedding-sdk.yml (#59406) 2025-06-12 18:22:26 +04:00
Sébastien
57f96b1561 Closes VIZ-1111 no chevron in edit mode (#59300)
* closes VIZ-1111 no chevron in edit mode

* e2e -> unit
2025-06-12 16:03:45 +02:00
Nicola Mometto
d2bb428aa5 Revert "Ensure we use a different connection per have-select-privilege? call (#58620)" (#59400)
This reverts commit 13dedb2e85.
2025-06-12 14:58:56 +01:00
Sébastien
2504278fd1 Closes VIZ-1098 copy on settings (#59299) 2025-06-12 15:36:23 +02:00
Uladzimir Havenchyk
9379998665 chore: upgrade rspack to address webpack-dev-server vulnerability (#59384) 2025-06-12 15:36:28 +03:00
Chris Truter
1b3e52d285 Add workflows as codeowner for metabase.actions (#59386) 2025-06-12 12:29:06 +00:00
Timofey Kachalov
3f484a9198 Use latest docker-compose for Sample App e2e CI (#59385) 2025-06-12 16:12:34 +04:00
Braden Shepherdson
1175848a78 [MBQL lib] Update downstream refs after swapping clauses (#59318)
Fixes #59273.
Fixes #48306.

Swapping two clauses can change their names, eg. two sum aggregations
`sum` and `sum_2`. Since refs in later stages are based on those names,
the refs need updating to track the same column, rather than change
targets.

`lib.remove-replace` already has logic for this when replacing a clause,
it was readily reused here. I added tests for swapping aggregations and
multiple breakouts of the same column.

Note that viz settings (also based on the names) are not updated as part
of this PR. There are separate bugs open for that issue both when
removing a clause and reordering them.
2025-06-12 11:47:01 +00:00
Nicola Mometto
0b06002dd5 Performance + memory usage optimisations for json unfolding during sync (#59122)
* a bit lazier table->unfold-json-fields

* remove need for dynamic var

* more optimised

* don't leak json parsers

* code style

* better perf

* short circuit earlier in case of a lot of nested fields

* add to changelog

* rename
2025-06-12 10:20:27 +00:00
Mahatthana (Kelvin) Nomsawadi
30405beba7 fix(sdk): Remove unhelpful error Error: null (#59168)
* Don't log `Error: null` on the SDK

* Assert error another way
2025-06-12 10:10:07 +01:00
Mahatthana (Kelvin) Nomsawadi
106a53e50c Fix can't download static SQL question\ (#59164)
when a parameter only expects a single value
2025-06-12 10:09:19 +01:00
Cam Saul
b908c7a826 Support type deduction for case and coalesce (#59331)
* Support type deduction for `case` and `coalesce`

* Revert accidental changes

* Fix CLJS tests
2025-06-12 02:34:18 +00:00
Alexander Polyankin
ac42020ffb Fix single and multi-value string filter widget for non-string columns (#59352) 2025-06-11 20:01:04 -04:00
Jakub Chodorowicz
194f33bd58 PRG-49 Add token missing banner (#59030)
* Add icon color support to the banner componet and story

* Add token missing banner rules

* Add token missing banner rules

* Add useLicenseTokenMissingBanner tests

* Dismiss license banner in e2e tests by default

* Improve flag naming in LicenseTokenMissingBanner

* Add banner story - non-closable

* Use regular double quotes for simple string

* Remove duplicated CSS property

* Improve docstring for license token missing banner setting

* Fix wrong property name in the test

* Remove empty align property

* Use existing setupUpdateSettingEndpoint mock

* Extract constants out of the function

* Use ready mock helpers in tests

* Refactor mock setup function to conform to existing standards

* Share the dismissal date between all admins

* Use admin settings APIs to interact with dissmisal state

* Improve banner dismissal test

* Use regular settings API to access license token banner dismissal fetch
2025-06-12 00:21:25 +02:00
Edward Paget
7c7b8c0ffa fix: set-table/db-permissions! in single txn (#58804)
* fix: set-table/db-permissions! in single txn

Update set-table-permissions! and set-database-permissions! to build
lists of all necessary changes based on the requested permissions
updates and then execute those changes in a single transaction to avoid
possible deadlocks in the recursive calls.

* fixup! incorrect doc string
2025-06-11 20:14:08 +00:00
Case Nelson
e502e8c313 fix: snowflake keep additional-options with private key (#59287) 2025-06-11 14:01:25 -06:00
Alberto Perdomo
a2da60735b Add admin settings step to JWT SSO SDK upgrade guide (#59332)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-11 20:43:05 +01:00
Edward Paget
741cc32efe fix: resolve TODO for empty app db (#58673)
* fix: resolve TODO for with-empty-2h-app-db

* fixup! revert permissions_tests changes

* fixup! keep change to use only public perms api
2025-06-11 19:32:26 +00:00
Ryan Laurie
72115f8077 use the right color prop for the settings gear (#59347) 2025-06-11 19:14:41 +00:00
Edward Paget
1b21d9e703 fix: audit migration for schema casing (#59346)
We can have tables in migrated instances that have two copies of the
audit db tables one with a 'public' schema and one with a 'PUBLIC'
schema. This handles that case.
2025-06-11 18:57:35 +00:00
Timofey Kachalov
fd85a8b2c5 Disable npm audit for host apps (#59302) 2025-06-11 22:47:54 +04:00
Cam Saul
cc5ece8941 Misc QP/Lib cleanup (#59336)
* Misc QP/Lib cleanup

* Test fix

* Kondo fix

* Flaky test fix
2025-06-11 14:44:25 -04:00
Rwakasiisi Edwin
40898a8923 docs - update visualizing-results.md to remove repetition (#59345) 2025-06-11 14:08:32 -04:00
Jeff Bruemmer
c00f99a8a2 docs - note on dev instances (#59326)
* note on dev instances

* edit
2025-06-11 13:54:27 -04:00
Sloan Sparger
386b0c1180 [Metabot] Suggestions UI improvements (#59320) 2025-06-11 12:54:21 -05:00
Jeff Bruemmer
d8da5514a1 early access program link (#59328) 2025-06-11 13:53:32 -04:00
Cam Saul
93844dde9b Do not normalize escaped join aliases (QUE-1353) (#59327) 2025-06-11 17:32:14 +00:00
Edward Paget
22baf07864 feat: add parameter card dashboard api tests (#59205)
* chore: add parameter card api tests

* fixup! add row lock fixture to avoid a flake
2025-06-11 11:41:06 -05:00
Sloan Sparger
572463d93a [Metabot] Unit test flake fix (#59321)
* fix flaking unit test

* run enterprise tests on change
2025-06-11 11:23:40 -05:00
Eric Normand
5631b69254 Remapped columns in model should not break (#59124)
* Add test for 23449

* Let -> const

* Better tests.

* Better tests still

* Better saving code

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

* Better test name

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

* Whitespace

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-06-11 15:13:18 +00:00
Romeo Van Snick
5b3f884cf5 Add repro for "Longer filter values overrun the screen when a single value is selected" (#59258)
* Add repro for metbase#44090

* Also test values without spaces
2025-06-11 17:05:49 +02:00
Alex Yarosh
74cc4496a7 docs: customize logging levels (#59290)
* logging

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-11 14:43:44 +00:00
Ryan Laurie
5c30345bdb Remove Query Validator Frontend (#58738)
* remove query-validator-fe

* remove e2e

* remove another ref
2025-06-11 07:54:34 -06:00
Sloan Sparger
6c15c95f6a [Metabot] Suggested prompts (#58823)
* FE wip

* more FE progress

* last big pass at UI

* url page param sync, show model name, move new code to new file

* remove pagination in url and add link to new metabot convo

* unit testing

* finish tests

* move prompt result fetching outside of metabot agent hook and into chat sidebar

* fix constant reference

* fix

* Add metabot prompts and wire up AI service

* Return prompt suggestions for cards visible by the user

* pr feedback

* Test metabot-scope

* Add BE tests

* Fix tests and kondo issues

* Fix tests and kondo issues

* Fix tests more

* Fix serialization

* Fix serdes more

* Use MySQL compatible delete syntax

* have FE use new regenerate endpoint instead of delete

* change mocked status code

* fix flaking unit test and fix failing MetabotAdminPage spec from wrong mocked pagination value

* Add prompt regeneration endpoint

* Document prompt regeneration endpoint

* fix test flake

* doh... fix the right test this time

* Use the collection configured int the app-db in answer-sources

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-06-11 16:31:38 +03:00
Uladzimir Havenchyk
0d61f1dc9f chore: split NativeQueryEditor to components (#59217)
* chore: split NativeQueryEditor to components

* pass missed parameter
2025-06-11 14:41:03 +03:00
Timofey Kachalov
5879a72692 Add more dependencies to SDK's packages.json (#58780) 2025-06-11 13:24:56 +04:00
Ryan Laurie
13e7b728bb Use Mantine TextInput in InputBlurChange (#58931)
* Use Mantine TextInput in InputBlurChange

* fix InputWithSelectPrefix

* fix tests
2025-06-11 00:07:50 +00:00
Tyler Plude
fa987a1031 Bump hawk version (#59282) 2025-06-10 15:51:48 -07:00
Fraser
7e2a6fd82b Prevent long dashboard names Inline (#59228)
* Limit input to 100 chars
2025-06-11 10:50:22 +12:00
Jeff Bruemmer
9522b3553b add blockquote for db routing (#59285) 2025-06-10 22:00:06 +00:00
Alexander Polyankin
1e0151089e Add e2e repro (#59270) 2025-06-10 14:57:20 -04:00
Oisin Coveney
875d28d5e0 docs(sdk): Add upgrade instructions for new auth flow (#59248)
* Add more docs

* Update authentication.md

* Apply suggestions from code review

* revisions

* edits

* note on saml

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-10 18:58:58 +01:00
Oleksandr Yakushev
bbcc5c8da6 Bump Malli to 0.19.1 (#59271) 2025-06-10 20:34:06 +03:00
Alexander Polyankin
9b0e848524 Fix filtering for string SQL columns (#59216) 2025-06-10 16:31:52 +00:00
Nemanja Glumac
1adc1c277a Fix the stale database cache when we enable or disable uploads for a certain database (#59184) 2025-06-10 17:41:00 +02:00
Timofey Kachalov
3bcdb8ae5d fix(sdk): wait for locales to be loaded before rendering SDK components (#58566) 2025-06-10 19:09:34 +04:00
Sébastien
cc50572fed Cloes VIZ-1098 polish for approximate number of intervals setting (#59254) 2025-06-10 16:55:16 +02:00
Alexander Polyankin
e0633df84c Show only valid linked filters in dashboards (#59084) 2025-06-10 10:17:22 -04:00
Riley Thompson
d3940c48f9 Revert "Fix hive-like trivy warnings (#58977)" (#59226)
This reverts commit f9396a3131.
2025-06-10 09:10:18 -04:00
Alberto Perdomo
875cde2f6f Add limitation about CSS vars in SDK theming (#59238)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-10 12:53:17 +00:00
Kamil Mielnik
4d295519b8 Upgrade browserslist db (#59240)
- npx browserslist@latest --update-db
2025-06-10 09:51:54 +00:00
Oisin Coveney
61bf62e6b9 feat(sdk): Add Visualization Button, hook, and onRun event (#58080) 2025-06-10 11:22:57 +03:00
Case Nelson
8e161473ed refactor: introduce driver-api (#59011)
* refactor: introduce driver-api

* Add kondo linting

* Handle kondo

* self review

* Clean up imported vars

* Rename qp.error-types

* Fix missed clickhouse ref

* Fix init settings

* Fix table alias error

* Fix kondo error

* Fix mistake mbql.s

* Fix var ref for get-method and kondo module config

* Fix dynamic vars

* Ignore exported multifns in changelog check

* Fix desired-alias in rewrite clause

* Use snowflake-jdbc-thin to avoid registering the embedded bouncycastle provider

* Update merged code for driver-api
2025-06-09 21:07:49 -06:00
Riley Thompson
f9396a3131 Fix hive-like trivy warnings (#58977)
* standalone with override deps

* format deps

* remove unnecessary deps

* add clarifying comment

* remove standalone, fix all warnings
2025-06-09 18:46:28 -04:00
Braden Shepherdson
45ef5471b6 [MBQL lib] Fix underlying-records drill on breakout of custom column (#59218)
Fixes #59005.

The FE-supplied `:dimension` column was being used directly, when it needs to be looked up anew on the massaged query.
2025-06-09 20:50:06 +00:00
William
ecf6b108a4 Fields values work for secondary series in a dashcard (#59076)
Field values check both :card and :series for the relevant card
2025-06-09 20:39:56 +00:00
William
46460a72d8 Select fields with parent-ids and hide parents by default (#58730)
In postgres, json fields are hidden by default, and we just show their children instead.  However, mongo fields and
bigquery struct fields work differently -- we default to just showing the parent, even though the ui claims that all
fields are selected.  This makes mongo and bigquery work like postgres.

In addition, this fixes a presumably-longstanding bug where mongo had incorrect column names when selecting both a
parent its child.  Basically, you can't ask mongo for both a parent and its child.  The returned data is just json, so
asking for the parent field includes all of its children.  Instead, mongo just errors when you try to make a request
like that.  As a workaround, the mongo driver was just requesting and returning the child fields.  This meant that it
was returning a different number of fields than expected, which confused annotate.

Now, the mongo query processor only selects for parent fields, because as mentioned, parent fields include their
children.  However, it also keeps track of all the fields we asked for in :projections, so when we get data back, we
know to pull all of those fields out of the returned data.
2025-06-09 20:38:28 +00:00
Jeff Bruemmer
e132bc2b3f notes (#59214) 2025-06-09 18:04:49 +00:00
Jeff Bruemmer
c9d8bda4e2 docs - data picker option (#59136) 2025-06-09 13:44:51 -04:00
Jeff Bruemmer
1d861f3bd0 docs - native editor menu (#59204)
* update sql snippet

* update images
2025-06-09 13:44:15 -04:00
Jeff Bruemmer
da0fa68410 docs - dev instances (#59186)
* dev instances

* link

* notes on tokens
2025-06-09 17:42:49 +00:00
Nathan Voxland
06868930d5 Better detection of card metadata changes (#59131) 2025-06-09 12:07:51 -05:00
Edward Paget
0493b2ab06 fix: check for row existence in parameter upsert (#59127)
* fix: check for row existence in parameter upsert

Do an exists check instead of relying on the result of `update!` being
zero. `update!` can return zero either when a row does not exist or when
there are no applicable changes in the request.

* fixup! use medley/mapply instead
2025-06-09 11:23:27 -05:00
John Swanson
167b5d0457 fix a tiny flake (#58902) 2025-06-09 08:56:23 -07:00
John Swanson
e6ae405f1b CI debugging improvements (#58883)
* test logs as artifact

* better test logs

* debugging improvements

* fix `with-context` query to work with non-literals

```
(with-context {:foo "bar"}
 ...)
```

worked,

```
(with-context (merge {:foo "bar"} {:bin "baz"})
 ...)
```

did not, now it does!

* add compiled query args to context

* kondo

* compact logs

* use an `:after` method

* use defonce to avoid repeated `test-var` overwrite
2025-06-09 08:56:14 -07:00
Timothy S. Dean
6911ca0034 Provide column-header filter drilling for serializedJSON (#59015)
* Stop excluding structured columns from column-filter drill throughs.
* Add tests that all kinds of structured columns are handled appropriately
2025-06-09 09:27:05 -06:00
Nathan Voxland
0f472619a1 Applied minor code style suggestions (#59116) 2025-06-09 10:23:08 -05:00
Luiz Arakaki
45ec88bcf6 __METABASE_ROUTER__ instead of primary db (#59189) 2025-06-09 11:55:46 -03:00
Nathan Voxland
d52ceacb85 Don't count dashboard subscriptions as a reason to count a card as recently viewed (#59080) 2025-06-09 09:48:25 -05:00
Raphael Krut-Landau
49d98e3bdf In the main nav, move 'Browse databases' above 'Browse models' (#58405) 2025-06-09 13:59:16 +00:00
Ryan Laurie
f72cb7a95f skip upload test results to trunk for draft PRs (#59012) 2025-06-09 06:44:14 -06:00
John Swanson
25949f7010 no archived collections in perm graph (#59065) 2025-06-09 05:39:21 -07:00
Vamsi Peri
a203a07465 Reduce log level to debug for some sync logs (#59161)
* Reduce log level to debug for some sync logs

* Update describe_table.clj
2025-06-09 08:23:19 -04:00
Uladzimir Havenchyk
124f99efa6 chore: replace lib/time with lib/time-dayjs where it is possible (#58852) 2025-06-09 10:22:21 +03:00
Mahatthana (Kelvin) Nomsawadi
f5c3e19c20 Properly expose initialParameters on dashboard components (#59115) 2025-06-09 06:27:44 +01:00
Case Nelson
505ce6bf19 fix: increase starburst percentile acceptable epsilon (#59129) 2025-06-06 14:41:54 -06:00
Uladzimir Havenchyk
eb71b07554 chore: typo in the function name (#59103) 2025-06-06 23:09:16 +03:00
Ryan Laurie
b74a36e201 Move routing out of SettingsEditor (#58905)
* Move Routing to React Router

* update tests

* fix command palette import

* Add some more tests

* remove dead code
2025-06-06 19:44:28 +00:00
Nick Fitzpatrick
9a6a8bc2db Auto Focus save button on the SaveQuestion Modal (#59093)
* Auto Focus save button on the SaveQuestion Modal

* adjusting e2e tests
2025-06-07 01:10:53 +05:30
Nick Fitzpatrick
fde212f961 Use Resize Observer to set google button width (#59125)
* Use Resize Observer to set google button width

* remove shame
2025-06-07 00:31:27 +05:30
John Swanson
4541eeb4ac s/mirror database/destination database/g (#58438) 2025-06-06 09:32:11 -07:00
Sébastien
1873505e72 closes VIZ-187 double scrollbar on viz settings (#59095) 2025-06-06 17:29:47 +02:00
Romeo Van Snick
6e3aca9d5a Remove flash of default title when saving a question (#59094)
* Use existing name when possible

* Add repro for metabase#55631

* Fall back to empty string
2025-06-06 17:27:26 +02:00
Jeff Bruemmer
f7f44f2538 update table docs (#59068) 2025-06-06 11:23:50 -04:00
Phoomparin Mano
12351f93d8 fix(sdk): omit jwt token response from error messages (#59108) 2025-06-06 21:27:20 +07:00
Phoomparin Mano
401a3f5a03 End-to-end tests for SSO authentication for new iframe embedding (#58939)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-06-06 14:24:24 +00:00
Ryan Laurie
2f6f6d8cd1 Update Slack Settings (#59072)
* Update Slack Settings

* fix button copy

* Update localization

* dont swallow errors

* delete more stuff!
2025-06-06 14:20:46 +00:00
Ryan Laurie
d22c0b93b7 fix typo in authcard (#59101)
* fix typo in authcard

* add translation context
2025-06-06 07:49:22 -06:00
Uladzimir Havenchyk
16efcf7bc4 chore: replace moment with dayjs in unit tests (#59105) 2025-06-06 16:45:20 +03:00
Phoomparin Mano
5a6dffed11 refactor(sdk): rename authMethod to preferredAuthMethod (#59099) 2025-06-06 20:27:59 +07:00
Phoomparin Mano
95d2db505a SSO authentication for new iframe embedding (#58567) 2025-06-06 19:43:56 +07:00
Kamil Mielnik
a6544c6cae SEM-359 Toasts shown when nothing changed (#58946)
* Fix SEM-359

* Update ChartSettingInput interface

* Add repros
2025-06-06 15:25:26 +07:00
Kamil Mielnik
f99fe8e922 Remove debugging code (#59041) 2025-06-06 13:54:01 +07:00
Cam Saul
b6dff656d7 Add team names to backend modules config (#58907) 2025-06-05 22:22:03 -04:00
Edward Paget
e26c2b0ef7 fix: move metabot migrations back to 001 (#59066)
* fix: move metabot migrations back to 001

* fix: embedded metabot name

* fix: add dummy migration
2025-06-05 16:37:37 -05:00
Ryan Laurie
b5db6f3d6b update auto backport workflow (#58943) 2025-06-05 15:21:51 -06:00
Nick Fitzpatrick
bde63bb6d3 static size for watermark background, changing source url (#58647) 2025-06-06 01:51:14 +05:30
Ryan Laurie
cdd03ce3f9 Stabilize flaky mongo tests (#59059)
* stabilize flaky mongo tests

* replace mongo tag
2025-06-05 19:38:22 +00:00
Eric Normand
753f612b70 Test that self-joined columns are independently editable (metadata) (#58999)
* Test that self-joined columns are independently editable (metadata)
2025-06-05 19:30:04 +00:00
Alex Yarosh
8e3ae592e5 docs: update offset limitations (#59056)
* Update offset.md

* Update expressions-list.md
2025-06-05 12:17:40 -04:00
Phoomparin Mano
b8b2c9859b refactor(sdk): move auth functions to the auth-common module (#58557) 2025-06-05 23:13:22 +07:00
dpsutton
4161aa620a Revert "Make snowflake not required (#58815)" (#58991)
This reverts commit 9dcbcba3f6.

snowflake is now fixed from being flaky and is now required again

the fix was in checking old dataset names to prune. Shared databases
like cloud databases don't get destroyed when docker terminates, so we
have to remove old databases. The way we did it in the past would error
if more than 10,000 rows were returned. The fix is the following from
https://github.com/metabase/metabase/pull/58818 :

```clojure
(defn- old-dataset-names
  "Return a collection of all dataset names that are old -- prefixed with a date two days ago or older?"
  []
  ;; modified the query from the snowflake driver:
  ;; fa58e34968/src/main/java/net/snowflake/client/jdbc/SnowflakeDatabaseMetaData.java (L1644C21-L1644C90)
  ;; We run into issues where this returns more than 10,000 items and we get an error: "The result set size exceeded
  ;; the max number of rows(10000) supported for SHOW statements. Use LIMIT option to limit result set"
  (let [query "show /* JDBC:DatabaseMetaData.getCatalogs() with limit */ databases in account limit 10000"]
    (into []
          (comp (map :name)
                (filter sql.tu.unique-prefix/old-dataset-name?))
          (jdbc/reducible-query (no-db-connection-spec) [query] {:raw?
          true}))))
```
2025-06-05 10:53:51 -05:00
Alexander Polyankin
71cc4d55ad Fix model sigma icon (#57989) 2025-06-05 14:46:37 +00:00
Timofey Kachalov
8a48603cd9 Exclude react-ansy-style from SDK deps and adjust host app dependencies (#59034) 2025-06-05 18:16:24 +04:00
Edward Paget
cb519789e7 fix: audit adjust to source handles nil schemas (#59003)
Some mysql -> postgresql migrated users still had adjust to source
failing because they had two tables with downcased names but one with a
"public" schema column and the other with a null schema column. This
handles that case by only selecting tables if there is not already a
table with a "public" schema column.
2025-06-05 13:58:37 +00:00
Brad Anderson
cb53ea46f7 Closes VIZ-192: Goal line tooltip formatting does not match ticks formatting (#58805)
* VIZ-192 Updates goal tooltip to use same formatting as y-axis (but ignores compact/auto formatting to ensure the goal value is represented accurately)

* VIZ-192 Adds support for formatting percentage-based goals (e.g. bar charts with "Stack - 100%" selected)

* VIZ-192 Updates getGoalLineHoverData to accept a formatGoal param rather than a chartModel per PR feedback

* VIZ-192 Adds e2e tests for goal value formatting
2025-06-05 09:38:29 -04:00
Brad Anderson
ec39dcbd7e Closes VIZ-181: Negative values overlap with x-axis labels, making them unreadable (#58740)
* VIZ-181 Adds boundaryGap to bar chart y-axis if it has negative values to ensure bar labels don’t overlap axis labels

* VIZ-181 Minor performance consideration; `ensureRoomForLabels` only checks `dataSeriesOptions` since "bar" series won't show up in other seriesOptions

* VIZ-181 Tweaks ensureRoomForLabels calculation

* VIZ-181 Adds unit tests for ensureRoomForLabels
2025-06-05 09:37:23 -04:00
Nicola Mometto
ad608ccc91 don't assume a keyset doesn't exist if the value it's set to is the same as it already has (#59032) 2025-06-05 11:56:39 +01:00
Mahatthana (Kelvin) Nomsawadi
8ff9fa1b9b Unskip skipped test (#59029) 2025-06-05 11:41:46 +01:00
Mahatthana (Kelvin) Nomsawadi
89ca56dbe7 Update SDK release workflow after 55 gold (#59016) 2025-06-05 11:01:44 +01:00
Romeo Van Snick
33032d5ae0 Apply filter correctly when clicking Contains... or Does not contain... quick filters (#58798)
* Remove popover for quick drill

* Add repro for metabase#58247

* Show filter popover instead of immediately applying filter

* Do not prefill values

* Change filter propt to Filterable

* Remove nonsensical comment

* Remove duplicate filter

* Remove superflouous checks
2025-06-05 11:18:28 +02:00
Romeo Van Snick
515c93f442 Don't open the database picker when there is only one database (#58849)
* Don't open the database picker when there is only one database

* Allow null for database

* Add repro for metabase#57644

* Remove duplicate it

* Use == to check for undefined

* Fix test description

* Update e2e/test/scenarios/native/native-reproductions.cy.spec.ts

Wording

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-06-05 11:17:52 +02:00
Dan Stone
10205ea677 Remove data-editing API (#58955)
This early API was unintentionally committed to master. See the
`internal-tools` branch for the working version.
2025-06-05 09:53:24 +01:00
Romeo Van Snick
d2541d2426 Disallow aggregations in filters and custom columns (#58839)
* Add check for correct clauses for expression mode

* Add support helper to expressions/mode

* Do not show help text for unsupported functions

* Add repro for metabase#58230

* Add e2e test for not showing helptext for unsopported functions

* Allow value operator

* Pass expressionMode where needed

* Tranlate mode name in error message

* Avoid throwing in checkExpressionModeSupportsClause
2025-06-05 10:01:21 +02:00
Romeo Van Snick
c9490c3bad Allow resetting a required filter to its default value (#58875)
* Add repro for metabase#57388

* Fix update button helper

* Set to default when value is empty

* Update repro

* Make unit test more robust

* Do not pass default value to default value picker

* Fix unit test
2025-06-05 08:51:13 +02:00
Fraser
a5cdcada29 Move notification components to new folder structure (#59009) 2025-06-05 14:24:46 +12:00
Ryan Laurie
ed2d5c676f Update JWT Settings (#58749) 2025-06-05 00:32:21 +00:00
Nicola Mometto
13dedb2e85 Ensure we use a different connection per have-select-privilege? call (#58620)
* fix info formatting

* ensure exception is not swallowed

* Ensure we use a different connection per [[have-select-privilege?]] call.

This is to guard against databases (like Oracle) closing a connection when attempting
    to execute a priviledged select, causing subsequent calls to fail.

* adjust usage of snowflake driver

* adjust usage of postgres driver

* update tests

* more efficient: move filtering within db-tables

* add test

* add changes to driver changelog

* route through driver rather than jdbc, so athena doesn't fail

* ensure we're testing only the drivers using default jdbc impl

* expose wrapper, rename
2025-06-04 23:42:10 +01:00
Ryan Laurie
b4f207e44b Update Settings SAML Form (#58670)
* Update Settings SAML Form

* type fixes

* type fixes

* add saml unit tests

* update e2e tests

* update backend tests

* saml formatting

* Not found placeholder

* update e2e tests

* remove duplicate tests

* properly test saml disabled

* make tests nicer
2025-06-04 22:38:38 +00:00
Alexander Polyankin
a921faf14f Fix the comment (#58882) 2025-06-05 00:28:54 +03:00
Uladzimir Havenchyk
533c823dc5 test: add repro for a fixed issue (#58996) 2025-06-05 00:26:23 +03:00
Nemanja Glumac
87115666c1 Add the special empty viz state for native queries (#59001) 2025-06-04 23:12:51 +02:00
Oleksandr Yakushev
673da45b3b Update Malli to 0.18 (#58753) 2025-06-04 23:45:52 +03:00
Fraser
985f298f8b ADM-788 Convert SMTP email form to new components (#57827) 2025-06-04 20:11:30 +00:00
Jeff Bruemmer
f5d3f3267c add notIn entry (#58998) 2025-06-04 15:16:38 -04:00
Jakub Chodorowicz
44e9886d68 PRG-53 add community translations notice (#58789)
* PRG-53 add community translations notice

Enhance localization features by adding community translation links and descriptions across user profile, localization settings, and setup components.

* PRG-53 Refactor localization components to use CommunityLocalizationNotice

Replaced direct translation links and descriptions in UserProfileForm, LocalizationSettingsPage, and LanguageStep with the new CommunityLocalizationNotice component for improved code reuse and consistency.

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>

* PRG-53 Use external link in the notice and add tests

* PRG-53 Fix e2e i18n test

* PRG-53 Prefer stack over brs, add a11y label, refactor export

* PRG-53 Improve cy selector to a semantic one

* PRG-53 Use hardcoded Metabase name in the setup flow

* PRG-53 use color name in color property

* PRG-53 use show-metabase-link setting

* PRG-53 Use Metabase original name for admin screens

* PRG-53 Add storybook stories

* PRG-53 Don't mention custom name in the translation when white labelling

* PRG-53 use static for crowdin link

* PRG-53 remove CommunityLocalizationNotice story

* PRG-53 Fix e2e i18n test

---------

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>
2025-06-04 21:03:01 +02:00
Ryan Laurie
2b426e701c Remove cloud settings plugin (#58827)
* Remove cloud settings plugin

* remove unreachable logic for updates on hosted instances

* fix import

* fix title

* remove dead hosted updates code

* linter obedience
2025-06-04 17:53:04 +00:00
Filipe Silva
03bd660f37 fix: lookup cloud migration part keys (#58881)
* fix: lookup cloud migration part keys

Mapping over multipart-urls map entries wasn't ordered or deterministic, but it happened to be for less than 8 elements.

Changed to a lookup on advice from @dpsutton.

Fix https://metaboat.slack.com/archives/C010ZSXQY87/p1748611922362219

* test: update cloud migration settings test vars

* fix: add early multipart errors
2025-06-04 18:26:35 +01:00
Ryan Laurie
4ff5abd06a Update Embedding Settings (#58750)
* Update Static and Interactive Embedding Settings

* update sdk settings

* remove useMergeSetting

* remove more dead code

* remove more unnecessary stuff

* update unit tests

* more test updates

* update e2e tests

* Move embedding unit tests to local components

* address review comments
2025-06-04 17:24:16 +00:00
Sébastien
e0e3a17634 Closes VIZ-1051 no title menu for single source cards (#58797)
* Closes VIZ-1051 no title menu for single source cards

* fix
2025-06-04 19:16:45 +02:00
Ryan Laurie
3db6677747 Update License and Billing Settings (#58755)
* WIP

* cleanup store code and update tests

* cleanup plugins

* fix toast

* fix import
2025-06-04 11:08:33 -06:00
Ryan Laurie
31a355c833 remove swag button (#58892) 2025-06-04 16:58:04 +00:00
Aleksandr Lesnenko
fc70115302 remove ai dashboard analysis (#58378)
* remove ai dashboard analysis

* add back explaining dashcards

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2025-06-04 11:39:02 -05:00
Nicola Mometto
3739507b28 respect modularisation effort and use analytics.core (#58920) 2025-06-04 17:30:54 +01:00
Eric Normand
4e37fb0e71 Add test for implicity join columns (#58896)
* Add test for implicity join columns

* Fix typo in test name
2025-06-04 16:25:42 +00:00
John Swanson
d77f3da196 Fix 3 flaky tests (#58729)
* Fix a flaky test for max-refingerprint-field-count

The code here goes through tables and refingerprints them (with all
their fields). After each table it checks the
`max-refingerprint-field-count` and stops if we've hit it.

The test gave some wiggle-room - we'd allow 10 extra fields. But in a
fresh run of my tests, the biggest table has... 13 fields. So if the
last table we hit before hitting the limit was *that* table, we exceed
our wiggle-room and the test fails.

Instead, the test now actually looks to see what's the biggest table we
have (in terms of number of fields), and asserts that the number of
fields refingerprinted is, at the most, the max plus that number of
fields.

* fix two more flaky tests

one is clearly a symptom of another test being super naughty but I can't
figure out which one. It's marked `parallel` and doing

```
(mt/with-temp [:model/Card {id :id} ...]
 (do-something-with (t2/select-one :model/Card id)))
```

which is failing because `(t2/select-one :model/Card id)` is returning
nil. We can just pass the card that was actually returned by
`mt/with-temp` here and that should be more resilient to horrible tests
being horrible.

the other is checking that we're caching something by checking the call
count to toucan on the first and subsequent call to a function. But it
asserts that the first call count is exactly 6, which isn't relevant.
If I start a fresh REPL I get more than 6 the first time. It doesn't
matter! Just assert that we don't get MORE than the first time on the
second run!

* fix flaky tests freal

* fix: use t2/query to skip card callbacks

* fix: retry on failed pk insert

* fix: log when we have the cluster lock

* fix: try catching all sqlexceptions

* fix: add a fixture to pre-create the cluster_lock

* fixup! remove with-connection from update-used-cards

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-06-04 16:24:52 +00:00
appleby
59d0ab1124 Fix before-and-after :join generative test (#58913)
* Add testing context around before-and-after gen tests

To ensure you can see the before and after queries as well as the steps that produced them when a test fails.

* Fix before-and-after :join in generative tests

Pass stage-number to check for aggregations and breakouts on the stage where the join was added rather than the final
stage.
2025-06-04 09:15:13 -07:00
Mahatthana (Kelvin) Nomsawadi
34e6a516c7 Add an option to opt in to multi-staged data picker (#58575)
* Add an option to force multi-staged data picker

* Move type to a proper location

* Add `question` to `entity_types`

* Add ability to select saved questions back to multi-staged data picker

* Auto select Questions or Models when there is only a single option

* Prevent accidental types

* Remove unreachable code

* Default the join step after selecting a question to the question step

* Fix type errors

* Improve typing + fix unit tests

* Remove unnecessary await

* Add unit tests

* Update the default simple data picker value

* Fix the picker name typo

* Ignore `question` in Simple data picker

* Add E2E tests

* Move a constant out of a type file

* Fix types

* Address review. Make code more sane

* Address review. Improve variable name clarity.

---------

Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-06-04 15:09:38 +01:00
Oisin Coveney
256179a72a docs(sdk): Fix docs for new auth flow (#58776)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-04 14:03:33 +00:00
Romeo Van Snick
61ff81a3ab Fix disappearing padding on filter (#58932)
* Make padding consistent on different filter types

* Add repro for metabase#58923
2025-06-04 16:01:59 +02:00
Sébastien
519a9f197f Closes viz-1053 UI polish on download popover (#58844)
* closes viz-1053 UI polish on download popover

* addressed comments
2025-06-04 15:53:16 +02:00
Nicola Mometto
c0a3f19b87 use a much cheaper query in the snowflake driver to detect ability to connect (#58868) 2025-06-04 09:30:53 -04:00
Timofey Kachalov
b5528b9e77 Add angular@20 host app and e2e (#58887) 2025-06-04 17:17:10 +04:00
Nicola Mometto
73ad3908a7 handle effective_type/coercions in fingerprinters (#58693)
* add tests for SEM-3

* let fingerprinters respect ->Number coercers

* explicitely assert for supported coercions

* add test on fingerprinted supported coercions
2025-06-04 11:44:25 +00:00
Uladzimir Havenchyk
002816ac09 chore: replace moment-timezone with dayjs in some files (#58846)
* chore: replace moment-timezone with dayjs

* fix import
2025-06-04 14:05:56 +03:00
Uladzimir Havenchyk
b5a11b7497 chore: replace moment-timezone with dayjs when fromNow is used (#58850) 2025-06-04 14:05:43 +03:00
Phoomparin Mano
d028448a5f ci(sdk): skip broken create question test temporarily (#58924) 2025-06-04 17:58:57 +07:00
Nicola Mometto
27e5abdf8c add some snowplow events for semantic layer events (#58843)
* track sync/scan on snowplow

* allow analytics in warehouse_schema

* some field analytics

* add tests
2025-06-04 11:04:34 +02:00
Uladzimir Havenchyk
d966ff346c chore: replace moment-timezone with dayjs in cypress specs (#58848)
* chore: replace moment-timezone with dayjs in cypress specs

* Update e2e/test/scenarios/filters/relative-datetime.cy.spec.js

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-06-04 07:31:50 +00:00
Cam Saul
dd474a1776 [MLv2 × QP] auto-parse-filter-values => MLv2 (#58683)
* [MLv2 × QP] `auto-parse-filter-values` => MLv2

* Simplify code

* Simplify further

* Fix function name

* Add comment

* Remove unused namespaces

* Test fix 🔧

* Test fixes 🔧
2025-06-03 15:29:59 -07:00
Fraser
cb70a6df23 Don't show prompt to add duplicated model to dashboard (#54701)
* Don't show prompt to add duplicated model to dashboard
2025-06-04 10:21:10 +12:00
bryan
baa82b1ca0 Mage jar dl branches (#58724) 2025-06-03 21:25:35 +00:00
Jeff Bruemmer
5cdc504355 docs - multi-catalog support for databricks (#58901)
* multi-catalog support

* Update docs/databases/connections/databricks.md

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

* Update docs/databases/connections/databricks.md

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

* Update docs/databases/connections/databricks.md

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

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-06-03 21:22:47 +00:00
Alex Yarosh
e57f223d3a docs: custom expression support updates (#58895)
* custom expression updates

* Apply suggestions from code review

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

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-06-03 20:33:53 +00:00
Jeff Bruemmer
e0213e3665 docs - remove export branding (#58897)
* note on Metabase branding

* keyword
2025-06-03 20:31:16 +00:00
Fraser
f0c19f08a1 Adm 484 convert maps tab to new components (#58547)
* Add test for GeoJSON widget

* Add more tests

* Add tests for updating map value

* Add edit map test

* Refactor widget to tsx

* Render error messages correctly

* Use MapsSettingsPage and add tests

* Fix loading bug

* Add explantory comment
2025-06-03 14:23:42 -06:00
Edward Paget
49d314b70d fix: prevent empty updated_at updates (#58811)
Use cluster locking around both last_viewed_at and view_count updateds
for report_dashboard models.
2025-06-03 14:48:58 -05:00
Nathan Voxland
b1de6084e2 Make new "appdb" search engine the default starting with v55 (#58718) 2025-06-03 13:38:29 -05:00
Ryan Laurie
e6f17ffae9 Remove LLM Autodescription Frontend (#58828) 2025-06-03 17:56:30 +00:00
Nathan Voxland
f13a02c0c3 Split v56 changelog from the monolithic previous changelog (#58650) 2025-06-03 12:39:20 -05:00
Nathan Voxland
f5b3699072 Correctly handle nil last-sync-started-at in gsheets response (#58661) 2025-06-03 12:38:13 -05:00
John Swanson
ffec482d73 fix SSO login (#58874)
This was failing because we call

```
(session/create-session! :sso user (request/device-info request))
```

with the result of this function, and `session/create-session!` requires
a user with at least `:id` and `:last_login`. We didn't have a
`:last_login` in this case so `create-session!` was barfing.

we didn't have any tests that actually logged in as an existing user.
2025-06-03 17:32:10 +00:00
Alexander Polyankin
7029fd4c6d Fix default fields for joined SQL models (#58826) 2025-06-03 13:16:05 -04:00
Nicola Mometto
56cdad9c72 Short circuit on sync error (#58706)
* update sync error handling to take into account `do-not-retry-exceptions?` as per its docstring

* add test

* introduce `with-returning-throwable`, use consistently

* update test
2025-06-03 16:44:58 +00:00
Nick Fitzpatrick
607cf6efad add remember me to google sign in (#58239)
* add remember me to google sign in

* UI adjustments

* assert that remember me checkbox is rendered with google button

* backend test that cooke expiration is set

* rollback model changes in BE test

* create user model and use with-model-cleanup

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-06-03 22:06:39 +05:30
Timothy S. Dean
04e0d8a390 Add galdre to internal team config (#58819) 2025-06-03 10:17:49 -06:00
Rodrigo Quinteiro
e97eeccba4 Update case.md (#54847)
Superman has a face
2025-06-03 12:08:55 -04:00
Nemanja Glumac
ed6e5591e3 Address review comments from #58408 (#58785)
* Define the number of engines in a constant

* Improve callback naming

* Use t-shirt sizing

* Remove superfluous e2e test

We're already covering this scenario using Jest.

* Update prop naming

* Simplify CSS
2025-06-03 17:59:40 +02:00
Sébastien
a3ee9cde79 VIZ-1024 small polish items on visualizer (#58360)
* closes VIZ-1024 more menu with only one item feels weird

* fixed e2e test

* removed dead code
2025-06-03 15:18:37 +00:00
Jeff Bruemmer
29df8b91d9 docs - shortcuts (#58737)
* keyboard shortcuts doc

* script to generate docs

* handle ctrl/cmd

* readme

* casing

* more casing

* revision

* note on menu

* message

* typo

* dir name

* update test

* Update docs/util/resources/introduction.md

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

* Update frontend/src/metabase/palette/shortcuts/question.ts

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

* edits

* update docs

* interpolate >

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-06-03 10:07:11 -04:00
Romeo Van Snick
6c1eeb9f32 Browser nav for model editor (#58786)
* Change tab as well when url changes

* Do not get confused about editor height

* Add repro for metabase#55486

* Scope loading query

* Test forward button too

* Limit query

* Remove loading check altogether
2025-06-03 16:01:15 +02:00
Jeff Bruemmer
05462a5212 edit uploads (#58845) 2025-06-03 09:51:31 -04:00
Jeff Bruemmer
d0418f8377 docs - visualizer updates (#58604) 2025-06-03 09:49:08 -04:00
Riley Thompson
9a01d082ff Revert "Remove hive-jdbc$standalone dependency (#58655)" (#58856)
This reverts commit f11fb71403.
2025-06-03 16:46:43 +03:00
Anton Kulyk
2d5d40a9ab Fix flaky visualizer tests (#58801)
* Wait for queries to complete after saving changes

* Wait for `dc.series` queries in `visitDashboard`

* Wait until visualizer loads after it's open

* Fix flaky tests

* Remove flaky tag

* Revert "Wait for `dc.series` queries in `visitDashboard`"

This reverts commit 3f6a606442.
2025-06-03 13:45:39 +01:00
Riley Thompson
f11fb71403 Remove hive-jdbc$standalone dependency (#58655) 2025-06-03 12:48:00 +03:00
Nicola Mometto
4b6f1097f8 add logging for table filtering during sync (#58777)
* add logging for table filtering

* make sure drivers also log schema exclusions
2025-06-03 09:23:31 +00:00
Timofey Kachalov
b649df7214 Update Host App dependencies (#58835) 2025-06-03 12:30:08 +04:00
dpsutton
ba43f3ad71 Fixup snowflake old dataset check (#58818)
Error we were getting:

```
1. Unhandled net.snowflake.client.jdbc.SnowflakeSQLException
   The result set size exceeded the max number of rows(10000)
   supported for SHOW statements. Use LIMIT option to limit result set
   to a smaller number.
        SnowflakeUtil.java:  170  net.snowflake.client.jdbc.SnowflakeUtil/checkErrorAndThrowExceptionSub
        SnowflakeUtil.java:  102  net.snowflake.client.jdbc.SnowflakeUtil/checkErrorAndThrowException
             StmtUtil.java:  488  net.snowflake.client.core.StmtUtil/pollForOutput
             StmtUtil.java:  394  net.snowflake.client.core.StmtUtil/execute
          SFStatement.java:  502  net.snowflake.client.core.SFStatement/executeHelper
          SFStatement.java:  211  net.snowflake.client.core.SFStatement/executeQueryInternal
          SFStatement.java:  145  net.snowflake.client.core.SFStatement/executeQuery
          SFStatement.java:  779  net.snowflake.client.core.SFStatement/execute
          SFStatement.java:  697  net.snowflake.client.core.SFStatement/execute
 SnowflakeStatementV1.java:  293  net.snowflake.client.jdbc.SnowflakeStatementV1/executeQueryInternal
 SnowflakeStatementV1.java:  149  net.snowflake.client.jdbc.SnowflakeStatementV1/executeQuery
SnowflakeDatabaseMetaData.java: 1648  net.snowflake.client.jdbc.SnowflakeDatabaseMetaData/getCatalogs
                      REPL:  107  metabase.test.data.snowflake/old-dataset-names/fn
```

We do this in `old-dataset-names` by just calling `(.getCatalogs
metadata)` which runs
fa58e34968/src/main/java/net/snowflake/client/jdbc/SnowflakeDatabaseMetaData.java (L1644C21-L1644C90)
or

```sql
String showDB = "show /* JDBC:DatabaseMetaData.getCatalogs() */ databases in account";
```

I've modified that to have a limit and then run that
`jdbc/reducible-query` to get the names
2025-06-03 00:00:45 -05:00
appleby
c979f78a3d Fix zoom drill for clicks on a joined PK column (#58204)
* Fix zoom drill for clicks on a joined PK column

* Add lib.drill-thru.common.primary-key? and foreign-key? helpers

* Fix zoom and quick-filter drill for clicks on a joined PK column

* Remove unused imports

* Move source fields check into lib.drill-thru.common and revert changes in lib.metadata.calculation

* Remove trailing whitespace from docstring

* Lookup primary key in visible-columns ignoring joins rather than source-table fields

* Fix docstring
2025-06-03 00:14:49 +00:00
Tyler Plude
f06fded742 Fixing strings for relative date params in subscriptions (#56471)
* Fixing mapped user facing strings for relative date params in subscriptions and alerts

* Adding frontend fix + spec

* Changing 'is' to '->' in UI

* pr feedback

* e2e test fix

* use badges in oss sidebar; update pulse card rendering; test fixes

* test fix

* test fix

* pr feedback
2025-06-02 16:15:43 -07:00
Ryan Laurie
9dcbcba3f6 Make snowflake not required (#58815) 2025-06-02 16:27:16 -06:00
Jeff Bruemmer
c852e0b4a1 docs - pivot table exports (#58660) 2025-06-02 16:54:52 -04:00
Maz Ameli
b7711b995b add a hover and selected state to top items in admin top nav (#58688) 2025-06-02 13:39:15 -07:00
John Swanson
6a3a058e28 Respect is_active on JWT/SAML logins (#58582)
Currently, if a user is set to `is_active: false`, we still allow them
to log in via JWT or SAML. When they do, we also don't update the value
of `is_active`, which could potentially lead to inaccurate user counts.

After this change, the behavior when discovering an existing user upon
login is:

- if `is_active` is `false` and JWT/SAML user provisioning is on, we'll
log the user in and set `is_active` to `true`.

- if `is_active` is `false` and JWT/SAML user provisioning is off, we'll
give the user an error and not change the existing user.

- if `is_active` is `true`, we'll log the user in like normal.
2025-06-02 11:30:46 -07:00
John Swanson
5c0171e37b Randomize the timing of upgrade checks (#58701) 2025-06-02 11:28:09 -07:00
Anthony Lio
8adcd9ec66 fix(api-openapi): adds meta viewport to open api index file (#53665) 2025-06-02 14:20:52 -04:00
Oleksandr Yakushev
467297aeb2 cljs: Replace clojure.spec leftovers with Malli (#58242) 2025-06-02 10:16:01 -07:00
Ryan Laurie
fcef77fdef Quarantine flakiest e2e tests (#58796)
* quarantine flakiest tests

* remove fixed test 😌
2025-06-02 15:59:19 +00:00
Timofey Kachalov
490f1c8ab7 Share common Host App tests between all Host Apps (#58791) 2025-06-02 18:29:53 +04:00
Ryan Laurie
c50883c866 use string literals for i18n context (#58784) 2025-06-02 14:08:15 +00:00
Jeff Bruemmer
bd3ea3bdab docs - download button for static embeds (#58707) 2025-06-02 09:56:40 -04:00
Alex Yarosh
ea5e00c5b4 Update data-sandboxes.md (#58754) 2025-06-02 09:49:51 -04:00
okaeiz
ad1d77f1aa Fix the code blocks in README.md to facilitate the copy feature (#53159) 2025-06-02 09:39:32 -04:00
Uladzimir Havenchyk
37cc0ffa9d test: wait for card data in a flaky test (#58778) 2025-06-02 15:37:01 +03:00
Ryan Laurie
85a5f8efc7 fix currency formatting bug (#58733) 2025-06-02 06:15:21 -06:00
Nemanja Glumac
de780f53cd Introduce the option to add data from the sidebar via "Add data" modal (#58408) 2025-06-02 13:51:40 +02:00
Romeo Van Snick
28ceb5e471 Reproduction for missing hyphen in formatting in joined columns (#58574)
* Add repro for metabase#58371

* Add unit test to reproduce metabase#58371
2025-06-02 11:11:22 +02:00
Romeo Van Snick
e1041fcfa1 Deduplicate binning information (#58587)
* Remove binning from pinned items

* Add reproduction for metabase#57697

* Revert "Remove binning from pinned items"

This reverts commit aa2d4abbb4472b835dee901ce7ac36c4bc43cd5e.

* Remove binning from column when calculating displayname
2025-06-02 11:11:06 +02:00
Timofey Kachalov
e7ddf4d260 Improve the embedding-sdk-no-exposed-internal-types-validate CI job (#58612) 2025-06-02 12:38:07 +04:00
metamben
4b006fec6e Handle datetime extracted values in filters for xrays (#58725)
Fixes #47196.
2025-06-02 09:18:09 +03:00
Maz Ameli
15597535de Fix embarrassing styling in Data Reference (#58544)
* fix alignment on table lists

* make all the lists align the same

* remove unnecessary 100% width

* standardize card widths

* fix up edit state
2025-05-30 22:04:49 -07:00
Ryan Laurie
9aa35fff0b Metabot Admin - Folder Edition (#58316)
* Add models; liquibase migration; ...

and other model incantations

* Add fk constraint after indexes

* Update model tests for column names

* serdes fixes

* Replace remaining missing metabot_model_entity_id

* Update generated baselines

* fix serialization tests

* initial implementation

* make the api match

* wip

* align types with API

* improved routing

* empty state

* cleanup and tests

* pivot to collection picking

* no personal collection

* update tests

* remove defunct table changes

* fix conflicts

* add copy for embedded metabot

* linter appeasement program

* linter appeasement program

* linter appeasement program

* update api

* no thank you migration

* un-un-un revert some stuff

* address review comments

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-05-31 00:56:06 +00:00
appleby
937ab0ca3d Ensure display-info returns correct :long-display-name for aggregations from a previous stage (#58614)
* Add lib.util/find-clause-by-uuid

* Lookup clause by uuid to generate the :long display-name for a :metadata/column

* Fix display-name expectations in targets.unit.spec.ts

* Fix display-name expectations in click-behavior.cy.spec.js

* Fix display-name expectations in filter-sources.cy.spec.js

* Review feedback: ensure last-stage? throw when given an invalid stage-number

* Review feedback: use lib.tu/venues-query

* Review feedback: explict true? and false? checks for first-stage? and last-stage?
2025-05-30 16:50:30 -07:00
metamben
8e6d4a8258 Reflect include-current option in filter name (#58662)
* Reflect include-current option in filter name

Fixes #50139
2025-05-31 02:35:46 +03:00
Tyler Plude
e68b3f998e Only run necessary pivot subqueries (#57999)
* WIP

* Adjust process-multiple-queries to also support single pivot queries

* cleanup

* Seemingly working backend support for only running necessary subqueries

* pivot unit test adjustments

* Test fixes

* Rerun pivot query when settings change

* wip fix for pivots as email attachments in subscriptions

* alternate single query qp support; unit test fix

* fix ts

* fix

* fix frontend spec

* pr feedback

* adding api test coverage for pivots with totals disabled

* fix cljkondo

* typo

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2025-05-30 14:12:28 -07:00
Raphael Krut-Landau
9c071ffbcb Use better icons in filter popover (#58377) 2025-05-30 15:34:41 -04:00
lbrdnk
4b4b74e49a Adjust external column type sync (#58528)
* Adjust external column types sync

* Adjust

* Typo
2025-05-30 19:27:48 +00:00
Edward Paget
ceff6b3e63 fix: no log on migrations without a rollback (#58577) 2025-05-30 19:27:04 +00:00
Jeff Bruemmer
5236b54cc3 remove starts (#58731) 2025-05-30 19:04:54 +00:00
Eric Normand
2314c8b5ad Test that mapping query column metadata (#58599)
* Add test fo 52465

* Move setup to beforeEach()
2025-05-30 18:57:59 +00:00
Noah Moss
c90d29f9f1 Always fully uncollapse pivots in exports (#58716)
* keep backend pivot exports uncollapsed

* fix kondo errors

* update tests - only run collapsing tests on cljs, add a new test for clj that rows are not collapsed

* fix more kondo warnings

* cleanup
2025-05-30 14:17:10 -04:00
Edward Paget
45269fcf32 feat: api and models for managing metabot entities (#58168)
* feat: api and models for managing metabot entities

* Add stubs

* Add models; liquibase migration; ...

and other model incantations

* tests for api

* Update h2 copy

* rename model to dataset

* Add fk constraint after indexes

* Wrap tests with with premium feature

* Add seed migration; drop unused index

* Update API to wrap in items instead of data

* Update model tests for column names

* Pass remaining serdes tests

* Reorder migrations

* serdes fixes

* correct api to remove metabot_model_entity_id

Handle root collection

* fix mistake in merge

* Replace remaining missing metabot_model_entity_id

* Update generated baselines

* fix rollback sql syntax

* update api to support collections

* update serdes for collections in metabot entities

* fix precondition for loading metabots

* fix cleanup metabot table before list endpoint test

* fix whitespace

* fix serialization tests

* fixup! change migration version to 56

* fixup! remove remaining no-metabot tags

* fixup! super nit

* fixup! move api into new namespace

make /metabot API routes singular

* fixup! better combine routes
2025-05-30 17:43:59 +00:00
Romeo Van Snick
453eab244c Do not prevent cmd+enter from working when inputs are focused (#58630)
* Do not prevent cmd+enter from working when inputs are focussed

* Add repro for metabase#56905
2025-05-30 19:15:31 +02:00
Edward Paget
75ee0f5bc3 feat: add job factory to handle jobs with missing classes (#57151) 2025-05-30 12:14:45 -05:00
Eric Normand
7114b71dac Unskip test for fixed bug 46756 (#58722) 2025-05-30 16:50:18 +00:00
Timofey Kachalov
84cf0f564f Add Nextjs 14 Host Apps e2e tests (#58710) 2025-05-30 20:30:06 +04:00
Timofey Kachalov
5da40d53c5 Update typedoc version to 0.28.5 (#58645) 2025-05-30 20:15:09 +04:00
Phoomparin Mano
cdbd112bff feat(sdk): ability to specify preferred authentication method (#58641)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-05-30 23:05:59 +07:00
Oleksandr Yakushev
2baab9c7a0 More improvements to CLJS bundle size (#58702)
* cljs: Make currency definitions more compact

Useful for reducing CLJS bundle size.

* cljs: Use unquoted functions in metabase.lib.drill-thru

* cljs: Make var re-exporting leaner in CLJS
2025-05-30 19:04:35 +03:00
Brad Anderson
04035f1154 VIZ-327 Updates styling and text for cryptic "unknown map" error message (#58540) 2025-05-30 11:25:28 -04:00
Jeff Bruemmer
9c615e79f0 sentence case (#58681) 2025-05-30 10:50:04 -04:00
Sloan Sparger
e945330f2f [HOTFIX] Metabot requests causing interactive embedding to improperly redirect (#58687)
* prevent Metabot from making a request for suggested prompts if no user is logged in to prevent auth redirect

* this fix is better

* add code comment

* reference PR in code comment

* revert unneeded change
2025-05-30 09:06:22 -05:00
Alexander Polyankin
efab244107 Fix implicit joins for cards (#58551) 2025-05-30 09:43:30 -04:00
Ryan Laurie
408848d793 Rework Ldap auth form (#57716) 2025-05-30 05:45:12 -06:00
Timofey Kachalov
0cc545526b Update SDK JWT auth docs (#58692) 2025-05-30 14:00:04 +04:00
Uladzimir Havenchyk
e4ec734dca ci: use eslint caching (#58521)
* ci: use eslint caching

* improve caching
2025-05-30 07:45:01 +00:00
Anton Kulyk
3a3db243a7 Port "add series" modal e2e tests for visualizer (#58376)
* Fix sharing e2e test

* Simplify `shouldSplitVisualizerSeries` check

* Handle empty/erroring datasets

* Use card names for series names

* Port e2e tests

* Don't use entity IDs

* Unskip test

* Include metrics and models in data importer search

* Return result_metadata for metrics and datasets

* Fix drillthrough test

* Update comment

* Bring back removed metric tests

* Remove reundant test

* include result_metadata in recents api request

* Fix e2e test

* Fix typo

Co-authored-by: Sébastien <sebastien@metabase.com>

* Fix e2e test

* fix be test

* Fix e2e tests

* Update src/metabase/activity_feed/models/recent_views.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-05-29 14:44:33 -07:00
Cam Saul
fef2ff25bd [BE Modularization] Remove server dep on driver (DEV-559) (#58548) 2025-05-29 21:13:43 +00:00
Cam Saul
5e7d24290e Mega App DB memory usage improvements (#58664)
* Mega App DB memory usage improvements

* Add a test

* Minor comment formatting

* Fix test name

* This test can be ^:parallel

* Actually no it can not

* Fix test name
2025-05-29 21:12:47 +00:00
Cam Saul
42053fe15e Don't create mega queries when deleting databases (#58491) (#58535)
* Don't create mega queries when deleting databases (#58491)

* Improved fix

* Don't require new migrations to have preconditions (this is bad)

* Remove test

* Revert migrations

* Manually set Field.parent_id = NULL for all Fields in a Database when deleting a Database

* Tweak query for MySQL

* Yet another fix 🔧

* `IS NULL` => `IS NOT NULL`

* Give up on trying to find a nice fix

* MySQL fix

* MySQL fix (for real)
2025-05-29 14:01:14 -07:00
Timofey Kachalov
93b76e1876 Add the SDK Host Apps e2e tests (#58486) 2025-05-30 00:30:22 +04:00
Jeff Bruemmer
cf79da01cc docs - boolean filter (#58678)
* george boole

* image

* auto-apply filters
2025-05-29 16:09:31 -04:00
Nathan Voxland
2a05b062ba Improve error handling in gsheets integration (#58439)
* Improve error UI for gsheets (#58594)

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-05-29 15:01:57 -05:00
Edward Paget
5453388b07 fix: data perms test to set schemas for tables (#58671) 2025-05-29 19:47:22 +00:00
metamben
6bd7abb277 Generate valid multi arg string filters in parameter chaining (#58646)
Fixes #57287
2025-05-29 22:44:04 +03:00
Uladzimir Havenchyk
633a75f2c3 feat: move native query sidebar icons to the header (#58501)
* feat: move native query sidebar icons to the header

* fix unit test

* fix tests

* cleanup

* fix svg icon

* align items to the top

* rename action-editor-sidebar to action-editor-action-buttons

* address review

* fix styles

* fix styles

* review
2025-05-29 22:26:08 +03:00
Nick Fitzpatrick
1677e13e89 Surface Group API error messages, update components (#58494)
* surface API error messages, update components

* use <ConfirmModal>
2025-05-29 23:45:31 +05:30
Ryan Laurie
8969a6d7d1 Fix fail-y downloads tests (#58652)
* fix fail-y downloads tests

* stabilize flake
2025-05-29 12:04:33 -06:00
Nemanja Glumac
03a847cc29 Delete withBackground HoC (#58634) 2025-05-29 19:12:42 +02:00
Ryan Laurie
2f86808554 Don't Require tech-writer review for developers guide docs (#58658)
adding a diretory without an owner after a parent directory with an owner should exclude it from code ownership
2025-05-29 16:29:22 +00:00
Phoomparin Mano
38f130358c Add embed options for templates to new iframe embedding (#58338) 2025-05-29 23:24:33 +07:00
Edward Paget
229118d0bf fix: audit-db adjust source check for lower case (#58605) 2025-05-29 16:13:30 +00:00
Mahatthana (Kelvin) Nomsawadi
cd1d74091c Fix SDK cross version tests getting version number from other prerelease labels (#58637)
* Fix SDK cross version tests getting version number from other prerelease labels

* Update code from #58638

* Remove unnecessary console.log

* Simplify code even moarrrrrrr
2025-05-29 16:13:44 +01:00
Ryan Laurie
e2f9a61753 fix auto-approve (#58642) 2025-05-29 07:25:41 -06:00
github-actions[bot]
1139fcded8 Update translations 2025-05-28 (#58558)
* Update translation sources 2025-05-28

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-05-29 13:25:05 +00:00
Ryan Laurie
b8b6d610a7 Update adminAppState mock to remove isNoticeEnabled (#58633) 2025-05-29 12:58:52 +00:00
John Swanson
8a3919c960 Don't show schemas for destination databases (#58409) 2025-05-29 05:49:17 -07:00
Phoomparin Mano
899ff2ef2e ci(sdk): bump package.json to 0.56.0-nightly (#58625) 2025-05-29 17:22:07 +07:00
Phoomparin Mano
f70ff1d987 ci(sdk): add release-x.55.x branch to release workflow (#58622) 2025-05-29 17:19:08 +07:00
metamben
bcb23015d4 Disallow aggregation expressions in plain expressions (#58608)
* Disallow aggregation expressions in plain expressions

Closes #41344.
2025-05-29 10:02:02 +00:00
Timofey Kachalov
062f726061 Fix nextjs dependency (#58584) 2025-05-29 11:39:53 +04:00
Oleksandr Solovyov
5742fe8faa version-helpers: update new version requirements (#58561) 2025-05-29 07:12:19 +00:00
Nemanja Glumac
ef8402cf26 Delete unused RestfulRequest class (#58598) 2025-05-28 22:40:45 +00:00
Edward Paget
07851c4331 fix: set download-results to no on table block (#58597)
* fix: set download-results to no on table block

When a view-data permission for a table is set to blocked set the
create-queries and download-results permissions to no. Also includes a
migration script read to backport to v52 to update databases to be
consistent with this change

* fixup! remove precondition

* fixup! join in update to work on mysql

* fixup! separate migrations on mysql/postgres

* fixup! test order
2025-05-28 21:50:06 +00:00
Jacob Joseph
494462a397 Update saml-google.md (#58602)
Added docs about synchronize group membership specific to Google SAML config
2025-05-28 19:59:57 +00:00
Timofey Kachalov
a52a292ff4 Adjust internal types leaking message (#58537) 2025-05-28 23:38:54 +04:00
Ryan Laurie
02771d878a Optimize version info fetching (#58000)
* optimize version info fetching

* fix type
2025-05-28 13:33:07 -06:00
Riley Thompson
9b755aab80 Add text comparison support for ClickHouse UUIDs (#58576)
* allow rerunning clickhouse field filter test

* add proper uuid support for clickhouse

* require left-join feature for join test

* cleanup
2025-05-28 15:03:43 -04:00
Timofey Kachalov
72975d11c4 Export UserBackendJwtResponse from SDK (#58589) 2025-05-28 13:01:35 -06:00
github-automation-metabase
814e5a95da Bump ring/ring-mock from 0.4.0 to 0.6.1 (#57315)
Inspect dependency changes here: https://github.com/ring-clojure/ring-mock/compare/0.4.0...0.6.1

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-28 17:52:14 +00:00
github-automation-metabase
207977e9cd Bump io.github.tonsky/clj-reload from 0.9.6 to 0.9.7 (#58465)
Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 17:49:56 +00:00
Case Nelson
58a480de68 fix: sqlserver properly convey ssh-tunnel details to connection-pool cache (#58309)
* fix: drivers properly convey ssh-tunnel details to connection-pool cache
2025-05-28 11:20:22 -06:00
github-automation-metabase
a3b8bc0136 Bump io.github.camsaul/toucan2 from 1.0.564 to 1.0.565 (#58464)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 16:55:06 +00:00
github-automation-metabase
030b3f2168 Bump com.github.steffan-westcott/clj-otel-api from 0.2.7 to 0.2.8 (#58463)
Inspect dependency changes here: https://github.com/steffan-westcott/clj-otel/blob/0.2.8/CHANGELOG.adoc

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 16:38:36 +00:00
github-automation-metabase
77288ad23d Bump thheller/shadow-cljs from 3.1.1 to 3.1.4 (#58466)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 16:37:11 +00:00
github-automation-metabase
859997583f Bump com.google.cloud/google-cloud-bigquery from 2.50.0 to 2.50.1 (#58467)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.50.1/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-28 16:37:00 +00:00
Sébastien
d254909d96 Closes VIZ-977 backstack when replacing a dataset in visualizer (#57952)
* closes VIZ-977 backstack when replacing a dataset

* closes VIZ-990 self-collapsing data sources

* e2e

* Remove WIP file

* Fix e2e test

---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2025-05-28 16:42:28 +01:00
Ryan Laurie
ac3ea294c7 build colspan into table component (#58325) 2025-05-28 09:30:39 -06:00
metamben
6cef8aea56 Add data loading options for metric, report, and table details (#58542) 2025-05-28 18:20:13 +03:00
Raphael Krut-Landau
f5185c6298 Simplify models/metrics filter (#58382) 2025-05-28 09:44:22 -04:00
Anton Kulyk
1d497cd54a Fix additional tooltip columns for charts opened in visualizer (#58519)
* Update column references in `graph.tooltip_columns`

* Update fn name
2025-05-28 13:22:20 +00:00
Sébastien
afa64803aa Closes VIZ-1034: can't click through to source question for cards with an empty title (#58472)
* wip

* e2e

* fixed wrong rebase

* fixed e2e

* type

---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2025-05-28 14:21:21 +01:00
Raphael Krut-Landau
57c718c5e3 Center radio label wrappers, vertically (#58389) 2025-05-28 09:20:00 -04:00
Anton Kulyk
7184480fc0 Fix flaky visualizer test (#58563)
* Fix flaky visualizer test

* Switch to UI assertions
2025-05-28 13:51:28 +01:00
Nicola Mometto
eb8eefe50b Sem 258 identifier case sensitivity (#58515)
* be case-sensitive during sync

* add SEM-258 test

* extract to top-level fn with docstring
2025-05-28 11:28:10 +00:00
Jakub Chodorowicz
131ade90fb chore: add chodorowicz as a team member (#58555) 2025-05-28 12:08:17 +02:00
appleby
5ec56ea755 Fix underlying records drill for question with multiple breakouts on the same column (#58454)
* Add breakout->filterable-column and matching-filterable-column

* Call breakout->filterable-column in underlying records drill-filter

* Use matching-filterable-column util in prepare-query-for-drill-addition

* Add e2e test

* Remove unused lib.ref alias

* Review feedback: nested -> card-sourced

* Review feedback: DrillThrough -> DrillThru
2025-05-27 17:40:54 -07:00
Cam Saul
b3bf03986e [Backend modularization] query-permissions module (#58543)
* [Backend modularization] `query-permissions` module

* PR feedback
2025-05-28 00:00:21 +00:00
Cam Saul
d8af6c3ff8 [Backend modularization] prune api deps (#58384)
* [Backend modularization] prune `api` deps

* `indirect-deps`
2025-05-27 15:49:47 -06:00
Jeff Bruemmer
c79afd62fc Update impersonation.md (#58531)
* Update impersonation.md

* Update docs/permissions/impersonation.md
2025-05-27 16:47:53 -04:00
Oisin Coveney
98e1166ea0 fix(sdk): SAML + JWT + New Auth Flow (#56869)
Co-authored-by: Edward Paget <ed.paget@gmail.com>
2025-05-27 22:26:49 +02:00
Jeff Bruemmer
51174fce6b docs - updates for new menu (#58367) 2025-05-27 14:08:32 -04:00
bryan
fbb663d236 add docs_merge_detected workflow (#58529) 2025-05-27 11:53:41 -06:00
Phoomparin Mano
c1db8c5a6d New iframe embedding based on embedding SDK components (#58390)
* Setup sdk-based embedding iframe route (#56915)

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* restore routes.clj to fix merge conflicts

* Tests for new iframe embedding's script tag and route (#57269)

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* remove the safe-to-remove warning on rspack css ordering

* Rename embed.v1.js to embed.js for new iframe embedding (#58415)

* Revert "remove the safe-to-remove warning on rspack css ordering"

This reverts commit 4feae48604.

* Remove redundant sdk-ee-plugins import from the SDK in new iframe embedding (#58416)

* Ignore CSS import order warnings from new iframe embedding (#58417)

* Follow-up validation improvements for new iframe embedding (#58516)

* Explicitly disallow using API keys in production for new iframe embedding (#58520)

* fix wrong merge conflict - do not destructure H.cy in component tests

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-05-27 23:35:03 +07:00
Sébastien
252c1c0fce closes VIZ-1021 message for empty results (#58525) 2025-05-27 17:50:07 +02:00
metamben
da0be61b2e Render Metabot generated get-year filters friendlier in the FE (#58527) 2025-05-27 15:27:24 +00:00
metamben
4efe85990b Introduce fields controlling the data loaded by answer-sources (#58498)
* Introduce fields controlling the data loaded by answer-sources

Closes BOT-167
2025-05-27 18:05:58 +03:00
Stas Gavrylov
8cc4451ebc WRK-438: Update cron syntax explanation (#58518) 2025-05-27 18:00:51 +03:00
Alexander Polyankin
2b7a5352fb Fix implicit field refs for cases when the source-field is coming from a join (#52720) 2025-05-27 14:32:14 +00:00
Jeff Bruemmer
80fbc9f9ca docs - database routing (#58436) 2025-05-27 09:49:45 -04:00
Brad Anderson
b917700959 VIZ-976 Updates visualizer slice's undoable config so it prevents history items from being added when dropping an item has no effect on the rest of the visualizer state (#58424) 2025-05-27 09:43:19 -04:00
Riley Thompson
0931f01921 Add Clickhouse UUID cast implementation for native filtering (#58496)
* clickhouse replace uuid impl

* generate uuids in tests
2025-05-27 09:38:22 -04:00
Anton Kulyk
4e9f101cea Fix brush filter for visualizer charts (#58492)
* Fix brush filter for visualizer charts

* Fix typo

Co-authored-by: Sébastien <sebastien@metabase.com>

---------

Co-authored-by: Sébastien <sebastien@metabase.com>
2025-05-27 14:37:16 +01:00
Edward Paget
18776a687a chore: bump oktokit in release tooling (#58431) 2025-05-27 08:06:50 -05:00
Mahatthana (Kelvin) Nomsawadi
ced4a5ec3d Fix static question embed download when parameters have multiple values (#58423)
* Fix static question embed download when parameters have multiple values

* Simplify type

* Don't wanna deal with outdated query builder types 🤷

* Use a proper value when asserting
2025-05-27 06:42:28 +01:00
Ngoc Khuat
e0f5809a74 Fix Viz settings of 2 questions with the same query on dashboard subsciprionts (#58471) 2025-05-27 01:57:46 +00:00
Alexander Polyankin
a6da2249c0 Remove force-broken-id-refs (#58489) 2025-05-26 22:35:32 +00:00
William
72e14e3ea2 nest-query explicitly adds all fields to the query (#58331)
Before, nest-query relied on the preprocessor (specifically, the add-implicit-clauses middleware) to add all possible
fields to the newly created inner query (and then removes unnecessary fields later).  However, add-implicit-fields
ignores fields with a parent id.  The main user of parent-id is mongo, and mongo doesn't use nest-query, so this
usually isn't an issue.  However, bigquery also uses parent-id, and bigquery is a sql driver that uses nest-query.  As
a result, nest-query wasn't adding bigquery struct member fields to the inner query, which caused some queries to
break.  Now, nest-query explicitly finds all non-sensitive/retired fields (including fields with parent ids) and
ensures that they are in the inner query.
2025-05-26 22:34:41 +00:00
Cam Saul
746e8174bc [Backend modularization] Remove util deps on lib and legacy-mbql (#58379)
* [Backend modularization] Remove `util` deps on `lib` and `legacy-mbql`

* Don't reference unloaded schema

* Test fixes 🔧

* Test fixes 🔧

* cljfmt
2025-05-26 23:10:12 +03:00
Sébastien
d5a0699e61 closes VIZ-1035 silent error when converting certain models to viz cards (#58484) 2025-05-26 18:50:48 +02:00
Alexander Polyankin
fcf51ffefd Show loader every time the generated sql is fetched (#58488) 2025-05-26 16:32:37 +00:00
Riley Thompson
8367dd30a2 Connection impersonation for MySQL & SQLServer (#57622) 2025-05-26 12:18:26 -04:00
Raphael Krut-Landau
eb1de2371e Do science without yelling (#58404) 2025-05-26 11:56:15 -04:00
Mahatthana (Kelvin) Nomsawadi
fbbf273218 repurpose entityTypeFilter as entityTypes for new embedding data pickers for the SDK (#58208)
* used `entityTypeFilter` for new embedding data pickers

* Rename `entityTypeFilter` to be consistent with `entity_types`

* Migrate `entity_types` to a new reducer

* Add E2E test

* remove unused prop

* Fix interactive embedding's `entity_types`

* Fix unit tests
2025-05-26 15:43:12 +01:00
Romeo Van Snick
b1852e2d43 Avoid doing quadratic search in FkTargetPicker (#58434)
* Avoid using quadratic search in FkTargetPicker

* Reduce further parsing and stringification

* Avoid calling JSON.parse in FkTargetPicker

* Assert fieldId

* Rename getters to be more clear
2025-05-26 19:59:58 +07:00
Nick Fitzpatrick
b3f4fd20d8 Use user locale setting if available for lang prop in <html> (#58221)
* use user locale setting if available for lang prop in <html>

* add a test

* fix my broken test

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-05-26 17:54:24 +05:30
Anton Kulyk
63428a43e2 Visualizer: fix scalars being compatible nearly everywhere (#58399)
* Fix scalars being compatible nearly everywhere

* Fix type error
2025-05-26 12:57:31 +01:00
Anton Kulyk
b7de348186 Visualizer: pies, funnels, gauge polish (#58437)
* Fix underlying question menu for pie charts

* Fix opening gauge, fix titles for scalar cards
2025-05-26 12:43:34 +01:00
Nick Fitzpatrick
f142a1dc75 Remove edit permissions from other users personal collections (#58281) 2025-05-26 17:09:50 +05:30
Nemanja Glumac
86350c8a04 Add transient "Getting started" section to the main sidebar (#58332) 2025-05-26 12:20:09 +02:00
Sébastien
ff3d1141cd Closes VIZ-994 snowplow tracking for visualizer (#58274)
* added simple tracking

* .

* added more events

* prefix

* e2e tests

* flaky flaky, eggs and baky

* ...
2025-05-26 10:50:45 +02:00
Jeff Bruemmer
4b11a8aaec docs - entry for datetime function in expression list (#58450)
* entry for datetime function in expression list

* edit

* fix typos
2025-05-23 22:54:35 +00:00
Eric Normand
aebd8322ea Correct datetime() helper text. (#58456) 2025-05-23 22:16:32 +00:00
Riley Thompson
0125b77c3d Add bigquery user agent (#58410) 2025-05-23 21:40:14 +00:00
Tyler Plude
965d41f3ff array-map for json export to preserve order (#58451)
* array-map for json export to preserve order

* fix indents

* add comment
2025-05-23 14:34:20 -07:00
Kyle Doherty
51c758988e clean up settings menu (#58365)
* use mantine menu and reorganize options

* remove comments

* fix unit tests

* e2e test fixes, replace "a" with ForwardRefLink to fix sidebar not getting closed

* fix external links

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2025-05-23 17:19:42 -04:00
Tyler Plude
ea48474bcf Convert BigDecimals to double for color getter JS bundle (#58263)
* Convert bigdecimals in table static viz

* unit test; support for bigint conversion
2025-05-23 13:54:38 -07:00
Alexander Polyankin
3d3f52c6f1 Prompt in generated SQL + first comment as a prompt + limit to SQL (#58265)
* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Add prompt to the query

* Tests

* Tests

* Tests

* Tests

* Tests
2025-05-23 16:37:52 -04:00
Aleksandr Lesnenko
eaea377420 add pivot xlsx export hint (#58313)
* add pivot xlsx export hint

* safer not to change global checkbox style

* lint
2025-05-24 02:42:05 +07:00
Noah Moss
85bd509d40 url-encode parameters substituted into link and iframe cards (#58429) 2025-05-23 15:29:41 -04:00
Noah Moss
0b53dc2477 Fix column alignment for fully-collapsed pivot exports (#58372)
* Fix fully collapsed pivot exports

* Fix tests, fix unrelated typo
2025-05-23 15:15:17 -04:00
metamben
69703938b3 Add field-values endpoint (#58403) 2025-05-23 22:10:28 +03:00
metamben
1bac602009 Make string matching functions case insensitive (#58427)
Closes BOT-121
2025-05-23 22:10:16 +03:00
Edward Paget
906313b8e0 fix: audit db not working after import form h2 (#58374)
* fix: audit db not working after import form h2

Removes conditions from the `adjust-audit-db-to-source!` function so we
make sure we always restoring the audit db tables to their original form
regardless of what type of app-db is used.

* fixup! test setting up db triggers

* fixup! cljfmt
2025-05-23 18:45:20 +00:00
Timofey Kachalov
4694ac7ce9 Run sample app tests for both prod and dev bundles (#58421) 2025-05-23 19:57:21 +04:00
Nicolò Pretto
295cfce315 remove support for the already deprecated hide_download_button hash parameter (#58401)
* remove support for #hide_download_button

* clean up code 🧹

* adds link to the docs

* use the same style we use in the sdk
2025-05-23 17:27:16 +02:00
Nathan Voxland
16d8f21bbd Improved search metrics (#57797) 2025-05-23 09:29:55 -05:00
Phoomparin Mano
d40df5ea08 fix(sdk): fix tooltip crash by migrating away from renderToString (#58394) 2025-05-23 20:46:34 +07:00
Nicolò Pretto
a1acddd7d6 cross versions tests: skip @OSS tests and use prod build for the FE (#58277)
run breaking changes tests on multiple runners

TO BE REVERTED BEFORE MERGING

force production fe build

build-release as setting node_env fucks up everything

exclude @OSS tests

Revert "TO BE REVERTED BEFORE MERGING"

This reverts commit c907a2f492.
2025-05-23 14:38:15 +02:00
Nick Fitzpatrick
43d10c8787 Questions in usage analytics should never show native preview panel (#58229)
* Add additional check on rendering native preview panel

* adding e2e test

* adjusting e2e test

* do not show native panel when no data is selected

* move e2e test to instance analytics suite
2025-05-23 17:13:01 +05:30
Chris Truter
b9fe632080 Add Text/Description back to public field-types docs (#58273) 2025-05-23 13:04:00 +02:00
Anton Kulyk
1e8153a5e0 Use computed settings in visualizer redux actions (#58237)
* Fix some columns added twice

* Use computed viz settings in visualizer actions

* Fix pie chart tests

* Fix removing dimensions in multi series charts

* Handle null metrics and dimensions

* Fix funnel e2e tests

* Fix funnel unit tests

* Fix appending multiple columns

* Fix cartesian unit tests

* Add repro test

* Remove comments

* Add comments
2025-05-23 11:39:42 +01:00
Mahatthana (Kelvin) Nomsawadi
b1bcf32406 Set sensible default data picker step when joining (#58065)
* simplify embedding data picker code

* Show the data picker step based on starting query source

* Set starting model collection ID when joining a model

* Improve initial collection loading UX

* Fix failed unit tests and types

* Fix failed E2E tests

* remove unused var

* Fix sometimes the starting collection is incorrect

* Add an E2E test

* Add a comment to clarify

* Clarify a new prop
2025-05-23 11:38:08 +01:00
Sébastien
5a638013b4 Closes VIZ-646 -> simplify the "empty state" CTAs in visualizer (#57957)
* closes VIZ-646 no dataset CTAs

* better UI

* fixed e2e tests
2025-05-23 11:11:03 +02:00
Timofey Kachalov
5a11a8d3e8 sdk(docs): Remove remarks from SdkDashboardDisplayProps type annotations (#58368) 2025-05-23 11:52:29 +04:00
Fraser
216b1b790c Create LocalizationSettingsPage (#57368)
* Create LocalizationSettingsPage
2025-05-23 14:33:34 +12:00
Edward Paget
f647173e41 Disable quartz metrics trigger listener (#58244) 2025-05-22 20:49:39 -05:00
Cam Saul
fd969ed8d1 [Backend modularization] Move all settings to .settings namespaces (#58327)
* Remove unneeded `GET /api/util/openapi` endpoint

* [Backend modularization] Move all settings to `.settings` namespaces

* Fix stuff up

* Test fixes 🔧

* cljfmt
2025-05-22 17:56:16 -06:00
Brad Anderson
d5cb296f50 Closes VIZ-329 -> Applying formatting updates is unintuitive happens on scroll (#58252)
* VIZ-329 Updates ChartSettingInput and ChartSettingInputNumeric to apply changes when the user pauses typing in addition to on blur

* VIZ-329 Removes now-redundant blur handler in ChartSettingInputNumeric and updates unit tests
2025-05-22 17:16:22 -04:00
Cam Saul
d7a44a0b81 Remove unneeded GET /api/util/openapi endpoint (#58323)
* Remove unneeded `GET /api/util/openapi` endpoint

* Fixes
2025-05-22 19:34:35 +00:00
Aleksandr Lesnenko
4ef802769e use original series settings visibility in visualizer (#58243)
* use original series settings visibility in visualizer

* hide settings for hidden series, add a spec

* shallow clone
2025-05-23 02:13:42 +07:00
Aleksandr Lesnenko
d96b5a512f Makes visualizer entities use numeric card.ids in viz settings (#58295)
* Revert "fix serialization for visualizer entities (#57467)"

This reverts commit d56e791077.

* drop columns from test data

* fix types, tests

* Revert "[VISUALIZER] Fixing dashboard duplication for visualizer cards (#58106)"

This reverts commit 6cf7606754.

* keep preferred true?

* serdes transformation support for visualizer settings

* Update entity ids in visualizer dashcards on DB read to be card ids

* unit test for the serdes transformations

* cljkondo

* fix on-read to only run if viz settings exists

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2025-05-22 11:55:32 -07:00
Cam Saul
cefe3d4c0b [BE modularization] Eliminate permissions dep on server, server dep on users (#58312)
* [Backend modularization] Eliminate `permissions` dep on `server`, `server` dep on `users`

* Move `user/permissions-set` => `perms/user-permissions-set`

* Fix something else

* Cleanup

* Fix Kondo warnings

* Fix Kondo

* Revert parallelizing Kondo

* Fix the stuff
2025-05-22 18:19:07 +00:00
Nicola Mometto
4565e1ce54 Disable distribution drill if binning is not available (#58356)
* disable distribution drill if binning is not supported

* add unit test
2025-05-22 18:40:33 +01:00
Cam Saul
cc3b0ceecb [Backend modularization] batch-processing module (#58330) 2025-05-22 10:32:24 -07:00
Eric Normand
22502a99dc Implement the datetime(string) custom expression function (#58048)
* Empty

* Add schema for datetime()

* Add datetime() function; works on iso strings

* Implement datetime() for sql to test all drivers

* Remove Z from datetime

* Change the format of the datetime string in tests

* Be more lenient on types

* have multiple formats for the test

* Implement datetime() for mongo

* Use ISO string in test

* Datetime for string with no mode

* Add changelog entry for :expressions/datetime

* Add docs for datetime

* Add e2e tests for datetime

* Update e2e test and datetime text

* Fix :expressions/datetime feature

* Remove reference to iso

* Remove unused schema

* Fix frontend test

* Use multiple arities for datetime()

* Replace T with ' ' in databases that don't like T in datetime timestamps

* Try removing visibility requirement in test

* Fix brittle test

* Test dates with space and with T

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-05-22 11:26:40 -05:00
Kyle Doherty
7bbc501191 add text to help with swap affordance (#58311) 2025-05-22 11:42:52 -04:00
Alexander Polyankin
7b66df806b Fix dashboard crashing when there is invalid stage-number in parameter targets (#58296) 2025-05-22 11:40:36 -04:00
Maz Ameli
f4abe9a703 Standardize form input font size to md (14px) and improve spacing (#58258)
* make form inputs use md font size, and add spacing

* remove redundant classes, tweak spacing
2025-05-22 15:38:19 +00:00
Edward Paget
0555261a6e fix: drop execution time quartz job metric (#58351) 2025-05-22 09:59:34 -05:00
metamben
3eaca42bd5 Call AI service endpoints without trailing slashes (#58348) 2025-05-22 14:29:15 +00:00
Sébastien
af14a4ef81 Closes VIZ-989 double scrollbars on tabular view (#58345)
* closes VIZ-989 double scrollbars on tabular view

* .
2025-05-22 16:04:57 +02:00
Phoomparin Mano
5ee122bd43 Show "Use instance font" in default dropdown in static embed (#58335) 2025-05-22 21:03:28 +07:00
Romeo Van Snick
02a5a4d511 Render bucketing popover in portal (#58170)
* Render popover in portal

* Revert withinPortal change

* WIP

* Move overflow onto child container

* Move fix to css-only

* Remove fixed strategy

* Fix e2e tests

* Reduce diff
2025-05-22 15:39:52 +02:00
Phoomparin Mano
608bb8c1c4 feat(sdk): remove question and metric from entity type filters in the sdk's data picker (#58339) 2025-05-22 20:06:47 +07:00
Nicolò Pretto
f1843ef47f run breaking changes tests on multiple runners (#58092) 2025-05-22 13:18:50 +02:00
metamben
1061de72ca Handle decoding of nil (unknown) field type (#58318) 2025-05-22 06:17:03 +00:00
Cam Saul
43f5033b5f [Backend modularization] eliminate api dependency on server (#58317)
* [Backend modularization] eliminate `api` dependency on `server`

* Fix moved var
2025-05-22 01:39:04 +00:00
Cam Saul
4bb81a7927 [Backend modularization] Decouple app-db and util from driver (#58249)
* [Backend modularization] Decouple `app-db` and `util` from `driver`

* Fixx

* Test fix 🔧

* Move query cancelation checking logic for app DB types into `app-db`

* Fix

* Appease Kondo
2025-05-21 21:33:27 +00:00
Cam Saul
e8559895a3 [Backend modularization] eliminate api dep on embedding (#58310) 2025-05-21 21:07:31 +00:00
Edward Paget
c162d0983d fix: explicitly mark when fields are gtapped (#58113)
* fix: explicitly mark when fields are gtapped

* add debug

* fixup! tests setup to set advanced feature

* fixup! strip any user-added gtapped-tables keys

* fix a bad import
2025-05-21 16:04:45 -05:00
Nemanja Glumac
e8faba9fe8 Refactor browse navigation section (#58279)
* Refactor `browse` navigation section

- Removes the dependency on the `CollapseSection` custom component
- Prepares the section for the "Add Data" project

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2025-05-21 20:42:21 +00:00
Cam Saul
c82a945223 [Backend modularization] Eliminate util dependency on channel and parameters (#58302) 2025-05-21 14:14:28 -06:00
Cam Saul
90161de265 [Backend modularization] logger cleanup; decouple api from logger (#58251)
* [Backend modularization] `logger` cleanup; decouple `api` from `logger`

* Test fixes 🔧
2025-05-21 14:11:23 -06:00
Cam Saul
f9e730f12d Misc backend modules tooling improvements (#58298) 2025-05-21 14:10:57 -06:00
Alexander Polyankin
302d1295a5 Do not create targets with nil field refs (#58299) 2025-05-21 20:00:41 +00:00
Edward Paget
b81d0f94e9 fix: appdb table permssions search slowdown (#58294)
Use a correlated subquery to make sure we hit the pk index

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-05-21 18:59:12 +00:00
dpsutton
ab3f39a82b Log view count information (#58259)
BEFORE:
```
2025-05-20 22:24:17,586 DEBUG middleware.log :: POST /api/dashboard/pivot/1/dashcard/12/card/10/query 202 [ASYNC: completed] 634ms (81 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (132 total active threads) Queries in flight: 1 (0 queued); h2 DB 1 connections: 0/7 (0 threads blocked) {:metabase-user-id 1}
2025-05-20 22:24:25,629 DEBUG events.view-log :: Increment view counts of 24 items
```

AFTER:

```
2025-05-20 22:24:17,586 DEBUG middleware.log :: POST /api/dashboard/pivot/1/dashcard/12/card/10/query 202 [ASYNC: completed] 634ms (81 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (3 idle, 0 queued) (132 total active threads) Queries in flight: 1 (0 queued); h2 DB 1 connections: 0/7 (0 threads blocked) {:metabase-user-id 1}
2025-05-20 22:24:25,629 DEBUG events.view-log :: Increment view counts of 24 items
2025-05-20 22:24:25,638 DEBUG events.view-log :: Writing 3 items to :model/Dashboard with lock :metabase.events.view_log/report_dashboard-view-count
2025-05-20 22:24:25,654 DEBUG events.view-log :: Writing 21 items to :model/Card with lock :metabase.util.cluster-lock/statistics-lock
2025-05-20 22:24:27,649 WARN models.card :: Best-effort backfill of :entity_id failed for Card null
2025-05-20 22:24:27,656 WARN models.card :: Best-effort backfill of :entity_id failed for Card null
2025-05-20 22:24:27,660 WARN models.card :: Best-effort backfill of :entity_id failed for Card null
```
2025-05-21 13:36:51 -05:00
Sébastien
3c8ca416f1 Closes VIZ-984 provide a clearer entrypoint to the underlying question in viz cards (#58228)
* added an ... submenu to open questions

* fix

* menu is now in the title

* addressed feedback

* reverted submenu change

* added title menu items to funnel

* added e2e test

* added chevron

* unit test fix
2025-05-21 19:18:42 +02:00
Cam Saul
de55ea6c3e [Backend modularization] Eliminate util dep on dashboards (#58250) 2025-05-21 10:28:41 -06:00
Sloan Sparger
5462e2fb61 [Metabot] Sidebar UI (#58059)
* remove auto-close logic

* add metabot icon to searchbar, clicking icon opens metabot instead of search

* make chat ui appear in the sidebar

* add header section to the chat sidebar

* progress on conversation ui

* few tiny additions

* fetch mock suggested prompts from an endpoint, animate thinking text, fix search button touch target size, do no clear chat history when closing the chat sidebar

* messages rendered as markdown

* restyles

* more restyles

* fix input autofocus

* impl empty state, remove more textarea code

* hide copy button actions

* handle user aborted requests better

* design iteration

* latest design feedback, better auto-scrolling, better markdown rendering

* fix types

* increase unit test coverage

* impl long convo calc, add unit tests, fix focus issue if clicking the metabot option from the command palette

* move code to enterprise folder, fix some e2e, adjust header alignment, fix some types

* small clean ups, fix failing tests and erroring types

* add unit test and fix selector for getting latest agent messages by type

* review feedback, turn on an e2e test again

* try getting metabot e2e working

* fix embedding sdk

* impl pr feedback
2025-05-21 11:23:08 -05:00
Edward Paget
d6acba4756 fix: split snyk scans (#58290)
Fits them under githubs 20 runs per sarif file limit
2025-05-21 16:05:57 +00:00
Romeo Van Snick
f7e14433ef Update toast design (#58145)
* Make default toast color darker

* Avoid remounting the UndoList on overy toast change

* Tweak the undo animation to come in from the left

* Move more undo state into UndoListingOverlay

* Reverse toast order

* Manually manage undo target

* Remove unused props

* Store pause state in undo itself

* Use react-transition-group to render toast notifications

* Measure height so we can animate toast position

* Use css transforms only and avoid animating bottom

* Mock react-transition-group in test

* Unmount elements on exit

* Wait for animation in test

* Make toast ref optional

* Clean up transition

* Fix e2e test

* Disable transition group in cypress

* Add check_filled icon

* Default to check_filled

* Add text-secondary-inverse

* Use text-secondary-inverse color for icon on tooltip

* Remove min-width from toast

* Control the animation state of the todo's after moving the portal

* Fix icon in unit tests

* Simplify undo hooks

* Avoid overwriting state

* Add missing import

* Allow transitioning new todos even when not moving the portal

* Fix e2e test

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-05-21 15:29:54 +02:00
Uladzimir Havenchyk
8f4cda8597 feat: update metabot icon and placeholder text (#58253)
* feat: update metabot icon and placeholder text

* add tests
2025-05-21 11:48:44 +00:00
Nicola Mometto
56f420c38d Fix race condition in sync, causing failure if a table gets deleted inbetween steps (#58217)
* fix typo

* don't error out during fields-metadata fallback if table is known to not exist

* table known to not exist impl for drivers

* add test

* add debug log

* add to changelog

* address review comments
2025-05-21 12:43:46 +01:00
Roman Pittner
1ff83fcb70 Swapped out the <StepTitle/> for default <Title/> in CompletedStep.tsx
Visual change. Updated the title in CompletedStep.tsx with the actual <Title/> component so that the styling is unified with the rest of the app.
2025-05-21 13:05:11 +02:00
Nemanja Glumac
dfbebdfce3 Branding email subscriptions (#58096)
This commit adds the conditional branding to dashboard email subscriptions and to question alerts. It does so by altering the handlebars templates we use for each, respectively. It follows the same logic as the rest of the PRs from this project. If a token has a whitelabel feature flag (Pro/Enterprise), the branding is not shown. It should be shown for OSS and for Starter plans.

* Add branding content to dashboard subscriptions

* Add branding content to alerts
2025-05-21 12:59:27 +02:00
Nick Fitzpatrick
ec224e251e Exclude parent from recents and search when moving items (#58181)
* Do not show entity parent in recents or search when moving entities

* e2e tests

* adjusting e2e test
2025-05-21 15:42:20 +05:30
Aleksandr Lesnenko
e73e604d4c fix narrow columns widths in dashcards (#57873)
* expand columns to minGridWidth

* specs, flakiness

* refactor measuring code, reduce flakiness

* fix types

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-05-21 15:56:39 +07:00
Phoomparin Mano
cf6a83436c Restore embed signal fallback when in embedding (#58240) 2025-05-21 15:30:48 +07:00
Chris Truter
17e8ae6b28 Un-deprecate Text/Description semantic type (#58235) 2025-05-21 10:18:18 +02:00
Nick Fitzpatrick
023f079151 API key creation modal alawys shows error after selecting group (#58210)
* fixing FormGroupWidget error prop

* update unit test
2025-05-21 12:28:14 +05:30
Raphael Krut-Landau
0e5e5cd2c5 Add script to facilitate translation backports (#58189) 2025-05-20 22:19:55 -04:00
Cam Saul
8749431e5d [Backend modularization] Move some legacy stuff to .core namespaces (#58185)
* [Backend modularization] Move some legacy stuff to `.core` namespaces

* Kondo linter and rename `metabase.http-client` => `metabase.test.http-client`

* metabase.cloverage-runner => metabase.test.cloverage-runner

* `metabase.types` => `metabase.types.core`

* cljfmt / Kondo

* Fix ns name

* Fix type names

* Add `NumericWrapper?` and `TextWrapper?` helpers

* cljfmt

* `metabase.cmd` => `metabase.cmd.core` (part 2)

* Test fixes 🔧
2025-05-20 22:01:32 +00:00
Alexander Polyankin
f15681fc90 Remove field ident calculation (#58246) 2025-05-20 21:48:05 +00:00
Alex Yarosh
09fff2ff41 docs: make sure the code renders (#58205)
* Update funnel.md

* don't need to escape apparently
2025-05-20 17:27:51 -04:00
Cam Saul
6d3d404d1d [Backend modularization] Move JVM metadata provider into lib-be (#58245)
* [Backend modularization] Move JVM metadata provider into `lib-be`

* Fix namespaces
2025-05-20 20:02:05 +00:00
Alexander Polyankin
605cabe101 Remove entity_id on databases, tables, fields (#58236) 2025-05-20 19:50:28 +00:00
Cam Saul
ee52f219dc [Backend modularization] Remove models dep on driver (#58203) 2025-05-20 18:54:05 +00:00
Cam Saul
ce3b11810c [Backend modularization] move metabase.dashboard-subscription-test (#58114)
* [Backend modularization] move `metabase.dashboard-subscription-test` (DEV-524)

* Fix
2025-05-20 18:28:37 +00:00
Cam Saul
6841c08ff7 [Backend modularization] events module deps pruning (#58202)
* [Backend modularization] `events` module deps pruning

* cljfmt
2025-05-20 18:10:23 +00:00
Noah Moss
f7f8f6b911 Ensure we buffer the output stream for CSV downloads (#58238) 2025-05-20 10:57:42 -07:00
Anton Kulyk
e1b1e18500 Unify visualizer compatibility checks + disable unusable columns (#57919) 2025-05-20 18:28:52 +01:00
Cam Saul
7f3a4a1463 [Backend modularization] metabase.api.dataset => metabase.query-processor.api (#58201)
* [Backend modularization] `metabase.api.dataset` => `metabase.query-processor.api`

* Update config

* Sort namespaces

* Fix Kondo warnings
2025-05-20 12:07:39 -05:00
bryan
3ecfbb74e1 Ues linear graphql api with exponential backoff (#58182) 2025-05-20 10:33:13 -06:00
Alexander Polyankin
84af10f4c0 Add unique metabase_table(db_id, schema, name) constraint (#58103)
* Add migration

* Add migration

* Add migration

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Deduplicate tables

* Deduplicate tables

* Deduplicate tables

* Fix tests

* (mt/with-temp-defaults :model/Database)

* (mt/with-temp-defaults :model/Database)

* Fixes

* Remove new column from results

* Remove new column from results

* Remove new column from results

* Remove new column from results

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* BackfillDatabaseEntityIds

* BackfillDatabaseEntityIds

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* metabase_table

* Add a comment

* Add a comment

* Add a comment

* Add a comment
2025-05-20 11:44:00 -04:00
metamben
386693ede9 Make sure dashcard parameter mappings have valid targets (#58215)
Fixes #58214
2025-05-20 16:36:57 +03:00
Cam Saul
5578b587a5 [Backend modularization] metabase.db => metabase.app-db.core (#58200)
* Remove most outdated :consistent-alias specs

* `metabase.db` => `metabase.app-db.core`

* Kondo fixes 🔧
2025-05-20 05:36:14 -07:00
Phoomparin Mano
f5f8a13af9 fix(sdk): questions shows an error while loading on strict mode (#58183) 2025-05-20 18:26:39 +07:00
Christoph Deil
1d3e4d8cf6 Fix Python newline in code-templates.ts (#57350) 2025-05-20 12:22:09 +01:00
Timofey Kachalov
50678b84b7 Add sdk esbuild branch to the release process (#58211) 2025-05-20 14:06:04 +04:00
Timofey Kachalov
a6642444d6 feat(sdk): Do not bundle main-app plugins to the SDK bundle (#58028) 2025-05-20 12:23:11 +04:00
github-automation-metabase
f80ca9eb75 Bump org.eclipse.jetty/jetty-server from 12.0.20 to 12.0.21 (#58138)
* Bump org.eclipse.jetty/jetty-server from 12.0.20 to 12.0.21

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-20 00:28:52 +00:00
github-automation-metabase
f2b782b9d6 Bump djblue/portal from 0.59.0 to 0.59.1 (#57815)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.59.1/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-20 00:25:09 +00:00
github-automation-metabase
dba7e427b5 Bump com.github.seancorfield/honeysql from 2.7.1295 to 2.7.1310 (#58132)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1310/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-20 00:17:48 +00:00
github-automation-metabase
230de54068 Bump rewrite-clj/rewrite-clj from 1.1.49 to 1.2.50 (#58140)
Inspect dependency changes here: https://github.com/clj-commons/rewrite-clj/blob/v1.2.50/CHANGELOG.adoc

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-20 00:09:33 +00:00
github-automation-metabase
ab2d8b1120 Bump com.databricks/databricks-jdbc from 2.7.1 to 2.7.3 (#58143)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-19 23:47:26 +00:00
github-automation-metabase
8f2690e850 Bump io.github.clojure/tools.build from 0.10.8 to 0.10.9 (#58133)
Inspect dependency changes here: https://github.com/clojure/tools.build/blob/v0.10.9/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-19 23:39:08 +00:00
github-automation-metabase
afb0b91f02 Bump thheller/shadow-cljs from 3.0.5 to 3.1.1 (#58141)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-19 23:34:39 +00:00
Maz Ameli
96071d15ce auto-merge
* remove unused var

* use mantine radius

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-05-19 23:32:17 +00:00
github-automation-metabase
772ad84d24 Bump io.github.tonsky/clj-reload from 0.9.5 to 0.9.6 (#58134)
Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.6/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-19 23:29:38 +00:00
github-automation-metabase
799e6f90cd Bump com.clickhouse/clickhouse-jdbc from 0.8.5 to 0.8.6 (#58142)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-19 23:28:39 +00:00
Cam Saul
6c623919a1 [Backend modularization] add tests to make sure we have requires (#58196)
* [Backend modularization] add tests to make sure we have requires for `init` and `settings` namespaces

* cljfmt
2025-05-19 23:14:59 +00:00
github-automation-metabase
104f820b1b Bump methodical/methodical from 1.0.126 to 1.0.127 (#58135)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-19 23:12:55 +00:00
Cam Saul
067621099e [Backend modularization] metabase.models.dimension => warehouse-schema (#58191) 2025-05-19 22:12:19 +00:00
bryan
1662b32dee key prefixes must be unique, but they weren't (#58190) 2025-05-19 20:49:24 +00:00
Cam Saul
a952fb7e8e [Backend modularization] Move metabase.util.ssh into driver (#58187)
* [Backend modularization] `metabase.util.ssh` => `metabase.driver.sql-jdbc.connection.ssh-tunnel`

* Update changelog
2025-05-19 13:41:46 -07:00
Timofey Kachalov
263547ba24 Fix timeline event tooltip date text for SDK (#58122) 2025-05-20 00:36:30 +04:00
Cam Saul
b892464ed6 [Backend modularization] Move util/password_check into session (#58179)
* [Backend modularization] Move `util/password_check` into `session`

* PR feedback
2025-05-19 20:04:35 +00:00
Brad Anderson
5b0b40b8e5 chore: add bpander as a team member (#58176) 2025-05-19 15:24:01 -04:00
metamben
33b628834d Fix X-Ray URLs generated for models (#58178)
Fixes BOT-125
2025-05-19 21:55:55 +03:00
Nathan Voxland
9472a252df Limit data selected out to what will be eventually indexed (#57552) 2025-05-19 13:52:47 -05:00
Phoomparin Mano
7fff64eaf7 feat(sdk): remove footer from dashboards (#57779) 2025-05-20 00:49:59 +07:00
Nicola Mometto
457526c9ef Exclude all numeric values from Category semantic type consideration (#57955)
* docstring typo fixes

* [SEM-8] Exclude all numeric values from Category semantic type consideration

* add unit test for SEM-8

* more typo fixes

* adjust existing tests for new sync behavior

* extend category classifier restriction to any non-text(-like)

* unit test for bolean classification

* further adjust existing tests for new sync behavior

* missed one test

* Fix e2e test by filtering

* fix e2e test by setting field semantic-type before hand

* don't classify int/bool values to category by name either

* rename tests

* extend tests

* style

* remove unused var

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-05-19 18:08:03 +01:00
Aleksandr Lesnenko
b932a8fd5c fix ai question sidebar rerenders (#58152) 2025-05-19 16:23:29 +00:00
appleby
8d0ee0743d Remove :expression_name from col-info-for-expression in annotate middleware (#57981)
* Fix the sorting of custom column from a saved card in a new question

* Remove the expression_name that is not actually used.

* Use col.name instead of expression_name in sanatizeResultData

* Remove additional :expression_name references in tests

* Remove comment that was attached to now-removed :expression_name

* Remove expression_name from static-viz components

* Remove expression_name from instance_analytics export

* Add comment to now-deprecated expression_name field in DatasetColumn

* Add e2e test for sorting on nested custom column

---------

Co-authored-by: Lifeng Lv <lvlifen9@gmail.com>
2025-05-19 08:45:49 -07:00
Ryan Laurie
95c42197c3 update google auth form (#57715) 2025-05-19 09:25:16 -06:00
Ryan Laurie
dfe5951475 cleanup deprecation notice code (#58001) 2025-05-19 09:21:21 -06:00
Noah Moss
f08b7961fb Unlimit pivot exports (#58109)
* unlimit pivot exports

* fixups, fix default for collapsed rows setting

* address import issue

* simple unit test

* simplify test a bit

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-05-19 11:13:40 -04:00
Nathan Voxland
7c75d0ef53 Better support for non-english searching in appdb index (#57979) 2025-05-19 10:04:36 -05:00
Noah Moss
b75e530b78 Fix default for condense duplicate totals setting (#58112)
* fixups, fix default for collapsed rows setting

* add condense_duplicate_totals test for pivot csv exports

* tweak order of checks
2025-05-19 11:03:25 -04:00
Nemanja Glumac
ac444667ff Fix broken yarn dev-ee (#58164)
Running `yarn dev-ee` was broken on the latest master. (introduced in #58054)
The compiler was complaining about the `\` in the docstring because it was interpreting it as an escape character followed by a newline.
2025-05-19 15:25:33 +02:00
Oleksandr Yakushev
00dc257b65 cljs: Fix obscenely large schema expansions (#58094) 2025-05-19 16:12:11 +03:00
Oleksandr Yakushev
35a641b26f Bump HoneySQL version (#58156) 2025-05-19 16:05:17 +03:00
Oleksandr Yakushev
f383f9a753 perf: Small optimizations for metabase.search.spec (#57935) 2025-05-19 15:55:15 +03:00
Timofey Kachalov
807acae216 sdk(feat): Reduce bundle size by using commonReducers from the Main App by SDK (#58071) 2025-05-19 16:51:04 +04:00
Aleksandr Lesnenko
620117bb3f Fix visualizer cards do not work on public dashboards (#58104)
* add missing entity_id field

* specs
2025-05-19 17:53:28 +07:00
Aleksandr Lesnenko
0ac23e079e fix legend flaky spec (#58006) 2025-05-19 17:52:46 +07:00
Aleksandr Lesnenko
db6300be72 fix tooltip flakes (#58117) 2025-05-19 17:50:42 +07:00
Oleksandr Yakushev
2f84c10b82 perf: Cache metabase.driver.util/features (#57811) 2025-05-19 10:21:20 +00:00
Oleksandr Yakushev
53a2d9e079 Bump Toucan and Methodical (#57932) 2025-05-19 13:19:56 +03:00
Oisin Coveney
0351cbdf3a Fix menu text on sharing and subscription menu (#58089) 2025-05-19 09:53:01 +00:00
Nicolò Pretto
afa28d75bf convert script to js in preparation of splitting the work on multiple runners (#58086)
* convert script to js

import os

* remove two tests as one file there fails

* Update bin/backward-compatibility-test.js

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* test -> tests

* address feedback

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-05-19 11:42:22 +02:00
Sébastien
6994d6ca24 Closes VIZ-982 settings not always being propagated (#58072)
* .

* closes VIZ-982 settiings not being propagated

* fixup
2025-05-19 10:56:33 +02:00
Mahatthana (Kelvin) Nomsawadi
3533f67824 Remove field references (#57950) 2025-05-19 05:23:58 +01:00
Alexander Polyankin
b0e6c762c7 Revert "Clean up after #58124 (#58127)" (#58128)
This reverts commit 04462007be.
2025-05-18 11:14:27 -04:00
Alexander Polyankin
04462007be Clean up after #58124 (#58127) 2025-05-18 13:19:55 +00:00
Alexander Polyankin
02596269e1 Revert "Add unique metabase_database (name, engine) constraint and deduplicat…" (#58124)
This reverts commit 5300bf8bfc.
2025-05-18 11:15:36 +00:00
Alexander Polyankin
5300bf8bfc Add unique metabase_database (name, engine) constraint and deduplicate data (#58101) 2025-05-17 03:55:52 +00:00
Aleksandr Lesnenko
96eefff546 fix x-axis ticks granularity on charts with multiple datasets (#57805)
* fix x-axis ticks granularity on charts with multiple datasets

* update specs

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-05-17 03:12:35 +00:00
Cam Saul
688c93d4bc [Backend modularization] users module (first pass) (#58054)
* [Backend modularization] `users` module (first pass)

* Add missing fixture

* Add another missing fixture

* Fix test failure

* Test fixes 🔧

* Test fix ??

* Appease Kondo

* Fix missing (.wakeUp ...) call
2025-05-17 00:46:58 +00:00
Cam Saul
3f8676b1c0 [Backend modularization] warehouses module (first pass) (#58058)
* [Backend modularization] `warehouses` module

* Test fix 🔧

* Test fix 🔧

* Fix bad merge

* Test fix 🔧

* Appease Kondo
2025-05-16 23:59:43 +00:00
Tyler Plude
6cf7606754 [VISUALIZER] Fixing dashboard duplication for visualizer cards (#58106)
* Fixing dashboard duplication for visualizer cards

* test fix
2025-05-16 16:04:06 -07:00
Cam Saul
8661c9a1d6 [Backend modularization] warehouse-schema module (first pass) (#58047)
* [Backend modularization] `warehouse-schema` module (first pass)

* [Backend modularization] `warehouse-schema` module (first pass)

* Fix

* Fix test failure 🔧
2025-05-16 22:40:06 +00:00
bryan
164f9b0d4b require --hot cli arg to enable reloader mw (#58095) 2025-05-16 16:13:03 -06:00
bryan
c20859f4eb mage jar-download improvments (#58102) 2025-05-16 16:12:55 -06:00
Ryan Laurie
52d7235fee Refresh temporary tokens (#58046)
* refresh temporary tokens

* fix tests

* update comments
2025-05-16 22:12:45 +00:00
Ryan Laurie
0ae799bed8 flake jail (#58108) 2025-05-16 15:17:03 -06:00
Cam Saul
c8546e2af3 [Backend modularization] dashboards module (first pass) (#58056)
* [Backend modularization] `dashboards` module

* Move models

* move API namespace
2025-05-16 20:58:47 +00:00
William
bd0a271edd revert and disable entity-id backfill (#58098) 2025-05-16 14:12:37 -05:00
Nemanja Glumac
54a306d031 Adapt the setup flow for the "embedding" use case (#57749)
We're greatly simplifying and speeding up a Metabase setup 
when the use case is "embedding". This currently applies only to 
hosted instances. The FE in the main app will expect the query param
`use_case=embedding` to exist. If it does, we're showing the simplified
setup flow.
2025-05-16 10:51:06 -06:00
Cam Saul
0b36b9a2e6 [Backend modularization] Remove server's dependency on api-routes (#58052)
* [Backend modularization] Remove `server`'s dependency on `api-routes`

* Test fix 🔧
2025-05-16 08:59:37 -07:00
Cam Saul
0be751ab44 [Backend modularization] Move :model/ApplicationPermissionsRevision (#58057) 2025-05-16 08:58:52 -07:00
metamben
dd1a150343 Optimize DB caching and field matching (#58082)
* Optimize DB caching and field matching

Fixes BOT-139

* Stop relying on column idents

* Warm the cache when loading available metric cards
2025-05-16 15:06:51 +00:00
Oleksandr Yakushev
bc4be9159f cljs: Don't require cljs.pprint in :cljs-release mode to reduce bundle size (#58085) 2025-05-16 17:57:12 +03:00
Eric Normand
d196582116 date() and text() in sql dbs and mongo (#57653)
* Empty

* kick ci

* Allow temporal type in addition to string for `date()`

* Add date(datetime) test

* Use cast for date for postgres

* Extend date() on mysql

* Extend date() on bigquery

* Extend date() at snowflake

* Extend date() to datetime on clickhouse

* Generalize `date()` to :sql

* Update changelog with `date(datetime)`

* Empty

* DateTime->Date Coercion + test

* Slight cleanup

* Whitespace

* Cleaner implementation and test

* Test timestamp as well as timestamptz

* Correct implementation to get subtypes of DateTime

* Update helper text string for date

* Add e2e tests for date

* Also check to correct coercion of dates

* Add customization points to enable clickhouse implementation.

* Remove changelog-test/ignore true from ->date

* Fix defn ordering

* Fix expected type for datetime coercions

* Fix tests for sqlite

* Implement coercion for Mongo

* Implement specialization for oracle

* Add :expressions/date feature to all sql dbs

* Add :expressions/date feature to mongo

* Mongo: add text() and date()

* Better check

* Better check

* kick ci

* Add text() to all sql dbs

* Empty

* kick ci

* kick ci

* Format code

* Format code

* Add :text implementation to sql driver

* More robust tests across drivers

* Correct changelog text

* Ors on one line

* Or on same line

* kick ci

* Add `text-dbtype` multi-method

* Add athena implementation of text-dbtype

* Add databricks implementation of text-dbtype

* Remove date expression in tests that breaks some sql dbs

* Improve cast test for dates on other dbs

* Remove duplicate test

* Remove test that won't work for many dbs

* Use VARCHAR for oracle

* Use STRING for SparkSQL

* Use VARCHAR on Vertica

* Remove test that converts date to text before parsing it

* Add mongo exception

* Only run this test for SQL databases (requires native sql query)

* Add SQL Server text type

* Add Starburst text type

* Try varchar2(100)

* Simpler implementation

* Don't support date() for Oracle

* Try selecting from people to get oracle to work.

* Compile nested query for `text()` test

* Don't test empty string because Oracle treats it as NULL.

* Appease the kondo

* Implement Presto cast to text

* Implement cast-to-text in terms of cast (for presto)

* Correct test name

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-05-16 14:55:01 +00:00
Timofey Kachalov
801e9b6e6b feat(sdk): Do not add unused Empty state SVG images to the SDK bundle (#58013) 2025-05-16 17:26:37 +04:00
Ngoc Khuat
5af0a1720b Robust InitSendPulseTriggers (#58007) 2025-05-16 20:42:16 +09:00
Nemanja Glumac
58e15efc82 Return nil when there are no params in a subscription (#58075)
We're using the `computed.filters` value in the handlebars email template.
Previously, if `parameters` were an empty list `[]` we were returning a truthy value,
and handlebars was rendering an empty row in an email.

@ngoc figured out that we need to wrap parameters with `seq` in order to have a
a proper `nil` assigned to `:parameters`.
2025-05-16 11:27:14 +00:00
Timofey Kachalov
9fcd2fef34 feat(sdk): Reduce bundle size by avoiding the usage of jsrsasign dependency (#58009) 2025-05-16 14:53:02 +04:00
Nemanja Glumac
fe41e9bb1a Update the copy for the map empty viz state (#58073) 2025-05-16 12:35:15 +02:00
Aleksandr Lesnenko
7a8727b98d fix flaky timelines spec (#58060) 2025-05-16 12:33:44 +02:00
metamben
e17c8f0671 Batch process fields in implicitly-joinable-columns (#58053) 2025-05-16 09:48:11 +00:00
Sébastien
800067c2d2 Closes VIZ-700 switch to using include_metadata (#57829)
* closes VIZ-700 switch to using include_metadata

* e2e

* e2e

* more work on making e2e less flaky?
2025-05-16 09:51:12 +02:00
Ngoc Khuat
7a7e09163b new login email fallback to last_name, email if it exists (#58027) 2025-05-16 04:27:38 +00:00
Ngoc Khuat
d29b63a097 prefix all of our log context with mb- (#58023) 2025-05-16 03:20:23 +00:00
Cam Saul
a81c9c884c [Backend modularization] module score calculation (#58002)
* [Backend modularization] module score calculation

* dox
2025-05-15 19:37:15 -06:00
appleby
e30c325250 Cast booleans literals in :fields clause to bit for sqlserver (#57723)
* Cast boolean expressions in :fields clauses to type bit on sqlserver

* Compile boolean literals :inline on sqlserver

* Add some tests for non-booleans to boolean_to_comparison_test.clj

* Add tests for boolean-expression-clause?

* Mention sql.qp/*inner-query* in boolean-expression-clause? docstring

* Split separate cases into separate tests

* Add cast in sql.qp/as if field options contain ::sql.qp/add-cast

Rather than duplicating logic for :select-top in apply-top-level-clause [:sqlserver :fields], just decorate boolean
:fields clauses with ::sql.qp/add-cast and let the parent method handle it. In this way, the :sqlserver method can
pre-process the MBQL :fields clauses rather than post-processing the raw honeysql.
2025-05-15 17:32:37 -07:00
appleby
782daee511 Fix boolean->comparison conversion for nested queries (#57717)
* Add tests for {sum,count,distinct}-where with literal booleans

* Fix typo in literal expressions tests: filters -> filter

* Fix boolean->comparison for boolean expressions coming from nested queries

* Add sql.u/->honeysql-parent-method util

* Remove ::boolean-is-comparison abstract driver

* Lift ->honeysql call out of boolean-to-comparison

* Pass in boolean-types to boolean->comparison from driver

* Update comments and docstrings

* Require :left-join feature in nested-and-joined-literal-boolean-expressions-in-conditions-test

* Revert whitespace changes

* Implement sql.qp/apply-top-level-clause :filter in terms of parent method

* Fix typo in docstring

* Remove unused sql.helpers import

* Add comment about Oracle 23+ support to boolean_to_comparison.clj

* Rename local has-types? to has-some-types? in boolean-field-clause?
2025-05-15 14:30:39 -07:00
Cam Saul
d7eae1df71 [Backend modularization] parameters module (first pass) (#58043)
* [Backend modularization] `parameters` module (first pass)

* Make sure DB is initialized

* Oops revert the change I made to demo something during BE Guild Sync
2025-05-15 21:15:28 +00:00
metamben
dbb22cd0ed Stop hydrating unused properties (#58003)
* Stop returning field values in the answer-sources response

Fixes BOT-137
2025-05-15 22:34:03 +03:00
github-automation-metabase
afffb18b57 Bump io.netty/netty-common from 4.2.0.Final to 4.2.1.Final (#57824)
* Bump io.netty/netty-common from 4.2.0.Final to 4.2.1.Final

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-15 19:23:29 +00:00
bryan
9e01e38352 in dev, use wrap-reload middleware (#57930) 2025-05-15 11:59:45 -06:00
Timofey Kachalov
ad9d43e0fa Do not transform :has css selectors by Post CSS (#58011) 2025-05-15 19:49:04 +04:00
Nemanja Glumac
44c866ebba Re-enable the old flaky reproduction (#58036) 2025-05-15 17:25:46 +02:00
Aleksandr Lesnenko
af2fafe17f include visible timeline events from different collections in ai analysis (#57990) 2025-05-15 10:59:08 -04:00
Cam Saul
5373dfac4d [Backend modularization] queries module (#57936)
* [Backend modularization] `queries` module

* `metabase.api.query-metadata` => `metabase.queries.metadata`

* Update config & cljfmt

* Make queries API namespace

* cljfmt

* Fix Kondo warnings

* First pass at fixing circular references.

* Second pass for fixing circular refs.

* Third pass at fixing circular references

* Circular refs pass 3

* Circular refs pass 4

* Circular refs pass 5

* Circular refs pass 6

* Fix

* Appease Kondo

* Test fix 🔧

* Appease Kondo

* Test fix 🔧

* Test fix 🔧

* Test fixes 🔧

* Fix reflection warning

* `schema` => `warehouse-schema`

* More test fixes 🔧

* cljfmt

* Fix

* Test fix 🔧

* Test fix 🔧

* Test debugging

* Test fixes

* Test fix 🔧
2025-05-15 13:30:30 +00:00
metamben
7937ecf662 Stop returning field values in the answer-sources response (#57966)
Fixes BOT-137
2025-05-15 16:19:14 +03:00
Nicolò Pretto
7437449749 change retrieve key too (#57985) 2025-05-15 15:03:59 +02:00
Nemanja Glumac
0581f1c141 Add a single branding link to Slack notification (#57501) 2025-05-15 14:28:16 +02:00
Timofey Kachalov
79afb5dec2 Fix fonts.styled.ts braces (#58025) 2025-05-15 15:50:31 +04:00
Phoomparin Mano
6c890a3a28 ci(sdk): fix flaky tests on entity id target collection (#58014) 2025-05-15 18:10:02 +07:00
Phoomparin Mano
c890601b2e ci(sdk): fix flaky tests on interactive question theming (#58010) 2025-05-15 17:27:59 +07:00
Timofey Kachalov
1ae53cb922 Fix wrong names of CSS module files (#58012) 2025-05-15 13:50:03 +04:00
Timofey Kachalov
d7912c544b Fix ModalHeader back button position (#58008) 2025-05-15 13:49:24 +04:00
Alexander Polyankin
2842276e6d Remove duplicated code from api/dashboard.clj for parameter matching in chain filters (#57922)
* Fix params used in dashboard endpoints

* Fix params used in dashboard endpoints

* Fix params used in dashboard endpoints

* Fix lint
2025-05-14 21:49:01 -04:00
github-automation-metabase
fa63153010 Bump io.github.camsaul/toucan2 from 1.0.561 to 1.0.564 (#57816)
Inspect dependency changes here: https://github.com/camsaul/toucan2/compare/1.0.561...head

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 23:35:15 +00:00
Edward Paget
54974e31dc feat: generic data permissions visibility queries (#57712)
* feat: generic data permissions visibility queries

Creates a new namespace with a generically applicable set of sql queries
for getting only models controlled by data permissions that a given user
has access to.

It also creates a new model.interface defmulti `visible-filter-clause`
that allows us to generate a filter clause for a given model to filter a
query on a supplied expression to only those models allowed for the
supplied user. There is a default implementation that is always true.

the `visible-filter-clause` method is only implemented for the Table
model so far since that is used in a search.

This also fixes a bug in the previous implementation of the sql
filtering for Table models that did not correctly handle the logic in
`data-perms/coalesce` for `:perms/view-data` where `:blocked` is ranked
ahead of `:legacy-no-self-service` for the purposes of selecting the
applicable user permission but is ranked below when testing permission levels.

Co-Authored-By: John Swanson <john.swanson@metabase.com>

* fixup! default for visible-fliter-clause to false

* fixup! add cast back for search permissions

* fixup! correct db type test

* fixup! more verbose table names in perms test

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-05-14 21:06:12 +00:00
Gustavo Saiani
ed8d735bbd Docs: update links so that they land on final URLs instead of internal redirects (#57461) 2025-05-14 20:16:35 +00:00
Gustavo Saiani
c5b8e1c3fe Pass param to plans-blockquote (#57991) 2025-05-14 17:02:36 -03:00
Alexander Polyankin
1d61926cf5 Fix FE navigation when the query is running (#57977)
* Fix FE navigation when the query is running

* Fix FE navigation when the query is running

* Add test

* Add test
2025-05-14 15:55:39 -04:00
github-automation-metabase
4e6bbcdd5e Bump com.google.cloud/google-cloud-bigquery from 2.49.0 to 2.50.0 (#57822)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.50.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 19:51:18 +00:00
github-automation-metabase
7f30bb16dd Bump com.clojure-goes-fast/clj-async-profiler from 1.6.1 to 1.6.2 (#57812)
Inspect dependency changes here: https://github.com/clojure-goes-fast/clj-async-profiler/blob/1.6.2/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 19:50:04 +00:00
github-automation-metabase
132336c0be Bump methodical/methodical from 1.0.125 to 1.0.126 (#57818)
Inspect dependency changes here: https://github.com/camsaul/methodical/compare/1.0.125...head

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 19:47:47 +00:00
github-automation-metabase
0eac0bb2bd Bump thheller/shadow-cljs from 3.0.4 to 3.0.5 (#57821)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 19:47:00 +00:00
github-automation-metabase
f00b28668a Bump diehard/diehard from 0.11.12 to 0.11.13 (#57814)
Inspect dependency changes here: https://github.com/sunng87/diehard/blob/0.11.13/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 12:07:51 -07:00
github-automation-metabase
a0184a91d6 Bump org.apache.xmlgraphics/batik-all from 1.18 to 1.19 (#57820)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 12:01:58 -07:00
github-automation-metabase
32f5b9105b Bump net.thisptr/jackson-jq from 1.2.0 to 1.3.0 (#57819)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-14 12:01:47 -07:00
Gustavo Saiani
5c0f8d8ede Update link (#57963) 2025-05-14 15:54:17 -03:00
Alexander Polyankin
6e6449b724 Fix FE permission checks for Edit query definition (#57973) 2025-05-14 18:48:30 +00:00
Timofey Kachalov
424be8573c fix(sdk): Move @cypress/react as dev dependency for SDK (#57962) 2025-05-14 22:05:54 +04:00
Aleksandr Lesnenko
cb1b6f7856 track first non-table chart generated (#56858)
* track first non-table chart generated

* specs

* fix types

* review

* fix serialization

* eliminate chart rerender when instance settings change

* fix prop name

* rename chart-generated setting

* update e2e spec
2025-05-14 18:04:03 +00:00
Aleksandr Lesnenko
04246335c6 filter timeline events for ai entity analysis by collection id (#57926) 2025-05-14 13:40:23 -04:00
Nicolò Pretto
0f49dafa5d make the uberjar artifact from the cross-version tests not collide with (#57971)
the one from component tests
2025-05-14 17:20:36 +00:00
Alexander Polyankin
92c221ceb2 Add boolean parameters to dashboards and SQL field filters (#57435)
* Boolean params PoC

* Fix types

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* PoC

* Fixes

* Fixes

* Fixes

* Fixes

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix formatting settings

* Fix routes

* Fix routes

* Fix routes

* Fix

* Fix routes

* Fix routes

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Add e2e

* Fix
2025-05-14 18:08:23 +01:00
Ngoc Khuat
bc92e04aea fix the enterprise feature that let admin archive all notifications of a user and unsubscribe them from notifiations (#57881) 2025-05-14 19:43:54 +03:00
Cam Saul
f2004162a1 [Backend modularization] plugins cleanup (#57792)
* [Backend modularization] `plugins` cleanup (DEV-457)

* Test fix 🔧

* Fix unused namespace
2025-05-14 09:02:35 -07:00
Nicolò Pretto
3ef1bf8739 remove double concurrency group causing deadlock (#57960) 2025-05-14 17:00:30 +02:00
Nicolò Pretto
9308cc12ba add yet another linter, no literal strings so we don't forget to translate everything (#57785) 2025-05-14 16:26:05 +02:00
Jeff Bruemmer
9c2464e3e3 Update case.md (#57958) 2025-05-14 13:29:58 +00:00
Nicolò Pretto
52d243cbcf fix(ci-sdk): make cross versions tests run again (#57856)
* debug logs

* testing please ignore

* cleanup and add comment
2025-05-14 13:23:10 +02:00
Mahatthana (Kelvin) Nomsawadi
487893a6c6 Add more tests to cover missing cases (#57744)
* Add the first integration test!!!

* Finish integration tests

* Add missing E2E cases

* Remove WIP comment

* Ensure join data only show selected database

* Clarify cryptic Cypress step

* Make test types clearer

* Stop abusing `await` in unit tests

* Consolidate tests

Co-Authored-by: Poom poom@poom.dev
2025-05-14 11:01:51 +01:00
Ngoc Khuat
e3d85f8506 Giving system event notifications its own queue (#57769) 2025-05-14 06:52:52 +00:00
Alexander Polyankin
222e1beb38 Handle nulls with MBQL lib (#57942) 2025-05-14 02:10:13 +00:00
appleby
3f59c806d8 Handle emptyable expressions in desugar-is-empty-and-not-empty (#57870)
Closes #41265.

The schema for is-empty and not-empty was updated in #56855 to allow StringExpressionArg as well as Field. This
updates desugar-is-empty-and-not-empty to also understand non-field args.
2025-05-13 17:59:15 -07:00
Konstantin Darutkin
23161f4b9b fix(datagrid): improve row selection control (#57889) 2025-05-13 20:20:22 -04:00
metamben
b91c475c4c Fix past1hours and past1seconds filters (#57907)
* Fix past1hours and past1seconds filters

Without this change, both of these types generate 1 minute intervals.
2025-05-14 00:57:25 +03:00
Cam Saul
506b418891 [Backend modularization] secrets module (#57802)
* [Backend modularization] `secrets` module

* Merge master
2025-05-13 14:05:56 -07:00
Nathan Voxland
9c73ab5fe4 Improved liquibase rollback-major-version! logic to not use a simple count (#57754) 2025-05-13 15:26:38 -05:00
Case Nelson
3e4d36e7ab fix: snowflake test and migrate happening repeatedly (#57540)
* fix: snowflake test and migrate happening repeatedly

* Improve comments in test

* Fix kondo
2025-05-13 13:30:15 -06:00
Edward Paget
2919662edb fix: move quartz metric listeners to analytics (#57757)
* fix: move quartz metric listeners to analytics

To make sure the task module does not need to depend on the analytics module

* fixup! remove analytics from task uses

* fixup! export listener adder methods

* fixup! missing docstring

* fixup! put the comment back in the right spot
2025-05-13 19:03:12 +00:00
Phoomparin Mano
fb06c2b571 fix(sdk): table cell color is always white on the sdk (#57770) 2025-05-14 02:01:24 +07:00
Phoomparin Mano
d52a4e35da feat(sdk): theme-dependent default question toolbar colors (#57747) 2025-05-14 00:54:24 +07:00
Luis Paolini
693181cc44 Update upgrading-metabase.md (#57751)
* Update upgrading-metabase.md

Add changes that were needed for a long time :)

* suggested edits (#57913)

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-05-13 17:48:34 +00:00
Cam Saul
0f62c5c292 [Backend modularization] Finish moving "public settings" into appropriate modules (#57860)
* [Backend modularization] `channel` Settings cleanup (DEV-435)

* Remove `metabase.settings.deprecated-grab-bag`

* Fix circular references

* Fix circular refs

* Lint fix

* Test fix 🔧
2025-05-13 17:35:42 +00:00
Cam Saul
81da34e617 Fix API routes checks for dataset (#57871) 2025-05-13 10:21:09 -06:00
John Swanson
caffffd802 Fix snowplow helpers to be less flaky (#57750)
Remove `expectGoodSnowplowEvents` entirely - it was an antipattern.

Replace it with a good set of snowplow helper functions that actually
accomplish what we want:

- `expectSnowplowEvent`, which matches on the *entire* event rather than
assuming the event is an unstructured event (most of ours are, but some
are not).

- `expectUnstructuredSnowplowEvent`, which behaves the same as
  `expectGoodSnowplowEvent` used to, except I removed an unused behavior
  where it took a function instead of a partial-match object.

- `assertNoUnstructuredSnowplowEvent`, which asserts the inverse of
  `expectGoodSnowplowEvent` - there are zero matching snowplow events.

I removed `Good` from all these names as I think that's implied - if you
want to make an assertion that a bad event is being received you can
write your own helper :)
2025-05-13 08:49:00 -07:00
bryan
5b7c4d6f26 fix watcher alias (#57790) 2025-05-13 15:46:42 +00:00
Sébastien
9c0c457fc8 Closes VIZ-400 fix stickiness for initial rendering as well (#57886) 2025-05-13 17:01:22 +02:00
Riley Thompson
93b2148bb5 Replace Mongo 4.4/5.0 with 6.0 (#57795) 2025-05-13 09:58:18 -04:00
Romeo Van Snick
ccc1a876be Reduce parameter data sent in public csv download url (#57195)
* Only send id and value when downloading csv

* Add repro for metabase#51813

* Merge in template tag parameters to parameters when running cards

* Fix erroneous test

* Do not pass all parameter data for cards

* Remove commented out code

* Only pass sparse parameters on public dashboards or cards

* Remove unused import

* Fix lint

---------

Co-authored-by: Tamás Benkő <tamas@metabase.com>
2025-05-13 15:35:41 +02:00
Andrew McLoughlin
eacc2176ed Fix typo.md (#57702) 2025-05-13 09:31:39 -04:00
Ngoc Khuat
471ff47c6f break lines for each modules in the config so it generates fewer conflicts (#57874) 2025-05-13 11:15:10 +00:00
Phoomparin Mano
32b3f46331 feat(sdk): warn when using dev instance and change banner design (#57746) 2025-05-13 17:55:56 +07:00
Ngoc Khuat
eddc872446 fix formating value for contains parameter (#57876) 2025-05-13 09:31:08 +00:00
Sébastien
b3d4d2fc8e closes viz-943 wrong icon size but SOMETIME (#57833) 2025-05-13 10:44:33 +02:00
Cam Saul
272a353462 [Backend modularization] collections module (#57722)
* [Backend modularization] `collections` module (DEV-444)

* Fix wrong namespace

* Fix new metabot v3 code

* Some test fixes. 🔧

* Move test for EE-specific behavior to EE

* Make `/api/collection` tests work correctly from the REPL

* Try to debug failing test

* Fix sanity checc

* Fix Kondo warnings

* Test fix 🔧

* Attempt to debug test failures

* More test failure debugging

* Cleanup

* More test failure debugging

* More test debugging

* Fix private var

* Test fix? 🔧
2025-05-12 20:27:01 -07:00
Alexander Polyankin
ec316302da Send param_fields per parameter to avoid field ref matching (#57554) 2025-05-12 19:47:13 -04:00
Case Nelson
3d810c0f87 fix: remove fast snowflake sync (#57858)
* fix: remove fast snowflake sync

* Fix kondo
2025-05-12 16:06:24 -06:00
Cam Saul
dc8381925b [Backend modularization] OSS content-verification module (#57804)
* [Backend modularization] content-verification module (DEV-431)

* Fix namespace
2025-05-12 15:05:29 -07:00
github-automation-metabase
caa4add50e Bump com.oracle.database.jdbc/ojdbc17 from 23.7.0.25.01 to 23.8.0.25.04 (#57826)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <riley@metabase.com>
2025-05-12 21:39:13 +00:00
Cam Saul
754d708240 [Backend modularization] Move EID translation API endpoint into module (#57629)
* [Backend modularization] Move EID translation API endpoint into module (DEV-433)

* Prettier
2025-05-12 17:39:34 +00:00
Nicolò Pretto
f454edadb8 wrap strings in t in EditSandboxingModal (#57787) 2025-05-12 18:54:37 +02:00
lbrdnk
b1c25efba4 Track log level adjustments (#57756)
* Snowplow events for log adjustments

* Apply suggestions from code review

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

* Track empty log_levels as log_adjustments_reset

* Use log-levels instead

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-05-12 18:33:28 +02:00
Aleksandr Lesnenko
0c2d3afa18 do not show visualize another way on text cards (#57806) 2025-05-12 11:59:12 -04:00
Aleksandr Lesnenko
e47f333669 fix text align setting on text dashcards (#57807) 2025-05-12 11:58:56 -04:00
github-automation-metabase
5cb20c2f50 Bump org.mongodb/mongodb-driver-sync from 5.4.0 to 5.5.0 (#57825)
Inspect dependency changes here: https://github.com/mongodb/mongo-java-driver/compare/r5.4.0...r5.5.0

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-12 11:10:49 -04:00
Nicolò Pretto
0f7f07f684 restore missing code after bad conflict resolution of metabot branch (#57846) 2025-05-12 14:50:59 +00:00
Jeff Bruemmer
dc3975479f docs - notification thread pool size. (#57748)
* note about long-running queries clogging queue

* fix spacing, update env vars

* note on troubleshooting notifications

* Update docs/troubleshooting-guide/index.md

* Update docs/configuring-metabase/environment-variables.md

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>

* Update docs/configuring-metabase/environment-variables.md

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

* edits

* Update notifications.md

Adding some little detail about when changes happen

---------

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
2025-05-12 09:28:32 -04:00
Kyle Doherty
2a76f70a69 standardize on ToolbarButton for main view header actions (#57791)
* standardize on ToolbarButton for main view header actions

* fix unit test

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2025-05-12 08:44:58 -04:00
Nicola Mometto
1d2a6aa95b Add bronsa to team json files (#57834) 2025-05-12 13:13:43 +01:00
Sébastien
ebcced6bd4 Closes VIZ-656 better mapping when switching to/from non-cartesians (#57830) 2025-05-12 12:52:54 +02:00
Tyler Plude
b424828108 [VISUALIZER] Fix funnel type static viz support (#57560)
* adding get-visualization-columns in clojure land

* remove inline defs

* add util unit tests

* update comment

* linter fixes

* Fix render visualizer utils to work with entity ids, add test

* Fix body test
2025-05-09 18:01:27 -07:00
Cam Saul
818bacef5f [Backend modularization] product-feedback module (#57720)
* [Backend modularization] `product-feedback` module (DEV-438)

* Update modules config
2025-05-09 22:33:51 +00:00
Alexander Polyankin
07399694ef Use dedicated endpoints for remapping in dashboards & questions (#57571)
* Remove unused endpoints

* Resolve implicit FK Field -> PK Field -> [Name] Field remapping

This affects the field and dashboard APIs.

* New endpoints

* Remove unused code

* Always return value, possibly without label

* Stop requiring FK entry in FK -> PK -> Name resolution

* Relax FK requirement in remapped value resolution

* Remove remaining /field/ endpoints

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-05-09 22:20:52 +00:00
Tyler Plude
bd5d9811ee [BUG FIX] Correctly merge column settings in exports (#57473)
* use existing col settings helper

* forward declaration of viz-settings-for-col to prevent compilation issues

* fixing typo in parens

* fix unit tests

* Fix clj kondo warnings
2025-05-09 15:00:51 -07:00
github-automation-metabase
65a5384994 Bump io.netty/netty-buffer from 4.1.119.Final to 4.2.0.Final (#56361)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-09 21:45:59 +00:00
github-automation-metabase
ec15bbf4b4 Bump org.mongodb/mongodb-driver-sync from 5.3.1 to 5.4.0 (#55608)
* Bump org.mongodb/mongodb-driver-sync from 5.3.1 to 5.4.0

Inspect dependency changes here: https://github.com/mongodb/mongo-java-driver/compare/r5.3.1...r5.4.0

* Update deps.edn

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-09 21:22:32 +00:00
Cam Saul
3e65e9f158 [Backend modularization] OSS audit-app module (#57623)
* [Backend modularization] OSS audit-app module

* Cleanup

* Update config

* Fixx

* Test fix 🔧

* Appease the module linter

* Test fix 🔧
2025-05-09 20:53:38 +00:00
Jeff Bruemmer
38a58700f6 links (#57796) 2025-05-09 20:42:46 +00:00
github-automation-metabase
d405ed82e3 Bump org.graalvm.polyglot/polyglot from 24.2.0 to 24.2.1 (#56956)
* Bump org.graalvm.polyglot/polyglot from 24.2.0 to 24.2.1

Inspect dependency changes here: https://github.com/oracle/graal/compare/graal-24.2.0...graal-24.2.1

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-09 20:15:02 +00:00
Cam Saul
a4313c3960 [Backend modularization] Mega Renaming PR 2 (#57565)
* Move `show-database-syncing-modal` into `sync` module (DEV-436)

* `metabase-enterprise.core` => `metabase-enterprise.core.dummy-namespace` (DEV-473)

* `task` module cleanup (DEV-458)

* Fix 🔧

* Test fix 🔧

* Fixes 🔧
2025-05-09 19:44:37 +00:00
Cam Saul
58648d1de4 [Backend modularization] premium-features cleanup (#57562)
* [Backend modularization] `premium-features` cleanup (DEV-464)

* Fix 🔧

* Fix stuff

* Fix Kondo failures not causing CI failures

* Docstring cleanup

* More fixes 🔧

* Fix 🔧

* Fix token status checc

* Test fix 🔧

* Appease TypeScript

* Appease TypeScript again
2025-05-09 13:37:16 -06:00
Ryan Laurie
5cca6cd94d Update Authentication Settings (#57405)
* rework auth settings

fix for auth cards

fixes

make checking SSO nicer

SCIM tests

make stuff nicer

much tests

rebase fix

update auth settings

update more tests

whoopsie

little fixes

* update more tests

* test fixes

* remove auth tabs

* gee wiz thanks sloan

* conflict fix
2025-05-09 13:29:55 -06:00
Cam Saul
bc50403dcb [Backend modularization] bug-reporting module (#57670)
* [Backend modularization] `bug-reporting` module (DEV-442)

* Update modules config
2025-05-09 19:03:07 +00:00
Cam Saul
94a9847fbf [Backend modularization] version module (#57630)
* [Backend modularization] `version` module (DEV-443)

* Fix stuff
2025-05-09 18:24:24 +00:00
Konstantin Darutkin
f454566dae feat(frontend): add selectable rows for DataGrid (#57771)
* feat(frontend): add selectable rows for DataGrid

* feat: add row selected attribute
2025-05-09 19:23:28 +01:00
Cam Saul
b6c2815bf3 [Backend modularization] geojson module (#57463) 2025-05-09 17:44:06 +00:00
Aleksandr Lesnenko
5a00c58b32 visualizer feature branch (#48527)
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-05-09 12:54:16 -04:00
Ryan Laurie
9825858b19 Add DWH Paused Modal for Uploads (#57285)
* add paused modal

* trigger paused modal

* add unit tests
2025-05-09 10:47:23 -06:00
Jeff Bruemmer
0d756faa0c update learn links (#57782) 2025-05-09 16:13:55 +00:00
Nicolò Pretto
34e647af26 fix: wrap un-translated strings in t`` (#57693)
* fix: wrap un-translated strings in t``

* fix more untranslated strings

* translate some aria-labels

* use interpolation instead of having to provide context

* address feedback and add context

* more t calls added

* revert changes to slider component as it's not used and may get removed

* remove file that i re-created when rebasing

* more context

* more context

* Update frontend/src/metabase/query_builder/components/MoveQuestionModal/MoveQuestionModal.tsx

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>

* Update frontend/src/metabase/query_builder/components/expressions/Editor/Listbox/Listbox.tsx

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>

* address feedback

* add context to what is SSL short for

* remove whitespace that could possibly create issues

* add missing import for c

---------

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2025-05-09 17:51:19 +02:00
Eric Normand
8edafd083c Datetime to date coercion (#57523)
* Empty

* kick ci

* Allow temporal type in addition to string for `date()`

* Add date(datetime) test

* Use cast for date for postgres

* Extend date() on mysql

* Extend date() on bigquery

* Extend date() at snowflake

* Extend date() to datetime on clickhouse

* Generalize `date()` to :sql

* Update changelog with `date(datetime)`

* Empty

* DateTime->Date Coercion + test

* Slight cleanup

* Whitespace

* Cleaner implementation and test

* Test timestamp as well as timestamptz

* Correct implementation to get subtypes of DateTime

* Update helper text string for date

* Add e2e tests for date

* Also check to correct coercion of dates

* Add customization points to enable clickhouse implementation.

* Remove changelog-test/ignore true from ->date

* Fix defn ordering

* Fix expected type for datetime coercions

* Fix tests for sqlite

* Implement coercion for Mongo

* Implement specialization for oracle

* Better check

* kick ci

* kick ci

* Format code

* Format code

* Correct changelog text

* Ors on one line

* Or on same line

* Remove zh from the list of supported translations (#57672)

We don't support the `zh` (Traditional Chinese) locale anymore – only `zh-CN` (Simplified Chinese), and `zh-HK` (Hong Kong), and `zh-TW` (Taiwan). Here's a [Slack discussion](https://metaboat.slack.com/archives/C6UBFU9GW/p1741983889165599).

So let's remove `zh` from the list of supported translations.

For some reason the list wasn't sorted alphabetically by language name - this PR fixes that too.

* [Backend modularization] Mega Renaming PR 1 (#57561)

* auth-provider => auth-provider.core

* enterprise/auth-provider

* `metabase.events.core`

* Move `sql-parsing-enabled` Setting into `query-analysis` (DEV-449)

* `metabase.events.core` (DEV-455)

* `metabase-enterprise.stats` => `metabase-enterprise.analytics.stats` (DEV-475)

* `enterprise/stale` cleanup (DEV-474)

* `enterprise/airgap` => `enterprise/premium-features`

* Appease Kondo

* Remove unused

* Mark setup tests flaky (#57710)

* mark setup tests flaky

* add flake

---------

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

* Fix parameter types! (#57677)

* [Notification] reduce module apis (#57678)

* fix audit log to record external emails when sending notifications (#57679)

* Remove "Model" and "Action" from the "New" button menu (#57647)

* feat: add a link to field filter docs from dashboard sidebar with native question (#57687)

* feat: add a link to field filter docs from dashboard sidebar with native question

* oops

* add missing translation

* Metabot v3 PoC (#52436)

Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Mihael Konjević <konjevic@gmail.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: github-automation-metabase <166700802+github-automation-metabase@users.noreply.github.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>

* Patch the metabot-v3 merge (#57731)

* Remove unused props from the "New" menu

* Remove Metabot code related to the "New" menu

* Fix flaky e2e test in the onboarding `setup` spec (#57735)

* remove unused slider component (#57745)

* [Admin] Modernize components for People + Groups pages (#57365)

* update components in frontend/src/metabase/admin/people/components to use Mantine components and remove deprecated component usage

* update people and group pages/modals to use more modern components

* use relative sizes

* fix user success modal not closing on "Done" confirm button click

* remove CS from PeopleListRow

* clean up admin/people/colors.ts

* lint fix

* people list footer fix

* pr feedback

* [Admin] Convert people / group pages to RTKQuery (#57490)

* update components in frontend/src/metabase/admin/people/components to use Mantine components and remove deprecated component usage

* update people and group pages/modals to use more modern components

* use relative sizes

* fix user success modal not closing on "Done" confirm button click

* remove CS from PeopleListRow

* clean up admin/people/colors.ts

* lint fix

* people list footer fix

* pr feedback

* wip

* fix issues, people page updates, some clean up

* add unsaved files

* type fix, fetch user list from rktquery for PeopleList

* remove entity usage from unsubscribe modal, lint fix

* remove all remaining usages of user entity

* remove user entity

* test fixes, remove unused user schema

* bit of clean up

* qa pass - invalidate groups cache if user is deactivated/reactivated

* address pr feedback

* Bump org.apache.poi/poi-ooxml-full from 5.4.0 to 5.4.1 (#56357)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Add analytics for new entity creation being initiated (#57673)

This commit adds analytics to the:

1. New button being clicked
    - In the top app bar
    - From the empty collection
2. New menu individual items being clicked:
    - Dashboard
    - ~Question~ (not possible at the moment)
    - ~Native query~ (not possible at the moment)
3. An entity creation being initiated
    - Model from the /browse/models page
    - Metric from the /browse/metrics page
    - Collection from the collection header
    - Collection from the main nav sidebar

* Bump io.github.eerohele/pp from 9598f4c72b528480a85ea41651c45b08d1717428 to 4998a1fdd9d3713d7034d04509e9212204773bf2 (#57577)

Inspect dependency changes here: 9598f4c72b...4998a1fdd9

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Bump commons-io/commons-io from 2.18.0 to 2.19.0 (#56654)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Shutdown index sync while its results are unused (#56885)

* Shutdown index sync while its results are unused

* Update tests

* Update mongo tests

* Bump com.google.guava/guava from 33.4.6-jre to 33.4.8-jre (#56952)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Bump com.amazonaws/aws-java-sdk-core from 1.12.782 to 1.12.783 (#57586)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Bump io.github.tonsky/clj-reload from 0.9.4 to 0.9.5 (#57578)

Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.5/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump babashka/fs from 0.5.24 to 0.5.25 (#57575)

Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.25/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump org.apache.calcite.avatica/avatica from 1.25.0 to 1.26.0 (#54171)

Inspect dependency changes here: https://github.com/apache/calcite-avatica/compare/avatica-1.25.0-rc0...avatica-1.26.0-rc0

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* fix: do not render gauge if grouping col is date (#56715)

* fix: toolbar button color not changing on hover (#56694)

* Bump refactor-nrepl/refactor-nrepl from 3.10.0 to 3.11.0 (#57584)

Inspect dependency changes here: https://github.com/clojure-emacs/refactor-nrepl/blob/v3.11.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump org.jsoup/jsoup from 1.19.1 to 1.20.1 (#57583)

Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.20.1/CHANGES.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* [Backend modularization] `view-log` module (DEV-427) (#57628)

* [Backend modularization] Move anonymous-stats-related stuff into `analytics` module (DEV-437) (#57631)

* Bump org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server from 12.0.19 to 12.0.20 (#57579)

* Bump org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server from 12.0.19 to 12.0.20

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump com.taoensso/nippy from 3.4.2 to 3.5.0 (#56953)

Inspect dependency changes here: https://github.com/taoensso/nippy/blob/v3.5.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>

* Bump com.ibm.icu/icu4j from 76.1 to 77.1 (#55241)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump thheller/shadow-cljs from 2.28.21 to 2.28.23 (#56657)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* `date(datetime)` integration branch (#57448)

* Empty

* kick ci

* Allow temporal type in addition to string for `date()`

* Add date(datetime) test

* Use cast for date for postgres

* Extend date() on mysql

* Extend date() on bigquery

* Extend date() at snowflake

* Extend date() to datetime on clickhouse

* Generalize `date()` to :sql

* Update changelog with `date(datetime)`

* Update helper text string for date

* Add e2e tests for date

* Also check to correct coercion of dates

* Better check

* kick ci

* Format code

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>

* Bump org.apache.poi/poi from 5.4.0 to 5.4.1 (#56355)

* Bump org.apache.poi/poi from 5.4.0 to 5.4.1

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump cider/cider-nrepl from 0.55.4 to 0.55.7 (#57576)

Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.55.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump org.postgresql/postgresql from 42.7.4 to 42.7.5 (#57314)

Inspect dependency changes here: https://github.com/pgjdbc/pgjdbc/blob/REL42.7.5/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump clj-kondo/clj-kondo from 2025.02.20 to 2025.04.07 (#56650)

* Bump clj-kondo/clj-kondo from 2025.02.20 to 2025.04.07

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.04.07/CHANGELOG.md

* Add kondo ignore to tests for new :missing-protocol-method linter

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Bump thheller/shadow-cljs from 2.28.21 to 3.0.4 (#57585)

Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>

* Remove unused code in embedding data picker (#57700)

* Remove unused exported components

* Remove references to metrics

* Remove references to saved questions

* Remove irrelevant tests

* Remove unnecessary prop

* Fix more unit tests

* Remove more unnecessary code

* Fix failed unit tests

* Remove unnecessary prop

* speed up notification tests (#57763)

* Update logger presets (#57667)

* Update presets

* Update presets

* Update test

* Apply suggestions from code review

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

---------

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

* better snowplow errors when expecting the wrong number of good events (#57730)

* add ?. to make it more resilient

* add more logssss

* cy.log

* some nicer error message

* fix eventType

* removes leftover lines

* typos on comments

* Update e2e/support/helpers/e2e-snowplow-helpers.js

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

---------

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

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Mihael Konjević <konjevic@gmail.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: github-automation-metabase <166700802+github-automation-metabase@users.noreply.github.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
Co-authored-by: Adithya Vardhan <imadithyavardhan@gmail.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
2025-05-09 14:38:45 +00:00
Nicolò Pretto
557e7d0f34 better snowplow errors when expecting the wrong number of good events (#57730)
* add ?. to make it more resilient

* add more logssss

* cy.log

* some nicer error message

* fix eventType

* removes leftover lines

* typos on comments

* Update e2e/support/helpers/e2e-snowplow-helpers.js

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

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-05-09 11:13:44 +00:00
lbrdnk
8b2a8b4d42 Update logger presets (#57667)
* Update presets

* Update presets

* Update test

* Apply suggestions from code review

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

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-05-09 11:16:32 +02:00
Ngoc Khuat
0e53e2bd21 speed up notification tests (#57763) 2025-05-09 07:44:33 +00:00
Mahatthana (Kelvin) Nomsawadi
8fa039f6dc Remove unused code in embedding data picker (#57700)
* Remove unused exported components

* Remove references to metrics

* Remove references to saved questions

* Remove irrelevant tests

* Remove unnecessary prop

* Fix more unit tests

* Remove more unnecessary code

* Fix failed unit tests

* Remove unnecessary prop
2025-05-09 06:51:43 +01:00
github-automation-metabase
1c5bc70adb Bump thheller/shadow-cljs from 2.28.21 to 3.0.4 (#57585)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-09 00:07:31 +00:00
github-automation-metabase
07235bbde0 Bump clj-kondo/clj-kondo from 2025.02.20 to 2025.04.07 (#56650)
* Bump clj-kondo/clj-kondo from 2025.02.20 to 2025.04.07

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.04.07/CHANGELOG.md

* Add kondo ignore to tests for new :missing-protocol-method linter

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 23:27:10 +00:00
github-automation-metabase
7c0ca3369b Bump org.postgresql/postgresql from 42.7.4 to 42.7.5 (#57314)
Inspect dependency changes here: https://github.com/pgjdbc/pgjdbc/blob/REL42.7.5/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 23:18:34 +00:00
github-automation-metabase
be86f32a0f Bump cider/cider-nrepl from 0.55.4 to 0.55.7 (#57576)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.55.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 22:09:49 +00:00
github-automation-metabase
d9147bd92c Bump org.apache.poi/poi from 5.4.0 to 5.4.1 (#56355)
* Bump org.apache.poi/poi from 5.4.0 to 5.4.1

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 21:58:39 +00:00
Eric Normand
d55b0e247a date(datetime) integration branch (#57448)
* Empty

* kick ci

* Allow temporal type in addition to string for `date()`

* Add date(datetime) test

* Use cast for date for postgres

* Extend date() on mysql

* Extend date() on bigquery

* Extend date() at snowflake

* Extend date() to datetime on clickhouse

* Generalize `date()` to :sql

* Update changelog with `date(datetime)`

* Update helper text string for date

* Add e2e tests for date

* Also check to correct coercion of dates

* Better check

* kick ci

* Format code

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-05-08 21:52:34 +00:00
github-automation-metabase
61b7eeda25 Bump thheller/shadow-cljs from 2.28.21 to 2.28.23 (#56657)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 20:53:47 +00:00
github-automation-metabase
3a8479078c Bump com.ibm.icu/icu4j from 76.1 to 77.1 (#55241)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 20:53:31 +00:00
github-automation-metabase
a743c27bcd Bump com.taoensso/nippy from 3.4.2 to 3.5.0 (#56953)
Inspect dependency changes here: https://github.com/taoensso/nippy/blob/v3.5.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 20:47:00 +00:00
github-automation-metabase
139d1605fa Bump org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server from 12.0.19 to 12.0.20 (#57579)
* Bump org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server from 12.0.19 to 12.0.20

Inspect dependency changes here:

* Update deps.edn

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 20:45:10 +00:00
Cam Saul
a6f9bb8167 [Backend modularization] Move anonymous-stats-related stuff into analytics module (DEV-437) (#57631) 2025-05-08 13:22:09 -07:00
Cam Saul
b405045f94 [Backend modularization] view-log module (DEV-427) (#57628) 2025-05-08 13:21:54 -07:00
github-automation-metabase
a669530a55 Bump org.jsoup/jsoup from 1.19.1 to 1.20.1 (#57583)
Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.20.1/CHANGES.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 13:19:06 -07:00
github-automation-metabase
a6ef327bdd Bump refactor-nrepl/refactor-nrepl from 3.10.0 to 3.11.0 (#57584)
Inspect dependency changes here: https://github.com/clojure-emacs/refactor-nrepl/blob/v3.11.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 13:17:42 -07:00
Adithya Vardhan
dafbd09482 fix: toolbar button color not changing on hover (#56694) 2025-05-08 13:13:35 -07:00
Adithya Vardhan
87ca8ab2d3 fix: do not render gauge if grouping col is date (#56715) 2025-05-08 13:13:27 -07:00
github-automation-metabase
8827164777 Bump org.apache.calcite.avatica/avatica from 1.25.0 to 1.26.0 (#54171)
Inspect dependency changes here: https://github.com/apache/calcite-avatica/compare/avatica-1.25.0-rc0...avatica-1.26.0-rc0

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 19:56:01 +00:00
github-automation-metabase
8285908e3a Bump babashka/fs from 0.5.24 to 0.5.25 (#57575)
Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.25/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 12:27:13 -07:00
github-automation-metabase
58f4e0a9dd Bump io.github.tonsky/clj-reload from 0.9.4 to 0.9.5 (#57578)
Inspect dependency changes here: https://github.com/tonsky/clj-reload/blob/0.9.5/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-05-08 12:26:53 -07:00
github-automation-metabase
431184652f Bump com.amazonaws/aws-java-sdk-core from 1.12.782 to 1.12.783 (#57586)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 12:26:25 -07:00
github-automation-metabase
3cfcb03cf5 Bump com.google.guava/guava from 33.4.6-jre to 33.4.8-jre (#56952)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 12:25:40 -07:00
lbrdnk
76a5231a6f Shutdown index sync while its results are unused (#56885)
* Shutdown index sync while its results are unused

* Update tests

* Update mongo tests
2025-05-08 21:20:00 +02:00
github-automation-metabase
ab296e8d6c Bump commons-io/commons-io from 2.18.0 to 2.19.0 (#56654)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 19:19:07 +00:00
github-automation-metabase
fcb6e8415b Bump io.github.eerohele/pp from 9598f4c72b528480a85ea41651c45b08d1717428 to 4998a1fdd9d3713d7034d04509e9212204773bf2 (#57577)
Inspect dependency changes here: 9598f4c72b...4998a1fdd9

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 11:56:11 -07:00
Nemanja Glumac
38762f1b74 Add analytics for new entity creation being initiated (#57673)
This commit adds analytics to the:

1. New button being clicked
    - In the top app bar
    - From the empty collection
2. New menu individual items being clicked:
    - Dashboard
    - ~Question~ (not possible at the moment)
    - ~Native query~ (not possible at the moment)
3. An entity creation being initiated
    - Model from the /browse/models page
    - Metric from the /browse/metrics page
    - Collection from the collection header
    - Collection from the main nav sidebar
2025-05-08 20:44:35 +02:00
github-automation-metabase
d415393100 Bump org.apache.poi/poi-ooxml-full from 5.4.0 to 5.4.1 (#56357)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-08 11:33:17 -07:00
Sloan Sparger
7db950f952 [Admin] Convert people / group pages to RTKQuery (#57490)
* update components in frontend/src/metabase/admin/people/components to use Mantine components and remove deprecated component usage

* update people and group pages/modals to use more modern components

* use relative sizes

* fix user success modal not closing on "Done" confirm button click

* remove CS from PeopleListRow

* clean up admin/people/colors.ts

* lint fix

* people list footer fix

* pr feedback

* wip

* fix issues, people page updates, some clean up

* add unsaved files

* type fix, fetch user list from rktquery for PeopleList

* remove entity usage from unsubscribe modal, lint fix

* remove all remaining usages of user entity

* remove user entity

* test fixes, remove unused user schema

* bit of clean up

* qa pass - invalidate groups cache if user is deactivated/reactivated

* address pr feedback
2025-05-08 13:00:01 -05:00
Sloan Sparger
c9caad50a4 [Admin] Modernize components for People + Groups pages (#57365)
* update components in frontend/src/metabase/admin/people/components to use Mantine components and remove deprecated component usage

* update people and group pages/modals to use more modern components

* use relative sizes

* fix user success modal not closing on "Done" confirm button click

* remove CS from PeopleListRow

* clean up admin/people/colors.ts

* lint fix

* people list footer fix

* pr feedback
2025-05-08 11:50:57 -05:00
Nicolò Pretto
be81440458 remove unused slider component (#57745) 2025-05-08 18:02:52 +02:00
Nemanja Glumac
fc0a1777ec Fix flaky e2e test in the onboarding setup spec (#57735) 2025-05-08 16:07:56 +02:00
Nemanja Glumac
4c6c580964 Patch the metabot-v3 merge (#57731)
* Remove unused props from the "New" menu

* Remove Metabot code related to the "New" menu
2025-05-08 14:03:24 +00:00
metamben
d3fafe9cf2 Metabot v3 PoC (#52436)
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Mihael Konjević <konjevic@gmail.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: github-automation-metabase <166700802+github-automation-metabase@users.noreply.github.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-05-08 06:57:20 -04:00
Uladzimir Havenchyk
8fc63096b8 feat: add a link to field filter docs from dashboard sidebar with native question (#57687)
* feat: add a link to field filter docs from dashboard sidebar with native question

* oops

* add missing translation
2025-05-08 07:30:39 +00:00
Nemanja Glumac
f53785e010 Remove "Model" and "Action" from the "New" button menu (#57647) 2025-05-08 09:04:20 +02:00
Ngoc Khuat
ee5d61525c fix audit log to record external emails when sending notifications (#57679) 2025-05-08 07:03:41 +00:00
Ngoc Khuat
2f4a3d35c2 [Notification] reduce module apis (#57678) 2025-05-08 05:08:07 +00:00
Alexander Polyankin
c1763bd9d7 Fix parameter types! (#57677) 2025-05-08 01:16:33 +00:00
Ryan Laurie
22e028af3a Mark setup tests flaky (#57710)
* mark setup tests flaky

* add flake

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2025-05-07 17:00:28 -06:00
Cam Saul
e58ecd7290 [Backend modularization] Mega Renaming PR 1 (#57561)
* auth-provider => auth-provider.core

* enterprise/auth-provider

* `metabase.events.core`

* Move `sql-parsing-enabled` Setting into `query-analysis` (DEV-449)

* `metabase.events.core` (DEV-455)

* `metabase-enterprise.stats` => `metabase-enterprise.analytics.stats` (DEV-475)

* `enterprise/stale` cleanup (DEV-474)

* `enterprise/airgap` => `enterprise/premium-features`

* Appease Kondo

* Remove unused
2025-05-07 14:32:36 -07:00
Raphael Krut-Landau
a69c66d0e1 Remove zh from the list of supported translations (#57672)
We don't support the `zh` (Traditional Chinese) locale anymore – only `zh-CN` (Simplified Chinese), and `zh-HK` (Hong Kong), and `zh-TW` (Taiwan). Here's a [Slack discussion](https://metaboat.slack.com/archives/C6UBFU9GW/p1741983889165599).

So let's remove `zh` from the list of supported translations.

For some reason the list wasn't sorted alphabetically by language name - this PR fixes that too.
2025-05-07 16:43:16 -04:00
Cam Saul
29efdb4287 Remove unused :model/FieldUsage (#57556) 2025-05-07 12:33:19 -07:00
Cam Saul
655907c7bb Remove unused :model/TablePrivileges (#57551)
* Remove unused `:model/TablePrivileges`

* Remove another stray reference
2025-05-07 12:31:33 -07:00
Nathan Voxland
8c57a1b48a Support bigint model_pks in model_index_value (#57661) 2025-05-07 14:25:55 -05:00
Noah Moss
770207290a Don't add isCollapsed nodes for paths not in the data (#57704) 2025-05-07 11:13:52 -07:00
Kamil Mielnik
802890a8a3 SEM-229 Hide numerical semantic types on string-based fields (#57606)
* Remove hack

* Update test
2025-05-07 19:33:59 +02:00
lbrdnk
3709509a67 Migrate hacked semantic type fields to use coercion (#57518)
* migrate hacked fields

* Format and join subq work differently

* Add engine filtering to migration

* Update migr

* Comment
2025-05-07 19:33:10 +02:00
Cam Saul
0b91af3d7c Functions with side effects should generally end in ! (#57615) 2025-05-07 09:14:10 -07:00
Ryan Laurie
c0d38f98a7 stabilize flaky font unit test (#57699) 2025-05-07 09:03:46 -06:00
Sloan Sparger
6a34d8b120 [Admin] Remove styled component usages from people and group pages + components (#57303)
* convert UnsubscribeUserModal and UnsubscribeUserForm components

* convert UserActivationModal to TS

* convert UserPasswordResetModal to TS

* convert UserSuccessModal to TS

* convert PeopleList and PeopleListingApp components to TS

* convert PeopleListRow to TS

* convert use-people-query to TS

* fix deprecated usages of google_auth and ldap_auth with sso_source field

* fix lint

* convert GroupsListing, GroupsListingApp, and AddRow components to TS

* convert lib/groups, AdminContentTable, and AddMemberRow to TS

* convert GroupDetailApp and GroupDetail to TS

* fix import

* convert GroupSummary to TS, make adjustments to other converted files to make types happy

* remove people/components/SearchInput and convert usage to mantine component to avoid TS migration

* remove styled component usage from people and groups pages and components

* adjustment to people listing app
2025-05-07 09:39:43 -05:00
Nicolò Pretto
319b45efb0 make LocaleProvider change the return of useLocale and set the locale used by Mantine (#57534)
* refactor: rename test file to tsx to have hopefully better diff in the
next commit

* fix EMB-360: Make Mantine components use the locale from LocaleProvider

* close EMB-373: make useLocale return the locale from LocaleProvider if
present
2025-05-07 12:25:12 +02:00
Romeo Van Snick
ce33f7c3b9 Fix missing snippet create button (#57479)
* Use Mantine dropdown for snippet menu

* Fix search icon in snippet header too

* Remove default ICON_SIZE

* Fix MIN_SNIPPETS_FOR_SEARCH

* Add createSnippet helper

* Add repro for metabase#57441

* Add test for snippet search

* Move snippet helper to api

* Use actual ref for input

* Simplify header search rendering

* Use SidebarHeader for snippet sidebar

* Use Flex for most components

* Simplify padding

* Use class component for archived snippets

* Use class for header button

* Use direct properties

* Rely less on custom css

* Fix header padding

* Fix e2e tests

* Remove unused eslint-disable

* Add type annotation

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-05-07 11:40:42 +02:00
Mahatthana (Kelvin) Nomsawadi
251fb3d05c Copy multi-stage components (#57436)
* Move SimpleDataPicker to a new directory preparing for new components

* Use the embedding data picker from a new folder

This requires turning the component into a plugin, which we'll do in the
next commit.

* Move plugin property to a more appropriate place

* Implement embedding multi-stage data picker as an EE plugin

* Add DataSourceSelectorProps

* Remove reference to query builder data picker

* Fix failing unit tests

* Move embedding data picker components to a proper location
2025-05-07 09:27:04 +01:00
Ryan Laurie
a59d8af558 Update Appearance Settings (#56468)
* Update Appearance Settings

* unit test additions + updates

* update e2e tests

* test updates

* unit test fix

* fix lint errors

* obey the linter

* add test coverage

* add more tests

* support env var override ui

* remove dead code

* nicer routing

* useDisclosure

* stabilize test
2025-05-06 17:22:54 -06:00
Edward Paget
e8ff64fc77 fix: failing kondos on master (#57662)
* fix: failing kondos on master

* fixup! remove all external references to permissions group membership

* fixup! missing export
2025-05-06 15:44:31 -07:00
Ryan Laurie
0beb4fd1ec Add build-args to uberjar job (#57633)
* add build-args to uberjar job

* better sha
2025-05-06 13:01:02 -06:00
Nick Fitzpatrick
f508020b18 Watermarks in development instances - App viz (#57620)
* adding watermark for dynamic viz

* starting to put together e2e tests for watermarks

* adding unit test

* adding loki tests

* adding more e2e tests

* changing test id

* adding e2e tests on chart interactivity

* fixing type error
2025-05-06 23:51:25 +05:30
Aleksandr Lesnenko
61b06cb9ca update chart settings types (#57657) 2025-05-06 13:28:40 -04:00
Case Nelson
c21a754c1a fix: redshift pg_enum error when missing base types (#57397) 2025-05-06 09:49:36 -06:00
github-actions[bot]
cebcccd81a Update translations 2025-04-29 (#57372)
* Update translation sources 2025-04-29

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-05-06 09:21:55 -06:00
Nemanja Glumac
479f6ec15e Remove "Collection" option from the "New" button menu (#57649)
Resolves PRG-29 by removing the "Collection" entry from the main "New" menu.
2025-05-06 17:17:12 +02:00
Nemanja Glumac
e42004d8bd Remove "Metric" option from the "New" button menu (#57641)
Resolves PRG-27 by removing the option to create Metric from the main "New" menu.
2025-05-06 15:03:39 +02:00
Romeo Van Snick
3b9ba47ce5 Clean up helper text utils (#57382)
* Split up config into categories

* Break out clauses into groups

* Add duplicate name check

* Allow setting shared options

* Add category to mbql clause config

* Rename groups

* Use enum for category

* Build examples using helper functions

* Build ExpressionParts directly in helper-text

* Flatten examples

* Wrap example in function

* Enable late-binding for args

* Unwrap example

* Remove get name and get description wrappers

* Remove getHelpDocsUrl helper

* Simplify example fn

* Add missing export

* Remove getFunctionByStructure

* Simplify help text helpers

* Rename structure to displayName

* Make args required

* Manually type clause definition type

* Merge HELPER_TEXT_STRINGS into config

* Move help text helpers to separate file

* Use data from MBQL_CLAUSES instead of HELPER_TEXT_STRINGS

* Allow defining stuff in config

* Move help text into config

* Remove fallback to HELPER_TEXT_STRINGS

* Remove helper-text-strings

* Allow more stuff to be optional

* Build clause in getClauseDefinition

* Avoid self-referential types

* Use getClauseDefinition in completer

* Handle new args definition

* Handle null instead of undefined

* Enforce type on all argument definitions

* Enforce name on all argument definitions

* Get clause defns

* Fix types

* Simplify tests

* Remove unnecessary guard

* Avoid creating unnecessary functions

* Move defineClauses to separate module

* Remove any in config

* Rename helper-text-strings test to help-text
2025-05-06 14:53:52 +02:00
John Swanson
6376201ee2 Implement Tenant Groups (#57050)
* Implement Tenant Groups

- normal users cannot be added to a tenant group

- tenant users cannot be added to a normal group

- tenant groups cannot receive write access to any collection

- tenant groups cannot receive any access to the audit collection

- tenant groups cannot receive any application permissions

* Add a setting to turn tenants off and on

When the setting is turned on:

- create the All External Users group, with
`magic_group_type=all-exsternal-users` and `is_tenant_group=true`

When the setting is turned off:

- make sure there are no remaining tenants or tenant users

- delete the All External Users group

* Remove the need for memoized `tenant?` functions

* Fix tests

* allowe using with-temp with perms group membership

* fix more tests

* remove unnecessary bindings

* Put setting behind a feature flag

* Don't read setting from env

closes adm-648
closes adm-657
closes adm-649
2025-05-06 05:50:11 -07:00
Phoomparin Mano
7f92780e9e fix(sdk): custom GeoJSON maps does not load due to wrong domain (#57539) 2025-05-06 19:02:48 +07:00
Nemanja Glumac
9e13274e72 Add a "new collection" button to the collection header (#57616)
Resolves PRG-25

This PR adds a new button to the collection header menu. The button simply opens a new collection modal (lets you create a new collection). There are two important things to note about this change:

1. This button shows only when a user has a curate permissions for the current collection
2. This change required adding a new icon to our design system, which was approved by Maz.
2025-05-06 13:51:26 +02:00
Phoomparin Mano
92fac6cabb fix(sdk): updating collection's entity id crashes InteractiveQuestion and CollectionBrowser (#57529) 2025-05-06 18:51:14 +07:00
Ngoc Khuat
aca9b98060 move context info to after the log message (#57588) 2025-05-06 07:18:06 +00:00
Nemanja Glumac
d25b43a3cb Add a "new collection" button to the main sidebar (#57605)
Resolves PRG-20

This PR replaces the old `...` menu next to the "Collections" sidebar header. As a reminder, this menu was previously triggering a popup with two items:

1. New collection
2. Other users' personal collections (in case the user is an admin)

We're now improving the UX and replacing this menu with two distinct items:

1. The `+` icon that creates a new collection directly
2. The new individual sidebar link that leads to other users' personal collections (again, only if admin)
2025-05-06 07:03:35 +00:00
Nemanja Glumac
fd2f465639 Add a new model button to the browse models page (#57555)
Resolves PRG-21
2025-05-06 08:16:47 +02:00
Fraser
b7f5e23707 Create new PublicSharingSettingsPage component (#57465)
* Create new PublicSharingSettingsPage component

* Add unit tests
2025-05-06 16:00:56 +12:00
Edward Paget
9e7f0b903a fix: remove version-info from settings list api (#57505)
* fix: remove version-info from settings list api

* fixup! cljfmt

* fixup! remove extra assignment
2025-05-05 18:04:34 -05:00
Alex Yarosh
232ce151c3 help page (#57619) 2025-05-05 21:31:07 +00:00
Cam Saul
5d6b82d6ee Fix Kondo failures not causing CI failures (#57618) 2025-05-05 21:01:28 +00:00
Kyle Doherty
1b0ceb2c48 Update Title component sizes to match Figma (#54750)
* update title sizes to match figma - add multi line title stories for lineheight examples

* little more line height in modal titles

* little fixes

* more little fixes

* reduce smartscalar title size

* Update Loki Snapshots

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-05-05 13:41:48 -06:00
Nick Fitzpatrick
c42252c802 Add watermark to static viz chart renderings (#57553)
* add watermark to static viz chart renderings

* adjusting unit test
2025-05-05 22:38:28 +05:30
Edward Paget
dd9c170d8d fix: add table-level sql based permission query (#57541)
* fix: add table-level sql based permission query

Some places in our code we may be returning fewer tables than a user has
access to because we load a limited number of models from the database
then apply permissions filters to those. This provides a subquery based
check for table permissions that we can use in other queries to do the
same kind of test for table access that we would do on the clojure-side.

Co-Authored-By: Nathan Voxland <nathan@metabase.com>

* fixup! restore check-permissions-for-model impl

* Update src/metabase/models/table.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>

* fixup! caluse -> clause spelling

* fixup! reformat malli annotations; add docstring

* fixup! add Literal type to honeysql helpers

* fixup! restore accidentally deleted clause

---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-05-05 11:48:38 -05:00
Ryan Laurie
c88a5b5bc5 remove use modal hook (#57601) 2025-05-05 10:39:07 -06:00
github-automation-metabase
aa0bd12ed3 Bump net.snowflake/snowflake-jdbc from 3.23.2 to 3.24.0 (#57587)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <riley@metabase.com>
2025-05-05 11:20:53 -04:00
github-automation-metabase
a0bee28c26 Bump org.eclipse.jetty/jetty-server from 12.0.19 to 12.0.20 (#57581)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-05 14:04:27 +00:00
Ngoc Khuat
ea279ca19b Email domain check when adding notification recipients (#57416) 2025-05-05 13:59:54 +00:00
github-automation-metabase
a8656deb25 Bump org.eclipse.jetty.ee9/jetty-ee9-servlet from 12.0.19 to 12.0.20 (#57580)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-05-05 13:48:41 +00:00
Nick Fitzpatrick
8ebc12b933 Register Dynamic Shortcuts (#56812)
* Register Dynamic Shortcuts

* regex keys

* things more-less working

* adding admin shortcuts, patching kbar to pass keyboard event

* fixing type issues

* only emit events on keyboard shortcut executions

* remove wait
2025-05-05 17:35:30 +05:30
Nick Fitzpatrick
edb69d6dbb properly invalidate collections when x-raying a table (#57495) 2025-05-05 17:34:15 +05:30
Kamil Mielnik
8aac6aac61 Add label to CodeEditor in LogLevelsForm (#57524)
* Add label to CodeEditor in LogLevelsForm

* Remove required for consistency
2025-05-05 17:56:16 +07:00
Nemanja Glumac
691d1430f8 Add a new metric button to browse metrics page (#57496)
Resolves PRG-22
2025-05-05 12:53:00 +02:00
Nicolò Pretto
2adc027178 fix(sdk): manual fixes for module level ttag calls causing broken translations (#57391)
* fix: filter button labels

* fix: part of EMB-335, uiName: t => getUiName: () => t

* fix linting issue

* fixed unit test mock missing getUiName
frontend/src/metabase/visualizations/components/Visualization/Visualization.unit.spec.js
missing

* make application-permissions.cy.spec.js pass
2025-05-05 10:11:02 +02:00
Aleksandr Lesnenko
e3e035ac6e remove old static pie chart interface (#57545) 2025-05-03 00:56:14 +00:00
Alexander Polyankin
c7ee8b29d2 Fix isDate check in legacy (#57185) 2025-05-03 00:04:44 +00:00
Vamsi Peri
a23481188c Fix for Grey areas around the cards when exporting to PDF (#56928)
* cursor says this could fix the issue

* harder vibe coding

* remove handling of made up by llm elements that do not exist

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-05-02 22:49:49 +00:00
Oleksandr Yakushev
0a4625fdbe [svg] Pool static-viz-context objects (#56648) 2025-05-02 23:34:37 +03:00
Nathan Voxland
ac81ee5c25 Fixed catching of 403 errors from harbormaster (#57504) 2025-05-02 14:04:34 -05:00
Cam Saul
99613cfe0d [Backend modularization] sample-data module (#57511)
* [Backend modularization] `sample-data` module

* Remove duplicate ns form
2025-05-02 11:51:47 -07:00
Nathan Voxland
e515a2d6d0 Further limit tsvector size since it's concatinated (#57514) 2025-05-02 13:20:26 -05:00
Riley Thompson
0c0aaf5490 druid jdbc localdate set param impl (#57507) 2025-05-02 10:56:28 -04:00
Riley Thompson
0bc9646ca0 set timezone for identity-hash-test tests (#57530) 2025-05-02 10:56:14 -04:00
Case Nelson
40507a0e21 fix: include system catalog in databricks multicatalog (#57484)
* fix: include system catalog in databricks multicatalog

* Fix formatting
2025-05-02 08:53:37 -06:00
github-automation-metabase
562617890f Bump com.facebook.presto/presto-jdbc from 0.291 to 0.292 (#56659)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <riley@metabase.com>
2025-05-02 10:43:22 -04:00
github-automation-metabase
9e4fb1181c Bump io.trino/trino-jdbc from 431 to 475 (#57319)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <riley@metabase.com>
2025-05-02 10:43:11 -04:00
github-automation-metabase
6422238118 Bump com.clickhouse/clickhouse-jdbc from 0.8.4 to 0.8.5 (#57318)
* Bump com.clickhouse/clickhouse-jdbc from 0.8.4 to 0.8.5

Inspect dependency changes here:

* Fix test for jdbc driver upgrade

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Riley Thompson <rileythompson99@gmail.com>
2025-05-02 10:42:04 -04:00
Romeo Van Snick
c4cb9263f6 Do not set card when using browser back button (#57389)
* Add reproduction for metabase#56775

* Pass the correct card to the location change

* Unwrap card when navigating to model or metric
2025-05-02 13:42:05 +02:00
Romeo Van Snick
003777b77d Clean up expression config (#57109)
* Rename ALL_NODES to NODE_TYPE

* Remove unnecessary name override

* Remove unused EXPRESSION_OPERATOR_WITHOUT_ORDER_PRIORITY

* Use precedence from pratt compiler

* Move EDITOR_FK_SYMBOLS to identifier module

* Lift const descriptor

* Remove unused characters config

* Remove identifierAlwaysQuoted from EDITOR_QUOTES config and make the behaviour the default

* Move identifierDefaultQuote out of config and hard-code the behaviour

* Flatten default quotes config and move default into string module

* Remove wrong comment

* Use parseOperatorType to find operator type

* Remove separate operator groups

* Remove unused FUNCTIONS variable

* Remove barely used getExpressionName

* Use Boolean token to parse booleans

* Remove True and False from operators

* Rename Star and Slash to Multiply and Divide

* Remove FIELD_MARKERS

* Simplify config definition

* Inline getDescriptionForNow

* Move OPERATOR check to formatter

* Use normal quotes in config

* Split up MBQL_CLAUSES to avoid duplicating names

* Split clause helpers into separate files

* Fix sort order in completion tests

* Move operators to a separate group in config

* Use EXPRESSION_OPERATORS in formatter

* Export using star

* Rename OPERATOR to PUNCTUATOR

* Rename parseOperatorType to parsePunctuator

* Rename parseOperatorType to parsePunctuator

* Add helper for potential function prefixes

* Remove unused OPERATORS

* Remove superflouous helper

* Inline formatCallExpression

* Use Lib.ExpressionOperator where possible

* Remove impossible case for expression

* Inline isLogicOperator

* Rename variable for clarity

* Deduplicate helpers

* Move formatter helpers into utils

* Simplify helper

* Fix import order

* Remove reliance on PUNCTUATOR type

* Fix variable name

* Simplify punctuator definition

* Clean up lexifier

* Flatten lexifier results

* Remove errors for parser results

* Flatten parser result

* Simplify parser tests

* Remove cast

* Remove unused import

* Translate all error messages in formatter

* Simplify type

* Use sentence case name for type
2025-05-02 13:19:47 +02:00
Alexander Solovyov
76133ade49 [serdes] break endless loops (#57482)
When making sure stuff can load even with a loop, the circuit breaker was removed, leading to endless loops. That
would happen if the data causing the loop wasn't stripped properly. Right now if stripping things once did not help
and the entity is in the pipeline again, the process will break (with hopefully enough data to detect why).

This also changes the logic from exception to just recursive calls. Plus it's back at skipping all dashcards in a
Dashboard instead of just skipping visualization logic, which should make for a way faster processing (less deep for
sure). Plus it tries to improve logging a bit so it's easier to understand what's going on in complex cases.
2025-05-02 10:30:38 +00:00
Nicolò Pretto
f29902368b sdk-storybook: disable reactDocGen to speed up storybook (#57440) 2025-05-02 10:47:58 +02:00
Sébastien
2c106817a4 closes viz-360 esc key should not add a recipient (#57253)
* closes viz-360 esc key should not add a recipient

* better code in e2e test to avoid eslint-disable-next-line
2025-05-02 09:47:19 +02:00
Sébastien
da5cd4e7cf Closes VIZ-349 unknown date style warnings (#57263)
* closes VIZ-349 unknown date style warnings

* safer approach
2025-05-02 07:20:03 +02:00
Alexander Polyankin
04bf793795 Drop param_values (#57508) 2025-05-02 00:39:30 +00:00
Fraser
fa9ea2a5a9 Create EmailSettingsPage (#56760)
* Create EmailSettingsPage

* Add email settings to mocks

* Create ReplyToWidget

* Add unit tests for email page

* Handle boolean conversion in AdminSettingInput
2025-05-02 11:45:51 +12:00
Cam Saul
a04e9bd9b0 [Backend modularization] testing-api module (#57503) 2025-05-01 15:53:14 -07:00
Cam Saul
85b3ab5d5f [Backend modularization] Move remaining Slack namespaces into channel module (#57502) 2025-05-01 15:09:14 -07:00
Cam Saul
41e3110f20 [Backend modularization] create new api-keys module (#57497)
* [Backend modularization] create new `api-routes` module

* Fix test 🔧

* [Backend modularization] `api-keys` module
2025-05-01 14:22:52 -07:00
Cam Saul
213535773b [Backend modularization] create new api-routes module (#57492)
* [Backend modularization] create new `api-routes` module

* Fix test 🔧
2025-05-01 20:16:03 +00:00
Jeff Bruemmer
c1e301eda6 docs - note on role setting (#57268)
* note on role setting

* format
2025-05-01 16:15:16 -04:00
Edward Paget
d82bf686b6 deps: remove simpleclient_jetty and javax.servlet (#57487) 2025-05-01 18:58:56 +00:00
Oisin Coveney
fe3792cda9 Convert AutomaticDashboardApp to a functional component (#57390) 2025-05-01 17:53:37 +00:00
lbrdnk
8278732860 Fix cumulative aggregations legacy transform (#57258)
* Fix cum-sum and cum-count legacy transform

* Address review remarks

* Adjsut test

* ag idents

* dissoc-in
2025-05-01 09:34:57 +02:00
Oisin Coveney
0fb515cbc6 TS Conversion: Automatic Dashboard App (#57075) 2025-05-01 08:09:35 +01:00
Cam Saul
2d038e518e Remove Legacy Metrics code from the backend (#57401)
* Remove Legacy Metrics code from the backend

* Code cleanup

* Test fix 🔧

* Test fix 🔧

* PR feedback

* Extra test

* Revert some X-Rays changes

* Remove commented-out test

* Test fixes 🔧
2025-04-30 19:06:26 -07:00
Cam Saul
fc56c810f9 [Backend modularization] native-query-snippets (#57460) 2025-04-30 23:18:03 +00:00
Riley Thompson
fd18b7708f Try specifying tz for identity hash test flake (#57408) 2025-04-30 22:40:06 +00:00
Cam Saul
1c113a608e [Backend modularization] upload module cleanup (#57414)
* `upload` module cleanup

* Fix MySQL

* More keyword fixes 🔧

* Keep uploads sorted
2025-04-30 15:15:58 -07:00
Noah Moss
5fabb3e1ec Fix subtotal label formatting for xlsx pivot exports (#57452)
* Fix subtotal label formatting for xlsx pivot exports

* untangle circular dep
2025-04-30 14:57:49 -07:00
Nathan Voxland
6da77fce6f Reindex immediately on start-up if existing table is old (#57159) 2025-04-30 16:39:46 -05:00
Riley Thompson
f947b70c35 Restrict Mongo sandboxing with saved questions (#56983)
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-04-30 17:32:52 -04:00
8500 changed files with 1078835 additions and 852593 deletions

View File

@@ -58,14 +58,17 @@
:metabase/check-defmulti-arglists {:level :warning}
:metabase/check-me-humanize {:level :warning}
:metabase/defsetting-must-specify-export {:level :warning}
:metabase/defsetting-namespace {:level :warning}
:metabase/mbql-query-first-arg {:level :warning}
:metabase/missing-test-expr-requires-in-cljs {:level :warning}
:metabase/modules {:level :warning} ; more config in `.clj-kondo/config/modules/config.edn`
:metabase/namespace-name {:level :warning}
:metabase/require-shape-checker {:level :warning}
:metabase/test-helpers-use-non-thread-safe-functions {:level :warning} ; more config in `.clj-kondo/config/test-helpers/config.edn`
:metabase/validate-logging {:level :warning}
:metabase/validate-mb-driver-tests {:level :warning}
:metabase/validate-mb-once {:level :warning}
:metabase/discourage-millis-duration {:level :warning}
:metabase/validate-deftest
{:level :warning
@@ -74,8 +77,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
@@ -91,11 +99,9 @@
metabase.test.data.users/with-group-for-user
metabase.test.data/with-empty-h2-app-db
metabase.test.util.log/with-log-level
metabase.test.util.misc/with-single-admin-user
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
@@ -118,12 +124,10 @@
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
metabase.test/with-non-admin-groups-no-root-collection-perms
metabase.test/with-single-admin-user
metabase.test/with-temp-env-var-value
metabase.test/with-temp-vals-in-db
metabase.test/with-temporary-raw-setting-values
@@ -232,8 +236,14 @@
(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)
(metabase.driver-api.core/match-one)
(metabase.driver-api.core/replace)
(metabase.driver-api.core/replace-in)
(metabase.query-processor.middleware.cache-backend.interface/with-cached-results)
(metabase.util.regex/rx [opt])
(metabase.util/prog1 [<>])
@@ -242,20 +252,14 @@
:deprecated-var
{:exclude
{metabase.cmd/dump {:namespaces ["metabase\\.cmd-test" "metabase-enterprise\\.serialization\\.cmd-test"]}
metabase.cmd/load {:namespaces ["metabase\\.cmd-test" "metabase-enterprise\\.serialization\\.cmd-test"]}
metabase.db.data-migrations/data-migrations {:namespaces ["metabase\\.db\\.data-migrations"]}
metabase.db.data-migrations/defmigration {:namespaces ["metabase\\.db\\.data-migrations"]}
metabase.db.data-migrations/run-migration-if-needed! {:namespaces ["metabase\\.db\\.data-migrations"]}
{metabase.cmd.core/dump {:namespaces ["metabase\\.cmd-test" "metabase-enterprise\\.serialization\\.cmd-test"]}
metabase.cmd.core/load {:namespaces ["metabase\\.cmd-test" "metabase-enterprise\\.serialization\\.cmd-test"]}
metabase.driver.sql-jdbc.execute.old-impl/set-timezone-sql {:namespaces ["metabase\\.driver.*"]}
metabase.driver.sql-jdbc.execute/set-time-zone-if-supported! {:namespaces ["metabase\\.driver.*"]}
metabase.driver/current-db-time {:namespaces ["metabase.*"]}
metabase.driver/supports? {:namespaces ["metabase.*"]}
metabase.premium-features.premium-features/enable-enhancements? {:namespaces ["metabase\\.models.*"]}
metabase.query-processor.middleware.resolve-joins/maybe-resolve-source-table {:namespaces ["metabase.*"]}
metabase.query-processor.util/normalize-token {:namespaces ["metabase.*"]}
schema.core/both {:namespaces ["metabase.*"]}
schema.core/either {:namespaces ["metabase.*"]}}}
metabase.query-processor.util/normalize-token {:namespaces ["metabase.*"]}}}
:discouraged-var
{clojure.core/print {:message "Use metabase.util.log instead of clojure.core/print"}
@@ -288,7 +292,10 @@
me.flowthing.pp/pprint {:message "Use metabase.util.log instead of me.flowthing.pp/pprint"}
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"}}
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"}
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."}
@@ -309,218 +316,90 @@
:consistent-alias
{:aliases
{buddy.core.hash buddy-hash
cheshire.generate json.generate
clojure.tools.logging log
clj-http.client http
clj-ldap.client ldap
clj-time.coerce time.coerce
clj-time.format time.format
clojure.core.async a
clojure.core.match clojure.core.match ; Prefer :refer [match]
clojure.data data
clojure.math.combinatorics math.combo
clojure.pprint pprint
clojure.spec.alpha s
clojure.string str
clojure.test t
clojure.tools.build.api b
clojure.tools.namespace.dependency ns.deps
clojure.tools.namespace.find ns.find
clojure.tools.namespace.parse ns.parse
colorize.core colorize
environ.core env
hiccup.core hiccup
hiccup.util hiccup.util
honey.sql sql
honey.sql.helpers sql.helpers
java-time.api t
macaw.core macaw
malli.core mc
malli.error me
malli.experimental mx
malli.generator mg
malli.provider mp
malli.transform mtx
malli.util mut
medley.core m
metabase-enterprise.audit-app.pages.common common
metabase-enterprise.sandbox.api.table table
metabase-enterprise.sandbox.api.util sandbox.api.util
metabase-enterprise.database-routing.core database-routing
metabase-enterprise.test met
metabase.analytics.sdk sdk
metabase.analytics.stats stats
metabase.analysis.native-query-analyzer nqa
metabase.analysis.native-query-analyzer.parameter-substitution nqa.sub
metabase.analyze.query-results qr
metabase.analyze.classifiers.category classifiers.category
metabase.analyze.classifiers.core classifiers
metabase.analyze.classifiers.name classifiers.name
metabase.analyze.classifiers.no-preview-display classifiers.no-preview-display
metabase.analyze.classifiers.text-fingerprint classifiers.text-fingerprint
metabase.analyze.fingerprint.fingerprinters fingerprinters
metabase.analyze.fingerprint.insights insights
metabase.analyze.fingerprint.schema fingerprint.schema
metabase.api.common api
metabase.channel.core channel
metabase.channel.render.core channel.render
metabase.cloud-migration.core cloud-migration
metabase.cmd.copy.h2 copy.h2
metabase.config config
metabase.config.file config.file
metabase.connection-pool connection-pool
metabase.db.connection mdb.connection
metabase.db.jdbc-protocols mdb.jdbc-protocols
metabase.db.metadata-queries metadata-queries
metabase.db.spec mdb.spec
metabase.db.query mdb.query
metabase.driver.common.parameters params
metabase.driver.common.parameters.dates params.dates
metabase.driver.common.parameters.operators params.ops
metabase.driver.common.parameters.parse params.parse
metabase.driver.common.parameters.values params.values
metabase.driver.druid.client druid.client
metabase.driver.druid.execute druid.execute
metabase.driver.druid.js druid.js
metabase.driver.druid.query-processor druid.qp
metabase.driver.druid.sync druid.sync
metabase.driver.impl driver.impl
metabase.driver.mongo.execute mongo.execute
metabase.driver.mongo.parameters mongo.params
metabase.driver.mongo.query-processor mongo.qp
metabase.driver.mongo.util mongo.util
metabase.driver.sql driver.sql
metabase.driver.sql-jdbc.common sql-jdbc.common
metabase.driver.sql-jdbc.connection sql-jdbc.conn
metabase.driver.sql-jdbc.execute sql-jdbc.execute
metabase.driver.sql-jdbc.execute.diagnostic sql-jdbc.execute.diagnostic
metabase.driver.sql-jdbc.execute.legacy-impl sql-jdbc.legacy
metabase.driver.sql-jdbc.execute.old-impl sql-jdbc.execute.old
metabase.driver.sql-jdbc.sync sql-jdbc.sync
metabase.driver.sql-jdbc.sync.common sql-jdbc.sync.common
metabase.driver.sql-jdbc.sync.describe-database sql-jdbc.describe-database
metabase.driver.sql-jdbc.sync.describe-table sql-jdbc.describe-table
metabase.driver.sql-jdbc.sync.interface sql-jdbc.sync.interface
metabase.driver.sql-jdbc.test-util sql-jdbc.tu
metabase.driver.sql.parameters.substitute sql.params.substitute
metabase.driver.sql.parameters.substitution sql.params.substitution
metabase.eid-translation.core eid-translation
metabase.formatter formatter
metabase.http-client client
metabase.legacy-mbql.normalize mbql.normalize
metabase.legacy-mbql.schema mbql.s
metabase.legacy-mbql.util mbql.u
metabase.lib.util lib.util
metabase.lib.util.match lib.util.match
metabase.login-history.core login-history
metabase.model-persistence.core model-persistence
metabase.models.dependency dependency
metabase.models.interface mi
metabase.notification.core notification
metabase.notification.payload.core notification.payload
metabase.notification.test-util notification.tu
metabase.permissions.core perms
metabase.plugins.initialize plugins.init
metabase.public-sharing.core public-sharing
metabase.premium-features.core premium-features
metabase.pulse.core pulse
metabase.pulse.render render
metabase.pulse.render.body body
metabase.pulse.render.style style
metabase.pulse.test-util pulse.test-util
metabase.pulse.parameters pulse-params
metabase.query-processor-test qp.test
metabase.query-processor.context qp.context
metabase.query-processor.error-type qp.error-type
metabase.query-processor.interface qp.i
metabase.query-processor.middleware.add-dimension-projections qp.add-dimension-projections
metabase.query-processor.middleware.add-implicit-clauses qp.add-implicit-clauses
metabase.query-processor.middleware.add-implicit-joins qp.add-implicit-joins
metabase.query-processor.middleware.auto-bucket-datetimes qp.auto-bucket-datetimes
metabase.query-processor.middleware.constraints qp.constraints
metabase.query-processor.middleware.cumulative-aggregations qp.cumulative-aggregations
metabase.query-processor.middleware.parameters.mbql qp.mbql
metabase.query-processor.middleware.parameters.native qp.native
metabase.query-processor.middleware.permissions qp.perms
metabase.query-processor.middleware.pre-alias-aggregations qp.pre-alias-aggregations
metabase.query-processor.middleware.resolve-fields qp.resolve-fields
metabase.query-processor.middleware.resolve-referenced qp.resolve-referenced
metabase.query-processor.middleware.resolve-source-table qp.resolve-source-table
metabase.query-processor.middleware.wrap-value-literals qp.wrap-value-literals
metabase.query-processor.pivot qp.pivot
metabase.query-processor.streaming qp.streaming
metabase.query-processor.streaming.interface qp.si
metabase.query-processor.streaming.xlsx qp.xlsx
metabase.query-processor.timezone qp.timezone
metabase.query-processor.util qp.util
metabase.request.core request
metabase.revisions.core revisions
metabase.search.config search.config
metabase.search.filter search.filter
metabase.search.in-place.filter search.in-place.filter
metabase.search.in-place.util search.util
metabase.search.in-place.scoring scoring
metabase.server.core server
metabase.server.protocols server.protocols
metabase.sso.core sso
metabase.settings.core setting
metabase.sync.analyze.fingerprint sync.fingerprint
metabase.sync.field-values sync.field-values
metabase.sync.interface i
metabase.sync.schedules sync.schedules
metabase.sync.sync-metadata.crufty crufty
metabase.sync.sync-metadata.fields.our-metadata fields.our-metadata
metabase.sync.util sync-util
metabase.sync.util-test sync.util-test
metabase.test mt
metabase.test.data.dataset-definitions defs
metabase.test.data.env.impl tx.env.impl
metabase.test.data.impl data.impl
metabase.test.data.users test.users
metabase.test.domain-entities test.de
metabase.test.mock.util mock.util
metabase.test.sync test.sync
metabase.test.redefs test.redefs
metabase.test.util.js test.js
metabase.test.util.timezone test.tz
metabase.timeline.core timeline
metabase.timeseries-query-processor-test.util tqpt
metabase.util.cron u.cron
metabase.util.currency currency
metabase.util.date-2 u.date
metabase.util.date-2.common u.date.common
metabase.util.date-2.parse u.date.parse
metabase.util.embed embed
metabase.util.encryption encryption
metabase.util.encryption-test encryption-test
metabase.util.files u.files
metabase.util.grouper grouper
metabase.util.honey-sql-2 h2x
metabase.util.i18n i18n
metabase.util.i18n.impl i18n.impl
metabase.util.jvm u.jvm
metabase.util.log log
metabase.util.macros u.macros
metabase.util.malli mu
metabase.util.malli.schema ms
metabase.util.markdown markdown
metabase.util.password u.password
metabase.util.schema su
metabase.util.ui-logic ui-logic
metabase.util.urls urls
metabase.xrays.core xrays
metabuild-common.core u
metabuild-common.output out
metabuild-common.shell shell
monger.collection mcoll
ring.mock.request ring.mock
ring.util.codec codec
ring.util.response response
ring.adapter.jetty9.servlet servlet
saml20-clj.core saml
toucan.db db
toucan.models models}}}
{buddy.core.hash buddy-hash
cheshire.generate json.generate
clj-http.client http
clj-ldap.client ldap
clj-time.coerce time.coerce
clj-time.format time.format
clojure.core.async a
clojure.core.match clojure.core.match
clojure.data data
clojure.math.combinatorics math.combo
clojure.pprint pprint
clojure.spec.alpha s
clojure.string str
clojure.test t
clojure.tools.build.api b
clojure.tools.logging log
clojure.tools.namespace.dependency ns.deps
clojure.tools.namespace.find ns.find
clojure.tools.namespace.parse ns.parse
colorize.core colorize
environ.core env
hiccup.core hiccup
hiccup.util hiccup.util
honey.sql sql
honey.sql.helpers sql.helpers
java-time.api t
macaw.core macaw
malli.core mc
malli.error me
malli.experimental mx
malli.generator mg
malli.provider mp
malli.transform mtx
malli.util mut
medley.core m
metabase-enterprise.database-routing.core database-routing
metabase.analyze.classifiers.core classifiers
metabase.channel.core channel
metabase.channel.render.core channel.render
metabase.cloud-migration.core cloud-migration
metabase.eid-translation.core eid-translation
metabase.login-history.core login-history
metabase.model-persistence.core model-persistence
metabase.notification.core notification
metabase.notification.payload.core notification.payload
metabase.permissions.core perms
metabase.premium-features.core premium-features
metabase.public-sharing.core public-sharing
metabase.pulse.core pulse
metabase.query-permissions.core query-perms
metabase.request.core request
metabase.revisions.core revisions
metabase.server.core server
metabase.settings.core setting
metabase.sso.core sso
metabase.timeline.core timeline
metabase.util.cron u.cron
metabase.util.currency currency
metabase.util.date-2 u.date
metabase.util.date-2.common u.date.common
metabase.util.date-2.parse u.date.parse
metabase.util.embed embed
metabase.util.encryption encryption
metabase.util.encryption-test encryption-test
metabase.util.files u.files
metabase.util.grouper grouper
metabase.util.honey-sql-2 h2x
metabase.util.i18n i18n
metabase.util.i18n.impl i18n.impl
metabase.util.jvm u.jvm
metabase.util.log log
metabase.util.macros u.macros
metabase.util.malli mu
metabase.util.malli.schema ms
metabase.util.markdown markdown
metabase.util.password u.password
metabase.util.ui-logic ui-logic
metabase.xrays.core xrays
monger.collection mcoll
ring.mock.request ring.mock
ring.util.codec codec
ring.util.response response
saml20-clj.core saml
toucan2.core t2}}}
:lint-as
{cljs.cache/defcache clojure.core/deftype
@@ -529,33 +408,38 @@
clojure.test.check.clojure-test/defspec clojure.test/deftest
clojure.test.check.properties/for-all clojure.core/let
clojurewerkz.quartzite.jobs/defjob clojure.core/defn
instaparse.core/defparser clojure.core/def
metabase-enterprise.action-v2.test-util/with-test-tables! clojure.core/let
metabase-enterprise.serialization.test-util/with-dbs clojure.core/fn
metabase-enterprise.serialization.test-util/with-random-dump-dir clojure.core/let
metabase-enterprise.content-translation.routes-test/with-new-secret-key! clojure.core/fn
metabase.actions.test-util/with-actions clojure.core/let
metabase.api.common/let-404 clojure.core/let
metabase.app-db.custom-migrations.util/with-temp-scheduler! clojure.core/fn
metabase.app-db.custom-migrations/define-migration clj-kondo.lint-as/def-catch-all
metabase.app-db.custom-migrations/define-reversible-migration clj-kondo.lint-as/def-catch-all
metabase.app-db.liquibase/with-liquibase clojure.core/let
metabase.app-db.schema-migrations-test.impl/with-temp-empty-app-db clojure.core/let
metabase.channel.impl.http-test/with-captured-http-requests clojure.core/fn
metabase.channel.impl.http-test/with-server clojure.core/let
metabase.dashboard-subscription-test/with-dashboard-sub-for-card clojure.core/let
metabase.db.custom-migrations/define-migration clj-kondo.lint-as/def-catch-all
metabase.db.custom-migrations/define-reversible-migration clj-kondo.lint-as/def-catch-all
metabase.db.custom-migrations.util/with-temp-scheduler! clojure.core/fn
metabase.db.liquibase/with-liquibase clojure.core/let
metabase.db.schema-migrations-test.impl/with-temp-empty-app-db clojure.core/let
metabase.collections.models.collection-test/with-collection-in-location clojure.core/let
metabase.driver.mongo.connection/with-mongo-client clojure.core/let
metabase.driver.mongo.connection/with-mongo-database clojure.core/let
metabase.driver.mongo.query-processor/mongo-let clojure.core/let
metabase.driver.sql-jdbc.actions/with-jdbc-transaction clojure.core/let
metabase.driver.sql-jdbc.connection.ssh-tunnel/with-ssh-tunnel clojure.core/let
metabase.driver.sql-jdbc.connection/with-connection-spec-for-testing-connection clojure.core/let
metabase.driver.sql-jdbc.execute.diagnostic/capturing-diagnostic-info clojure.core/fn
metabase.models.collection-test/with-collection-in-location clojure.core/let
metabase.driver-api.core/defsetting hooks.metabase.settings.models.setting/defsetting
metabase.models.json-migration/def-json-migration clj-kondo.lint-as/def-catch-all
metabase.models.util.spec-update/define-spec clojure.core/def
metabase.notification.test-util/with-temp-notification clojure.core/let
metabase.notification.test-util/with-card-notification clojure.core/let
metabase.notification.test-util/with-system-event-notification! clojure.core/let
metabase.notification.test-util/with-temp-notification clojure.core/let
metabase.premium-features.core/defenterprise-schema clj-kondo.lint-as/def-catch-all
metabase.premium-features.core/define-premium-feature clojure.core/def
metabase.premium-features.defenterprise/defenterprise-schema clj-kondo.lint-as/def-catch-all
metabase.premium-features.settings/define-premium-feature clojure.core/def
metabase.pulse.dashboard-subscription-test/with-dashboard-sub-for-card clojure.core/let
metabase.pulse.send-test/with-pulse-for-card clojure.core/let
metabase.query-processor-test.pipeline-queries-test/pmbql-query clojure.core/->
metabase.query-processor-test.pipeline-queries-test/run-pmbql-query clojure.core/->
@@ -564,29 +448,30 @@
metabase.query-processor.middleware.process-userland-query-test/with-query-execution! clojure.core/let
metabase.query-processor.setup/with-qp-setup clojure.core/let
metabase.search.api-test/do-test-users clojure.core/let
metabase.settings.core/defsetting clj-kondo.lint-as/def-catch-all
metabase.settings.core/define-multi-setting clojure.core/def
metabase.settings.models.setting/defsetting clj-kondo.lint-as/def-catch-all
metabase.settings.core/defsetting clj-kondo.lint-as/def-catch-all
metabase.settings.models.setting.multi-setting/define-multi-setting clojure.core/def
metabase.settings.models.setting/defsetting clj-kondo.lint-as/def-catch-all
metabase.sso.ldap/with-ldap-connection clojure.core/fn
metabase.sync.util/sum-for clojure.core/for
metabase.sync.util/with-emoji-progress-bar clojure.core/let
metabase.task/defjob clojure.core/defn
metabase.task.core/defjob clojure.core/defn
metabase.task.impl/defjob clojure.core/defn
metabase.test.data.interface/defdataset clojure.core/def
metabase.test.data.interface/defdataset-edn clojure.core/def
metabase.test.gentest/defgentest clojure.test/deftest
metabase.test/defdataset clojure.core/def
metabase.test/let-url clojure.core/let
metabase.test/with-actions clojure.core/let
metabase.test/with-grouper-batches! clojure.core/fn
metabase.test/with-open-channels clojure.core/let
metabase.test/with-single-admin-user clojure.core/fn
metabase.test/with-single-admin-user! clojure.core/fn
metabase.test/with-temp-dir clojure.core/let
metabase.test/with-temp-empty-app-db clojure.core/let
metabase.test/with-temp-file clojure.core/let
metabase.test/with-user-in-groups clojure.core/let
metabase.test.gentest/defgentest clojure.test/deftest
metabase.upload-test/with-upload-table! clojure.core/let
metabase.util/with-timer-ms clojure.core/fn
metabase.upload.impl-test/with-upload-table! clojure.core/let
metabase.util/for-map clojure.core/for
metabase.util.files/with-open-path-to-resource clojure.core/let
metabase.util.malli.defn/defn schema.core/defn
metabase.util.malli.defn/defn- schema.core/defn
@@ -596,7 +481,7 @@
metabase.util.malli/defn- schema.core/defn
metabase.util.malli/fn schema.core/fn
metabase.util.namespaces/import-fns potemkin/import-vars
metabase.util.ssh/with-ssh-tunnel clojure.core/let
metabase.util/with-timer-ms clojure.core/fn
metabase.xrays.domain-entities.malli/defn schema.core/defn
metabuild-common.core/with-open-jar-file-system clojure.core/let
metabuild-common.files/with-open-jar-file-system clojure.core/let
@@ -619,6 +504,7 @@
clojure.core/ns hooks.clojure.core.ns/lint-ns
clojure.core/require hooks.clojure.core.require/lint-require
clojure.core/requiring-resolve hooks.clojure.core.require/lint-requiring-resolve
clojure.core/- hooks.metabase.util.timing/discourage-millis-duration
clojure.test/deftest hooks.clojure.test/deftest
clojure.test/is hooks.clojure.test/is
clojure.test/use-fixtures hooks.clojure.test/use-fixtures
@@ -627,22 +513,26 @@
metabase-enterprise.audit-app.pages-test/with-temp-objects hooks.common/with-one-binding
metabase-enterprise.cache.config-test/with-temp-persist-models hooks.common/with-seven-bindings
metabase-enterprise.serialization.test-util/with-temp-dpc hooks.toucan2.tools.with-temp/with-temp
metabase.api.card-test/with-card-param-values-fixtures hooks.common/let-one-with-optional-value
metabase.api.card-test/with-temp-native-card! hooks.common/with-two-bindings
metabase.api.card-test/with-temp-native-card-with-params! hooks.common/with-two-bindings
metabase.api.collection-test/with-french-user-and-personal-collection! hooks.common/with-two-top-level-bindings
metabase.api.common.internal-test/with-jetty-server hooks.common/with-one-binding
metabase.api.dashboard-test/with-chain-filter-fixtures hooks.common/let-one-with-optional-value
metabase.api.dashboard-test/with-simple-dashboard-with-tabs hooks.common/with-one-binding
metabase.api.macros/defendpoint hooks.metabase.api.macros/defendpoint
metabase.api.user-test/with-temp-user-email! hooks.common/with-one-binding
metabase.app-db.schema-migrations-test.impl/test-migrations hooks.metabase.app-db.schema-migrations-test.impl/test-migrations
metabase.channel.render.js.svg/with-static-viz-context hooks.common/with-one-top-level-binding
metabase.channel.template.handlebars-helper/defhelper hooks.metabase.channel.template.handlebars-helper/defhelper
metabase.channel.template.handlebars-test/with-temp-template! hooks.common/with-vec-first-binding
metabase.dashboard-subscription-test/with-link-card-fixture-for-dashboard hooks.common/let-second
metabase.db.schema-migrations-test.impl/test-migrations hooks.metabase.db.schema-migrations-test.impl/test-migrations
metabase.classloader.core/require hooks.clojure.core.require/lint-require
metabase.classloader.impl/require hooks.clojure.core.require/lint-require
metabase.collections.api-test/with-french-user-and-personal-collection! hooks.common/with-two-top-level-bindings
metabase.collections.models.collection-test/with-collection-hierarchy! hooks.common/let-one-with-optional-value
metabase.collections.models.collection-test/with-personal-and-impersonal-collections hooks.common/with-two-bindings
metabase.dashboards.api-test/with-chain-filter-fixtures hooks.common/let-one-with-optional-value
metabase.dashboards.api-test/with-simple-dashboard-with-tabs hooks.common/with-one-binding
metabase.dashboards.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
metabase.embedding.api.embed-test/do-response-formats hooks.common/with-two-bindings
metabase.embedding.api.embed-test/with-chain-filter-fixtures! hooks.common/let-one-with-optional-value
metabase.embedding.api.embed-test/with-temp-card hooks.common/let-one-with-optional-value
@@ -653,19 +543,15 @@
metabase.lib.schema.mbql-clause/define-tuple-mbql-clause hooks.metabase.lib.schema.mbql-clause/define-mbql-clause
metabase.lib.test-util.macros/$ids hooks.metabase.test.data/$ids
metabase.lib.test-util.macros/mbql-query hooks.metabase.test.data/mbql-query
metabase.lib.test-util.macros/mbql-5-query hooks.metabase.test.data/mbql-query
metabase.lib.test-util.macros/with-testing-against-standard-queries hooks.metabase.lib.test-util.macros/with-testing-against-standard-queries
metabase.model-persistence.api-test/with-persistence-setup! hooks.common/with-one-top-level-binding
metabase.model-persistence.api-test/with-setup! hooks.common/with-one-top-level-binding
metabase.model-persistence.test-util/with-persistence-enabled! hooks.metabase.model-persistence.test-util/with-persistence-enabled!
metabase.models.collection-test/with-collection-hierarchy! hooks.common/let-one-with-optional-value
metabase.models.collection-test/with-personal-and-impersonal-collections hooks.common/with-two-bindings
metabase.models.dashboard-tab-test/with-dashtab-in-personal-collection hooks.common/with-one-top-level-binding
metabase.models.dashboard-test/with-dash-in-collection! hooks.common/with-three-bindings
metabase.models.interface/define-batched-hydration-method hooks.metabase.models.interface/define-hydration-method
metabase.models.interface/define-simple-hydration-method hooks.metabase.models.interface/define-hydration-method
metabase.permissions.core/allow-changing-all-users-group-members hooks.common/do*
metabase.permissions.core/disable-perms-cache hooks.common/do*
metabase.plugins.classloader/require hooks.clojure.core.require/lint-require
metabase.premium-features.core/defenterprise hooks.metabase.premium-features.defenterprise/defenterprise
metabase.premium-features.defenterprise/defenterprise hooks.metabase.premium-features.defenterprise/defenterprise
metabase.public-sharing.api-test/with-required-param-card! hooks.common/with-one-binding
@@ -673,16 +559,20 @@
metabase.public-sharing.api-test/with-temp-public-dashboard hooks.common/let-one-with-optional-value
metabase.public-sharing.api-test/with-temp-public-dashboard-and-card hooks.common/with-three-bindings
metabase.pulse.api.alert-test/with-alert-in-collection! hooks.common/with-four-bindings
metabase.pulse.dashboard-subscription-test/with-link-card-fixture-for-dashboard hooks.common/let-second
metabase.pulse.models.pulse-test/with-dashboard-subscription-in-collection! hooks.common/with-four-bindings
metabase.pulse.models.pulse-test/with-pulse-in-collection! hooks.common/with-four-bindings
metabase.pulse.test-util/checkins-query-card hooks.metabase.test.data/$ids
metabase.queries.api.card-test/with-card-param-values-fixtures hooks.common/let-one-with-optional-value
metabase.queries.api.card-test/with-temp-native-card! hooks.common/with-two-bindings
metabase.queries.api.card-test/with-temp-native-card-with-params! hooks.common/with-two-bindings
metabase.query-processor-test.expressions-test/calculate-bird-scarcity hooks.metabase.query-processor-test.expressions-test/calculate-bird-scarcity
metabase.query-processor-test.filter-test/count-with-filter-clause hooks.metabase.test.data/$ids
metabase.query-processor.middleware.cache-test/with-mock-cache! hooks.common/with-two-bindings
metabase.request.core/with-current-request hooks.common/with-used-first-arg
metabase.request.core/with-current-user hooks.common/with-used-first-arg
metabase.request.core/with-limit-and-offset hooks.common/with-used-first-two-args
metabase.sample-data-test/with-temp-sample-database-db hooks.common/with-one-binding
metabase.sample-data.impl-test/with-temp-sample-database-db hooks.common/with-one-binding
metabase.search.api-test/with-search-items-in-collection hooks.metabase.search.api-test/with-search-items-in-collection
metabase.search.api-test/with-search-items-in-root-collection hooks.common/do*
metabase.server.streaming-response-test/with-start-execution-chan hooks.common/with-one-binding
@@ -701,15 +591,15 @@
metabase.test.data/mbql-query hooks.metabase.test.data/mbql-query
metabase.test.data/run-mbql-query hooks.metabase.test.data/mbql-query
metabase.test.gentest/iterate hooks.metabase.test.gentest/iterate*
metabase.test.util.async/with-open-channels hooks.common/let-with-optional-value-for-last-binding
metabase.test.util.generators.jvm/with-random-cards hooks.metabase.test.util.generators.jvm/with-random-cards
metabase.test.util.log/with-log-level hooks.common/with-ignored-first-arg
metabase.test.util/discard-setting-changes hooks.common/with-ignored-first-arg
metabase.test.util/with-column-remappings hooks.common/with-ignored-first-arg
metabase.test.util/with-non-admin-groups-no-root-collection-perms hooks.common/do*
metabase.test.util/with-prometheus-system! hooks.common/with-two-bindings
metabase.test.util/with-temp-file hooks.metabase.test.util/with-temp-file
metabase.test.util/with-temporary-setting-values hooks.metabase.test.util/with-temporary-setting-values
metabase.test.util.async/with-open-channels hooks.common/let-with-optional-value-for-last-binding
metabase.test.util.generators.jvm/with-random-cards hooks.metabase.test.util.generators.jvm/with-random-cards
metabase.test.util.log/with-log-level hooks.common/with-ignored-first-arg
metabase.test/$ids hooks.metabase.test.data/$ids
metabase.test/dataset hooks.metabase.test.data/dataset
metabase.test/discard-setting-changes hooks.common/with-ignored-first-arg
@@ -724,14 +614,15 @@
metabase.test/with-log-messages-for-level hooks.metabase.util.log.capture/with-log-messages-for-level
metabase.test/with-non-admin-groups-no-root-collection-perms hooks.common/do*
metabase.test/with-persistence-enabled! hooks.metabase.model-persistence.test-util/with-persistence-enabled!
metabase.test/with-prometheus-system! hooks.common/with-two-bindings
metabase.test/with-temp hooks.toucan2.tools.with-temp/with-temp
metabase.test/with-temp-file hooks.metabase.test.util/with-temp-file
metabase.test/with-prometheus-system! hooks.common/with-two-bindings
metabase.test/with-temporary-setting-values hooks.metabase.test.util/with-temporary-setting-values
metabase.util.i18n/tru hooks.metabase.util.i18n/tru
metabase.users.api-test/with-temp-user-email! hooks.common/with-one-binding
metabase.util.i18n/deferred-trs hooks.metabase.util.i18n/deferred-trs
metabase.util.i18n/deferred-tru hooks.metabase.util.i18n/deferred-tru
metabase.util.i18n/trs hooks.metabase.util.i18n/trs
metabase.util.i18n/deferred-trs hooks.metabase.util.i18n/deferred-trs
metabase.util.i18n/tru hooks.metabase.util.i18n/tru
metabase.util.log.capture/with-log-messages-for-level hooks.metabase.util.log.capture/with-log-messages-for-level
metabase.util.log/debug hooks.metabase.util.log/info
metabase.util.log/debugf hooks.metabase.util.log/infof
@@ -763,18 +654,17 @@
metabase-enterprise.serialization.test-util/with-world macros.metabase-enterprise.serialization.test-util/with-world
metabase-enterprise.test/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.test/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase.api.card-test/with-ordered-items macros.metabase.api.card-test/with-ordered-items
metabase.api.collection-test/with-collection-hierarchy! macros.metabase.api.collection-test/with-collection-hierarchy!
metabase.api.collection-test/with-some-children-of-collection! macros.metabase.api.collection-test/with-some-children-of-collection!
metabase.collections.api-test/with-collection-hierarchy! macros.metabase.collections.api-test/with-collection-hierarchy!
metabase.collections.api-test/with-some-children-of-collection! macros.metabase.collections.api-test/with-some-children-of-collection!
metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-card-referencing! macros.metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-card-referencing!
metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing! macros.metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing!
metabase.lib.common/defop macros.metabase.lib.common/defop
metabase.lib.filter/deffilter macros.metabase.lib.filter/deffilter
metabase.models.params.chain-filter-test/chain-filter macros.metabase.models.params.chain-filter-test/chain-filter
metabase.models.params.chain-filter-test/chain-filter-search macros.metabase.models.params.chain-filter-test/chain-filter
metabase.models.user-test/with-groups macros.metabase.models.user-test/with-groups
metabase.parameters.chain-filter-test/chain-filter macros.metabase.parameters.chain-filter-test/chain-filter
metabase.parameters.chain-filter-test/chain-filter-search macros.metabase.parameters.chain-filter-test/chain-filter
metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing! macros.metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing!
metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing! macros.metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing!
metabase.queries.api.card-test/with-ordered-items macros.metabase.queries.api.card-test/with-ordered-items
metabase.query-analysis.models.query-analysis-test/with-test-setup macros.metabase.query-analysis.models.query-analysis-test/with-test-setup
metabase.query-analysis.task.test-setup/with-test-setup! macros.metabase.query-analysis.task.test-setup/with-test-setup!
metabase.query-processor.streaming/streaming-response macros.metabase.query-processor.streaming/streaming-response
@@ -785,6 +675,7 @@
metabase.test/with-group-for-user macros.metabase.test.data.users/with-group-for-user
metabase.test/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!
metabase.test/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values
metabase.users.models.user-test/with-groups! macros.metabase.users.models.user-test/with-groups!
metabase.util.namespaces/import-fn macros.metabase.util.namespaces/import-fn
metabase.xrays.domain-entities.malli/define-getters-and-setters macros.metabase.xrays.domain-entities.malli/define-getters-and-setters
metabase.xrays.related-test/with-world macros.metabase.xrays.related-test/with-world}}
@@ -812,6 +703,8 @@
: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.
@@ -837,8 +730,9 @@
{:inline-def {:level :off}
:missing-docstring {:level :off}
:private-call {:level :off}
:discouraged-var {metabase.driver/database-supports? {:level :off}}
:metabase/defsetting-must-specify-export {:level :off}
:discouraged-var {metabase.driver/database-supports? {:level :off}}}
:metabase/defsetting-namespace {:level :off}}
:hooks
{:analyze-call
@@ -850,6 +744,7 @@
{:linters
{:metabase/validate-escaped-single-quotes-in-i18n {:level :warning}
:metabase/validate-string-or-str-args-to-i18n {:level :warning}
:metabase/discourage-millis-duration {:level :warning}
:discouraged-var
{clojure.core/with-redefs {:message "Don't use with-redefs outside of tests"}
clojure.core/eval {:message "Don't use eval outside of tests"}}}}
@@ -891,6 +786,11 @@
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
@@ -906,11 +806,16 @@
toucan2.core {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}}
:discouraged-var
{medley.core/map-keys {:message "Use clojure.core/update-keys"}
medley.core/map-vals {:message "Use clojure.core/update-vals"}
metabase.db.query/query {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}
metabase.db.query/reducible-query {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}}}}
{medley.core/map-keys {:message "Use clojure.core/update-keys"}
medley.core/map-vals {:message "Use clojure.core/update-vals"}
metabase.app-db.core/query {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}
metabase.app-db.core/reducible-query {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}}}}
general-qp-and-driver-test-namespaces
{:linters
{:metabase/disallow-hardcoded-driver-names-in-tests {:level :warning}}}}}
{:discouraged-var
{metabase.test/with-column-remappings {:message "Use metabase.lib.test-util/remap-metadata-provider instead of with-column-remappings in QP tests"}
metabase.test.util/with-column-remappings {:message "Use metabase.lib.test-util/remap-metadata-provider instead of with-column-remappings in QP tests"}}
:metabase/disallow-hardcoded-driver-names-in-tests
{:level :warning}}}}}

File diff suppressed because it is too large Load Diff

View File

@@ -49,31 +49,43 @@
metabase.actions.models/insert!
metabase.analytics.snowplow-test/fake-track-event-impl!
metabase.analytics.snowplow/track-event-impl!
metabase.app-db.core/finish-db-setup!
metabase.app-db.core/migrate!
metabase.app-db.core/setup-db!
metabase.app-db.schema-migrations-test.impl/run-migrations-in-range!
metabase.app-db.setup/migrate!
metabase.app-db.setup/setup-db!
metabase.channel.email-test/reset-inbox!
metabase.channel.email/send-email!
metabase.cmd.dump-to-h2/dump-to-h2!
metabase.cmd.load-from-h2/load-from-h2!
metabase.content-verification.models.moderation-review/create-review!
metabase.core.core/ensure-audit-db-installed!
metabase.db.schema-migrations-test.impl/run-migrations-in-range!
metabase.db.setup/migrate!
metabase.db.setup/setup-db!
metabase.db/migrate!
metabase.db/setup-db!
metabase.driver.mongo-test/create-database-from-row-maps!
metabase.driver.postgres-test/create-enums-db!
metabase.driver.postgres-test/drop-if-exists-and-create-db!
metabase.driver.sql-jdbc.execute/execute-statement!
metabase.indexed-entities.models.model-index/add-values!
metabase.driver.sql-jdbc.connection.ssh-tunnel-test/start-mock-servers!
metabase.driver.sql-jdbc.connection.ssh-tunnel-test/stop-mock-servers!
metabase.indexed-entities.task.index-values/job-init!
metabase.model-persistence.models.persisted-info/ready-database!
metabase.model-persistence.task.persist-refresh/job-init!
metabase.model-persistence.task.persist-refresh/refresh-tables!
metabase.model-persistence.task.persist-refresh/schedule-persistence-for-database!
metabase.models.collection.graph-test/clear-graph-revisions!
metabase.models.collection.graph-test/do-with-n-temp-users-with-personal-collections!
metabase.models.field-values/create-or-update-full-field-values!
metabase.models.moderation-review/create-review!
metabase.models.on-demand-test/add-dashcard-with-parameter-mapping!
metabase.permissions.core/grant-application-permissions!
metabase.permissions.core/grant-collection-read-permissions!
metabase.permissions.core/grant-collection-readwrite-permissions!
metabase.permissions.core/grant-full-data-permissions!
metabase.permissions.core/grant-native-readwrite-permissions!
metabase.permissions.core/grant-permissions!
metabase.permissions.core/revoke-application-permissions!
metabase.permissions.core/revoke-data-perms!
metabase.permissions.core/update-data-perms-graph!
metabase.permissions.core/update-group-permissions!
metabase.permissions.models.collection.graph-test/clear-graph-revisions!
metabase.permissions.models.collection.graph-test/do-with-n-temp-users-with-personal-collections!
metabase.permissions.models.permissions/grant-application-permissions!
metabase.permissions.models.permissions/grant-collection-read-permissions!
metabase.permissions.models.permissions/grant-collection-readwrite-permissions!
@@ -91,7 +103,7 @@
metabase.query-processor.streaming.interface/begin!
metabase.query-processor.streaming.interface/finish!
metabase.query-processor.streaming.interface/write-row!
metabase.sample-data/try-to-extract-sample-database!
metabase.sample-data.impl/try-to-extract-sample-database!
metabase.settings.models.setting-test/test-user-local-allowed-setting!
metabase.settings.models.setting-test/test-user-local-only-setting!
metabase.settings.models.setting.cache/restore-cache!
@@ -104,7 +116,8 @@
metabase.sync.sync-metadata/sync-db-metadata!
metabase.sync.util-test/sync-database!
metabase.sync.util/store-sync-summary!
metabase.task/delete-task!
metabase.task.core/delete-task!
metabase.task.impl/delete-task!
metabase.test.data.bigquery-cloud-sdk/execute!
metabase.test.data.impl.get-or-create/set-test-db-permissions!
metabase.test.data.impl/copy-db-tables-and-fields!
@@ -126,7 +139,6 @@
metabase.test/initialize-if-needed!
metabase.test/test-helpers-set-global-values!
metabase.test/with-temp-env-var-value!
metabase.upload-test/set-local-infile!
metabase.upload.impl-test/set-local-infile!
metabase.util.files/create-dir-if-not-exists!
metabase.util.ssh-test/start-mock-servers!
metabase.util.ssh-test/stop-mock-servers!}}}}
metabase.warehouse-schema.models.field-values/create-or-update-full-field-values!}}}}

View File

@@ -1,13 +0,0 @@
(ns macros.metabase.api.card-test)
(defmacro with-ordered-items
[collection model-and-name-syms & body]
`(let ~(into []
(comp (partition-all 2)
(mapcat (fn [[model binding]]
[binding model])))
model-and-name-syms)
~collection
~@(->> (partition-all 2 model-and-name-syms)
(map second))
~@body))

View File

@@ -1,24 +0,0 @@
(ns macros.metabase.api.collection-test)
(defmacro with-collection-hierarchy! [bindings & body]
`(let [~'a nil
~'b nil
~'c nil
~'d nil
~'e nil
~'f nil
~'g nil]
~'a
~'b
~'c
~'d
~'e
~'f
~'g
~bindings
~@body))
(defmacro with-some-children-of-collection! [collection-or-id-or-nil & body]
`(let [~'&ids ~collection-or-id-or-nil]
~'&ids
~@body))

View File

@@ -0,0 +1,24 @@
(ns macros.metabase.collections.api-test)
(defmacro with-collection-hierarchy! [bindings & body]
`(let [~'a nil
~'b nil
~'c nil
~'d nil
~'e nil
~'f nil
~'g nil]
~'a
~'b
~'c
~'d
~'e
~'f
~'g
~bindings
~@body))
(defmacro with-some-children-of-collection! [collection-or-id-or-nil & body]
`(let [~'&ids ~collection-or-id-or-nil]
~'&ids
~@body))

View File

@@ -1,4 +0,0 @@
(ns macros.metabase.models.params.chain-filter-test)
(defmacro chain-filter [& _]
`(metabase.models.params.chain-filter/chain-filter nil nil))

View File

@@ -1,9 +0,0 @@
(ns macros.metabase.models.user-test)
(defmacro with-groups [bindings & body]
`(let ~(into []
(comp (partition-all 3)
(mapcat (fn [[group-binding properties members]]
[group-binding [properties members]])))
bindings)
~@body))

View File

@@ -0,0 +1,4 @@
(ns macros.metabase.parameters.chain-filter-test)
(defmacro chain-filter [& _]
`(metabase.parameters.chain-filter/chain-filter nil nil))

View File

@@ -0,0 +1,13 @@
(ns macros.metabase.queries.api.card-test)
(defmacro with-ordered-items
[collection model-and-name-syms & body]
`(let ~(into []
(comp (partition-all 2)
(mapcat (fn [[model binding]]
[binding model])))
model-and-name-syms)
~collection
~@(->> (partition-all 2 model-and-name-syms)
(map second))
~@body))

View File

@@ -0,0 +1,9 @@
(ns macros.metabase.users.models.user-test)
(defmacro with-groups! [bindings & body]
`(let ~(into []
(comp (partition-all 3)
(mapcat (fn [[group-binding properties members]]
[group-binding [properties members]])))
bindings)
~@body))

View File

@@ -1,6 +1,7 @@
(ns hooks.clojure.core.ns
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.common]
[hooks.common.modules :as modules]))
@@ -59,12 +60,15 @@
(printf "Don't know how to figure out what namespace is being required in %s\n" (pr-str node)))))
args)))
(defn- ns-form-node->ns-symb-node [ns-form-node]
(some (fn [node]
(when (and (hooks/token-node? node)
(not= (hooks/sexpr node) 'ns))
node))
(:children ns-form-node)))
(defn- ns-form-node->ns-symb [ns-form-node]
(some-> (some (fn [node]
(when (and (hooks/token-node? node)
(not= (hooks/sexpr node) 'ns))
node))
(:children ns-form-node))
(some-> (ns-form-node->ns-symb-node ns-form-node)
hooks/sexpr))
(defn- lint-modules [ns-form-node config]
@@ -83,9 +87,33 @@
:message error
:type :metabase/modules))))))))
(defn- lint-namespace-name [ns-form-node]
(when-let [ns-symb-node (ns-form-node->ns-symb-node ns-form-node)]
(when-not (contains? (hooks.common/ignored-linters ns-symb-node) :metabase/namespace-name)
(let [parts (str/split (str (hooks/sexpr ns-symb-node)) #"\.")]
(when (and (<= (count parts) 2)
(#{"metabase" "metabase-enterprise"} (first parts))
;; exclude test namespaces for now
(not (str/ends-with? (last parts) "test")))
(hooks/reg-finding! (assoc (meta ns-symb-node)
:message "Metabase namespaces should have the form metabase[-enterprise].<module>.* [:metabase/namespace-name]"
:type :metabase/namespace-name)))))))
(defn lint-ns [x]
(doto (:node x)
lint-require-shapes
lint-requires-on-new-lines
(lint-modules (modules/config x)))
(lint-modules (modules/config x))
lint-namespace-name)
x)
(comment
(lint-ns
{:node (hooks/parse-string
(pr-str
'(ns hooks.clojure.core.ns
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.common]
[hooks.common.modules :as modules]))))}))

View File

@@ -0,0 +1,14 @@
(ns hooks.metabase.app-db.schema-migrations-test.impl
(:require [clj-kondo.hooks-api :as hooks]))
(defn test-migrations
[{{[_ migration-range {[binding] :children} & body] :children} :node}]
(let [node* (hooks/list-node
(list*
(hooks/token-node `let)
(hooks/vector-node
[binding (hooks/list-node (list (hooks/token-node `fn)
(hooks/vector-node [(hooks/token-node '&) (hooks/token-node '_args)])))])
migration-range
body))]
{:node node*}))

View File

@@ -1,14 +0,0 @@
(ns hooks.metabase.db.schema-migrations-test.impl
(:require [clj-kondo.hooks-api :as hooks]))
(defn test-migrations
[{{[_ migration-range {[binding] :children} & body] :children} :node}]
(let [node* (hooks/list-node
(list*
(hooks/token-node `let)
(hooks/vector-node
[binding (hooks/list-node (list (hooks/token-node `fn)
(hooks/vector-node [(hooks/token-node '&) (hooks/token-node '_args)])))])
migration-range
body))]
{:node node*}))

View File

@@ -0,0 +1,18 @@
(ns hooks.metabase.driver.mongo-test
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.common]))
(defn with-describe-table-for-sample
"Forward bindings for results of functions used in mongo's describe-table implementation."
[{{[_ _ & body] :children} :node}]
(let [node* (hooks/list-node
(list*
(hooks/token-node 'let)
(hooks/vector-node
[(hooks/token-node 'dbfields) (hooks/token-node '(delay nil))
(hooks/token-node 'ftree) (hooks/token-node '(delay nil))
(hooks/token-node 'nested-fields) (hooks/token-node '(delay nil))])
body))]
;; Avoid warnings when not all from the dbfields, ftree and nested-fields are used.
{:node (hooks.common/update-ignored-linters node* conj :unused-binding)}))

View File

@@ -3,7 +3,13 @@
[clj-kondo.hooks-api :as hooks]
[hooks.common :as common]))
;;; TODO -- move this into
(defn lint-defsetting-namespace [node context]
(when-not (re-matches #"^metabase(?:-enterprise)?\.[^\.]+\.settings$" (name (:ns context)))
(hooks/reg-finding! (assoc (meta node)
:message "All defsettings should live in metabase[-enterprise].<module>.settings namespaces"
:type :metabase/defsetting-namespace))))
;;; TODO -- move this into a Kondo config file in `.clj-kondo/config/`
(def ^:private ignored-implicit-export?
'#{active-users-count
admin-email
@@ -22,7 +28,6 @@
database-enable-actions
deprecation-notice-version
dismissed-custom-dashboard-toast
dismissed-onboarding-sidebar-link
email-configured?
email-from-address
email-from-name
@@ -134,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
@@ -170,8 +176,17 @@
version-info
version-info-last-checked})
(defn- defsetting-lint [node setting-name docstring options-list]
(let [anon-binding (common/with-macro-meta (hooks/token-node '_) node)
(defn- lint-defsetting-export [node]
(let [[_defsetting setting-name _docstring & options] (:children node)]
(when (nil? (second (drop-while (comp not #{[:k :export?]} first) options)))
(when-not (contains? ignored-implicit-export? (:value setting-name))
(hooks/reg-finding! (assoc (meta node)
:message "Setting definition must provide an explicit value for :export? indicating whether the setting should be exported or not with serialization."
:type :metabase/defsetting-must-specify-export))))))
(defn- defsetting-replacement-node [node]
(let [[_defsetting setting-name docstring & options-list] (:children node)
anon-binding (common/with-macro-meta (hooks/token-node '_) node)
;; (defn my-setting [] ...)
getter-node (-> (list
(hooks/token-node 'defn)
@@ -191,26 +206,19 @@
hooks/list-node
(with-meta (meta node))
common/add-lsp-ignore-unused-public-var-metadata)]
(when (nil? (second (drop-while (comp not #{[:k :export?]} first) options-list)))
(when-not (contains? ignored-implicit-export? (:value setting-name))
(hooks/reg-finding! (assoc (meta node)
:message "Setting definition must provide an explicit value for :export? indicating whether the setting should be exported or not with serialization."
:type :metabase/defsetting-must-specify-export))))
{:node (-> (hooks/list-node
(list
(hooks/token-node 'let)
;; include description and the options map so they can get validated as well.
(hooks/vector-node
[anon-binding docstring
anon-binding (hooks/map-node options-list)])
(hooks/reg-keyword! (-> (hooks/keyword-node (keyword (hooks/sexpr setting-name)))
(with-meta (meta setting-name)))
'metabase.settings.models.setting/defsetting)
getter-node
setter-node))
(with-meta (meta node)))}))
(-> (hooks/list-node
(list
(hooks/token-node 'let)
;; include description and the options map so they can get validated as well.
(hooks/vector-node
[anon-binding docstring
anon-binding (hooks/map-node options-list)])
(hooks/reg-keyword! (-> (hooks/keyword-node (keyword (hooks/sexpr setting-name)))
(with-meta (meta setting-name)))
'metabase.settings.models.setting/defsetting)
getter-node
setter-node))
(with-meta (meta node)))))
(defn defsetting
"Rewrite a [[metabase.models.defsetting]] form like
@@ -226,10 +234,21 @@
for linting purposes."
[{:keys [node], :as context}]
(let [[setting-name docstring & options] (rest (:children node))]
(merge
context
(defsetting-lint node setting-name docstring options))))
(lint-defsetting-namespace node context)
(lint-defsetting-export node)
(update context :node defsetting-replacement-node))
(defn define-multi-setting-replacement-node [node]
(let [[defsetting setting-name docstring thunk & options] (:children node)]
(-> (hooks/list-node
(list*
defsetting
setting-name
docstring
(hooks/token-node :multi-thunk) thunk
options))
(with-meta (meta node))
defsetting-replacement-node)))
(defn define-multi-setting
"Rewrite a [[metabase.models.define-multi-setting]] form like
@@ -245,10 +264,7 @@
for linting purposes."
[{:keys [node], :as context}]
(let [[setting-name docstring thunk & options] (rest (:children node))]
(merge
context
(defsetting-lint node setting-name docstring (concat options [(hooks/token-node :multi-thunk) thunk])))))
(update context :node define-multi-setting-replacement-node))
(defn define-multi-setting-impl
[context]
@@ -289,6 +305,6 @@
:type :integer
:default 0
:getter (fn []
(if-not ((requiring-resolve 'metabase.db/db-is-set-up?))
(if-not ((requiring-resolve 'metabase.app-db.core/db-is-set-up?))
0
(cached-active-users-count)))))))

View File

@@ -0,0 +1,16 @@
(ns hooks.metabase.util.timing
"Custom CLJ Kondo hooks for timing-related linting rules."
(:require [clj-kondo.hooks-api :as api]))
(defn discourage-millis-duration
"Discourage slow and unreliable duration calculations using System/currentTimeMillis "
[{:keys [node]}]
(let [sexpr (api/sexpr node)]
(when (and (list? sexpr) (= (first sexpr) '-) (>= (count sexpr) 2))
(let [first-arg (second sexpr)]
(when (= first-arg (list 'System/currentTimeMillis))
(api/reg-finding!
(assoc (meta node)
:message "Avoid System/currentTimeMillis for calculating durations. Use u/start-timer and u/since-ms for more reliability."
:type :metabase/discourage-millis-duration
:level :warning)))))))

View File

@@ -20,15 +20,17 @@
(lint-ns form (assoc-in config [:linters :metabase/modules :level] :warning)))
(deftest ^:parallel module-checker-allowed-modules-test
(is (=? [{:message "Module task should not be used in the api module. [:metabase/modules api :uses]"
:type :metabase/modules}]
(lint-modules
'(ns metabase.api.search
(:require
[metabase.request.core :as request]
[metabase.task :as task]))
'{:metabase/modules {api {:uses #{request}}
request {:api #{metabase.request.core}}}}))))
(are [task-namespace] (=? [{:message "Module task should not be used in the api module. [:metabase/modules api :uses]"
:type :metabase/modules}]
(lint-modules
'(ns metabase.api.search
(:require
[metabase.request.core :as request]
[task-namespace :as task]))
'{:metabase/modules {api {:uses #{request}}
request {:api #{metabase.request.core}}}}))
metabase.task
metabase.task.core))
(deftest ^:parallel module-checker-api-namespaces-test
(is (=? [{:message "Namespace metabase.search.config is not an allowed external API namespace for the search module. [:metabase/modules search :api]"

View File

@@ -0,0 +1,34 @@
(ns hooks.metabase.settings.models.setting-test
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.test :refer :all]
[hooks.metabase.settings.models.setting]))
#_{:clj-kondo/ignore [:metabase/validate-deftest]}
(deftest ^:parallel defsetting-test
(let [node (-> '(defsetting active-users-count
(deferred-tru "Cached number of active users. Refreshed every 5 minutes.")
:visibility :admin
:type :integer
:default 0
:getter (fn []
(if-not ((requiring-resolve 'metabase.app-db.core/db-is-set-up?))
0
(cached-active-users-count))))
pr-str
hooks/parse-string)]
(is (= '(let [_ (deferred-tru "Cached number of active users. Refreshed every 5 minutes.")
_ {:default 0
:type :integer
:getter (fn []
(if-not ((requiring-resolve 'metabase.app-db.core/db-is-set-up?))
0
(cached-active-users-count)))
:visibility :admin}]
:active-users-count
(defn active-users-count "Docstring." [])
(defn active-users-count! "Docstring." [_value-or-nil]))
(-> {:node node, :ns 'hooks.metabase.settings.models.setting-test}
hooks.metabase.settings.models.setting/defsetting
:node
hooks/sexpr)))))

View File

@@ -102,26 +102,28 @@
metabase.actions.test-util/with-actions-test-data-tables [[:block 1]]
metabase.actions.test-util/with-empty-db [[:inner 0]]
metabase.actions.test-util/with-temp-test-data [[:inner 0]]
metabase.api.card-test/with-cards-in-readable-collection [[:block 1]]
metabase.api.card-test/with-cards-in-writeable-collection [[:block 1]]
metabase.api.card-test/with-ordered-items [[:inner 0]]
metabase.api.card-test/with-temp-native-card! [[:block 1]]
metabase.api.card-test/with-temp-native-card-with-params! [[:block 1]]
metabase.api.collection-test/with-collection-hierarchy [[:block 1]]
metabase.api.collection-test/with-french-user-and-personal-collection [[:block 2]]
metabase.api.collection-test/with-some-children-of-collection [[:block 1]]
metabase.api.common/check [[:default]]
metabase.api.common/define-routes [[:block 0]]
metabase.api.common/let-404 [[:block 1]]
metabase.app-db.core/with-application-db [[:inner 0]]
metabase.app-db.liquibase/with-liquibase [[:block 1]]
metabase.app-db.liquibase/with-scope-locked [[:block 1]]
metabase.app-db.schema-migrations-test.impl/test-migrations [[:block 2]]
metabase.cmd.copy/step [[:block 1]]
metabase.cmd.copy/with-connection-rollback-only [[:block 1]]
metabase.cmd.copy/with-disabled-db-constraints [[:block 2]]
metabase.collections.api-test/with-collection-hierarchy [[:block 1]]
metabase.collections.api-test/with-french-user-and-personal-collection [[:block 2]]
metabase.collections.api-test/with-some-children-of-collection [[:block 1]]
metabase.collections.models.collection-test/with-collection-hierarchy [[:block 1]]
metabase.collections.models.collection-test/with-current-user-perms-for-collections [[:block 1]]
metabase.collections.models.collection-test/with-personal-and-impersonal-collections [[:block 1]]
metabase.config/build-type-case [[:block 0]]
metabase.dashboard-subscription-test/with-link-card-fixture-for-dashboard [[:block 2]]
metabase.db.liquibase/with-liquibase [[:block 1]]
metabase.db.liquibase/with-scope-locked [[:block 1]]
metabase.db.schema-migrations-test.impl/test-migrations [[:block 2]]
metabase.db/with-application-db [[:inner 0]]
metabase.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]]
@@ -150,20 +152,19 @@
metabase.lib.join/with-join-alias [[:default]]
metabase.lib.join/with-join-conditions [[:default]]
metabase.lib.test-util.macros/$ids [[:inner 0]]
metabase.lib.test-util.macros/mbql-5-query [[:inner 0]]
metabase.lib.test-util.macros/mbql-query [[:inner 0]]
metabase.lib.util.match/match [[:inner 0]]
metabase.lib.util.match/match-one [[:inner 0]]
metabase.lib.util.match/match-lite [[:inner 0]]
metabase.lib.util.match/match-lite-recursive [[:inner 0]]
metabase.lib.util.match/replace [[:inner 0]]
metabase.lib.util.match/replace-in [[:inner 0]]
metabase.models.collection-test/with-collection-hierarchy [[:block 1]]
metabase.models.collection-test/with-current-user-perms-for-collections [[:block 1]]
metabase.models.collection-test/with-personal-and-impersonal-collections [[:block 1]]
metabase.models.dashboard-test/with-dash-in-collection [[:inner 0]]
metabase.models.interface/define-batched-hydration-method [[:inner 0]]
metabase.models.interface/define-simple-hydration-method [[:inner 0]]
metabase.models.params.chain-filter-test/with-clean-field-values-for-field [[:block 1]]
metabase.models.params.chain-filter-test/with-fk-field-to-field-remapping [[:block 0]]
metabase.models.params.chain-filter-test/with-human-readable-values-remapping [[:block 0]]
metabase.parameters.chain-filter-test/with-clean-field-values-for-field [[:block 1]]
metabase.parameters.chain-filter-test/with-fk-field-to-field-remapping [[:block 0]]
metabase.parameters.chain-filter-test/with-human-readable-values-remapping [[:block 0]]
metabase.permissions.core/allow-changing-all-users-group-members [[:block 0]]
metabase.permissions.core/disable-perms-cache [[:block 0]]
metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing [[:block 3]]
@@ -172,8 +173,14 @@
metabase.public-sharing.api-test/with-temp-public-dashboard [[:block 1]]
metabase.public-sharing.api-test/with-temp-public-dashboard-and-card [[:block 1]]
metabase.pulse.api.alert-test/with-alert-in-collection [[:block 1]]
metabase.pulse.dashboard-subscription-test/with-link-card-fixture-for-dashboard [[:block 2]]
metabase.pulse.models.pulse-test/with-dashboard-subscription-in-collection [[:block 1]]
metabase.pulse.models.pulse-test/with-pulse-in-collection [[:inner 0]]
metabase.queries.api.card-test/with-cards-in-readable-collection [[:block 1]]
metabase.queries.api.card-test/with-cards-in-writeable-collection [[:block 1]]
metabase.queries.api.card-test/with-ordered-items [[:inner 0]]
metabase.queries.api.card-test/with-temp-native-card! [[:block 1]]
metabase.queries.api.card-test/with-temp-native-card-with-params! [[:block 1]]
metabase.query-processor-test.pipeline-queries-test/pmbql-query [[:block 1]]
metabase.query-processor-test.pipeline-queries-test/run-pmbql-query [[:block 1]]
metabase.query-processor.debug/debug> [[:block 0]]
@@ -190,7 +197,7 @@
metabase.request.core/with-limit-and-offset [[:inner 0]]
metabase.request.session/as-admin [[:block 0]]
metabase.request.session/with-current-user [[:inner 0]]
metabase.sample-data-test/with-temp-sample-database-db [[:block 1]]
metabase.sample-data.impl-test/with-temp-sample-database-db [[:block 1]]
metabase.search.api-test/do-test-users [[:block 1]]
metabase.server.middleware.session/as-admin [[:block 0]]
metabase.server.middleware.session/with-current-user [[:inner 0]]
@@ -215,7 +222,8 @@
metabase.sync.util/with-start-and-finish-logging* [[:default]]
metabase.sync.util/with-sync-events [[:default]]
metabase.task-history.models.task-history/with-task-history [[:block 1]]
metabase.task/rerun-on-error [[:block 1]]
metabase.task.core/rerun-on-error [[:block 1]]
metabase.task.impl/rerun-on-error [[:block 1]]
metabase.test.data.datasets/test-driver [[:inner 0]]
metabase.test.data.datasets/test-drivers [[:inner 0]]
metabase.test.data.one-off-dbs/with-blank-db [[:block 0]]
@@ -227,7 +235,7 @@
metabase.test.data/native-query [[:block 0]]
metabase.test.data/query [[:block 1]]
metabase.test.data/run-mbql-query [[:inner 0]]
metabase.test.data/with-empty-h2-app-db [[:block 0]]
metabase.test.data/with-empty-h2-app-db! [[:block 0]]
metabase.test.data/with-temp-copy-of-db [[:block 0]]
metabase.test.util.public-settings/with-additional-premium-features [[:block 1]]
metabase.test.util.public-settings/with-premium-features [[:block 1]]
@@ -262,7 +270,7 @@
metabase.test/with-current-user [[:inner 0]]
metabase.test/with-driver [[:block 1]]
metabase.test/with-empty-db [[:inner 0]]
metabase.test/with-empty-h2-app-db [[:block 0]]
metabase.test/with-empty-h2-app-db! [[:block 0]]
metabase.test/with-metadata-provider [[:inner 0]]
metabase.test/with-premium-features [[:block 1]]
metabase.test/with-temp [[:inner 0]]
@@ -274,9 +282,10 @@
metabase.test/with-user-in-groups [[:inner 0]]
metabase.timeseries-query-processor-test.util/test-timeseries-drivers [[:block 0]]
metabase.timeseries-query-processor-test/run-mbql-query [[:inner 0]]
metabase.upload-test/with-upload-table! [[:inner 0]]
metabase.upload.impl-test/with-upload-table! [[:inner 0]]
metabase.upload.types/with-currency [[:default]]
metabase.upload.types/with-parens [[:default]]
metabase.util/for-map [[:block 1]]
metabase.util.async/cancelable-thread [[:block 0]]
metabase.util.date-2/with-time-zone-same-instant [[:default]]
metabase.util.encryption-test/with-secret-key [[:block 1]]

View File

@@ -1,12 +1,14 @@
/* eslint-disable import/no-commonjs */
/* eslint-disable no-undef */
const path = require("path");
// `postcss-modules` lints css modules class names, but it currently crashes
// eslint on vscode. If you use webstorm or want to run the lint for the cli, you
// can use this flag to enable it. This is set to true in CI
const shouldLintCssModules =
process.env.LINT_CSS_MODULES === "true" || process.env.CI;
const plugins = ["react", "no-only-tests","ttag"];
const plugins = ["react", "no-only-tests", "ttag", "i18next"];
if (shouldLintCssModules) {
plugins.push("postcss-modules");
}
@@ -46,6 +48,7 @@ module.exports = {
],
curly: [1, "all"],
eqeqeq: [1, "smart"],
"import/no-duplicates": ["warn", { considerQueryString: true }],
"import/no-default-export": 2,
"import/no-named-as-default": 0,
"import/no-commonjs": 1,
@@ -118,7 +121,7 @@ module.exports = {
],
},
],
complexity: ["error", { max: 54 }],
complexity: ["error", { max: 55 }],
...(shouldLintCssModules
? {
"postcss-modules/no-undef-class": "error",
@@ -149,11 +152,13 @@ module.exports = {
"plugin:import/typescript",
"plugin:depend/recommended",
"plugin:storybook/recommended",
"plugin:i18next/recommended",
],
settings: {
"import/internal-regex": "^metabase/|^metabase-lib/",
"import/resolver": {
webpack: {
config: path.resolve(__dirname, "./rspack.main.config.js"),
typescript: true,
},
},
@@ -195,12 +200,17 @@ module.exports = {
"*.unit.spec.*",
"frontend/src/metabase/admin/**/*",
"frontend/src/metabase/setup/**/*",
"enterprise/frontend/src/metabase-enterprise/whitelabel/**/*",
"frontend/lint/**/*",
"*.stories.*",
"stories-data.*",
"e2e/**/*",
"**/tests/*",
"release/**/*",
"rspack.config.js",
"rspack.main.config.js",
"rspack.embedding-sdk-package.config.js",
"rspack.embedding-sdk-bundle.config.js",
],
rules: {
"no-color-literals": "off",
@@ -208,6 +218,21 @@ module.exports = {
"no-literal-metabase-strings": "off",
},
},
{
files: [
"*.unit.spec.*",
"frontend/lint/**/*",
"*.stories.*",
"stories-data.*",
"e2e/**/*",
"**/tests/*",
"release/**/*",
"rspack.main.config.js",
],
rules: {
"i18next/no-literal-string": "off",
},
},
{
extends: ["plugin:@typescript-eslint/recommended"],
files: ["*.ts", "*.tsx"],
@@ -258,9 +283,9 @@ module.exports = {
"jest/expect-expect": [
"error",
{
"assertFunctionNames": ["expect*", "assert*"],
"additionalTestBlockFunctions": []
}
assertFunctionNames: ["expect*", "assert*"],
additionalTestBlockFunctions: [],
},
],
},
},
@@ -291,10 +316,16 @@ module.exports = {
selector: "Literal[value=/mb-base-color-/]",
message:
"You may not use base colors in the application, use semantic colors instead. (see colors.module.css)",
}
},
],
},
},
{
files: ["frontend/src/metabase/query_builder/**/*"],
rules: {
"import/no-cycle": "error",
},
},
{
files: ["docs/**/snippets/**/*.{ts,tsx,js,jsx}"],
rules: {
@@ -307,5 +338,11 @@ module.exports = {
"no-color-literals": "off",
},
},
{
files: ["frontend/build/**/*.js"],
rules: {
"import/no-commonjs": "off",
},
},
],
};

45
.github/CODEOWNERS vendored
View File

@@ -5,7 +5,7 @@ enterprise/frontend/src/embedding-sdk @metabase/embedding
frontend/src/metabase/embedding-sdk @metabase/embedding
frontend/src/metabase/public/containers/PublicOrEmbeddedQuestion @metabase/embedding
frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard @metabase/embedding
frontend/src/metabase/ui @metabase/core-frontend-admin-webapp
frontend/src/metabase/ui @metabase/core-frontend-ux-west
# snowplow/* @metabase/data
src/metabase/analytics/prometheus.clj @metabase/cloud-ops
.github @metabase/devexp
@@ -13,12 +13,15 @@ src/metabase/analytics/prometheus.clj @metabase/cloud-ops
deps.edn @metabase/backend-developers
docs @metabase/tech-writers
docs/developers-guide # exclude from tech-writer ownership
#
# Backend modules <=> teams that own them
#
# modules/drivers @metabase/drivers
src/metabase/driver/sql_jdbc/actions.clj @metabase/core-ux-east
test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-ux-east
# enterprise/backend/src/metabase_enterprise/advanced_config @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/advanced_config @metabase/core-backend-admin-webapp
@@ -50,8 +53,8 @@ docs @metabase/tech-writers
# enterprise/backend/src/metabase_enterprise/core @metabase/devexp
# enterprise/backend/test/metabase_enterprise/core @metabase/devexp
# enterprise/backend/src/metabase_enterprise/dashboard_subscription_filters @metabase/core-workflows
# enterprise/backend/test/metabase_enterprise/dashboard_subscription_filters @metabase/core-workflows
# enterprise/backend/src/metabase_enterprise/dashboard_subscription_filters @metabase/core-ux-east
# enterprise/backend/test/metabase_enterprise/dashboard_subscription_filters @metabase/core-ux-east
# enterprise/backend/src/metabase_enterprise/enhancements @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/enhancements @metabase/core-backend-admin-webapp
@@ -68,11 +71,11 @@ docs @metabase/tech-writers
# enterprise/backend/src/metabase_enterprise/scim @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/scim @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/search @metabase/core-workflows
# enterprise/backend/test/metabase_enterprise/search @metabase/core-workflows
# enterprise/backend/src/metabase_enterprise/search ...
# enterprise/backend/test/metabase_enterprise/search ...
# enterprise/backend/src/metabase_enterprise/serialization @metabase/core-workflows
# enterprise/backend/test/metabase_enterprise/serialization @metabase/core-workflows
# enterprise/backend/src/metabase_enterprise/serialization @metabase/core-ux-east
# enterprise/backend/test/metabase_enterprise/serialization @metabase/core-ux-east
# enterprise/backend/src/metabase_enterprise/snippet_collections @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/snippet_collections @metabase/core-backend-admin-webapp
@@ -92,8 +95,8 @@ docs @metabase/tech-writers
# enterprise/backend/src/metabase_enterprise/upload_management @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/upload_management @metabase/core-backend-admin-webapp
# src/metabase/actions @metabase/core-backend-admin-webapp
# test/metabase/actions @metabase/core-backend-admin-webapp
src/metabase/actions @metabase/core-ux-east
test/metabase/actions @metabase/core-ux-east
# src/metabase/activity_feed @metabase/core-backend-admin-webapp
# test/metabase/activity_feed @metabase/core-backend-admin-webapp
@@ -119,11 +122,11 @@ docs @metabase/tech-writers
# src/metabase/cmd @metabase/devexp
# test/metabase/cmd @metabase/devexp
# src/metabase/channel @metabase/core-workflows
# test/metabase/channel @metabase/core-workflows
# src/metabase/channel @metabase/core-ux-east
# test/metabase/channel @metabase/core-ux-east
# src/metabase/cloud_migration @metabase/core-workflows
# test/metabase/cloud_migration @metabase/core-workflows
# src/metabase/cloud_migration ...
# test/metabase/cloud_migration ...
# src/metabase/cmd @metabase/devexp
# test/metabase/cmd @metabase/devexp
@@ -155,8 +158,8 @@ docs @metabase/tech-writers
# src/metabase/indexed_entities @metabase/core-backend-querying
# test/metabase/indexed_entities @metabase/core-backend-querying
# src/metabase/integrations @metabase/core-workflows
# test/metabase/integrations @metabase/core-workflows
# src/metabase/integrations ...
# test/metabase/integrations ...
# src/metabase/legacy_mbql @metabase/core-backend-querying
# test/metabase/legacy_mbql @metabase/core-backend-querying
@@ -179,8 +182,8 @@ docs @metabase/tech-writers
# src/metabase/moderation @metabase/core-backend-admin-webapp
# test/metabase/moderation @metabase/core-backend-admin-webapp
# src/metabase/notification @metabase/core-workflows
# test/metabase/notification @metabase/core-workflows
# src/metabase/notification @metabase/core-ux-east
# test/metabase/notification @metabase/core-ux-east
# src/metabase/permissions @metabase/core-backend-admin-webapp
# test/metabase/permissions @metabase/core-backend-admin-webapp
@@ -197,8 +200,8 @@ docs @metabase/tech-writers
# src/metabase/public_sharing @metabase/core-backend-admin-webapp
# test/metabase/public_sharing @metabase/core-backend-admin-webapp
# src/metabase/pulse @metabase/core-workflows
# test/metabase/pulse @metabase/core-workflows
# src/metabase/pulse @metabase/core-ux-east
# test/metabase/pulse @metabase/core-ux-east
# src/metabase/query_analysis @metabase/core-backend-querying
# test/metabase/query_analysis @metabase/core-backend-querying
@@ -215,8 +218,8 @@ docs @metabase/tech-writers
# src/metabase/sample_data @metabase/core-backend-admin-webapp
# test/metabase/sample_data @metabase/core-backend-admin-webapp
# src/metabase/search @metabase/core-workflows
# test/metabase/search @metabase/core-workflows
# src/metabase/search ...
# test/metabase/search ...
# src/metabase/segments @metabase/core-backend-querying
# test/metabase/segments @metabase/core-backend-querying

View File

@@ -63,7 +63,8 @@ body:
attributes:
label: Information about your Metabase installation
description: |
Copy and paste the JSON from `Admin -> Troubleshooting`.
For versions >= 56, copy and paste the Diagnostic info from `Admin -> Tools -> Help`.
For versions < 56, copy and paste the Diagnostic info from `Admin -> Troubleshooting`.
_This will be automatically formatted into code, so no need for backticks._
placeholder: |
{"browser-info": {

View File

@@ -1,4 +1,5 @@
name: Wait for localhost port to be ready
name: await-port
description: Wait for localhost port to be ready
inputs:
port:

View File

@@ -23,7 +23,7 @@ runs:
GITHUB_TOKEN: ${{ inputs.github-token }}
COMMIT: ${{ inputs.backport-commit }}
shell: bash
run: |
run: | # bash
git config --global user.email "metabase-bot@metabase.com"
git config --global user.name "Metabase bot"
@@ -35,6 +35,8 @@ runs:
git checkout -b ${BACKPORT_BRANCH}
git cherry-pick ${COMMIT} || true
CONFLICT_LIST=$(git ls-files -u)
CONFLICTS=$(git ls-files -u | wc -l)
if [ "$CONFLICTS" -gt 0 ]; then
git cherry-pick --abort
@@ -46,7 +48,7 @@ runs:
echo "git reset HEAD~1" > ./backport.sh
echo "rm ./backport.sh" >> ./backport.sh
echo "git cherry-pick ${COMMIT}" >> ./backport.sh
echo "echo 'Resolve conflicts and force push this branch'" >> ./backport.sh
echo "echo 'Resolve conflicts and force push this branch.\n\nTo backport translations run: bin/i18n/merge-translations <release-branch>'" >> ./backport.sh
chmod +x ./backport.sh
git add ./backport.sh
git commit -m "Add backport resolution script"
@@ -55,7 +57,14 @@ runs:
#${ORIGINAL_PULL_REQUEST_NUMBER}
> [!IMPORTANT]
> Manual conflict resolution is required.
Checkout the branch and run \`./backport.sh\` script. Force push your changes after cherry-picking.
> Checkout the branch and run \`./backport.sh\` script. Force push your changes after cherry-picking. Check the box below when done.
Conflicts:
\`\`\`shell
${CONFLICT_LIST}
\`\`\`
- [ ] Conflicts resolved
END
)
else

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

@@ -5,6 +5,14 @@ inputs:
name:
description: The name of the artifact to fetch
required: true
output-name:
description: Optional custom name for the output jar file (defaults to metabase.jar)
required: false
default: "metabase.jar"
extract-path:
description: Directory path where the jar should be extracted (defaults to current directory)
required: false
default: "."
runs:
using: "composite"
@@ -25,7 +33,7 @@ runs:
});
if (!artifacts.data?.artifacts?.[0]?.id) {
throw new Error(`No artifacts found for ${{ inputs.commit }}`);
throw new Error(`No artifacts found for: ${{ inputs.name }}`);
}
const artifact_id = artifacts.data.artifacts[0].id;
@@ -42,22 +50,58 @@ runs:
- name: unzip uberjar artifact
shell: bash
run: unzip mb.zip
- name: Move the Uberjar
- name: Process the Uberjar
shell: bash
run: | # bash
OUTPUT_NAME="${{ inputs.output-name }}"
EXTRACT_PATH="${{ inputs.extract-path }}"
# Function to determine the final JAR path
get_jar_path() {
if [ "$EXTRACT_PATH" == "." ]; then
echo "$OUTPUT_NAME"
else
echo "$EXTRACT_PATH/$OUTPUT_NAME"
fi
}
# Create target directory if it doesn't exist
if [ "$EXTRACT_PATH" != "." ]; then
mkdir -p "$EXTRACT_PATH"
fi
# Find the source jar file
if [ -e "metabase.jar" ]; then
echo "metabase.jar is already in the right place"
SOURCE_JAR="metabase.jar"
elif [ -e "target/uberjar/metabase.jar" ]; then
echo "moving metabase.jar to current directory"
mv target/uberjar/metabase.jar metabase.jar
SOURCE_JAR="target/uberjar/metabase.jar"
else
echo "Could not find the metabase.jar file"
exit 1
fi
# Get the target path
TARGET_PATH=$(get_jar_path)
# Move the jar if source and target differ
if [ "$SOURCE_JAR" == "$TARGET_PATH" ]; then
echo "Jar is already at the correct location: $TARGET_PATH"
else
echo "Moving $SOURCE_JAR to $TARGET_PATH"
mv "$SOURCE_JAR" "$TARGET_PATH"
fi
# Export the path for subsequent steps
echo "JAR_PATH=$TARGET_PATH" >> $GITHUB_ENV
- name: Verify that this is a valid JAR file
shell: bash
run: file --mime-type ./metabase.jar
run: |
echo "Verifying JAR at: $JAR_PATH"
file --mime-type "$JAR_PATH"
- name: Reveal its version.properties
shell: bash
run: jar xf metabase.jar version.properties && cat version.properties
run: |
echo "Extracting version.properties from: $JAR_PATH"
jar xf "$JAR_PATH" version.properties && cat version.properties

View File

@@ -0,0 +1,74 @@
name: Get Docker Info
description: Determines Docker repository and tag based on branch and edition
inputs:
branch:
description: Branch name (defaults to current branch)
required: false
default: ${{ github.head_ref || github.ref_name }}
edition:
description: Edition (ee or oss)
required: false
default: ee
owner:
description: Repository owner (defaults to current repo owner)
required: false
default: ${{ github.repository_owner }}
outputs:
repo:
description: Docker repository name
value: ${{ steps.docker-info.outputs.repo }}
tag:
description: Docker tag
value: ${{ steps.docker-info.outputs.tag }}
full_image:
description: Full Docker image name (repo:tag)
value: ${{ steps.docker-info.outputs.full_image }}
editions:
description: JSON array of editions to build
value: ${{ steps.docker-info.outputs.editions }}
runs:
using: "composite"
steps:
- name: Determine Docker info
id: docker-info
uses: actions/github-script@v7
with:
script: | # js
const branch = '${{ inputs.branch }}';
const edition = '${{ inputs.edition }}';
const owner = '${{ inputs.owner }}';
console.log(`Determining Docker info for branch: ${branch}, edition: ${edition}`);
let repo, tag, editions;
if (branch === 'master') {
// Master builds both editions with specific repos
editions = ['ee', 'oss'];
tag = 'latest';
if (edition === 'ee') {
repo = `${owner}/metabase-enterprise-head`;
} else {
repo = `${owner}/metabase-head`;
}
} else {
// All other branches only build EE to metabase-dev
editions = ['ee'];
tag = branch.replaceAll('/', '-'); // slashes make docker sad
repo = `${owner}/metabase-dev`;
}
const fullImage = `${repo}:${tag}`;
// Set outputs
core.setOutput('repo', repo);
core.setOutput('tag', tag);
core.setOutput('full_image', fullImage);
core.setOutput('editions', JSON.stringify(editions));
console.log(`Docker image: ${fullImage}`);
console.log(`Editions: ${JSON.stringify(editions)}`);

View File

@@ -1,6 +1,12 @@
name: Prepare cypress environment
description: Cypress preparation steps
inputs:
working-directory:
description: "Optional working directory for yarn commands"
required: false
default: "."
outputs:
chrome-path:
description: Path to the custom Chrome executable
@@ -33,3 +39,4 @@ runs:
yarn cypress cache list
yarn cypress verify
shell: bash
working-directory: ${{ inputs.working-directory }}

View File

@@ -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,4 +1,5 @@
name: Test database driver
description: Test database driver
inputs:
junit-name:
required: true
@@ -38,3 +39,10 @@ runs:
list-suites: failed
list-tests: failed
fail-on-error: false
- name: Upload Logs on Failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ github.job }}
path: logs/test-log.json
retention-days: 1

View File

@@ -11,4 +11,7 @@ runs:
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
shell: bash
run: bash ${{ github.action_path }}/upgrade-deps.sh
run: |
git config --global user.email "github-automation@metabase.com"
git config --global user.name "Metabase Automation"
bash ${{ github.action_path }}/upgrade-deps.sh

View File

@@ -59,6 +59,11 @@ for upgrade in $UPGRADES; do
# Commit the dependency update, and link to the diff
git add deps.edn modules
# Use an email and name that will pass the CLA check:
git config --global user.email "github-automation@metabase.com"
git config --global user.name "Metabase Automation"
git commit -m ${TITLE} -m ${BODY} --no-verify
git push -u origin $BRANCH_NAME

View File

@@ -48,7 +48,7 @@ runs:
aws s3 cp ${OUTPUT_FILE}.zip s3://$BUCKET/$DATE/$GITHUB_RUN_ID/$GITHUB_RUN_ATTEMPT/
- name: Upload results to Trunk
if: ${{ always() }}
if: ${{ always() && !(github.event_name == 'pull_request' && github.event.pull_request.draft == true) }}
uses: trunk-io/analytics-uploader@main
with:
junit-paths: ${{ inputs.input-path }}

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/db/custom_migrations.clj':
- team:core-workflows
options:
ignore_draft: true
ignored_keywords:
- DO NOT REVIEW
- WIP
enable_group_assignment: false

52
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,52 @@
# Metabase Developer Assistant Instructions
## Frontend Development
### Repository Structure
```
frontend/src/
├── metabase/ # Main application components and pages
├── metabase-lib/ # Query building and data modeling utilities
├── metabase-types/ # TypeScript type definitions
└── metabase/ui/ # Design system components
e2e/ # Cypress end-to-end tests
frontend/test/ # Jest unit tests
```
### Technology Stack
- **Framework**: React 18 with TypeScript
- **State**: Redux Toolkit
- **Styling**: CSS Modules (preferred) > Emotion styled-components
- **UI**: `metabase/ui` components built with Mantine v8
- **Build**: Rspack (primary), Webpack (legacy)
- **Testing**: Jest + React Testing Library, Cypress
### Coding Standards
#### Component Preferences
- Prefer `metabase/ui`components over `metabase/common/components`
- Use `.tsx` for components, `.ts` for utilities
#### Styling
ALWAYS prefer Mantine style props,then CSS modules. DO NOT suggest styled components, they are deprecated.
#### TypeScript Migration
When heavily editing `.js`/`.jsx` files, create a separate PR to convert to TypeScript first, then implement changes.
#### Enterprise Features
Enterprise functionality MUST use the plugin system. It is very important to not expose enterprise code in the OSS version.
#### Testing Requirements
All PRs should include tests. Prefer Unit tests over E2E tests.
#### Localization
All user-facing strings MUST be localized using the ttag library. Localized strings should be complete phrases, do not concatenate a few separately localized strings. You should add context to strings where the meaning of the string might not be obvious in isolation: e.g. "Home" might have different words in some languages depending on whether you're talking about a dwelling or the landing page for a website.

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"
@@ -27,19 +29,28 @@ frontend_sources: &frontend_sources
- ".eslintrc.js"
- "postcss.config.js"
- "rspack.config.js"
- "webpack.config.js"
- "webpack.embedding-sdk.config.js"
- "webpack.static-viz.config.js"
- "rspack.main.config.js"
- "rspack.embedding-sdk-package.config.js"
- "rspack.embedding-sdk-bundle.config.js"
- "rspack.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
- "frontend/test/**"
- "frontend/**/tests/**"
- "frontend/**/*.unit.*"
- "enterprise/frontend/**/*.unit.*"
- ".github/**/*.unit.spec.*"
- "jest.config.js"
- "jest.tz.unit.conf.json"
@@ -104,17 +115,29 @@ 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
- *frontend_embedding_sdk_ci
- *frontend_sources
- *backend_sources
- "e2e/embedding-sdk-host-apps/**"
- "e2e/runner/embedding-sdk/**"
- "e2e/test-host-app/**/*.cy.*.{js,ts}"
e2e_all:
- *default
- *e2e_ci
@@ -127,10 +150,13 @@ snowplow:
- "snowplow/**"
documentation:
- ".typedoc/**"
- "docs/**"
- "**/*.md"
embedding_documentation:
- ".typedoc/**"
- "docs/embedding/**"
yaml:
- "**/*.yml"
- "**/*.yaml"

View File

@@ -49,6 +49,55 @@ function httpsRequest(options, data = null) {
});
}
// Makes an HTTPS request with exponential backoff retry logic
async function httpsRequestWithBackoff(options, data = null, backoffOptions = {}) {
// Set default backoff options:
const {
maxRetries = 8,
totalDurationSeconds = 60
} = backoffOptions;
let retries = 0;
let delay = 500; // Start with a .5 second delay
// Calculate a reasonable initial delay based on total duration and max retries
// This helps distribute the retry attempts across the total allowed duration
const totalDurationMs = totalDurationSeconds * 1000;
// Track the start time
const startTime = Date.now();
// Ensure data is stringified if it's an object
const requestData = data ? (typeof data === 'string' ? data : JSON.stringify(data)) : null;
while (true) {
try {
const response = await httpsRequest(options, requestData);
return response; // Success: Return the data
} catch (error) {
retries++;
const elapsedMs = Date.now() - startTime;
const timeRemaining = totalDurationMs - elapsedMs;
// Stop retrying if we've hit max retries or exceeded the total duration
if (retries >= maxRetries || timeRemaining <= 0) {
console.error(`Failed after ${retries} retries (${Math.round(elapsedMs/1000)}s elapsed):`);
throw error;
}
// Calculate the next delay with exponential backoff and jitter
delay = Math.min(delay * 2 * (0.8 + Math.random() * 0.4), timeRemaining);
console.log(`Request failed (attempt ${retries}/${maxRetries}). Retrying in ${Math.round(delay)}ms... (${Math.round(timeRemaining/1000)}s remaining)`);
// Wait for the calculated delay before trying again
await new Promise(resolve => setTimeout(resolve, delay));
}
}
}
async function link_issues(github) {
try {
@@ -98,7 +147,11 @@ async function link_issues(github) {
attachments {
nodes {url}}}}}}`});
const linearData = await httpsRequest({
console.log('--- Linear API query ---');
console.log(linearQuery);
console.log('----- End of query -----');
const linearData = await httpsRequestWithBackoff({
hostname: 'api.linear.app',
path: '/graphql',
method: 'POST',
@@ -106,7 +159,9 @@ async function link_issues(github) {
'Content-Type': 'application/json',
'Authorization': linearApiKey
}
}, linearQuery);
},
linearQuery,
{ maxRetries: 8, totalDurationSeconds: 60 });
console.log('Linear API response:');
console.log(JSON.stringify(linearData) + "\n");

89
.github/team.json vendored
View File

@@ -8,18 +8,9 @@
"romeovs",
"bshepherdson",
"metamben",
"appleby",
"uladzimirdev",
"wzimrin",
"ericnormand"
]
},
{
"name": "Semantic Layer",
"label": ".Team/SemanticLayer",
"members": [
"kamilmielnik",
"lbrdnk"
"ericnormand",
"galdre"
]
},
{
@@ -35,10 +26,10 @@
"label": ".Team/Embedding",
"members": [
"WiNloSt",
"oisincoveney",
"npretto",
"heypoom",
"sanex3339"
"sanex3339",
"lorem--ipsum"
]
},
{
@@ -48,35 +39,18 @@
"qnkhuat",
"piranha",
"crisptrutski",
"deniskaber",
"wotbrew",
"spalt08",
"stasgavrylov"
"stasgavrylov",
"uladzimirdev",
"kulyk",
"kamilmielnik"
]
},
{
"name": "Admin Webapp",
"label": ".Team/AdminWebapp",
"members": [
"npfitz",
"johnswanson",
"rafpaf",
"sloansparger",
"iethree",
"nvoxland",
"fraserdrops",
"edpaget"
]
},
{
"name": "DashViz",
"label": ".Team/DashViz",
"members": [
"alxnddr",
"kulyk",
"tsplude",
"lorem--ipsum",
"noahmoss"
"eliotmetabase"
]
},
{
@@ -91,13 +65,54 @@
"name": "Metabot",
"label": ".Team/Metabot",
"members": [
"somtom"
"appleby",
"noahmoss",
"retro",
"sloansparger",
"somtom",
"wotbrew",
"tsplude",
"lbrdnk",
"bronsa"
]
},
{
"name": "Product Growth",
"label": ".Team/ProductGrowth",
"members": ["nemanjaglumac"]
"members": [
"nemanjaglumac",
"chodorowicz",
"andsalves"
]
},
{
"name": "Cloud",
"label": "cloud",
"members": [
"filipesilva"
]
},
{
"name": "DashViz",
"label": ".Team/DashViz",
"members": [
"eliotmetabase"
]
},
{
"name": "UX West",
"label": ".Team/UXWest",
"members": [
"eliotmetabase",
"npfitz",
"johnswanson",
"iethree",
"nvoxland",
"edpaget",
"deniskaber",
"alxnddr",
"bpander"
]
}
]
}

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,18 +1,16 @@
name: Auto-backport
run-name: Auto Backport ${{ github.event.pull_request.title }}
on:
pull_request:
types: [closed, labeled]
jobs:
create-backport:
if: | # the PR must be closed and have a backport label
(github.event.pull_request.merged == true || github.event.action == 'closed') && (
if: | # the PR must be merged and have a backport label
github.event.pull_request.merged == true && (
contains(github.event.pull_request.labels.*.name, 'backport') ||
contains(github.event.pull_request.labels.*.name, 'double-backport') ||
contains(github.event.pull_request.labels.*.name, 'triple-backport') ||
github.event.label.name == 'backport' ||
github.event.label.name == 'double-backport' ||
github.event.label.name == 'triple-backport'
contains(github.event.pull_request.labels.*.name, 'triple-backport')
)
runs-on: ubuntu-latest
steps:
@@ -76,7 +74,7 @@ jobs:
github-token-2: ${{ secrets.GITHUB_TOKEN }}
- name: Double Backport
if: ${{ fromJson(steps.how-many-backports.outputs.result) >= 2 }}
if: ${{ always() && fromJson(steps.how-many-backports.outputs.result) >= 2 }}
uses: ./.github/actions/create-backport
with:
target-version: ${{ fromJson(steps.get-latest-release-version.outputs.result).secondLatest }}
@@ -85,7 +83,7 @@ jobs:
github-token-2: ${{ secrets.GITHUB_TOKEN }}
- name: Triple Backport
if: ${{ fromJson(steps.how-many-backports.outputs.result) >= 3 }}
if: ${{ always() && fromJson(steps.how-many-backports.outputs.result) >= 3 }}
uses: ./.github/actions/create-backport
with:
target-version: ${{ fromJson(steps.get-latest-release-version.outputs.result).thirdLatest }}

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

@@ -153,6 +153,14 @@ jobs:
list-tests: failed
fail-on-error: false
- name: Upload Logs on Failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ matrix.java-version }}-${{ matrix.job.edition }}-${{ github.job }}
path: logs/test-log.json
retention-days: 1
# checks that all the namespaces we actually ship can be compiled, without any dependencies that we don't ship (such
# as `:dev` dependencies). See #27009 for more context.
be-check:

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:

View File

@@ -40,5 +40,5 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'cljs'
- name: Run Cljs tests for shared/ code
- name: Run Cljs tests
run: yarn run test-cljs

View File

@@ -16,6 +16,8 @@ on:
release:
type: string
default: 'true'
build-args:
type: string
workflow_dispatch:
inputs:
artifact-name:
@@ -87,6 +89,7 @@ jobs:
tags: ${{ inputs.repo }}:${{ inputs.tag }}
no-cache: true
push: true
build-args: ${{ inputs.build-args }}
# we need to do this to get the nice fallback behavior of the legacy manifest file
- name: Build container (x86 only)

View File

@@ -0,0 +1,126 @@
name: Containerize Uberjar
on:
workflow_call:
workflow_dispatch:
jobs:
get-container-info:
runs-on: ubuntu-22.04
timeout-minutes: 5
name: Get container info
outputs:
editions: ${{ steps.ee-info.outputs.editions }}
ee: ${{ toJson(fromJson(steps.build-matrix.outputs.result).ee) }}
oss: ${{ toJson(fromJson(steps.build-matrix.outputs.result).oss) }}
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Get EE Docker info
id: ee-info
uses: ./.github/actions/get-docker-info
with:
edition: ee
- name: Get OSS Docker info
id: oss-info
uses: ./.github/actions/get-docker-info
with:
edition: oss
- name: Build matrix info
id: build-matrix
uses: actions/github-script@v7
with:
script: | # js
const editions = JSON.parse('${{ steps.ee-info.outputs.editions }}');
const result = {
editions: editions,
ee: {
repo: '${{ steps.ee-info.outputs.repo }}',
tag: '${{ steps.ee-info.outputs.tag }}'
},
oss: {
repo: '${{ steps.oss-info.outputs.repo }}',
tag: '${{ steps.oss-info.outputs.tag }}'
}
};
console.log('Build matrix:', result);
return result;
containerize:
needs: [get-container-info]
if: needs.get-container-info.result == 'success'
strategy:
matrix:
edition: ${{ fromJson(needs.get-container-info.outputs.editions) }}
uses: ./.github/workflows/containerize-jar.yml
secrets: inherit
with:
artifact-name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar
commit: ${{ github.event.inputs.commit || github.sha }}
repo: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).repo }}
tag: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).tag }}
release: "false"
build-args: |
GIT_COMMIT_SHA=${{ github.event.inputs.commit || github.sha }}
run-trivy:
needs: [get-container-info, containerize]
strategy:
matrix:
edition: ${{ fromJson(needs.get-container-info.outputs.editions) }}
runs-on: ubuntu-22.04
name: Run Trivy vulnerability scanner
steps:
- name: Check out the code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit || github.sha }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.29.0
env:
TRIVY_OFFLINE_SCAN: true
repo: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).repo }}
tag: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).tag }}
with:
image-ref: docker.io/${{ env.repo }}:${{ env.tag }}
format: sarif
output: trivy-results.sarif
version: "v0.57.1"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"
post-comment:
needs: [get-container-info, containerize]
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
name: Post PR comment
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Get Docker info for comment
id: docker-info
uses: ./.github/actions/get-docker-info
with:
branch: ${{ github.head_ref || github.ref_name }}
edition: ee
- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
with:
header: docker-build-status
message: |
✅ Docker build completed for commit ${{ github.event.pull_request.head.sha || github.sha }}
The uberjar has been built and containerized successfully.
**Branch:** `${{ github.head_ref || github.ref_name }}`
**Docker Image:** `${{ steps.docker-info.outputs.full_image }}`
**Docker Hub:** [View on Docker Hub](https://hub.docker.com/r/${{ steps.docker-info.outputs.repo }}/tags?name=${{ steps.docker-info.outputs.tag }})
**Triggered by:** @${{ github.actor }}
Pull the image:
```bash
docker pull ${{ steps.docker-info.outputs.full_image }}
```

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

@@ -1,34 +1,44 @@
name: Docs Bump Detected
on:
pull_request:
pull_request_target:
types:
- opened
- synchronize
- reopened
branches:
- 'master'
- 'release-x.[0-9]+.x'
paths:
- 'docs/**'
jobs:
push_workflow_to_docs_metabase_github_io_job:
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 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
env:
BRANCH_NAME: ${{ github.head_ref || github.ref }}
with:
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
script: | #js
if (process.env.BRANCH_NAME === "master" ||
/^release-x\.\d+\.x$/.test(process.env.BRANCH_NAME)) {
github.rest.repos.createDispatchEvent({
owner: "${{ github.repository_owner }}",
repo: "docs.metabase.github.io",
event_type: "docs_update",
client_payload: { branch_name: process.env.BRANCH_NAME
}
});
} else {
console.log("Branch name is not to be published: ", process.env.BRANCH_NAME);
}
client_payload: {
dispatch_type: "docs_update",
source_branch: process.env.SOURCE_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

@@ -0,0 +1,43 @@
name: Docs Merge 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 == true
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 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
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_merge",
client_payload: {
dispatch_type: "docs_merge",
source_branch: process.env.SOURCE_BRANCH,
target_branch: process.env.TARGET_BRANCH,
pr_number: process.env.PR_NUMBER}});

View File

@@ -12,17 +12,72 @@ 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: Fetch base branch
if: github.event_name == 'pull_request' && github.event.pull_request.base.ref != ''
run: |
# Fetch the base branch to ensure its history is available for diffing
git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
# Only run this if it's a pull request and the base ref exists
- 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') || contains(github.event.pull_request.labels.*.name, '.Team/DevEx') }}"
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 "Checking for changes in relevant folders..."
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
# Initialize an empty array to store folders with changes
CHANGED_FOLDERS=()
for folder in "src/metabase/lib" "src/metabase/query_processor" "modules/drivers" "src/metabase/driver"; do
if echo "$CHANGED_FILES" | grep -q "$folder"; then
CHANGED_FOLDERS+=("$folder")
fi
done
if [[ ${#CHANGED_FOLDERS[@]} -gt 0 ]]; then
echo "skip=false" >> $GITHUB_OUTPUT
echo "Changes detected in the following folders: ${CHANGED_FOLDERS[*]}."
echo "Tier 3 driver tests will run."
else
echo "skip=true" >> $GITHUB_OUTPUT
echo "No relevant team label, not merging into master/release, and no changes in relevant folders. Tier 3 driver tests will be skipped."
fi
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:
CI: 'true'
DRIVERS: athena
MB_ATHENA_TEST_REGION: us-east-1
MB_ATHENA_TEST_REGION_ROUTING: us-east-2
MB_ATHENA_TEST_ACCESS_KEY: ${{ secrets.MB_ATHENA_TEST_ACCESS_KEY }}
MB_ATHENA_TEST_SECRET_KEY: ${{ secrets.MB_ATHENA_TEST_SECRET_KEY }}
MB_ATHENA_TEST_S3_STAGING_DIR: ${{ secrets.MB_ATHENA_TEST_S3_STAGING_DIR }}
MB_ATHENA_TEST_S3_STAGING_DIR_ROUTING: ${{ secrets.MB_ATHENA_TEST_S3_STAGING_DIR_ROUTING }}
# These credentials are used to test the driver when the user does not have the athena:GetTableMetadata permission
MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_ACCESS_KEY: ${{ secrets.MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_ACCESS_KEY }}
MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_SECRET_KEY: ${{ secrets.MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_SECRET_KEY }}
@@ -60,6 +115,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 +185,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 +221,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 +257,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:
@@ -209,6 +268,7 @@ jobs:
MB_DATABRICKS_TEST_HTTP_PATH: ${{ secrets.MB_DATABRICKS_JDBC_TEST_HTTP_PATH }}
MB_DATABRICKS_TEST_TOKEN: ${{ secrets.MB_DATABRICKS_JDBC_TEST_TOKEN }}
MB_DATABRICKS_TEST_CATALOG: 'metabase_ci'
MB_DATABRICKS_TEST_CATALOG_ROUTING: 'metabase_routing_catalog'
MB_DATABRICKS_TEST_CLIENT_ID: ${{ secrets.MB_DATABRICKS_JDBC_TEST_CLIENT_ID }}
MB_DATABRICKS_TEST_OAUTH_SECRET: ${{ secrets.MB_DATABRICKS_JDBC_TEST_OAUTH_SECRET }}
name: Databricks
@@ -233,7 +293,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:
@@ -244,6 +305,7 @@ jobs:
MB_DATABRICKS_TEST_HTTP_PATH: ${{ secrets.MB_DATABRICKS_JDBC_TEST_HTTP_PATH }}
MB_DATABRICKS_TEST_TOKEN: ${{ secrets.MB_DATABRICKS_JDBC_TEST_TOKEN }}
MB_DATABRICKS_TEST_CATALOG: 'metabase_ci'
MB_DATABRICKS_TEST_CATALOG_ROUTING: 'metabase_routing_catalog'
MB_DATABRICKS_TEST_CLIENT_ID: ${{ secrets.MB_DATABRICKS_JDBC_TEST_CLIENT_ID }}
MB_DATABRICKS_TEST_OAUTH_SECRET: ${{ secrets.MB_DATABRICKS_JDBC_TEST_OAUTH_SECRET }}
name: Databricks (Multi-Catalog)
@@ -314,7 +376,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 +386,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 +445,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,19 +462,17 @@ 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:
fail-fast: false
matrix:
version:
- name: MongoDB 4.4
junit-name: be-tests-mongo-4-4-ee
image: metabase/qa-databases:mongo-sample-4.4
- name: MongoDB 5.0
junit-name: be-tests-mongo-5-0-ee
image: metabase/qa-databases:mongo-sample-5.0
- name: MongoDB 6.0
junit-name: be-tests-mongo-6-0-ee
image: metabase/qa-databases:mongo-sample-6
- name: MongoDB Latest
junit-name: be-tests-mongo-latest-ee
image: mongo:latest
@@ -473,19 +512,17 @@ 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:
fail-fast: false
matrix:
version:
- name: MongoDB 4.4
junit-name: be-tests-mongo-4-4-ee
image: metabase/qa-databases:mongo-sample-4.4
- name: MongoDB 5.0
junit-name: be-tests-mongo-5-0-ssl-ee
image: metabase/qa-databases:mongo-sample-5.0
- name: MongoDB 6.0
junit-name: be-tests-mongo-6-0-ssl-ee
image: metabase/qa-databases:mongo-sample-6
env:
CI: 'true'
DRIVERS: mongo
@@ -540,7 +577,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:
@@ -573,7 +611,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:
@@ -663,29 +702,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
@@ -730,7 +748,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 }}
@@ -748,7 +765,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:
@@ -840,6 +858,7 @@ jobs:
DRIVERS: redshift
MB_REDSHIFT_TEST_USER: metabase_ci
MB_REDSHIFT_TEST_DB: testdb
MB_REDSHIFT_TEST_DB_ROUTING: dev
MB_REDSHIFT_TEST_HOST: ${{ secrets.MB_REDSHIFT_TEST_HOST }}
MB_REDSHIFT_TEST_PASSWORD: ${{ secrets.MB_REDSHIFT_TEST_PASSWORD }}
name: ${{ matrix.job.name }}
@@ -877,6 +896,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
@@ -904,7 +927,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:
@@ -937,7 +961,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:
@@ -965,7 +990,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:
@@ -1015,7 +1041,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:
@@ -1052,7 +1079,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

@@ -3,13 +3,9 @@ name: E2E Cross-version Component Tests for Embedding SDK
on:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
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:
@@ -25,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
@@ -58,6 +55,7 @@ jobs:
};
build:
name: "SDK cross-version E2E > Build uberjar"
needs: [files-changed, get-build-requirements]
if: |
!cancelled()
@@ -86,9 +84,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-cross-version
resolve-sdk-version:
name: "SDK cross-version E2E > Resolve SDK version"
if: |
!cancelled()
runs-on: ubuntu-22.04
@@ -121,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
@@ -142,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
@@ -168,7 +163,7 @@ jobs:
- 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-cross-version
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
@@ -233,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:
@@ -13,6 +15,11 @@ on:
type: string
required: true
default: "master"
total-shards:
description: "Total number of parallel test shards"
type: number
required: false
default: 4
workflow_call:
inputs:
fe-ref:
@@ -23,9 +30,40 @@ on:
description: "Backend git ref to use"
type: string
required: true
total-shards:
description: "Total number of parallel test shards"
type: number
required: false
default: 4
jobs:
cross-version-for-breaking-changes:
generate-matrix:
name: "Breaking changes E2E > Generate matrix"
runs-on: ubuntu-latest
outputs:
matrix_json: ${{ steps.set_matrix.outputs.matrix_json }}
shards_total: ${{ steps.set_matrix.outputs.shards_total }}
steps:
- name: Set up shard matrix
id: set_matrix
uses: actions/github-script@v7
with:
# generate an output like `{"matrixJson": "{\"shard\": [1, 2, 3, 4]}", "shardsTotal": 4}` to be used in the other jobs
script: |
const totalShards = parseInt(process.env.TOTAL_SHARDS_INPUT, 10);
const matrix = { shard: Array.from({ length: totalShards }, (_, i) => i + 1) };
console.log("Generated matrix JSON", matrix);
console.log(`Total shards: ${totalShards}`);
core.setOutput('matrix_json', JSON.stringify(matrix));
core.setOutput('shards_total', totalShards);
env:
TOTAL_SHARDS_INPUT: ${{ inputs.total-shards }}
build-jar:
name: "Breaking changes E2E > Build jar"
runs-on: ubuntu-22.04
timeout-minutes: 45
@@ -33,8 +71,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare frontend environment
uses: ./.github/actions/prepare-frontend
- name: Prepare Node.js
# We're not using `actions/prepare-frontend` because we don't want to install deps from the root repo
# nor we want to touch the cache as we'll be potentially be installing different versions of packages
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
@@ -46,24 +88,75 @@ jobs:
MB_EDITION: ee
CYPRESS_CI: true
run: |
bash bin/backward-compatibility-test.sh \
node bin/backward-compatibility-test.js \
${{ inputs.fe-ref }} ${{ inputs.be-ref }} \
build
- name: Upload Uberjar
uses: actions/upload-artifact@v4
with:
name: metabase-jar-cross-version
path: .tmp/metabase-be/target/uberjar/metabase.jar
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
env:
TOTAL_SHARDS: ${{ needs.generate-matrix.outputs.shards_total }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix_json) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: cross-version-uberjar
- name: Download Uberjar
uses: actions/download-artifact@v4
with:
name: metabase-jar-cross-version
path: .tmp/metabase-be/target/uberjar/
- name: Download FE repo
run: |
git clone --depth 1 -b ${{ inputs.fe-ref }} https://github.com/metabase/metabase.git .tmp/metabase-fe
- name: Install FE dependencies
working-directory: .tmp/metabase-fe
run: |
yarn install
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
with:
working-directory: .tmp/metabase-fe
- 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: |
bash bin/backward-compatibility-test.sh \
node bin/backward-compatibility-test.js \
${{ inputs.fe-ref }} ${{ inputs.be-ref }} \
start > /dev/null & \
bash bin/backward-compatibility-test.sh \
node bin/backward-compatibility-test.js \
${{ inputs.fe-ref }} ${{ inputs.be-ref }} \
test
test ${{ matrix.shard}}/${{ env.TOTAL_SHARDS }}

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

@@ -0,0 +1,404 @@
name: "[NOT REQUIRED] SDK Compatibility tests"
on:
push:
branches:
- "master"
- "release-**"
pull_request:
types: [opened, synchronize, reopened]
branches:
- "master"
- "release-**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
e2e_embedding_sdk_compatibility: ${{ steps.changes.outputs.e2e_embedding_sdk_compatibility }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-paths.yaml
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
if: |
!cancelled() &&
contains(github.base_ref || github.ref, 'release-x')
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }}
node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const {
getBuildRequirements,
getVersionFromReleaseBranch,
} = require('${{ github.workspace }}/release/dist/index.cjs');
const targetBranchName = '${{ github.base_ref || github.ref }}';
const version = getVersionFromReleaseBranch(targetBranchName);
const requirements = getBuildRequirements(version);
return {
java_version: requirements.java,
node_version: requirements.node,
};
get-sample-apps-data:
if: |
!cancelled()
runs-on: ubuntu-22.04
timeout-minutes: 10
env:
# we must support last two stable releases
SUPPORTED_RELEASES_COUNT: 2
TEST_SUITES: |
[
"metabase-nodejs-react-sdk-embedding-sample-e2e",
"metabase-nextjs-sdk-embedding-sample-e2e",
"shoppy-e2e"
]
TEST_SUITES_TO_RUN_IN_MASTER_ONLY: |
[
"shoppy-e2e"
]
SAMPLE_APP_MAIN_BRANCH_NAME: "main"
SAMPLE_APP_STABLE_RELEASE_BRANCH_NAME_SUFFIX: "stable"
outputs:
branch_name: ${{ fromJson(steps.build-sample-apps-data.outputs.result).branch_name }}
matrix: ${{ toJSON(fromJson(steps.build-sample-apps-data.outputs.result).matrix) }}
steps:
- uses: actions/checkout@v4
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Build sample app compatibility data
uses: actions/github-script@v7
id: build-sample-apps-data
with:
script: | # js
const {
isReleaseBranch,
getMajorVersionNumberFromReleaseBranch,
} = require('${{ github.workspace }}/release/dist/index.cjs');
const testSuites = JSON.parse(process.env.TEST_SUITES);
const testSuitesToRunInMasterOnly = JSON.parse(process.env.TEST_SUITES_TO_RUN_IN_MASTER_ONLY);
const ref = '${{ github.base_ref || github.ref }}';
const branchName = ref.replace(/^refs\/heads\//, '');
const isMainBranchRef = branchName === 'master';
const isReleaseBranchRef = isReleaseBranch(branchName);
if (isMainBranchRef) {
return {
branch_name: '${{ env.SAMPLE_APP_MAIN_BRANCH_NAME }}',
matrix: testSuites,
};
}
if (isReleaseBranchRef) {
const supportedReleasesCount = Number(${{ env.SUPPORTED_RELEASES_COUNT }});
const currentReleaseVersion = Number(${{ vars.CURRENT_VERSION }});
const currentBranchVersion = Number(getMajorVersionNumberFromReleaseBranch(branchName));
const sampleAppBranchName = `${currentBranchVersion}-${{ env.SAMPLE_APP_STABLE_RELEASE_BRANCH_NAME_SUFFIX }}`
const shouldRunTestsForVersion = (currentReleaseVersion - currentBranchVersion) <= (supportedReleasesCount - 1);
const releaseBranchTestSuites = testSuites.filter(testSuite => !testSuitesToRunInMasterOnly.includes(testSuite));
return {
branch_name: sampleAppBranchName,
matrix: shouldRunTestsForVersion
? releaseBranchTestSuites
: []
};
}
return {
branch_name: '',
matrix: []
};
build:
needs: [files-changed, get-build-requirements, get-sample-apps-data]
if: |
!cancelled() &&
needs.files-changed.outputs.e2e_embedding_sdk_compatibility == 'true' &&
fromJSON(needs.get-sample-apps-data.outputs.matrix)[0] != null
runs-on: ubuntu-22.04
timeout-minutes: 25
env:
MB_EDITION: ee
INTERACTIVE: false
# make sure that builds on release branches get licenses, because we use them for releases
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
with:
node-version: "${{ needs.get-build-requirements.outputs.node_version }}"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: uberjar
java-version: "${{ needs.get-build-requirements.outputs.java_version || 21 }}"
- name: Build uberjar with ./bin/build.sh
run: ./bin/build.sh
- name: Prepare uberjar artifact
uses: ./.github/actions/prepare-uberjar-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
- name: Build Embedding SDK package
run: yarn build-embedding-sdk-package
- name: Prepare Embedding SDK artifact
uses: actions/upload-artifact@v4
with:
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:
matrix:
test_suite: ${{ fromJSON(needs.get-sample-apps-data.outputs.matrix) }}
environment: ["production", "development"]
if: |
!cancelled() && needs.build.result == 'success'
runs-on: ubuntu-22.04
timeout-minutes: 45
name: e2e-sample-app-${{ matrix.test_suite }}-tests-${{ matrix.environment }}-bundle
env:
MB_EDITION: ee
DISPLAY: ""
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_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 }}
SAMPLE_APP_ENVIRONMENT: ${{ matrix.environment }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
# We have to use the latest version that does not have this issue https://github.com/docker/compose/pull/12752
- name: Set up Docker Compose
uses: docker/setup-compose-action@v1
with:
version: latest
- name: Get Sample App name
id: get-sample-app-name
shell: bash
run: |
test_suite="${{ matrix.test_suite }}"
echo "sample_app_name=${test_suite%-e2e}" >> "$GITHUB_OUTPUT"
- 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: Retrieve Embedding SDK dist artifact
uses: actions/download-artifact@v4
with:
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ github.workspace }}/resources/embedding-sdk
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Check if sample app branch exists
id: check-sample-app-branch
run: |
TEST_SUITE="${{ matrix.test_suite }}"
REPO_NAME="${TEST_SUITE%-e2e}"
REPO_URL="https://github.com/metabase/${REPO_NAME}.git"
echo "Checking if branch '${SAMPLE_APP_BRANCH_NAME}' exists in ${REPO_URL}..."
if git ls-remote --exit-code --heads "$REPO_URL" "${SAMPLE_APP_BRANCH_NAME}"; then
echo "sample_app_branch_exists=true" >> $GITHUB_OUTPUT
else
echo "sample_app_branch_exists=false" >> $GITHUB_OUTPUT
fi
- name: Configure AWS credentials
if: ${{ matrix.test_suite == 'shoppy-e2e' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.SHOPPY_IAM_ROLE }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: us-east-1
- name: Download Shoppy's App DB PostgreSQL dump from S3
if: ${{ matrix.test_suite == 'shoppy-e2e' }}
run: |
aws s3 cp s3://${{ secrets.SHOPPY_METABASE_APP_DB_S3_BUCKET }}/${{ secrets.SHOPPY_METABASE_APP_DB_S3_KEY }} ./e2e/tmp/db_dumps/shoppy_metabase_app_db_dump.sql
- name: Prepare and launch Sample Apps for shoppy-e2e test suite
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' && matrix.test_suite == 'shoppy-e2e' }}
env:
METABASE_APP_DB_USER: ${{ secrets.SHOPPY_METABASE_APP_DB_USER }}
METABASE_APP_DB: ${{ secrets.SHOPPY_METABASE_APP_DB_DATABASE }}
run: npx tsx ./e2e/runner/embedding-sdk/sample-apps/start-ci.ts shoppy-e2e
- name: Prepare and launch Sample Apps for other test suites
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' && matrix.test_suite != 'shoppy-e2e' }}
run: npx tsx ./e2e/runner/embedding-sdk/sample-apps/start-ci.ts ${{ matrix.test_suite }}
- name: Run e2e tests for Sample App
id: run-e2e-tests
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' }}
continue-on-error: true
run: node e2e/runner/run_cypress_ci.js ${{ matrix.test_suite }} --browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' && steps.run-e2e-tests.outcome != 'success' }}
with:
name: cypress-recording-sample-app-${{ matrix.test_suite }}-latest
path: |
./e2e/tmp/${{ steps.get-sample-app-name.outputs.sample_app_name }}/cypress
if-no-files-found: ignore
- name: Fail job if tests failed
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' && steps.run-e2e-tests.outcome != 'success' }}
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]
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"]
if: |
!cancelled() && needs.build.result == 'success'
runs-on: ubuntu-22.04
timeout-minutes: 45
name: e2e-host-app-${{ matrix.test_suite }}-tests-${{ matrix.environment }}-bundle
env:
MB_EDITION: ee
DISPLAY: ""
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_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 }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- 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: Retrieve Embedding SDK dist artifact
uses: actions/download-artifact@v4
with:
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ github.workspace }}/resources/embedding-sdk
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Prepare JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: "temurin"
- name: Run Metabase
run: node e2e/runner/run_cypress_ci.js start
- name: Generate database snapshots
run: node e2e/runner/run_cypress_ci.js snapshot
- name: Prepare and launch Host App
run: npx tsx ./e2e/runner/embedding-sdk/host-apps/start-ci.ts ${{ matrix.test_suite }}
- name: Run e2e tests for Host App
id: run-e2e-tests
continue-on-error: true
run: node e2e/runner/run_cypress_ci.js ${{ matrix.test_suite }} --browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: ${{ steps.run-e2e-tests.outcome != 'success' }}
with:
name: cypress-recording-host-app-${{ matrix.test_suite }}-${{ matrix.environment }}-latest
path: |
./cypress
if-no-files-found: ignore
- name: Fail job if tests failed
if: ${{ steps.run-e2e-tests.outcome != 'success' }}
run: |
exit 1

View File

@@ -1,296 +0,0 @@
name: E2E Sample Apps tests
on:
push:
branches:
- "master"
- "release-**"
pull_request:
types: [opened, synchronize, reopened]
branches:
- "master"
- "release-**"
env:
# we must support last two stable releases
SUPPORTED_RELEASES_COUNT: 2
TEST_SUITES: |
[
"metabase-nodejs-react-sdk-embedding-sample-e2e",
"metabase-nextjs-sdk-embedding-sample-e2e",
"shoppy-e2e"
]
TEST_SUITES_TO_RUN_IN_MASTER_ONLY: |
[
"shoppy-e2e"
]
SAMPLE_APP_MAIN_BRANCH_NAME: "main"
SAMPLE_APP_STABLE_RELEASE_BRANCH_NAME_SUFFIX: "stable"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
e2e_all: ${{ steps.changes.outputs.e2e_all }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-paths.yaml
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
if: |
!cancelled() &&
contains(github.base_ref || github.ref, 'release-x')
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }}
node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const {
getBuildRequirements,
getVersionFromReleaseBranch,
} = require('${{ github.workspace }}/release/dist/index.cjs');
const targetBranchName = '${{ github.base_ref || github.ref }}';
const version = getVersionFromReleaseBranch(targetBranchName);
const requirements = getBuildRequirements(version);
return {
java_version: requirements.java,
node_version: requirements.node,
};
get-sample-apps-data:
if: |
!cancelled()
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
branch_name: ${{ fromJson(steps.build-sample-apps-data.outputs.result).branch_name }}
matrix: ${{ toJSON(fromJson(steps.build-sample-apps-data.outputs.result).matrix) }}
steps:
- uses: actions/checkout@v4
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Build sample app compatibility data
uses: actions/github-script@v7
id: build-sample-apps-data
with:
script: | # js
const {
isReleaseBranch,
getMajorVersionNumberFromReleaseBranch,
} = require('${{ github.workspace }}/release/dist/index.cjs');
const testSuites = JSON.parse(process.env.TEST_SUITES);
const testSuitesToRunInMasterOnly = JSON.parse(process.env.TEST_SUITES_TO_RUN_IN_MASTER_ONLY);
const ref = '${{ github.base_ref || github.ref }}';
const branchName = ref.replace(/^refs\/heads\//, '');
const isMainBranchRef = branchName === 'master';
const isReleaseBranchRef = isReleaseBranch(branchName);
if (isMainBranchRef) {
return {
branch_name: '${{ env.SAMPLE_APP_MAIN_BRANCH_NAME }}',
matrix: testSuites,
};
}
if (isReleaseBranchRef) {
const supportedReleasesCount = Number(${{ env.SUPPORTED_RELEASES_COUNT }});
const currentReleaseVersion = Number(${{ vars.CURRENT_VERSION }});
const currentBranchVersion = Number(getMajorVersionNumberFromReleaseBranch(branchName));
const sampleAppBranchName = `${currentBranchVersion}-${{ env.SAMPLE_APP_STABLE_RELEASE_BRANCH_NAME_SUFFIX }}`
const shouldRunTestsForVersion = (currentReleaseVersion - currentBranchVersion) <= (supportedReleasesCount - 1);
const releaseBranchTestSuites = testSuites.filter(testSuite => !testSuitesToRunInMasterOnly.includes(testSuite));
return {
branch_name: sampleAppBranchName,
matrix: shouldRunTestsForVersion
? releaseBranchTestSuites
: []
};
}
return {
branch_name: '',
matrix: []
};
build:
needs: [files-changed, get-build-requirements, get-sample-apps-data]
if: |
!cancelled() &&
needs.files-changed.outputs.e2e_all == 'true' &&
fromJSON(needs.get-sample-apps-data.outputs.matrix)[0] != null
runs-on: ubuntu-22.04
timeout-minutes: 25
env:
MB_EDITION: ee
INTERACTIVE: false
# make sure that builds on release branches get licenses, because we use them for releases
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
with:
node-version: "${{ needs.get-build-requirements.outputs.node_version }}"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: uberjar
java-version: "${{ needs.get-build-requirements.outputs.java_version || 21 }}"
- name: Build uberjar with ./bin/build.sh
run: ./bin/build.sh
- name: Prepare uberjar artifact
uses: ./.github/actions/prepare-uberjar-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
- name: Compile CLJS
run: yarn build-pure:cljs
shell: bash
- name: Build Embedding SDK package
run: yarn build-embedding-sdk
- name: Prepare Embedding SDK artifact
uses: actions/upload-artifact@v4
with:
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
path: resources/embedding-sdk
e2e-tests:
needs: [get-build-requirements, get-sample-apps-data, build]
strategy:
matrix:
test_suite: ${{ fromJSON(needs.get-sample-apps-data.outputs.matrix) }}
if: |
!cancelled() && needs.build.result == 'success'
runs-on: ubuntu-22.04
timeout-minutes: 45
name: e2e-sample-app-${{ matrix.test_suite }}-tests
env:
MB_EDITION: ee
DISPLAY: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
# 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_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
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
# Sample Apps testing variables
CYPRESS_CI: true
SAMPLE_APP_BRANCH_NAME: ${{ needs.get-sample-apps-data.outputs.branch_name }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- 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: Retrieve Embedding SDK dist artifact
uses: actions/download-artifact@v4
with:
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ github.workspace }}/resources/embedding-sdk
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Check if sample app branch exists
id: check-sample-app-branch
run: |
TEST_SUITE="${{ matrix.test_suite }}"
REPO_NAME="${TEST_SUITE%-e2e}"
REPO_URL="https://github.com/metabase/${REPO_NAME}.git"
echo "Checking if branch '${SAMPLE_APP_BRANCH_NAME}' exists in ${REPO_URL}..."
if git ls-remote --exit-code --heads "$REPO_URL" "${SAMPLE_APP_BRANCH_NAME}"; then
echo "sample_app_branch_exists=true" >> $GITHUB_OUTPUT
else
echo "sample_app_branch_exists=false" >> $GITHUB_OUTPUT
fi
- name: Configure AWS credentials
if: ${{ matrix.test_suite == 'shoppy-e2e' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.SHOPPY_IAM_ROLE }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: us-east-1
- name: Download Shoppy's App DB PostgreSQL dump from S3
if: ${{ matrix.test_suite == 'shoppy-e2e' }}
run: |
aws s3 cp s3://${{ secrets.SHOPPY_METABASE_APP_DB_S3_BUCKET }}/${{ secrets.SHOPPY_METABASE_APP_DB_S3_KEY }} ./e2e/tmp/db_dumps/shoppy_metabase_app_db_dump.sql
- name: Prepare and launch Sample Apps for shoppy-e2e test suite
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' && matrix.test_suite == 'shoppy-e2e' }}
env:
METABASE_APP_DB_USER: ${{ secrets.SHOPPY_METABASE_APP_DB_USER }}
METABASE_APP_DB: ${{ secrets.SHOPPY_METABASE_APP_DB_DATABASE }}
run: npx tsx ./e2e/runner/start-sample-app-containers/start-ci.ts shoppy-e2e
- name: Prepare and launch Sample Apps for other test suites
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' && matrix.test_suite != 'shoppy-e2e' }}
run: npx tsx ./e2e/runner/start-sample-app-containers/start-ci.ts ${{ matrix.test_suite }}
- name: Run e2e tests for Sample App
id: run-e2e-tests
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' }}
run: node e2e/runner/run_cypress_ci.js ${{ matrix.test_suite }} --browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: ${{ steps.check-sample-app-branch.outputs.branch_exists == 'true' && steps.run-e2e-tests.outcome != 'success' }}
with:
name: cypress-recording-sample-app-${{ matrix.test_suite }}-latest
path: |
./cypress
./logs/test.log
if-no-files-found: ignore

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,20 +67,23 @@ 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'
uses: ./.github/actions/run-embedding-sdk-storybook
- name: Retrieve uberjar artifact for ${{ inputs.edition }}
uses: actions/download-artifact@v4
uses: ./.github/actions/fetch-artifact
with:
name: metabase-${{ inputs.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
extract-path: "target/uberjar"
output-name: "metabase.jar"
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
@@ -111,9 +110,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

@@ -22,72 +22,6 @@ jobs:
chunks: 50
specs: ${{ inputs.specs }}
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
if: |
!cancelled() &&
contains(github.ref, 'release-x')
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }}
node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const { getBuildRequirements, getVersionFromReleaseBranch } = require('${{ github.workspace }}/release/dist/index.cjs');
const version = getVersionFromReleaseBranch('${{ github.ref }}');
const requirements = getBuildRequirements(version);
return {
java_version: requirements.java,
node_version: requirements.node,
};
build:
needs: [get-build-requirements]
if: ${{ !cancelled() && !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
matrix:
edition: [oss, ee]
env:
MB_EDITION: ${{ matrix.edition }}
INTERACTIVE: false
# make sure that builds on release branches get licenses, because we use them for releases
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
with:
node-version: "${{ needs.get-build-requirements.outputs.node_version }}"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: uberjar
java-version: "${{ needs.get-build-requirements.outputs.java_version || 21 }}"
- name: Build uberjar with ./bin/build.sh
timeout-minutes: 10
run: ./bin/build.sh
shell: bash
- name: Prepare uberjar artifact
uses: ./.github/actions/prepare-uberjar-artifact
with:
name: metabase-${{ matrix.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
reset-e2e-test-comment:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
@@ -124,9 +58,8 @@ jobs:
uses: ./.github/workflows/e2e-test.yml
needs:
- e2e-matrix-builder
- build
if: |
!cancelled() && needs.build.result == 'success'
!cancelled() && !inputs.skip
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.e2e-matrix-builder.outputs.matrix) }}
@@ -145,11 +78,10 @@ jobs:
name: Flaky e2e Tests
uses: ./.github/workflows/e2e-test.yml
needs:
- build
- e2e-matrix-builder
# skip flaky test run if only e2e specs changed as an optimization
if: |
!cancelled() && needs.build.result == 'success' && needs.e2e-matrix-builder.outputs.isDefaultSpecPattern == 'true'
!cancelled() && !inputs.skip && needs.e2e-matrix-builder.outputs.isDefaultSpecPattern == 'true'
secrets: inherit
with:
name: Flaky
@@ -181,11 +113,3 @@ jobs:
echo "E2E Tests failed"
exit 1
fi
pr-env:
needs: [build]
if: |
!cancelled() &&
contains(github.event.pull_request.labels.*.name, 'PR-Env')
uses: ./.github/workflows/pr-env.yml
secrets: inherit

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:
@@ -46,7 +43,7 @@ jobs:
with:
m2-cache-key: "cljs"
- name: Build Embedding SDK package
run: yarn build-embedding-sdk
run: yarn build-embedding-sdk-package
- name: Prepare Embedding SDK artifact
uses: actions/upload-artifact@v4
with:
@@ -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
@@ -91,7 +88,7 @@ jobs:
- name: Run frontend embedding SDK snippets type check
run: yarn run embedding-sdk:docs-snippets:type-check
embedding-sdk-no-exposed-internal-types-validate:
embedding-sdk-api-documentation-generation-validation:
needs: [files-changed, build]
if: |
needs.files-changed.outputs.frontend_embedding_sdk_sources == 'true' &&
@@ -109,24 +106,40 @@ jobs:
with:
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ github.workspace }}/resources/embedding-sdk
- name: Run no exposed internal types validation
- name: Generate documentation to check for generation errors
id: docs-generation
continue-on-error: true
shell: bash
run: |
output="$(yarn embedding-sdk:docs:generate:pure --emit none 2>&1)" || {
if [[ "$output" == *"not included in the documentation"* ]]; then
echo "$output"
exit 1
fi
}
- name: Comment on PR if docs need update
set -o pipefail
yarn embedding-sdk:docs:generate:pure --emit none 2>&1 \
| tee /dev/stdout \
| tee >( tail -n 10 \
| sed '1s/^/output<<EOF\n/' \
| sed '$aEOF' \
>> "$GITHUB_OUTPUT" )
exit ${PIPESTATUS[0]}
- name: Comment on PR if 'not included in the documentation' error happens
uses: ./.github/actions/notify-pull-request
if: success() || failure()
with:
remove-previous-comment: true
add-new-comment: ${{ job.status == 'failure' }}
message: "📝 One or more internal Metabase types were accidentally exported from the `@metabase/embedding‑sdk‑react` package in this pull request.<br/><br/>Publishing these types would change the public API and may drastically change generated SDK documentation.<br/><br/>Please update the code so internal types remain private and the public API stays unchanged."
add-new-comment: ${{ steps.docs-generation.outcome == 'failure' && contains(steps.docs-generation.outputs.output, 'not included in the documentation') }}
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
with:
remove-previous-comment: true
add-new-comment: ${{ steps.docs-generation.outcome == 'failure' && contains(steps.docs-generation.outputs.output, 'Failed to resolve link') }}
message: "📝 A typedoc `{@link <TYPE_NAME>}` annotation is found that can't be resolved.<br><br>Most likely it happens when the referenced type is not exported. Please check the CI logs to find the name of such type.<br><br>- If a referenced in `{@link}` 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, change types to prevent unexported type reference in `{@link}` annotation.<br><br>You can run `yarn embedding-sdk:docs:generate` locally to verify that the issue has been resolved."
include-log: true
- name: Fail Job
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
@@ -134,23 +147,29 @@ jobs:
cached-embedding-sdk-dist-artifact-name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
e2e-component-tests-embedding-sdk-cross-version:
if: ${{ startsWith(inputs.branch, 'release-x.') }}
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:
if: github.event_name == 'pull_request' && startsWith(inputs.branch, '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:
- embedding-sdk-cli-snippets-type-check
- embedding-sdk-docs-snippets-type-check
- embedding-sdk-no-exposed-internal-types-validate
- embedding-sdk-api-documentation-generation-validation
- sdk-e2e-tests
- e2e-component-tests-embedding-sdk-cross-version
if: always() && !cancelled()

View File

@@ -9,6 +9,16 @@ on:
skip-lint:
type: boolean
default: false
workflow_dispatch:
inputs:
skip:
description: "Skip main frontend jobs (type-check, unit tests, timezone tests)"
type: boolean
default: false
skip-lint:
description: "Skip linting jobs (prettier, eslint, css variables check)"
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}-frontend
@@ -27,6 +37,13 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Restore ESLint cache
uses: actions/cache@v4
with:
path: .eslintcache
key: eslintcache-${{ hashFiles('yarn.lock', '.eslintrc.js') }}
restore-keys: |
eslintcache-
- name: Compile CLJS
run: yarn build-pure:cljs
- name: Find CSS variables that are used but never defined
@@ -56,8 +73,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] # 2 shards for parallel execution
env:
SHARDS: 2 # should match matrix above
JEST_JUNIT_OUTPUT_DIR: ./target/junit
JEST_JUNIT_OUTPUT_NAME: test-report-frontend-unit.xml
steps:
@@ -68,22 +90,11 @@ 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()
if: always() && github.event_name != 'workflow_dispatch'
with:
input-path: ./target/junit
output-name: frontend-unit

View File

@@ -7,10 +7,10 @@ on:
- "master"
- "release-**"
paths:
- "frontend/src/metabase-lib/expressions/**"
- "frontend/src/metabase/querying/expressions/**"
pull_request:
paths:
- "frontend/src/metabase-lib/expressions/**"
- "frontend/src/metabase/querying/expressions/**"
jobs:
fe-fuzz-lexifier:
@@ -24,7 +24,7 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/pratt/fuzz.lexifier.unit.spec.ts
- run: yarn test-unit frontend/src/metabase/querying/expressions/pratt/fuzz.lexifier.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the lexifier
@@ -40,7 +40,7 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/fuzz.compiler.unit.spec.ts
- run: yarn test-unit frontend/src/metabase/querying/expressions/fuzz.compiler.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the custom expression compiler
@@ -56,7 +56,7 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/fuzz.string.unit.spec.ts
- run: yarn test-unit frontend/src/metabase/querying/expressions/fuzz.string.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the custom expression string quoter

View File

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

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

@@ -0,0 +1,133 @@
name: Auto-Optimize Docs PNG Images
on:
pull_request:
types:
- labeled
jobs:
optimize-images:
runs-on: ubuntu-latest
if: ${{ contains(github.event.pull_request.labels.*.name,'Type:Documentation') }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
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 new 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

@@ -89,11 +89,11 @@ jobs:
done
echo "run_id=$(jq -r '.workflow_runs[0].id' e2e-tests.json)" >> $GITHUB_OUTPUT
- name: Retrieve uberjar artifact for ee
uses: actions/download-artifact@v4
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ inputs.wait_for_uberjar && steps.wait_for_uberjar.outputs.run_id || github.run_id }}
extract-path: "target/uberjar"
output-name: "metabase.jar"
- name: Move uberjar to bin/docker
run: |
jar xf target/uberjar/metabase.jar

View File

@@ -9,9 +9,13 @@ concurrency:
cancel-in-progress: true
jobs:
uberjar:
if: ${{ github.event.label.name == 'PR-Env' }}
uses: ./.github/workflows/uberjar.yml
secrets: inherit
pr-env:
needs: [uberjar]
if: ${{ github.event.label.name == 'PR-Env' }}
uses: ./.github/workflows/pr-env.yml
with:
wait_for_uberjar: true
secrets: inherit

View File

@@ -3,11 +3,6 @@ run-name: Building Dynamic PR Environment for ${{ github.ref_name }} by @${{ git
on:
workflow_call:
inputs:
wait_for_uberjar:
description: "Wait for uberjar build"
required: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
@@ -31,69 +26,12 @@ jobs:
uses: aws-actions/amazon-ecr-login@v2
with:
registries: "${{ secrets.PR_ENV_AWS_ACCOUNT_ID }}"
- name: Wait for uberjar
id: wait_for_uberjar
if: ${{ inputs.wait_for_uberjar == true }}
run: |
## Get workflow run id for uberjar build
curl -Ls --output e2e-tests.json \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/run-tests.yml/runs?head_sha=${{ github.event.pull_request.head.sha || github.sha }}
ID=$(jq -r '.workflow_runs[0].id' e2e-tests.json)
echo "Run ID: ${ID}"
## Get workflow run id for uberjar build
while [ -z "$JOB_ID" ]; do
NEXT_URL="https://api.github.com/repos/${{ github.repository }}/actions/runs/${ID}/jobs?filter=latest"
# Search for build job
echo "Searching for build job..."
while [ -z "$JOB_ID" ] && [ -n "$NEXT_URL" ]; do
# Get one page of jobs
RESPONSE=$(curl -s -i \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"$NEXT_URL")
# Extract headers and body
HEADERS=$(echo "$RESPONSE" | sed -n '1,/^\r$/p')
BODY=$(echo "$RESPONSE" | sed '1,/^\r$/d')
LINK_HEADER=$(echo "$HEADERS" | grep -i '^link:' | sed 's/^link: //')
# Check for next page in Link header
if echo "$LINK_HEADER" | grep -q 'rel="next"'; then
NEXT_URL=$(echo "$LINK_HEADER" | sed -E 's/.*<([^>]+)>; rel="next".*/\1/')
else
NEXT_URL=""
fi
# Check for build job
JOB_ID=$(echo "$BODY" | jq -r '.jobs[] | select(.name | contains("build (ee)")) | .id')
done
done
echo "Job ID: ${JOB_ID}"
## Wait for uberjar build to complete
while [ true ]; do
curl -Ls --output uberjar.json \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/jobs/${JOB_ID}
jq -r '.steps[] | select(.name == "Prepare uberjar artifact") | .status' uberjar.json | grep -q "completed" && break
echo "Waiting for uberjar build..."
sleep 10
done
echo "run_id=$(jq -r '.workflow_runs[0].id' e2e-tests.json)" >> $GITHUB_OUTPUT
- name: Retrieve uberjar artifact for ee
uses: actions/download-artifact@v4
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ inputs.wait_for_uberjar && steps.wait_for_uberjar.outputs.run_id || github.run_id }}
extract-path: "target/uberjar"
output-name: "metabase.jar"
- name: Move uberjar to bin/docker
run: |
jar xf target/uberjar/metabase.jar
@@ -107,7 +45,7 @@ jobs:
tags: ${{ secrets.PR_ENV_AWS_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/metabase-enterprise:pr${{ github.event.number }}
push: true
deploy_pr:
needs: [ build ]
needs: [build]
runs-on: ubuntu-latest
name: PR Review ENV
permissions:
@@ -191,7 +129,7 @@ jobs:
kubectl apply -f ./metabase.yml
preview_links:
runs-on: ubuntu-latest
needs: [ deploy_pr ]
needs: [deploy_pr]
steps:
- uses: marocchino/sticky-pull-request-comment@v2
with:

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

@@ -15,7 +15,9 @@ on:
- release-x.52.x
- release-x.53.x
- release-x.54.x
- metabot-v3-main
- release-x.55.x
- release-x.56.x
- esbuild-main
concurrency:
# We want to ensure only one job is running at a time per branch because
@@ -296,8 +298,8 @@ jobs:
run: |
yarn embedding-sdk:generate-changelog -o changelog-diff
- name: Build SDK bundle
run: yarn run build-embedding-sdk
- name: Build SDK package
run: yarn run build-embedding-sdk-package
- name: Generate SDK package.json in the build directory
run: yarn run embedding-sdk:generate-package
@@ -392,10 +394,19 @@ jobs:
run: |
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_RELEASE_TOKEN }} > .npmrc
# Please keep the value in sync with `inputs.branch`'s release branch
npm publish --tag ${{fromJson('{"master": "nightly", "release-x.51.x": "51-stable", "release-x.52.x": "52-stable", "release-x.53.x": "53-stable", "release-x.54.x": "54-stable", "metabot-v3-main": "55-metabot"}')[inputs.branch]}}
npm publish --tag ${{fromJson('{
"master": "nightly",
"release-x.51.x": "51-stable",
"release-x.52.x": "52-stable",
"release-x.53.x": "53-stable",
"release-x.54.x": "54-stable",
"release-x.55.x": "55-stable",
"release-x.56.x": "56-stable",
"esbuild-main": "56-esbuild"
}')[inputs.branch]}}
- name: Add `latest` tag to the latest release branch (`release-x.54.x`) deployment
if: ${{ inputs.branch == 'release-x.54.x' }}
- name: Add `latest` tag to the latest release branch (`release-x.55.x`) deployment
if: ${{ inputs.branch == 'release-x.56.x' }}
working-directory: sdk
run: |
npm dist-tag add @metabase/embedding-sdk-react@${{ env.sdk_version }} latest

View File

@@ -7,9 +7,7 @@ on:
- release-x.*
tags:
- v*
- nightly-*
- latest-*
- beta-*
workflow_dispatch:
inputs:
version:

View File

@@ -34,18 +34,23 @@ jobs:
AWS_S3_DOWNLOADS_BUCKET: test_bucket
with:
script: | # js
const { getChangelog } = require('${{ github.workspace }}/release/dist/index.cjs');
const R = require('${{ github.workspace }}/release/dist/index.cjs');
const fs = require('fs');
const version = '${{ inputs.version }}';
const notes = await getChangelog({
const issues = await R.getMilestoneIssues({
version,
github,
owner: context.repo.owner,
repo: context.repo.repo,
});
const notes = R.getWebsiteChangelog({
version,
issues,
});
fs.writeFileSync(`release-notes-preview-${version}.md`, notes);
- name: Upload Release Notes
uses: actions/upload-artifact@v4

View File

@@ -12,8 +12,6 @@ on:
description: Tag name to apply to this release
type: choice
options:
- nightly
- beta
- latest
required: true
tag_rollout:
@@ -36,8 +34,6 @@ on:
tag_name:
type: string
# options:
# - nightly
# - beta
# - latest
# - none (skips everything)
required: true
@@ -250,19 +246,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
@@ -280,7 +266,7 @@ jobs:
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
fetch-depth: 0 # we want all branches and tags
fetch-tags: true
- name: Add and push git tag for nightly/beta/latest
- name: Add and push git tag for latest
if: ${{ !inputs.dot-x-tag }}
run: | # sh
if [[ "${{ matrix.edition }}" == "ee" ]]; then

View File

@@ -17,8 +17,6 @@ on:
options:
- none
- latest
- beta
- nightly
required: true
default: 'none'
auto:
@@ -41,8 +39,6 @@ on:
# options:
# - none
# - latest
# - beta
# - nightly
required: true
default: 'none'
auto:
@@ -403,7 +399,9 @@ jobs:
});
trigger-ee-extra-pr:
needs: verify-s3-download
needs:
- containerize-ee
- verify-s3-download
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:

View File

@@ -7,9 +7,11 @@ on:
- "release-**"
pull_request:
types: [opened, synchronize, reopened]
merge_group:
jobs:
files-changed:
if: ${{ !contains(github.event.pull_request.labels.*.name,'ci skip') }}
name: Check which files changed
runs-on: ubuntu-22.04
timeout-minutes: 5
@@ -21,6 +23,7 @@ jobs:
backend_all: ${{ steps.changes.outputs.backend_all }}
frontend_all: ${{ steps.changes.outputs.frontend_all }}
frontend_sources: ${{ steps.changes.outputs.frontend_sources }}
documentation: ${{ steps.changes.outputs.documentation }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
@@ -34,6 +37,7 @@ jobs:
static-viz-files-changed:
name: Check whether static-viz files changed
if: ${{ !contains(github.event.pull_request.labels.*.name,'ci skip') }}
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
@@ -63,6 +67,14 @@ jobs:
token: ${{ github.token }}
filters: .github/static-viz-sources.yaml
uberjar:
needs: [files-changed, static-viz-files-changed]
if: ${{ !cancelled() && !(needs.files-changed.outputs.documentation == 'true' && needs.files-changed.outputs.backend_all == 'false' && needs.files-changed.outputs.frontend_all == 'false' && needs.files-changed.outputs.e2e_all == 'false') }}
uses: ./.github/workflows/uberjar.yml
secrets: inherit
with:
source_changed: ${{ needs.files-changed.outputs.backend_all == 'true' || needs.files-changed.outputs.frontend_all == 'true' || needs.static-viz-files-changed.outputs.static_viz == 'true' }}
backend-tests:
if: ${{ !cancelled() }}
needs: [files-changed, static-viz-files-changed]
@@ -71,6 +83,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
@@ -87,7 +106,8 @@ jobs:
skip-lint: ${{ needs.files-changed.outputs.frontend_all != 'true' && needs.files-changed.outputs.e2e_specs != 'true' }}
e2e-tests:
needs: files-changed
needs: [files-changed, uberjar]
if: always() && !cancelled()
uses: ./.github/workflows/e2e-tests.yml
secrets: inherit
with:
@@ -97,3 +117,28 @@ 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
pr-env:
needs: [uberjar]
if: |
!cancelled() &&
contains(github.event.pull_request.labels.*.name, 'PR-Env')
uses: ./.github/workflows/pr-env.yml
secrets: inherit
containerize:
needs: [uberjar]
if: |
!cancelled() &&
needs.uberjar.result == 'success' &&
(
(github.event_name == 'push' && contains(fromJson('["master", "metabot-v3-main", "internal-tools"]'), github.ref_name)) ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'build-docker-uberjar'))
)
uses: ./.github/workflows/containerize-uberjar.yml
secrets: inherit

View File

@@ -13,12 +13,11 @@ on:
schedule:
- cron: '0 5 * * *'
jobs:
monitor:
# don't run this workflow on a cron for forks
# Generate pom.xml files for all Maven projects
generate-poms:
if: ${{ github.event_name != 'schedule' || github.repository == 'metabase/metabase' }}
name: Generate Snyk report
name: Generate pom.xml files
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
@@ -26,15 +25,144 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'snyk'
- uses: snyk/actions/setup@0.4.0
- name: Generate all pom.xml
run: .github/scripts/write-poms.sh
- name: Run snyk
- name: Upload pom files
uses: actions/upload-artifact@v4
with:
name: pom-files
path: |
pom.xml
modules/drivers/*/pom.xml
# Yarn/NPM projects that don't need pom files
frontend-projects:
if: ${{ github.event_name != 'schedule' || github.repository == 'metabase/metabase' }}
name: ${{ matrix.project.name }}
runs-on: ubuntu-22.04
strategy:
matrix:
project:
- name: Main Frontend (yarn)
file: yarn.lock
package-manager: yarn
category: main-frontend-yarn
- name: Embedding SDK Template
file: bin/embedding-sdk/templates/yarn.lock
package-manager: yarn
category: embedding-sdk-template
- name: E2E Angular 20 Host App
file: e2e/embedding-sdk-host-apps/angular-20-host-app/package-lock.json
package-manager: npm
category: e2e-angular-host
- name: E2E Next 15 App Router
file: e2e/embedding-sdk-host-apps/next-15-app-router-host-app/package-lock.json
package-manager: npm
category: e2e-next-app-router
- name: E2E Next 15 Pages Router
file: e2e/embedding-sdk-host-apps/next-15-pages-router-host-app/package-lock.json
package-manager: npm
category: e2e-next-pages-router
- name: E2E Vite 6 Host App
file: e2e/embedding-sdk-host-apps/vite-6-host-app/package-lock.json
package-manager: npm
category: e2e-vite-host
- name: Release Helper
file: release/yarn.lock
package-manager: yarn
category: release-helper
steps:
- uses: actions/checkout@v4
- uses: snyk/actions/setup@0.4.0
- name: Run snyk test
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
continue-on-error: true
run: snyk test --all-projects --sarif-file-output=snyk.sarif
- name: Upload result to GitHub Code Scanning
run: snyk test --org="metabase-AnD9iS4Wfu4eBYMsG2DZ5N" --remote-repo-url="https://github.com/metabase/metabase" --file=${{ matrix.project.file }} --package-manager=${{ matrix.project.package-manager }} --sarif-file-output=snyk-${{ matrix.project.category }}.sarif
- name: Upload results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif
sarif_file: snyk-${{ matrix.project.category }}.sarif
category: ${{ matrix.project.category }}
# Maven projects that need pom files
maven-projects:
needs: generate-poms
if: ${{ github.event_name != 'schedule' || github.repository == 'metabase/metabase' }}
name: ${{ matrix.project.name }}
runs-on: ubuntu-22.04
strategy:
matrix:
project:
- name: Main Backend (maven)
file: pom.xml
category: main-backend-maven
- name: Driver - Athena
file: modules/drivers/athena/pom.xml
category: driver-athena
- name: Driver - BigQuery Cloud SDK
file: modules/drivers/bigquery-cloud-sdk/pom.xml
category: driver-bigquery-cloud-sdk
- name: Driver - ClickHouse
file: modules/drivers/clickhouse/pom.xml
category: driver-clickhouse
- name: Driver - Databricks
file: modules/drivers/databricks/pom.xml
category: driver-databricks
- name: Driver - Druid
file: modules/drivers/druid/pom.xml
category: driver-druid
- name: Driver - Druid JDBC
file: modules/drivers/druid-jdbc/pom.xml
category: driver-druid-jdbc
- name: Driver - Hive-like
file: modules/drivers/hive-like/pom.xml
category: driver-hive-like
- name: Driver - MongoDB
file: modules/drivers/mongo/pom.xml
category: driver-mongo
- name: Driver - Oracle
file: modules/drivers/oracle/pom.xml
category: driver-oracle
- name: Driver - Presto JDBC
file: modules/drivers/presto-jdbc/pom.xml
category: driver-presto-jdbc
- name: Driver - Redshift
file: modules/drivers/redshift/pom.xml
category: driver-redshift
- name: Driver - Snowflake
file: modules/drivers/snowflake/pom.xml
category: driver-snowflake
- name: Driver - SparkSQL
file: modules/drivers/sparksql/pom.xml
category: driver-sparksql
- name: Driver - SQLite
file: modules/drivers/sqlite/pom.xml
category: driver-sqlite
- name: Driver - SQL Server
file: modules/drivers/sqlserver/pom.xml
category: driver-sqlserver
- name: Driver - Starburst
file: modules/drivers/starburst/pom.xml
category: driver-starburst
- name: Driver - Vertica
file: modules/drivers/vertica/pom.xml
category: driver-vertica
steps:
- uses: actions/checkout@v4
- uses: snyk/actions/setup@0.4.0
- name: Download pom files
uses: actions/download-artifact@v4
with:
name: pom-files
- name: Run snyk test
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
continue-on-error: true
run: snyk test --org="metabase-AnD9iS4Wfu4eBYMsG2DZ5N" --remote-repo-url="https://github.com/metabase/metabase" --file=${{ matrix.project.file }} --package-manager=maven --sarif-file-output=snyk-${{ matrix.project.category }}.sarif
- name: Upload results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk-${{ matrix.project.category }}.sarif
category: ${{ matrix.project.category }}

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
@@ -108,7 +109,7 @@ jobs:
- name: Auto approve PR
uses: juliangruber/approve-pull-request-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
number: ${{ steps.create_pr.outputs.pr_number }}
- name: Enable Pull Request Automerge

View File

@@ -0,0 +1,23 @@
name: Uberjar Containerize labeled
on:
pull_request:
types: [ labeled ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
uberjar:
if: ${{ github.event.label.name == 'build-docker-uberjar' }}
uses: ./.github/workflows/uberjar.yml
secrets: inherit
with:
source_changed: false
containerize:
needs: [uberjar]
if: ${{ github.event.label.name == 'build-docker-uberjar' }}
uses: ./.github/workflows/containerize-uberjar.yml
secrets: inherit

View File

@@ -1,13 +1,17 @@
name: Build + Docker Uberjar
name: Build Uberjar
# This workflow builds an uberjar and pushes it to dockerhub for any branch, either on-demand,
# or automatically for the listed branches
concurrency:
group: uberjar-${{ github.ref }}
cancel-in-progress: false
on:
push:
branches:
- master
- feature-visualizer
- metabot-v3-main
- internal-tools
paths-ignore:
# config files
@@ -23,65 +27,108 @@ on:
inputs:
commit:
description: "Optional full-length commit SHA-1 hash"
workflow_call:
inputs:
source_changed:
description: "Whether source code has changed"
type: boolean
default: true
jobs:
get-container-info:
check-existing-artifacts:
runs-on: ubuntu-22.04
timeout-minutes: 5
name: Get container info
outputs:
editions: ${{ toJson(fromJson(steps.info.outputs.result).editions) }}
ee: ${{ toJson(fromJson(steps.info.outputs.result).ee) }}
oss: ${{ toJson(fromJson(steps.info.outputs.result).oss) }}
ee_exists: ${{ steps.check-ee.outcome == 'success' }}
oss_exists: ${{ steps.check-oss.outcome == 'success' }}
should_build: ${{ steps.decide.outputs.should_build }}
steps:
- name: Get docker repo and tag
id: info
- name: Check out the code
uses: actions/checkout@v4
- name: Try to fetch existing EE artifact
id: check-ee
continue-on-error: true
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar
output-name: metabase-ee.jar
- name: Try to fetch existing OSS artifact
id: check-oss
continue-on-error: true
uses: ./.github/actions/fetch-artifact
with:
name: metabase-oss-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar
output-name: metabase-oss.jar
- name: Decide if build is needed
id: decide
run: |
SOURCE_CHANGED="${{ inputs.source_changed == true }}"
EE_EXISTS="${{ steps.check-ee.outcome == 'success' }}"
OSS_EXISTS="${{ steps.check-oss.outcome == 'success' }}"
echo "Source changed: $SOURCE_CHANGED"
echo "EE exists: $EE_EXISTS"
echo "OSS exists: $OSS_EXISTS"
# Build if source changed OR artifacts don't exist
if [[ "$SOURCE_CHANGED" == "true" ]] || [[ "$EE_EXISTS" == "false" ]] || [[ "$OSS_EXISTS" == "false" ]]; then
SHOULD_BUILD="true"
echo "Will build: source_changed=$SOURCE_CHANGED, ee_exists=$EE_EXISTS, oss_exists=$OSS_EXISTS"
else
SHOULD_BUILD="false"
echo "Skipping build: artifacts exist and no source changes"
fi
echo "should_build=$SHOULD_BUILD" >> $GITHUB_OUTPUT
# if this is on a release branch, we need to check the build requirements
get-build-requirements:
if: |
!cancelled() &&
contains(github.ref, 'release-x')
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }}
node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const branch = '${{ github.head_ref || github.ref_name }}';
const owner = '${{ github.repository_owner }}';
const { getBuildRequirements, getVersionFromReleaseBranch } = require('${{ github.workspace }}/release/dist/index.cjs');
console.log(`Branch: ${branch}`);
if (branch === "master") {
return {
editions: ["ee", "oss"],
ee: {
repo: `${owner}/metabase-enterprise-head`,
tag: "latest"
},
oss: {
repo: `${owner}/metabase-head`,
tag: "latest"
}
};
}
const version = getVersionFromReleaseBranch('${{ github.ref }}');
const requirements = getBuildRequirements(version);
return {
editions: ["ee"],
ee: {
repo: `${owner}/metabase-dev`,
tag: branch.replaceAll("/", "-"), // slashes make docker sad
},
java_version: requirements.java,
node_version: requirements.node,
};
- name: Print output
run: |
echo "${{ steps.info.outputs.result }}"
build:
needs: get-container-info
needs:
[check-existing-artifacts, get-build-requirements]
if: always() && !cancelled() && needs.check-existing-artifacts.outputs.should_build == 'true' && (needs.get-build-requirements.result == 'success' || needs.get-build-requirements.result == 'skipped')
name: Build MB ${{ matrix.edition }}
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
matrix:
edition: ${{ fromJson(needs.get-container-info.outputs.editions) }}
edition: ["ee", "oss"]
env:
MB_EDITION: ${{ matrix.edition }}
INTERACTIVE: false
SKIP_LICENSES: true # faster builds for dev
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }} # faster builds for dev
steps:
- name: Check out the code
uses: actions/checkout@v4
@@ -89,28 +136,33 @@ jobs:
ref: ${{ github.event.inputs.commit }}
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
with:
node-version: "${{ needs.get-build-requirements.outputs.node_version || '22' }}"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: uberjar
java-version: 21
java-version: "${{ needs.get-build-requirements.outputs.java_version || 21 }}"
- name: Build
run: ./bin/build.sh
- name: Prepare uberjar artifact
uses: ./.github/actions/prepare-uberjar-artifact
with:
name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.sha }}-uberjar
name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar
check-jar-health:
runs-on: ubuntu-22.04
name: Is ${{ matrix.edition }} (java ${{ matrix.java-version }}) healthy?
needs: [build, get-container-info]
needs: [build, check-existing-artifacts]
if: always() && !cancelled() && (needs.build.result == 'success' || (needs.check-existing-artifacts.outputs.should_build == 'false' && needs.check-existing-artifacts.outputs.ee_exists == 'true' && needs.check-existing-artifacts.outputs.oss_exists == 'true'))
timeout-minutes: 10
strategy:
matrix:
edition: ${{ fromJson(needs.get-container-info.outputs.editions) }}
edition: ["ee", "oss"]
java-version: [21]
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Prepare JRE (Java Run-time Environment)
uses: actions/setup-java@v4
with:
@@ -118,54 +170,12 @@ jobs:
java-version: ${{ matrix.java-version }}
distribution: "temurin"
- run: java -version
- uses: actions/download-artifact@v4
name: Retrieve uberjar artifact
- name: Retrieve uberjar artifact
uses: ./.github/actions/fetch-artifact
with:
name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.sha }}-uberjar
name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar
- name: Launch uberjar
run: >-
java --add-opens java.base/java.nio=ALL-UNNAMED -jar ./target/uberjar/metabase.jar &
java --add-opens java.base/java.nio=ALL-UNNAMED -jar ./metabase.jar &
- name: Wait for Metabase to start
run: while ! curl 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
containerize:
needs: [check-jar-health, get-container-info]
strategy:
matrix:
edition: ${{ fromJson(needs.get-container-info.outputs.editions) }}
uses: ./.github/workflows/containerize-jar.yml
secrets: inherit
with:
artifact-name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.sha }}-uberjar
commit: ${{ github.event.inputs.commit || github.sha }}
repo: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).repo }}
tag: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).tag }}
release: "false"
run-trivy:
needs: [get-container-info, containerize]
strategy:
matrix:
edition: ${{ fromJson(needs.get-container-info.outputs.editions) }}
runs-on: ubuntu-22.04
name: Run Trivy vulnerability scanner
steps:
- name: Check out the code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit || github.sha }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.29.0
env:
TRIVY_OFFLINE_SCAN: true
repo: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).repo }}
tag: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).tag }}
with:
image-ref: docker.io/${{ env.repo }}:${{ env.tag }}
format: sarif
output: trivy-results.sarif
version: "v0.57.1"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"

View File

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

18
.gitignore vendored
View File

@@ -6,6 +6,7 @@
*.po~
*.sqlite
*.trace.db
*.trace.db.old
*.xcworkspacedata
.DS_Store
.\#*
@@ -35,6 +36,7 @@
/coverage
/crate-*
/cypress
cypress.env.json
/deploy/artifacts/*
/docs/**/node_modules
/docs/**/package.json
@@ -49,6 +51,7 @@
/lein-plugins/*/target
/local
/locales/metabase-*.pot
/logs
/modules/drivers/*/resources/namespaces.edn
/modules/drivers/*/target
/node_modules/
@@ -57,7 +60,12 @@
/reset-password-artifacts
/resources/frontend_client/app/dist/
/resources/frontend_client/app/locales
/resources/frontend_client/app/embed.js
/resources/frontend_client/app/embedding-sdk.js
/resources/frontend_client/app/embedding-sdk.js.map
/resources/frontend_client/tmp-*/
/resources/frontend_client/embed.html
/resources/frontend_client/embed-sdk.html
/resources/frontend_client/index.html
/resources/frontend_client/public.html
/resources/embedding-sdk
@@ -133,8 +141,18 @@ modules/drivers/*/.lsp/*
# jar downloader
/jars/
# metabot
llm-payloads
/bin/bb
.aider*
/config.yml
CLAUDE.local.md
.claude/settings.local.json
.eslintcache
/logs
/.clojure-mcp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

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