Compare commits

...

3553 Commits

Author SHA1 Message Date
Jakub Chodorowicz
42e3a98805 add split openapi to the repo 2026-03-06 16:02:32 +01:00
Jakub Chodorowicz
245825e10e fix paths in openapi scripts 2026-03-02 10:21:11 +01:00
Jakub Chodorowicz
b0b2b597ab cleanup openapi scripts 2026-03-02 10:12:50 +01:00
Jakub Chodorowicz
3eaf107895 split openapi into separate components, paths 2026-03-02 10:07:50 +01:00
Romeo Van Snick
d54e6b64e2 Convert parameters to typescript (#70137)
* Convert parameters to TypeScript

* Fix types

* Fix types in normalizeValue

* Fix types in dashboard tests

* Fix more types

* Fix test

* Remove duplicate check

* Naming
2026-03-02 17:07:10 +11:00
metabase-bot[bot]
763d5e1777 [chore] Update E2E test timings with recent data (#70236)
Update E2E test timings with averaged data

Collected timing data from 7 days of test runs.
All specs with timing data were included (simple averages).

🤖 Generated automatically by update-e2e-timings workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-03-02 12:16:14 +13:00
Fraser
b746306e12 Convert VisualizationError utils to TypeScript (#69062)
* Convert VisualizationError utils to TypeScript

Closes DEV-1407

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 11:53:39 +13:00
Fraser
f0c90980ff Convert DefaultParametersSection to TypeScript (#69075)
* Convert DefaultParametersSection to TypeScript

Closes DEV-1420

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 11:53:21 +13:00
Egor Grushin
e53f226b40 GDGT-1852 fix ui issues in Data Summary tab in Transform Inspector (#70150)
* GDGT-1852 fix ui issues
2026-03-01 22:48:32 +00:00
Romeo Van Snick
40cbf2ffb5 Avoid updating url when navigating to query builder (#68982)
* Use Question.serializeCardForUrl for consistency

* Convert metabase/lib/card to typescript

* Remove broken createCard helper

* Fix types

* Remove unused parameter

* Remove entityId from cards

* Remove createCard tests

* Avoid renaming Card to CardObject for no reason

* Also allow serializing UnsavedCard

* Make options optional

* Simplify serializeCardForUrl

* Make serializeCardForUrl implementation match the Question.serializeCardForUrl implementation

* Use serializeCardForUrl from metabase/lib/card

* Use serializeCardForUrl from metabase/lib/card

* Use stable stringify for url hashes

* Remove unnecessary _serializeForUrl helper

* Correctly ignore possibly infinite type instantiations

* Fix unit tests

* Allow passing parameterValues

* Fix comparison

* Coerce values to undefined

* Update unit tests

* Remove duplicate key

* Make cards optional
2026-03-02 08:38:55 +11:00
Braden Shepherdson
55a0afbd2a [MBQL lib] Stop using ID-based refs for fields from joined cards (#70116)
Fixes QUE2-383.

Uses `:lib/card-id` in metadata to check if a column came from a card at any point.
If so, it should use a name-based `:field` ref rather than an ID-based one.
This makes the refs to joined columns consistent with those to main source columns,
based on whether the source is a table or card.
2026-02-28 20:10:19 +00:00
Robert Kosara
f759d9f473 Docs: Tenant attributes and collections improvements (#70179)
* Tenant attributes and collections improvements

First round of edits to add the ability to create tenant attributes using SSO.

* Revise tenant-specific access for non-admin internal users

* Edits based on Alberto's comments

* Move tenant claims info to claims section, link to it from attributes

* Apply suggestion from @alexyarosh

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

* Moved tenant attribute logic and simplified sentence

* Fix a sentence, improve code example, and clean up permissions bullet points

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2026-02-27 13:46:20 -08:00
Uladzimir Havenchyk
39951a570a chore: make entity copy modal generic (#70018)
* chore: convert dashcard related redux components to typescript

* fixup

* address review

* another review iteration

* chore: make entity copy modal generic

* chore: convert dashcard related redux components to typescript

* fixup

* address review

* another review iteration

* add a missing import

* type cleanup

* address review
2026-02-28 00:07:56 +03:00
Alex Yarosh
6b369ef818 docs: writeable connection (#70210)
* writeable connection

* Optimized 1 images, saved 89.0 KB (46.9% smaller)

* routing notes

* typos

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-02-27 14:33:37 -05:00
Nemanja Glumac
f3c352d920 Increase viewport to reduce "extract column" flakes (#70206) 2026-02-27 20:06:00 +01:00
Anderson
9c0576cc5c Add snowplow event for opening Data Studio (#69880)
* Add snowplow event for when opening Data Studio

* Update triggered_from
2026-02-27 18:21:02 +00:00
Nemanja Glumac
fc00027fca Migrate away from deprecated Cypress.env() API (#70189)
As of Cypress 15.10.0, `Cypress.env()` is deprecated. This commit migrates
all usages to the new recommended APIs:

- Non-sensitive config values → `Cypress.expose()` (synchronous)
- Sensitive token values → `cy.env()` (asynchronous)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 19:03:29 +01:00
Ngoc Khuat
3be69174e6 Improve logging around notifications (#70099) 2026-02-27 16:55:43 +00:00
Nicola Mometto
11a73d8621 Add position field to dashboard parameters for stable serialization (#70107)
* revert sorting by id on parameters serialization, parameters ordering is significant and must be preserved

* revert, we're storing position

* feat: add :position to parameters, backfill

* feat: backfill position on imported parameters

* chore: tests

* FE: update position

* chore: gitignore python-sources.lock

* chore: ensure we get position

* restrict to dashboard params

* tests

* simpler approach: just sort by position on serialization export/import
2026-02-27 16:06:32 +00:00
Dan Stone
d1e7b483dd Prefer SQL DML for insert-from-source! to fix bigquery metadata consistency (#69753)
The legacy .insertAll API (and newer Storage API) do not work well with
tables that are created/dropped frequently. This is because their
metadata caches can take a long time to up date.

Python transforms use the drop-recreate fallback strategy for bigquery
so we observe this inconsistency for every run after the first, even
with absurd multi minute timeouts.

The SQL API does not have a problem, so we'll use that. We expect a
performance regression but its better to work slowly than not work at
all.

Other changes:

- Removed now redundant bigquery retry loop

- Dropped dictionary support, we cannot support it easily and it cannot be
considered higher prio than bigquery working at all.

- Added correct parameter typing for JSON.

- Fixed ordering issues in tests (assumed row order when it is
non-deterministic)
2026-02-27 15:47:58 +00:00
Ngoc Khuat
aa66ab25d6 Simplify notification result data flow (#70115) 2026-02-27 21:58:54 +07:00
Edward Paget
8207fc3181 feat: error code on streaming response throw/fail (#62351)
* fix: real error codes in streaming responses

* fixup! try faking old errors deeper in the stack

* fixup! wrap fetch endpoint in embedding too

* fixup! treat string only errors differently

* fixup! handle errors in a couple other places

* fixup! hard to figure out what kind of error it is

* fixup! typecasts

* fixup! test arity

* fixup! remove blanket 403 page from dataset

* fixup! simplify backend 403 responses

* fixup! a couple missed tests

* fixup! add mockresponse for mockclient

* fixup! other failing tests

* fixup! last failing test

* fixup! add another OSS check

* fixup! one more oss test

* fixup! update status codes on some more tests

* fixup! use committed function
2026-02-27 09:42:20 -05:00
Nicolò Pretto
b429839f0a remove sdk import error on core app e2e tests (#70188)
try to untangle imports
2026-02-27 14:41:19 +01:00
Jakub Chodorowicz
451f080ede add new variants to action icon and use it in Inspector Header cell (#70180)
* add new variants to action icon and use it in Inspector Header cell

* add is-active state
2026-02-27 12:10:07 +01:00
Dan Stone
4f00289729 Fix bigquery routing test (#70154)
- Was using wrong project / creds
- Using two different sha names only worked when shas were not used as
qualifiers in the query (they are for bigquery)

Added the ability to override the hash-key used for tx/hash-dataset to
support forcing a hash collision (as is required by routing).
2026-02-27 10:58:14 +00:00
Maksym Yakubych
369d410d4d fix: new SQL questions automatically open DataReference sidebar (#70120) 2026-02-26 21:09:43 +00:00
Nicola Mometto
b8c13482df fix: replace usage of source-table-id with primary-source-table-id (#70162) 2026-02-26 14:24:20 -05:00
Sloan Sparger
126eb6b1b1 [Metabot] Prevent OSS SQL gen UI from showing in cloud migrated instances (#69649)
prevent oss sql gen ui from showing for customsers with had set it up locally and migrated to cloud
2026-02-26 12:54:41 -06:00
Noah Moss
4ab19dce4d Ring middleware for public sharing endpoints (#70153)
* Ring middleware for public sharing endpoints

* Refactor test

* move +public-sharing-enabled to address module lint

* Fix documents test
2026-02-26 12:59:54 -05:00
Braden Shepherdson
39b4a21830 [MBQL lib] Refactor a common pattern into new lib functions (#68474)
Many uses of `lib.util/source-card-id` and `source-table-id` were
followed by calling `lib.metadata/card` or `lib.metadata/table`
respectively.

This PR adds two new functions `lib.metadata.calculation/primary-source-card`
and `primary-source-table` which look up the card/table directly.

It also adds `lib.metadata.calculation/primary-source` for the handful
of places where whichever of `primary-source-card` or `primary-source-table`
returns non-nil gets used, such as in some drill-thrus.
2026-02-26 17:32:57 +00:00
Eric Normand
3ba0f90cf0 Automate mutation testing end-to-end with run! orchestrator (#70126)
- Adds a fully automated `run!` entry point to `dev.mutation-testing` that orchestrates the entire mutation testing workflow: generate report → create Linear project → group functions → write tests via `claude -p` → verify → retry →
  commit → create draft PRs
  - Replaces the previous manual, step-by-step SKILL.md instructions (which required the operator to execute each step) with Clojure functions that handle the full pipeline automatically
  - Key new functions: `parse-namespace`, `group-functions`, `build-test-prompt`, `invoke-claude!`, `verify-and-retry!`, `process-group!`, `print-summary!`

  ## Motivation

  The mutation testing workflow previously required ~20 manual steps per namespace, with the Claude operator interpreting skill instructions and running each step. This was slow, error-prone, and required constant supervision. Now you just
  call `(mut-test/run! 'metabase.lib.order-by)` and walk away.

  ## How it works

  1. **`parse-namespace`** — derives source/test paths, short names, auto-detects `.cljc` vs `.clj`
  2. **`group-functions`** — clusters private functions with their public entry points based on test overlap, skips fully-covered functions
  3. **`build-test-prompt`** — assembles a prompt with function source, existing tests, and surviving mutations
  4. **`invoke-claude!`** — shells out to `claude -p` with scoped tool access (`Edit`, `Read`, `Bash(clj-nrepl-eval*)`)
  5. **`verify-and-retry!`** — checks which mutations were killed, retries up to 2x with targeted prompts for survivors
  6. **`process-group!`** — full per-group pipeline: branch → invoke Claude → verify → commit & push → Linear issue → draft PR
  7. **`run!`** — ties it all together, catches errors per group so one failure doesn't stop the batch
2026-02-26 09:51:59 -07:00
Nemanja Glumac
6e799b2ef6 Bump Cypress retries to two (#70157) 2026-02-26 17:42:51 +01:00
Dan Stone
dcd2d7394d Fix snowflake integer type (#70031)
BigInteger is observed
2026-02-26 16:04:33 +00:00
Aleksandr Lesnenko
3c693179e4 fix content translations break visualization settings (#70054)
* fix content translation produces unstable translated keys in viz settings
2026-02-26 10:54:11 -05:00
Braden Shepherdson
b01732fd69 [perf] Tools to repro query + metadata locally, given instance API access (#67952)
Given browser or API access to a Metabase instance, the tools in this PR
can recursively fetch cards and all the metadata (tables, fields, etc.)
required to run them through QP preprocessing and compilation.

Of course this cannot actually _execute_ the compiled form, since you
don't have access to the user's DWH, but it enables debugging of
hard-to-reproduce user bug reports in your local REPL.

This works by making API calls like `/api/card` and
`/api/card/query_metadata` until a complete picture of the metadata is
acquired. This is poured into a `MetadataProvider`, which is all the QP
needs to analyze and compile the query.
2026-02-26 15:49:56 +00:00
Nicola Mometto
a75ee49fd1 restrict a transform inspector test to sql (#70152)
fix: restrict to sql drivers
2026-02-26 15:23:21 +00:00
Eric Normand
dbfe313b4a Filter transforms based on permissions GHY-3152 (#70125)
Filter transforms based on permissions

We were leaking transforms in the :bad_transforms key
2026-02-26 14:55:12 +00:00
github-automation-metabase
088bd180d5 Auto-update documentation for master (#70133)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-26 09:46:51 -05:00
metabase-bot[bot]
0226eaa5d2 [chore] Update E2E test timings with recent data (#69996)
Update E2E test timings with averaged data

Collected timing data from 7 days of test runs.
All specs with timing data were included (simple averages).

🤖 Generated automatically by update-e2e-timings workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-02-26 15:04:49 +01:00
Nicola Mometto
3d68aa1ac4 feat: restrict join-analysis to only table-level join analysis (#70105) 2026-02-26 13:08:34 +00:00
Nemanja Glumac
c18c08b02c Pin patched libraries to their patched version (#70143) 2026-02-26 13:02:41 +01:00
Katya Voropaieva
851bedf5bb Update v59 sample Examples visualizations and dashboard. (#70075)
Adds Box Plot viz and a Scalar viz with conditional colors to the Example dashboard.
The resources/sample-content.edn was regenerated from the live instance content.
2026-02-26 10:45:57 +01:00
Uladzimir Havenchyk
9981cd5323 chore: convert dashboard reducer to typescript and rtk (#69842)
* chore: convert dashboard reducer to typescript

* convert to rtk

* use immer when possible

* fixup

* Apply suggestion from @kamilmielnik

I checked it locally and it is indeed unnecessary guard

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

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2026-02-26 11:47:52 +03:00
Uladzimir Havenchyk
264604b61e chore: convert dashcard mapping files to ts (#69836) 2026-02-26 10:30:10 +03:00
Sébastien
a5a0773eaf Migrate ChartTypeDropdown to use Mantine ComboBox (#69734)
* Migrate ChartTypeDropdown to use Mantine ComboBox

* test fixes

* .

* .

* .

* .

* screenshot
2026-02-26 10:56:02 +07:00
Romeo Van Snick
c463756c60 Remove deprecated unit test helpers (#69275)
* Replace createQueryWithClauses with createTestQuery

# Conflicts:
#	frontend/src/metabase-lib/test-helpers.ts
#	frontend/src/metabase/querying/filters/hooks/use-date-filter/use-date-filter.unit.spec.ts

* Remove unnused helpers

# Conflicts:
#	frontend/src/metabase-lib/test-helpers.ts

* WIP

* Export createMetadataProvider

* Use Lib.createTestHelper

* Remove createQuery helper usage

* Remove createQuery helper

* Remove unneeded getJoinQueryHelpers

* Fix test

* Remove DEFAULT_QUERY

* Move or remove unneeded test helpers

* Fix lint

* Allow auto binning in test spec

* Fix test

* Allow disamiguating column name by index

* Fix tests

* Fix imports
2026-02-26 13:09:27 +11:00
Romeo Van Snick
0f7e8983ca Metakey helper (#68987)
* Use H.metaKey where applicable

* Add helper for meta key options

* Fix import

* Update more instances

* Fix test
2026-02-26 00:51:03 +00:00
Sloan Sparger
3401c9e902 Fix e2e dashboard-questions.cy.spec.js scrollTo flakes (#70114)
* invert assertions about scrollTo hash param and instead assert on visibility

* update e2e/test/scenarios/question/saved.cy.spec.js

* try to improve flakiness

* trying something dumb
2026-02-25 16:22:00 -06:00
Eric Normand
0aeda87a3d [Mutation Testing] Kill mutations in metabase.lib.field/fingerprint-based-default-unit (#69319)
Part of the mutation testing project for metabase.lib.field.

Closes QUE2-338

Functions
Stats
Surviving mutations before: 16
Tests added: 1
Mutations killed by this PR: 16
Mutations remaining: 0
Mutations killed
Replace fingerprint with nil
Replace :type with :type__
Replace :type/DateTime with :DateTime__
Replace let with comment
Replace earliest with nil
Replace latest with nil
Replace when-not with when
Replace days with nil
Replace > with >=
Replace > with nil
Replace days with nil
Replace 1 with 0
Replace :minute with :minute__
Replace 31 with 0
Replace 365 with 0
Replace :week with :week__
Mutations not killed (with rationale)
Replace :day with :day__ — available-temporal-buckets-for-type has its own internal default of :day for datetime types, so the :day return value from fingerprint-based-default-unit is redundant with the fallback
2026-02-25 22:07:25 +00:00
metamben
b1ece80c0d Support DB-local settings in the JVM and JS metadata-providers (#70117)
Closes QUE2-292
2026-02-25 21:52:17 +00:00
metamben
486a6fc826 Add test to prove that #35842 has been fixed (#70080)
Closes #35842
2026-02-25 21:25:19 +00:00
Eric Normand
29f75c1251 test: mutation tests for column-metadata-effective-type and nest-display-name (#69328)
* [Mutation Testing] Add tests for metabase.lib.field/fieldable-columns

* test: add mutation tests for column-metadata-effective-type and nest-display-name

Adds tests that exercise:
- type-of fallback to :base-type when :effective-type is absent
- type-of preference for :effective-type over :base-type
- temporal extraction returning :type/Integer
- temporal truncation preserving effective type
- nested field with nil parent display-name graceful fallback

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 21:03:39 +00:00
metamben
66dc6b6cdc Add test to prove that #57978 has been fixed (#70076)
Closes #57978
2026-02-25 23:37:16 +03:00
metamben
7433f38a22 Make visible-columns for cards respect field visibility (#70040)
Closes QUE2-5
2026-02-25 23:36:59 +03:00
Cam Saul
71606de98c Test to prove #28060 is fixed 🔧 (#69865)
* Test to prove #28060 is fixed 🔧

* Update src/metabase/driver/mysql.clj

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

* Update src/metabase/driver/mysql.clj

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

* Fix syntax error from PR feedback suggestion

* Test fix 🔧

* Fix 🔧

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2026-02-25 17:25:35 +00:00
Braden Shepherdson
d2e8fcac5b [MBQL lib] Export some healthy API functions; drop some API nses (#69666)
Fixes QUE2-350.

There are two changes here:
- Exporting some legit public functions from `lib.core`
- "Befriending" the `enterprise/sandbox` and `lib-be` modules, which are
  deeply coupled to lib and MBQL in any case.

That allows us to remove several exported namespaces:
- `lib.binning`
- `lib.convert`
- `lib.field`
- `lib.metadata.cached-provider`
- `lib.metadata.column`
- `lib.metadata.invocation-tracker`
- `lib.metadata.result-metadata`
- `lib.normalize`
- `lib.query`
- `lib.temporal-bucket`
- `lib.walk`

The functions newly exported from `lib.core` are:

- `lib.field/infer-has-field-values`, called from some BE API handlers
  and AppDB readers, producing a "cooked" value the FE wants rather than
  exposing details of how `:model/FieldValues` is stored. Single-use,
  but a legitimate export.
- `lib.field/json-field?`, checks if the passed in field is a JSON field,
  that's a valid export used in a few places.
- `lib.query/native?`, checks if the first stage of this query is native,
  that's another legit export used in a few places.

`lib.normalize/normalize` and `lib.query/query` were already exported, I
updated some usages of those functions to `lib/foo` instead.
2026-02-25 10:37:07 -05:00
github-automation-metabase
e4d1706837 Auto-update documentation for master (#70096)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-25 10:14:22 -05:00
Uladzimir Havenchyk
cc1361936a convert dashboard redux related files to typescript (#69797)
* chore: convert dashcard related redux components to typescript

* fixup

* address review

* another review iteration

* add a missing import

* cleanup
2026-02-25 17:40:38 +03:00
Nemanja Glumac
69c0a2ca90 Upgrade Cypress to v15.10.0 (#69839) 2026-02-25 15:14:45 +01:00
Ngoc Khuat
3d3bbe22db Move pulse preview endpoints to dev-only (#70068) 2026-02-25 11:15:00 +00:00
Romeo Van Snick
ba0ddc9a32 Only switch to full-width native preview at small breakpoint (#70048)
* Only switch to full-width native preview at small breakpoint

* Add e2e test for metabase#67767
2026-02-25 20:22:46 +11:00
Fraser
da223ea0a1 Updated Chromium to v144 in Cypress (#69721)
* Bump chrome to v144
2026-02-25 21:07:41 +13:00
Noah Moss
f53c8d1513 Always run Metabot-triggered refingerprinting in admin context to match sync behavior (#70087)
* always run fingerprinting in admin perms context

* address comment
2026-02-24 17:47:22 -05:00
Fraser
51d7669d7d Convert admin/permissions/utils/urls to TypeScript (#69432)
* Convert `admin/permissions/utils/urls` to TypeScript

Part of the Accelerate TypeScript Migration project.

Closes DEV-1510

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

* improve type guard

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
2026-02-25 10:18:09 +13:00
Anton Kostenko
eb20991259 Fix PR envs cleaning (#70024)
* Fix PR envs cleaning

* Add manual dispatch for pr env destroy
2026-02-24 15:16:50 -05:00
Nicolò Pretto
ec4874cfe5 re-generate lock file to remove stale deps (#70062)
* re-generate lock file to remove stale deps

* add sample apps to the deps for the package
2026-02-24 19:02:35 +01:00
Ngoc Khuat
8f442ca39b Add diagnostic logging for duplicate alert investigation (#70020) 2026-02-24 17:20:02 +00:00
Nicola Mometto
8c6e4aa60b Ensure we can resolve map lookups (#70060)
* feat: explicit handlebars context

* chore: unit tests
2026-02-24 13:53:19 +00:00
Nemanja Glumac
3d3d49dfca Automate Crowdin context harvester and trigger pre-translation (#70035) 2026-02-24 11:11:15 +01:00
Nicolò Pretto
bba60088cb emb-1300: use plugin for handleLink in eajs and fix double sdk plugin init (#69961)
* emb-1300: use plugin for handleLink in eajs and fix double sdk plugin init

* typo and fix unit test

* restore old comment
2026-02-24 09:25:38 +01:00
metamben
981113ef47 Use lib namespace on properties instead of real namespace names (#69808)
* Use lib namespace on properties instead of real namespace names

Closes QUE2-279
2026-02-23 22:53:37 +00:00
Braden Shepherdson
9c8e505c9f [QP] Move logging-only work inside the log/* call (#68362)
Move some logging-only computations into the `(log/* ...)` call so it won't be executed
unless the log level is sufficiently verbose for the log to actually be output.
2026-02-23 16:19:03 -05:00
Noah Moss
f4bbf2984f Add some better defaults & limits to agent API (#70033) 2026-02-23 15:35:18 -05:00
metamben
273f1677a1 Add tests for calculated display_name and fix nested name handling (#69982)
Closes QUE2-288
2026-02-23 23:23:58 +03:00
metamben
12e6b46118 Support all kinds of identity types on sqlserver (#69871)
Closes QUE2-251
2026-02-23 23:23:17 +03:00
Fraser
f27597b904 Convert AddEditSidebar to TypeScript (#69421)
* Convert AddEditSidebar to TypeScript (DEV-1499)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:45:56 +13:00
bryan
b2889824b3 Fix flaky count-of-grouping-test for Redshift by using UTC timezone (#67196)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-23 19:18:07 +00:00
Jeff Bruemmer
28cfae2e67 docs - table variables and snippets (#69983)
table variables and snippets
2026-02-23 11:34:02 -05:00
github-automation-metabase
60707e20ec Auto-update documentation for master (#70009)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-23 11:21:09 -05:00
bryan
a4e418f280 Fix OpenAPI 3.1.0 validation errors and add CI workflow (#69948) 2026-02-23 09:13:33 -07:00
Stas Gavrylov
c20bf2a943 GDGT-1755: Migrate common components to TypeScript (partial) (#69354)
* GDGT-1755: Migrate Text to TS

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

* GDGT-1755: Migrate Label to TS

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

* GDGT-1755: Migrate Subhead to TS

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

* GDGT-1755: Migrate IconWrapper to TS

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

* GDGT-1755: Migrate LabelIcon to TS

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

* GDGT-1755: Migrate use-scroll-on-mount to TS

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

* GDGT-1755: Missed TS fixes

* GDGT-1755: Migrate QueryButton to TS

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

* GDGT-1755: Migrate IconBorder to TS

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

* GDGT-1755: Remove Text.tsx wrapper, import from metabase/ui directly

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

* GDGT-1755: Adjust line height in places using new Text component

* GDGT-1755: Fix styling inconsistencies

* Update frontend Claude guidelines for typecheck/linting to use bun

* GDGT-1755: Address PR comments

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-23 18:13:01 +02:00
Alexander Polyankin
c66d31fec1 Drop table created in a e2e test (#70023)
* drop table created in a e2e test

* fix
2026-02-23 10:43:37 -05:00
Egor Grushin
93cb3bc327 lock a card display type for the VisualizationCard (#70016)
lock a card display type for the VisualizationCard in the transform inspector
2026-02-23 14:55:23 +00:00
Timothy S. Dean
52325a7503 Write Connections for Actions, Model Persistence, Uploads (#69878) 2026-02-23 09:15:35 -05:00
Fraser
dadf042982 Convert ExpandableString to TypeScript (#69084)
Closes DEV-1429

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-23 15:49:29 +02:00
Dan Stone
18e1fb02aa Revert turning on snowflake/bq tests for transform (#70017)
Revert "Re-enable Python transform tests for BigQuery and Snowflake (#67685)"

This reverts commit b6c1a51630.
2026-02-23 12:41:22 +00:00
Egor Grushin
5dd8b26770 getting rid of annoying warnings (#69975) 2026-02-23 12:17:08 +00:00
Dan Stone
b6c1a51630 Re-enable Python transform tests for BigQuery and Snowflake (#67685)
These tests were temporarily disabled on 2025-09-26 due to flakes.
Re-enabling them now to restore full test coverage.

Lets monitor and see what happens
2026-02-23 10:38:56 +00:00
Nicola Mometto
09ee4178ca Transforms inspector (#68675)
* wip: transform inspector BE

* WIP: inspect tables

* wip

* format join info as code

* wip: join info

* style

* add join stats type and display match rate

* chore: row

* chore: remove limit

* wip

* handle differerent cases for match rate and row count

* add joins table display and icons

* fix copy

* fix missing join table names

* cleanup

* cleanup

* extend match

* fix missing source table type

* add join tooltip

* chore: with join info

* wip

* wip

* add field statistics dummy component

* small ui adjustments

* small ui adjustments

* add filled rows

* order input columns like joins

* update visualization card styling

* wip: update join calc to be iterative

* add target and source stats

* add target and source stats, a filter by output fields and a tab for unmapped fields

* add target and source stats, a filter by output fields and a tab for unmapped fields

* chore: sort by order

* fix: inverse map

* add cross product warning

* add null join warning

* small QoL UI improvements

* wip: render output_row_count

* wip: native joins

* fix a bug with conditional rendering

* wip: try to pull out useful fields

* WIP: claude'd UI selection of visited_fields

* use default automatic display selection logic

* add transform mock page with mock summary section

* add mock api console log

* fix fetch wrong query metadata

* add mock lenses

* add mock lenses api

* REVERTME: ignore for deploy

* feat: schemas

* require

* feat: degeneracy check

* WIP cljc api

* wip context

* wip lenses

* update comments

* chore: visited-fields

* wip

* wip: base

* wip: triggered lens

* wip: lib

* distinguish drill lenses

* fix: return visited-fields

* wip: v2 api

* WIP: vibe'd FE

* tabs/remove mock

* account for params

* params

* ui improvements

* fix

* show fingerprinting

* fingerprint layout

* use BE fallback

* handle more complex joins

* fallback to interesting fields

* fix trigger via cljc

* remove debug

* different text

* compute-card-results in cljs

* condition trigger in cljc

* semi working

* fix card_id correlation

* remove dead code

* rename BE to just inspector

* switch to new

* ensure transform is deleted

* chore: cleanup schema

* bring back the field fingerprint info

* move cljs out of lib

* fix: schema

* minor cleanup

* appease kondo

* kondo

* remove dead code

* feat: centralize native analysis in query_analisis

* chore: remove #p

* clean up

* Gdgt 1663 move fingerprints out of the lens to data inspect (#68996)

* [transforms inspector] depend on trunk macaw (#69022)

depend on trunk macaw

* fix lint and type issues (#69017)

* remove unused lib function

* fix infinite rendering loop

* fix type lib.interestingFields

* fix

* fix: ui bug

* chore: disable visited fields for now

* chore: better unmatched-rows

* chore: exclude not nulls

* minor tweaks

* minor tweaks

* rename

* chore: tighter contract

* minor optimisation

* Gdgt 1669 make cards clickable (#69116)

* Add card link

* link to hash of question

* add clickable title

* remove tooltip

* Use MBQL info to match columns whe npossible (#69120)

use mbql info for column matching

* Gdgt 1675 disable unmatched rows view details button in inspector (#69152)

* remove row index column

* adapt viz UI, hide row index column

* Unmatched rows lens: return cards for both LHS or RHS null scenarios (#69123)

* feat: handle both cases of no join match

* feat: simple degeneracy

* export function

* remove dead fields

* only propose drill lenses that are applicable (#69169)

* Transforms inspector consistent casing for FE (#69174)

* chore: consistency

* chore: some docstrings updats

* feat: snake_case for the FE

* feat: pass visitedFields to interestingFields, remove ad-hoc logic in FE (#69175)

feat: pass visitedFields to interestingFields, remove ad-hoc logic in the FE

* feat: namespace card-ids with params (#69180)

* add estimated lens complexity (hardcoded for now)  (#69181)

* add estimated lens complexity (hardcoded for now)

* refactor: use with-metadata

* add metadata to triggers, not just cards (#69182)

* appease kondo

* chore: don't depend on git sha macaw

* reinstate metabase-enterprise.transforms.core from merge conflict

* Gdgt 1722 new UI for data summary new (#69220)

* Transforms inspector BE tests  (#69225)

* feat: inspector tests

* fix: impls

* fix: nil safe

* feat: integration tests

* make it work for both FE and BE

* fix card-results for non oute rjoin

* e2e test

* fixes

* fix: quoting

* fix for mysql/bigquery/redshift

* gdgt-1721 rework lenses navigation (#69205)

* Transforms inspector module (#69278)

* split transforms inspector into its own module, introduce transforms-rest

* handle kondo modules warnings

* fix: shadow_cljs

* kondo: fixes

* Transforms inspector be review (#69339)

* chore: align

* remove useless comments

* feat: add schema to context

* feat: simplify column-matching

* fix: visited-fields

* fix test

* remove unused

* tighter schema

* extrac-sources test

* fix: missing metadata-provider

* Gdgt 1744 combine separate averages columns into one for data summary (#69355)

* gdgt-1723 New UI for Joins Analysis (#69325)

* Gdgt 1725 allow running transform from empty screen (#69394)

* chore: move crud functions on transforms, avoid -rest modules dependencies

* fix tests

* appease kondo

* fix modules

* fix: small UI bug

* Transforms orphaned columns (#69497)

* add orphaned columns to unmatched-rows analysis

* chore: update tests

* Transforms inspector analytics (#69484)

* feat: flow discover/lens through transform events

* track transform_id in query execution

* feat: add transform-inspector ids/params to query info

* feat: add inspector specific /query endpoint

* feat: hook FE to new api

* feat: add lens_id/params to view

* feat: add them to ua

* fix: pass params too

* fix: use text.type

* fix test

* chore: remove unused requires

* chore: events

* fix FE part

---------

Co-authored-by: Egor Grushin <egor@metabase.com>

* fix: use lib functions instead of manual mbql construction (#69519)

* fix: use lib functions instead of manual mbql construction

* chore: refactor utils

* cleanup

* more manipulation with lib

* bugfix

* strip fields/filters early

* do it in util function

* fix: bad merge resolution

* kondo

* another bad merge resolution

* chore: indent

* Gdgt 1754 handle slow loading lens indicator (#69334)

* lens loading indicator

# Conflicts:
#	frontend/src/metabase/transforms/pages/TransformInspectPage/TransformInspectPage.tsx
#	frontend/src/metabase/transforms/pages/TransformInspectPage/components/LensContent/LensContent.tsx

* add onCardLoaded handler to context

* Gdgt 1724 new UI column (#69282)

* Gdgt 1783 fix wrong args passed to lens query (#69546)

* fix wrong args being passed to lens queries

* improve naming of query parameters

* remove whitespaces from merge resolution

* add transforms api test

* feat: i18n the inspector strings (#69565)

* fix dark mode color issues (#69570)

fix bg fixed to white

* Gdgt 1737 use card metadata instead of parsing card ids (#69583)

* use card metadata instead of parsing ids

* improve way of getting the table name from cards

* use macaw still, TODO

* port some query-analysis to sql-tools (#69732)

* chore: port some query-analysis to sql-tools

* remove sql-tools from transforms

* chore: vendor macaw functions, appease kondo

* refactor

* chore: refactor

* side agnostic

* revert manual delete, closes https://linear.app/metabase/issue/GDGT-1730/pre-merge-blocker-revert-t2delete-on-transform-once-uxw-3021-is-fixed

* fix: always sync audit db on change

* dead code

* fix: use honeysql instead of building sql manually (#69774)

* GDGT-1791 Maximum depth error in console (#69754)

GDGT-1791 fix and refactor useCardLoadingTracker

* Gdgt 1651 add frontend e2e tests for transform inspector UI (#69677)

* GDGT-1823 make guarantee that LensContent is always stores one lens data (#69800)

* fix: 404 on lens not found (#69838)

* fix: 404 on lens not found

* chore: don't pmap

* fix: remove nil values from statistics

* fix

* Transforms inspector self review be (#69843)

* style

* chore: reuse resolve-join-sides

* add from-table-id for mbql queries too

* split context in mbql/native, don't union

* whitespace

* fix: preprocess native queries

* fix: update tests

* fix

* revert unrelated commit that made in the branch erroneously

* Gdgt 1812 better handle missing sources in lens inspector (#69848)

* Gdgt 1817 add snowplow product events fe (#69801)

* Add analytics events

# Conflicts:
#	frontend/src/metabase/transforms/analytics.ts

* add analytics tests

* simplify and improve lens loaded tracking event

* Move the idempotence check to useLensLoadedTracking

* GDGT-1831 replace unstyled button with a box to get rid of button in button error

* chore: transform lens_params

* GDGT-1786: Parametric lens navigation improvement (#69821)

* GDGT-1757: Refactor Column Comparison utils grouping and scoring logic (#69853)

* Improve types with entity ids (#69891)

* add concrete type declarations and usage for InspectorLensId, InspectorCardId, InspectorSectionId

* add better type to lens params

* cleanup of utils

* improve type for displaySettings

* use entity aliases in more places

* use existing type aliases for source and target

* add comment about InspectorTriggerCondition type

* unify prefix for inspector types

* remove spurious catch

* deduplicate types between metabase-api and lib

* Remove unused query

* fix provided tags for transform inspector

* add alerts and drill buttons test for default lens sections (#69899)

* restrict join analysis to single condition joins

* fix: bad merge reoslution

* fix types in lens test

* use isa function to detect type

* use concrete table id type alias

* use Urls.openInNewTab util

* remove empty mocks file

* use concrete table id type

* move lib for transform inspector to src/transforms/lib

* remove superflous log in e2e tests

* add proper SchemaName type

* remove superflous export

* revert move of isFetchBaseQueryError

* remove obsolete test

* use correct SchemaName type alias

* use correct VisualizationDisplay type

* remove leftover unused type

* remove superflous export

* Use CardId type alias

* discern lens also by based on params when tracking loading

* GDGT-1839 addressing the PR comments

* GDGT-1839 addressing the PR comments

* GDGT-1839 addressing the PR comments

* GDGT-1839 move getLensKey and LensHandle from api/tags directory

---------

Co-authored-by: Egor Grushin <egor@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub@chodorowicz.com>
2026-02-23 10:16:35 +00:00
Ngoc Khuat
a68b644ec8 Add prominent CTA button per failed transform in failure email (#69458) 2026-02-23 14:51:28 +07:00
Fraser
ca002fd953 Convert app-embed and app-public to TypeScript (#69438)
* Convert `app-embed` to TypeScript

Part of the Accelerate TypeScript Migration project.

Closes DEV-1516

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:49:58 +13:00
Anderson
ba5de0f2fa Show Python upsell on self hosted (#69759)
* Show Python upsell on self hosted

* Add e2e tests

* Fix unit test

* Simplify TransformsUpsellPage a bit more, fix tests

* Simplify logic

* Fix e2e and unit test

* Update self-hosted python upsell as per new design / Code clean up

* Fix unit test and also add a new one for useTransformsBilling

* Remove e2e tests to be moved to a new PR

* Fix cta link and bullet points icon alignment
2026-02-20 22:42:10 +00:00
Nathan Voxland
b4f717609e Add support for OpenID Connect (#69538) 2026-02-20 16:18:58 -06:00
Oleksandr Yakushev
3f898be45a [match] Implement replace-lite and use it instead of replace (#69270) 2026-02-20 23:39:57 +02:00
Edward Paget
071fc345b4 fix: better check for dirty collection state (#69974)
Our frontend code that prevents sending unchanged collections missed
tenant collections being added to the payload. This fixes both the
frontend to make sure we don't send when there are no changed
collections and it updates the backend actually check if collections are
being changed rather than just checking if the collections map exists.
2026-02-20 13:13:27 -06:00
Timofey Kachalov
08c4a89f91 fix(EmbedJS): Downloads fail on guest embedded questions (#69972) 2026-02-20 23:04:33 +04:00
Edward Paget
7d2d6571cb fix: transforms collections set setting on import (#69852)
* fix: transforms collections set setting on import

Also turns off the transforms sync setting if there are not transform
related models in the import

* fix: transform/snippet settings on collection sync

Updates our check for 'did transforms or snippets change on remote' to
examine collections in the respective namespaces so an import with only
transform collections (or snippet collection) creates the correct
settings on the importing instance.

* fixup! better handling for custom vs builtin tags

* fixup! better conflict checking of namespaced cols

* fixup! explicit connectionb for token cache

* fixup! PR feedback
2026-02-20 10:54:57 -06:00
Ryan Laurie
f6f2a31b6a Enable automated patch releases (#69971)
enable automated patch releases
2026-02-20 16:26:26 +00:00
github-automation-metabase
1342901722 Auto-update documentation for master (#69953)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-20 09:53:52 -05:00
Timofey Kachalov
a554da88bd Change the way of building the base_ref embedjs bundle (#69910) 2026-02-20 15:55:19 +04:00
Mahatthana (Kelvin) Nomsawadi
7fa10713ea Support passing dataPicker to SDK components to force staged data picker (#69631)
* Adding dataPicker to embedding-data-picker redux store

* Refactor: move `dataPicker` redux

Move from interactive embedding store to embedding data picker store

* Add `dataPicker` type for the SDK

* Fix storybook id value

* Accept `dataPicker` in modular embedding SDK

* Make the doc more suitable for markdown table in the docs site

* Add test for InteractiveQuestion

* Fix drillThroughQuestionProps type

* Add tests for drillThroughQuestionProps.dataPicker

* Fix SDK components can't specify different `entityTypes` or `dataPicker`

* Fix doc error

* Fix comment grammar

* Fix wrong file name

* Clarify redux slice usage with a comment

* Make context more specific to avoid misuse

* Add `question` back to SDK's `entityTypes` on the API doc
2026-02-20 11:27:46 +00:00
Nemanja Glumac
43e3fa694d Revert "Run container as non-root, simplify H2 handling in entrypoint (#64977)" (#69958)
This reverts commit 54bd11c5b9.
2026-02-20 10:42:48 +00:00
lbrdnk
370a4dff14 Enable check_snippet endpoint (#69892)
* Enable the check_snippet endpoint

* Param

* Test

* Test
2026-02-20 10:04:58 +01:00
Uladzimir Havenchyk
dc319ca76a feat(dashboard): move subscriptions to action menu (#64950)
* feat(dashboard): move subscriptions to action menu

* fix unit tests

* fix e2e tests

* fix console warning about uncontrolled component

* fix more tests

* fix remaining test

* bring test back
2026-02-20 08:39:55 +00:00
Romeo Van Snick
b08d62e316 Transforms with params UI (#69728)
* Validate transform queries can be preprocessed

* remove prn

* update backend error messages

* Add support for custom toggleTemplateTagEditor

* Allow passing setTemplateTagConfig to TagEditorParam

* Add support for storing parameter values when question changes

* Add template-tags tab

* Add template tag sidebar

* Allow saving optional template tags or tags with a default value

* Show error message on save

* Add new spec for transform template tags

* Avoid sharing state when navigating

* Add combination test for template tag types in transforms

* Add definitionTab helper

* Add test for multiple template tags

* Fix error message

* Fix tooltips in test

* Remove tooltip check in tests

* Use getErrorMessage to get error message in toast

* Only return message if it is not empty

* Wrap error message in form

* Use H.createTestNativeQuery helper

* Move variableTemplateTags and isVariableTemplateTag to Lib

* Use more conventional key to reset uistate

* update backend error messages again

* Revert "Wrap error message in form"

This is now handled in the api

This reverts commit 9efecaf261.

* Fix test

---------

Co-authored-by: William Zimrin <william@metabase.com>
2026-02-20 13:15:02 +11:00
Alexander Polyankin
ba302fc0ef Diagnostics cleanup pulled from the metrics branch (#69926) 2026-02-20 01:15:01 +00:00
Anderson
716a26ef75 Remove Exit sidebar menu item now that app switcher exists (#69886) 2026-02-19 23:53:20 +00:00
dpsutton
f1de74d0d2 [master] security fixes (#69924)
* security fixes

* Use actions dataset

Symptom:
We started having tests failing

like:

```
expected: {:has_more_values false,
           :values [["African"] ["American"] ["Artisan"]]}
  actual: {:has_more_values false, :values (("American") ("Artisan") ("Asian"))}
    diff: - {:values [["African"] ["American"] ["Artisan"]]}
          + {:values [["American"] ["Artisan"] ["Asian"]]}
```

and

```
expected: {:has_more_values true,
           :values [["African"] ["American"] ["Artisan"] ["Asian"] ["BBQ"]]}
  actual: {:has_more_values true,
           :values (("American")
                    ("Artisan")
                    ("Asian")
                    ("BBQ")
                    ("European Shop"))}
    diff: - {:values [["African"] ["American"] ["Artisan"] ["Asian"] ["BBQ"]]}
          + {:values [["American"]
                      ["Artisan"]
                      ["Asian"]
                      ["BBQ"]
                      ["European Shop"]]}
```

Identify:
```
modified   src/metabase/actions/execution.clj
@@ -35,6 +35,10 @@
                                                               [:model_id      ::lib.schema.id/card]
                                                               [:dataset_query ::lib.schema/native-only-query]]
    request-parameters]
+  (let [db-name (-> ((requiring-resolve 'metabase.test/db)) :name)]
+    (when-not (.startsWith db-name "actions-test-data")
+      (println clojure.test/*testing-vars*)
+      #_(clojure.repl/pst (Exception. "how here?") 500)))
   (log/tracef "Executing action\n\n%s" (u/pprint-to-str action))
   (try
     (let [parameters (for [parameter (:parameters action)]
@@ -61,6 +65,10 @@
 (defn- execute-custom-action! [action request-parameters]
   (let [{action-type :type} action]
     (actions/check-actions-enabled! action)
+    (let [db-name (-> ((requiring-resolve 'metabase.test/db)) :name)]
+      (when-not (.startsWith db-name "actions-test-data")
+        (println clojure.test/*testing-vars*)
+        #_(clojure.repl/pst (Exception. "how here?") 500)))
     (let [model (t2/select-one :model/Card :id (:model_id action))]
       (when (and (= action-type :query) (not= (:database_id model) (:database_id action)))
         ;; the above check checks the db of the model. We check the db of the query action here
@@ -165,8 +173,14 @@
   (let [k (keyword (:kind action-instance))]
     (legacy->current k k)))

+(require 'clojure.repl)
+
 (defn- execute-implicit-action!
   [action request-parameters]
+  (let [db-name (-> ((requiring-resolve 'metabase.test/db)) :name)]
+    (when-not (.startsWith db-name "actions-test-data")
+      (println clojure.test/*testing-vars*)
+      #_(clojure.repl/pst (Exception. "how here?") 500)))
   (let [model-id        (:model_id action)
         implicit-action (parse-implicit-action action)
         {:keys [query row-parameters]} (build-implicit-query action implicit-action request-parameters)
```

I modified the action execution to print out test vars that weren't
using the correct dataset. A few need cross datasets to ensure can't run
on different dbs, and a few don't matter because they assert that
permissions fail or data is missing. But this
execute-action-permission-test didn't, and it's last branch asserts
"Admin can still execute actions" and that seems to have been the cause
of our troubles
2026-02-19 15:16:26 -08:00
Rodrigo López Dato
54bd11c5b9 Run container as non-root, simplify H2 handling in entrypoint (#64977)
* Run container as non-root, simplify H2 setup

* Permissions

* add to bin/Dockerfile

* Update Dockerfile

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* Update bin/docker/Dockerfile

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* bad bot :(

* docs

* bring back JAVA_TIMEZONE

* don't hardcode default h2 directory in command

* fix link

* update openapi

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2026-02-19 19:25:16 -03:00
Nemanja Glumac
2e3efef978 Use core.setFailed instead of throw for missing artifacts (#69897)
When an artifact doesn't exist (expected for new commits), the
fetch-artifact action was using throw new Error() which causes
GitHub Actions to report "Unhandled error" - confusing and noisy.

Using core.setFailed() cleanly marks the step as failed without
the scary error message.

Fixes: DEV-1581

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 23:15:33 +01:00
Rodrigo López Dato
9d9433b5b0 docs: Fix step numbering + add details on how to confirm if using H2 (#69581)
* Fix step numbering + add details on how to confirm if using H2

* fix anchor links
2026-02-19 18:19:46 -03:00
Rodrigo López Dato
f56c4e39cb Mention that the appdb schema must always be public (#69905) 2026-02-19 18:19:16 -03:00
bryan
f3fa8226cf Add debug echo to driver-decisions CI step (#69881)
Prints the mage command and args before execution so we can quickly
see what labels/flags were passed when debugging CI driver issues.

Closes: DEV-1577
2026-02-19 21:10:20 +00:00
Rodrigo López Dato
4376ecc379 Update model index limit in docs (#69933) 2026-02-19 18:08:16 -03:00
Braden Shepherdson
2c04482d27 [MBQL lib] Move leaky column logic from models.interface into lib (#69665)
Fixes QUE2-353.

`mi/normalize-result-metadata-column` called some internals to modernize
a possibly-lib, possibly-legacy column from `:result_metadata` on a
card. Pull that logic into Lib as a new exported function.
2026-02-19 20:52:27 +00:00
bryan
be492dc637 Remove unused HTTP action code paths (#69764)
* Remove dead code for actions

* Disable HTTP action type at API level

* clarify thrown exceptions

* Remove HTTP action tests

HTTP actions are now blocked at the API level; these tests cover
functionality that's no longer accessible.

* Remove remaining HTTP action references from api_test

The previous commit missed several HTTP action usages:
- all-actions-default helper function
- list-actions-test action-1 binding
- action-parameters-test (now uses query action)
2026-02-19 20:07:24 +00:00
Anderson
b2fb97a98a Replace 'Set up git sync' with 'Set up remote sync' on Data Studio sidebar (#69883) 2026-02-19 19:11:52 +00:00
William
347f3f11b4 Transforms with parameters (#69592)
We want to support transforms with template tags, as long as those tags aren't required or have default values. However, if we do that, the backend should actually verify that we do in fact have values for all relevant template tags. This pr adds basic validation logic to transform creation and update routes -- essentially, we just run qp.preprocess/preprocess and see if we get an error.
2026-02-19 12:03:00 -06:00
Edward Paget
d59d58e61a Fix narrow symbol downloads with tests (#69811)
* Fix downloading currency values in narrowSymbol format (#69779)

* Add tests for narrowSymbol currency style in downloads

---------

Co-authored-by: Will Bryant <will.bryant@gmail.com>
2026-02-19 11:39:11 -06:00
Timofey Kachalov
c8d8369fec feat(embed-js): Add docs hint for additional wizard properties (#69906) 2026-02-19 21:14:10 +04:00
Sébastien
ecaff38ac0 improved doc generation for EAJS (#69890) 2026-02-19 17:30:20 +01:00
Nemanja Glumac
951f74665d Do not cache UV (#69902) 2026-02-19 17:18:14 +01:00
Dan Stone
acf4530cc6 Move transform metering back into EE module (#69840)
* Move transform metering back into EE module

The defenterprise shadowing was not working as the metering function was
moved

* Add test of EE stats
2026-02-19 16:05:06 +00:00
Rodrigo López Dato
8eccd8a0f9 Capitalize Jar -> JAR (#69900) 2026-02-19 11:26:31 -03:00
Nemanja Glumac
83fdafad01 Introduce Copilot code review instructions (#69846) 2026-02-19 11:14:54 +01:00
github-automation-metabase
71cfad67bb Auto-update documentation for master (#69888)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-18 20:43:17 -05:00
Fraser
103e9056e1 Convert QueryButton to TypeScript (#69419)
* Convert QueryButton to TypeScript (DEV-1497)

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

* Tighten types
2026-02-19 14:15:56 +13:00
Cam Saul
984cf44eca More robust visualization settings normalization (#69860)
* More robust visualization settings normalization

* Remove stray `println`
2026-02-18 16:20:00 -08:00
Jeff Bruemmer
d2f7234d7f docs - sql table variable (#69817) 2026-02-18 17:07:30 -05:00
Timothy S. Dean
4ab6f9df02 Transforms DB Connection (#68883)
Problem: When a database is configured for both SQL access and Transforms, any feature with SQL access (like raw SQL questions) inherits the elevated permissions (CREATE, DROP, INSERT, etc.) that Transforms need.

Solution: Admins can _optionally_ configure write credentials alongside existing read credentials. One logical database, two connection types. Specific code paths opt in to using write credentials; by default everything uses a read-only connection.

How: This PR adds a new `write_data_details` column on `Database`. If `write_data_details` isn't configured, everything will still use `details` as before. When it is configured, it acts as a set of overrides on top of `details`, but only in code paths that require write permissions. There should be no behavioral change for existing deployments.
2026-02-18 13:57:16 -07:00
Edward Paget
4c0c9aa08f fix: log parameter not nil value (#68200) 2026-02-18 14:29:50 -06:00
Rodrigo López Dato
32a00c99e5 Explain how DB routing and query caching work together (#69855)
* Explain how DB routing and query caching work together

* Update docs/configuring-metabase/caching.md

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2026-02-18 19:38:19 +00:00
github-automation-metabase
559c2f27de Auto-update documentation for master (#69833)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-18 11:44:49 -05:00
Nemanja Glumac
fd775c440d Split long running e2e specs into smaller chunks (#69844) 2026-02-18 17:18:36 +01:00
Nemanja Glumac
4a79872533 Clean up more unneeded dependency "resolutions" (#69837) 2026-02-18 17:14:53 +01:00
Timofey Kachalov
127132f8a6 Measure Embedding SDK Hosted Bundle bundle size (#69743) 2026-02-18 19:57:09 +04:00
Nathan Voxland
140d1adcb7 Remote-Sync: Support other git providers (#69675) 2026-02-18 09:37:25 -06:00
lbrdnk
639c8debc9 Enable native entity validation (#69784)
* Enable native entity validation

* Adjust tests

* Adjust test

* Adjuts tests

* Enable check_card and check_transform for native entities

* Adjust test to check child staleness

* Adjust test

* Adjust e2e test
2026-02-18 14:23:18 +01:00
Oleksandr Yakushev
795fa21b9d Add &parents to match-lite and rewrite remaining match/match-one usages (#69259) 2026-02-18 15:04:04 +02:00
lbrdnk
2f043ea9d2 Sqlglot review follow-up (#69788)
* Review remarks (incl. .sqlglot-version removal)

* Use uv.lock

* Restore batch-lookup-table-ids

* Adjust test

* Apply suggestions from code review

Co-authored-by: bryan <bryan.maass@gmail.com>

* Add sqlglot version parsing test

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2026-02-18 13:23:29 +01:00
Dan Stone
0e113a5c68 Accept string target :type in transform test helper (#69804)
It makes sense to use strings in http tests because that is what the
http-client will accept as json.

If a string target :type is supplied, we convert it to a keyword to
ensure we can dispatch to the intended method.
2026-02-18 11:06:04 +00:00
Uladzimir Havenchyk
e3ec99133a chore: convert IconBorder component to typescript (#69735)
* chore: convert IconBorder component to typescript

* pass rest parameters

* inline component

* fixup
2026-02-18 06:19:21 +00:00
Fraser
cd8c4b1e98 Convert lib/syncing to TypeScript (#69428)
* Convert `lib/syncing` to TypeScript

Part of the Accelerate TypeScript Migration project.

Closes DEV-1507
2026-02-18 16:16:10 +13:00
Romeo Van Snick
ead4e7d4d9 Fix unreferenced dependency flakes (#69535)
* Scroll item into view

* Fix sidebar test

* Wait for page to be visible
2026-02-18 14:15:52 +11:00
Fraser
f3fe43bb86 Convert LoginHistory to TypeScript (#69412)
Convert LoginHistory to TypeScript (DEV-1491)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 14:36:39 +13:00
Fraser
e385103a21 Convert LimitPopover to TypeScript (#69076)
* Convert LimitPopover to TypeScript

Closes DEV-1421

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-18 14:10:11 +13:00
Nathan Voxland
13681a004a Improve event creation remote-sync (#69768) 2026-02-17 18:05:08 -06:00
Fraser
a8715223ae Convert embedding/saved-entity-picker/utils to TypeScript (#69442)
Part of the Accelerate TypeScript Migration project.

Closes DEV-1520

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:29:25 +13:00
Fraser
3cbf8919a7 Convert lib/string to TypeScript (#69424)
Part of the Accelerate TypeScript Migration project.

Closes DEV-1505

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:29:11 +13:00
Oleksandr Yakushev
d4702e10e0 Merge remaining match -> match-many rewrites (#69686)
* [match] Implement match-many as a replacement for match

* [match] Add proper docs to match-lite and match-many
2026-02-17 23:56:04 +02:00
Braden Shepherdson
c8cd828410 [MBQL lib] Don't export a dynamic var; add with-card-clean-hook macro (#69662)
Fixes QUE2-354.

`lib/with-card-clean-hook` can be used to bind a callback function to
any material changes made by the `lib.convert/clean` process, which
generally indicates errors.
2026-02-17 21:36:48 +00:00
Edward Paget
aa5c870dc4 fix: cancelling remote sync tasks dismisses modal (#67613)
* fix: cancelling remote sync tasks dismisses modal

Previously we didn't close this modal until the task reached a
'cancelled' state which could take several seconds.

* fixup! PR feedback
2026-02-17 15:08:18 -06:00
Kevin Kelleher
f4aa0cc722 Visualizer trend lines and bug fixes: colors, settings, legends, axes (#69296) 2026-02-17 15:54:47 -05:00
metamben
764befaffb Document :metabase.lib.field/simple-display-name (#69590)
* Document :metabase.lib.field/simple-display-name

Closes QUE2-286

* Fix merge
2026-02-17 23:08:32 +03:00
metamben
dbced47022 Name the default join strategy (#69748)
Closes QUE2-285

The original idea was making the :strategy key required and leaving the setting of the value to the normalization, but
I decided not to go down that road. Here's why: there are multiple places on the path of constructing a join where we
can specify the join strategy but don't have to. These steps are not going through normalization and introducing
normalization would be inefficient and feel strange. Also, it would need to be done at several points, so it doesn't
seem a gain in the end. Because of this, all this PR does is naming the default strategy, so that changing it should
be possible at a single point. (Doing this would be a bad idea, so this PR is meant to be a documentation
improvement.)
2026-02-17 23:08:21 +03:00
Edward Paget
224d17965d fix: allow uploads when schema is unrestricted (#69657)
* fix: allow uploads when schema is unrestricted

* fixup! add upload enabled flag

* Update impl.clj

* fixup! where upload flag is set
2026-02-17 13:26:36 -06:00
Abed Habli
0b644a038f Docs v59: Nav UI update -- Grid icon and Admin rename (#69803)
* Update gear icon

* Update docs/data-modeling/json-unfolding.md

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

* Update docs/data-modeling/json-unfolding.md

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

* Update docs/embedding/sdk/quickstart-with-sample-app.md

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

* Update docs/embedding/sdk/quickstart.md

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

* Update docs/embedding/full-app-embedding-quick-start-guide.md

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

* Update docs/embedding/full-app-embedding-quick-start-guide.md

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

* Update docs/people-and-groups/user-provisioning.md

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

* Update docs/permissions/application.md

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

* Update docs/permissions/data.md

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

* Update docs/util/resources/introduction.md

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

* Update docs/usage-and-performance-tools/audit.md

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

* Apply suggestion from @jeff-bruemmer

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

* Update docs/embedding/public-links.md

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

* Update docs/embedding/public-links.md

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

* Update docs/people-and-groups/api-keys.md

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

* Update docs/people-and-groups/api-keys.md

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

* Update docs/people-and-groups/api-keys.md

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

* Remove few "ons"

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2026-02-17 20:16:14 +01:00
github-automation-metabase
65c102daf2 Auto-update documentation for master (#69781)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-17 11:14:20 -05:00
Nathan Voxland
5da65b6c52 Un-publishing remote-sync'ed library tables should remove them from the git repo (#69757) 2026-02-17 09:57:31 -06:00
Jeff Bruemmer
5f66a26a53 docs - one-shot sql gen (#69766) 2026-02-17 15:36:16 +00:00
Jakub Chodorowicz
75db6b5973 split large data model shared spec cypress file (#69744)
* split large data model shared spec cypress file

* split 2nd group further, rename files
2026-02-17 16:31:27 +01:00
Uladzimir Havenchyk
085fc52dca chore: cleanup relationships which we never show (#69786) 2026-02-17 17:24:11 +03:00
Uladzimir Havenchyk
b404c13d0c chore: convert dashboard actions to typescript (#69737)
* chore: convert dashboard actions to typescript

* cleanup

* fix unit test

* address review

* fix typecheck
2026-02-17 17:14:08 +03:00
Uladzimir Havenchyk
727664ccc6 chore: cleanup moment leftovers (#69733) 2026-02-17 16:29:31 +03:00
Jeff Bruemmer
97fa5da0c0 docs - embedding native question (#69762)
native question
2026-02-17 08:28:01 -05:00
Kamil Mielnik
a1b8cbca83 GDGT-1781 Fix flaky "should check out transform into a new workspace from the transform page" e2e test (#69619) 2026-02-17 13:26:48 +00:00
Gabriel Moreno
e0d953e257 Implement improved illustration for in-app Library upsell (#69760)
feat: add new library upsell illustrations
2026-02-17 09:14:08 -04:00
Nemanja Glumac
f405f3d36a Remove set-value and unset-value from "resolutions" (#69787) 2026-02-17 13:10:40 +00:00
Fraser
554bb10750 Convert Heading to TypeScript (#69064)
* Convert Heading to TypeScript

Closes DEV-1409

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

* Delete heading and replace with title

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-18 00:20:06 +13:00
Kamil Mielnik
c51eeace1d Visualization Typescript Conversions - lib/dom.js (#69630) 2026-02-17 17:30:01 +07:00
Mahatthana (Kelvin) Nomsawadi
da01813210 Fix flaky view-and-curate-content.cy.spec.ts (#69749)
Fix flaky test
2026-02-17 10:03:49 +00:00
Fraser
2a12752ec7 Convert lib/security to TypeScript (#69422)
Part of the Accelerate TypeScript Migration project.

Closes DEV-1504

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:45:14 +13:00
lbrdnk
7da41b4874 Add uv to build docs and dev-install (#69727)
* Add uv to build docs and dev-install

* Update docs/developers-guide/build.md

Co-authored-by: bryan <bryan.maass@gmail.com>

* Add also python to mise.toml

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2026-02-17 09:19:35 +01:00
Kamil Mielnik
7cab7b1458 GDGT-1740 Datamodel Typescript Conversions (#69343) 2026-02-17 15:12:39 +07:00
Fraser
801720f077 Convert lib/schema_metadata to TypeScript (#69425)
* Convert `lib/schema_metadata` to TypeScript

Part of the Accelerate TypeScript Migration project.

Closes DEV-1506

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:03:57 +13:00
Cam Saul
bd1e91191c Map Snowflake big integers to :type/BigInteger (#67609)
* Map Snowflake big integers to :type/BigInteger (fix #63600)

* Test fixes 🔧

* Test fixes 🔧

* Test fix 🔧

* More test fixes 🔧

* Another round of test fixes 🔧

* (Hopefully) final test fix 🔧

* Code cleanup

* Revert changes that broke Clickhouse test

* Test fix 🔧
2026-02-16 17:03:13 -08:00
Fraser
d4cb2fb735 Convert Alert to TypeScript (DEV-1493) (#69415)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:47:08 +13:00
Rodrigo López Dato
5259af771e Fix navigate_to not doing anything in full-app embedding (#69761) 2026-02-16 23:47:11 +00:00
Romeo Van Snick
f3f72f8cb3 Fix missing availableHeight on model native editor (#69723)
* Fix missing availableHeight on model native editor

* Add repro for metabase#69722
2026-02-17 10:42:47 +11:00
Fraser
a46e4da604 Convert PermissionsTabs to TypeScript (#69080)
* Convert PermissionsTabs to TypeScript

Closes DEV-1425

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 12:21:15 +13:00
Fraser
4568848fb0 Convert common/hooks/use-scroll-on-mount to TypeScript (#69440)
* Convert `common/hooks/use-scroll-on-mount` to TypeScript

Part of the Accelerate TypeScript Migration project.

Closes DEV-1518

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:20:51 +13:00
Fraser
a6bf8e9326 Convert lib/encoding to TypeScript (#69413)
* Convert `lib/encoding` to TypeScript

Part of the Accelerate TypeScript Migration project.

Closes DEV-1490

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:19:35 +13:00
Kevin Kelleher
32b8ab866d Default viz behavior fixes (#69664) 2026-02-16 17:39:16 -05:00
Egor Grushin
bbf5aebd5a Gdgt 1774 incremental update field not displaying in transforms (#69740)
* GDGT-1774 fetch metadata to enable field picking in incremental transform settings

* GDGT-1774 add e2e reproduction
2026-02-16 22:01:44 +00:00
Ryan Laurie
55d4145794 Update workflow triggers (#69758)
update workflow triggers
2026-02-16 19:47:56 +00:00
Anderson
98f4633388 Add tracking events for when Dependency Graph is opened for an entity (#69604)
* Add events for transform run tags and dependency diagnostics row selection

* Fix e2e test

* Adjust event as per review / Fix e2e tests

* Add tracking events for when Dependency Graph is opened for an entity

* Add remaining e2e tests

* Update simple_event/jsonschema/1-0-0
2026-02-16 18:59:36 +00:00
Dan Stone
d987764034 Fix bigquery/snowflake transforms tests (#69566)
* Add python transforms .yml for manually verifying flakes

* Fix bigquery/snowflake failing tests

* Fix bigquery name quoting

* Use explicit schema in table gens

* Schema fixes for bigquery
2026-02-16 18:34:24 +00:00
Maksym Yakubych
7bf8c80d42 fix: double new lines are not pasted correctly into metabot prompt input (#69493) 2026-02-16 09:42:37 -06:00
Maksym Yakubych
a971f7972b feat: add @ mention to metabot placeholders (#69374) 2026-02-16 09:41:32 -06:00
Nicola Mometto
cfcba5160e remove task logs from usage analytics (#69739) 2026-02-16 14:30:56 +00:00
metamben
04e14dcee2 Remove :metabase.lib.field/original-temporal-unit and document friends (#69627)
* Remove :metabase.lib.field/original-temporal-unit and document friends

Closes QUE2-287

* Remove unused alias
2026-02-16 16:34:00 +03:00
Jeff Bruemmer
832a04aa91 docs - box plot (#69689)
* box plot docs

* Optimized 3 images, saved 221.8 KB (44.8% smaller)

* Apply suggestion from @jeff-bruemmer

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-02-16 13:24:40 +00:00
Abed Habli
c5591f5ece Docs: Add screenshots to Data Studio docs (#69634)
* Add screenshots to Data Studio docs

* Optimized 8 images, saved 757.5 KB (38.2% smaller)

* Update docs/data-studio/data-structure.md

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

* Delete docs/data-studio/images/sync-settings.png

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2026-02-16 12:07:28 +00:00
metabase-bot[bot]
bf1610f1cd [chore] Update E2E test timings with recent data (#69685)
Update E2E test timings with averaged data

Collected timing data from 7 days of test runs.
All specs with timing data were included (simple averages).

🤖 Generated automatically by update-e2e-timings workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-02-16 10:05:05 +00:00
Romeo Van Snick
e1813fedb5 Fix more measure unit tests (#69596)
* Rewrite test to use Lib.createTestQuery

* Force OpaqueDatasetQuery to be used

* Break cyclic imports
2026-02-16 19:51:39 +11:00
Kamil Mielnik
3339413f6e GDGT-1775 Convert Gauge Viz to Functional Component + Typescript (#69468) 2026-02-16 15:19:36 +07:00
Kamil Mielnik
2958401e6e GDGT-1772 Convert Progress Visualization to Typescript + Functional Component (#69449)
* Refactor Progress viz to TypeScript and a function component

* Always run the effect
2026-02-16 15:19:01 +07:00
Nemanja Glumac
63bae84a2d Restore 60 minute timeout for BigQuery and Snowflake (#69687) 2026-02-15 14:39:14 +01:00
Ryan Laurie
ea30b8973d Fix Circular Dependency in useGetPlan (#69672)
fix circular dependency
2026-02-14 19:53:23 +00:00
Oleksandr Yakushev
7beb2e3eb1 [match] Implement match-many as a replacement for match (#68659)
[match-lite] Add support for &match anaphor and better nil handling
2026-02-14 16:24:48 +02:00
Nemanja Glumac
1f5eef83b0 Reduce the CI test timeout to 40 minutes (#69625) 2026-02-14 05:37:44 -07:00
Anderson
8a39fdc126 Add tracking events for transform run tags update and dependency diagnostics row selection (#69531)
* Add events for transform run tags and dependency diagnostics row selection

* Fix e2e test

* Adjust event as per review / Fix e2e tests
2026-02-13 20:38:45 -03:00
Denis Berezin
c2aaa12429 Python library upsell (#69600)
* Temp

* Separate EE and OSS transforms upsell logic

* Remove upsell
2026-02-13 19:52:57 -03:00
Anderson
d38d54ec94 Prevent editing snippets from question editor when remote sync is read-only (#69147)
* Prevent snippets to be edited from question editor when remote sync is read-only

* Fix test
2026-02-13 19:28:27 -03:00
Aleksandr Lesnenko
e525135245 rework chart selection ui (#69289) 2026-02-13 17:27:45 -05:00
Kevin Kelleher
d6da6f1198 Fixes for email clients in dark mode (#69023) 2026-02-13 17:08:15 -05:00
Braden Shepherdson
4d9dc19271 [deps] Ignore "soft" refs (in :fields clauses) in deps analysis (#69198)
Fixes QUE-3044.

The QP will ignore refs in `:fields` clauses which cannot be resolved, since they're output only and not critical to the meaning of the query. This change makes the deps analysis treat these "soft" refs the same way - they are not considered to break the queries.

I added some commented tests that are now captured as part of QUE-3081 rather than part of this PR.
2026-02-13 21:23:18 +00:00
Anderson
93e5f86792 Fix docs link on incremental transforms section (#69648) 2026-02-13 21:19:48 +00:00
Denis Berezin
b57eb0d2c7 Dashboard category filter not correctly populated when using multiple datasources in one graph (#69318)
* Add repro e2e test

* Dashboard filter values when connected to card with multiple datasets

* Fix kondo
2026-02-13 23:51:23 +03:00
Ryan Laurie
c55a5d23a1 Dont show hosting upsell to pro self hosted users (#69522)
dont show hosting upsell to pro self hosted users
2026-02-13 13:19:15 -07:00
Braden Shepherdson
ce9a7027cf [MBQL lib] "Befriend" legacy-mbql module, drop some exported namespaces (#69578)
Fixes QUE2-349.

This removes several namespaces from the export list for `lib` which were only used by `legacy-mbql`.

- `metabase.lib.filter.desugar.jvm`
- `metabase.lib.hierarchy`
- `metabase.lib.schema.binning`
- `metabase.lib.schema.constraints`
- `metabase.lib.schema.middleware-options`
- `metabase.lib.schema.settings`
- `metabase.lib.schema.window`
2026-02-13 20:01:20 +00:00
Nemanja Glumac
ff9690156a Remove forced jsdom resolution (#69575) 2026-02-13 20:18:46 +01:00
github-automation-metabase
34fc6597f3 Auto-update documentation for master (#69606)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-13 14:17:42 -05:00
Jeff Bruemmer
6cc10beb56 docs - agent API (#69647) 2026-02-13 18:59:39 +00:00
Dan Stone
fe3b6f83d7 Ensure race free waiting for overlapping transforms (#69287)
* Ensure race free waiting for overlapping transforms

Previously transforms could contend for the is_active slot.
A common outcome (observed with two overlapping schedules) was that one transform would crash (due to the duplicate key violation).

This commit ensures a collision will fallback to waiting to try again rather than crashing (and alerting the user).
2026-02-13 17:35:22 +00:00
Nathan Voxland
45a8927bb8 Revert "Do a rollback before discard all (#69026)" (#69633)
This reverts commit 42d0d35dbd.
2026-02-13 11:01:38 -06:00
Sébastien
60b86d85a5 Fixes isSticky class not being properly applied to dashboard parameters (#69623) 2026-02-13 17:57:16 +01:00
Nemanja Glumac
9c8bf32532 Remove Claude review workflows (#69632)
[ci skip]
2026-02-13 17:56:03 +01:00
Nathan Voxland
fe325b3de7 Improve remote sync errors with missing objects (#69591) 2026-02-13 10:22:09 -06:00
bryan
07fbc6997e Use sqlglot for SQL parsing via GraalVM Polyglot (#68911)
Introduces a unified `sql-tools` API for SQL parsing with swappable backends:
- Macaw (Java, existing) — moved from `metabase.driver.sql`, behavior preserved
- SQLGlot (Python, new) — broader dialect support via GraalVM Polyglot

Architecture: callers go through `sql-tools` which dispatches to either backend
via the `MB_SQL_TOOLS_PARSER_BACKEND` setting (default: sqlglot). The old
Macaw calls (parsed-query -> ast -> field-references) are replaced
with a `sql-tools` API (e.g. `sql-tools/referenced-fields`,
`sql-tools/validate-query`).

SQLGlot runs Python inside GraalVM Polyglot contexts managed by a reusable pool
to amortize initialization cost. The Python source and SQLGlot library are
bundled into the uberjar via a dedicated build step.
2026-02-13 15:57:17 +01:00
Jeff Bruemmer
28585e4119 docs - remove auth (#69594)
remove auth
2026-02-13 15:37:07 +01:00
John Swanson
b6b77a19e7 record group membership removals in activity log (#69316)
* record group membership removals in activity log

Previously the `PUT /api/membership/:group-id/clear` and
`DELETE /api/membership/:id` endpoints did not emit group membership
deletion events.

In the long run it would be better if `t2` were the interface for
PermissionsGroupMembership, so users didn't need to call these "blessed"
functions. But for now, let's go along with the existing pattern here,
have some blessed functions for doing things, and throw exceptions if
someone does a direct `t2/delete!` on a `:model/PermissionsGroupMembership`.

* use macro for more obvious workaround
2026-02-13 05:10:11 -08:00
Timofey Kachalov
890771e40e Prepare Shoppy Sample App GH job to run synthetic monitoring tests (#69492) 2026-02-13 16:59:32 +04:00
Kamil Mielnik
3c724995fb GDGT-1760 Remove Code & BoldCode components (#69348) 2026-02-13 12:29:57 +00:00
Kamil Mielnik
3bd26a0179 GDGT-1761 Remove Grid component (#69351) 2026-02-13 18:42:14 +07:00
Nemanja Glumac
55959131e9 Remove unused Tusk GitHub workflow (#69612) 2026-02-13 11:46:16 +01:00
Nemanja Glumac
9845f0e964 Fix ci-test-config driver quarantine name translation (#69615)
The ci-test-config.json uses driver directory names (e.g., "bigquery-cloud-sdk")
but the mage code uses internal driver keywords (e.g., :bigquery). This mismatch
meant quarantined drivers like bigquery were not being recognized.

Now uses the existing driver-directory->drivers mapping to translate config names
to internal keywords, with fallback to direct keyword conversion for names that
match (like "databricks").

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 11:28:19 +01:00
Mahatthana (Kelvin) Nomsawadi
7efad1c105 Correct the modular embedding preview usage count (#69473)
* Correct the modular embedding preview count as :internal

* Add tests

* Fix the modular embedding preview count while not breaking alerts emails

* Fix E2E tests

* Fix wrong e2e syntax
2026-02-13 09:39:32 +00:00
Romeo Van Snick
82d5e7b7ed Native query test helper (#69402)
* Add schema for test-native-query-spec

* Implement test-native-query helper

* Add js wrapper for test-native-query

* Add ts wrapper for test-native-query

* Make common parts optional

* Fix types

* Fix temporal-unit test spec

* Handle snippet tags

* Fix temporal-unit tags

* Fix card tag spec

* Simplify schema

* Add unit tests for createNativeQuery

* Add tests for test-native-query

* Add missing options

* Fix types

* Actually resolve field ref

* Code style

* Add native-query api endpoint

* Add h.createTestNativeQuery helper

* Add test for required, widget-type and default options

* Move parsing into test-spec module as it is part of the implementation

* Add example e2e test use of H.createTestNativeQuery

* Use coercer instead of decoder to validate spec too

* Fix lint

* Move adjust to update-vals

Co-authored-by: Braden Shepherdson <braden@metabase.com>

* Match threading style

* Add test for optional template tagsfg

---------

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2026-02-13 02:53:16 +00:00
Fraser
b69c4d4e26 Convert PermissionsEditorBreadcrumbs to TypeScript (#69052)
* Convert PermissionsEditorBreadcrumbs to TypeScript

Resolves DEV-1397

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 22:21:41 -03:00
Fraser
92157c0c06 Convert PermissionsSelectOption to TypeScript (#69054)
* Convert PermissionsSelectOption to TypeScript

Closes DEV-1399

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 22:20:33 -03:00
Anderson
3e5a4dc818 When instance is not on trial, still allow them to start Transforms trial if available (#69499)
* show both transforms tiers even when on trial

* Show upgrade modal in place when clicking Upgrade to Pro

* Improve comments

* Show upsell transforms trial variant when available for instance not on trial

* Fix ts

* Say 'Start trial' when trial is available
2026-02-12 22:18:13 -03:00
metamben
72699a1927 Remove :lib/model-display-name (#69579)
Closes QUE2-296
2026-02-13 02:50:46 +03:00
Romeo Van Snick
9f22d94341 Move test helper parser to lib (#69405)
* Use correct type for order-bys

* Move parser for test-query-spec into implementation

* Be more strict in test

* Convert another e2e test to prove the parsing works

* Make args optional in test-query-spec

* Use threading instead of partial

Co-authored-by: Braden Shepherdson <braden@metabase.com>

---------

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2026-02-12 23:18:40 +00:00
Nick Fitzpatrick
b7b9d20ad7 Move app switcher into Dependency Graph (#69128)
* move app switcher into Dependency Graph

* adjusting unit test

* remove z-index nonsense

* moving the app switcher up to DependencyGraphPage, small change to SelectItem
2026-02-12 17:53:55 -04:00
Noah Moss
aa4389bd60 Correct function for fetching field values in Metabot tools (#69589)
* switch function for metabot fetching field values

* refactor tests

* fix lint

* fix tests - keep existing behavior of auto-creating field values if needed
2026-02-12 16:50:14 -05:00
Noah Moss
e70631b3ab Move agent api reference out of docs/ (#69567)
move agent api reference
2026-02-12 16:36:32 -05:00
Anderson
52c4ff856d Fix 'Upgrade to Pro' button to open upgrade modal / Show two transforms tier options when on trial (#69387)
* show both transforms tiers even when on trial

* Show upgrade modal in place when clicking Upgrade to Pro

* Improve comments
2026-02-12 16:56:53 -03:00
Nathan Voxland
7bf638e16e Audit DB should exclude databasechangeloglock (#69487)
auditdb should exclude databasechangeloglock as well
2026-02-12 13:23:37 -06:00
metamben
c950231ec9 Document source-field-join-alias and resolve TODOs (#69503)
Fixes QUE2-297
2026-02-12 22:05:42 +03:00
metamben
3c774eccc8 Add missing multimethods for datetime-subtract (#69324)
Closes QUE2-336
2026-02-12 22:05:27 +03:00
Maksym Yakubych
81d20a97b9 fix: mention popup doesn't close when clicking esc (#69485) 2026-02-12 11:46:13 -06:00
Cam Saul
7c05a09619 Ban legacy keys in column metadata (#69504)
* [Lib] remove deprecated/confusing `:source-alias` key from col metadata

* Metadata schema cleanup

* Test fixes 🔧

* New test fix 🔧

* Ban legacy keys in column metadata

* Fix most tests

* More test fixes 🔧

* Kondo

* Test fix 🔧
2026-02-12 09:26:21 -08:00
Sébastien
0a05ffd76a Implement auto-generated props tables for modular embedding (#69407)
* Add TypeDoc-friendly interfaces for EAJS web component documentation

* Add TypeDoc config for EAJS web component docs generation

* Generate EAJS web component props tables via TypeDoc

* Replace manual parameter lists with auto-generated props tables

* Fixed file references in components.md and enforced types in embed.ts

* .

* .

* .

* added detail on a prop and uncommited *.md files

* added info about attributes needing to be stringified

* .
2026-02-12 16:53:03 +01:00
github-automation-metabase
e1346eb492 Update translations 2026-02-10 (#69372)
* Update translation sources 2026-02-10

* Update translations

* update localization e2e test

* Wochentag

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2026-02-12 14:45:50 +00:00
Nemanja Glumac
1f03ce8fca Update Jest snapshot headers for Jest v30 compatibility (#69564)
Jest v30 validates that snapshot files have the current documentation URL.
Updated the header from the old shortened URL to the new official URL.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 14:43:09 +00:00
Nick Fitzpatrick
bb9c1a1171 add 59 to version-helpers.ts (#69500) 2026-02-12 09:24:06 -04:00
Kamil Mielnik
2291e7f38b GDGT-1776 Query Builder transform fails at join stage (#69552)
* Fix virtualized list items rendering

* Add a repro for GDGT-1776

* Fix GDGT-1776

* Remove isHidden prop from MiniPickerItem and instead just do not render items that should be hidden

* Clean up

* Fix var access
2026-02-12 20:14:54 +07:00
Mahatthana (Kelvin) Nomsawadi
d0d678d9d8 Add "New embed" to command palette in OSS (#69447)
* Improve type ergonomics

* Add tests

* Fix proper discrinimated unions

* Add new keywords to match modern terms

* Fix types

* Sort basic actions in command palette

* Fix tests
2026-02-12 13:10:15 +00:00
Nicola Mometto
09ff1de363 Remove LIMIT in query builder transforms (#69347)
* feat(python-transforms): massage query

* feat(transforms-util): disable-max-results

* feat(QP): respect disable-max-results

* feat(transforms/ui): set disable-max-results

* add tests

* export function in lib

* use disableMaxResults

* more tests

* add e2e test

* 0 max rows is no limit

* fix test

* comment

* address review comments

* Remove trailing newline
2026-02-12 12:42:09 +00:00
Nemanja Glumac
adb448828b Upgrade Jest to v30 (#69490) 2026-02-12 12:19:28 +01:00
Nemanja Glumac
a9c4781d78 Include the relevant step outcome in Trunk inputs (#68947) 2026-02-12 12:04:28 +01:00
Nemanja Glumac
2391e04ea3 Fix the release-log workflow (#69547)
Use prepare-release-scripts action in release-log workflow

Simplify the workflow by using the shared action instead of
manually setting up bun and building release scripts.

This works because the workflow always checks out master,
so the action from master (which uses bun) is always used.

Fixes: DEV-1544

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 11:40:32 +01:00
Ngoc Khuat
636dc63968 Require explicit user approval for agent data access (#69280) 2026-02-12 10:15:56 +00:00
Nemanja Glumac
867aa1ae83 Conditionally resolve the package manager in pre-release (#69545) 2026-02-12 10:01:31 +01:00
lbrdnk
985082f059 Make ci-report work without GNU timeout (#69453)
* Make ci-report work without GNU timeout

* Destroy process on timeout

* Cherry-pick b9ff360230

---------

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2026-02-12 09:22:31 +01:00
Sébastien
6b5577a351 Fix flaky embedding sdk backward compatibility test (#69540)
* fixed e2e test

* .
2026-02-12 07:26:24 +00:00
Romeo Van Snick
8d285e7bee Fix broken measure unit tests (#69515)
* Allow passing measures to entities schema

* Fix measures test

* Use toJsQuery
2026-02-12 13:57:47 +11:00
Fraser
fe11f27110 Convert JobInfoApp to TypeScript (#69073)
* Convert JobInfoApp to TypeScript

Closes DEV-1418

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:25:11 +13:00
Fraser
3bceaecf2b Convert PasswordReveal to TypeScript (#69061)
* Convert PasswordReveal to TypeScript

Closes DEV-1406

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:24:45 +13:00
Fraser
85b82b52f6 Convert CopyWidget to TypeScript (#69056)
* Convert CopyWidget to TypeScript

Closes DEV-1401

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:23:32 +13:00
Fraser
8e03727b66 Convert dashboard/actions/revisions to TypeScript (#69437)
Part of the Accelerate TypeScript Migration project.

Closes DEV-1515

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:23:04 +13:00
Fraser
b5e052b0c9 Convert JobTriggersModal to TypeScript (#69072)
* Convert JobTriggersModal to TypeScript

Closes DEV-1417

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:40:52 -07:00
Fraser
bdb2ce7dae Convert UsefulQuestions to TypeScript (#69069)
* Convert UsefulQuestions to TypeScript

Closes DEV-1414
2026-02-11 17:39:55 -07:00
William
17a3afa85e Add table template tags (#68922)
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2026-02-11 23:28:16 +00:00
Fraser
50801fc441 Pin bun version in workflows (#69514) 2026-02-12 12:04:10 +13:00
Denis Berezin
31516230f5 Update Upsell to match design (#69488)
* Update Upsell to match design

* Remove loader for trial message
2026-02-12 02:03:02 +03:00
Fraser
a678c2ff8e Convert caching/utils to TypeScript (#69444)
Part of the Accelerate TypeScript Migration project.

Closes DEV-1522

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:31:19 +13:00
Fraser
c4090623a9 Convert moderation/selectors to TypeScript (#69445)
Part of the Accelerate TypeScript Migration project.

Closes DEV-1523

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:26:31 +13:00
Cam Saul
570952497a [Lib] remove deprecated/confusing :source-alias key from col metadata (#69314)
* [Lib] remove deprecated/confusing `:source-alias` key from col metadata

* Metadata schema cleanup

* Test fixes 🔧

* New test fix 🔧
2026-02-11 13:56:41 -08:00
da
ef622a4832 Add entity id and entity type to the dependency calculation error (#69001)
* Initial commit

* Fix tests

* Fix events test
2026-02-11 18:53:49 -03:00
Fraser
43daa3b222 Convert AccountLayout to TypeScript (#69067)
* Convert AccountLayout to TypeScript

Closes DEV-1412

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 10:48:03 +13:00
Aleksandr Lesnenko
f0582cb46a Add boxplot visualization (#68104)
* add boxplot visualization type

* Add boxplot viz type visual tests (#68327)

boxplot visual tests
2026-02-11 16:39:14 -05:00
Nemanja Glumac
360ae8c713 fix: Snyk workflow using wrong working directory for release/yarn.lock (#69510)
The previous fix ran `cd release && bun install --yarn` which changed the
working directory for subsequent commands. The sed command then tried to
access `release/yarn.lock` from within the `release/` directory, resulting
in "sed: can't read release/yarn.lock: No such file or directory".

Split into separate steps with explicit working-directory for clarity.
The sed commands now continue on error to let Snyk report parsing issues
directly rather than failing on the workaround.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 22:27:33 +01:00
John Swanson
34837bc9bb Implement DB-level caching of premium features (#69241)
Premium feature token checks are cached per-instance in memory with a 12h TTL. During rolling deploys after a plan upgrade, different instances can disagree about which features are available:

   1. Request hits instance A (old cache) → reports old features
   2. Request hits instance B (freshly started, no cache) → reports new features
   3. Frontend says "upgrade successful!"
   4. Request hits instance A again → old features are back

This flapping means the frontend can't reliably detect when an upgrade has landed.

## Solution

### DB-hash-aware cross-instance cache

Replace the per-instance in-memory TTL cache with a two-layer caching scheme coordinated through the DB:

 - A **local in-memory cache** holds the full token status (features, validity, etc.)
 - A **DB table** (`premium_features_token_cache`) stores only a SHA-256 hash of the token status, keyed by a hash of the token itself. The DB never stores actual features — just enough to coordinate freshness across instances.

When a token check comes in:
- If the local cache matches the DB hash and is < 12h old: serve it immediately
- If it matches the DB hash and is < 36h old: serve the stale data and refresh asynchronously in the background
- If the DB hash doesn't match (another instance refreshed), or the cache is > 36h old, or this is a cold start: synchronous MetaStore fetch

This ensures all instances converge quickly after a plan change while keeping MetaStore traffic low. Cold-starting instances always hit the MetaStore — there's no way to bootstrap features from the DB alone, since it only stores hashes.

### Checker stack (inner to outer)

1. **`store-and-airgap-token-checker`** — hits MetaStore or validates airgap token
2. **`circuit-breaker-token-checker`** — circuit breaking + timeout
3. **`db-hash-aware-token-checker`** — the core caching layer (described above)
4. **`local-cached-token-checker`** — 5s TTL memoization to avoid hitting the DB on every request
5. **`error-catching-token-checker`** — wraps exceptions into `{:valid false}` responses

The 5s local cache means we hit the DB at most once every 5s, even during the grace period.

### Force-refresh endpoint

`POST /api/premium-features/token/refresh` clears all caches and synchronously re-checks against the MetaStore. The frontend uses this when polling for new features after a purchase (`useTokenRefreshUntil` in `UpgradeModalLoading`, `MetabotSettingUpModal`, `TransformsSettingUpModal`). A cookie-based mechanism propagates the invalidation to other instances so they clear their local caches on the next request.
2026-02-11 13:11:52 -08:00
Nemanja Glumac
dccfcc9db1 fix: Snyk scan failing after bun migration (#69498)
Root Cause:
Bun's `bun install --yarn` command has a bug where it normalizes version
ranges inconsistently in the generated yarn.lock:

- Alias entries normalize ranges: "safer-buffer@>= 2.1.2 < 3"
  (converts "< 3.0.0" to "< 3")
- Dependency specs keep original: safer-buffer ">= 2.1.2 < 3.0.0"
  (preserves the ".0.0")

Snyk performs exact string matching when resolving dependencies to their
lock file entries. When it sees `safer-buffer@>= 2.1.2 < 3.0.0` as a
dependency, it looks for that exact string in the alias list, but only
finds `safer-buffer@>= 2.1.2 < 3`, causing the error:

  "Dependency safer-buffer@>= 2.1.2 < 3.0.0 was not found in yarn.lock"

Solution:
Add a post-processing sed command that normalizes version ranges in the
dependency specifications to match the aliases. This transforms:
- "< 3.0.0" → "< 3"
- "< 3.0" → "< 3"

This ensures Snyk can match dependencies to their resolutions.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:53:34 -03:00
Edward Paget
6d1b58aaa2 feat: add a stable sort for card parameters serdes (#69478)
Sorts parameters by their uuid to ensure that we maintain an order for
parameters across exports no matter the order they are serialized to the
database in.
2026-02-11 14:39:12 -06:00
John Swanson
4dcab243b9 Don't attempt to add revisions for viewing docs (#69305)
Luckily a bug saved us from *actually* creating revisions here (the
`before-update` hook doesn't get an actual instance in this case). But
... we shouldn't be attempting it.
2026-02-11 11:45:45 -08:00
Nick Fitzpatrick
4501e69eb0 add build cljs to pre-release steps (#69495)
add buuild cljs to pre-release steps
2026-02-11 14:53:41 -04:00
Nemanja Glumac
b9363e3f75 Set up bun authenticated (#69491)
This prevents API rate limits.
2026-02-11 19:29:36 +01:00
Nemanja Glumac
1ad08d2ac9 Add automatic build tools installation to dev-install (#69451)
Offer to install essential build tools during setup, which are required
for compiling native extensions in development dependencies.

macOS:
- Detects Xcode Command Line Tools via xcode-select -p
- Triggers native installer dialog and polls for completion
- 10-minute timeout with manual installation fallback

Linux (multi-distro support):
- Debian/Ubuntu/Mint/Pop: build-essential
- Fedora/RHEL/CentOS/Rocky/Alma: Development Tools group
- Arch/Manjaro/EndeavourOS: base-devel
- openSUSE/SLES: devel_basis pattern
- Unknown distros: manual installation guidance

The check runs as part of step 1 (prerequisites) and is idempotent -
existing installations are detected and skipped with a success message.

* Add progress indicator during Xcode CLT installation wait

Show dots every 10 seconds while polling for installation completion,
so users know the script is still running during the wait.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 18:32:26 +01:00
Maksym Yakubych
1be2cb8497 fix: error message for unauthenticated requests is generic (#69352) 2026-02-11 16:54:01 +00:00
Nicolò Pretto
b9e6c5bc06 feat(sdk): add isHostAppInDevMode (#69450)
* feat(sdk): add isHostAppInDevMode

* i forgot package.json
2026-02-11 16:55:35 +01:00
Fraser
b806fb5b31 Convert AdminAwareEmptyState to TypeScript (#69055)
* Convert AdminAwareEmptyState to TypeScript

Closes DEV-1400

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 17:53:13 +02:00
Nemanja Glumac
f94f6a847a Remove @peculiar/webcrypto polyfill from ClojureScript tests (#69475)
This completes the removal of `@peculiar/webcrypto` from the codebase,
following the Jest setup cleanup in #69466.

Changes:
- Update `polyfills.cljc` to use Node's native `crypto.webcrypto`
- Remove `@peculiar/webcrypto` from package.json

The previous comment about needing Node v23+ was outdated:
- `crypto.webcrypto` available since Node 15
- `globalThis.crypto` available since Node 19
- Node 22 (current LTS) fully supports it

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 15:44:03 +00:00
Nick Fitzpatrick
f37171d483 Add loading state to pull changes (#69380)
adding unit test
2026-02-11 11:26:32 -04:00
Maksym Yakubych
77cb535614 fix: drag handler selecting text in query editor (#68970) 2026-02-11 11:12:19 -04:00
Nemanja Glumac
3532b35b00 Remove @peculiar/webcrypto polyfill from the Jest setup (#69466)
* Use native NodeJS cryppolyfill in fe unit tests

* Force jose library to use Node.js runtime in Jest tests

The jose library's browser runtime expects CryptoKey to be globally
available, which jsdom doesn't provide. This caused tests using JWT
signing (via jose) to fail with "CryptoKey is not defined" after
switching from @peculiar/webcrypto to Node's native webcrypto.

By mapping jose to its Node.js runtime via moduleNameMapper, we avoid
the CryptoKey dependency since the Node runtime uses require('crypto')
directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 15:48:45 +01:00
Maksym Yakubych
d77ae0cedb feat: tooltips for metabot message action buttons (#69369) 2026-02-11 14:43:10 +00:00
metamben
8239cbfa00 Prevent expression editor from forcing literal types (#67647)
* Prevent expression editor from forcing literal types

Closes #63910
2026-02-11 14:37:45 +00:00
Nemanja Glumac
dd2b2929a1 Update FE Claude.md scripts instructions (#69463) 2026-02-11 15:25:05 +01:00
Riley Thompson
9cd60a5d77 Set bigquery transport options with read timeout (#69306)
* set read timeout

* add tests
2026-02-11 08:53:21 -05:00
Nemanja Glumac
d0cef57a4f Remove superfluous jest-localstorage-mock (#69455) 2026-02-11 14:34:35 +01:00
Nemanja Glumac
f2bb215346 Fix determine-driver-skips failing on a release branch (#69448) 2026-02-11 09:26:48 -04:00
Maksym Yakubych
7a1aec685f fix: line height of placeholder text in metabot side panel should be 20px (#69377) 2026-02-11 10:05:12 -03:00
Kamil Mielnik
5474fca0c0 GDGT-1531 - Opening a transform should open tab immediately (#69224) 2026-02-11 18:11:11 +07:00
Nemanja Glumac
ab7baf7ca7 Upgrade webpack (#69341) 2026-02-11 10:12:59 +01:00
Mahatthana (Kelvin) Nomsawadi
d7607ccf8a support targetCollection in CreateDashboardModal (#69359)
* Remove old and unused props

* Support `targetCollection` in the CreateDashboardModal

* Add tests

* Handle special collection name e.g. `root`, `personal`

* Address review

* Update test names
2026-02-11 09:00:41 +00:00
Sébastien
d6082bba08 Fixes show detail button showing in embeds (#69338)
fixes show detail button showing in embeds
2026-02-11 06:33:32 +01:00
Anderson
1d0eaf9ca8 Show confirmation popup when overwriting data during remote sync setup (#68525)
* Report conflicts on transforms/snippets/lib

[UXW-2743: Warn before remote sync overwrites local library/transforms](https://linear.app/metabase/issue/UXW-2743/warn-before-remote-sync-overwrites-local-librarytransforms)

Co-authored-by: edpaget<ed@metabase.com>

* fixup! store conflicts in remote-sync-task table

* fixup! make conflict checking spec driven

* Restore initial implementation (implement conflict modal when pulling for the first time)

* Fix modal not opening when in data studio

* Don't set version in task when it fails with conflict / Adjust conflict options / Start e2e tests

* Add e2e tests

* Add some unit tests

* Fix remote sync settings update when creating new branch

* Isolate git config for initial import conflict test cases

* Report conflicts on transforms/snippets/lib

[UXW-2743: Warn before remote sync overwrites local library/transforms](https://linear.app/metabase/issue/UXW-2743/warn-before-remote-sync-overwrites-local-librarytransforms)

Co-authored-by: edpaget<ed@metabase.com>

* fixup! store conflicts in remote-sync-task table

* fixup! make conflict checking spec driven

* fixup! tests failures

* fixup! lints

* fixup! exclude tags from conflict

* Fix unintended changes from merge in RemoteSyncSettingsForm.tsx

* Address PR comments

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Edward Paget <ed.paget@gmail.com>
2026-02-11 03:37:38 +00:00
Anderson
70878781e4 Allow adding segments and measures to hidden tables (#69373) 2026-02-11 00:37:11 -03:00
github-automation-metabase
d4229d9cd8 Auto-update documentation for master (#69396)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-10 19:21:57 -08:00
John Swanson
00c573febe Report conflicts on transforms/snippets/lib (#68506)
* Report conflicts on transforms/snippets/lib

[UXW-2743: Warn before remote sync overwrites local library/transforms](https://linear.app/metabase/issue/UXW-2743/warn-before-remote-sync-overwrites-local-librarytransforms)

Co-authored-by: edpaget<ed@metabase.com>

* fixup! store conflicts in remote-sync-task table

* fixup! make conflict checking spec driven

* fixup! tests failures

* fixup! lints

* fixup! exclude tags from conflict

* fixup! don't delete builtins

* fixup! ignore built-in tags

* fixup! preserve built-in python library

* fixup! kondo

* fixup! correct condition

* fixup! module sort

* fixup! build where clause for post-import removal

* fixup! ws

* fixup! pythonlibrary in serialization tests

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
2026-02-10 23:35:21 -03:00
Anderson
6602db9fd2 Implement Archived Snippets page (#68823)
* Implement archived snippets page / Adjust archive/unarchive actions for snippets and folders

* Add more coverage

* Fix ts

* Fix ts / Fix e2e test

* Fix eslint/prettier

* Fix e2e test

* Remove empty file
2026-02-10 22:33:40 +00:00
John Swanson
78d36e43e4 Do not allow publishing tables without query perms (#69171)
* Do not allow publishing tables without query perms

Publishing a table changes query permissions. So you shouldn't be able
to publish a table that you don't have query permissions on, and then be
able to query it.

* fns for `can-publish?`, `can-publish-all-table?`

* switch to `library` ff
2026-02-10 14:28:38 -08:00
John Swanson
88a769d9a8 Unify table visibility with can-query semantics (#69199)
* Unify table visibility with can-query semantics

Table visibility checks had drifted across different APIs.

- `(can-query? table)` checked whether you had view access
and create-queries access OR the table was published. This is incorrect:
the table is queryable if you have view access AND either the table is
published OR you have create-queries.

- the collections API included tables that were not queryable.

- the search API allowed you to view tables if a) you had data
permissions on the table, AND b) the table was unpublished or published
in a collection you had access to. This is incorrect, since publishing a
table shouldn't hide a previously visible table from search results.
Search should return tables for which you have view-data permissions
PLUS the table is either published or you have create-queries
permissions.

Fundamentally this change:

- correctly defines what `(can-query? table)` means, and
- uses that new definition of `can-query` to determine table visibility
  across the collection, search, and table APIs.

Note that I did not change some existing usages of
`(mi/visible-filter-clause :model/Table ...)`, which will continue to
exclude tables for which the user does not have explicit data
permissions set (but could otherwise query due to being published). That
should be a simple followup PR.

- align SQL table visibility with mi/can-query? semantics for search paths

- add enterprise `published-table-visible-clause` and wire optional

- `published-via-collection` support into `(mi/visible-filter-clause :model/Table ...)`

- update search table fallback permission check to use canonical `mi/can-query?`

- fix collection table children filtering to include `published-via-collection` queryability

- make `(mi/can-query? :model/Table)` return explicit booleans

- add/adjust EE tests for:
  - published-table SQL clause behavior
  - collection items visibility under view/query perms
  - search visibility when user lacks query perms
  - search visibility for unpublished tables when user has data perms
  - stabilize appdb negation test by avoiding brittle exact count for "customer" in shared index data

* don't use `published-tables` directly

and fix kondo config

* correct feature for library

* kondo

* ensure we bind `*current-user-id*` in search

fallbacks rely on functions that use dynamic vars to check permissions.

Search is designed to use only the search context (with its
`current-user-id` and `current-user-perms`) and binds those dynamic vars
accordingly.

Previously we just needed to bind `current-user-permissions-set` but now
we should also bind `current-user-id` as well.

* fix tests

* correct feature for library
2026-02-10 14:28:21 -08:00
Fraser
4789ed4666 Convert LogoIcon to TypeScript (#69060)
* Convert LogoIcon to TypeScript

Closes DEV-1405

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 09:42:54 +13:00
kevinkelleher12
135d176247 Update table email styles to match frontend (#69176) 2026-02-10 15:20:48 -05:00
Nathan Voxland
43b3ecf3e2 Minor code cleanup (#69236)
Code cleanup
2026-02-10 13:37:28 -06:00
Cam Saul
843350757c Disallow using -rest modules in non-rest modules (#69045)
* Disallow using `-rest` modules in non-rest modules

* Add Kondo linter

* Kondo lint fixes 🔧

* Test fix 🔧
2026-02-10 10:35:33 -08:00
Riley Thompson
0464d028b3 Interrupt threads stuck after query cancellation (#69254)
* interruot stuck threads

* small changes
2026-02-10 13:26:31 -05:00
Jeff Bruemmer
9c9c18d653 docs - fix typo in transforms-enabled setting description (#69353)
Fix typo in transforms-enabled setting description
2026-02-10 18:14:16 +00:00
Maksym Yakubych
38bf8580ea fix: grid Map Pins Offset in PDF Export (#68751) 2026-02-10 12:48:25 -05:00
Nick Fitzpatrick
ce11a50d64 update edit table metadata button link to stay in data studio (#69187) 2026-02-10 13:43:31 -04:00
Chris Truter
b1212ac263 Support transform upserts in Workspace (#69283) 2026-02-10 17:22:37 +00:00
dpsutton
d77f52936e test files trigger module change, workspaces trigger drivers (#69358)
two changes:
- chris changed a file in a workspaces test file and no backend tests
ran at all:

```
=== Module Analysis ===
Changed modules: #{}
Driver module affected: false
Important file changed: false
Drivers with file changes: #{}

=== Driver Decisions ===
h2                        RUN  - H2/Postgres always run
athena                    SKIP - no relevant changes for cloud driver
bigquery                  SKIP - no relevant changes for cloud driver
clickhouse                SKIP - driver module not affected
databricks                SKIP - no relevant changes for cloud driver
druid                     SKIP - driver module not affected
druid-jdbc                SKIP - driver module not affected
mongo                     SKIP - driver module not affected
mongo-ssl                 SKIP - driver module not affected
mongo-sharded-cluster     SKIP - driver module not affected
mysql-mariadb             SKIP - driver module not affected
oracle                    SKIP - driver module not affected
postgres                  RUN  - H2/Postgres always run
presto-jdbc               SKIP - driver module not affected
redshift                  SKIP - no relevant changes for cloud driver
snowflake                 SKIP - no relevant changes for cloud driver
sparksql                  SKIP - driver module not affected
sqlite                    SKIP - driver module not affected
sqlserver                 SKIP - driver module not affected
vertica                   SKIP - driver module not affected
```

So we want the workspace module to be marked dirty by this change. It's
currently filtered out by `remove-non-driver-test-namespaces`.

But a follow-on: workspaces run against different dbs and we therefore
want to ensure this not only triggers driver tests, but also cloud db
tests. So a few tests change to ensure this happens, consequent of
adding `enterprise/workspaces` to `modules-triggering-cloud-drivers`.
2026-02-10 11:04:25 -06:00
Edward Paget
f0abb34fe4 fix: better display for transforms sync changes (#68919)
Better display for transform sync changes where we treat toggling the
`remote-sync-transforms` as though we are toggling the
`is_remote_synced` setting on Root transforms collection. This then
creates a 'collection' typed remote sync object entry for the Root
collection and uses that to drive dirty state display (or non-display)
on the frontend.

This object also drives how items are deleted from the sync so when this
'collection' is in a deleted state it removes all transforms related
content from the sync but preserves it locally.
2026-02-10 17:04:13 +00:00
dpsutton
a2a08af4b1 ease how we generate nano-ids (#69317)
* ease how we generate nano-ids

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

nano-ids are not needed to be secure, they just need to be
distinct. They hide no secrets but assign identity.

In https://github.com/metabase/metabase/pull/66413 we replaced our usage
of https://github.com/zelark/nano-id with encore. These are almost the
same except that encore uses `secure?` to be true by default. In
practice this is:

```clojure
(if secure?
  (com.taoensso.encore.Ids/genNanoId (.get com.taoensso.encore.Ids/SRNG_STRONG) len)
  (com.taoensso.encore.Ids/genNanoId                                            len))
```

And that `com.taoensso.encore.Ids/SRNG_STRONG` is

```java
public static final ThreadLocal<SecureRandom> SRNG        = ThreadLocal.withInitial(SecureRandom::new);
public static final ThreadLocal<SecureRandom> SRNG_STRONG = ThreadLocal.withInitial(() -> {
        try { return SecureRandom.getInstanceStrong(); }
        catch (java.security.NoSuchAlgorithmException e) {
            throw new RuntimeException("Failed to initialize strong SecureRandom", e);
        }});
```

the implmentation in the old library was

```clojure
(defonce *secure-random (delay (SecureRandom.)))
```

So passing `false` for the encore version of the nanoid restores the
previous behavior.

CALLOUT:
One thing to call out is that this did slightly change how we generate
nano-ids based on a seed. We used this behavior to backfill
nano-ids. That let us try to ensure that the same thing in multiple
systems would have the same nano-id, thus identifying them across
systems.

We are now generating different nanoids for the same inputs.

```clojure
❯ java -cp $JARS/1.45.4.jar clojure.main
Clojure 1.11.1
user=> (doto 'metabase.util require in-ns)
metabase.util
metabase.util=> (generate-nano-id "cafebabe")
"VlXdQMzunVywNw_SArkKX"
metabase.util=>
```
This is a consistent nanoid all the way up to 57:
```clojure
❯ java -cp $JARS/1.57.10.jar clojure.main
Clojure 1.12.2
user=> (doto 'metabase.util require in-ns)
metabase.util
metabase.util=> (generate-nano-id "cafebabe")
"VlXdQMzunVywNw_SArkKX"
metabase.util=>
```

And now is different in 58:

```clojure
❯ java -cp $JARS/1.58.3.jar clojure.main
Clojure 1.12.3
user=> (doto 'metabase.util require in-ns)
metabase.util
metabase.util=> (generate-nano-id "cafebabe")
"xNzFsobWPxaYpY0ucTMmz"
```

This is not a problem because we backfilled these nanoids in ~41 or so
and no longer allow anyone to save a model without one. But is worth a
callout that 58 changed this.

* fix drivers team attribution (#69323)

causes module config tests to fail
2026-02-10 11:03:33 -06:00
Jeff Bruemmer
33a572f9a6 docs - handleLink in mod embeds (#69255) 2026-02-10 12:01:55 -05:00
Nathan Voxland
89bb889883 Added MB_MONITOR_PERFORMANCE option (#69298) 2026-02-10 10:59:03 -06:00
Jeff Bruemmer
8e33138caf docs - embedded alerts (#69201)
* embedded alerts

* Apply suggestion from @jeff-bruemmer
2026-02-10 11:58:07 -05:00
Fraser
355a5fc29c Use bun package manager (#68170)
* Use bun in package.json

* Update workflows

* Update more workflows

* Kick ci

* Fix yaml

* Fix type errors

* Compat with snyk

* Fix jest resolutions

* Add another esm package

* Fix aliases and next js missing deps

* Update next js embed tests

* Try fix embed test config

* Fix

* Fix requires in e2e support

* Use bun not yarn in embed bin

* Revert config changes

* Use bun in more scripts and use prepare-release action

* Replace more yarn usages

* Remove overrides from bunfig move to package json

* Revert e2e support changes

* Add back comment

* [ci skip] comment typo

* Update bun lock

* Update to reference bun

* Update to reference bun

* Update license disclaimer

* Tidy tests

* Update to use bun in workflows

* Change aliases

* Update codemirrort selector

* Tidy license generation

* Remove .only

* Fix yarn references

* Checkout .github for release scripts

* Update lockfile

* Re-add package

* update release bunlock

* fix checkout check

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2026-02-10 16:27:57 +00:00
github-automation-metabase
50241cb516 Auto-update documentation for master (#69326)
* Update generated docs (master)

* Apply suggestion from @jeff-bruemmer

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2026-02-10 16:01:40 +00:00
Braden Shepherdson
3fcac725b2 [QP] Properly escape SQL LIKE metachars for :contains and friends (#67665)
Fixes #67075.

`:starts-with`, `:contains` and `:ends-with`, which use SQL `LIKE`
clauses on SQL databases, were previously using the literal string from
the user directly, without escaping the `LIKE` metacharacters `%`, `_`
and backslash.

This change adds a new `sql.qp` multimethod to the driver API, with a
basic implementation that uses backslashes and works for Postgres,
MySQL/Maria and H2. SQL Server supports escaping via regex-style `[%]`
character classes.

Oracle and SQLite need an explicitly set `LIKE '...' ESCAPE '\'` clause.
I'm leaving that for a future PR since it requires refactoring how the
`LIKE` clauses are constructed more deeply.

Updates the driver changelog, though fortunately the default case should
work for most drivers. Not to be backported, because of the driver API
change.
2026-02-10 15:26:27 +00:00
Nemanja Glumac
e2e2c70165 Fix containerize-uberjar workflow failing on pull requests (#69346)
The workflow was using `github.sha` (the merge commit SHA) when fetching
artifacts, but the uberjar workflow uploads artifacts using the PR head
commit SHA (`github.event.pull_request.head.sha`). This mismatch caused
the containerize workflow to fail with "artifact not found" errors.

Added `github.event.pull_request.head.sha` to the fallback chain in three
places: the artifact fetch commit, the GIT_COMMIT_SHA build arg, and the
Trivy scanner checkout ref.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 16:08:06 +01:00
Timofey Kachalov
df0622c46a Move some logic from translateColumnDisplayName to CLJ lib side (#69005) 2026-02-10 18:45:50 +04:00
Nemanja Glumac
05ab4e7919 Resolve CVE-2026-25639 (#69340)
Even though this vulnerability does not affect our production code,
it was easy to resolve `axios` to the patched version.
2026-02-10 07:15:43 -07:00
Nicolò Pretto
b8ad77a580 fix Back button on eajs browser component (#69273)
* wip

* Revert "wip"

This reverts commit a4dbdef16c.

* cleanup

* fix bug when clicking on breadcrumbs

* clean up old type

* Update frontend/src/embedding-sdk-bundle/components/private/SdkInternalNavigation/SdkInternalNavigationProvider.tsx

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

* jsdoc for virtual

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2026-02-10 13:14:09 +00:00
Nicolò Pretto
22c7912005 export InteractiveQuestion.NavigationBackButton and deprecate the old one (#69292)
* export `InteractiveQuestion.NavigationBackButton` and deprecate
`InteractiveQuestion.BackButton`

* jsdoc

* more jsdoc

* add test
2026-02-10 12:32:18 +01:00
Chris Truter
6c73d0a9d4 Return WS api key when it's created (#69333) 2026-02-10 12:48:58 +02:00
Sébastien
084e3ea6df fix(SDK): fixed bugged scrolling in embedded metabot (second version) (#69265)
* fixed bugged scrolling in embedded metabot

* focus

* .

* e2e test
2026-02-10 11:43:36 +01:00
Chris Truter
2957fc98c6 Allow workspace user to archive its own workspace (#69288) 2026-02-10 10:38:58 +00:00
Chris Truter
3286107b15 Ad hoc query API for workspaces (#69274) 2026-02-10 12:33:56 +02:00
Chris Truter
fb97c31b6b Run-stale-ancestors option for workspace transform execution (#69281) 2026-02-10 09:46:13 +00:00
Stas Gavrylov
9529117f1e GDGT-1668: Migrate notifications to TypeScript (#69104)
* Update Claude instructions

* Some DashboardSubscription type usage refactoring

* Migrate SendTestPulse to TS. Introduce DashboardSubscriptionData. Related refactoring

* Migrate ArchivePulseModal to TS

* Migrate UnsubscribePulseModal to TS

* Migrate ArchiveModal and test

* Migrate to TS: UnsubscribeModal. Related refactoring

* Migrate to TS: Notifications actions and routes

* Migrate to TS: ModalRoute refinement

* Fix eslint

* Adjust types of ModalRoutecomponents

* Fixes following bot code review

* Some more type refinement

* Address PR comments

* More fixes/refactoring

* Update route files. Convert to components

* Rename ArchiveNotificationModal to avoid confusion with collections. Fix export

* Fix more exports. Remove type casting. Add Response type guard

* Refactor routes back to getter functions

* Add early return for modals rendering. Add isObject in type-guard

* Refine Response type-guard
2026-02-10 10:41:53 +02:00
Nemanja Glumac
cb119f840b Add auto-detection of changed Loki stories for stress testing (#68951)
* Add auto-detection of changed Loki stories for stress testing

Enable the Loki stress test workflow to automatically trigger on PRs
that modify .stories.tsx files and detect which stories to test based
on git diff. Manual workflow_dispatch still works with optional filter
override.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 09:02:48 +01:00
dpsutton
551108d317 fix drivers team attribution (#69323)
causes module config tests to fail
2026-02-09 21:23:37 -06:00
Fraser
9c5b714279 Convert LegendActions to TypeScript (#69065)
Closes DEV-1410

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 15:05:46 +13:00
Maksym Yakubych
19d9dcb047 feat: allow empty min and max for scalar conditional colors (#69177) 2026-02-09 20:34:18 -05:00
Fraser
13a641e649 Convert ViewSidebar to TypeScript (#69070)
* Convert ViewSidebar to TypeScript

Closes DEV-1415

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 20:20:39 -05:00
Fraser
c5fe906f7b Convert ViewLeftSidebarContainer to TypeScript (#69068)
Closes DEV-1413

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 20:20:12 -05:00
Riley Thompson
045a331f78 Update querying team and remove drivers (#69307)
update querying team, remove drivers
2026-02-09 23:01:01 +00:00
Nick Fitzpatrick
5602bcee19 updating upsell CTA links (#69308) 2026-02-09 18:43:26 -04:00
Nick Fitzpatrick
30b32c0c7f Uxw 2973 admin toggle for transforms global (#69240)
* enable page

* update permission functions, add transformsEnabled check

* hook up button

* temp

* add unit tests for transform layout page

* adjusting unit tests for permissions graph

* adjust e2e tests

* temp

* updating checks in e2e tests

* adding missing route mocks to unit test

* now the test should work

* do not export transforms-enabled

* adjust transforms e2e test

* update selectors to be a bit more clear

* additional tests
2026-02-09 18:42:52 -04:00
Nick Fitzpatrick
976f73531b update AllChangesView unit tests (#69313)
* update AllChangesView unit tests

* removing unneeded test
2026-02-09 17:52:42 -04:00
Jeff Bruemmer
98d8aef4f0 docs - embed translations (#69196) 2026-02-09 21:50:32 +00:00
Nathan Voxland
f3e1558740 Don't use the deprecated enable-query-caching value (#69256)
Don't use the deprecated enable-query-caching value which may have been stored as "false" in the database.
2026-02-09 14:21:23 -06:00
Edward Paget
aa7f30169f feat: snippets under 'library' in changes view (#68910)
Display dirty snippets and snippets collections as children of the
library collection in the list of dirty changes for push.
2026-02-09 12:48:52 -06:00
Nathan Voxland
c5c1d2424d Allow data-analysts to call GET /api/user (#69033) 2026-02-09 11:52:41 -06:00
Fraser
744ba25909 Convert Grid to TypeScript (#69058)
* Convert Grid to TypeScript

Closes DEV-1403

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 10:19:44 -07:00
kevinkelleher12
4c6d90cf00 Fix infinite hang caused by selecting drop down in conditional formatting settings (#69141) 2026-02-09 12:07:15 -05:00
Anderson
b6427ea107 Address issues found by Claude review on "Data Studio Upsells" #68886 (#69258)
Address issues found by Claude review
2026-02-09 13:53:12 -03:00
Fraser
530ca1eab1 Convert Warnings to TypeScript (#69066)
Closes DEV-1411

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 16:45:04 +01:00
Timofey Kachalov
c82d33f4b3 Revert temporary FE-side filters content-translation logic (#69276) 2026-02-09 15:42:39 +04:00
Fraser
265438590b Convert DisclosureTriangle to TypeScript (#69057)
Closes DEV-1402

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 20:51:43 +13:00
metabase-bot[bot]
29790430fe [chore] Update E2E test timings with recent data (#69269)
Update E2E test timings with averaged data

Collected timing data from 7 days of test runs.
All specs with timing data were included (simple averages).

🤖 Generated automatically by update-e2e-timings workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-02-09 11:50:52 +13:00
Fraser
30a8a97d84 Convert PermissionsEditorEmptyState to TypeScript (#69053)
Closes DEV-1398

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 10:12:17 +13:00
Fraser
c7c20bfb12 Convert GlobalFingerprint to TypeScript (#69078)
* Convert GlobalFingerprint to TypeScript

Closes DEV-1423

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 10:12:01 +13:00
Fraser
04c6381858 Convert LoadingAndGenericErrorWrapper to TypeScript (#69063)
Closes DEV-1408

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 10:11:45 +13:00
Fraser
2af98ce335 Convert TableSidebar to TypeScript (#69088)
* Convert TableSidebar to TypeScript

Closes DEV-1433

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 10:11:14 +13:00
Fraser
6c3a3b99ca Convert BaseSidebar to TypeScript (#69089)
* Convert BaseSidebar to TypeScript

Closes DEV-1434

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 10:09:53 +13:00
Fraser
71e21281bb Convert SegmentFieldSidebar to TypeScript (#69090)
* Convert SegmentFieldSidebar to TypeScript

Closes DEV-1435

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 10:09:25 +13:00
Gabriel Moreno
5458b8ae50 Data Studio Upsells (#68886)
* feat: add new gem & pattern backgrounds for upsell page

* feat: use new upsell designs

* feat: bring app switcher & enhance designs

* feat: create `DottedBackground` component

* refactor: purchase page

* fix: pyton transforms upsell condition

* fix: remove unnecessary relative selector

* fix: cta hover states

* fix: border causing layout shift

* fix: draggable decoration lines

* feat: implemnet new designs for remote sync

* refactor: remove DottedBackground from `metabase/ui`

* feat: implement initial in-place trial-up

* feat: use right add-on names for python transforms

* feat: transforms purchase page

* feat: add correct transforms add-ons on api

* reafactor: reorganize upsells code

* feat: python transforms upsell modal

* refactor: reorganize transforms upsell page

* fix: use right add-on

* Move renderTierSelection and renderTierSelection to dedicated components

* remove commented code

* refactor: organize structure properly

* Add some unit tests for transforms upsell

* Add more unit tests

* Clean up

* Fix translatable cost description string / Improve scrolling UX

* Fix copy to make it clear we are charging additional costs

* Fix ts

* Fix tests part 1

* Simplify upsell cost description text

* Fix 1 e2e test

* a few more tested fixed

---------

Co-authored-by: Anderson <anderson@metabase.com>
2026-02-06 20:12:10 -03:00
Riley Thompson
4586ae1efc Allow syncing timestamp_ntz columns in databricks (#67140)
dont exclude timestamp_ntz
2026-02-06 21:48:30 +00:00
Nick Fitzpatrick
7200371783 Scalar viz ensure field to select has a section (#69179) 2026-02-06 17:22:01 -04:00
kevinkelleher12
8e68044b26 Fix "View as table" in visualizer (#69204) 2026-02-06 15:48:24 -05:00
Alexander Polyankin
868b69bc46 Create MBQL queries with the lib in unit and E2E tests (#68719) 2026-02-06 15:47:27 -05:00
Maksym Yakubych
88df5f5a0e fix: prompt suggestions should left-align with the input box (#69227) 2026-02-06 20:42:10 +00:00
Timofey Kachalov
95875a4166 feat(sdk,embed-js): Cover displayed column names with content-translations in additional places (#69192) 2026-02-07 00:42:03 +04:00
Maksym Yakubych
903307c93a fix: the timing of the shimmer loading indicator effect should be 2x as fast (#69239) 2026-02-06 14:41:46 -06:00
Maksym Yakubych
9155352685 chore: move undrfined from ux-west to metabot team in team.json (#69243) 2026-02-06 14:41:18 -06:00
Maksym Yakubych
4a35e01689 fix: dark Theme Hides values in Gauge Chart (#69237) 2026-02-06 14:38:10 -06:00
Maksym Yakubych
378a6384d7 fix: dashboard card becomes uneditable after reordering funnel steps (#69242) 2026-02-06 14:36:22 -06:00
Sébastien
495f4fd395 Guest embedding should use the primary database for queries (#68952)
* Guest Embedding should use the primary database for queries

* make sure user is set to nil for guest embeds

* test

* test

* .

* .

* fixed existing clj test

* fixed existing clj test

* lint

* address comments on unit tests

* using with-database-routing-off

* kondo

* whitespace

* modules order

* addressed comments on tests
2026-02-06 20:27:48 +01:00
Jeff Bruemmer
23831c6fbe docs - note on turning off downloads (#69231) 2026-02-06 18:33:08 +00:00
Nicolò Pretto
4181179942 [feature branch] support internal click behavior with enableInternalNavigation prop in SDK and EAJS (#69117)
* SDK internal navigation: main implementation with context (#68900)

* squashed everything

* Trigger CI

* test ci

* fix accidentally enabling navigation by default

* fix tests

* clean up

* clean up and revert

* fix eslint rule after v9 migration

* idon'trememberanymore

* fix stale closure

* fix button position and more cleanup

* rename to virtual

* fix virtual

* more renaming

* more tests

* more fixes

* more fixes

* more reverts and cleaning up

* remove unused type

* internal navigation: change back button cover on hover (#69122)

* add support for ct to sdk back button (#69219)

add support for tc in back button

* support enable-entity-navigation in EAJS (#69185)

* tests, fixes

* do a real test for guest on a dashboard

* add     "enableEntityNavigation" to types for browser

* Update frontend/src/embedding-sdk-bundle/components/private/SdkInternalNavigation/SdkInternalNavigationProvider.tsx

Co-authored-by: Sébastien <sebastien@metabase.com>

---------

Co-authored-by: Sébastien <sebastien@metabase.com>

* export back button, test that it shows up with title=false, align button (#69222)

* export back button and test it, also test that it shows up with
title={false}

* EMB-1275 map question props to question

* EMB-1278 add last remaining test

* EMB-1299: align back button with save button when drilling

* revert back button changes to keep backward compatibilty

* removed test

---------

Co-authored-by: Sébastien <sebastien@metabase.com>
2026-02-06 17:43:41 +00:00
Nathan Voxland
5fffeb5c62 Allow source-readable to be null in response schema (#69232) 2026-02-06 11:14:09 -06:00
Nicolò Pretto
6a400ce43a feat(modular): support handleLink function (#68418)
* feat(eajs): support handleLink function

* fix unit tests

* rename, remove timeout which caused bugs if host app used alert() or other blocking things

* nest in pluginsConfig as is in the sdk

* put token feature guard

* Revert " put token feature guard"

This reverts commit 4f368ab41e.

* remove isWithinIframe
2026-02-06 17:06:53 +00:00
github-automation-metabase
c0ac8fdce6 Auto-update documentation for master (#69206)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-06 12:04:07 -05:00
Maksym Yakubych
da0f559b55 fix: logo in email is not centered (#68806) 2026-02-06 10:46:44 -06:00
Mahatthana (Kelvin) Nomsawadi
d3f97ef81c Fix broken Metabase icon in SDK banner when using EE with license (#69215)
* Make eslint rule easier to read

* Prevent future misuse of the Metabase logo in the SDK

* Fix wrong Metabase icon on the SDK when using EE build with whitelabel feature

* fix eslint error message
2026-02-06 15:59:01 +00:00
Alex Yarosh
5367b57309 docs: number chart revision and colors (#69207)
* number chart revision and colors

* Optimized 4 images, saved 166.4 KB (48.9% smaller)

* Apply suggestions from code review

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

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2026-02-06 08:59:40 -05:00
John Swanson
2b027c0ed1 JWTs can set tenant attributes (#68562)
* JWTs can set tenant attributes

* use the merge method directly

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2026-02-06 13:08:00 +00:00
Kamil Mielnik
8ba4132e42 GDGT-1620 Flaky workspaces test (#69103) 2026-02-06 18:32:55 +07:00
John Swanson
25cd50c5c4 Allow internal users to have perms on tenant colls (#68181)
* Allow internal users to have perms on tenant colls

Notably, this required allowing internal users to list tenants. I think
this is acceptable?

* CR response

* more cr response
2026-02-06 04:17:39 +00:00
github-automation-metabase
c0085e42d5 Auto-update documentation for master (#69148)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-05 18:24:39 -05:00
Alex Yarosh
24649ede3e docs: data studion perms (#69203)
* access

* sneak in some other edits

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2026-02-05 22:31:41 +00:00
dpsutton
a3e48f0867 trigger cloud driver tests on certain modules (#69200)
* trigger cloud driver tests on certain modules

Motivating example:
https://github.com/metabase/metabase/pull/68256/changes added some
schemas to transform apis. Transforms run when drivers run. But it
didn't trigger cloud dbs. And of course, there was an issue with
redshift transform tests.

https://github.com/metabase/metabase/actions/runs/21718378450/job/62645866080
is the determine driver skips link:

```
=== Module Analysis ===
Changed modules: #{models transforms}
Driver module affected: true
Important file changed: false
Drivers with file changes: #{}

=== Driver Decisions ===
h2                        RUN  - H2/Postgres always run
athena                    SKIP - no relevant changes for cloud driver
bigquery                  SKIP - no relevant changes for cloud driver
clickhouse                RUN  - driver module affected by shared code changes
databricks                SKIP - no relevant changes for cloud driver
druid                     RUN  - driver module affected by shared code changes
druid-jdbc                RUN  - driver module affected by shared code changes
mongo                     RUN  - driver module affected by shared code changes
mongo-ssl                 RUN  - driver module affected by shared code changes
mongo-sharded-cluster     RUN  - driver module affected by shared code changes
mysql-mariadb             RUN  - driver module affected by shared code changes
oracle                    RUN  - driver module affected by shared code changes
postgres                  RUN  - H2/Postgres always run
presto-jdbc               RUN  - driver module affected by shared code changes
redshift                  SKIP - no relevant changes for cloud driver
snowflake                 SKIP - no relevant changes for cloud driver
sparksql                  RUN  - driver module affected by shared code changes
sqlite                    RUN  - driver module affected by shared code changes
sqlserver                 RUN  - driver module affected by shared code changes
vertica                   RUN  - driver module affected by shared code changes
```

Important part is `Changed modules: #{models transforms}` and `redshift
SKIP - no relevant changes for cloud driver`. This intends to change that.

* update comment
2026-02-05 16:08:43 -06:00
Robert Kosara
0ae4c70ba8 Data Studio docs (#66299)
* First check-in of the initial skeleton

* Minor edits

* Docs: dependency graph (#66562)

* first draft of dependency graph

* few edits

* typo

* Update docs/data-studio/dependency-graph.md

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

* Update docs/data-studio/dependency-graph.md

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

* Update docs/data-studio/dependency-graph.md

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

* Update docs/data-studio/dependency-graph.md

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

* few edits

---------

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

* docs - data studio library (#68602)

* library skeleton

* link

* collection perms

* plans blockquote

* table notes

* updates

* remove data editing

* edits

* Apply suggestion from @jeff-bruemmer

* overview

* intro

* transforms links

* links

* docs: transforms updates (#69037)

* intermediate draft

* more transforms

* Apply suggestions from code review

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

* edits

* more links

* more links

* more links

* bot comments

* more bot comments, please just give me all at once

* bot needs to shut up

---------

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

* docs: Add Dependency diagnostics page (#68928)

* adding dep diagnostics

* Update docs/data-studio/dependency-diagnostics.md

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

* Update docs/data-studio/dependency-diagnostics.md

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

* Update docs/data-studio/dependency-diagnostics.md

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

* some edits

* more edits

* typo

---------

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

* docs: data structure (#69184)

* draft

* data structure

* description

* it's measures not metrics

* measures not segments

* Apply suggestion from @jeff-bruemmer

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

* Apply suggestions from code review

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

* review

---------

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

---------

Co-authored-by: Abed Habli <154609371+abdhabli@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Jeff Bruemmer <jeffbruemmer@gmail.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2026-02-05 15:24:29 -05:00
William
bf3a0df461 Fix nested if statements (#69144)
If you have an expression with an if statement inside an if statement, the outer if would get desugared to a case
statement, but the inner if would be left untouched.  This makes desugaring also desugar the inner if.
2026-02-05 20:06:31 +00:00
Braden Shepherdson
a609c0466b [deps] Split "supported" entities into analyzable and dependable (#69188)
Fixes QUE-3070.

This splits the vague, dual-purpose `supported-entities` into two:
- those entities which can be depended on, whose dependents get marked
  stale when they're updated (eg. a table during sync)
- those entities which we can analyze, and should check for staleness

I added `:table` to the old `supported-entities` since they're a valid
*upstream* dependency that might needs its downstream dependents to be
marked as stale, and it failed the schema.

The trouble is that we don't run analysis on tables, but the same set of
"supported" types was used to check for what entities need reanalysis.

That led to a chain like this:
- Something changed, and the entity-check job is scheduled immediately.
- It runs, and checks each `supported-entities` for any entity with
  a missing, `stale` or outdated analysis finding.
- That list now includes tables, and since tables are not analyzed none
  of them have entries - so there's apparently lots of work to do!
- On trying to analyze tables, it fails because they're not supported,
  and it silently does nothing.
- But the batch draining logic still thinks the whole batch was used, so
  it reschedules.
- No real progress is getting made, since the tables cannot really be
  analyzed, therefore they never get marked as done.
- Infinite loop spinning forever!
2026-02-05 14:47:33 -05:00
Nathan Voxland
eeea8c5f3f Add metabase_table.transform_id column (#69125)
* Create a metabase_table.transform_id column instead of dynamically populating it from the dependencies

* Fixing tests

* Include transform in table dependencies

* Moved test after merge

* Moved test after merge

* transforms are now oss

* Fixed failing tests

* Review fixes
2026-02-05 11:24:49 -08:00
Anderson
59c9a579f2 Replace 'data-studio' token feature with 'library' (#69040)
* Replace 'data-studio' token feature with 'library' / data_analyst behind advanced permissions (clean git history)

* Fix clj test

* Fix a couple be tests

* Fix e2e test
2026-02-05 16:19:29 -03:00
Nathan Voxland
eb3d3d806b Added schema to transform API responses (#68256) 2026-02-05 13:07:34 -06:00
Nathan Voxland
42d0d35dbd Do a rollback before discard all (#69026)
Do a rollback before discard all, since discard all can't be ran in a transaction.
2026-02-05 13:07:20 -06:00
Nathan Voxland
5d40e0ab95 Correctly select jobs to run based on tags (#69137) 2026-02-05 13:06:59 -06:00
John Swanson
9e980b9315 bugfix for dependency diagnostics error (#68968)
We were calling `perms/visible-database-filter-select` incorrectly. It
takes a minimum permission.
2026-02-05 10:27:19 -08:00
Maksym Yakubych
4b805ef246 feat: add duplicate option in 3 dot menu in a document (#68075) 2026-02-05 15:10:48 -03:00
Noah Moss
0234ce1061 Hide transforms from metabot if source is not readable (#69041)
* Hide transforms from metabot if source is not readable

* test simplification

* fix test nesting

* dedupe transform-ids earlier

* Fix module interface

* Fix rebase - transforms were moved to OSS
2026-02-05 10:59:23 -05:00
Ryan Laurie
bfc4963109 Automate js/ts stats update (#69167)
* automate typescript stats update

* job id

* fix var name

* cleanup

* remove test code
2026-02-05 08:27:30 -07:00
Nick Fitzpatrick
f7336c2068 update copy (#69130)
* update copy

* update e2e tests
2026-02-05 11:15:37 -04:00
dpsutton
04ac52e1d6 make sure database is initialized (#69173)
seeing error in CI:

```
ERROR in metabase.upload.db-test/current-database-test (DbException.java:502)
Uncaught exception, not in assertion.

             clojure.lang.ExceptionInfo: Table "METABASE_DATABASE" not found (this database is empty); SQL statement:
                                         SELECT * FROM "METABASE_DATABASE" WHERE "UPLOADS_ENABLED" = TRUE [42104-214]
```

https://github.com/metabase/metabase/actions/runs/21711162702/job/62620032674

we just need to ensure that the db is initialized first
2026-02-05 09:05:26 -06:00
Roman Abdulmanov
5d745ce4c8 Report tenants usage info to HM (#69009)
report tenants usage info to HM
2026-02-05 14:28:37 +00:00
Nemanja Glumac
c5960b7d9d Add Rosetta 2 detection and installation to dev-install (#69115)
On Apple Silicon Macs, some webpack dependencies (webpack-notifier)
require Rosetta 2 to run x86_64 binaries. Without it, the webpack dev
server fails with "Error: spawn Unknown system error -86".

This adds a check during prerequisites that detects if Rosetta is
missing and offers to install it via softwareupdate --install-rosetta.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:22:08 +01:00
da
478b097458 Upgrade jspdf (#69113) 2026-02-05 13:37:24 +01:00
Dan Stone
14d95aaf44 Allow medallion values on read (#69158)
Our migrations can race with writers, this leads to situations
where we might still see values for e.g. an enum according to some prior
schema.

We saw on stats a sync occurred concurrently with the migrations and caused a record with medallion data_layer values to appear _after_ the migration.

Should follow up with a longer term fix without leaving such cruft in the code.
2026-02-05 12:17:41 +00:00
Nemanja Glumac
0d24b395e8 Fix broken containerize workflow (#69156) 2026-02-05 11:23:45 +00:00
Kamil Mielnik
8c0645cc97 GDGT-1585 Update incremental transform warning copy for complex queries (#69109)
Update copy in QueryComplexityWarning
2026-02-05 17:54:39 +07:00
Nemanja Glumac
ee20f35b7f Programmatically list source directories for cloverage (#68955) 2026-02-05 11:18:16 +01:00
Nicolò Pretto
5b8748fda3 feat(modular): support relative paths for jwtProviderUri (#69119)
feat(modular): support relative paths for jwtPRoviderUri
2026-02-05 10:28:12 +01:00
Nemanja Glumac
8143e32165 Unify the JAR artifact naming strategy (#69114) 2026-02-05 10:03:40 +01:00
Fraser
ad9d9d886b Convert List to TypeScript (#69059)
Closes DEV-1404

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:24:17 +13:00
Mahatthana (Kelvin) Nomsawadi
2028e4af8c Remove links from all alerts/subscriptions related emails in modular embeddings (#69014)
* Remove link from broken dashboard notification

* Remove links from alerts setup email

* Add tests

* Remove links from unsubscribe email

* Remove links from card change or archived emails

* add tests for card change email notifications

* add tests to the broken dashboard email

* Format

* Remove unused comments

* Improve test util names

* Format again

* Fix name
2026-02-05 05:11:20 +00:00
Fraser
d0f660ba08 Convert Remapped to TypeScript (#69083) 2026-02-05 03:03:30 +00:00
Fraser
7d269ec8cd Convert ReferenceHeader to TypeScript (#69085)
Closes DEV-1430

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:57:42 +13:00
Fraser
d3c44902a1 Convert QuestionSummarizeWidget to TypeScript (#69071)
Closes DEV-1416

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:55:55 +13:00
Fraser
2963e8e325 Convert DatabaseSidebar to TypeScript (#69086)
* Convert DatabaseSidebar to TypeScript

Closes DEV-1431

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:55:36 +13:00
Fraser
2785b1391c Convert SegmentSidebar to TypeScript (#69091)
* Convert SegmentSidebar to TypeScript

Closes DEV-1436

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:41:53 +13:00
Fraser
4e87135f5f Convert ChartSettingColorsPicker to TypeScript (#69094)
Closes DEV-1439

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:41:04 +13:00
Fraser
e27825b087 Convert AccountApp to TypeScript (#69077)
Closes DEV-1422

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:39:08 +13:00
Fraser
4336e7bc1c Convert FieldSidebar to TypeScript (#69087)
* Convert FieldSidebar to TypeScript

Closes DEV-1432

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:38:51 +13:00
Fraser
5ce4289d08 Convert SidebarLayout to TypeScript (#69074)
Closes DEV-1419

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:36:34 +13:00
Denis Berezin
9585b7a065 Move Data Studio common stuff to OSS (#68571)
* Fixing tests

* Fixing tests

* Fixing tests

* Fixing tests

* Fixing tests

* Fixing tests

* Fixing test

* Added source_readable to transform APIs

* Fixing tests

* Starts implementing read-only state for job detail page

* Stubs out potential solution for preventing non-admins from putting jobs into a state where they can no longer edit them

* Troubleshooting failing test

* Shows permissions error on transform page when user doesn't have source-read permissions. Disables run button when user lacks write access.

* Troubleshooting failing test

* Makes TagSection readOnly on job page if user lacks write access on any transforms that'd be run by the job

* Removes unnecessarily duplicated code from ScheduleSection

* Troubleshooting failing test

* Troubleshooting failing test

* Troubleshooting failing test

* Troubleshooting failing test

* Cleanup

* Fix unit tests

* Updates e2e test (group-15)

* Updates e2e tests (transforms-permissions.cy.spec.ts)

* Fixed transform-job permission check

* Only require transform write access for tag selector on job page

* Tweak tag tooltip text

* Prevents deleting/editing tag when it runs a job the user doesn't have transform write access on

* Adds a couple more transforms-permissions e2e tests

* Build transform permission off table can-query

* Added :can_run to transform-tag API

* Updates FE to use can_run on TransformTag

* Code cleanup

* Updates transforms list to disable transform rows the user doesn't have read access for

* Code cleanup

* Fixing test failures

* Fixing test failures

* Fixing test failures

* Fixing test failures

* Merged from master

* Test troubleshooting

* Resolved conflicts

* fixup: Reimplements row disabling in TransformListPage

* fixup: Adds readOnly prop to new IncrementalTransformSettingsWrapper component

* fixup: Reimplements readOnly state for PythonTransformEditor

* Adds read-only state for transform owner section

* Updates recently-moved canAccessDataStudio with canAccessTransforms check

* Updates permission-management unit tests

* Adds tooltip to transform column in permissions table

* Hides tooltip in Transforms column in permissions table if selected group is admin or analysts

* Fix unit test

* Updates some e2e tests that deal with non-admins using transforms to make sure they belong to the analyst group

* Adjusting backend permissions for new logic: all analysists can see transforms they have db access to, transform-permission is for writes

* Code improvements

* Code improvements

* Fixed test

* Fixing tests

* Troubleshooting tests

* Troubleshooting tests

* Fixing tests

* Update e2e tests

* Brought back can_access_transforms

* Fixing tests

* Better python permission checking

* Start, WIP

* Moved Library back to EE

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/data-studio/library/LibrarySectionLayout/PublishTableModal.tsx
#	frontend/src/metabase/data-studio/data-model/components/TableSection/TableAttributesEditBulk.tsx

* Continue moving Library back to EE

* Hotfix

* Fixing permissions

* Fixing permissions

* Fixing tests

* Fixing tests

* move out transforms api

* Fixing tests

* move transforms to oss

* actually it is true

* cleanup

* Fixing tests

* Fix post-merge ts error

* Close library functionality in OSS, fix some units

* Move oss table api endpoints for data structure, fix more unit tests

* Move oss table api endpoints for data structure, fix more unit tests

* Updates transforms list page so "New" is hidden and "Python library" is disabled if user has no transform permission for any database

* Fix typecheck issues

* Move non-python transform APIs to OSS

* Fix kondo

* Fix EE BE

* Code review fixes

* Code review fixes

* Merge remote-tracking branch 'origin/master' into transforms-permissions

# Conflicts:
#	.clj-kondo/config/modules/config.edn
#	enterprise/backend/test/metabase_enterprise/remote_sync/transforms_test.clj
#	enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformListPage/TransformListPage.tsx

* Code review fixes

* Fixed merge conflict

* Fixed merge conflict

* Fix lint and TS error from merge

* Fix merge issues

* Fix be issues

* Fix some unit tests

* Fix be tests issues

* Fix be tests issues

* Code review fixes

* Allow people with transform permission to see syncable schemas on a db

* code cleanup

* Fix be tests issues

* Fixing permissions

* Fix be tests issues

* Fix prettier

* wip: oss transforms

* fix module order

* fix tests for OSS transforms

* cleanup

* cleanup

* Fix some unit tests

* Fix library for OSS

* fix some more tests

* cljfmt

* add missing placeholder file

* fix more tests

* more tests

* more tests

* deftest-oss into `metabase.test`

* Fix some unit tests

* Fix some unit tests

* Fix transforms upsell for oss

* fix search filter

* fix transforms tables

* fix cycles

* feat: transform setting into collection list (#68758)

* feat: transform setting into collection list

Move the setting for syncing transforms into the list of collections
available to remote sync, so conceptually the transforms root collection
looks like a standard syncable collection.

* Clean up FE a little bit

* undo unneeded changes

---------

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

* Remove Security and Appearance from embedding settings related links on OSS (#68151)

* feat: enable transform setting on first import (#68807)

* feat: enable transform setting on first import

When a we import a remote that has transforms set the
`remote-sync-transforms` setting to true.

Update the remote sync object table clean up to be driven by the spec
configuration.

Add tests showing that transforms are consistently synced and erased
according to the following rules:

1. if the instance has `remote-sync-transforms` off and local transforms
and the remote does not have transforms content they are preserved after
an import
2. if the instance has `remote-sync-transforms` off and local transforms
and the remote has transforms content, the local transforms are
completely replaced by the remote.
3. if the instance has `remote-sync-transforms` on and the remote has
transforms content any local transforms are completely replaced by the
remote.
4. if the instance has `remote-sync-transforms` on has local transforms,
but the remote has no transforms, the local transforms are removed on import.

* fixup! relocate settings update

* fixup! don't let python libraries clash on import

* fixup! transactions for mysql

* fix: y axis not shown even if it would fit (#68861)

* Deps breaking broken (#68866)

* Add rename /broken to /breaking and add new /broken

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>

* Analysts can do crud on segments and measures (#68501)

* Data Analyst CRUD on measures/segments

Data analysts with unrestricted view-data permissions on a table can now
create, update, and delete segments and measures for that table
(previously superuser-only).

`can-read?` was already granted by the `manage-table-metadata` permission.

Add permission tests for `can-write?` and `can-create?` methods.

* Remove `brand-light` and `brand-lighter` (#68290)

* brand key adjustments

* loki tests

* handle the forgotten brand-dark

* Update Loki Snapshots

* removing brand-hover from dynamic-css-vars

* Adjustments to calendar picker colors

* small adjustments on the permissions pages

* sdk: remove background-hover tests from sdk as dynamic css derives are replaced with color-mix

* stupid spelling

* building shared resources

* Adjusting unit test, loki images

* rebasing adjustments

* Update Loki Snapshots

* small color fixes while I wait for loki

* re-adding highlighted class

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>

* Fix empty Python Library not showing placeholder/comment (#68826)

* CI: query-processor module should trigger driver tests (#68877)

* Delete fuzzing workflow (#68880)

* fix(sdk): fix failing tests for white-labeled colors (#68790)

* Dependency diagnostics sidebar updates (#68825)

* Use getter function to move element (#68714)

* Fix cloud implicit join tests (#68762)

A previous pr broke some tests on master, and this fixes them.

* feat(sdk, embed-js): Add an alerts support to modular embeddings (#68777)

* Add an alerts button on the SDK (#67796)

* Prepare to add alerts to SDK

* Remove unrelated prop from storybook

* Add basic alerts button

* Only show alerts button with the proper flag

* Prevent download button from being shown without proper flag

* use CSS to hide things instead of JS

* Properly position all question buttons

* Use JS to hide empty divs as pure CSS is impossible

* Render alert modal ✌️

* Fix type

* Add todo

* Structure the components better

* Control alert modal state

* Add interactive question storybook

* Make interactive and static question button styles consistent

* Add alerts modal to interactive question

* Make alert button works with custom layouts

* Fix tests

* Fix unit tests

* Fix import order issue

* Remove outdated comment

* Add the same condition to display alert button from the core app

* Polish

* Modify question storybooks to show a question instead of a model

* Hide empty elements more reliably

* Add more conditions to display alert button

* Remove unused `classNames` prop

* Use the same style as the interactive question one

* Remove outdated diff

* Fix alerts button not working in custom layouts

* Remove another unused code

* Add a basic test

* Add unit tests

* fix visibility logic

* Fix E2E tests

* Make assertion on static question tests better

* Improve assertions

* Add interactive question unit tests

* Add e2e test for static question

* Add interactive question e2e tests

* Fix subcomponent

* clarify comment

* Hide other channels than email on the alert modal (#68184)

* Hide channel options on alerts modal

* Add unit tests

* Make the test name clearer

* Fix can't view created notifications the first time (#68197)

* Fix can't view created notifications

* Add tests

* Remove unnecessary return type

* Add a safety guard

* Hide Alert (and download) button on edit mode (#68189)

Hide some buttons on edit mode as it makes no sense there

* Alerts polishing (#68477)

* Misc. improvements

* Make it typesafe

* Add alerts to modular embedding (#68286)

* Add the option in modular embedding wizard

* Support `withAlerts` in modular embedding

* Close the modal after hiding the alert button

* Add E2E tests

* Fix type

* Fix `withAlerts` not working on modular embedding with `drills: false`

* It's 2026!

* 1 plugin to rule 'em all!

* Fix E2E after merging master

* Fix test name

* Add alerts analytics (#68531)

* Add alert setup analytics

* Track withAlerts on modular embedding

* Update snowplow schema

* Fix E2E tests

* Fix schema version

* Remove links from alerts test email (#68547)

* Remove links from alerts template

* Remove links from alert email computed part

* Add tests

* Make embedding util easier to use

* Make alerts and subscriptions payload lighter

* Remove unexpected pprint

* Remove links from alert email via tasks (#68610)

* Save notification card's disable_links when creating

* Add tests

* make bin/mage run-tests able to run a single test (#67450)

* Add content translations for aggregations (#68733)

* fix: typecheck

* oops, add missing file

* fix upload impl tests

* Move upsells to ee for transforms

* fix search tests

* fix mage tests

* fix audit perms

* fix `user->tenant-collection-and-descendant-ids`

* reorganize transform permissions

* fix cyclic dep

* add forgotten test file

* fix modules tests / kondo

* another module config fix

* Fix python transforms upsell in oss, fix unit tests

* fix more tests

* one more test

* one more

* Fix e2e tests

* one more

* and a few more

* oops, syntax error

* fix more tests

* kondoooooo

* dumb test: try increasing latch timeout

* hopefully actually fix h2 oss test

* Fix flaky e2e tests

* Fix lint

* Trigger rebuild

* Fix CI

* Fix CI

* Fix failing e2e test

* fix check for is-data-analyst

* Gate transforms based on `:hosting` flag

* move noop events

* Remove unnecessary `check-permissions-for-model`

* use transform feature gating in `can-read?`

* cr resp: moving tests around

* add `enabled-source-types-for-user` and use it

* remove last `deftest-oss` usage

also clean up kondo config:

- no longer define custom expansions for old macros that no longer exist
- remove `deftest-oss`

* change owner to UX west

* use `is-data-analyst?` and `check-data-analyst`

... in a few more places, instead of manual `(or api/*is-superuser?* api/*is-data-analyst?*)`

* Fixes for BE after merge

* Integrate Workspaces code

* Fixes for BE

* Fixes for BE

* Fixes

* remove unnecessary `when-ee-evailable`

also that typo is driving me up the wall and I'm going to need to fix
it :grimace:

* transforms doesn't use config

* missing import

* fix tests

* kondoooo

* last be test failure?

* fix feature gating for workspaces transforms API

why do we have a separate workspaces transforms API

* kondo

* two more tests

* tests

* couple more tests

* almost... there

* fix a flaky transform run test

this was failing locally because I already had enough transform runs to
fill up the page. simple helper to clean up the transform runs that
exist before running the test, then restore them.

* fix data-model.shared.cy.spec.ts

---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Anderson <anderson@metabase.com>
Co-authored-by: kevinkelleher12 <kevin.kelleher@metabase.com>
Co-authored-by: Maksym Yakubych <undrfined@gmail.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Anderson <ands.alves.nunes@gmail.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Fraser <fraser@metabase.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: William <william@metabase.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Oleksandr Solovyov <alexander@solovyov.net>
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2026-02-05 02:30:18 +00:00
Fraser
b3f643fad6 Convert CollectionName to TypeScript (#69082) 2026-02-05 15:27:04 +13:00
Maksym Yakubych
2d3ed1861c fix: mini picker loader style (#69027) 2026-02-04 15:17:10 -08:00
John Swanson
beb2b5b751 Change permission required to view segment (#67855)
I think this permission makes more sense and is probably what we
intended. Note that users without `manage-table-metadata` but with table
permission can already read this information from the
`/api/query_metadata` endpoint.
2026-02-04 22:26:25 +00:00
dpsutton
b5ef6e1d0c module test runner (#69124)
* module test runner

support for `:module` and `:modules` syntax for our test runner

When using multiple with `:modules` need to put them in a vector, and
for shell reasons need to quote it. So there's a convenience method
where you just pass an individual:

```shell
clj -X:dev:ee:ee-dev:test :modules '[tiles enterprise/agent-api]'
clj -X:dev:ee:ee-dev:test :module enterprise/agent-api
```

REPL
===

```clojure
test-runner=> (metabase.test-runner/find-and-run-tests-repl
                {:modules '[tiles enterprise/agent-api]})
Running tests with options {:mode :repl, :namespace-pattern #"^(?:(?:metabase.*)|(?:hooks\..*))", :exclude-directories [".clj-kondo/src" "classes" "dev" "enterprise/backend/src" "local" "resources" "resources-ee" "src" "target" "test_config" "test_resources"], :test-warn-time 3000, :only ("test/metabase/tiles" "enterprise/backend/test/metabase_enterprise/agent_api")}
Running tests in ("test/metabase/tiles" "enterprise/backend/test/metabase_enterprise/agent_api")
Looking for test namespaces in directory test/metabase/tiles
Looking for test namespaces in directory enterprise/backend/test/metabase_enterprise/agent_api
Finding tests took 159.0 ms.
Running 32 tests
Running before-run hooks...

LONG TEST in metabase-enterprise.agent-api.api-test/get-metric-details-test
Test took 3.447 seconds seconds to run
Ran 32 tests in 6.506 seconds
129 assertions, 0 failures, 0 errors.
{:test 32, :pass 129, :fail 0, :error 0, :type :summary, :duration 6505.825875, :single-threaded 20, :parallel 12}
Ran 12 tests in parallel, 20 single-threaded.
Finding and running tests took 6.7 s.
All tests passed.
Running after-run hooks...
Running QP tests against these drivers: #{:h2}
{:test 32,
 :pass 129,
 :fail 0,
 :error 0,
 :type :summary,
 :duration 6505.825875,
 :single-threaded 20,
 :parallel 12}
```

CLI
===

multiple:
```shell
❯ clj -X:dev:ee:ee-dev:test :modules '[tiles enterprise/agent-api]'
Warning: environ value /Users/dan/.sdkman/candidates/java/current for key :java-home has been overwritten with /Users/dan/.sdkman/candidates/java/21.0.2-tem
Reflection warning, clojurewerkz/quartzite/triggers.clj:85:6 - call to method forJob on org.quartz.TriggerBuilder can't be resolved (argument types: unknown).
Reflection warning, clojurewerkz/quartzite/scheduler.clj:254:3 - call to method checkExists on org.quartz.Scheduler can't be resolved (argument types: unknown).
Reflection warning, macaw/walk.clj:47:5 - call to method walk on com.metabase.macaw.AstWalker can't be resolved (argument types: unknown).
Running tests with options {:mode :cli/local, :namespace-pattern #"^(?:(?:metabase.*)|(?:hooks\..*))", :exclude-directories [".clj-kondo/src" "classes" "dev" "enterprise/backend/src" "local" "resources" "resources-ee" "src" "target" "test_config" "test_resources"], :test-warn-time 3000, :exclude-tags [:metabot-v3/e2e], :only ("test/metabase/tiles" "enterprise/backend/test/metabase_enterprise/agent_api")}
Running tests in ("test/metabase/tiles" "enterprise/backend/test/metabase_enterprise/agent_api")
Looking for test namespaces in directory test/metabase/tiles
Looking for test namespaces in directory enterprise/backend/test/metabase_enterprise/agent_api
Finding tests took 11.8 s.
Running 32 tests
Running before-run hooks...

 0/32     0% [                                                  ]  ETA: --:--Placeholder until other changesets
LONG TEST in metabase-enterprise.agent-api.api-test/get-metric-details-test
Test took 10.536 seconds seconds to run

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

Ran 32 tests in 18.556 seconds
129 assertions, 0 failures, 0 errors.
{:test 32, :pass 129, :fail 0, :error 0, :type :summary, :duration 18555.859333, :single-threaded 20, :parallel 12}
Ran 12 tests in parallel, 20 single-threaded.
Finding and running tests took 30.4 s.
All tests passed.
Running after-run hooks...
Running QP tests against these drivers: #{:h2}
```

individual:

```
❯ clj -X:dev:ee:ee-dev:test :module enterprise/agent-api
Warning: environ value /Users/dan/.sdkman/candidates/java/current for key :java-home has been overwritten with /Users/dan/.sdkman/candidates/java/21.0.2-tem
Reflection warning, clojurewerkz/quartzite/triggers.clj:85:6 - call to method forJob on org.quartz.TriggerBuilder can't be resolved (argument types: unknown).
Reflection warning, clojurewerkz/quartzite/scheduler.clj:254:3 - call to method checkExists on org.quartz.Scheduler can't be resolved (argument types: unknown).
Reflection warning, macaw/walk.clj:47:5 - call to method walk on com.metabase.macaw.AstWalker can't be resolved (argument types: unknown).
Running tests with options {:mode :cli/local, :namespace-pattern #"^(?:(?:metabase.*)|(?:hooks\..*))", :exclude-directories [".clj-kondo/src" "classes" "dev" "enterprise/backend/src" "local" "resources" "resources-ee" "src" "target" "test_config" "test_resources"], :test-warn-time 3000, :exclude-tags [:metabot-v3/e2e], :module enterprise/agent-api, :only ("enterprise/backend/test/metabase_enterprise/agent_api")}
Running tests in ("enterprise/backend/test/metabase_enterprise/agent_api")
Looking for test namespaces in directory enterprise/backend/test/metabase_enterprise/agent_api
Finding tests took 12.6 s.
Running 19 tests
Running before-run hooks...

 0/19     0% [                                                  ]  ETA: --:--Placeholder until other changesets
LONG TEST in metabase-enterprise.agent-api.api-test/get-metric-details-test
Test took 11.252 seconds seconds to run

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

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

* very opinionated
2026-02-04 15:40:51 -06:00
Phoomparin Mano
de1fb87ba1 Add onboarding stepper component for embedding data permissions onboarding (#68801)
* add onboarding accordion

* add storybook for onboarding accordion

* fix the hover color of accordion

* chore: remove unused scrollListItemIntoView

* cleanup accordion

* add onboarding stepper instead

* retain checked icon in selected steps

* remove active step

* add unit tests for accordion

* rename step label to step number

* remove stepper root

* remove explicit ref

* refactor: simplify styles

* simplify storybook

* auto advance stepper

* support locked steps

* auto-infer step number

* remove forwardRef

* do not provide defaults for completed and locked steps

* add horizontal padding to match 64px in design

* style fixes to match design

* address reviews on scroll refs

* fix inconsistent scroll state
2026-02-04 21:18:27 +00:00
Phoomparin Mano
72c578bfdc Remove old llms.txt superseded by Jekyll plugin on docs site (#69132)
remove llms.txt and llms-embedding-full.txt superseded by Jekyll build plugin
2026-02-05 04:57:01 +08:00
Edward Paget
13389939e4 fix: dependency check for snippet eligibility (#69024)
* fix: dependency check for snippet eligibility

* fixup! rename eligibility function
2026-02-04 20:53:19 +00:00
appleby
8824365c61 Remove metabase.llm.costs (#69043)
Rather than providing a best-effort estimate that is likely to get stale, just report 0.0 for the estimated cost.

https://github.com/metabase/metabase/pull/68929#discussion_r2761321583
2026-02-04 11:25:05 -08:00
da
52c03c5b8a Fix formatting and spacing in quartz.properties. Add check in intervals to clusters (#68983)
Fix formatting and spacing in quartz.properties

Adding a new line for Quartz to check in on clusters
2026-02-04 15:54:52 -03:00
Alexander Polyankin
e10dfc7cfc Extract UI components for QB filter widgets (#69051) 2026-02-04 18:41:19 +00:00
github-automation-metabase
8d5a4f6804 Auto-update documentation for master (#69048)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-04 13:21:20 -05:00
Jakub Chodorowicz
ce6d00430d Gdgt 1298 act on e2e code duplication of admin metadata and data (#68600) 2026-02-04 18:35:20 +01:00
Eric Normand
7017eb7941 [Mutation Testing] Kill mutations in metabase.lib.page/page (#69019)
* [Mutation Testing] Add tests for metabase.lib.page/page
2026-02-04 11:03:14 -06:00
Eric Normand
57f23cf311 [Mutation Testing] Kill mutations in metabase.lib.segment/check-segment-overwrite (#68981)
* [Mutation Testing] Add tests for metabase.lib.segment/check-segment-overwrite
2026-02-04 11:02:46 -06:00
Timofey Kachalov
9bacef5fc1 feat(sdk, embed-js): Add joined tables/temporal/bins content translations for aggregations and breakouts and question title (#68954) 2026-02-04 19:09:25 +04:00
Nick Fitzpatrick
5bd8b24794 Only show an app switcher in the dependency page, not the tabs (#68966)
* Only show an app switcher in the dependency page, not the tabs

* fix unit test
2026-02-04 10:54:57 -04:00
Braden Shepherdson
fb225582a8 [Athena] Correctly recognize :base_type when db type is uppercase (#68369)
Athena's JDBC driver returns type names with the same capitalization as
the user types into the admin interface, but the
`sql-jdbc.sync/database-type->base-type` implementation for Athena only
recognized lower-case names (which are the defaults, I gather).

I think most databases don't have this problem, since they ignore the
case you typed in e.g. `CREATE TABLE` statements and have the JDBC
driver always return the canonical spelling of the type names.
2026-02-04 14:39:14 +00:00
Nick Fitzpatrick
c34013f4ff updating color for .SecondaryCTALink (#68001)
* updating color for .SecondaryCTALink

* light and dark upsell themes

* faster storybook build maybe?

* fix types, undo storybook changes

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-02-04 10:32:49 -04:00
Braden Shepherdson
cb62b19dd6 [deps] When Table Metadata is edited, re-analyze all dependents (#68683)
Fixes QUE-3000.

When either the table metadata or field metadata is edited, this runs
the analysis. Since only some metadata changes can impact the analysis,
this is over-sensitive and runs sometimes when it doesn't need to.
2026-02-04 09:21:20 -05:00
Kamil Mielnik
d08614d4d2 GDGT-1658 Unskip custom columns repro (#69097) 2026-02-04 20:38:06 +07:00
Sébastien
5558eeabed feat(sdk, embedjs): support saving and editing questions created with metabot (#68950)
* support saving and editing questiosn created with metabot in SDK/EAJS

* EAJS

* added schema types

* e2e test

* addressed PR comments
2026-02-04 14:36:16 +01:00
github-automation-metabase
f5942dae77 [chore] Update llms.txt for master (#69102)
Update llms.txt and llms-full.txt (master)

Regenerated llms.txt to include all markdown files from the docs/ directory.
Also generated llms-full.txt files for the embedding section.

🤖 Generated automatically by llms-txt-generate workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-02-04 10:53:59 +00:00
Fraser
c8d1566e3c Convert routes-embed to TypeScript (#69092)
Closes DEV-1437

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:17:53 +13:00
Fraser
ad356ffe36 Convert routes-public to TypeScript (#69093)
Closes DEV-1438

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:17:32 +13:00
Fraser
823559542c Remove unused eslintrc files (#69098) 2026-02-04 22:14:02 +13:00
Jakub Chodorowicz
f7801bbc47 feat: change data layer medallion inspired values to hidden, internal and published (#66330)
Change medallion values to hidden/internal/published. Hidden inherits visbility_type = hidden behaviour, internal/final are label only for now.

---------

Co-authored-by: Dan Stone <wotbrew@gmail.com>
2026-02-04 09:13:31 +00:00
Sloan Sparger
9eebf22cbc [Typescript] Convert files that need no changes (#68321) 2026-02-04 21:55:43 +13:00
Nemanja Glumac
cf48b132de Fix jest-haste-map duplicate manual mock warning (#68993)
Jest's haste map uses filenames (without extensions) as identifiers for
manual mocks. Both ExplicitSize and NativeQueryEditor had `__mocks__/index.ts`
barrel files, causing a collision on the name "index".

Fix by removing the barrel files and using explicit require() calls in
register-visualizations.js to point directly to the uniquely-named mock
files (ExplicitSize.tsx and NativeQueryEditor.jsx).

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:58:33 +07:00
Nemanja Glumac
12f5000d9f Fix broken Link mock (#68995)
The fix was changing the mock from returning a function directly (which
would be a default export) to returning an object with a Link property
(named export), matching how the actual module exports the component.
2026-02-04 14:47:39 +07:00
Alexander Polyankin
db53feb9ab Hydrate root collection in transform runs (#69047) 2026-02-03 23:38:23 -05:00
dpsutton
604a1d4301 log attribution (#68906)
* log attribution

```
2026-01-30 16:00:53,351 INFO audit-app.audit :: Copying complete. {mb-team=UX West}
2026-01-30 16:00:53,451 INFO notification.seed :: Seeding default notifications {mb-team=Gadget}
2026-01-30 16:00:53,647 INFO notification.seed :: Seeded notifications: {:skip 6} {mb-team=Gadget}
2026-01-30 16:00:53,658 INFO startup.core :: Running setup logic SearchIndexInit ☑️ {mb-team=DevEx}
2026-01-30 16:00:53,658 INFO startup.core :: Running setup logic analytics-dev-mode-setup ☑️ {mb-team=DevEx}
2026-01-30 16:00:53,668 INFO jdbcjobstore.JobStoreTX :: ClusterManager: detected 1 failed or restarted instances.
2026-01-30 16:00:53,668 INFO jdbcjobstore.JobStoreTX :: ClusterManager: Scanning for instance "mbp-m1.lan1769787254192"'s failed in-progress jobs.
2026-01-30 16:00:53,671 INFO search.core :: Initializing search indexes {mb-team=UX West}
2026-01-30 16:00:53,671 INFO core.QuartzScheduler :: Scheduler MetabaseScheduler_$_mbp-m1.lan1769788852529 started.
2026-01-30 16:00:53,671 INFO task.impl :: Task scheduler started {mb-team=UX West}
2026-01-30 16:00:53,678 INFO util.queue :: Starting listener field-value-invalidate with 1 threads 🎧 {mb-team=DevEx}
2026-01-30 16:00:53,688 INFO util.queue :: Starting listener search-index-update with 1 threads 🎧 {mb-team=DevEx}
2026-01-30 16:00:53,688 INFO core.core :: Metabase Initialization COMPLETE {mb-team=UX West}
2026-01-30 16:00:53,697 INFO core.core :: Metabase Initialization COMPLETE in 3.2 s (JVM uptime: 53.0 s) {mb-team=UX West}
2026-01-30 16:00:53,735 INFO search.core :: Found existing search index, and using it. {mb-team=UX West}
```

* include env variable

```shell
MB_LOG_TEAM_ATTRIBUTION=true clj -J-Xmx6g ...
...
2026-02-02 14:51:26,653 INFO core.core :: Setting up prometheus metrics {mb-team=UX West}
2026-02-02 14:51:26,655 INFO analytics.prometheus :: Starting prometheus metrics collector {mb-team=UX West}
2026-02-02 14:51:26,695 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191 {mb-team=UX West}
...
```

* copy module config file over for log attribution

* comment indentation

* restore module config location

* proper "from jar" detection

* correct logic for which env has a file and which a resource

* missed one

* ns cleanup

* trigger CI

* don't check config each time, only once
2026-02-03 17:25:51 -06:00
dpsutton
339136f500 fix kerberos tests (#69028)
* fix kerberos tests

in CI we're running:

```
[2/3] RUN ( curl -fsSL https://deb.nodesource.com/setup_22.x | bash )   && export DEBIAN_FRONTEND=noninteractive   && apt-get update && apt-get -y install --no-install-recommends nodejs yarn rlwrap fontconfig

...

3.579 Hit:1 http://deb.debian.org/debian trixie InRelease
(#6 3.579 Hit:2 http://deb.debian.org/debian trixie-updates InRelease
(#6 3.588 Hit:3 http://deb.debian.org/debian-security trixie-security InRelease
(#6 3.651 Hit:4 https://deb.nodesource.com/node_22.x nodistro InRelease
(#6 3.661 Reading package lists...
(#6 4.185 Reading package lists...
(#6 4.691 Building dependency tree...
(#6 4.834 Reading state information...
Dockerfile:5

--------------------

   4 |

   5 | >>> RUN ( curl -fsSL https://deb.nodesource.com/setup_22.x | bash ) \

   6 | >>>   && export DEBIAN_FRONTEND=noninteractive \

   7 | >>>   && apt-get update && apt-get -y install --no-install-recommends nodejs yarn rlwrap fontconfig

   8 |

--------------------

failed to solve: process "/bin/sh -c ( curl -fsSL https://deb.nodesource.com/setup_22.x | bash )   && export DEBIAN_FRONTEND=noninteractive   && apt-get update && apt-get -y install --no-install-recommends nodejs yarn rlwrap fontconfig" did not complete successfully: exit code: 100

(#6 4.850 E: Unable to locate package yarn
(#6 ERROR: process "/bin/sh -c ( curl -fsSL https://deb.nodesource.com/setup_22.x | bash )   && export DEBIAN_FRONTEND=noninteractive   && apt-get update && apt-get -y install --no-install-recommends nodejs yarn rlwrap fontconfig" did not complete successfully: exit code: 100
------
 > [2/3] RUN ( curl -fsSL https://deb.nodesource.com/setup_22.x | bash )   && export DEBIAN_FRONTEND=noninteractive   && apt-get update && apt-get -y install --no-install-recommends nodejs yarn rlwrap fontconfig:
3.517 2026-02-03 18:01:51 - To install N|solid Runtime, run: apt install nsolid -y
3.517
3.579 Hit:1 http://deb.debian.org/debian trixie InRelease
3.579 Hit:2 http://deb.debian.org/debian trixie-updates InRelease
3.588 Hit:3 http://deb.debian.org/debian-security trixie-security InRelease
3.651 Hit:4 https://deb.nodesource.com/node_22.x nodistro InRelease

4.850 E: Unable to locate package yarn

```

and it seems like debian doesn't host yarn (anymore?) which is
understandable. So we just do:

```
&& npm install --global yarn
```

And we should be good.

LLM diagnosed this. The setup here is a bit strange to me but it cats
it's resulting dockerfile:

```yaml
      - name: Print compose config
        run: cat mba-compose.yml
```

which was helpful. That dockerfile references:

```yaml
  metabase:
    build:
      context: /home/runner/work/metabase/metabase/.devcontainer/
      dockerfile: Dockerfile
```

And it's that devcontainer we are fixing here

* trigger kerberos tests

it needs files to be changed:

```yaml
  run-presto-kerberos-test:
    needs: files-changed
    if: needs.files-changed.outputs.backend_presto_kerberos == 'true'
```

which is configured in `.github/file-paths.yaml`

```yaml
backend_presto_kerberos:
  - "**/presto_jdbc/**"
  - "**/presto_jdbc.clj"
  - ".github/workflows/presto-kerberos-integration-test.yml"
```

so i add a `^:synchronized` teset to a file that should trigger this
files changed check and we get CI

* fix how we detect presto changes

usually hyphens are underscores, so it was looking for
`"**/presto_jdbc/**"` but the driver module is not a classpath root and
it uses a hyphen. Also it excluded the test file. so just manually add
that in, although it would be hit by the hyphen rule that i added

* correct typo in test filename

* touch test file
2026-02-03 17:10:28 -06:00
appleby
222b6b1bd0 OSS sqlgen snowplow test cleanups (#68929)
* Update oss sqlgen snowplow tests to use snowplow-test/with-fake-snowplow-collector

To follow existing snowplow test patterns from other modules.

* Move chat-completion-returns-usage-test next to other chat-completion tests

* Rename estimate-sanity-test to estimate-simplified-models-test

And use "raw" model names by default

* Update model-pricing with all models returned by list-models

Also add a comment with code for updating the model-pricing table.

* Ensure estimated_costs_usd is both number? and pos?

to ensure you still get a readable diff when the predicate fails rather than a hard to debug stacktrace.

* Use mt/with-random-premium-token! to get valid test token
2026-02-03 15:06:59 -08:00
Jeff Bruemmer
52579e4906 docs - revise Enterprise edition installation recommendations (#69029) 2026-02-03 16:33:33 -05:00
Nathan Voxland
6e4d96a68f Search Indexing: Cache card schema upgrades (#68912) 2026-02-03 15:09:37 -06:00
Cam Saul
d39acdcb96 Add custom Kondo linter to enforce idiomatic var names for def and friends (#68969)
Kondo linter for def using correct casing
2026-02-03 20:50:33 +00:00
Filipe Silva
5166c30ea5 Trial ups (#68478)
* feat: send current user email on cloud reqs

* feat: upgrade modal

* refactor: simplify upsell banner integration & tests

* test: metabase-enterprise.cloud-proxy.api-test

* fix: error stats for upgrade modal

* etc: whitespace

* fix: upgrade modal should only show up for upgrade url

* feat: refresh page after upsell flow for module reload

* refactor: use global modals instead of localized jsx

* refactor: remove unnecessary mock data and convert to localized strings

* test: add hm.client interceptor tests

* constants to types

---------

Co-authored-by: Gabriel Moreno <gabriel@metabase.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2026-02-03 12:17:30 -08:00
Nick Fitzpatrick
1858472ebe don't render data studio button for non admins or analysts (#68920) 2026-02-03 14:48:37 -04:00
github-actions[bot]
4120da5c4e Fix: Bookmark list is not updated when you archive a collection containing a bookmarked item (#67148)
* Fix: Bookmark list is not updated when you archive a collection containing a bookmarked item

Fixes #44499

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

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

* remove unneeded e2e test

---------

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2026-02-03 18:42:31 +00:00
Brad Anderson
091f66fc32 Fix #66446 - Disambiguate errors when moving content to remote synced collections (#68874) 2026-02-03 12:47:33 -05:00
Vamsi Peri
dbe8b1f36d Workspaces for editing Transforms (#66015)
Co-authored-by: Chris Truter <chris@metabase.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>
Co-authored-by: Oleksandr Solovyov <alexander@solovyov.net>
2026-02-03 17:45:55 +00:00
Dan Stone
21c5c9c424 Add :transform-rolling stats to allow for up-to-date metering (#68999) 2026-02-03 17:16:16 +00:00
Noah Moss
3192d01612 Misc agent API improvements + llms-agent-api.txt (#68914)
* Misc agent API improvements + llms-agent-api.txt

* add llms-agent-api.txt

* Add more specific query execution response schema, fix some tests, and update llms.txt again

* Simplify count aggregation schema

* address comments, some other tweaks

* rename & move agent API llms.txt

* bump ci

* bump ci

* small change: ensure we record query execution properly with :agent context

* fix test
2026-02-03 12:16:00 -05:00
Maksym Yakubych
c3715127e2 fix: stacked bar chart crashes when card has multiple same-type aggregations (#68903) 2026-02-03 17:10:16 +00:00
Eric Normand
c32e0af3ee Bigquery and snowflake failing test QUE-3013 (#68916)
BigQuery can't do case statements with different types in each branch. Other dbs can. This fixes a test that ran a case statement with different types to skip BigQuery, but it adds a new assertion to check correct behavior without it.

This also corrects a fault in the SnowFlake driver that incorrectly assumed that convertTimezone() returned a timestamp_ntz but it returns a timestamp_tz. This wraps it in a cast back to timestamp_ntz.
2026-02-03 16:37:10 +00:00
Timothy S. Dean
59fd52ac43 Add dataset option to disable fk validation on batch insert (#68646)
Gives datasets a new option to specify that when being created fk validation should be disabled on insert
2026-02-03 09:36:50 -07:00
Mahatthana (Kelvin) Nomsawadi
2e9aa4019c Add support for auto refresh prop in modular embeddings (#68896)
* Add `autoRefreshInterval` to the SDK (#68729)

* Fix new callback don't get registered with our own `useInterval`

* wip

* Handle negative number

* Add autoRefreshInterval to StaticDashboard storybook

* Add autoRefreshInvertal to EditableDashboard storybook

* Add tests

* Make test order more sensible

* Add more test coverage

* Update types

* Update test format for consistency

* Make the condition clearer

* Fix wrong user-facing comment

* Fix wrong test name

* use the same jest fake timer configuration for all tests

* Address review

* Add support for `auto-refresh-interval` in modular embedding (#68830)

* Support `auto-refresh-interval` in modular embedding

* Make the test names more sensible

* Add tests

* Add an auto-refresh indicator (#68847)

* Add a dummy refresh indicator

* Add the actual icon

* Pass tests

* Add tests

* Fix another test
2026-02-03 16:30:35 +00:00
Stas Gavrylov
8db69364e8 Chore: Migrate pulse code to TS (#68908)
* Migrate DashboardSubscriptionsSidebar to TS. Related refactoring.

* Migrate redux pulse to TS

* Some more pulse-related migrations to TS

* Remove usage of Pulse and PulseParameter types. Replace with DashboardSubscription

* Fix prettier

* Remove type-casting

* GDGT-1649: Cleanup

* GDGT-1649: Fix TS error

* GDGT-1649: Fix unit tests

* GDGT-1649: Fix PR comments

* GDGT-1649: Fix PR comments

* GDGT-1649: Refactor setStates to remove side-effects
2026-02-03 18:01:12 +02:00
Eric Normand
62402df8b6 Create mutation testing skill (#68978)
A Claude skill with accompanying code for automating the mutation testing of a namespace.
2026-02-03 09:00:40 -07:00
Nathan Voxland
3ef22bbaec Better error handling in queue listeners (#68924)
Better error catching in queue listeners, with auto-restart
2026-02-03 09:34:39 -06:00
Nathan Voxland
00479dbf33 Fix reindex connection management (#68973)
Move reindex connection management to use a connection only around the writes, not try to use a connection across all writes, which may commit and therefore close server-side cursors still being used to read the next batch.
2026-02-03 09:27:09 -06:00
Maksym Yakubych
bbddb39150 fix: cannot save dashboard when dashboard was reverted to one with deleted filter (#68871) 2026-02-03 14:38:42 +00:00
Maksym Yakubych
49fbb0d24e fix: gauge chart breaks when sent via email/slack (#68730) 2026-02-03 14:33:53 +00:00
Jeff Bruemmer
3c5fbff8a8 docs - remote sync edits (#68923) 2026-02-03 14:29:16 +00:00
github-automation-metabase
9ce2f7da36 Auto-update documentation for master (#68984)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-03 09:25:45 -05:00
kevinkelleher12
f4e81f2c62 Allow non-admins to see timezone on Runs page tooltip (#68974) 2026-02-03 13:10:15 +00:00
kevinkelleher12
ac2083205b Fix empty tooltips (#68925) 2026-02-03 07:04:49 -05:00
Stas Gavrylov
f23b210cf1 E2E: Fix frontend port check. Adjust setting visibility (#68964) 2026-02-03 13:20:51 +02:00
Nemanja Glumac
a2f819bd08 Fix broken eslint tests (#68994) 2026-02-03 12:10:48 +01:00
Fraser
d818c6dd46 Remove dead code from admin settings redux (#68976) 2026-02-03 22:53:54 +13:00
Romeo Van Snick
e909583de0 Fix flake in native test (#68972)
* Add metaKey to test helpers

* Fix flake by using realPress helper
2026-02-03 18:24:13 +11:00
Nick Fitzpatrick
7abfb8753f Updating text color for filter counter chip (#68958)
updating text color
2026-02-02 16:51:41 -04:00
metamben
47304d3144 Add table-publish and table-unpublish events to the Activity log (#68899)
Add table-publish and table-unpublish events to the Activity Log

Closes QUE-2881

Register table-publish and table-unpublish as audit log events.
2026-02-02 13:14:55 -07:00
Eric Normand
5caa28c48a Add tests for lib.card/merge-model-metadata (#68869)
* Add tests for lib.card/merge-model-metadata

No mutants survived!

* kick ci
2026-02-02 19:22:56 +00:00
Eric Normand
636c376712 Test card->underlying-query (#68875)
Kills 100% of mutants
2026-02-02 18:30:51 +00:00
Eric Normand
d51ce7c743 Test model-preserved-keys (#68876)
100% mutants killed
2026-02-02 18:02:53 +00:00
Eric Normand
40c0273582 Add test for lib.card/fallback-display-name (#68865) 2026-02-02 17:16:14 +00:00
Eric Normand
b5c0fdd4e3 Fully test source-model-card (#68872)
* Add tests for source-model-card

source-model-card is only called from one function, card-returned-columns.
So we have to test source-model-card (which is private) through card-returned-columns.

This kills all mutants but 3, which have to do with the self-reference check in source-model-card. Is it really
necessary? It is an impossible branch to reach.
2026-02-02 10:56:16 -06:00
Eric Normand
1296b4671b Test lib.card/saved-question-metadata (#68868)
* Test lib.card/saved-question-metadata

* kick ci
2026-02-02 10:52:42 -06:00
Alexander Polyankin
b9ba7de970 Convert Transform Runs page to TreeTable and add a sidebar (#68892) 2026-02-02 16:26:54 +00:00
Ryan Laurie
0fa535476d Add Growth Engineering to Teams (#68959)
add growth engineering to teams
2026-02-02 07:59:57 -07:00
github-automation-metabase
b0d28fcfa4 Auto-update documentation for master (#68941)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-02-02 09:10:33 -05:00
Nemanja Glumac
6b1ceaf93b Update the latest docker tag when the latest major version matches (#68946) 2026-02-02 14:51:46 +01:00
Ngoc Khuat
db7f048d82 Snowflake: fix flaky test (#68844) 2026-02-02 12:12:04 +00:00
Fraser
4842e16f7c Upgrade to eslint v9 (#68772) 2026-02-02 22:39:13 +13:00
Nemanja Glumac
cd1be87231 Upgrade Chrome setup action to version 2 (#68915) 2026-02-02 21:21:45 +13:00
Fraser
89a8970e4a Fix no unused expression violations (#68939) 2026-02-02 13:21:07 +13:00
Fraser
2e7aafe3a0 Fix rules of hooks violations (#68940) 2026-02-02 13:20:42 +13:00
metabase-bot[bot]
39310d4798 [chore] Update E2E test timings with recent data (#68936) 2026-02-02 09:10:32 +13:00
Ryan Laurie
23be6baa0e Entity Picker v26 (#66978)
* new pickers

implement all pickers

remove test code

remove dead code

type fixes

reorganize

type fixes

data picker plus plus

more fixes

type fixes

fix column test ids

type and testfixes

some e2e test updates and kick off ci again

improved default states

more e2e test updates

test updates

better loading state

lint fixes

better root namespace handling

fix more root collection nonsense

improve backparsing logic

fix closing multiple modals on esc or enter

more e2e test updates

e2e test updates 4

fix (some) backparsing and add tests

fix spacing

e2e test updates 5

more backparse fixes

weird snippet deal

more tenant shenanigans

sweet sweet unit tests

add back NewDashboardDialog

more e2e tests and start NewDashboardDialog unit test

lint fixes

fix infinite render loop 😅

various fixes

bug fixes

search improvements

better cache hitting

dialog unit tests

test fixes

mucho test fixes

* fix conflict resolution errors

* test and type fixes

* bug and test fixes

* New folder button for snippets and transforms, e2e tests

* fix some dashboard cases

* test fixes

* entity picker e2e tests

* much fixo

* more e2e fixes

* fix some flakes

* prettier

* fixes

* more e2e test updates

* fix sdk component tests

* some stabilization

* fix dashboard saving bug

* prettier

* address review comments

* test fixes

* fix sandbox tests

* obey the linter

* cant pass null namespace

* oh types

* timeline

* fix default expanded 😫

---------

Co-authored-by: Kevin Kelleher <kevin.kelleher@metabase.com>
2026-01-31 02:57:52 +00:00
Nemanja Glumac
7ed4b012e5 Document rootless docker limitations (#68913) 2026-01-30 23:47:33 +01:00
Tyler Plude
e38d87f616 Metabot OSS Single Shot Text-2-Sql (#67883)
* Experiment with communicating with LLMs in Clojure

* Libor comments

* switch to new openai /v1/responses api, check for structured output support

* support for claude to show how different adapters are

* linter fixes

* update llm config edn

* init chat completion endpoint and env vars

* basic sqlgen BE endpoint

* BE test script

* basic table schema context extraction

* temp hack EE inline entrypoint to use OSS sql gen

* BE OSS async & streaming support

* BE OSS async & streaming support

* structured json response

* dialect instructions and sys prompt mustache

* hacky disable file logging via env var

* improved dialect mapping

* improved table metadata

* fix merge conflict

* abstract out sql generation to a seperate hook

* move MetabotPromptInput and MetabotInlineSQLPrompt components into OSS land

* always register metabot context rather than doing it conditionally in enterprise

* move OSS implementation into a seperate file

* oss implementation first pass

* add setting to know if the feature is enabled or not, optionally show ui based on if it is enabled, consolidate state into a single hook call to fix OSS issues, gets everything working

* clean up

* add test coverage

* revert metabot context changes, they did not end up being needed

* restrict @mentions to tables in OSS and models, tables, questions in EE

* send current sql value and no longer send buffer id

* add anthropic provider

* dumb module resolution workaround to get unit tests working correctly

* if there is only one search model provided preselect it

* tweak sys prompt; add table descriptions

* improved table & field metadata

* tweak model env var

* add openai settings

* fix CSP tiptap nonce console error

* fix oss not having access to default import of use-metabot-sql-suggestion hook in prod builds

* add backend support for source_sql

* OSS SQL Generation v1.6 (#68584)

* update layout

* impl table input bar

* persist state on open / close of inline sql prompt input

* ui improvements, referenced_entities now in req/res body

* support referenced_entities param in /generate-sql; add extract-tables endpoint

* use search, fix some ux/ui issue with dropdown

* fix sizing issue

* simplify generate-sql response format; properly union the referenced entities

* return table model spec in response

* updated backend tests

* improve table selection logic using new endpoint changes w/ richer data

* rate limiting; throttling; http timeouts; max resp tokens

---------

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

* small spacing / sizing corrections

* fix ee extracting tables when it should not, add test cases

* handle disabeld state and enter press better

* cleanup

* fix modules

* add init; fix kondo

* test fix

* fix modules

* Add snowplow events to oss sqlgen endpoints (#68822)

* Copy token_usage snowplow schema from ai-service

* Add :snowplow/token_usage to metabase.analytics.snowplow/schema->version

* Add basic anthropic cost estimation based on static tables

* Return :usage and :duration-ms from llm.anthropic/chat-completion

* Add snowplow token_usage tracking to oss /generate-sql endpoint

* Add snowplow token_usage tracking to oss /generate-sql-streaming endpoint

* Add snowplow simple_event tracking for sqlgen success and failure events

* Consolidate snowplow tracking tests

* Appease whitespace linter

* Don't use non-api analytics.setting namespace

* Ensure duration_ms is an integer in snowplow events

* Add note about oss instances to hashed_metabase_license_token schema description

Co-authored-by: Thomas Schmidt <thomas@metabase.com>

* Fix snowplow lint by adding old versions of token_usage schemas

The snowplow linter was complaining that these older schemas were missing. These versions had been deleted from the
ai-service repo, so weren't copied over. Restore them from the last version in ai-service prior to being deleted.

---------

Co-authored-by: Thomas Schmidt <thomas@metabase.com>

* Add README reminder to token_usage snowplow schema

See also https://github.com/metabase/ai-service/pull/605

* cleanup streaming

* rm stream test

* pr feedback & test fixes

* test fix

* [Metabot] OSS SQL generation admin UI changes (#68824)

* wip

* load models async, move model input to a select, show error if deprecated model

* move to password input for api key

* handle case where env vars have been set via env vars and can not be changed

* clean up oss view

* remove token checks for deciding to upsell metabot

* be tests for new models endpoint

* fix bug

* fix broken api tests

* ui feedback, token validation, style fixes

* unit tests

* fix cypress

* fix e2e test tag

* type fixes

* condo / eastwood fixes

* fix unit tests

* fix e2e test

* fix stale css var reference

* pr feedback

* fix var

* fix n+1 query; improve metadata fetching

* driver multimethod for dialect instruction resource; review PR cleanups & fixes

* pr feedback

* fix added in driver multimethod

* whitespace lint

* address my own comments

---------

Co-authored-by: Oleksandr Solovyov <o@solovyov.net>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2026-01-30 14:40:48 -08:00
Rodrigo López Dato
f6e9a91db7 Show Cloud region IDs next to names (#68918) 2026-01-30 18:49:02 -03:00
Uladzimir Havenchyk
423aafea99 replace moment with dayjs in cljs (#66914)
* replace moment with dayjs in cljs

* Fix CLJS compilation with DayJS port of metabase.util.time

* fix some tests

* fix time parsing in drill chart

* formatting

* make a better fix

* kondo

* fix sdk test

* indent

* drop moment from locales

* reorder imports

* ran bin/mage cljfmt-all to indent

* Add an ignore for 1 unsorted namespace

- cljfmt makes the namespaces unordered -> kondo complains

* typo

* attampt to move logic to clojurescript

* one more thing to remove business logic from metabase-lib

* address cljs review

---------

Co-authored-by: Braden Shepherdson <braden@metabase.com>
Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2026-01-30 23:38:35 +03:00
Riley Thompson
78ae095422 Athena and Databricks adjustments for data upload (#68821)
* fix upload

* use shared impl
2026-01-30 20:18:11 +00:00
bryan
297d612165 Simplify CI workflow trigger conditions (#68917)
Reverts 730265b198
2026-01-30 21:01:50 +01:00
Edward Paget
8ae78915ed feat: add library/transforms toggles to modal (#68852)
* feat: add library/transforms toggles to modal

In the 'Set up git sync' modal in data studio this adds pre-selected
toggles to sync the library and transforms. This also creates the
library if you select it to sync, but it has not yet been created.

* fixup! push the library/transforms behavior into CollectionList

* fixup! better types to reduce casting

* fixup! missing mock setup

* Update enterprise/frontend/src/metabase-enterprise/remote_sync/components/RemoteSyncAdminSettings/RemoteSyncSettingsForm.tsx

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

* fixup! separate library sync component

* fixup! prettier

---------

Co-authored-by: Anderson <ands.alves.nunes@gmail.com>
2026-01-30 19:31:09 +00:00
Nick Fitzpatrick
02b0bbaf76 updating frontend dev guid colors section (#68904) 2026-01-30 15:26:31 -04:00
Alexander Polyankin
2062c3fb13 Fix colors and strings in the deps sidebar (#68901)
Fix colors and ttag
2026-01-30 19:15:18 +00:00
Eric Normand
37c991c292 Mutation testing basics (#68857)
Initial commit of mutation testing library.
2026-01-30 10:52:47 -06:00
Riley Thompson
3142c39435 Run transforms with a temp table + rename to avoid blocking queries (#68756)
* add fix and test

* dont drop bigquery tables and add test

* use atomic renames when possible

* use helper functions

* use existing wait-for-table

* use shared temp-table-name

* small change

* remove bigquery hack, make more similar to python impl

* address comments

* use random suffix and table name for temp tables

* use table hash

* update temp-table-name

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

* mocked test to verify strategy selection

* fix test

* test description

* remove test

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:39:26 -05:00
Edward Paget
898b7b4c38 feat: apply remote sync settings to snippets (#68902)
Adds new spec-driven methods to detect writability of remote-sync
controlled methods. These use the existing sync-eligibility settings so
in the future we can straightforwardly apply these settings to
remote-sync controlled models (TODO: follow up to build them for the
other models).

Adds batched-versions of these checks to avoid n+1 queries when loading
can_write for models.

Adds tests of remote-sync checks for snippets.
2026-01-30 10:33:47 -06:00
Maksym Yakubych
c5ff6bbbbd fix: documents charts rendering when resizing is sluggish (#68204) 2026-01-30 15:31:04 +00:00
Noah Moss
50dac4248d Split out more granular error codes for metabot tools (#68627)
* Split out more granular 400 vs 404 error codes for metabot tools

* a couple new tests

* fix test

* fix tests, cleanup

* discrete error handling in resolve-datasource

* refactor

* undo some refactor to fix tests
2026-01-30 10:04:53 -05:00
Timofey Kachalov
df8fd2aa98 Add content translations for aggregations (#68733) 2026-01-30 17:58:24 +04:00
Oleksandr Solovyov
e597be0c10 make bin/mage run-tests able to run a single test (#67450) 2026-01-30 12:35:11 +00:00
Mahatthana (Kelvin) Nomsawadi
64fb9ea259 feat(sdk, embed-js): Add an alerts support to modular embeddings (#68777)
* Add an alerts button on the SDK (#67796)

* Prepare to add alerts to SDK

* Remove unrelated prop from storybook

* Add basic alerts button

* Only show alerts button with the proper flag

* Prevent download button from being shown without proper flag

* use CSS to hide things instead of JS

* Properly position all question buttons

* Use JS to hide empty divs as pure CSS is impossible

* Render alert modal ✌️

* Fix type

* Add todo

* Structure the components better

* Control alert modal state

* Add interactive question storybook

* Make interactive and static question button styles consistent

* Add alerts modal to interactive question

* Make alert button works with custom layouts

* Fix tests

* Fix unit tests

* Fix import order issue

* Remove outdated comment

* Add the same condition to display alert button from the core app

* Polish

* Modify question storybooks to show a question instead of a model

* Hide empty elements more reliably

* Add more conditions to display alert button

* Remove unused `classNames` prop

* Use the same style as the interactive question one

* Remove outdated diff

* Fix alerts button not working in custom layouts

* Remove another unused code

* Add a basic test

* Add unit tests

* fix visibility logic

* Fix E2E tests

* Make assertion on static question tests better

* Improve assertions

* Add interactive question unit tests

* Add e2e test for static question

* Add interactive question e2e tests

* Fix subcomponent

* clarify comment

* Hide other channels than email on the alert modal (#68184)

* Hide channel options on alerts modal

* Add unit tests

* Make the test name clearer

* Fix can't view created notifications the first time (#68197)

* Fix can't view created notifications

* Add tests

* Remove unnecessary return type

* Add a safety guard

* Hide Alert (and download) button on edit mode (#68189)

Hide some buttons on edit mode as it makes no sense there

* Alerts polishing (#68477)

* Misc. improvements

* Make it typesafe

* Add alerts to modular embedding (#68286)

* Add the option in modular embedding wizard

* Support `withAlerts` in modular embedding

* Close the modal after hiding the alert button

* Add E2E tests

* Fix type

* Fix `withAlerts` not working on modular embedding with `drills: false`

* It's 2026!

* 1 plugin to rule 'em all!

* Fix E2E after merging master

* Fix test name

* Add alerts analytics (#68531)

* Add alert setup analytics

* Track withAlerts on modular embedding

* Update snowplow schema

* Fix E2E tests

* Fix schema version

* Remove links from alerts test email (#68547)

* Remove links from alerts template

* Remove links from alert email computed part

* Add tests

* Make embedding util easier to use

* Make alerts and subscriptions payload lighter

* Remove unexpected pprint

* Remove links from alert email via tasks (#68610)

* Save notification card's disable_links when creating

* Add tests
2026-01-30 11:32:31 +00:00
William
52f689cb36 Fix cloud implicit join tests (#68762)
A previous pr broke some tests on master, and this fixes them.
2026-01-30 10:19:47 +00:00
Romeo Van Snick
c51ca23c95 Use getter function to move element (#68714) 2026-01-30 15:10:26 +11:00
Alexander Polyankin
0bacd6c5ca Dependency diagnostics sidebar updates (#68825) 2026-01-30 03:52:21 +00:00
Phoomparin Mano
f46fdd8d27 fix(sdk): fix failing tests for white-labeled colors (#68790) 2026-01-30 09:55:49 +07:00
Fraser
27fd3aac36 Delete fuzzing workflow (#68880) 2026-01-30 15:13:58 +13:00
bryan
92a60c8529 CI: query-processor module should trigger driver tests (#68877) 2026-01-30 01:14:36 +00:00
Anderson
ee030befe2 Fix empty Python Library not showing placeholder/comment (#68826) 2026-01-29 22:11:38 -03:00
Nick Fitzpatrick
5f956d51bd Remove brand-light and brand-lighter (#68290)
* brand key adjustments

* loki tests

* handle the forgotten brand-dark

* Update Loki Snapshots

* removing brand-hover from dynamic-css-vars

* Adjustments to calendar picker colors

* small adjustments on the permissions pages

* sdk: remove background-hover tests from sdk as dynamic css derives are replaced with color-mix

* stupid spelling

* building shared resources

* Adjusting unit test, loki images

* rebasing adjustments

* Update Loki Snapshots

* small color fixes while I wait for loki

* re-adding highlighted class

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2026-01-29 20:06:28 -04:00
John Swanson
590c8945fc Analysts can do crud on segments and measures (#68501)
* Data Analyst CRUD on measures/segments

Data analysts with unrestricted view-data permissions on a table can now
create, update, and delete segments and measures for that table
(previously superuser-only).

`can-read?` was already granted by the `manage-table-metadata` permission.

Add permission tests for `can-write?` and `can-create?` methods.
2026-01-29 23:53:21 +00:00
metamben
c056b03d89 Deps breaking broken (#68866)
* Add rename /broken to /breaking and add new /broken

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2026-01-30 02:47:55 +03:00
Maksym Yakubych
b4cf7383a4 fix: y axis not shown even if it would fit (#68861) 2026-01-29 15:09:10 -08:00
Edward Paget
9c003314be feat: enable transform setting on first import (#68807)
* feat: enable transform setting on first import

When a we import a remote that has transforms set the
`remote-sync-transforms` setting to true.

Update the remote sync object table clean up to be driven by the spec
configuration.

Add tests showing that transforms are consistently synced and erased
according to the following rules:

1. if the instance has `remote-sync-transforms` off and local transforms
and the remote does not have transforms content they are preserved after
an import
2. if the instance has `remote-sync-transforms` off and local transforms
and the remote has transforms content, the local transforms are
completely replaced by the remote.
3. if the instance has `remote-sync-transforms` on and the remote has
transforms content any local transforms are completely replaced by the
remote.
4. if the instance has `remote-sync-transforms` on has local transforms,
but the remote has no transforms, the local transforms are removed on import.

* fixup! relocate settings update

* fixup! don't let python libraries clash on import

* fixup! transactions for mysql
2026-01-29 22:16:41 +00:00
kevinkelleher12
06a24797b4 Remove Security and Appearance from embedding settings related links on OSS (#68151) 2026-01-29 20:53:58 +00:00
Edward Paget
ad8af02598 feat: transform setting into collection list (#68758)
* feat: transform setting into collection list

Move the setting for syncing transforms into the list of collections
available to remote sync, so conceptually the transforms root collection
looks like a standard syncable collection.

* Clean up FE a little bit

* undo unneeded changes

---------

Co-authored-by: Anderson <anderson@metabase.com>
2026-01-29 14:47:55 -06:00
Riley Thompson
798fc4aff6 Custom test on connection checkout for clickhouse (#68808)
* work around clickhouse bug

* driver change log

* use c3p0 test

* Add todo comment

* kondo

* more kondo
2026-01-29 20:32:51 +00:00
Nick Fitzpatrick
eb0a8d4900 Uxw 2736 improve transitions between main app data studio and admin (#68508)
* temp

* hook up mode switcher in other apps

* Ci issues

* adding get help, fixing e2e tests, other adjustments

* most unit tests

* rename to profile link?

* adjusting unit tests with routing

* partial feedback

* rename profile link

* base current app off routes array

* adjustments

* add non-admin user state, fix unit tests

* PR feedback

* fixing test

* fixing e2e

* only 1 app switcher in admin navbar

* e2e adjustments
2026-01-29 16:08:26 -04:00
Nathan Voxland
d1e940e66b Don't cascade delete transform runs on transform delete (#68642) 2026-01-29 13:16:28 -06:00
Jeff Bruemmer
781282dd40 docs - embedding edits (#68567)
* embedding edits

* edits

* Apply suggestion from @jeff-bruemmer

* edits

* Apply suggestion from @jeff-bruemmer

* update

* sso

* edits
2026-01-29 18:55:43 +00:00
bryan
730265b198 fix: re-run CI when break-quarantine-* or ci:all-cloud-drivers labels are changed (#68037) 2026-01-29 18:29:15 +00:00
Brad Anderson
0897ae0847 Fix Dependency Graph icon (#68855) 2026-01-29 12:57:07 -05:00
Timofey Kachalov
7b921d8f43 Deprecate isEEBuild helper (#68848)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2026-01-29 21:34:11 +04:00
Stas Gavrylov
e22e0e5fb1 GDGT-1581: Add Python preview disclaimer (#68789)
* GDGT-1581: Update layout for Python preview message

* GDGT-1581: Add e2e test

* GDGT-1581: Rename 'Results' tab to 'Results preview'

* GDGT-1581: Adjust footer layout

* GDGT-1581: Add dismiss button to allow closing the footer

* GDGT-1581: Replace CSS with inline props

* GDGT-1581: Fix e2e test
2026-01-29 18:46:36 +02:00
Brad Anderson
c9bcbbfd73 UXW-2862 Fix test flake (#68784) 2026-01-29 11:41:36 -05:00
Brad Anderson
172e56f4b7 Fix data studio guard (#68781) 2026-01-29 11:16:02 -05:00
Eric Normand
1e3406219c Improved message for job failure due to routing (#68804) 2026-01-29 09:27:22 -06:00
Eric Normand
ad8376f6cc Don't double-convert expressions with convertTimezone() (#68740)
In the case statement, the default case did not TIMEZONE() to alter the timezone. The cases with TIMEZONE() returned a timestamp. The default case without TIMEZONE() returned timestamptz. Postgres reconciled the different types by converting all of them to timestamptz. So the timestamp was altered (by TIMEZONE()), but a new UTC timestamp was added (by the cast).

When the post-processor formats the rows, it checks that the metadata for the column has :converted_timezone. If it has that, it is formatted in the converted timezone, and since it's UTC, it will convert it again, a second time, which is incorrect.

The fix here is to check if the returned column is a timestamptz and strip it before formatting. We assume the database has already done the conversion. This avoids the second conversion.
2026-01-29 09:04:30 -06:00
John Swanson
bf81141508 allow getting transforms in root collection (#68731)
allow getting transforms in root collection
2026-01-29 15:00:57 +00:00
Noah Moss
05c2aff020 Split agent api out as a separate friend module to metabot-v3 (#68814)
* Split agent api out as a separate module

* remove old files

* cleanup

* fix module config
2026-01-29 09:57:08 -05:00
Aleksandr Lesnenko
bd3f1d4632 Transforms permissions (#66296)
Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
2026-01-29 09:29:01 -05:00
Sébastien
9743b3cbee Added link to doc for full app embedding (#68773)
* added link to doc for full app embedding

* Apply suggestions from code review

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2026-01-29 15:01:05 +01:00
github-automation-metabase
50c809f3fa Auto-update documentation for master (#68820)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-29 08:27:11 -05:00
Timofey Kachalov
0559e0beee Hide Guest embedding status bar when guest embedding is disabled (#68836) 2026-01-29 16:06:34 +04:00
Dan Stone
cf347ce318 Throw db-routing error on anonymous transform call (#68788)
Fixes GDGT-1588
2026-01-29 11:29:25 +00:00
Stas Gavrylov
eea96b2477 GDGT-1356: Alert Notification Cron Syntax is misleading (#68834)
* GDGT-1356: Adjust day of week parsing in cron string

* GDGT-1356: Add unit test
2026-01-29 13:14:35 +02:00
da
390bcd144e Change log level from info to debug for ignored params on qp (#68748)
reducing a bit more the verbosity of our logs, this time on cards with old metadata
2026-01-29 05:47:36 -03:00
Jakub Chodorowicz
383f6ba968 gdgt-1377 deselect and hide from bulk view tables not matching selection (#68469) 2026-01-29 09:26:54 +01:00
Aleksandr Lesnenko
450f5cc9ba data studio upsell (#68527)
* data studio upsell

* refactor: fix route guards

* fix: lint comments

* fix: data studio layout tests

* fix: remove local stub for api

* fix: moar lint errors

* fix: comments

---------

Co-authored-by: Gabriel Moreno <gabriel@metabase.com>
2026-01-28 19:57:24 -04:00
metamben
353260e583 Keep field-values for detail-only fields (#67540)
* Keep field-values for detail-only fields

Closes #10851

* Make sure old-preview-display is set

* Fix test
2026-01-29 02:49:33 +03:00
Maksym Yakubych
b300a6118f fix: search in mini data picker only shows loading on the first load (#68365) 2026-01-28 17:53:29 -05:00
Maz Ameli
86410d0667 Boat instead of bird (#67612)
* boat instead of bird

* update tests
2026-01-28 22:41:26 +00:00
Nemanja Glumac
5d84cc6c3f Add a note about the Metabase config (#68803) 2026-01-28 22:51:19 +01:00
Edward Paget
ef4136d69e fix: clean up style issues in new remote-sync code (#68753)
* fix: clean up style issues in new remote-sync code

Fixes a grab bag of small style/docstring issues I found after the
parent PRs were merged.

* fixup! lint

* fixup! keep the newsnippetpage as always dirty
2026-01-28 15:42:02 -06:00
John Swanson
16e013a90d flake: fix temporal pollution (#68745)
flake: frozen clock
2026-01-28 21:31:04 +00:00
bryan
595e171f34 ci: add H2 OSS driver tests to catch OSS-only failures (#68649) 2026-01-28 21:25:05 +00:00
John Swanson
f01589a9d6 Fix migration for data studio (#68585)
* Fix migration for data studio

We usually auto-populate some other fields in permissions based on the value of object - perm_value, perm_type, and collection_id.

This obviously doesn't happen in a migration! So set them manually here.

* just roll forward
2026-01-28 13:15:30 -08:00
John Swanson
bf6c8b3459 Fix throw-if-last-admin! (#68198)
[UXW-341: Reactive old admin account is not possible](https://linear.app/metabase/issue/UXW-341/reactive-old-admin-account-is-not-possible)

Co-authored-by: Ed Paget <edpaget@users.noreply.github.com>
2026-01-28 13:14:31 -08:00
metamben
65189a0b69 Push the analysis of the dependents to the job (#68749)
* Push the analysis of the dependents to the job

Fixes QUE-3001

The analysis findings of dependents are marked as stale (if they exists) and the analysis job picks them up with
higher priority. Also, the job is triggered right after the analysis of the dependency and doesn't stop until all
stale findings are refreshed.

* Fix boolean type in migration

* Set *warn-on-reflection* to true

* Stick to SQL change

* Fix tests

* Remove race condition

* Process review feedback

* fixes

* fix tests

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2026-01-28 20:52:58 +00:00
John Swanson
d950e70482 No special Synced Collection on remote sync setup (#68499)
* No special Synced Collection on remote sync setup

[UXW-2684: Remove creation of special "Synced Collection" that gets created when Remote Sync is setup](https://linear.app/metabase/issue/UXW-2684/remove-creation-of-special-synced-collection-that-gets-created-when)

Co-authored-by: edpaget<ed@metabase.com>

* fix e2e tests
2026-01-28 12:40:50 -08:00
John Swanson
54e150e856 flake: wait for card query after revert (#68796)
The revert operation triggers a chain: revert API -> reload card page.

Test was only waiting for the revert API, then sometimes it would manage
to click the History tab *before* the page reload. Then the page reloads
and we're not on the History tab anymore.

Waiting for the card query request to finish means that we've reloaded
the page and ready to roll.
2026-01-28 11:54:05 -08:00
Riley Thompson
5959ca6c82 ClickHouse to always support schemas (#68517)
* set schemas to true and add migration

* just enable schemas

* remove migration

* add test

* fix schema test
2026-01-28 14:03:56 -05:00
Noah Moss
6b330140ff Semantic layer agent API endpoints (#68260)
* New endpoint implementations

* add new schemas for new endpoints

* new field values endpoints

* simple search endpoint + bastic test

* WIP - query construction endpoint

* Query construction tests, convert :output errors to real 404

* Basic query execution endpoint that just wraps qp/process-query

* Add query response schema

* Add descriptions to malli specs

* Add more tests, simplify some schemas

* Misc fixes, malli description improvements, try to fix decoding/encoding stuff but will need to revisit

* fix whitespace

* Greatly simplify schema sharing w/existing tool endpoints

* cleanup ns

* Fix some tests

* Fix up metric field values test

* add agent-client test helper, and new agent-api-user-binding-test

* simplify base64 query encoding

* small cleanups

* Address feedback

* add comment

* bump ci

* bump ci

* fix modules

* switch to agent-api feature flag
2026-01-28 14:00:28 -05:00
Nathan Voxland
24b7d886aa Paginate caching dashboard (#68242) 2026-01-28 12:52:39 -06:00
kevinkelleher12
b27e93965d Make sunburst charts reflect colors set in the appearance tab (#68641) 2026-01-28 14:12:28 -04:00
Cam Saul
f563a91095 Add additional tables to Lib test metadata (#68754)
* Add additional tables to Lib test metadata

* Cljfmt

* Test fixes 🔧

* Tell generators how to generate booleans
2026-01-28 09:02:39 -08:00
Alexander Polyankin
b0cfcca1e5 Dependency diagnostics UI polish (#68761) 2026-01-28 16:52:26 +00:00
Maksym Yakubych
0421a12c9c fix: documents ignore base path when linking to dashboards (#68633) 2026-01-28 16:31:27 +00:00
Noah Moss
cb42387606 Ensure we catch semantic search errors with failover and prometheus metrics (#68639)
* Ensure we catch semantic search errors before RRF + add a new prometheus metric

* Revert "Ensure we catch semantic search errors before RRF + add a new prometheus metric"

This reverts commit d972fdf6df.

* Move fallback logic to semantic-search.core to not be metabot-specific, add test
2026-01-28 10:23:42 -05:00
Nick Fitzpatrick
731f564a04 Uxw 2696 handle charts where manual y axis hides all data (#68156)
* off grid detection

* woof

* fixing bad counts

* adjusting no data points check

* expose initalUiState in visualizer

* cleaning up dashcard functions

* adjust broken behavior for existing tests

* e2e tests

* PR feedback

* remove buttons to open settings and auto adjust. Adding tests for pinned cards and documents

* removing unneeded code, pr feedback, and adding loki screenshots

* fix silly thing
2026-01-28 15:13:59 +00:00
Timofey Kachalov
d41abaea80 Fix flaky content-translations.cy.spec.ts e2e (#68776) 2026-01-28 16:52:12 +04:00
Sébastien
13af38d9ca Fixed date range parameter widget can overflow in embed flows (#68724)
* fixed date param ovrflowing in embed

* added loki test
2026-01-28 11:59:31 +01:00
Romeo Van Snick
7d107764fe Fix flake in transform repro (#68759)
* Fix flake

* fix typo
2026-01-28 21:34:05 +11:00
Anderson
b871ae4909 Make segments read-only for published tables also on admin (#68651)
* Make segments read-only for published tables also on admin

* improve test coverage

* group tests
2026-01-28 03:25:53 +00:00
github-automation-metabase
114541e4fc Auto-update documentation for master (#68763)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-27 21:35:42 -05:00
bryan
0982712225 Enable fake-sync for Snowflake driver tests (#68322) 2026-01-27 15:47:40 -07:00
Edward Paget
965ce2a47b feat: add remote-sync support for PythonLibrary (#68515)
Add support for syncing PythonLibrary entities (Python transform libraries)
with a Git repository when remote-sync-transforms setting is enabled.

Implements serdes serialization for pythonlibraries using `path` as the
entity id.

Adds FE changes to refresh on dirty state and show changes in the AllChangesView
2026-01-27 16:09:31 -06:00
Noah Moss
7316888913 Semantic layer agent API groundwork + auth (#68163)
* Add support for versioned endpoints to deftool

* Create new API namespace + add custom jwt middleware

* add kondo module dependency

* revert the deftool stuff which isn't needed now

* fix lint issues

* fix jwt case insensitivity issue; more structured errors for auth issues

* small jwt cleanups

* Add support for session token exchange

* cleanup, lint, tests

* more test cases, cleanup

* bump ci

* Restructure session logic to use normal middleware, add test for session expiration

* fix up module config

* share more code with jwt sso module + remove some now-redundent tests

* try to fix tests by using existing SSO JWT test setup

* fix whitespace

* fix up module config
2026-01-27 16:49:55 -05:00
John Swanson
fe290f97e7 Fix collisions in test log file uploads (#68739)
1. if the `log-artifact-suffix` is empty, just do
`test-logs-{github-job}`.

2. include a `log-artifact-suffix` argument for the driver tests

This way we don't get 409 conflict errors when uploading logs on test
failures for driver tests.
2026-01-27 12:22:57 -08:00
Gabriel Moreno
794819ead2 Data Studio Owners, Alignment & Dependency diagnostics icon (#68707)
* refactor: remove avatars and "no owner" fallback from transforms list

* refactor: right-align rows column on data structure

* fix: search_check icon fill color
2026-01-27 16:20:55 -04:00
Riley Thompson
2ef8d50387 Fix redshift sync failing with duplicate key error (#68097)
* select distinct

* filter out duplicates

* skip duplicate cols entirely

* clean up test

* address comments
2026-01-27 19:34:40 +00:00
William
73766cf355 implicit joins get implicit fields added (#68394)
Say you are doing an implicit join from orders to products in order to summarize by products.category. Previously, with implicit joins, we join with the actual products table instead of a select blah from products wrapper, and so the various fields returned by the join were returned under their original name. However, the code would abbreviate excessively long column names from the joined table and break the query.

That difference was due to add-implicit-fields running before add-implicit-joins. Explicit joins got implicit fields added, while implicit joins didn't get those fields. This pr runs add-implicit-fields a second time after add-implicit-joins, which makes implicit and explicit joins compile to the same (correct) sql.
2026-01-27 13:01:52 -06:00
John Swanson
38f42a9386 Don't automatically pull when in read-write mode (#68500)
Don't automatically pull when in read-write mode

Co-authored-by: edpaget<ed@metabase.com>
2026-01-27 10:43:18 -08:00
Oleksandr Yakushev
0ec522227b [match-lite] Make match-lite recursive by default (#68658)
Make match-lite recursive by default
2026-01-27 20:27:01 +02:00
John Swanson
cb42b96ca8 flake: empty schemas in target schemas (#68742)
The test was missing an explicit database selection step which sometimes
resulted in the Save button being disabled.

Also removed the unnecessary sync_schema call — the syncable_schemas
endpoint queries Postgres directly via the driver, so no metadata
sync is needed.
2026-01-27 09:58:51 -08:00
Oleksandr Yakushev
52f48e2400 Refactor match-lite and introduce :or clause (#67345)
* Refactor match-lite

* Add support for :or syntax
2026-01-27 19:23:18 +02:00
John Swanson
36a5234efc Do not delete built-in transform tags on sync (#68727)
* Do not delete built-in transform tags on sync

I found that some tests were failing intermittently - sometimes
TransformTags were present, and sometimes they were missing. I tracked
it down to this test, which enables and then disables remote syncing
transforms.

The issue is that if we sync transforms (... and transform tags), then
unsync them, then we delete everything that was synced - including the
built-in tags.

We should exclude these from deletion.

* Fix serialization API tests
2026-01-27 08:29:58 -08:00
dpsutton
065c23b648 prometheus metrics for jvm startup (#68728)
logs:
```
2026-01-27 15:02:23,442 INFO util.queue :: Starting listener field-value-invalidate with 1 threads 🎧
2026-01-27 15:02:23,448 INFO util.queue :: Starting listener search-index-update with 1 threads 🎧
2026-01-27 15:02:23,448 INFO core.core :: Metabase Initialization COMPLETE
2026-01-27 15:02:23,453 INFO core.core :: Metabase Initialization COMPLETE in 4.8 s (JVM uptime: 57.8 s)
```

metrics:

```
❯ http get :9191/metrics | grep startup
metabase_startup_jvm_to_complete_millis 57764.0
metabase_startup_init_duration_millis 4816.0
```

Note that there two different notions of startup time: from jvm
instantiation, and from before init! was called. This maintains the two
separately so we can diagnose if class load time gets longer
independently of amount of work we do during startup itself
2026-01-27 10:03:20 -06:00
Edward Paget
b8ed3bd4d0 feat: support remote sync for NativeQuerySnippets (#68497)
* feat: support remote sync for NativeQuerySnippets

When the Library collection is remote-synced, all NativeQuerySnippets
and their collections (snippets namespace) are automatically tracked
for remote sync. No separate setting is needed - syncing is tied
directly to the Library collection's is_remote_synced status.

Update the FE to use the declarative approach to refresh dirty state
when snippets are modified and update the library dirty state indicator
to turn on when any snippet or snippet collection is modified.

* fix: deletion of snippets/transforms collections

Fixes a bug where collections in the special namespaces were not cleaned
up after changing branches.

* fixup! don't double create entries

* fixup! transaction scope for test on mysql
2026-01-27 08:38:10 -06:00
Rodrigo López Dato
5486894ab8 Allow [::1] and 127.0.0.1 origins by default for cross-origin requests + support IPv6 origins (#68697)
Allow [::1] origin by default for cross-origin requests
2026-01-27 10:46:56 -03:00
Sébastien
8bafab3e0f Skipping first sso request if possible in EAJS/Modular Embedding (#68679)
skipping first sso request if possible in eajs
2026-01-27 14:04:41 +01:00
Romeo Van Snick
0b8c5cd5a3 Show empty schemas in transform target and table metadata (#68592)
* Show empty schemas when picking a transform target

* Use listSyncableDatabaseSchemas endpoint in data structure

* Handle empty schemas

* Add repro for metabase#68378

* Move transforms tests to new folder

* Split off transforms reproductions into separate specs
2026-01-27 08:15:42 +00:00
github-automation-metabase
9c95c11b7b Update translations 2026-01-27 (#68720)
* Update translation sources 2026-01-27

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2026-01-27 06:21:24 +00:00
github-automation-metabase
3a8eae8a39 Auto-update documentation for master (#68713)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-26 23:38:22 -05:00
Ngoc Khuat
b98eb79b38 Flip mariadb during table editing support check (#68171) 2026-01-27 03:27:25 +00:00
Fraser
7d6d5b35a3 Use named exports in common components code (#67779) 2026-01-27 13:34:04 +13:00
Fraser
bc82a001ee Use named exports in visualizations folder (#67058) 2026-01-27 13:26:47 +13:00
kevinkelleher12
0b7737980d Reduce bundle size by removing import of enormous character sizes constant (#68700) 2026-01-26 14:50:03 -07:00
Nathan Voxland
f0a7607b2b Only validate map URLs that changed (#68030) 2026-01-26 14:18:59 -06:00
Nathan Voxland
09d1a5d630 Don't duplicate uploads in admin page (#68077) 2026-01-26 13:53:29 -06:00
dpsutton
c3898889fd try to prevent deadlocks in impersonation tests (#68690) 2026-01-26 13:39:25 -06:00
Edward Paget
233dbfecdc feat: toggle transform dirty status on setting change (#68684) 2026-01-26 12:47:26 -06:00
dpsutton
503108d247 Better logging around token checks (#68625)
* Better logging around token checks

We used to just log we were checking but not give error responses. So it
would look like a ton of token checks for no real reason.

Now includes error responses if any, and also include logs when engaging
the token check circuit breaker, and when it is "half open", when it
lets one real token check happen every 30 seconds to see if the service
is back.

```
2026-01-23 12:26:47,175 INFO premium-features.token-check :: Checking with the MetaStore to see whether token 'f325...d01a' is valid...
2026-01-23 12:26:47,186 INFO premium-features.token-check :: Reporting Metabase stats: {:embedding-dashboard-count 0, :enabled-embedding-sdk false, :internal-users 1, :embedding-question-count 0, :query_executions_static_embed 0, :query_executions_public_link 0, :domains 1, :metabot-usage-date 2026-01-22, :enabled-embedding-static false, :enabled-embedding-simple false, :metabot-queries 0, :external-users 0, :metabot-tokens 0, :query_executions_simple_embed 0, :enabled-embedding-interactive false, :query_executions_internal 0, :metabot-users 0, :query_executions_sdk_embed 0, :query_executions_interactive_embed 0, :users 1}
2026-01-23 12:26:49,190 INFO premium-features.token-check :: Error checking token: Connect timed out †
2026-01-23 12:26:49,194 INFO premium-features.token-check :: Checking with the MetaStore to see whether token 'f325...d01a' is valid...
2026-01-23 12:26:49,201 INFO premium-features.token-check :: Reporting Metabase stats: {:embedding-dashboard-count 0, :enabled-embedding-sdk false, :internal-users 1, :embedding-question-count 0, :query_executions_static_embed 0, :query_executions_public_link 0, :domains 1, :metabot-usage-date 2026-01-22, :enabled-embedding-static false, :enabled-embedding-simple false, :metabot-queries 0, :external-users 0, :metabot-tokens 0, :query_executions_simple_embed 0, :enabled-embedding-interactive false, :query_executions_internal 0, :metabot-users 0, :query_executions_sdk_embed 0, :query_executions_interactive_embed 0, :users 1}
2026-01-23 12:26:51,205 INFO premium-features.token-check :: Engaging circuit breaker in token check ††
2026-01-23 12:26:51,206 INFO premium-features.token-check :: Error checking token: Connect timed out
2026-01-23 12:27:44,548 INFO premium-features.token-check :: In token check circuit breaker but attempting check
2026-01-23 12:27:44,551 INFO premium-features.token-check :: Checking with the MetaStore to see whether token 'f325...d01a' is valid...
2026-01-23 12:27:44,565 INFO premium-features.token-check :: Reporting Metabase stats: {:embedding-dashboard-count 0, :enabled-embedding-sdk false, :internal-users 1, :embedding-question-count 0, :query_executions_static_embed 0, :query_executions_public_link 0, :domains 1, :metabot-usage-date 2026-01-22, :enabled-embedding-static false, :enabled-embedding-simple false, :metabot-queries 0, :external-users 0, :metabot-tokens 0, :query_executions_simple_embed 0, :enabled-embedding-interactive false, :query_executions_internal 0, :metabot-users 0, :query_executions_sdk_embed 0, :query_executions_interactive_embed 0, :users 1}
2026-01-23 12:27:46,574 INFO premium-features.token-check :: Engaging circuit breaker in token check
2026-01-23 12:27:46,575 INFO premium-features.token-check :: Error checking token: Connect timed out

...
2026-01-23 12:32:50,432 INFO premium-features.token-check :: In token check circuit breaker but attempting check †††
2026-01-23 12:32:50,433 INFO premium-features.token-check :: Checking with the MetaStore to see whether token 'f325...d01a' is valid...
2026-01-23 12:32:50,444 INFO premium-features.token-check :: Reporting Metabase stats: {:embedding-dashboard-count 0, :enabled-embedding-sdk false, :internal-users 1, :embedding-question-count 0, :query_executions_static_embed 0, :query_executions_public_link 0, :domains 1, :metabot-usage-date 2026-01-22, :enabled-embedding-static false, :enabled-embedding-simple false, :metabot-queries 0, :external-users 0, :metabot-tokens 0, :query_executions_simple_embed 0, :enabled-embedding-interactive false, :query_executions_internal 0, :metabot-users 0, :query_executions_sdk_embed 0, :query_executions_interactive_embed 0, :users 1}
2026-01-23 12:32:52,450 INFO premium-features.token-check :: Engaging circuit breaker in token check
2026-01-23 12:32:52,450 INFO premium-features.token-check :: Error checking token: Connect timed out
```

The highlights are now we include:
- † `Error checkign token: Connect timed out` the error response when
appropriate
- †† `Engaging circuit breaker in token check` when we engage the
circuit breaker to no longer do real token checks
- ††† `In token check circuit breaker but attempting check` indicating
we are doing a real one from the circuit breaker to determine if the
service is restored

* Whew. Lots of stuff

add a namespace to the circuit breaker keyword:
`:token-check/circuit-breaker`. Change the keyword holding
`:token-check/app-db-not-ready` to cause. I had used reason but nothing
checked that.

this is because want to log when a token check fails, but not when it is
- failure due to circuit breaker
- failure due to appdb not ready yet.

token checks can happen anywhere and with an enormous frequency. they
fail before the appdb is setup (we can't check settigns yet) and of
course they fail during the circuit breaker opening. that's the point of
the circuit breaker. So we don't have to log these.

We _do_ want to log other failures.

We also want to do some prometheus metrics. Here's a journey:
You previously couldn't import the prometheus analytics namespace
because analytics.settings required appearance.settings. It does so
because a docstring in analytics settings used to include Metabase in
the string. I removed that so now it says "in order to help us
improve". And then things would be smooth sailing.

Except we had an issue.

```
026-01-23 20:50:03,514 INFO analytics.prometheus :: Starting prometheus metrics collector
2026-01-23 20:50:03,539 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
thread229238 we made the system!
thread229238 and now we are done with the lock!
2026-01-23 20:50:03,607 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
2026-01-23 20:50:03,611 ERROR premium-features.token-check :: Error validating token: Failed to initialize Prometheus on port 9,191
2026-01-23 20:50:03,611 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
2026-01-23 20:50:03,612 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
2026-01-23 20:50:03,614 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
2026-01-23 20:50:03,616 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
2026-01-23 20:50:03,617 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
2026-01-23 20:50:03,618 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
2026-01-23 20:50:03,619 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
2026-01-23 20:50:03,619 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
2026-01-23 20:50:03,653 INFO core.core :: Setting up prometheus metrics
```

We have locking around the system but it is starting tons of times! Lots
of debugging, swearing that this can't happen. but then i finally threw
in my favorite trick: `(clojure.repl/pst (Exception. "how did we get
here"))`. And it turns out we are doing this:

1. token check fails, so we call `prometheus/inc!`
2. inc is helpful, sees system isn't yet setup, and sets it up for us
3. Setup metric system
4. setup metrics in system
5. we hit the following code which gets initial values for labels

```clojure
(defn- initial-labelled-metric-values []
  (for [metric (keys (methods known-labels))
        labels (known-labels metric)]
    {:metric metric
     :labels labels
     :value  (initial-value metric labels)}))
```
6. We hit the following search code about which search we have

```clojure
(defmethod analytics/initial-value :metabase-search/engine-active
  [_ {:keys [engine]}]
  (if (search.engine/supported-engine? (keyword "search.engine" engine))
  1 0))
```

7. This takes us to semantic search:

```clojure
(defmethod search.engine/supported-engine? :search.engine/semantic [_]
  (try
    (supported?)
    (catch Exception e
      (log/warn e "Semantic search engine not supported")
      false)))
```

8. `supported?` here checks to see if you support a particular search
impelementation, which of course depends on _YOUR FEATURES_.
9. Checking features fails, so we should increment our prometheus
counter
10. the system is not yet initialized yet. Let's initialize it. (this is
also step 2)

So I have added a simple `inc-if-initialized!` function. It's not
important if the system is down. It's ok if these events are lost. The
system will be initialized in core anyways.

```
❯ http get :9191/metrics | grep metabase_token
 HELP metabase_token_check_attempt_total Total number of token checks. Includes a status label.
 TYPE metabase_token_check_attempt_total counter
metabase_token_check_attempt_total{status="failure",} 8.0
```

logs:

```
2026-01-23 22:58:26,668 INFO premium-features.token-check :: Checking with the MetaStore to see whether token '82bf...c3fe' is valid...
2026-01-23 22:58:28,706 INFO premium-features.token-check :: Error checking token: Connect timed out
2026-01-23 22:58:28,750 INFO core.core :: Setting up prometheus metrics
2026-01-23 22:58:28,751 INFO analytics.prometheus :: Starting prometheus metrics collector
2026-01-23 22:58:28,789 INFO premium-features.token-check :: Checking with the MetaStore to see whether token '82bf...c3fe' is valid...
2026-01-23 22:58:30,793 INFO premium-features.token-check :: Error checking token: Connect timed out
2026-01-23 22:58:30,798 INFO analytics.prometheus :: Starting prometheus metrics web-server on port 9191
...

2026-01-23 22:58:53,441 INFO premium-features.token-check :: Checking with the MetaStore to see whether token '82bf...c3fe' is valid... {mb-quartz-job-type=SyncAndAnalyzeDatabase}
...
2026-01-23 22:58:55,445 INFO premium-features.token-check :: Engaging circuit breaker in token check {mb-quartz-job-type=SyncAndAnalyzeDatabase}
2026-01-23 22:58:55,445 INFO premium-features.token-check :: Error checking token: Connect timed out {mb-quartz-job-type=SyncAndAnalyzeDatabase}
```

```
Exception how here??
	metabase.analytics.prometheus/setup! (prometheus.clj:584)
	metabase.analytics.prometheus/setup! (prometheus.clj:576)
	metabase.analytics.prometheus/inc! (prometheus.clj:668)
	metabase.analytics.prometheus/inc! (prometheus.clj:658)
	metabase.analytics.prometheus/inc! (prometheus.clj:665)
	metabase.analytics.prometheus/inc! (prometheus.clj:658)
	metabase.premium-features.token-check/error-catching-token-checker/reify--98262 (token_check.clj:431)
	metabase.premium-features.token-check/check-token (token_check.clj:488)
	metabase.premium-features.token-check/check-token (token_check.clj:484)
	metabase.premium-features.token-check/check-token (token_check.clj:486)
	metabase.premium-features.token-check/check-token (token_check.clj:484)
	metabase.premium-features.token-check/eval98325/*token-features*98348--98349 (token_check.clj:534)
	metabase.premium-features.token-check/eval98325/fn--98353 (token_check.clj:529)
	metabase.premium-features.token-check/has-feature? (token_check.clj:575)
	metabase.premium-features.token-check/has-feature? (token_check.clj:569)
	clojure.lang.Var.invoke (Var.java:386)
	metabase.premium-features.defenterprise/check-feature (defenterprise.clj:41)
	metabase.premium-features.defenterprise/check-feature (defenterprise.clj:35)
	metabase.premium-features.defenterprise/dynamic-ee-oss-fn/fn--71956 (defenterprise.clj:53)
	metabase.search.semantic.core/eval180600/fn--180601 (core.clj:58)
	clojure.lang.MultiFn.invoke (MultiFn.java:229)
	metabase.search.core/eval139302/fn--139304 (core.clj:77)
	clojure.lang.MultiFn.invoke (MultiFn.java:234)
	metabase.analytics.prometheus/initial-labelled-metric-values/iter--97802--97808/fn--97809/iter--97804--97810/fn--97811 (prometheus.clj:521)
	clojure.lang.LazySeq.force (LazySeq.java:50)
	clojure.lang.LazySeq.realize (LazySeq.java:89)
	clojure.lang.LazySeq.seq (LazySeq.java:106)
	clojure.lang.RT.seq (RT.java:555)
	clojure.core/seq--5488 (core.clj:139)
	clojure.core/concat/fn--5579 (core.clj:727)
	clojure.lang.LazySeq.force (LazySeq.java:50)
	clojure.lang.LazySeq.realize (LazySeq.java:89)
	clojure.lang.LazySeq.seq (LazySeq.java:106)
	clojure.lang.Cons.next (Cons.java:41)
	clojure.lang.RT.next (RT.java:733)
	clojure.core/next--5472 (core.clj:64)
	clojure.core/next--5472 (core.clj:64)
	metabase.analytics.prometheus/setup-metrics! (prometheus.clj:546)
	metabase.analytics.prometheus/setup-metrics! (prometheus.clj:533)
	metabase.analytics.prometheus/make-prometheus-system (prometheus.clj:60)
	metabase.analytics.prometheus/make-prometheus-system (prometheus.clj:55)
	metabase.analytics.prometheus/setup!/fn--97866 (prometheus.clj:591)
	metabase.analytics.prometheus/setup! (prometheus.clj:590)
	metabase.analytics.prometheus/setup! (prometheus.clj:576)
	metabase.analytics.prometheus/inc! (prometheus.clj:668)
	metabase.analytics.prometheus/inc! (prometheus.clj:658)
	metabase.analytics.prometheus/inc! (prometheus.clj:665)
	metabase.analytics.prometheus/inc! (prometheus.clj:658)
	metabase.premium-features.token-check/error-catching-token-checker/reify--98262 (token_check.clj:431)
	metabase.premium-features.token-check/check-token (token_check.clj:488)
```

* module config fixup
2026-01-26 12:26:48 -06:00
bryan
a45d9203f1 Fix flaky GeoJS-dependent tests by mocking external service (#68623) 2026-01-26 10:34:20 -07:00
William
163180e8d9 Delete from cache in batches of 1000 (#68622)
There's apparently an instance on cloud that is trying to remove 70k queries from the cache at once, and postgres
doesn't allow 70k params to a query.  Batching the deletes in groups of 1000 should fix that.
2026-01-26 11:31:02 -06:00
Timofey Kachalov
b81aa809ad feat(sdk,embed-js): Add content translations for Collection/MetabaseBrowser components (#68608) 2026-01-26 21:07:55 +04:00
Jakub Chodorowicz
78efb4247b Gdgt 1557 migrate eslint from deprecated rulesdir to custom plugin (#68570) 2026-01-26 17:27:36 +01:00
Copilot
e51a02cd56 Refactor .styled files to CSS modules with CSS variables (#66851)
* Refactor batch 1: Convert simple styled files to CSS modules (10 files)

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

* Refactor batch 2: Convert more simple styled files to CSS modules (8 files)

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

* Refactor batch 3: Convert files with color() functions to CSS modules (5 files)

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

* misc fixed

* lint fix

* Revert breakpoint changes

* prettier

* color fixes

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: iethree <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2026-01-26 08:14:38 -07:00
John Swanson
f8d4a239b3 populate here and below for transforms (#68614)
[UXW-2828: collection/:id/items API does not return transforms](https://linear.app/metabase/issue/UXW-2828/collectioniditems-api-does-not-return-transforms)
2026-01-26 05:30:47 -08:00
Sébastien
ae05f0bab7 Fixed missing bg color for dashboards (#68673)
fixed missing bg color for dashboards
2026-01-26 13:20:41 +01:00
Fraser
e2132ed193 use named exports in admin folder (#67771) 2026-01-26 23:12:47 +13:00
Fraser
50e9d524d6 Use named exports in query_builder code (#67780) 2026-01-26 23:12:34 +13:00
Fraser
fbd16c232b Use Metabase Bot GitHub App to create PR (#68664) 2026-01-26 23:12:17 +13:00
Romeo Van Snick
123f2dafd2 MBQL lib helpers for e2e tests (#68278)
* Rename file containing jsx to .jsx

* Add e2e helpers to build metadata provider

* Split up metadata helpers

* WIP

* Add more direct createTestQuestion helper

* Replace test

* Build cljs for tests

* Export type

* Only require entities in the state for getMetadata

* Just pass state to getMetadata

* Move EntitiesSchema to metabase/schema

* Wrap mbql e2e helpers in promise

* Split off getMetadataWithoutSettings

* Use getMetadataWithoutSettings to get metadata from state

* Build entities state manually

* Simplify wrapper

* Fix metadataProvider

* Add createTestJsQuery wrapper for cypress

* Use plain promises and fetch

* Allow passing GetMetadataOpts to createTest(Native)JsQuery directly

* Improve createTestQuestion types

* Make use of createTestJsQuery in test

* Reduce nest in createTestQuestion

* Use simplified createTestQuestion

* Split up mbql helpers

* Fix card metadata call

* Use correct card endpoint

* Pass missing options

* Convert another more complex test to createTestQuestion

* Fix types

* Use static ids for defaults to avoid import loop

* Fetch more tables by default

* Build cljs in embedding tests

* Build cljs in component tests

* Prepare backend env

* Add plugin so we can avoid building CLJS everywher

* Avoid building cljs where not needed

* Fix types

* Rename query helpers

* Split up helpers

* Compile cljs in stress tests
2026-01-26 19:54:16 +11:00
metabase-bot[bot]
16504fd3c8 [chore] Update E2E test timings with recent data (#68665)
Update E2E test timings with averaged data

Collected timing data from 7 days of test runs.
All specs with timing data were included (simple averages).

🤖 Generated automatically by update-e2e-timings workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-01-26 21:50:07 +13:00
Romeo Van Snick
997b8d898e Respect abbreviate date style and be defensive around missing settings (#68661)
* Respect date_abbreviate when formatting date

* Respect abbreviate setting in month format too

* Add unit tests for abbreviated formats

* Add unit test for empty formatting settings

* Add repro for metabase#68574

* Add formatting settings unit tests
2026-01-26 15:50:42 +11:00
Alexander Polyankin
ceb518ab4b Dependency diagnostics - update the url, reset page on filter change, fix visibility checks (#68650) 2026-01-25 21:53:08 -05:00
Fraser
0ed6c4deed Link Claude Bugfix PR to Linear issue (#67710) 2026-01-26 10:44:24 +13:00
Sloan Sparger
6c09fca355 Fix NativeQueryEditor's action buttons (#68638)
fix position of buttons for native query editor
2026-01-24 20:34:41 +00:00
Aleksandr Lesnenko
049526c61c Cleanup (#68648)
cleanup
2026-01-24 09:40:18 -06:00
William
a799178420 Python transforms have dependencies (#68572)
The existing transform dependencies code only worked with query-based transforms (mbql or native).  This extends that
code to work with python transforms as well.
2026-01-24 02:34:24 -06:00
Maksym Yakubych
f7b82d5c54 fix: word wrap overflows row when reordering in dashboard table card (#68566) 2026-01-24 00:37:00 -03:00
Anderson
a51d1179d3 Disallow editing transforms when remote sync is read-only (#68380)
* Read-only: Adjust transform header menu options / Remove edit definition button / Run tab updates

* Make Settings tab read-only

* fix remote sync setup in e2e test

* Do not allow creating a new transform

* Make Python library not editable

* Hide edit definition in mbql transform view page

* Fix e2e

* Group e2e tests to improve performance
2026-01-24 01:52:27 +00:00
metamben
cbed2e45a8 Follow up on QUE-2999: move filtering to the database (#68635) 2026-01-23 23:45:05 +00:00
Timothy S. Dean
418d7a0317 Tweak data loading behavior for a test after MySQL 9.6.0 release (#68634)
Closes DEV-1289

### Description

Within the last day or two, `metabase.query-processor-test.remapping-test/self-referencing-test` began failing on MySQL Latest. I hypothesize this has to do with the [latest release](https://dev.mysql.com/doc/relnotes/mysql/9.6/en/news-9-6-0.html) fixing an unknown bug around batch inserts in InnoDB and the deprecation of a recusive [sic] fk-related flag.

The error is thrown not in the test conditions, but in the test setup -- MySQL apparently now checks foreign key constraints row-per-row even on a batch insert.

This adds a flag that the test can set which changes the test data-loading behavior to disable the FK check before insertion and re-enable it after.
2026-01-23 15:56:20 -07:00
Gabriel Moreno
3bce633480 Library empty state: display content in the page body (#68628)
* feat: create library empty state

* refactor: use new designs

* refactor: fix library creation

* fix: paper shadow

* fix: e2e
2026-01-23 18:49:35 -04:00
Gabriel Moreno
48327532c5 More Data Studio UX improvements & QoL fixes (#68546)
* fix(UXW-2752): remove unwanted padding on data structure fields tab group

* fix(UXW-2707): remove double border on job transforms section

* feat(UXW-2718): add horizontal layout for schedule controls

* feat(UXW-2709): fix spacing in the segments empty state

* fix(UXW-2780): long text overflow in user input

* fix(UXW-2710): set proper placeholder text on empty python library first load

* feat(UXW-2767): rename 'New collection' to 'Transform folder'

* refactor: blow grid & use `Ellipsified` instead
2026-01-23 18:03:17 -04:00
Anderson
26f71cfeb5 Fix SQL editor scrolling on Transform pages (#68107)
* Fix SQL editor scrolling on Transform pages

* Fix e2e test for question editor

* Fix python transform scrolling

* Fix lint

* Fix view-only transform content height
2026-01-23 18:42:24 -03:00
Braden Shepherdson
3d4e44b776 [deps] After a sync, re-analyze all dependents of updated tables (#68621)
Closes QUE-2984.

Adds an event handler for when a DWH sync is completed, which checks all its tables and fields for
their latest update times, and re-analyzes all cards which depend on tables updated since the last analysis.
2026-01-23 21:01:41 +00:00
Brad Anderson
86f3e524ba Fix UXW-2759 - Snippet edits in data studio are not saved (#68565) 2026-01-23 15:29:42 -05:00
Nathan Voxland
056d61238e If a dashboard is back to just one tab, auto-assign all cards to that tab (#68201) 2026-01-23 14:22:12 -06:00
Maksym Yakubych
926610da14 fix: custom Logo isn't loaded properly on User Invite Email (#68476) 2026-01-23 11:44:43 -08:00
Alexander Polyankin
75251f933a Fix text wrapping in dependencies (#68615) 2026-01-23 19:28:48 +00:00
Nemanja Glumac
d959d54aec Remove cache cleanup CI action (#68521) 2026-01-23 20:25:23 +01:00
Edward Paget
0933b7378f feat: support remote-syncing measures (#68392)
* feat: support remote-syncing measures

Add remote-sync support for measures, following the same pattern as segments:

- Add :model/Measure spec to remote-sync-specs with hybrid identity,
  parent-table eligibility, and event tracking
- Update measure permissions to check remote-sync/table-editable? for
  can-write? and can-create? (replacing superuser-only derive)
- Add batched hydration for :can_write on measures
- Add measures to serdes/descendants for Table so they export with parent
- Add tests for measure import/export tracking in impl_test.clj

On the Frontend creates a new data-driven approach to setting up the
middleware listener for changes that cause us to refresh dirty-state.

* fixup! typecheck
2026-01-23 13:17:01 -06:00
Edward Paget
e3b200b319 fix: flakey ec keypair test (#68591)
* fix: flakey ec keypair test

* fixup! do crypto in a delay
2026-01-23 13:15:00 -06:00
Edward Paget
fb9c0e4499 fix: derive events remote-sync needs in oss code (#68590) 2026-01-23 13:14:51 -06:00
Nemanja Glumac
40522b6cba Remove unused lodash types (#68593) 2026-01-23 19:26:18 +01:00
metamben
b6edd15de2 Stop reporting errors on archived or inaccessible entities (#68613)
Closes QUE-2999
2026-01-23 12:52:32 -05:00
lbrdnk
16042f45c7 Use macaw options, add parsed-query wrapped (#68466)
* Hoist macaw impl from query analyzer

* Use macaw-opts in bigquery module

* Use macaw-options in sqlserver

* Use macaw-options in sql driver

* Remove require

* Comment

* Test

* Update test

* Update macaw version

* Best effort support for bigquery

* Make test driver specific

* Remove final-not-reserved

* Not allowed on clickhouse only

* Clickhouse exception test

* best effort opts on api

* Remove final-non-reserved

* Remove requires

* driver.u/parsed-query

* Use parsed-query

* parsed-query

* ch test

* throw

* Lint against incorrect Macaw usage (#68568)

* Remove now unused function

* Shutdown loud exceptions for now

* Shutdown ch test

* Update test

---------

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2026-01-23 18:37:06 +01:00
Riley Thompson
b28ab0ec1d Revert ClickHouse from 0.9.5 to 0.8.4 (#68502)
* revert to 0.8.4

* disable test
2026-01-23 17:18:22 +00:00
github-actions[bot]
add8906504 Fix: Keyboard navigation annoyance in command palette (#67317)
Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
2026-01-23 11:33:33 -05:00
dpsutton
3345365546 handle empty error message (#68581)
Fixes https://github.com/metabase/metabase/issues/68578

This issue is not about the stack overflow per-se but blowing up on a
string includes:

```javascript
{
  "app": "metabase",
  "time": "2026-01-22T12:08:53.660601485Z",
  "stream": "stderr",
  "app_version": "v1.57.10-X01",
  "message": "Exception in thread \"Thread-41\" java.lang.NullPointerException: Cannot invoke \"Object.toString()\" because \"s\" is null
at clojure.string$includes_QMARK_.invokeStatic(string.clj:377)
at clojure.string$includes_QMARK_.invoke(string.clj:373)
at metabase.app_db.cluster_lock$retryable_QMARK_.invokeStatic(cluster_lock.clj:27)
at metabase.app_db.cluster_lock$retryable_QMARK_.invoke(cluster_lock.clj:19)
at metabase.app_db.cluster_lock$do_with_cluster_lock.invokeStatic(cluster_lock.clj:87)
at metabase.app_db.cluster_lock$do_with_cluster_lock.invoke(cluster_lock.clj:65)
at metabase.app_db.cluster_lock$do_with_cluster_lock.invokeStatic(cluster_lock.clj:79)
at metabase.app_db.cluster_lock$do_with_cluster_lock.invoke(cluster_lock.clj:65)
at metabase.search.task.search_index$init_BANG_.invokeStatic(search_index.clj:36)
at metabase.search.task.search_index$init_BANG_.invoke(search_index.clj:32)
at clojure.lang.AFn.run(AFn.java:22)
at java.base/java.lang.Thread.run(Unknown Source)",
  "namespace": "hosting-eb9b3875e12d465a",
  "container": "metabase",
  "cluster": "metabase-1",
  "_p": "F"
}
```

The error message itself comes from a stackoverflow which perhaps does
not have a message? Either way, it's possible for this to be missing so
be a bit defensive
2026-01-23 10:04:56 -06:00
Sébastien
862dc50c64 Fix ChartTypeDropdown overflowing (#68455)
* Forcing overflow policy on ChartTypeDropdown

* tpyo

* refactoring to enable testing this with loki

* fixed story

* loki

* screenshot

* removed useless unit test
2026-01-23 16:08:37 +01:00
Nicola Mometto
0941091421 ensure common.py library is always available (#68603)
* fix: ensure common python library is always defined

* chore: e2e test

* fix: empty rollback

* fix: empty source

* fix: text
2026-01-23 15:01:18 +00:00
Alexander Polyankin
0bd69823a4 Show view_count for models and metrics in dependencies (#68588) 2026-01-23 17:42:57 +03:00
Alexander Polyankin
6a01533ca7 Use MBQL lib for matching field refs in ValueSourceModal in parameters (#68431) 2026-01-23 17:42:06 +03:00
Nemanja Glumac
7d18a1b5a6 Unset the premium token for E2E tests (#68533) 2026-01-23 13:54:21 +01:00
github-automation-metabase
0bf7e41984 Auto-update documentation for master (#68589)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-23 07:47:03 -05:00
Sébastien
95a25e4a3e fix proper bg color for embedded dashboards with custom theme (#68539) 2026-01-23 13:00:22 +01:00
Dan Stone
a2c4eef9de Revert the revert of column validation for incremental transforms (#68460)
Filter extract-columns endpoint to only return numeric and temporal columns
The extract-columns-from-query function is used to populate the incremental
filter dropdown for native SQL transforms. Previously it returned all columns
without filtering on type, leading to undefined behaviour when unsupported
column types were selected.

This change filters the results to only include columns with types supported
for incremental checkpointing:
- Temporal types (timestamp, timestamp with timezone)
- Numeric types (integer, float, decimal)

Text, boolean, and other unsupported types are now filtered out, matching
the behaviour of MBQL and Python transforms which already filter columns
client-side.

Updated documentation to clarify this endpoint is specifically for incremental
transform checkpoint column selection.

Also validates that transform POST/PUT conform to this rule and you are unable to update the transform to have
a filter column of an unsupported type.

Reverts the revert of https://github.com/metabase/metabase/pull/67686
2026-01-23 11:24:09 +00:00
Chris Truter
2f81937643 Fix data format for TODOs in style guides (#68598) 2026-01-23 13:13:30 +02:00
Sloan Sparger
48bf58b162 Cleanup from #68433 (#68481)
fix ai feedback that came after PR close :'/
2026-01-23 02:33:48 +00:00
Egor Grushin
761a7cf01e GDGT 1533 improve discoverability of python library in transforms UI (#68523) 2026-01-23 00:55:37 +00:00
Timothy S. Dean
8a76f71003 Remove find-column-for-name (#68382)
Remove find-column-for-name
2026-01-22 16:06:41 -07:00
Maksym Yakubych
fd90d13ae3 fix: custom brand color not consistently applied on Enterprise UI elements (#68484) 2026-01-22 22:56:00 +00:00
Maz Ameli
a62aab3f1b Rename Data Studio Library +New menu action labels (#68162)
* Rename Data Studio Library +New menu action labels

Update the menu item labels in the Data Studio Library's +New button:
- "Publish a table" → "Published table"
- "New snippet" → "Snippet"
- "New snippet folder" → "Snippet folder"

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

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

* prettier

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 22:39:54 +00:00
metamben
bafd49ee17 Add options to the /graph/dependents endpoint (#68573) 2026-01-22 21:58:19 +00:00
Edward Paget
1f0b461d6f feat: support remote sync transforms in FE (#68306)
* feat: support remote sync transforms in FE

1. Updates the DataStudioLayout to show transform dirty state

   We get the orange dot next to Transforms if transforms or transform
   collections are dirty.

2. Update the all changes view to include transforms

   Also includes their collection heirarchy if the transforms sync
   setting is enabled

3. Add the transforms sync setting

   To both the remote sync admin page and the Set up git sync modal in
   the data studio

* fixup! refresh transforms after sync

* fixup! data studio test feedback

* fixup! refactor failing test to troubleshoot debugging
2026-01-22 14:33:00 -06:00
metamben
1712274b85 Normalize transforms metadata (#68490) 2026-01-22 23:22:39 +03:00
Timofey Kachalov
ea203102e6 Don't show CORS settings in OSS/Starter editions (#68564) 2026-01-23 00:14:05 +04:00
Edward Paget
3c72591b17 feat: add Slack Connect SSO provider (#67955)
* feat: add Slack Connect SSO provider

Add enterprise Slack Connect SSO integration using the OIDC infrastructure:

- Slack Connect provider: OAuth2/OIDC flow for Slack workspace authentication
- Settings: configuration options for Slack client ID, secret, and auth modes
- User provisioning: automatic user creation from Slack identity
- API endpoints: SSO initiation and callback handling
- Analytics: usage tracking for Slack Connect feature

Slack Connect allows users to authenticate via their Slack workspace,
with support for both SSO-only and link-account authentication modes.

* fix: session reset after auth

* fixup! avoid email clash

* fixup! wrong value in sso settings

* fixup! cleanup tests

* fixup! fix test

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2026-01-22 10:57:12 -08:00
github-automation-metabase
9a19a5e4f0 [chore] Update llms.txt for master (#68561)
Update llms.txt and llms-full.txt (master)

Regenerated llms.txt to include all markdown files from the docs/ directory.
Also generated llms-full.txt files for the embedding section.

🤖 Generated automatically by llms-txt-generate workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-01-22 18:20:04 +00:00
Sloan Sparger
f387d4aca4 [Metabot] Add close button back to data studio sidebar (#68487)
allow metabot to be closed in data studio
2026-01-22 11:33:21 -06:00
github-automation-metabase
1bb6f6a74a Update translations 2026-01-22 (#68557)
* Update translation sources 2026-01-22

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2026-01-22 17:19:01 +00:00
Nicolò Pretto
2ad4292465 fix(embed-homepage): rename static embed to guest embed (#68338) 2026-01-22 16:37:02 +00:00
github-automation-metabase
37c3758748 Auto-update documentation for master (#68524)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-22 09:26:48 -05:00
Jeff Bruemmer
ae9cad5c58 docs - note on ee vs oss path (#68210) 2026-01-22 09:09:05 -05:00
John Swanson
bd14e14974 Reenable deactivated tenants when autoprovisioning (#67947)
Previously even when autoprovisioning was on, you could not log into a
deactivated tenant (either as a new user or an existing user with that
tenant).

This changes the behavior to be more consistent. Just as a deactivated
user can log in when provisioning is on (and their user gets
reactivated), a deactivated tenant's users can still log in, but doing
so reactivates the tenant.
2026-01-22 05:10:23 -08:00
Jakub Chodorowicz
85319217cd Gdgt 1273 add snowplow events to bulk metadata features (#68409)
* add data studio library filtering events

* add bulk properties and unpublish event

* add bulk sync events

* add search event

* add assertions on events in e2e tests

* add search debounce

* remove unncessery comment

* update event names

* track filter searches with data_studio_table_picker_search_performed

* refactor tracking function

* guard and log event only for ConcreteTableId

* log search when started fetching

* fix events not fired

* fix event not fired on first search
2026-01-22 12:30:26 +01:00
Nicola Mometto
240acb4782 add started-at filter to task runs page (#68279)
* WIP: add started-at filter

* fix: kondo

* fix tests

* GDGT-1520 add a started at filter

* GDGT-1520 add a comment

* GDGT-1520 fix typing issues

* GDGT-1520 addressing PR comments

* GDGT-1520 addressing PR comments

* GDGT-1520 fix a tests after changing a text

---------

Co-authored-by: Egor Grushin <egor@metabase.com>
2026-01-22 09:49:15 +00:00
Jakub Chodorowicz
e6bc40c223 add analytics skill (#68419) 2026-01-22 09:36:42 +01:00
bryan
76fcb4d573 Fix transforms module to trigger driver tests + promote pg (#68432) 2026-01-21 16:30:15 -07:00
Arkadi Yaroslavtsev
a92317dd27 Add Anchor Links to Documents (#67940)
* Add AnchorLinkButton component for document anchor links

- Add AnchorLinkButton component that copies URL to clipboard on click
- Shows 'Copied!' tooltip feedback using Mantine useClipboard hook
- Follows same pattern as CommentsButton for consistent styling
- Add unit tests for the component

* Add AnchorLinkMenu component for left-side anchor link hover

- Add AnchorLinkMenu floating menu for document blocks
- Uses createPortal for positioning (same pattern as CommentsMenu)
- Positioned on left side of blocks using floating-ui
- Shows/hides based on hover state via show prop
- Add unit tests for the component

* Add AnchorLinkMenu to document node views

- Add documentWithAnchor URL helper to generate shareable anchor URLs
- Update Heading, Paragraph, and Blockquote node views to render AnchorLinkMenu
- AnchorLinkMenu appears on the left side on hover
- CommentsMenu on the right side remains unchanged
- Each node view now uses two useFloating instances for positioning

* Add scroll-to-anchor for document URLs with hash

- Add E2E tests for anchor links functionality
- Implement scroll-to-anchor when navigating to document with #blockId hash
- Tests cover: hover shows anchor icon, copy to clipboard, scroll to block
- Regression test ensures CommentsMenu still works on right side

* Fix scroll-to-anchor dependency arrays for navigation edge cases

- Add documentId to scroll effect dependencies to re-run when navigating
  between documents with the same anchor hash
- Add location.hash to reset effect dependencies to properly reset flag
  when navigating via back button or changing anchors

* Fix accidental logo replacement and E2E blockquote test

- Restore original Metabase logo SVG (was replaced with red star debug graphic)
- Fix E2E test: use find('blockquote') instead of findByRole('blockquote')
  since native blockquote elements have no implicit ARIA role

* Fix scroll-to-anchor reliability and empty line behavior

- Implement retry mechanism for scroll-to-anchor to ensure target element exists
- Add highlight animation when scrolling to anchor
- Hide anchor link and comment menus on empty lines (Heading, Paragraph, Blockquote)

* Fix selector mismatch for scroll-to-anchor

- Add data-node-id attribute to NodeViewWrappers in Heading, Paragraph, and Blockquote
  extensions so they can be queried by DocumentPage
- Update DocumentPage to query using [data-node-id] selector instead of internal _id attribute
- Remove unused ID_ATTRIBUTE_NAME import in DocumentPage

* Fix highlight animation color variable

- Replace non-existent --mb-color-brand-alpha-25 with --mb-color-brand-light
- Ensure highlight animation is visible when scrolling to anchor

* added anchor links to lists and code blocks. some bugs fixes.

* make sure scroll-to-anchor observer is correctly initialized

- Refactor scroll-to-anchor logic to ensure smoother navigation
- Optimize highlight animation visibility during scrolling
- Adjust anchor link behavior on empty lines for better user experience

* small fixes

* clean up

* fixes and cleanup

* e2e test fixes

* fixed e2e test

* Leave anchor links only for header blocks

* Fix alignment

* Review fixes

* Fix unit tests

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2026-01-22 02:03:04 +03:00
bryan
087a317f70 Fix ci-report output formatting issues (#68505) 2026-01-21 15:50:57 -07:00
Denis Berezin
c63fd746d8 Uxw 2633 copy cells from table (#68429)
* UXW-2633 fix sorted table values copy-paste

* Add e2e test
2026-01-22 01:24:12 +03:00
dpsutton
f29a446aab fix materialized views test (#68509)
https://github.com/metabase/metabase/pull/68190 did:

> Treats a 0 value of n_live_tup as NULL, due to confusion reported when
> auto analyze thresholds have not been met on a table.

I think what's happening is this is trying to suss out "i don't know"
and not give misleading information. When there are no stats pg would
report there are 0 rows rather than saying i don't know. So we toss away
these unreliable 0 count estimations.

This test flakes 7% of the time. Our hypothesis is that stats are empty
7% of the time so this row count estimation now gets removed.

By default the schema is `:estimated_row_count (mt/malli=? [:maybe
:int])` which was being clobbered with
`{:estimated_row_count (mt/malli=? int?)}` So the fix is to just not
clobber
2026-01-21 16:07:45 -06:00
Edward Paget
d26bf4e454 feat: support transforms in remote sync (#68255)
* feat: support transforms in remote sync

1. Serialize Transforms as Collection Items

   Transforms were previously serialized as a top-level item, but this
   moves them to be serialized as a child of the collection they are
   member of. This also fixes an error in their serdes/dependencies
   implementation where it did not include the parent collection leading
   to deserialization issues.

2. Enforce Remote-Sync write rules

   Adds implementations of the model interface permissions methods for
   transforms that enforce the can-write? = false and can-create? =
   false rules when remote-sync is in read-only mode.

3. Add a setting to control whether transforms are synced

   Transforms are globally synced not synced via collections, so this
   adds a new boolean setting that controls whether they are synced on
   instances in read-write mode. Like all other content transforms are
   always synced from the remote source if the instance is in read-only
   mode.

4. Add a new spec-based configuration system for models

   Models we want to make remote-syncable have a complicated, but still
   data-driven system to allow you to specify their remote-sync behavior
   and have that automatically setup in a single place the
   `metabase-enterprise.remote-sync.spec` namespace.

* fixup! test with wrong folder

* fixup! not handling archived transform collections

* fixup! clean up aliases
2026-01-21 15:29:27 -06:00
Denis Berezin
7aa18ae448 Fix flaky test that uses readonly db that lacks permissions (#68417) 2026-01-22 00:15:27 +03:00
Timothy S. Dean
97da3d7c7b Migration follow-up fix to #68100 (#68498)
Move a migration from the v59 file to the v56 file, as we intend to backport it that far.
2026-01-21 14:15:12 -07:00
Aleksandr Lesnenko
10e8a68cf5 Data Analysts user group (#67770)
* basic analyst role

* analyst role

* Backend for data analyst role

* Fixup frontend to work with Backend

The dedicated analyst endpoints have been removed:
- `GET /api/user/analysts` -> Use `GET /api/user?is_data_analyst=true`
- `POST /api/user/analysts/:id` -> Use `PUT /api/user/:id` with `{ is_data_analyst: true }`
- `DELETE /api/user/analysts/:id` -> Use `PUT /api/user/:id` with `{ is_data_analyst: false }`

These hooks no longer exist:
- useListAnalystsQuery
- useAddAnalystMutation
- useRemoveAnalystMutation

New Patterns:

Listing analysts:
```
// Before
const { data } = useListAnalystsQuery();

// After
const { data } = useListUsersQuery({ is_data_analyst: true });
```

Adding an analyst:
```
// Before
await addAnalyst(userId).unwrap();

// After
await updateUser({ id: userId, is_data_analyst: true }).unwrap();
```

Removing an analyst:
```
// Before
await removeAnalyst(userId).unwrap();

// After
await updateUser({ id: userId, is_data_analyst: false }).unwrap();
```

Type Changes:

The field is_analyst has been renamed to is_data_analyst everywhere:

- User.is_data_analyst (was is_analyst)
- UpdateUserRequest.is_data_analyst (was is_analyst)
- ListUsersRequest.is_data_analyst (new field for filtering)

* kondo

* circular dep

* fix backend not compiling

* use the actual role

* analyst management, glossary access for admins

* various data studio access

* access to library

* drop custom analyst seats management ui

* automatic perms group

* fix tests

* specs

* permissions

* fix lints, add migration rollbacks

* data analysts can ALWAYS view table metadata

implemented for:

- search
- `table/can-read?`

* Also remove `can_access_data_model`

* Revert "Also remove `can_access_data_model`"

This reverts commit 03af432ccb.

* fix more tests

* more tests

* snapshots

* remove redundant checks

* everyone can see

* hide data analyst group for OSS

* Make data analysts a normal group on OSS

* Automatically provide data analysts with perms

Data analysts automatically get manage-table-metadata permissions on
every table/database.

* only disable setting some perms for data analysts

* kondo

* oops, one more kondo

* test fixes

* specs, fixes

* more specs, fixes

* cleanup

* more test fixes

* fix module config

* ci

* doh, fix test

* more test whack-a-mole

* move data analyst group to the top of perms views

* review

* ci

* Turn DA into a regular group when feature missing

instead of just on OSS.

The goal is:
- OSS: a previously existing Data Analysts group is a regular group with
configurable permissions. The real Data Analysts group is invisible and
has no members.
- EE without the token: same as above
- EE with the token: the real Data Analysts group is visible.

* oops, remove unnecessary require

* another one

* fix membership API

* fix a couple more tests

* macro gets a !

* fix `fetch-groups-test`

* ci

* ci

* ci

* ci

* fix collection perm in migration

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2026-01-21 12:43:35 -08:00
Dan Meyer
209a34b102 ci: Enable fail-fast for BigQuery and Snowflake driver tests (#68199)
Add :fail-fast? true to BigQuery and Snowflake test-args, matching the
existing Redshift configuration. This stops test execution on first
failure, saving CI time and resources.
2026-01-21 20:27:03 +00:00
William
a6df84c136 Bump toucan2 version to fix dashboards sometimes failing to load (#68494)
If the first table mentioned by a dashboard has no fields (presumably because the table and its field are all
inactive), /api/dashboard/<id>/query_metadata would fail due to a toucan2 bug.  This bumps toucan2 to fix the bug and
adds a test to verify that this case now works.
2026-01-21 20:18:30 +00:00
Riley Thompson
adb9a5cbf4 Bump dependency analysis version (#68488)
bump dependency analysis version
2026-01-21 19:08:45 +00:00
Phoomparin Mano
d491eb6d51 Apply unified theme object to main app and modular embedding (#68169)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2026-01-22 01:30:13 +07:00
Cam Saul
0f20f4d2f0 Deduplicate field refs by ignoring :source-field-name unless it matters (#68166)
* Tentative fix for #67808 -- deduplicate by ignoring :source-field-name if possible

* Make sure `:fields` remains a vector

* Add note

* cljfmt
2026-01-21 11:13:14 -06:00
Maksym Yakubych
9304e6cb6e fix: page hangs without a loader when saving a PDF (#68385) 2026-01-21 13:37:44 -03:00
Riley Thompson
21f043d697 Return upstream breaking entities for dependencies (#68282)
* initial work

* fix test

* fix another test

* source entity malli schema

* clean up and add test

* add tests

* clean up

* fix tests

* drop finding_details column

* fix analysis version

* Update enterprise/backend/src/metabase_enterprise/dependencies/models/analysis_finding.clj

Co-authored-by: Timothy S. Dean <timothy.dean@metabase.com>

* use transaction

* use node-errors refactor suggestion

* use maybe-resolve-join

* add schemas

* add comment

* kondo

* fix test

* initial changes

* remove validate/ prefix

* replace name/message with detail in dependents_errors

* fix test

* kondo

* typo

* Clean up

* add back card types

* remove unused

* add back card types comment

* small adjustment

* Fixes

* Add links

* reuse existing query

* UI

* use detail

* clean up tests

* UI

* UI

* UI

* improve tests

* initial /dependents broken filtering

* UI

* UI

* UI

* UI

* UI

* UI

* UI

* UI

* return full analysis finding error from api

* accept multiple dependent_types and dependent_card_types

* sort by dependents errors

* fix dependents broken parameter test

* fix

* fixes

* fix sorting

* Fix

* fixes

* fixes

* fixes

* fix

* tests

* fixes

* fix

* fixes

* fixes

* fixes

* fixes

* fixes

* add transforms

* fixes

* fix

* Add views

* fixes

* fixes

* basic e2e test

* fixes

* tests

* tests

* tests

* tests

* tests

* fixes

* fixes

* fix mysql distinct counting

* fixes

* fixes

* fix count query

* handle emtpy error detail

* fix i18n parser

* initial pr comments

* refactor dependency-items-args

* address comments

* small changes

* fix flake

---------

Co-authored-by: Timothy S. Dean <timothy.dean@metabase.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2026-01-21 11:26:10 -05:00
Sloan Sparger
d6bb46208f [Metabot] Send transforms_codegen profile on transforms pages again (#68433) 2026-01-21 09:09:12 -06:00
Egor Grushin
e2f7cc9d86 GDGT-1516 add datetime formatting to Task Run Monitoring features (#68427) 2026-01-21 15:09:03 +00:00
Oleksandr Solovyov
0880e7297d fix incremental transform tests (#68470) 2026-01-21 17:04:54 +02:00
metamben
4f23bc973f Prevent exception in cleanup masking the original exception (#68371) 2026-01-21 14:49:43 +00:00
Anderson
1afabc3d01 Allow editing segments and measures when remote sync is read-only and table is unpublished (#68326)
* Still allow editing segments when table is not published

* Allow editing on measures when table is not published
2026-01-21 11:45:19 -03:00
github-automation-metabase
cdf5111a0d Auto-update documentation for master (#68447)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-21 09:13:34 -05:00
Timofey Kachalov
70cf127afd Remove linking between static and simple embedding settings when toggling guest embeds in Admin UI (#68231) 2026-01-21 16:20:30 +04:00
Oleksandr Solovyov
ac421d0a6d transforms: pass full object instead of re-querying db internally (#68456) 2026-01-21 11:45:23 +00:00
Dan Stone
9f5b23ecdd Custom ref schema that reuses the cache (#68379)
Add ref schema caching

Introduces a custom :ref IntoSchema that permits
reuse of Schema objects for references when safe to do so.

Early tests indicate a dramatic reduction in heap retention, after
loading a single dashboard, I see a 10x resident heap reduction from ~300MB to ~30MB.

It should also act as knot tie / runtime combinatorics limiter, so we should not see 'leaky' growth at runtime.

More work could be done as there are still _some_ gaps here.
- Bare pointers (keywords) can still lead to exponential allocation
- We do not cache when :documentation is present on the ref
  (as it would specialise the Schema object delivered for that specific reference)
2026-01-21 10:30:04 +00:00
Sébastien
f8551c9800 Fixed no-literal-metabase-strings eslint rule for export * from './MetabaseThing'; (#68411)
fixed eslint custom rule
2026-01-21 10:42:55 +01:00
Kamil Mielnik
4befb6089f Fix - It's not possible to continue editing a bad transform (#68415) 2026-01-21 09:08:12 +00:00
Romeo Van Snick
c902d22458 Contain layout for notebook preview (#68448)
* Contain layout for notebook preview

* Add repro for metabase#67903
2026-01-21 19:14:00 +11:00
Romeo Van Snick
7451ffcd93 Set max height to native editor and some other refactors (#67896)
* Desrtucture all this.props

* Convert to function component

* Remove the wrapper

* Forward ref in topbar

* Limit resize height

* Pass availableHeight to native query editor

* Move var to constants

* Add more padding

* Rename viewHeight to availableHeight

* Handle unset availableHeight

* Add availableHeight to QueryEditor

* Calculate availble height above the fold

* Resize editor when available size shrinks

* Remove layer of nesting

* Rename calc to get

* Pass availableHeight to sql editor in modal

* Remove resizableBoxProps prop

* Do not resize when closing editor

* Use runQuery from props when availabe

* Sort props and remove unused props

* Clean up setIsNativeEditorOpen

* Remove dispatch from NativeQueryEditor completely

* Move state change out of useEffect

* Pull out resizable box into separate component

* Simplify availableHeight prop

* Move resizable logic into separate component

* Clean up code

* Handle availableHeight being 0 initially

* Make minHeight take preference

* Avoid setting height to Infinity

* Add repro for metabase#59075

* Fix e2e test

* Do not use default export

* Add type to NativeQueryEditor

* Remove unused databases loader

* Remove unused ExplicitSize wrapper

* Remove enity loader wrappers

* Flatten props

* Fix setDatabaseQuery type

* Fix types

* Add className to NativeQueryEditor

* Fix types

* Pull out handler

* Manually update metadata when updating snippet

* Preserve sidebar state if need be

* Fix e2e test

* Fix mock exports

* Fix e2e test

* Do not overwrite availableHeight

* Remove viewHeight prop

* Increase limit

* Fix broken test

* Remove unneeded useHeightAboveFold helper
2026-01-21 06:47:32 +00:00
dpsutton
410471a4d0 Revert transforms changes recently (#68446)
* Revert "Filter incremental transform column listing to supported types only (#67686)"

This reverts commit 735b98d6f8.

* trigger driver changes
2026-01-21 03:16:13 +00:00
Nemanja Glumac
a2b3490355 Run codespell on schedule and auto-fix typos (#68444) 2026-01-21 00:14:41 +00:00
bryan
3b8e1ecaa4 Add mage ci-report command for CI failure analysis (#68319) 2026-01-20 22:23:40 +00:00
Maksym Yakubych
0176c399f9 fix: "Connect to Slack" CTA remains visible after Slack is configured (#68289) 2026-01-20 22:04:41 +00:00
dpsutton
2287567b12 Fix Horror Show fingerprint OOMs (#68391)
* Fix Horror Show fingerprint OOMs

This may likely fix many OOMs that others are seeing. Anyone with large
schema will likely benefit from this.

```clojure
(let [database (toucan2.core/select-one :model/Database :id 2)]
  (metabase.sync.analyze.fingerprint/fingerprint-fields-for-db!
    database (fn [s t] (println "synced " s "for " (:name t)))))
```

This is how we fingerprint fields. DB 2 here is "Horror Show", a
database with 200 tables, each of which has 900 fields in it. This
database has zero rows in it, it it just a large schema.

Syncing this recently has caused huge cpu spikes and then OOM errors
until the instance is killed.

Profiling locally with

```
MB_JETTY_PORT=3091 java "$(socket-repl 6091)" -Xmx2g -jar metabase.jar
```
and visual vm hooked up, I run

```clojure
(let [database (toucan2.core/select-one :model/Database :id 2)]
  (metabase.sync.analyze.fingerprint/fingerprint-fields-for-db!
    database (fn [s t] (println "synced " s "for " (:name t)))))
```

And observe this behavior:
The ram usage approaches the 2gb limit and then bounces there. The CPU
begins to spike erratically and spend 10% of its time in GC.

Taking a heap dump we can see that we have 2.8 million ResultSetMetaData
objects occuping 183 Mb.

The ResultSetMetaData are closed over and kept in the metadata of the
snake hating maps stored in the cached metadata provider.

This brings into stark relief one simple way to fix this: don't use a
caching metadata provider. This PR just raising the body of the
fingerprint-tables-for-db function to not include
`(qp.store/with-metadata-provider (u/the-id database)` . There is no
benefit to caching here as this is an enumeration of the database. It is
by design not meant to reuse anything. If we didn't OOM we would end up
with 200 tables and 200*900 = 180,000 fields in the cache, each of which
was accessed only once.

That is what this PR fixes.

I also followed one other thread: why are we holding so many
ResultSetMetaData objects in memory. This seems to come about from a
change in https://github.com/metabase/metabase/pull/62330 specifically
this line:
https://github.com/metabase/metabase/blob/master/src/metabase/lib_be/metadata/jvm.clj#L63

```clojure
(mu/defn instance->metadata
  "Convert a (presumably) Toucan 2 instance of an application database model with `snake_case` keys to a MLv2 style
  metadata instance with `:lib/type` and `kebab-case` keys."
  [instance      :- :map
   metadata-type :- :keyword]
  (let [normalize (if-let [schema (get metadata-type->schema metadata-type)]
                    (fn [instance]
                      (lib.normalize/normalize schema instance))
                    identity)]
    (-> instance
        (perf/update-keys memoized-kebab-key)
        (assoc :lib/type metadata-type)
        normalize
        u.snake-hating-map/snake-hating-map
        ;; the line below here captures the result coming back from
        ;; toucan and has a closure over
        ;; toucan2.jdbc.read/make-column-thunk which has a closure over
        ;; (.getMetaData rset)
        (vary-meta assoc :metabase/toucan-instance instance))))
```

As it stands without any changes, the instance gets quite unstable and
falls over. If you comment out the `var-meta` form above, the graph
returns to a very normal sawtooth graph of memory usage and
reclaimation. But central to this is that it does not need to retain any
of this memory at all. But without this metadata containing the instance
and db classes, we only cache the table and field data and the
fingerprinting can finish. When we cache this stuff and also
inadvertently keep these db classes, we quite quickly run out of
headroom and the instance becomes unstable and falls over.

* fix kondo lint (removes a legacy usage as well :) 💰
2026-01-20 14:58:56 -06:00
Sloan Sparger
d9b8b9a2c0 [Metabot] Bug fix - animation color for nlq loading state (#68149)
fix animation color for nlq loading state
2026-01-20 14:57:32 -06:00
dpsutton
17f473a9f1 bit more cleanup (#68300)
* bit more cleanup

kept having a few flakes, couldn't consistently get it to pass 45 times
in a row locally. So just simplify it. Don't worry about "in process"
stats. Trying to get the webserver paused in the middle of a request was
occasionally deadlocking, often flaking.

So just calculate the simple ones and it's fine

```clojure
statistics-handler-test=> (clojure.test/run-test server-stats-test)

Testing metabase.server.statistics-handler-test

Ran 1 tests containing 13 assertions.
0 failures, 0 errors.
{:test 1, :pass 13, :fail 0, :error 0, :type :summary}
statistics-handler-test=> (dotimes [_ 100](server-stats-test))
nil
```

Also got rid of the macro that really only existed to collect the forms
into an anonymous function. Everything in-lined and now don't need a
kondo hook, etc

* remove unused alias

* kondo the refers

* reintroduce in-flight metrics

these:
```
(is (prometheus-test/approx= 1 (value! :jetty/requests-active)))
(is (prometheus-test/approx= 1 (value! :jetty/dispatched-active)))
```

Require a mechanism that can pause a request while active, verify that
the requests-active and dispatched active are incremented, and then
carry on. This is all kinda trivial except getting it wrong can
deadlock. Here are 500 successful runs of this test:

```
statistics-handler-test=> (dotimes [_ 100] (server-stats-test))
nil
statistics-handler-test=> (dotimes [_ 100] (server-stats-test))
nil
statistics-handler-test=> (dotimes [_ 100] (server-stats-test))
nil
statistics-handler-test=> (dotimes [_ 100] (server-stats-test))
nil
statistics-handler-test=> (dotimes [_ 100] (server-stats-test))
nil
```
2026-01-20 14:53:30 -06:00
Noah Moss
110cb5bca7 Streaming API response schema for documentation (#68386)
* Streaming API response schema POC

* Narrow a couple schemas

* fix comment

* bump ci

* oops, fix schema placement

* address feedback
2026-01-20 19:30:28 +00:00
Timofey Kachalov
1149c3e30c feat(embed-js): Add a counter-like query parameter for EmbedJS iframe src to allow multiple iframes loading in parallel (#68420) 2026-01-20 22:49:53 +04:00
Dan Stone
735b98d6f8 Filter incremental transform column listing to supported types only (#67686)
Filter extract-columns endpoint to only return numeric and temporal columns

The extract-columns-from-query function is used to populate the incremental
filter dropdown for native SQL transforms. Previously it returned all columns
without filtering on type, leading to undefined behaviour when unsupported
column types were selected.

This change filters the results to only include columns with types supported
for incremental checkpointing:
- Temporal types (timestamp, timestamp with timezone)
- Numeric types (integer, float, decimal)

Text, boolean, and other unsupported types are now filtered out, matching
the behaviour of MBQL and Python transforms which already filter columns
client-side.

Updated documentation to clarify this endpoint is specifically for incremental
transform checkpoint column selection.

Also validates that transform POST/PUT conform to this rule and you are unable to update the transform to have
a filter column of an unsupported type.
2026-01-20 18:00:36 +00:00
Jakub Chodorowicz
359158e594 Gdgt 1312 adjust range selection to work also with schemas and dbs (#68280) 2026-01-20 18:17:50 +01:00
Edward Paget
9a5e8227d0 fix: failing transforms revision test (#68422) 2026-01-20 16:40:22 +00:00
github-actions[bot]
287665a6fa Fix: Actions attached to models inside of Library(synced collection) break remote sync (#68252)
Fixes #68215

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

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Ed Paget <ed@metabse.coma>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
2026-01-20 10:23:56 -06:00
Jeff Bruemmer
82f16a8528 docs - guest embed locked parameters (#68293) 2026-01-20 10:50:26 -05:00
github-automation-metabase
45b4b682cc Auto-update documentation for master (#68402)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-20 09:58:17 -05:00
Denis Berezin
7a96e1f142 UXW-2497 fix remote-sync flaky test (#68368) 2026-01-20 17:16:05 +03:00
Gabriel Moreno
a48f246c50 Add transform owners and show them in Data Studio (#67840)
* feat: add owner fields

* feat: hydrate owner property on transforms

* feat: extend `start-run` function to accept `user_id` and use it on scheduled transform runs

* feat: implement 'Ownership' section in transform settings page

* test: implement unit specs

* test: add e2e spec

* feat: show owner avatar in transforms list

* Minor clojure improvements

* test: simplify & extend e2e spec

* refactor: simplify avatar usage & change unassigned copy to "No owner"

* refactor: de-duplicate success & error messages

* test: add missing serialization test transform attributes

* test: fix e2e spec by scrolling into view first

* refactor: attribute manual runs to current user rather than owner

* refactor: cleanup

* tests: add missing user id parameter for jobs unit spec

---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2026-01-20 10:07:33 -04:00
Sébastien
dd00b33545 Fix tracking event never set to default in embed (#68407)
* fix tracking event never set to default in embed

* added e2e
2026-01-20 14:35:08 +01:00
Jakub Chodorowicz
51eab9a902 add openapi check to ci pipeline (#67854)
openapi check with self healing, all hidden behind ci label
2026-01-20 14:31:43 +01:00
Dan Stone
4b47763109 Restore future in mock client calls so that interrupts are isolated from caller (#68408)
Ensure client-full-response uses future so that interrupts are isolated from caller

An intentional server side .interrupt might leak and cause subsequent
code to fail.

Prior to https://github.com/metabase/metabase/pull/65872 the
client-full-response used a with-timeout, which incidentally put the
http handler in a future (isolating the interrupt).

This commit restores the previous behaviour, in a more intentional way.
2026-01-20 12:59:56 +00:00
github-automation-metabase
d4960babe5 [chore] Update llms.txt for master (#68410)
Update llms.txt and llms-full.txt (master)

Regenerated llms.txt to include all markdown files from the docs/ directory.
Also generated llms-full.txt files for the embedding section.

🤖 Generated automatically by llms-txt-generate workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-01-20 12:57:37 +00:00
Gabriel Moreno
3856fd989e Data Studio UX improvements & QoL fixes (#68320)
* fix(uxw-2711): dependency graph corner radius

* fix(uxw-2706): give snippets a default name

* feat(uxw-2750): use actual link elements for transform list page

* feat(uxw-2750): use actual links for library section layout items

* fix(uxw-2751): prevent transform cancel handler from wiping changes
2026-01-20 08:37:54 -04:00
Nicola Mometto
2ac5ed4fb0 add task-runs to usage analytics (#68288)
* feat: ad v_task_runs

* feat: update v_tasks view

* update permissions/test

* add views

* remove fieldusersettings from export, channels

* add task runs model
2026-01-20 10:39:56 +00:00
Sébastien
1b80d7dc16 Enable editing/creating native questions in the SDK (#68138)
* .

* .

* .

* edit is actually working

* add now works too

* fix

* added e2e test

* doc

* .

* added a wait to see if that helps

* better waits

* .

* addressed comments

* Apply suggestions from code review

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

* test

* test

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2026-01-20 08:37:11 +01:00
github-automation-metabase
34266fc636 Update translations 2026-01-20 (#68403)
* Update translation sources 2026-01-20

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2026-01-20 06:23:53 +00:00
Alexander Polyankin
e3ced91a43 Make filtering in the deps graph consistent with the task lists (#68373) 2026-01-20 03:36:05 +00:00
Anderson
a37b3fb0ec Implement read-only mode on Snippet detail page (#68268)
* Implement read-only on Snippet detail page

* Add more tests

* Fix mock

* translate string
2026-01-20 00:48:51 +00:00
Romeo Van Snick
1284c201b5 MBQL lib test helpers (#68168)
* Add test helper definition and implement joins

* Add support for fields clause

* Be explicit with types

* Pull out findJoinStrategy helper

* Pull out appenTestQueryStage

* Simplify helpers

* Move helper

* Allow disamiguating column name

* Fix rhs columns

* pull out createTestJoinClause

* Add filters

* Add aggregations

* Add breakouts

* Add expressions

* Add ordering

* Add limiting rows

* Make source optional

* Make provider the first argument

* Expand example in tests

* Automatically pick the base column if no table was specified

* Remove unused sourceMetadata argument where not needed

* Fix join metadata

* Improve types

* Add createNativeQuery and createNativeJsQuery helpers

* Use column groups to disambiguate instead of table name

* Test the results

* Deprecate createQuery

* Replace createQueryWithClauses with createTestQuery

* Add SAMPLE_PROVIDER

* Add helpers to build metadata provider

* Use displayName for groupName

* Remove raw mbql in test and replace it with Lib inspections
2026-01-20 11:04:16 +11:00
Nemanja Glumac
feb0c5b34a Add pre-commit hook to auto-fix unused requires flagged by clj-kondo (#68274)
This introduces a pre-commit hook that automatically removes unused require
statements detected by clj-kondo, preventing CI failures.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:10:01 +01:00
bryan
58e4025456 Fix flaky dataset-already-loaded?-test for Redshift (#68292) 2026-01-19 13:44:59 -07:00
bryan
9ceae0061a Fix mage doctor on Linux: use which instead of command -v (#68381)
`command` is a shell builtin that doesn't exist as a standalone binary on
Linux (only macOS has /usr/bin/command as a wrapper). When babashka tries
to execute `command -v git` directly via process/shell, it fails on Linux
because there's no `command` binary to run.

Using `which` instead works on both platforms since it's an actual binary.
2026-01-19 20:04:10 +01:00
metamben
2cb8a32def Add back typo fix removed by merge (#68375) 2026-01-19 20:00:32 +01:00
Edward Paget
59adba6f98 feat: generic oidc provider using auth-identity (#65872)
* feat: add generic OIDC provider infrastructure

Add OSS infrastructure for OIDC-based authentication providers:

- OIDC discovery: automatic endpoint discovery from issuer URL
- Token handling: ID token validation, parsing, and claim extraction
- State management: encrypted state cookies for CSRF protection
- Schema validation: Malli schemas for OIDC configuration and tokens
- Common utilities: shared HTTP and request utilities

This provides a foundation for enterprise SSO integrations that use
OIDC/OAuth2 flows (e.g., Slack Connect, generic OIDC providers).

* fixup! dead code clean up

There was a bunch of speculative code we didn't end up using when this
change from a 'configurable OIDC' to a just support slack course

* fixup! ttls for caches for jwks/discovery

fixup! check for open redirect when creating oidc state

* fixup! use valid-hosts? to check before making jwks/discovery requests

* fixup! don't use hardcoded jwt algo

* fixup! use java-time

* fixup! kondo

* fixup! use system.core not system.settings
2026-01-19 12:04:55 -06:00
Denis Berezin
1da7a523b8 Use proper link in public powered by metabase footer link (#68301)
* Use proper link in public powered by metabase footer link

* Fix tests

* Fix tests
2026-01-19 20:47:41 +03:00
Alexander Polyankin
6165e70718 Fix :view_count not returned for relevant entities in the dependencies graph (#68370) 2026-01-19 17:43:54 +00:00
metamben
1a2f012afe Show sensitive columns in the sandboxing UI (#66757)
* Show sensitive columns in the sandboxing UI

Closes #53378
2026-01-19 16:33:20 +00:00
Brad Anderson
c8b6f74578 UXW-2341 Add Caching tab for metrics in Data Studio (#66513) 2026-01-19 10:51:51 -05:00
metamben
905c5dde99 Report datetime insights even if columns is PK or FK (#67536)
Closes #35281
2026-01-19 15:10:27 +00:00
Alex Yarosh
913e0c9ee8 docs: IAM for RDS (#68349)
* Update IAM authentication details for RDS instances

Clarified the types of RDS instances that support IAM authentication.

* Update docs/databases/connections/aws-rds.md

* Update docs/databases/connections/aws-rds.md
2026-01-19 09:20:26 -05:00
github-automation-metabase
9eb6d7c74d Auto-update documentation for master (#68332)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-19 09:08:06 -05:00
Phoomparin Mano
a27a3d286b Fix flaky assertion for "sdk iframe embedding fires ready event after iframe is loaded" (#68336) 2026-01-19 19:45:38 +07:00
Nicola Mometto
03d26b2a19 fix spelling typo (#68342) 2026-01-19 11:46:08 +00:00
Dan Stone
4fa44b5fc7 Use Soft/Weak references for malli cache entries (#68076) 2026-01-19 10:51:25 +00:00
Nicola Mometto
2e3746de55 Task Run Monitoring (#68116)
* add task_run table and followup migrations

* fix: missing remarks

* feat: task-run model

* wip: logs and run-id in task_history model

* wip: endpoints

* chore: dead code

* simplify

* simplify

* Add log capture factory

* Move log capture to history

* feat: prevent running if nested

* Capture logs during task history

* Tests + fixes for log capture

* Avoid log aliases and kondo the discouraged c.t.logging ns

* style

* fix

* feat: wrap with with-task-run

* Add `:ts` timestamps to captured log entries

* Skip DEBUG/TRACE

* Add basic log truncation

* Test log truncation

* Fix sync tests

* Add :model/TaskRun resolution.clj entry

* GDGT-1497 add TaskRun UI part

* feat: hydrate-task-counts

* fix: nil protect limit/offset

* style

* fix: move with-task-run to core ns

* fix: ignore TaskRun from copy test

* fix: no need for name

* fix: typo

* wip

* fix: build-run-where-clause

* exclude task run from entity_id/deser

* feat: add with-run-id helpers

* chore: make complete-task-run idempotent

* feat: export more utils

* fix: support async notification/alerts

* kondo

* fix: test

* support legacy cards

* make sure we complete-task-run in send- sync

* add index to fk

* fix: current-run-id

* fix: move around

* add tests

* fix: needs keyword

* hook up to test endpoints too

* preserver ordering

* handle non hydrated

* add integration tests

* depend on no-op nested behavior, add comment

* fix

* fix: coerce

* GDGT-1497 add TaskRun UI part

* conform to logs format

* chore: add process_uuid

* GDGT-1497 add TaskRun UI part

* GDGT-1497 add TaskRun UI part

* feat: track uuid/updated_at in task run for orphan detection

* add unknown status

* feat: store updated_at/process on insert

* chore: use abandoned

* feat: orphan task

* make not nullable

* chore: add abandoned to FE

* fix

* feat: also abandon if exceeds max duration

* add integration test

* appease prettier

* GDGT-1497 add TaskRun UI part

* GDGT-1497 addressing PR comments

* GDGT-1497 fix url

* GDGT-1497 fix db name and db engine rendering

* GDGT-1497 extract TaskStatusBadge and TaskRunStatusBadge

* GDGT-1497 clean up

* fix typo

* feat: onDelete set null instead of cascade

* GDGT-1497 fix e2e tetst

* Update src/metabase/task_history/models/task_history.clj

Co-authored-by: Dan Stone <wotbrew@gmail.com>

* GDGT-1497 add new e2e tests

* GDGT-1497 fix eslint rules disabling in new e2e tests

* GDGT-1497 addressing PR comments

* fix out of order timestamps

* fix: missed two

* GDGT-1497 addressing PR comments

* GDGT-1497 fix ts issues

* GDGT-1497 fix flakey test

---------

Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Egor Grushin <egor@metabase.com>
2026-01-19 09:58:36 +00:00
Romeo Van Snick
46b0aa85a2 Fix broken loki test (#68334)
Update Loki Snapshots

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-01-19 09:48:08 +00:00
Gabriel Moreno
bb66df77e1 Add library stats to anonymous daily stats ping (#68071)
* feat: add library stats to anonymous daily stats ping

* test: add unit spec for library stats

* test: use the `mt/with-temp` macro
2026-01-16 18:31:25 -04:00
Eric Normand
293d47d3e8 Transforms job runs keep trying other transforms if one fails. (#68141)
Previously, when running a transform job (e.g., daily), it would fail if a single transform in the run failed. This PR makes it so that the job continues to run transforms that don't depend on any failed transform. As previously, if any transform in the run fails, the job is marked as failed.
2026-01-16 22:30:31 +00:00
Gabriel Moreno
3f1ff1ba60 Library empty state: expand Data, Metrics and SQL snippets (#68241)
* feat: add empty states for library items

* test: add e2e specs

* refactor: cleanup library section layout

* test: compact e2e specs into 2 major flows
2026-01-16 18:26:46 -04:00
Timothy S. Dean
e694056f0f Fix coercion for UNIX timestamp fields via implicit joins (#68164)
Addresses #67704.

When a UNIX timestamp is accessed through an implicit join, the coercion to DateTime wasn't being applied. The `allow-casting?` check requires `pos-int?` on `::source-table` to apply coercion. For implicit joins, `::source-table` is set to a string, so it was being skipped.

Fix: in `add-alias-info/add-source-to-field-ref`, wet the flag `:qp/allow-coercion-for-columns-without-integer-qp.add.source-table`. I cribbed this approach from the SparkSQL driver, when it has to rewrite a numeric ID with a string.
2026-01-16 15:26:26 -07:00
Gabriel Moreno
de171c2092 Make Python and SQL editing in Data Studio consistent (#68212)
* feat: configure initial read-only mode for python transforms

* refactor: hide UI elements in readonly mode

* refactor: move database selector to the topbar

* style: add in/out animations for bottom panel

* refactor: move common library controls to the topbar

* test: add unit specs for python transform editor sections

* test: add e2e spec

* fix: show correct run query button state after edits

* refactor: general cleanup & test trimming

* refactor: remove source controls

* refactor: trim down test mocks

* fix: pass missing `editable` flag to transform editor

* fix: types

* fix: e2e data source selector

* refactor: use `isEditMode` instead of `readOnly`
2026-01-16 18:12:20 -04:00
github-automation-metabase
fd2bf97c1f Auto-update documentation for master (#68219)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-16 16:44:55 -05:00
Denis Berezin
0bba5e8742 UXW-46 Safari smart scalar truncation (#68248)
* UXW-46 refactor solution

* Update Loki Snapshots

* Fix typecheck

* Fix e2e

* Refactor to simpler solution

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-01-17 00:43:41 +03:00
Nick Fitzpatrick
3302e9cafd Gdgt 912 update scalar second tab and configuration to support color (#67877)
* adding segment editor to scalar

* temp

* adding tooltip

* pretend i'm a clojure dev, disable tooltip when there are no segments

* adding unit test and story

* loki tests

* silly me

* I am a clojure god

* adjustments

* adding docstring, adjusting loki test

* combining scalar loki tests

* CardSegment -> ScalarSegment

* BE update, filter unvalid segments
2026-01-16 16:37:41 -04:00
Denis Berezin
18c485d06c Fix missing labels for bar chart (#68299)
* Fix missing label for cartesian

* Add e2e tests

* Add comment

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-01-16 22:54:53 +03:00
Aleksandr Lesnenko
68d40f2770 Ask for loki stress testing (#68302)
update docs, pr template
2026-01-16 14:51:09 -05:00
Nemanja Glumac
b92393b9f0 Enable codespell GitHub action for src folder (#68213) 2026-01-16 13:37:22 -06:00
Egor Grushin
83ca220730 GDGT-1419 warn when incremental edits break checkpoint auto selection (#67933) 2026-01-16 17:49:14 +00:00
Thomas Schmidt
ba7c5d1fc7 Require free text for ui-bug and other feedback types (#68234)
* Require free text for ui-bug and other feedback types

Add Yup validation to MetabotFeedbackModal that requires free text feedback when issue type is ui-bug or other. Issue types requiring free text are maintained in a constant array for easy extension.

* Address PR feedback: improve type safety and UX in feedback modal

- Replace 'as any' with proper TypeScript type assertion
- Fix type inconsistency between schema and initial value for issue_type
- Add dynamic label showing '(required)' when ui-bug or other is selected

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

* pr feedback

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2026-01-16 11:34:12 -06:00
Nemanja Glumac
2cf11310a8 Fix untranslated string in an alert modal (#68287)
Co-authored-by: Joseph Adams <danielowenderefaka@gmail.com>
2026-01-16 17:53:24 +01:00
Riley Thompson
06d4da18c3 Surface analysis errors with upstream dependencies (#68092)
* initial work

* fix test

* fix another test

* source entity malli schema

* clean up and add test

* add tests

* clean up

* fix tests

* drop finding_details column

* fix analysis version

* Update enterprise/backend/src/metabase_enterprise/dependencies/models/analysis_finding.clj

Co-authored-by: Timothy S. Dean <timothy.dean@metabase.com>

* use transaction

* use node-errors refactor suggestion

* use maybe-resolve-join

* add schemas

* add comment

---------

Co-authored-by: Timothy S. Dean <timothy.dean@metabase.com>
2026-01-16 15:08:44 +00:00
John Swanson
44e118b5e3 Manage table metadata allows syncing table (#67868)
This is the permission we're correctly checking with the below
`api/check-403` but by using `warehouses/get-database` (which, btw, has
the MOST confusing possible arguments I've ever seen) we were throwing a
403 if we didn't have read access to the whole database (which
checks *create-queries* perms on the entire database).

We still need to exclude mirror databases. In the medium term there
might be a better way to do this - maybe we could somehow have two
different models, so `(t2/select :model/Database)` would always exclude
mirror databases, while `(t2/select
:model/DatabaseIncludingMirrorDatabase)` would return them? I dunno.
2026-01-16 06:13:15 -08:00
Gabriel Moreno
3a490774cc Fix the Glossary deduplication UX (#68243)
* feat: prevent duplicate glossary terms from being added

* test: add unit spec
2026-01-16 09:55:25 -04:00
Timofey Kachalov
d5ad9d6142 fix(embed-js): adjust experience reset logic to avoid unexpected experience resets (#68273) 2026-01-16 17:09:53 +04:00
William
eacff63768 Disable native sql validation (#68148)
Native sql validation is a bit too unreliable for general deployment at the moment, so we are disabling it for check_* endpoints and the broken entities list unless/until we can make it more reliable.

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2026-01-16 11:28:04 +00:00
Timofey Kachalov
6cea29bace Fix wrong BG value in TableActionInputSearchableSelect (#68275) 2026-01-16 15:21:35 +04:00
Dan Stone
e3d6d76bf8 Hide 0 estimate row counts to avoid confusion (#68190)
Treats 0 n_live_tup as NULL, due to confusion reported when auto analyze
thresholds have not been met on a table.

To justify:
- You have a non-zero estimate (No change)
- A zero estimate but actually have rows (We now hide the estimate)
- A zero estimate and actually have zero rows (We now hide the estimate,
unfortunately)

This behaviour is considered on balance preferable to the behaviour now
where users will likely be confused, even thought we explicitly label
the field 'estimated'.

Other options considered that we might explore in the future:
- Forcing ANALYZE, e.g. on sync
- Bounded/LIMIT count
- Some policy based on last analyze timestamps
- Better tooltips or explaination on frontend

We should revisit in the future once we have a better idea for how
estimates should work across drivers (as its only postgres for now).
2026-01-16 09:03:21 +00:00
Timothy S. Dean
37243f5469 Delete invalid source-card-ids on native SQL questions (#68100)
When a user creates a question based on a model, `source_card_id` was set to the model's ID. If that question was later converted to native SQL, `source_card_id` wouldn't get cleared. This means that deleting the model would cause the question to be deleted even though they no longer have any relationship to one another.

The code fix won't help anyone whose data is already incorrect, so this adds a migration to correct the inconsistent data. I added an assertion to the t2 hook to catch this at dev time in the future. And ultimately, the delete cascade seems overkill, so there's a migration to replace that with SET NULL instead.
2026-01-15 16:19:13 -07:00
bryan
ad60b57c4a Fake sync for Redshift tests (branch-conditional, refactored) (#67603) 2026-01-15 15:53:45 -07:00
Anderson
fa924880ad Implement read-only on Library & Data Structure pages (#68209)
* Implement read-only on Library page

* Add some gorgeous unit tests

* Make segment and measures read-only / Add tests

* Apply read-only logic to measure list and segment list pages
2026-01-15 19:50:51 -03:00
Romeo Van Snick
bace1d68c5 Flake fix: allow clicking gridcells while animating (#68218)
Allow clicking while animating
2026-01-16 09:44:15 +11:00
Maksym Yakubych
0523cf2397 fix: dropdown menu in create/edit record on database table (#67807) 2026-01-15 17:51:15 -04:00
Alexander Polyankin
c75465cd07 FE fixes for upstream dependencies (#68254) 2026-01-15 16:44:08 -05:00
kevinkelleher12
a76e880fdd Fix filters not closing properly on native SQL questions (#68216) 2026-01-15 16:06:26 -05:00
Alexander Polyankin
032d1e9ea5 Add server-side sorting to broken & unreferenced items pages (#68221) 2026-01-15 19:59:14 +00:00
Oleksandr Yakushev
b2840f32f9 Replace amalloy/ring-buffer dependency with already included CircularFifoQueue (#66007) 2026-01-15 20:34:29 +02:00
Timofey Kachalov
499eacf3d1 Fix EE Starter Edition Embedding Admin page visuals (#68226) 2026-01-15 21:27:33 +04:00
Denis Berezin
23d9096d0b UXW-136 Fix issue with bar viz on filtered column (#67573)
* UXW-136 Fix issue with bar viz on filtered column

* Review fixes

* Refactor solution

* Review fix
2026-01-15 17:17:07 +00:00
Dan Stone
594cd0cc89 Remove ^:parallel meta for tests that search + hold locks (#68240)
A recent change to search permissions queries in [#67055](https://github.com/metabase/metabase/pull/67055) will cause H2 to use SYS locks during search operations. This is because H2 uses temporary tables to implement CTE's, and their creation/dropping requires global locks.

This commit removes some ^:parallel meta in an attempt to avoid test
flakes due to lock timeout.

This change is a bit speculative:

- It is not 100% confirmed that parallel tests are the only problem (e.g. some background task might also hold a lock)
- The tests changed are based on a cursory scan for search tests that
  hold transactions (mt/with-temp). There may be other tests.

The impact of the CTE lock behaviour in production searches is likely
minimal because:

a. Search queries will typically run in auto commit sessions and so lock
lifetime will be short
b. concurrent multi-user deployments are most likely not on H2.

Should keep an eye on both tests and any reports in production of lock
timeout errors / slow searches when using H2.
2026-01-15 17:05:14 +00:00
da
f3c0be5fc1 Log error instead of warning if a subscription is not sent through the channel rather than a warning (#68214)
* Why is it a warning when it should be an error?

* Fix error logging format in notification worker

* Improve error logging in notification send process

Fix silly mistakes that I do when I'm sleepy
2026-01-15 13:20:40 -03:00
Timofey Kachalov
950b555558 feat(sdk, embed-js): Add Content Translations for SDK InteractiveQuestion new query Editor (#68063) 2026-01-15 20:13:21 +04:00
Jeff Bruemmer
2e65eac90e docs- remove sample app (#68235)
remove sample app
2026-01-15 14:59:24 +00:00
Timofey Kachalov
c73ccb8be7 Cleanup additional space to properly build Sample Apps (#68229) 2026-01-15 17:31:59 +04:00
William
7976ad4f47 Refresh child card result metadata on card edit (#68043)
When a card is updated, look for all mbql child cards and recalculate their result metadata.  With models, calculate
what their "correct" result metadata is pre-update, use that to calculate user overrides, and then reapply those
overrides when computing the new result metadata.

This should fix a variety of bugs around users updating a model and then not seeing those change downstream.
2026-01-15 09:41:36 +00:00
Thomas Schmidt
825719067a Improve Metabot input and message scrolling UX (#68117)
- Add max-height and vertical scrolling to input area
- Fix newline preservation in multi-line messages
- Add horizontal scrolling for wide code blocks in messages
- Style code blocks with proper background, border, and custom scrollbar
- Reduce code font size to 0.6875rem for better proportion
- Increase user message bubble width to 90%
- Add inline code styling with background and border
2026-01-15 08:43:34 +00:00
Anderson
95af300c15 Disable git pull button when there are no changes to pull (#67968)
* Add /has-remote-changes endpoint to remote-sync API

Adds a new endpoint GET /api/ee/remote-sync/has-remote-changes that checks
if there are changes on the remote (Git) repository that can be pulled.

Response format:
{
  "has_changes": true,
  "remote_version": "abc123...",
  "local_version": "789xyz...",
  "cached": false
}

* Disable git pull button when there are no changes to pull

* Fix unit test

* Fix e2e

* Adjust conflict modal 'push' option to always force

* Fix conflict resolution options when switching branches

* Fix modal title not wrapping properly

* Fix long long modal title e2e issue

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
2026-01-14 23:38:57 -03:00
Nemanja Glumac
d2f3648298 Remove embedding dev-related folders from Snyk (#68207) 2026-01-14 22:12:35 +01:00
Edward Paget
60093c461b Add /has-remote-changes endpoint to remote-sync API (#67924)
* Add /has-remote-changes endpoint to remote-sync API

Adds a new endpoint GET /api/ee/remote-sync/has-remote-changes that checks
if there are changes on the remote (Git) repository that can be pulled.

Response format:
{
  "has_changes": true,
  "remote_version": "abc123...",
  "local_version": "789xyz...",
  "cached": false
}

* Update api_test.clj
2026-01-14 14:25:41 -06:00
da
aab9fc000a Increase verbosity in the caching middleware (#68121)
* Increase verbosity in the caching middleware

* Fix linter

* Make it simpler

* Broke so many tests

* Make the linter happy

* Fix tests (going back to old implementation)
2026-01-14 17:22:58 -03:00
Timofey Kachalov
28baf73201 Cache Main App/Embed JS fonts (#68120) 2026-01-14 23:14:22 +04:00
Timofey Kachalov
2a70fd1794 fix(embed-js): Fix EmbedJS/SDK dashboard styles to properly display the EmbedJS branding footer (#68090) 2026-01-14 20:06:35 +04:00
github-actions[bot]
05105be4c7 Fix: Add Error state for incorrect CSV/TSV file upload type (#67150)
* Fix: Add Error state for incorrect CSV/TSV file upload type

Fixes #40589

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

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

* make the AI code a bit better

---------

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2026-01-14 15:53:57 +00:00
github-actions[bot]
c0663854c7 Fix: Having : as a special character in the DB name breaks the UI for Clickhouse (#68013) 2026-01-14 10:51:18 -05:00
Alexander Polyankin
fe4d26ab63 Fixes computing columns for Question -> Question -> Model on the FE (#68140) 2026-01-14 09:46:11 -05:00
Edward Paget
30cd48cc7c feat: add table/field/segment support to remote-sync (#67327)
Fully support remote-sync for data studio and make it easier to extend support for remote-sync to other models in the future.

    Supports serializing tables with their fields and segments via remote sync if they are published to a remote-synced collection.
    Supports dirty state tracking of tables, fields, and segments.
    Refetches dirty state when tables, fields, and segments are created/updated/deleted in the data studio
    Make sure the data studio still displays content when remote-sync is in read-only mode
    enforce that tables, fields, and segments published to remote-synced collections are not editable when remote-sync is in read-only mode.
    Deletes, tables, fields, and segments from the remote-sync repo when they are removed or archived.

This also creates two small abstractions to make it easier to add new models (like measures) to remote-sync when they are ready. The remote-sync.events models adds a defmodel-change-handler macro that setups handlers for -create, -update, -delete, events models can publish that the dirty state tracking will follow.

Right now the UI does not change when the data studio is in read-only mode, but all create/edit operations correctly return 403 if you try to modify things. I have a follow up branch to support disabling UI elements.

* feat: add dirty tracking for model changes

* feat: add table, field, segement to dirty state query

* feat: extract fields with tables and segments

when exporting a collection with a table we want to include its children
like fields and segments

* feat: allow importing/deleting tables

and segments and fields

* feat: add dirty tracking for field/segment

* feat: show path in git sync controls

* fix: skip archived segments in table descendants

* fix: view library when in read-only remote-sync

Allows users to still see library folder they can't edit when that
condition is caused by the library being remote-sync enabled and the
instance being in remote-sync mode.

* feat: use remote-sync status in table edit perms

* fix: don't use include_editable_data_model param

...in data studio so these will still load when remote sync is read-only.

* fix: always show dirty library state on removed

We can't track what collections a table was removed from so we just want
to show the library as dirty if any item has a 'removed' dirty state.

* chore: update modules config

* chore: fix kondos

* fix: only publish table update events on ee

otherwise a handler doesn't exist which causes them to throw

* fixup! whitespace

* refactor: make the table changes rendering simpler

* fixup! missing when

* fixup! tests shouldn't mock modules

* fix: make dirty tracking work with new implementation

* refactor: make the hydration step in events cleaner

* fix: make sure dirty returns lowercase

* fix: delete segments correctly

* fixup! remove extra module

* fixup! correct migration order

* fixup! FE lints and typecheck

* fixup! remove correct extraneous module

* Update enterprise/frontend/src/metabase-enterprise/remote_sync/components/ChangesLists/EntityLink.tsx

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

* fixup! PR feedback and tsc

* fixup! segment failing to redirect

* fixup! better fix for navigate after save

---------

Co-authored-by: Anderson <ands.alves.nunes@gmail.com>
2026-01-14 08:35:16 -06:00
Jeff Bruemmer
b3f62b6b6d note on slack notifications (#68153)
* note on slack notifications

* fix link
2026-01-14 09:23:07 -05:00
github-automation-metabase
50270bc649 Auto-update documentation for master (#68167)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-14 09:09:04 -05:00
Romeo Van Snick
b595e58985 Fix a broken model e2e test (#67499) 2026-01-14 15:07:53 +01:00
John Swanson
08b309f4c8 Fix perms checks for unarchiving collections (#67729)
* Fix perms checks for unarchiving collections

* use `can_restore` as single source of truth
2026-01-14 05:10:29 -08:00
John Swanson
db6808c754 Nicer error msg when trying to pull tenant colls (#67948)
Previously if you tried to pull from a remote sync repository that
contained tenant collections you would get an incomprehensible error
that didn't explain what was wrong.

[EMB-1104: Update error message when trying to pull Tenant collections with Tenants turned off](https://linear.app/metabase/issue/EMB-1104/update-error-message-when-trying-to-pull-tenant-collections-with)
2026-01-14 05:08:42 -08:00
John Swanson
ce252a2a8b include API keys when copying DBs (#67998)
[UXW-2690: Instance restored from a H2 snapshot is missing API keys](https://linear.app/metabase/issue/UXW-2690/instance-restored-from-a-h2-snapshot-is-missing-api-keys)
2026-01-14 05:08:27 -08:00
John Swanson
701b90bb9c Increase the unreturned cxn timeout for appdb (#67571)
For the data warehouses we can safely set a fixed
unreturnedConnectionTimeout to a fairly low number (5 minute default)
because we also have a default maximum query length for data warehouses,
which can't be exceeded anywhere.

For the application DB though, this isn't safe, as operations against it
can legitimately hold connections for extended periods - for example,
dump-to-h2 on large databases streams data for as long as it takes to
copy all rows.

Bumping this to 1 hour by default (configurable via
`MB_APPLICATION_DB_UNRETURNED_CONNECTION_TIMEOUT`).
2026-01-14 05:08:10 -08:00
John Swanson
16c291f753 Add support for transforms to collection items (#67832)
* add support for transforms

* tests and hide from non-superusers
2026-01-14 05:07:54 -08:00
dpsutton
a469da0955 simpler tests? you decide (#68144)
* simpler tests? you decide

* ignore discouraged var. just tests. don't need api docs

* avec-server -> with-server

originally there was another `with-server` and i didn't want to clobber
it until i was ready

* bit of cleanup

* cljfmt

* bit of linter appeasement
2026-01-13 16:39:38 -06:00
Nemanja Glumac
9a6393ff4a Enable codespell for dev folder (#68124) 2026-01-13 15:23:18 -07:00
Jeff Bruemmer
46bef2348b docs - skip txt (#68154)
skip txt
2026-01-13 17:10:42 -05:00
John Swanson
0266970fff Admins see personal collections for tenant users (#67949)
* Admins see personal collections for tenant users

[EMB-1110: As an Admin, I want to be able to see personal collections of external users](https://linear.app/metabase/issue/EMB-1110/as-an-admin-i-want-to-be-able-to-see-personal-collections-of-external)

This was already implemented on the BE. Claude helped with the FE but I
think it seems reasonable.

* CR resp

* Remove pagination
2026-01-13 13:17:40 -08:00
Riley Thompson
88ec74f7b3 Upgrade clickhouse to 0.9.5 (#67297) 2026-01-13 15:48:20 -05:00
bryan
b07c00001d Fix nested & misused is in tests found by new kondo version (#67939) 2026-01-13 13:08:40 -07:00
Gabriel Moreno
11e96da48b UXW-2666 Row chart tooltip doesn't reflect column rename (#68137)
* fix: prefer title_text over display_name

* test: add dimension key unit spec

* refactor: rename to `columnTitle`
2026-01-13 18:11:57 +00:00
Thomas Schmidt
5ab27ac0fb Support measures and segments for Metabot (#67368)
* Support measures and metrics for Metabot

* Add segment support to metric querying

* Minor clojure tweaks for metabot measures and segments poc (#67425)

* Handle measures and segments like metrics in table-details and card-details

Move these into the existing m/assoc-some and handle them in the same way as metrics

* Remove query->output-format

This was just a wrapper around lib/->pMBQL, but all these queries are already MBQL5 queries

* Metabot measures and segments cleanup and tests (#67488)

* some refactor

* draft some happy path tests

* use lib for creating measure and segment clauses

* fix tests

* fix some filter tests to use mbql5

* update more tests

* fix more tests

* fix model query syntax

* lint

* remove normalize call again

* add back normalize

* minor test cleanup

* address comments

* tweak another test

* add a query= helper that strips uuids, update a number of tests to use it

* add basic error handing for bad ids

* Minor cleanup

* address mike's comment

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2026-01-13 12:50:17 -05:00
Alexander Polyankin
7cd7ef457a Broken & unreferenced entities - add pagination, expose tables (#68110) 2026-01-13 16:42:14 +00:00
Edward Paget
79f43e1259 fix: don't unset remote-sync settings on api req (#67605)
* fix: don't unset remote-sync settings on api req

...if request is partial. Fixes an issue where the token could be unset
when switching between read-write and read-only modes.

* add debugging

* remove debugging

* fixup! handle extra collection

* fixup! update syntax
2026-01-13 09:46:14 -06:00
Jakub Chodorowicz
739a915d5d Uxw 2596 color range on table crashes it if values span a large scale (#68022) 2026-01-13 16:39:04 +01:00
Anderson
5c6c075103 Improve design of no-owner state in data structure side panel (#67772)
* Improve design of no-owner state in data structure side panel

* fix e2e test
2026-01-13 12:12:03 -03:00
Denis Berezin
2d76c2fb74 Fix public powered by metabase footer link (#68069)
* Fix public powered by metabase footer link

* Fix tests
2026-01-13 17:43:47 +03:00
Jakub Chodorowicz
63be293945 Prg 160 add ssl grouping config (#67682)
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
2026-01-13 15:09:30 +01:00
Nemanja Glumac
221b76041d Enable codespell GH action for frontend (#68073) 2026-01-13 13:05:19 +00:00
Nemanja Glumac
8d4837c6b0 Remove deprecated moveDnDKitElement helper (#67604)
Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2026-01-13 13:49:49 +01:00
github-automation-metabase
7879a97840 [chore] Update llms.txt for master (#68113)
Update llms.txt and llms-full.txt (master)

Regenerated llms.txt to include all markdown files from the docs/ directory.
Also generated llms-full.txt files for the embedding section.

🤖 Generated automatically by llms-txt-generate workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-01-13 09:49:53 +00:00
github-automation-metabase
4d820ce589 Auto-update documentation for master (#68105)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-12 20:35:29 -05:00
Nathan Voxland
cdcaaf5f33 If the entity id is unknown when calling the export API, throw an error (#68040) 2026-01-12 17:07:26 -06:00
bryan
a2e9d66d7a Disable regex lookaheads/lookbehinds for Snowflake driver (#68084) 2026-01-12 14:57:04 -07:00
github-actions[bot]
04d68a6a41 UXW-46 In Safari Scalar is truncated like a string rather than a number (#67207)
* Fix: In Safari, Reducing the Tile Size of a Number viz Might Result in the Number Being truncated like a String Rather than Rounded

Fixes #51082

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

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

* UXW-46 refactor claude solution, implement proper fix

* Update Loki Snapshots

* Fix e2e tests

---------

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-01-13 00:10:24 +03:00
Denis Berezin
ad87e0366a UXW-64 Fix table cell formatting for temporal breakout by week (#67477)
* UXW-64 Fix table cell formatting for temporal breakout by week

* Review fixes
2026-01-13 00:09:17 +03:00
Edward Paget
90ba3e39e7 feat: split can-read from can-query in data model (#67815)
* feat: split can-read from can-query in data model

Adds a new kind of permission type `can-query` that describes when a
user is allowed to query the data model vs `can-read` which encompasses
when a user can see the metadata of a query. This makes api calls to
read table metadata more straightforward and the eventual integration
with remote sync easier.

* feat: update api to use can-edit/can-query params

* fixup! allow can-write-metadata queries

* fixup! field test

* fixup! whitespace

* fixup! returning empty lists instead of 403

* fixup! schema response

* fixup! enforce query permissions where necessary

* fixup! add last tests

* fixup! can query filter before saved questions
2026-01-12 14:46:40 -06:00
Cam Saul
ee9ba65762 Introduce module :friends (#67292) 2026-01-12 11:54:04 -08:00
Cam Saul
469c2f4681 Minor cleanup: fix function with side effects name (#68044) 2026-01-12 18:29:26 +00:00
Maksym Yakubych
696d8eec73 fix: text selection inside card embed when interacting with card embeds (#67761) 2026-01-12 13:25:34 -05:00
kevinkelleher12
fbe2dd23a4 Fix funnel viz to handle increasing data (#68031) 2026-01-12 18:02:03 +00:00
Anderson
85fe26063c Fix data studio missing some hover states (#67891)
* use ActionIcon for data studio toggle icon

* Use ActionIcon on snippet tree row ellipsis menu

* Change link colors in breadcrumbs on hover

* Use ActionIcon for tree expand icon

* Update hover state on transforms runs filters

* Fix data studio nav collapsed logo hover

* Match hover state on snippets collection and snippets folders

* Fix ts
2026-01-12 14:24:53 -03:00
Alex Yarosh
afdd39c531 docs: Update link to Metabase pricing page (#68067)
Update link to Metabase pricing page
2026-01-12 14:35:23 +00:00
github-automation-metabase
fb22fed921 Auto-update documentation for master (#68052)
Update generated docs (master)

Co-authored-by: github-actions <github-actions@github.com>
2026-01-12 09:34:12 -05:00
Edward Paget
07c5e47251 fix: remote-sync origin url errors (#67594)
* fix: remote-sync origin url errors

Fixes issues where the tmp directory for the remote-sync repo can get
into a bad state where it doesn't have an origin URL. This calls a
function that explicitly sets our desired origin URL and updates all
calls to use the more specific :remote-url keyword rather than
inconsistently using :url vs :remote-url.

* Update git_test.clj
2026-01-12 08:23:50 -06:00
metamben
fd9a13e05e Measures cleanup (#67960)
* Extract cycle detection algo and fix available-measures
* Rremove duplicated code.
* Add more serialization tests
* Fix CLJS
* Remove MBQL4 support for measures at the  model level
2026-01-12 17:09:35 +03:00
Phoomparin Mano
a46764dd85 Add virtualized grid to collection list view for tenants (#67958)
Co-authored-by: Sébastien <sebastien@metabase.com>
2026-01-12 13:42:20 +00:00
Phoomparin Mano
a4e306f9cf Fix issues with the llms.txt generation workflow (#68019) 2026-01-12 17:07:07 +07:00
Phoomparin Mano
4ec8c0cb0e fix(sdk): fix crashes on React 19 due to findDOMNode on Gauge and Modal (#67953) 2026-01-12 16:56:43 +07:00
Alexander Polyankin
bff5dfb5eb Fixes (#68046) 2026-01-10 03:31:22 +00:00
Aleksandr Lesnenko
0deffd6231 add loki stress test workflow (#68042) 2026-01-09 20:36:22 -05:00
Aleksandr Lesnenko
9311117086 tweak tree table column widths (#68035)
* tweak tree table column widths

* tweak widths

* specs
2026-01-09 23:11:23 +00:00
Alex Yarosh
9a37785bc3 Fix sentence in JWT Identity Provider URI description (#68038) 2026-01-09 17:44:33 -05:00
Alexander Polyankin
3b52306116 Add a filter for personal collections; preserve filters in the URL, drop the broken dependencies page for now (#68008)
* wip

* wip

* wip

* wip

* wip

* Filters

* wip

* tests

* Fixes

* wip

* Add e2e test

* wip

* comment

* wip initial personal coll filter

* allow deleting personal collections

* used by

* whitespace

* lint

---------

Co-authored-by: Riley Thompson <rileythompson99@gmail.com>
2026-01-09 17:33:18 -05:00
Edward Paget
7a753622e0 fix: make sure we don't sync unchanged collections (#67795)
* fix: make sure we don't sync unchanged collections

* fixup! bad test
2026-01-09 15:55:35 -06:00
Edward Paget
09860c0032 fix: limit can_run_adhoc_query hydration (#68028)
We can't hydrate unbounded collections of cards with the
can_run_adhoc_query hydration since it linearly adds db queries to the
request. Users with > 10000k can have severe CPU/memory issues
processing this.
2026-01-09 15:55:06 -06:00
Egor Grushin
48e3b5c190 QUE-2687 remove automatic selection of the first option in TemporalUnitDropdown. (#67598) 2026-01-09 20:59:29 +00:00
Ryan Laurie
08421d9ec1 remove broken overlays demo (#67995) 2026-01-09 20:26:08 +00:00
Jeff Bruemmer
1c9de41832 docs - fix translation docs (#68011)
* fix translation docs

* comment

* sdk

* data

* cleanup
2026-01-09 20:03:15 +00:00
Nemanja Glumac
4497b15aed Enable codespell for modules/drivers (#68010) 2026-01-09 20:58:06 +01:00
Abed Habli
7a8b15e271 Docs: AI exploration (#67859)
* AI exploration section

* Optimized 2 images, saved 221.4 KB (51.0% smaller)

* fix the heading link

* Update docs/ai/metabot.md

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

* Update docs/ai/settings.md

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

* few edits

* typo

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2026-01-09 20:54:55 +01:00
Nemanja Glumac
75476f4ae1 Fix frontend typos (#68003) 2026-01-09 20:41:58 +01:00
Robert Kosara
4e60b2efeb Mention search in data picker docs (#67930)
* Replace data picker image, add a line about search

* Optimized 1 images, saved -360 bytes (-1.1% smaller)

* Fix screenshot and description to talk about v58

* Incorporate bot suggestion

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-01-09 10:41:05 -08:00
Alex Yarosh
3315a9a65a plan callouts (#68014) 2026-01-09 13:33:29 -05:00
Alex Yarosh
d20f6f9f11 docs: minor edits to tenants (#67961)
* Fix heading level for multi-tenant strategy section

* Correct 'Admin setting' to 'Admin settings'

Updated references from 'Admin setting' to 'Admin settings' for consistency throughout the document.

* more edits

* typos
2026-01-09 13:32:51 -05:00
Riley Thompson
686de1c06e Exclude archived items from unreferenced and broken items endpoints (#67950) 2026-01-09 13:08:25 -05:00
Nicolò Pretto
7b6b37264a docs(sdk): remove links to package changelog (#67997) 2026-01-09 18:37:36 +01:00
Nick Fitzpatrick
20ec35314f Typesafe c and bg props (#67899)
* most of the way there

* happy types, simpler themeColor function

* PR Feedback

* make editor buttons slightly less offensive

* final adjustments
2026-01-09 13:31:22 -04:00
Maksym Yakubych
c7f4935d58 fix: ellipsis breadcrumb shows gray background in Dark Mode (#67805)
* fix: ellipsis breadcrumb shows gray background in Dark Mode

* refactor: use `metabase/ui` in `CollectionBreadcrumbs`
2026-01-09 16:55:35 +00:00
Nemanja Glumac
80b6060ab7 Enable codespell for the enterprise folder (#67979) 2026-01-09 17:55:26 +01:00
Timofey Kachalov
b374706a41 feat(embed-js): Change guest embeds disabled tooltip to display a link to admin settings (#67925) 2026-01-09 20:29:38 +04:00
github-automation-metabase
a131b9c921 Update llms.txt and llms-full.txt (master) (#67993)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2026-01-09 16:00:20 +00:00
Nicolò Pretto
d4486c9dff fix: make dashboard header use container queries to respond to metabot (#67376)
* fix: make dashboard header use container query

* use named container everywhere

* fix syntax

* rename and extract to other class
2026-01-09 16:59:33 +01:00
Sébastien
ad5cc2877d Allow passing arrays of string as sqlInitialParameters in InteractiveQuestion (#67282)
* Allow passing arrays of string as sqlInitialParameters in InteractiveQuestion

* nit

* better assertion

* pass all initial sql params as is
2026-01-09 16:50:19 +01:00
Jeff Bruemmer
88647269a0 docs - embedding browser options (#67957)
* browser params

* array options
2026-01-09 10:08:14 -05:00
Anderson
f0ab6a222c Show border on segment name editable content in new segment page header (#67946)
* Use PaneHeaderInput on NewSegmentHeader

* Apply segment name on content change
2026-01-09 12:01:39 -03:00
Nicola Mometto
cc9f7e63ad submit transform metering data to metering endpoint (#67902) 2026-01-09 14:36:52 +00:00
Nemanja Glumac
3798862761 chore: Fix safe typos in enterprise/ folder (#67912) 2026-01-09 15:05:04 +01:00
Nemanja Glumac
3fbd0ff00d Increase the viewport width for a flaky "data studio" e2e tests (#67901) 2026-01-09 16:55:20 +03:00
Nicola Mometto
9f30405075 Fix serialization in the presence of xray of usage analytics (#67848)
* feat: separate analytics vs non analytics escapes

* update callsite

* fix: descendant-ids requires coll models

* add test

* fix: nil safe
2026-01-09 09:43:16 +00:00
Romeo Van Snick
363baef1d9 Add defensive toString to column name (#67893) 2026-01-09 14:10:36 +11:00
github-automation-metabase
6cdb558f0e Update generated docs (master) (#67966)
Co-authored-by: github-actions <github-actions@github.com>
2026-01-08 20:40:59 -05:00
Aleksandr Lesnenko
13ec0f6fc8 fix tasks table (#67964) 2026-01-09 01:34:50 +00:00
Nick Fitzpatrick
a6b5cb7371 updating ClauseStep type, fixing segment and measure editors (#67956) 2026-01-08 20:53:19 -04:00
Maz Ameli
2e6bb7f669 Rename Tasks page to Dependency diagnostics and update labels (#67935) 2026-01-08 19:23:03 -05:00
Egor Grushin
c822a6228c GIT-8461 hide "Visualize another way" button for Sankey charts (#67753) 2026-01-08 23:46:37 +00:00
Phoomparin Mano
2229469ca4 Add documentation button to tenants list page (#67884) 2026-01-08 23:03:36 +00:00
Egor Grushin
43ad099236 fix flake unit test (#67942) 2026-01-08 21:53:50 +00:00
Braden Shepherdson
b496e05834 [perf] Add a unit test for #66955 as a follow-up (#66958) 2026-01-08 16:18:09 -05:00
Gabriel Moreno
2847a18d60 UXW-2623 Update dependency graph labels and icons for sql questions (#67870)
* feat: include query type on dependencies api response

* feat: show icons based on query type

* test: add unit spec for dependency graph utils

* refactor: restore changes after merge conflict
2026-01-08 16:05:42 -04:00
Braden Shepherdson
413b32e277 [perf] Expand the qp.perf-test benchmark suite (#65806)
Lots of new tests, mostly aimed at seeing how the lib and QP scale on
clear dimensions: more stages, wider tables, joins, big expressions.
2026-01-08 19:43:10 +00:00
Alex Yarosh
4a2fade226 Revert "remove transforms once again (#67809)" (#67945)
This reverts commit 7f08349271.
2026-01-08 14:27:24 -05:00
Gabriel Moreno
117e2a22a3 UXW-2629 Adjust library breadcrumb folder expansion behavior (#67862) 2026-01-08 15:25:24 -04:00
Braden Shepherdson
cd5bc6bf72 [QP] Reject fuzzy match of join condition LHS to that join's RHS (#67804)
Fixes #67667.

`lib.equality` has logic to do "fuzzy" matching of field refs with
the corresponding columns. This logic exists to support somewhat
malformed older queries with impoverished field refs. Refs in healthy
recent queries are fully specified and there's nothing ambiguous to
required the fuzzy matching.

The bug #67667 caught a case where this fuzzy matching could find a
column with the same name on the RHS of a join, if the original target
column has disappeared from an upstream query.

This change causes the QP to fail in exactly this case: when a would-be
LHS ref in a join condition ends up pointing at the RHS of the same
join. That would produce a strange join condition like
`LEFT JOIN Orders ON Orders.ID = Orders.PRODUCT_ID`
which produces incoherent results, and could result in a very costly
Cartesian join.

This is a user-level error, since the query is broken and needs repair.
2026-01-08 14:13:34 -05:00
kevinkelleher12
f1626f8a81 Fix search links for actions and segments 2026-01-08 19:03:19 +00:00
Nemanja Glumac
c82582de0c Provide Cypress env (CI) for the support file (#67934) 2026-01-08 18:49:56 +00:00
Nemanja Glumac
d124262aca Fix typo in a group membership endpoint (#67923) 2026-01-08 12:36:32 -06:00
Aleksandr Lesnenko
22fa6d762a skip flaking loki bar chart spec (#67929) 2026-01-08 18:26:29 +00:00
William
c771b10ea8 Readded fk field ids to v_content's fk fields (#67867)
Basically, the issue is that trying to implicit join using the instance analytics content model's made_public_by_user field made qp throw an error. The underlying problem is that the field in question wasn't defined as a foreign key, even though the model's result metadata claimed it was a foreign key. Updating the field to actually be a foreign key fixed the problem. This also applies to the content model's question_database_id field, which was also fixed.
2026-01-08 10:57:49 -06:00
Nemanja Glumac
98adee8b12 Fix typos in Metabot code (#67918) 2026-01-08 17:18:17 +01:00
Nemanja Glumac
7fe74f70f8 Fix typo in test metadata (#67909) 2026-01-08 14:58:36 +00:00
Riley Thompson
63ce826faa Use source alias for breakout with implicit join (#67480)
* use source alias if we have a fk-field-id

* try only on single stages

* try to identify implicit joins

* try fix

* Clean up

* move test and test all drivers

* move test

* only test drivers with left join feature

* adjust length for certain drivers

* smaller for mysql

* fix starts-with filter

* improve test

* case insensitive filter for h2

* move let bindings up
2026-01-08 14:55:19 +00:00
Nemanja Glumac
63f180034d Fix typos in FE enterprise code translations (#67908) 2026-01-08 15:45:37 +01:00
Anderson
89fa63c99b Show Metabot button on transform creation page (#67837) 2026-01-08 11:19:40 -03:00
Timofey Kachalov
670828db79 Fix flaky "shows a static dashboard using drills" e2e (#67874) 2026-01-08 17:43:16 +04:00
Timofey Kachalov
88684d3b2c fix(embed-js, sdk): Properly handle restricted collection access in MetabaseBrowser (#67523) 2026-01-08 16:47:53 +04:00
Phoomparin Mano
d7b8e86987 Remove static llms.txt and embedding/llms.txt (#67878) 2026-01-08 19:45:56 +07:00
kevinkelleher12
322a6a0323 Reroute admin/tenants to admin/people/tenants (#67869) 2026-01-08 07:34:21 -05:00
Timofey Kachalov
d5b070b8a3 fix(SDK, Embed JS): Hide Static Question topbar from DOM when no children rendered (#67852) 2026-01-08 14:33:40 +04:00
Timofey Kachalov
aa5a35f94c Add support for content translations for auth embeds (#67730) 2026-01-08 14:33:01 +04:00
Romeo Van Snick
adf35e2c4c Use formatting settings for date parameters (#67713)
* Use instance settings for date filters in parameters

* Fix test instance to use default time format

* Add unit tests for date paramater formatting with custom settings
2026-01-08 14:23:42 +11:00
Alexander Polyankin
da9fbb67a2 Dependencies - unreferenced & broken items (#66279)
* entity check jobs seems to work

* reset analysis version of children when updating a card or transform

* transform event tests

* event handlers actually update analyses

* transform runs update dependents and api exists

* initial changes

* params

* fixes

* Fix

* Fix

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* X

* Fix

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fix

* Fixes

* Fixes

* Fixes

* Fixes

* added more tests

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Columns

* Fixes

* Errors column

* Fixes

* Revert "added more tests"

This reverts commit c7188e55dd.

* Fixes

* Revert "Revert "added more tests""

This reverts commit 66b2b7efd9.

* fix compilation

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Add link

* make query validation errors consistent and return them in the broken api

* use the same table

* Fixes

* Fixes

* Fixes

* /graph/broken and /graph/unrecognized match /graph

* Fixes

* Polish

* possibly fix check_card 500

* Fixes

* refactor query-error

* add test for validating sql column with no available sources

* backfill correctly finds dashboard dependencies

* fix comment wording

* bump current-analysis-version

* revert error type names

* make validation exceptions store errors in the standard format

* rename unknown-error to validation-error

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fix

* Fixes

* panel

* Fixes

* Fixes

* Fixes

* Save

* Fixes

* Add missing types

* Fixes

* Fixes

* Fixes

* also analyze segments

* add more tests

* Fixes

* Fix

* Fixes

* Fixes

* status

* Hide dependencies when not analyzed

* Tests

* Tests

* Tests

* Tests

* Tests

* Fixes

* Fixes

* Remove columns

* run backfills immediately during test startup

* remove token checks for maintaining dependencies

* run dependency backfill on serdes

* Tests

* Fixes

* Fixes

* Fix types

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* fix bug involving nonstandard tag spacing

* fix some broken tests

* Tests

* Tests

* Fixes

* Tests

* Fixes

* FixesTests

* Fixes

* Fixes

* Tests

* Fixes

* Fixes

* Fixes

* Fixes

* fix another test

* Fixes

* Add missing info

* Fix tests

* Hydrate collection for snippets

* Fix

* Fixes

* revert unnecessary change

* some lint fixes and a bunch of schemas

* fix compilation

* lint fixes

* new events derive from metabase/event

* simply specs to work with open-api spec gen

* dependency backfill checks tokens again

* Fixes

* fixed tests

* don't use ::ns/blah in a #_ comment when ns isn't in scope

* fix more tests

* add and update more tests

* lint fixes

* fix linting and make lib changes backwards compatible

* maybe fix more tests?

* fix ns name

* fix another test

* update modules config

* fix one test and debug second

* more test debugging

* yet more test debugging

* fix test?

* fix more tests?

* revert another unexpected migration change

* fix another test

* fix linting

* fix more tests

* update openapi spec

* fix unrelated bug with nil ancestors

* add test for nil ancestors bug

* Remove /status call

* Merge

* Fixes

* Fixes

* Fixes

* Fixes

* review feedback

* more cleanup

* yet more cleanup

* support unnormalized snippet tags

* more review feedbac

* fix build

* fix linting

* update lib.parameters.parse to match driver.common.parameters.parse

* fix compilation

* fix tests

* fix more tests

* fix more tests

* possibly fix linting

* fix more tests

* fix even more tests

* maybe fix tests?

* actually make backend support currently impossible snippet names

* Use TreeTable

* Remove unused component

* Renaming

* FE fixes

* switched migration to 59

* fully revert 58 migrations

* most review feedback

* factor out common setup from events tests

* deduplicate analysis gen tests

* more test fiddling

* final review feedback

* actual final review feedback

* linting

* Fix merge

* Fix lint

* reformat

* add measures to spec

* fix final test

* Fix links

---------

Co-authored-by: William Zimrin <william@metabase.com>
2026-01-07 21:57:09 -05:00
github-automation-metabase
314122dee5 Update generated docs (master) (#67890)
Co-authored-by: github-actions <github-actions@github.com>
2026-01-07 21:50:19 -05:00
Nick Fitzpatrick
3975adb932 Color Key Cleanup (#65855)
* Migrating Color Keys

temp

background keys

fixing some errors

border colors

removing duplicate keys

types

* enforce types on c prop

* more type cleanup

* rebase catch up

* unit tests

* re-add embedding sdk setup plugin

* e2e tests

* Sankey chart using correct label color in static viz, fix background detection

* some loki changes

* adjust border color

* sdk: updated sdk color mapping

* type adjustments, unit test fixes

* loki tests passing

* last e2e test

* cleanup

* Update Loki Snapshots

* updating alert colors

* Claude nits

* Update Alert Loki tests

* text-tertiary

* Update Loki Snapshots

* missed one

* last adjustmnet

* Update Loki Snapshots

* text-white

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-01-07 21:15:01 -04:00
Aleksandr Lesnenko
65a2afa186 Let users with data model perm access data studio (#67653)
* let users with data model permission access data studio

* respect manage table metadata permission in data studio

* fix ci

* fix flaky specs

* review

* review
2026-01-08 01:14:00 +00:00
Alexander Polyankin
c65cbf7791 Remove description (#67887) 2026-01-07 16:26:04 -08:00
Alexander Polyankin
42312e5fc2 Allow to overwrite id only for native models (#67773) 2026-01-07 23:56:31 +00:00
Egor Grushin
376ff5d1cf UXW-49 fixing log scale axis value (#67668)
Use a linear scale for values between 0 and 1, and a logarithmic scale for values greater than 1.
2026-01-07 22:54:03 +00:00
Aleksandr Lesnenko
8cbc058a0c table measures (#66576)
---------

Co-authored-by: Tamás Benkő <tamas@metabase.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2026-01-07 22:41:11 +00:00
Romeo Van Snick
6b04138204 Add tooltip to run button when field filters are missing a target field in Native editor (#67670)
* Add e2e test for missing field mapping

* Make validateTemplateTags public

* Render errors in run button tooltip

* Pass errors to run button

* Fix selector in test

* Simplify test

* Try with realClick

* Add Lib implementation of validateTemplateTags

* Also validate display-name

* Use Lib implementation of validateTemplateTags

* Localize error messages

* fixup! Add Lib implementation of validateTemplateTags

* Add Lib.ValidationError type

* Remove unused code

* Also validate temporal-units dimension

* Use validate-template-tags in can-run

* Add tag-name to template tag errors

* Fix malli types

* Add tests for validate-template-tags

* Add tooltip to save button too

* Also test time grouping and save button

* Remove more unused code

* Remove simple wrapper

* Use cond-> pattern instead of filter identity
2026-01-08 09:26:43 +11:00
Phoomparin Mano
65d34e4e37 Add GitHub actions to generate llms.txt and llms-embedding-full.txt at repo root during release (#67737)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: github-automation-metabase <166700802+github-automation-metabase@users.noreply.github.com>
2026-01-07 22:17:34 +00:00
Phoomparin Mano
fd6740eee7 Block official collections in shared collections and its subcollections (#67537) 2026-01-08 05:12:16 +07:00
Riley Thompson
18cf4fac85 fix typo (#67863) 2026-01-07 16:44:43 -05:00
da
17349e4f12 Fix logging messages for field values updates (#66767)
We're logging "Field Field xxx xxxx". I'm just simplifying that log line
2026-01-07 14:43:59 -06:00
kevinkelleher12
bfb78b8d6a Fill line series symbol with appropriate color in dark mode (#67811) 2026-01-07 18:41:03 +00:00
Rodrigo López Dato
343ae8d213 Fix -{un,}install-merge-drivers when using a git worktree (#67865) 2026-01-07 15:28:25 -03:00
kevinkelleher12
e69b260f0b Fix dark text on dark verification tooltip background in light mode (#67799) 2026-01-07 12:13:49 -05:00
Anderson
336180ee0c Make stacked row chart tooltips use custom display names (#67706)
* Make stacked row chart tooltips use custom display names

* Change the way we override seriesName with custom title
2026-01-07 12:16:57 -03:00
Nemanja Glumac
d5925e28f7 Bump Storybook to 8.6.15 (#67473) 2026-01-07 15:52:37 +01:00
Jakub Chodorowicz
5bc3af2630 update husky to v9 (#67846) 2026-01-07 15:41:35 +01:00
kevinkelleher12
c5f433336a add kevinkelleher12 to team.json and github-slack-map.json (#67752) 2026-01-07 08:25:39 -05:00
Dan Stone
dca8465cfb Index incremental filter column for OLTP databases (#66478)
* Add indexes to incremental checkpoint filter columns

* Fix bad barf

* Fix drop-index arg-list

* Less indirect supports test

* Comment on sync order

* Cleanup driver changelog entry

* Move changelog note back to 0.58 (backport)

* Fix passive voice
2026-01-07 12:36:53 +00:00
Alexander Polyankin
618e6e8701 Hide graph watermark (#67839) 2026-01-07 02:13:36 +00:00
Romeo Van Snick
6f637ee050 Test coercion strategy (#67496)
* Also test coerced datetime column

* Add e2e reproduction for opening the datetime filter for coerced fields

* Also check :effective-type in original-isa

* Fix test
2026-01-07 11:19:18 +11:00
github-automation-metabase
c06b4c2511 Update translations 2026-01-06 (#67800)
* Update translation sources 2026-01-06

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2026-01-07 00:13:27 +00:00
Alex Yarosh
7cdbdc8e94 docs: Add redirect for interactive embedding quickstart guide (#67833)
* Add redirect for interactive embedding quickstart guide

* Add redirect for quick-start guide
2026-01-06 18:48:13 -05:00
dpsutton
1bcc022f6b Reduce number of modules that trigger driver tests (#67769)
Before:

76 modules trigger:

```clojure
mage.modules=> (let [deps (dependencies)
                     all-deps (keys deps)]
                 (reduce (fn [acc module]
                           (if (driver-deps-affected? deps [module])
                             (conj acc module)
                             acc))
                         []
                         all-deps))
[actions analytics analyze api api-keys app-db appearance audit-app auth-identity auth-provider batch-processing cache channel classloader collections config content-verification dashboards database-routing driver driver-api eid-translation embedding events formatter initialization-status internal-stats legacy-mbql lib lib-be logger login-history model-persistence models notification parameters permissions pivot plugins premium-features public-sharing pulse queries query-permissions query-processor remote-sync request search secrets server session settings setup sso startup sync system task task-history tenants timeline types upload users util version view-log warehouse-schema warehouses enterprise/advanced-permissions enterprise/api enterprise/impersonation enterprise/sandbox enterprise/scim enterprise/serialization enterprise/sso]
mage.modules=> (count *1)
76
```

After:

Only 28 modules trigger driver tests:
```clojure
mage.modules=> (let [deps (dependencies)
                     all-deps (keys deps)]
                 (reduce (fn [acc module]
                           (if (driver-deps-affected? deps [module])
                             (conj acc module)
                             acc))
                         []
                         all-deps))
[actions analyze app-db cache database-routing driver driver-api legacy-mbql lib lib-be logger model-persistence models parameters pivot plugins premium-features queries query-permissions query-processor sync tenants upload warehouse-schema warehouses enterprise/advanced-permissions enterprise/impersonation enterprise/sandbox]
mage.modules=> (count *1)
28
```

How does this magic work? Just with an exclusion list:

```clojure
mage.modules=> driver-affecting-overrides
 #{batch-processing timeline eid-translation version
 enterprise/serialization initialization-status session users enterprise/api login-history sso classloader
 enterprise/sso permissions request view-log system api task-history notification task dashboards startup config
 content-verification secrets server formatter events util settings channel search collections remote-sync types
 api-keys setup enterprise/scim audit-app analytics public-sharing pulse embedding auth-identity auth-provider
 appearance internal-stats}
```
2026-01-06 16:13:33 -06:00
Anderson
0d13842be7 Fix dependency graph zoom controls colors in dark mode (#67774)
* Fix dependency graph zoom controls colors in dark mode

* Do not use :global
2026-01-06 22:00:37 +00:00
Phoomparin Mano
a7d35f1baf Add a tooltip message if model persistence is unsupported for a database (#67566) 2026-01-07 04:09:29 +07:00
Sloan Sparger
0c04a6a3c1 [Metabot] Split up metabot.unit.spec.tsx (#67764)
* init pass at adding an error boundary to metabot

* update the illustration used for error boundary and remove simulated error ui

* add unit tests

* split up the mega metabot.unit.spec.tsx unit test file

* fix lint
2026-01-06 14:47:18 -06:00
Jeff Bruemmer
1888c80fff 58 as latest (#67820) 2026-01-06 15:42:50 -05:00
Alex Yarosh
c1f08f65a6 docs: remove temp tenants docs (#67819)
* remove temp tenants

* jwt

* more link
2026-01-06 14:43:50 -05:00
Jeff Bruemmer
844123dbf2 docs - note on subscriptions (#67816)
* note on subscriptions

* typo
2026-01-06 18:54:00 +00:00
Alex Yarosh
ebd1476a1e docs: tenants (#67474)
* tenants

* Apply suggestions from code review

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

* links

* add links and images and edit remote sync

* links

* one more link

* Optimized 12 images, saved 930.1 KB (47.9% smaller)

* Apply suggestions from code review

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

* edits

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-01-06 18:47:27 +00:00
Alex Yarosh
78263d64ce documents oss (#67810) 2026-01-06 18:19:25 +00:00
Alex Yarosh
7f08349271 remove transforms once again (#67809) 2026-01-06 13:19:19 -05:00
Jakub Chodorowicz
bfa61de71f add all .env file except .env.example to gitignore (#67793) 2026-01-06 18:27:13 +01:00
Sloan Sparger
d1a55ddff1 [Metabot] Metabot error boundary (#67749) 2026-01-06 11:02:26 -06:00
Nicola Mometto
4e3d8f0caf Move metering events off the token check (#67584)
* chore: remove private from token check defs

* feat: don't send metering stats during token check

* add task for sending metering events

* lift try-catch

* add tests

* move around

* remove duplicate set!

* send ints/bools as strings, for backwards compatibility

* reduce metering frequency

* configurable interval, clamped between 1 min and 12 hours
2026-01-06 16:46:32 +00:00
Nicola Mometto
75ab330328 Add transform metrics to anonymous stats ping (#67786)
* feat: add transforms metrics

* feat: send transform metrics

* fix: don't require transforms feature, we send stats if we disabled the feature

* add tests

* fix: ee test
2026-01-06 15:42:03 +00:00
Ryan Laurie
69abc4cf1c fix translations workflow permissions (#67794) 2026-01-06 15:37:58 +00:00
Noah Moss
6cef5f80d0 Misc cleanup in Metabot clojure code (#67701)
* Misc cleanup in Metabot clojure code

* More misc cleanup

* Lint
2026-01-06 09:27:32 -05:00
Maksym Yakubych
5dd7e2049e chore: add myself to team.json and github-slack-map.json (#67754) 2026-01-06 11:19:09 -03:00
John Swanson
2393146b8c perms for moving collections with archived kids (#67728)
Previously if you had:

```
A (curate)
  B (curate)
    C (no permissions)
      D (curate)
```

Then if C was archived, you would be unable to move or archive A or
B.
2026-01-06 04:42:49 -08:00
Mahatthana (Kelvin) Nomsawadi
112d1d0235 Fix pie chart label not visible on dark theme (#67639)
* Fix `text-secondary` not working on dark theme on charts

* Support all colors so it's easier to reason about

* Add tests

* Fix type error

* Revert part of the code that's not used anymore

* Add test snapshots

* Make overriding font more consistency across environments

e.g. From storybook to SDK to the main app.

* Fix formatting
2026-01-06 12:34:27 +00:00
Sébastien
3f2ad43a43 Fix MB in an iframe running on a subpath (#67724)
* fix MB in an iframe running on a subpath

* fix

* extracted out the util fn and added unit tests for it

* addressed comments

* fixed unit tests
2026-01-06 13:19:02 +01:00
github-actions[bot]
835b3efc27 Update translations 2026-01-06 (#67782)
* Update translation sources 2026-01-06

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2026-01-06 11:58:16 +01:00
Romeo Van Snick
d8d4537f29 Fix broken python e2e test (#67435) 2026-01-06 10:00:38 +01:00
Nemanja Glumac
3f35a82ea7 Upgrade jspdf (#67760) 2026-01-06 08:58:38 +01:00
Maz Ameli
a1a62cd603 Add keyboard shortcut to close/open side menu in Data Studio (#67413)
* add keyboard shortcut and tooltip

* refine tooltip position and delay

* also listen for left bracket [ key
2026-01-06 00:56:48 +00:00
Romeo Van Snick
8542738fe7 Add repro for metabase#45890 (#67669) 2026-01-06 09:57:51 +11:00
bryan
f290bbbbe0 Skip cloud driver tests when possible + consolidate test skipping logic (#67568)
* Skips cloud driver tests on PRs unless files changed

Cloud drivers (Athena, BigQuery, Databricks, Redshift, Snowflake) now
only run on PRs when their files changed or 'ci:all-cloud-drivers' label
is present. Full coverage maintained on master/release branches.

* [do not merge] add failing databricks test

* Revert "[do not merge] add failing databricks test"

This reverts commit de5b6fa602.

* empty commit

* Fix cloud driver skip logic to respect ci:all-cloud-drivers label

The previous condition had three checks that could block cloud drivers:
1. !inputs.skip - false when no backend files changed
2. skip != 'true' - from mage can-skip-driver-tests
3. X-should-run == 'true' - the per-driver decision

The problem: checks 1 and 2 would override check 3, so the label had no
effect. Even with ci:all-cloud-drivers, cloud drivers were skipped.

We don't need inputs.skip or can-skip-driver-tests for cloud drivers
because the X-should-run output already encapsulates the full decision:
- master/release branch → run
- ci:all-cloud-drivers label → run
- driver files changed → run
- otherwise → skip

The label is an explicit override, so it should work even on PRs with no
backend changes. Removing the redundant checks lets the label work.

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

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

* mage -driver-decisions + roll in module analysis

* Remove quarantine check from test-driver action

Quarantine logic is now consolidated in mage -driver-decisions.
The check happens earlier in determine-driver-skips, so quarantined
drivers get should-run=false and their jobs never start at all.

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

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

* Fail CI if quarantined driver has file changes without break-quarantine label

If you change files in a quarantined driver's module (e.g., modules/drivers/snowflake/)
but don't add the break-quarantine-<driver> label, a new check-quarantine-conflicts
job will fail with a clear error message.

This prevents accidentally merging changes to quarantined drivers without running
their tests.

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

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

* Add --github-output-only flag to mage driver-decisions

Instead of using grep to filter mage output, the task now supports two modes:
- Default: prints human-readable analysis + GITHUB_OUTPUT preview
- --github-output-only: prints only clean key=value lines for CI

The workflow now calls mage twice: once for debugging visibility,
once with --github-output-only redirected to $GITHUB_OUTPUT.

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

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

* Add quarantine conflict checks to all driver jobs

Extends the quarantine conflict detection to ALL drivers, not just cloud
drivers. When a driver is quarantined but has file changes in
modules/drivers/<driver>/, the job will run but immediately fail with
a clear error message explaining how to add the break-quarantine label.

Changes:
- Add quarantine conflict check steps to presto-jdbc, sparksql, sqlite,
  sqlserver, and vertica jobs
- Update login-to-ecr job condition for vertica quarantine conflicts
- Fix verbose output suppression in --github-output-only mode by adding
  verbose? parameter to changes-important-file-for-drivers?

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

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

* Add driver decision priority documentation and tests

Adds comprehensive documentation to driver-decision function showing the
priority order as a table, plus explanations of what triggers "driver
module affected" and the difference between cloud vs self-hosted drivers.

Adds mage.modules-test with 14 tests (78 assertions) covering:
- Quarantine logic and break-quarantine labels
- Global skip behavior
- H2 always-runs behavior
- Master/release branch behavior
- Driver module affected behavior
- Cloud driver special rules (labels, file changes)
- Self-hosted driver skip logic

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

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

* Comment out starburst from driver-directory mapping

Starburst tests are currently disabled in drivers.yml, so the mapping
entry was inconsistent with all-drivers list. Commented out with a note
explaining why, so it can be easily re-enabled when starburst tests
come back.

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

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

* silence messages when in github-output-only mode

* remove redundant cloud-driver change detection

- this happens inside the script instead

* get rid of redundant rules definitions

- now only print how we make decisions in help for the task

* make a temporary redshift change

* Revert "make a temporary redshift change"

This reverts commit 3d93c60368.

* format usage fn code

* light refactor

* Rename driver decision variables for clarity and flatten decision tree

- driver-module-affected? → driver-deps-affected? (module dependency graph)
- drivers-changed → particular-driver-changed? (specific driver's files)
- Reorder priority: skip/H2/master now before quarantine
- Flatten nested cond for cloud driver rules

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

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

* Quarantine now respected on master/release branches

- Move quarantine check before master/release in driver-decision priority
- Quarantined drivers are now skipped even on master/release (unless break-quarantine label)
- Update tests and priority table documentation to reflect new order
- Cloud drivers don't benefit from driver-deps-affected (only label or file changes)

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

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

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 16:15:58 -06:00
Nemanja Glumac
1f366dde49 Update copyright year in README.md (#67677)
It's that time of the year again...
2026-01-06 11:05:33 +13:00
Aleksandr Lesnenko
edeea2ead0 fix saved question intro modal layout (#67703) 2026-01-05 21:23:25 +00:00
appleby
fbdf7574ed Fix parsing of :ERROR chunks in metabase-enterprise.metabot-v3.util/aisdk->messages (#67674)
* Fix parsing of :ERROR chunks in metabase-enterprise.metabot-v3.util/aisdk->messages

There was a typo in the case expr where :ERROR chunks were being handled like :DATA chunks, but in fact should be
handled like :TEXT chunks. This was resulting in an error like

    1. Unhandled java.lang.ClassCastException
       class java.lang.String cannot be cast to class
       clojure.lang.Associative (java.lang.String is in module java.base
       of loader 'bootstrap'; clojure.lang.Associative is in unnamed
       module of loader 'app')
                       RT.java:  847  clojure.lang.RT/assoc
                      core.clj:  193  clojure.core/assoc
                      core.clj:  192  clojure.core/assoc
                      util.clj:   56  metabase-enterprise.metabot-v3.util/aisdk->messages/fn/fn
                      ...

whenever an :ERROR chunk was encountered as we tried to ASSOC a string where we were expecting a map.

https://v4.ai-sdk.dev/docs/ai-sdk-ui/stream-protocol#text-part
https://v4.ai-sdk.dev/docs/ai-sdk-ui/stream-protocol#error-part

059d904d6e/ai_service/ai_sdk.py (L50)
059d904d6e/ai_service/ai_sdk.py (L203)
059d904d6e/ai_service/ai_sdk.py (L324)

* Add some error chunk parsing tests to aisdk-line-parse-test

* Mark aisdk-line-parse-test as ^:parallel

This does io to read some files, but should be threadsafe as no other tests read or modify those files.

* Add make-mock-error-stream-response test util

And rename make-mock-stream-response to make-mock-text-stream-response

* Add client-error-test to test streaming-request with error chunks in response
2026-01-05 12:38:04 -08:00
Sloan Sparger
a2aea53b1c [Metabot] Update Metabot icon (#67741) 2026-01-05 13:29:48 -06:00
metamben
d972f4529f Patch malli to avoid OOM related to recursive memoization (#67733)
This is a temporary fix until https://github.com/metosin/malli/pull/1250 gets merged into Malli.
2026-01-05 21:46:29 +03:00
Noah Moss
f1f47d4050 Clarify permissions model for suggested prompts generation (#67656)
* Run suggested prompts generator as admin & fix test

* Add a prompt suggestions GET perms test

* small cleanups

* use mbql5
2026-01-05 13:33:26 -05:00
dpsutton
476f61760c Handle unroutable token checks (#67698)
We have a grace periods and circuit breakers for token checks. But one
issue is that if the token check doesn't throw an error we can't catch
it.

An easy way to see this is to use a local network address that won't
respond like 192.168.random.random (i used 192.168.40.40) then see the
behavior. Without the timeouts, the threads all just get stuck here and
the page never loads. With timeouts, you'll see a few stutters until the
circuit breaker steps in, at which point you have a non-enterprise
version.

https://www.loom.com/share/6ae056dc126b48c9abe8a7ad9366fd05
2026-01-05 11:52:56 -06:00
Copilot
b24727409c Migrate React components from dispatch(addUndo) to useToast hook (#66778)
* Update React components to use useToast hook instead of dispatch(addUndo)

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

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/tenants/containers/NewTenantModal/NewTenantModal.tsx
#	enterprise/frontend/src/metabase-enterprise/tenants/containers/TenantActivationModal.tsx
#	frontend/src/metabase/admin/people/components/GroupDetail.tsx

* type fix

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2026-01-05 10:48:54 -07:00
dpsutton
119487b1cc remove api "uses" dependency on api-routes (#67650)
* remove api "uses" dependency on api-routes

api-routes can use all modules to expose their routes. ie it uses
timeline module, etc. It has `:uses :any`.

```clojure
mage.modules=> (let [deps (dependencies)
                     all-deps (keys deps)]
                 (reduce (fn [c module]
                           (update c (if (skip-driver-tests? deps [module])
                                       :skip :run) inc))
                         {:skip 0 :run 0}
                         all-deps))
{:skip 0, :run 153}
```

This is shown in this path here:

```clojure
mage.modules=> (let [ds (dependencies)
                     ds (into {}
                              (map (fn [[k v]] (if (= v :any)
                                                 [k (-> ds keys set)]
                                                 [k v])))
                              ds)]
                 (letfn [(driver-path [to]
                           (loop [q '[[driver]]
                                  seen #{}]
                             (let [p (first q)]
                               (when-let [node (peek p)]
                                 (if (= node to)
                                   p
                                   (recur (into (vec (rest q))
                                                (for [adjacent (remove seen (ds node))]
                                                  (conj p adjacent)))
                                          (conj seen node)))))))]
                   (driver-path 'enterprise/remote-sync)))
[driver warehouse-schema api api-routes enterprise/remote-sync]
```

driver uses arehouse-schema uses api uses api-routes which uses
any. Therefore all changes will trigger driver tests.

So after these changes we observe:
- the path above is empty (drivers don't transitively use remote-sync
module) and therefore would not trigger driver tests
- only 76 modules trigger driver tests

```clojure
mage.modules=> (let [deps (dependencies)
                     all-deps (keys deps)]
                 (reduce (fn [c module]
                           (update c (if (skip-driver-tests? deps [module])
                                       :skip :run) inc))
                         {:skip 0 :run 0}
                         all-deps))
{:skip 77, :run 76}
```

What else did i try?

1. add a `#_{:clj-kondo/ignore [:metabase/modules]}` to the ns
I didn't love this because it felt a bit like cheating. All of this is
kinda annoying because it's fundamentally about changes during dev time.

2. remove the ns require and add a requiring-resolve
This actually doesn't break the module usage analysis. It's smart enough
to see this so this just makes it more tenuous and easy to miss if we
change anything while also still leaving in place the module
entanglement.

So I just fire the event from the api module when rebuilding routes and
handle the event from the api-routes module. The trick is that the api
module sends along the function to rebuild the docs

* handle cycling ref

* remove reference to deleted file

* our linter is scared of an extra line

* use an events namespace

not doing an init namespace as that's similar but not the same. Those
are for settings and models. It's fine to just require the event
namespace in the core namespace. it's a bit of ceremony but the pattern
is useful

* include random event correctly

used to be just `(first (descendants :metabase/event))`. This was
fragile and just now started to fail:

```clojure
models-test=> (first (descendants :metabase/event))
:metabase.api-routes.events/api-events
```

because of course do we things like `(derive ::api-events
:metabase/event)`.

```clojure
models-test=> (filter (comp (complement #{"event"}) namespace)
                      (descendants :metabase/event))
(:metabase.api-routes.events/api-events
 :metabase.audit-app.events.audit-log/card-event
 :metabase.audit-app.events.audit-log/cloud-add-on-event
 :metabase-enterprise.dependencies.events/transform-delete
 :metabase.activity-feed.events.recent-views/legacy-card-event
 :metabase.view-log.events.view-log/collection-read-event
 :metabase.audit-app.events.audit-log/notification-handler-event
 :metabase.audit-app.events.audit-log/user-update-event
 :metabase-enterprise.dependencies.events/transform-run
 :metabase.revisions.events/transform-event
 ...
 )
```

This has been lucky for a long time
2026-01-05 11:28:46 -06:00
Anderson
a5afeea12d Update Remote Sync branch picker to match new designs (#67620)
* Update Remote Sync branch picker to match new designs

* Move git sync controls next data studio logo

* Fix unit test

* Fix e2e test

* Address Claude's review

* Remove console.error

* Use css modules for the chevron icon transition

* Use popover instead of findByRole('presentation')
2026-01-05 17:21:58 +00:00
Ryan Laurie
4521f75ee6 stabilize flaky test (#67646) 2026-01-05 14:05:56 -03:00
Noah Moss
cfdd4de405 try to fix flake in semantic index dlq tests (#67700) 2026-01-05 09:22:27 -05:00
Noah Moss
24f586428d Disable progress bar in whitespace linter github actions workflow (#67695)
* disable progress bar in whitespace linter github actions workflow

* add extra whitespace to demonstrate failure

* Revert "add extra whitespace to demonstrate failure"

This reverts commit ba34650efd.
2026-01-05 09:21:56 -05:00
Nemanja Glumac
0128771ad1 Revert "Replace Cypress grep with Bahmutov's cy-grep (#67660)" (#67725)
This reverts commit d2d8d1fe83.
2026-01-05 14:06:11 +00:00
Timofey Kachalov
e3f05d0cbb Don't close InteractiveQuestion editor on Filters change (#67517) 2026-01-05 17:02:24 +04:00
Dan Stone
53203af754 Add some additional incremental transforms tests (#67683)
* Add some additional incremental transforms tests

* Add missing require

* Use driver/table-name-length-limit
2026-01-05 11:02:08 +00:00
Aleksandr Lesnenko
71c188c09f Use tree table in data model (#67117)
* use tree table in the data model section of data studio

* review
2026-01-02 18:05:57 +00:00
Nick Fitzpatrick
db48071330 Don't show metrics in the join step (#67490) 2026-01-02 13:01:25 -04:00
Nick Fitzpatrick
05d04cf64b specify gauge label sizes in px (#67386) 2026-01-02 12:54:35 -04:00
Nick Fitzpatrick
6c99df07a8 Adding e2e repro for drill through entity keys (#67467) 2026-01-02 12:54:19 -04:00
Alex Yarosh
5b92cc2b02 Improve formatting and clarity in serialization.md (#67587)
Updated curl command formatting and clarified instructions for exporting and importing Metabase data.
2026-01-02 10:41:15 -05:00
Vamsi Peri
fea1cbad4b Update issue templates (#67687)
* Update issue tempaltes

* Delete .github/ISSUE_TEMPLATE/task.md

* Update verbiage for new feature request
2026-01-02 10:24:50 -05:00
Jakub Chodorowicz
024c43ff39 fix: broken date filter test (#67684) 2026-01-02 16:18:14 +01:00
Edward Paget
ff4f2bf956 feat: add git settings modal to data studio (#67178)
* feat: add git settings modal to data studio

* Refactor GitSettingsModal to reuse existing settings form / Adjust some styles

* Fix and improve unit tests

* Adjust font size according to variant

* fix unit test

* fixup! mock API not other plugins in this layout

* Split unit test files and improve endpoints setup

* Implement PLUGIN_REMOTE_SYNC.GitSyncSetupMenuItem with internal rendering condition

---------

Co-authored-by: Anderson <anderson@metabase.com>
2026-01-02 11:55:52 -03:00
Nemanja Glumac
d2d8d1fe83 Replace Cypress grep with Bahmutov's cy-grep (#67660) 2026-01-01 12:33:26 +01:00
Eric Normand
e5ab9db7bc Extra remapped fields (#67601)
* kick ci

* Disable remaps when calculating columns for a query.

* Add tests for result_metadata remappings

* Add comments

* Whitespace
2025-12-31 19:07:17 +00:00
Braden Shepherdson
4786076692 [dashboards] Handle parallel FKs with dashboard filter values (#66287)
Fixes #65838.

This issue was about dashboard filters showing the wrong value when
the filter was bound to an FK field from a table with multiple FKs to
the same foreign table. The dashboard parameters logic on the BE was
choosing which FK to use for the filter values arbitrarily, meaning that
binding the filter to one of them would work fine, but the other would
give incoherent results.

The fix is to be deliberate about selecting the parameter's column. That
doesn't solve all ambiguous cases, but we really can't help if there's
a multi-hop join that has parallel edges in the middle!
2025-12-31 11:46:34 -05:00
Nicola Mometto
1e3a879116 Mage python runner (#67265)
* disable chunked encoding if using path style access

* mage task to start python runner with mock s3
2025-12-31 11:03:13 +00:00
Aleksandr Lesnenko
2c01e5063b series limit for row chart (#67419) 2025-12-30 20:08:11 -05:00
Ryan Laurie
b4912b71f1 more entity cleanup (#66659) 2025-12-30 17:23:34 -07:00
Nathan Voxland
1d8b669f62 Avoid joins of remote_sync_object with actual tables (#67042) 2025-12-30 15:37:13 -06:00
Denis Berezin
25091a2fd1 UXW-603 unified picker for Document smart link (#67408)
* UXW-603 temp unified picker

* Add unified data picker

* Fix issues with tabs, add e2e tests

* Self review
2025-12-30 18:06:54 -03:00
Timothy S. Dean
6f00f47c47 Simpler fix than first attempt. (#67300) 2025-12-30 22:41:43 +03:00
Aleksandr Lesnenko
07e2560596 fix zoom resets on resize (#67420) 2025-12-30 13:15:21 -05:00
dpsutton
d47b9d6759 bumping deps: (#67638)
- https://github.com/metabase/metabase/security/code-scanning/543
  about snowflake's of grpc netty shaded. We already have this
  version elsewhere so now it matches
- https://github.com/metabase/metabase/security/code-scanning/549
  and https://github.com/metabase/metabase/security/code-scanning/557
  issue in databricks. We bumped that and now it uses the new coordinate
  `at.yawk.lz4/lz4-java 1.10.1`
- https://github.com/metabase/metabase/security/code-scanning/496 bump commons-lang3.
  actually just exclude it from the driver jar so it will be found on parent
  classpath with coordinate from deps.edn: `{:mvn/version "3.19.0"}`
2025-12-30 10:44:10 -06:00
Chris Truter
b222e32bdf Revert "Add transforms.target_database_id column (#66953)" (#67630) 2025-12-30 16:25:10 +00:00
Jakub Chodorowicz
390e559dc2 Prg 160 add field grouping format and group host and port fields (#64280)
* Add field grouping of host and port

* Add host and port settings to postgres, mysql

* Add host and port grouping to db drivers

* Add database story with host and port group

* Add groupFields unit tests

* Fix typo

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix missing tunnel parameter value

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor and simplify field grouping function

* feat: add nested fields support for db format

* feat: remove id field, adapt new format foy postgres, mongo, mysql, remove leftovers

* feat: support nested fields, add backdrop component

* fix: group inputs loosing focus on type/render

* refactor: simplify custom containers logic

* style: adjust backdrop container style

* refactor: field mappers for db forms

* refactor: move host and port config to the new format

* refactor: cleanup old grouping approach

* refactor: remove unneeded property

* fix: typo in the html prop name

* internal: validate container style comping from BE

this value can be set be external drivers so it's better to validate  it

Signed-off-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>

* fix: type errors

* fix: driver translation test

* refator: use existing getFlattenedFields function

* fix: flatten properties for connection property uniquness

* backtrack from ssl grouping for mongo

---------

Signed-off-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-30 14:51:28 +01:00
John Swanson
44aa361a2c UXW-2586: Acquire locks before changing data permissions (#67201)
* Acquire locks before changing data permissions

Data permission have a read-modify-write cycle:

- we read the existing permissions to see what's currently set
- then we decide what to do (e.g. delete the existing DB level
  permissions to write a granular table-level permission)
- then we do the write

This has a race condition if multiple Metabase instances are modifying
permissions at the same time.

For example, say we have:

Initial state: `{:db_id 1 :table_id nil :perm_value :unrestricted}`

Instance A: set table 1 to :blocked
Instance B: set database to :blocked

T1: A reads state, sees db-level permission, plans to expand to table-level
T2: B reads state, sees db-level permission, plans to replace it
T3: A deletes db-level, inserts table-level rows for all tables
T4: B deletes db-level (no-op), inserts new db-level :blocked

Result (CORRUPT):
```
{:db_id 1 :table_id 1 :perm_value :blocked}      ;; from A
{:db_id 1 :table_id 2 :perm_value :unrestricted} ;; from A
{:db_id 1 :table_id nil :perm_value :blocked}    ;; from B
```

Both db-level AND table-level permissions now exist.

For the permissions API, we take a cluster lock, but sync operations
bypassed this cluster lock. This PR creates a lower-level cluster lock
per `[database, group, perm-type]` so only one instance/thread can do
the read/decide/write cycle for a particular db/group/perm at a time.

* Add a test for race conditions setting data perms

This took a while before I was able to track down the fact that using
`(mt/with-temp )` caused both threads to share the same connection, so
they could obtain the lock simultaneously 🤦

* Use a slightly coarser lock

I realized that if an instance has a huge number of groups, we'll obtain
a lock and ask Postgres to maintain an active savepoint for each group,
which might be untenable.

I think the best solution here is to use slightly coarser locks. This
might increase contention slightly, since we won't be able to change
permissions for `db 1, group 1, perm type view-data` at the same time
that we change permissions for `db 1, group 2, perm type view-data`. But
I think the tradeoff here is necessary.
2025-12-30 13:08:39 +00:00
Mahatthana (Kelvin) Nomsawadi
cf7026a6a2 Fix empty cards with no results making dashboard longer than expected (#67581)
* Prevent unnecessary height calculation

* Prioritize local layout from `react-grid-layout` for height calculation

* Refix the issue for real

* Add tests
2025-12-30 12:51:29 +00:00
Jakub Chodorowicz
afef9ac2ae fix: hide editing toggle for unsupported engines (#67564)
* fix: hide untested and unsupported db engines in table editing section

* move allowed engines to constants file

* test: add hidden editing toggle test case
2025-12-30 11:50:11 +01:00
Nemanja Glumac
b5f483d951 E2E workflows env vars cleanup (#66592) 2025-12-30 10:56:23 +01:00
Jakub Chodorowicz
7247ffca2d feat: allow setting custom y axis range, even if points are outside of the range (#67533)
* feat: allow setting custom y axis range, even if points are outside of the range

* fix: adjust Waterfall null x value loki screenshot test
2025-12-30 09:15:10 +01:00
github-automation-metabase
8d7ffb6845 Update generated docs (master) (#67618)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-30 00:06:07 -05:00
Egor Grushin
2b97f841bc UXW-2597 fix row bar charts' tooltip (#67617)
* UXW-2597 fix Row Bar tooltip data error
2025-12-30 01:33:34 +00:00
Gabriel Moreno
fe7668963c UXW-69 Avoid persisting non-dashboard settings (#67592)
* fix: avoid persisting settings that are hidden from dashboard UI

* test: add `sanitizeDashcardSettings` unit spec

* refactor: use `_.pick` for sanitizing dashcard settings
2025-12-29 18:52:06 -04:00
bryan
29b1e70d21 fix perf/mapv to handle infinite and large lazy sequences (#66984) 2025-12-29 15:02:00 -07:00
Ryan Laurie
b8113ad526 Get personal collection hook (#66701)
* get personal collection hook

* use the hook

* better tests

* barrell

* Apply suggestions from code review

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* cmon claude

* review fixes

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-12-29 14:42:33 -07:00
metamben
6d1cb34859 Normalize aggregation references, sort maps and remove all uuids (#67521)
* Normalize aggregation references, sort maps and remove all uuids

Fixes QUE-2916
2025-12-29 21:32:10 +00:00
Nemanja Glumac
0c2996b7da Re-introduce: Upload failed e2e test artifacts for quarantined tests (#67600) 2025-12-29 21:10:32 +00:00
Egor Grushin
9daa5119f6 fix: user's input is overwritten by async form reinitializations (#67525) 2025-12-29 18:27:03 +00:00
Anderson
48b6a9d289 Fix pie chart flickering when toggling legend / Convert ChartWithLegend to ts (#67240)
* Fix pie chart flickering on toggling legend / Convert ChartWithLegend to ts

* Convert test to ts

* Resolve flickering when toggling visualization config sidebar

* Fix regression with map chart (only apply svg centralization to pie charts)

* Apply PieChartContainer classname to inner component
2025-12-29 17:40:02 +00:00
Ryan Laurie
037391a1ea our analytics strikes again (#66909) 2025-12-29 10:21:03 -07:00
Eric Normand
c8c18494ac Default to base-type when it differs from effective type (#67486)
* Default to base-type when it differs from effective type

* Make 'er parallel

* Does this clause make it better?

* Remove parallel.

* New test and fix for two literals

* Use y-type for effective type

* Update test to try number
2025-12-29 11:08:13 -06:00
Ryan Laurie
cfcf6c16eb Update frontend dev guide (#67333)
* update frontend dev guide

* add color notes

* ouch
2025-12-29 09:57:01 -07:00
William
050a38bb19 Hopeful fix for the ooms that betterment is running into. (#67482)
* Hopeful fix for the ooms that betterment is running into.

Note that this will only work once macaw is updated and metabase is using the new version of macaw.  Until that
happens, this change is a noop.

* bump macaw for context stripping

https://github.com/metabase/macaw/pull/123

here's the gist:

```clojure
core-test=> (let [base {:select [:a :b :c]
                        :from   [:foo]
                        :where  [:= :foo.a [:inline "baz"]]}]
              (-> {:union-all (for [_ (range 3)]
                                base)}
                  sql/format
                  first
                  (components {:strip-contexts? true})
                  :columns
                  ))
                  ;; replacing #{} with <set> so git doens't comment it out
<set>{{:component {:table "foo", :column "a"}}
  {:component {:table "foo", :column "b"}}
  {:component {:table "foo", :column "c"}}}
core-test=> (let [base {:select [:a :b :c]
                        :from   [:foo]
                        :where  [:= :foo.a [:inline "baz"]]}]
              (-> {:union-all (for [_ (range 3)]
                                base)}
                  sql/format
                  first
                  (components )
                  :columns
                  ))
                  ;; replacing #{} with <set> so git doesn't comment it out
 <set>{{:component {:table "foo", :column "b"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x6343d805 "com.metabase.macaw.AstWalker$ScopeInstance@6343d805"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "a"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x6343d805 "com.metabase.macaw.AstWalker$ScopeInstance@6343d805"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "a"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "a"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x4de719cd "com.metabase.macaw.AstWalker$ScopeInstance@4de719cd"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x76f86e4f "com.metabase.macaw.AstWalker$ScopeInstance@76f86e4f"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x6343d805 "com.metabase.macaw.AstWalker$ScopeInstance@6343d805"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "c"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x6343d805 "com.metabase.macaw.AstWalker$ScopeInstance@6343d805"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "b"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x1241e96a "com.metabase.macaw.AstWalker$ScopeInstance@1241e96a"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x6343d805 "com.metabase.macaw.AstWalker$ScopeInstance@6343d805"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "a"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x542edf1d "com.metabase.macaw.AstWalker$ScopeInstance@542edf1d"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x2e474cfd "com.metabase.macaw.AstWalker$ScopeInstance@2e474cfd"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "b"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "a"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x459ed576 "com.metabase.macaw.AstWalker$ScopeInstance@459ed576"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x38a0b358 "com.metabase.macaw.AstWalker$ScopeInstance@38a0b358"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x1241e96a "com.metabase.macaw.AstWalker$ScopeInstance@1241e96a"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x6343d805 "com.metabase.macaw.AstWalker$ScopeInstance@6343d805"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "c"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "a"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x1241e96a "com.metabase.macaw.AstWalker$ScopeInstance@1241e96a"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x6343d805 "com.metabase.macaw.AstWalker$ScopeInstance@6343d805"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}
  {:component {:table "foo", :column "c"},
   :context
   (#object[com.metabase.macaw.AstWalker$ScopeInstance 0x1241e96a "com.metabase.macaw.AstWalker$ScopeInstance@1241e96a"]
    #object[com.metabase.m
acaw.AstWalker$ScopeInstance 0x6343d805 "com.metabase.macaw.AstWalker$ScopeInstance@6343d805"]
    #object[com.metabase.macaw.AstWalker$ScopeInstance 0x761965fc
    "com.metabase.macaw.AstWalker$ScopeInstance@761965fc"])}}
```

---------

Co-authored-by: dan sutton <dan@dpsutton.com>
2025-12-29 10:27:09 -06:00
github-automation-metabase
0e21ffcaac Update generated docs (master) (#67576)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-29 10:49:30 -05:00
Edward Paget
c36208d52e docs: fix enable tenant string (#67195) 2025-12-29 15:33:34 +00:00
Nemanja Glumac
d4ba2829bd Revert "Upload failed e2e test artifacts for quarantined tests (#67381)" (#67582)
This reverts commit 487036f0b1.
2025-12-29 13:54:36 +01:00
Jakub Chodorowicz
9f6d9f46f3 fix: custom home page settings are not being exported (#67550)
* fix: custom home page settings are not being exported

* fix: update seralization baseline test
2025-12-29 09:47:44 +01:00
bryan
cb7c3a09ac Add hour to redshift test schema prefix for more aggressive cleanup (#67215)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 11:09:20 -07:00
Jakub Chodorowicz
d0327d0b4b docs: improve .env.example docs (#67545)
* docs: improve .env.example docs

* docs: fix numbering and comment out default value env var
2025-12-26 15:55:17 +01:00
dpsutton
42a7260209 bump log4j (#67393)
* bump log4j

* bump snowflake in hope of clearing advisory

https://github.com/metabase/metabase/security/code-scanning/543

> This file introduces a vulnerable io.grpc:grpc-netty-shaded package
> with a high severity vulnerability.

* bump netty shaded

https://github.com/metabase/metabase/security/code-scanning/543

* bump aws s3 for io.netty:netty-codec-http2

https://github.com/metabase/metabase/security/code-scanning/536

before bump:
    . io.netty/netty-codec-http2 4.1.126.Final

after dump:
❯ clj -X:deps tree :extra '{:deps {software.amazon.awssdk/s3 {:mvn/version "2.40.13"}}}' | grep http2
    . io.netty/netty-codec-http2 4.1.130.Final

* bump netty-codec-http

from software.amazon.awssdk/s3

before:
    . io.netty/netty-codec-http 4.1.126.Final

https://github.com/metabase/metabase/security/code-scanning/534

* bump athena to 3.7.0

ran workflow at
https://github.com/metabase/metabase/actions/runs/20439789522/job/58729767910

https://github.com/metabase/metabase/actions/workflows/athena.yml to
publish the 3.7.0 version

* include driver change to force running drivers

* sort deps edn

* attempt to solve l4z issues

weirdness is that this version might move some stuff? we'll see if it
works.

* Revert "attempt to solve l4z issues"

This reverts commit 03d845eeea.
2025-12-26 10:24:04 -03:00
Jeff Bruemmer
df292ad856 note on SQL download perms (#67464) 2025-12-26 10:03:14 -03:00
Nemanja Glumac
81010429ec Delete duplicate e2e repro model metadata (with custom expression) (#67555) 2025-12-26 13:59:33 +01:00
Nemanja Glumac
487036f0b1 Upload failed e2e test artifacts for quarantined tests (#67381) 2025-12-26 12:57:34 +01:00
Mahatthana (Kelvin) Nomsawadi
7a36d9143a Prevent black background loaded with light full-app embedding (#67544)
* Prevent black background loaded with light full-app embedding

* Fix tests
2025-12-26 11:49:00 +00:00
Nemanja Glumac
fb96706972 Reinforce 'rename column' e2e helper (#67539) 2025-12-26 11:45:20 +01:00
Nicolò Pretto
3459c5344d chore(sdk): move setting cypress baseUrl to global beforeEach for sdk tests (#66308) 2025-12-26 11:34:10 +01:00
Mahatthana (Kelvin) Nomsawadi
42c8a22c37 fix(sdk-package, sdk-bundle, embed-js): Don't expose question in SDK's entityTypes (#67534)
* Don't expose `question` in SDK's `entityTypes`

Because it's only applicable to staged picker

* Fix type

* Clarify the use of `question` in SDK's `entityTypes`

* Fix SDK not building
2025-12-26 03:55:27 +00:00
Nemanja Glumac
8ee6859b19 Fix model metadata e2e flake (#67522) 2025-12-25 20:27:29 +01:00
Mahatthana (Kelvin) Nomsawadi
3f4e0678f5 feat(sdk-bundle, embed-js): Remove embedding subscriptions email links (#67511)
* Prevent test email from including Metabase links (#67068)

* Send a new flag from FE if testing subscription from modular embedding

* Pass :disable_links to dashboard subscription email template

* Remove links from dashboard subscription email template

* Remove link from pulse cards

* Remove dangling divider line

* Add test

* Fix tests

* Use the same logic as in the actual subscription tasks

* Prepare to use a new column name from pulse table

* Remove embedding subscriptions email links (#67181)

* Add a column to pulse to save when a subscription is created on embedding

* Save disable_links to "pulse" table

* Fix tests

* Fix more tests

* Update column name

* Add tests

* Make code less confusing after embedding name change

* Fix liquibase boolean type

* Fix tests

* Fix more tests

* Fix formatting

* Fix wrong test names

* Make function comment styles consistent

* Make the test more solid

* Add modular embedding SDK tests

* Don't render the dashboard subscription button when there's no data cards (#67501)
2025-12-25 14:28:28 +00:00
Timofey Kachalov
26f6e2b590 Use actual metadata in a Notebook in Embedding SDK/Embed JS (#67453) 2025-12-25 15:39:26 +04:00
Jakub Chodorowicz
0cc6677886 fix: add filter clauses to support min max required for age binning (#67448) 2025-12-25 09:55:54 +01:00
Ngoc Khuat
f14e1f1444 Support named tables for python transforms (#66934) 2025-12-25 07:52:21 +00:00
Phoomparin Mano
09d69f2cdf docs(sdk): move llms.txt under docs/embedding (#67526) 2025-12-24 22:10:18 +00:00
Denis Berezin
75f3c9fc01 UXW-1852 Reset filter to default for specific click behavior (#67220)
* UXW-1852 Reset filter to default for specific click behavior

* Fix CI

* Fix unit tests

* Review fixes

* Add e2e test
2025-12-24 19:05:19 +03:00
Roman Abdulmanov
101fc34a37 Custom headers (#67502)
* added vars
* added tests
2025-12-24 14:21:49 +00:00
Phoomparin Mano
dd830db392 docs(sdk): add statically generated docs/llms.txt (#67506) 2025-12-24 19:30:26 +07:00
Fraser
286b89bf92 Measure all columns to provide expand option (#67429) 2025-12-24 11:00:21 +00:00
Jakub Chodorowicz
141d49a4c5 fix: respect time format in exclude date picker filter QUE-2611 (#67384)
* fix: respect time format in exlude date picker filter QUE-2611

* rework: move constant out of function body

* test: fix failing tests due to lack of redux provider

* fix: add missing redux  provider in story

* test: improve testing logic for ExcludeDatePicker

* internal: use specialized useSetting hook

* test: adjust looping with async action
2025-12-24 10:44:48 +01:00
Timofey Kachalov
462a62a092 Call overrideRequestsForGuestOrPublicEmbeds for static/public embeddings (#67358) 2025-12-24 13:39:10 +04:00
Oleksandr Solovyov
4c9fe80dc5 Add transforms.target_database_id column (#66953) 2025-12-24 10:21:30 +02:00
Fraser
23eae39c3c Apply field settings to parameter field widget (#67428) 2025-12-24 17:17:52 +13:00
Nemanja Glumac
e4eab0c668 Fix flaky pinned metrics e2e test (#67481)
The root cause of the flakiness was that the save modal sometimes picks the root collection, while at other times it picks the current user's personal collection. The selector was trying to find "Our analytics" in the breadcrumbs, which is why it was failing every time the actual collection is personal collection.

The second issue was that trying to (1) clear and then (2) type the metric name was extremely unreliable.
2025-12-23 23:49:49 +01:00
Egor Grushin
b2bac8e014 QUE-418 fix hidden column check test (#67444) 2025-12-23 22:33:58 +00:00
bryan
b149b004b0 airgap token check user creation fix (#66770)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-23 16:12:46 -06:00
Cam Saul
fdabf871f3 Disable nonworking email and URL extractions for BigQuery and 7 other broken drivers (#66982)
* Add failing test for #63822, DEV-1190

* Add new feature flag

* Update FE config

* Fix tests 🔧

* Disable for 7 more drivers

* Fix MySQL + MariaDB

* Fix TypeScript
2025-12-23 11:37:10 -08:00
github-actions[bot]
b99d3d186d Fix: very low percentages can collide with the y-axis when there are lots of decimals (#67219)
* Fix: very low percentages can collide with the y-axis when there are lots of decimals

Fixes #55853

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

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

* Add e2e test

* Review fixes

* Update Loki Snapshots

---------

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-12-23 22:26:35 +03:00
Brad Anderson
d2da731428 Fix #61219: Add ability to include personal collection items in search results for admins (#67396) 2025-12-23 13:22:40 -05:00
Aleksandr Lesnenko
687d28227a Replace table with tree table in Library and Jobs pages (#67060)
* use tree table in library and jobs

* specs

* use width=auto on datetime columns

* padding for auto measured columns
2025-12-23 13:17:16 -05:00
Nicolò Pretto
50e46d56a7 fix: use "All tenant users" group for tenant users in popover and modal (#67446)
* fix: use "All tenant users" group for tenant users in popover and modal

* clean up

* Revert "clean up"

This reverts commit d054ad7d9e.
2025-12-23 17:06:13 +00:00
Timofey Kachalov
7596158b4a Add parameters /search e2e for guest embeds (#67273) 2025-12-23 20:34:37 +04:00
Eric Normand
711a728569 Check that the number was parsed correctly (#67403)
* Check that the number was parsed correctly

* Don't parse int columns that are remapped

* oops, remove old change

* Better fix and specific test

* kick ci

* kick ci

* Make sure it still hits the bigint branch

* Move check into parseNumber()

* Move check back to value.tsx

* Single describe in tests

* Add blank lines (fe-lint)
2025-12-23 16:31:42 +00:00
Nicolò Pretto
c95d1d4883 Tenant Collections -> Shared collections in permissions page (#67452) 2025-12-23 15:58:45 +00:00
Nicolò Pretto
6635453dae hide the column to promote to group manager for tenant groups (#67451) 2025-12-23 15:32:37 +00:00
Nemanja Glumac
73a25b84ef Fix object detail flake #39477 (#67442) 2025-12-23 14:07:01 +01:00
Nemanja Glumac
4bece3e5c1 Remove the "Groups" heading from the invite popover (#67222) 2025-12-23 12:55:56 +01:00
Nicolò Pretto
e37c65d34b update tenants empty state listing copy (#67431)
* update tenants empty state listing

* Update enterprise/frontend/src/metabase-enterprise/tenants/components/TenantsListingEmptyState.tsx
2025-12-23 11:52:38 +00:00
Nemanja Glumac
04dbcf1823 Fix flake #23630 (#67367) 2025-12-23 12:44:01 +01:00
Nemanja Glumac
2c7d8835d8 Consolidate outlines in the main sidebar nav (#67283) 2025-12-23 12:43:18 +01:00
Abed Habli
0972cf4e5b Docs: Metabot inline SQL editing (#67362)
* Docs: inline SQL editing

* Optimized 1 images, saved 35.9 KB (13.6% smaller)

* typos

* Update docs/ai/metabot.md

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

* Update docs/ai/metabot.md

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

* Update docs/ai/metabot.md

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

* small edit

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-12-23 10:13:39 +01:00
Gabriel Moreno
6d00178043 UXW-2546 Fix permissions table cell background color & borders (#67331)
* fix: table cell background & border color

* feat: use css variable instead of theme templating
2025-12-23 02:05:12 +00:00
Cam Saul
8ce1d65f8c Fix adding two DIFFERENT implicit joins with the SAME generated alias (#67411)
* Fix adding two DIFFERENT implicit joins with the same generated alias

* Part 2 of #67411 fix
2025-12-23 01:54:24 +00:00
Nick Fitzpatrick
453478f9fb ellipisify table names, fix published table link (#67402) 2025-12-22 21:09:50 -04:00
Nick Fitzpatrick
c857b75646 Uxw 2511 field metadata edit and field detail panels cant be closed (#67034)
* close field panels

* undo scroll behavior changes

* little more cleanup

* use ScrollArea

* e2e and table picker adjustments
2025-12-22 20:55:00 -04:00
Romeo Van Snick
269891d61c Use collection in breadcrumbs for nested questions (#67154)
* Always show collection in header breadcrumbs for cards

* Add repro for metabase#47005

* Fix e2e tests
2025-12-23 11:52:13 +11:00
Fraser
b5083f4afa Hide Data Permissions sections that are irrelevant to oss (#67354) 2025-12-23 12:08:46 +13:00
Brad Anderson
b8117583a8 Fix #64631: Change "Report an issue" -> "Download diagnostics" (#67310)
* UXW-1988 Copy change: "Report an issue" -> "Download diagnostics"

* UXW-1988 Updates tests/documentation
2025-12-22 17:45:58 -05:00
Denis Berezin
cb398d5630 Fix for security alert 541 (#67401) 2025-12-23 00:53:02 +03:00
Nemanja Glumac
4680a440e1 Simplify content moderation e2e tests (#67375) 2025-12-22 22:43:17 +01:00
Cam Saul
1e4e2b3f7b Allow temporal args for - (#67397) 2025-12-22 21:31:05 +00:00
Aleksandr Lesnenko
f42b947b37 resolve mdast-util-to-hast to 13.2.1 (#67389) 2025-12-22 20:17:44 +00:00
github-automation-metabase
1e94db5a93 Update generated docs (master) (#67349)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-22 14:19:22 -05:00
metamben
b2a430f208 Log each entity as it gets dependency-backfilled at debug level (#67378)
Log each entity (card) as its dependencies get backfilled by the job. This is to be able to see if there is a particular entity that's causing the OOM.
2025-12-22 17:42:25 +00:00
Roman Abdulmanov
172aa84fd7 bump versions (#67385) 2025-12-22 12:16:11 -05:00
Sloan Sparger
3d5c36960d [Metabot] Natural language query entry point (#66737)
* prototype

* open chat sidebar on navigate

* update copy for new route

* use nlq profile and make sticky, redirect to empty query builder if no navigate_to is recieved

* responsiveness

* move code to enterprise folder

* imple error states, better loading state

* handle user leaving the page while a response is being loaded

* lint fix, change inline sql shortcut key, disable prompt suggestions and fade out once a prompt has been sent

* fix e2e test

* add test coverage, update copy

* fix failing e2e tests

* attempt to fix e2e flake
2025-12-22 16:59:24 +00:00
Roman Abdulmanov
7038c00b38 bump versions (#67379) 2025-12-22 11:54:04 -05:00
metamben
93e1a7a60b Export published tables when their collection is selected (#67141)
* Export published tables when their collection is selected
2025-12-22 16:48:40 +00:00
Mahatthana (Kelvin) Nomsawadi
4207ad9722 Remove my temp DB file (#67369) 2025-12-22 15:06:02 +00:00
Jeff Bruemmer
6d002819df auth snippets (#67371) 2025-12-22 10:02:10 -05:00
Anderson
52bfdad99d Don't reset map zoom when filter is active and a marker is clicked to view details (#67063)
* Don't reset map zoom when clicking marker with a filter Applied

* Simplify condition to check that we should recalculate zoom

* Fix unit test
2025-12-22 14:54:21 +00:00
Denis Berezin
f601dea72d UXW-2449 fix pasting mixed content containing cardEmbed (#66733)
* UXW-2449 fix pasting mixed content containing cardEmbed

* Fix issue with cardEmbed loading forever

* Fix issues with smartLink and caedEmbed paste to a list

* Fix typecheck
2025-12-22 17:31:08 +03:00
Denis Berezin
cf9868d509 UXW-77 fix missing bar chart labels for 12 months timeseries (#67316)
* UXW-77 fix missing bar chart labels for 12 months timeseries

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-12-22 17:29:50 +03:00
Nemanja Glumac
0ddc4ab309 Fix stress-test snapshot conditions (#67344) 2025-12-22 13:04:10 +01:00
bryan
3b6dbaee4b Remove openapi.json from repo and disable CI check (#67294)
* Remove openapi.json from repo and disable CI check

The committed openapi.json was causing friction:
- Cascade CI failures when master got out of sync
- Merge conflicts on a 36k line generated file
- Phantom local changes when switching branches

The OpenAPI generation still works - run `yarn generate-openapi` when needed.
We're just not committing the artifact for now.

* Check for Node.js 22+ before generating OpenAPI types

The previous check for `yarn` wasn't sufficient - the system may have
yarn installed with an older Node.js version. Now we explicitly check
that Node.js 22+ is available before running the generation.

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

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

* Revert client-side OpenAPI types generation

* Remove types generation from postinstall

* Restore package.json newline

* Restore prepare-backend action

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>
Co-authored-by: Stas Gavrylov <stas@metabase.com>
2025-12-22 10:54:18 +02:00
Romeo Van Snick
34996f11d3 Keep filters header visible when details view is open (#67246)
* Do not hide filters when showing object details

* Add repro for metabase#66957
2025-12-22 13:31:52 +11:00
Romeo Van Snick
9f65da5129 Add time in click behaviour for hours and minutes (#67151)
* Allow clicking dates with hour and minutes granularity to set parameter

* Add repro for metabase#58556

* Fix unit tests

* Add repro for metabase#66277

* Allow selecting date ranges with hours and minutes
2025-12-22 13:30:56 +11:00
Romeo Van Snick
5299dd726a Hide view details button in Transform viz (#64752)
* Hide 'View details' button on transform results

* Add repro for metabase#64473

* Fix test

* Use queryBuilderMode rather than adding another prop
2025-12-22 10:28:33 +11:00
Cam Saul
0004f3efc6 Allow arbitrary expressions inside :is-null and :not-null in MBQL 4 schema (#67326)
* Support arbitrary expressions inside `:is-null` and `:not-null`

* Remove unnecessary blank line in schema_test.cljc
2025-12-21 14:30:47 -08:00
Oleksandr Yakushev
a848299a7a Get rid of peridot dependency by embedding necessary functions (#66921) 2025-12-21 22:52:06 +02:00
Cam Saul
7057724abf Allow :aggregation refs inside (aggregation) expressions in MBQL 4 schema (#67311)
* Allow :aggregation refs inside expressions in MBQL 4 schema

* Test + Kondo fix
2025-12-21 20:04:44 +00:00
Noah Moss
337885f0b8 Metabot NLQ collection picker (#67051)
* accept optional profile-id in search tool request and use it to determine collection filtering

* cleanup

* try to fix tests

* fix build

* kondo

* fix toucan syntax

* address comment

* oops, fix build

* remove some more use_case code on the FE that slipped through the revert via messy rebase
2025-12-19 19:14:34 -05:00
Egor Grushin
6d33574064 GDGT-1411 Transform UX updates (#66969)
UX updates that makes transform saving form more clear.
2025-12-19 23:10:56 +00:00
Nathan Voxland
953f266b24 Added spec for library API response (#66623) 2025-12-19 16:53:33 -06:00
Ryan Laurie
808c283577 fix isExternalUser check (#67303) 2025-12-19 22:28:27 +00:00
Cam Saul
0fe28f8d4e MBQL 4 => MBQL 5 conversion should ignore invalid expressions (#67305) 2025-12-19 14:27:59 -08:00
Jeff Bruemmer
426acdbc85 docs - update embedding docs (#66784)
* move appearance

* links

* sample app links

* heading

* update code to copy

* embedding updates

* remove generated file

* fixes

* redirect

* typos

* image

* various clean up

* appearance

* components

* pick an item

* guest embeds and components

* translations

* auth

* sample app

* Apply suggestion from @jeff-bruemmer

* theme json

* links
2025-12-19 17:24:20 -05:00
Gabriel Moreno
c13f91f922 UXW-2333 Add revision history to transforms and documents (#66989)
* feat: implement document revision history

* feat: implement transform revision history

* refactor: fully embrace RTK query

* test: add e2e runthrough for document revisions

* test: add e2e runthrough for transform revisions

* feat: add error boundary for transform revision sidebar

* feat: add loading indicators

* fix: avoid layout shift on documents revision history sidebar

* test: wait for sidebar to open on transform revision history tests

* feat: add missing revision diff string cases

* feat: generate openapi

* fix: code compilation by breaking method in two
2025-12-19 17:43:41 -04:00
Noah Moss
1c415eae09 Refactor metabot error handling (#67290)
* metabot check-response! function for ai service error handling

* Add test, tweak logic
2025-12-19 15:41:26 -05:00
Aleksandr Lesnenko
3e91364955 python library (#67173) 2025-12-19 15:31:31 -05:00
Riley Thompson
a77b0ee1da Set network timeout in connection options (#66861)
* set network timeout in connection options

* add test

* kondo

* fix test

* Add try catch

* use network timeout setting

* use exception chain util

* use cached thread pool, and timeout to call connection.close

* just do setnetworktimeout

* address comments
2025-12-19 20:28:53 +00:00
github-actions[bot]
276d6532d8 Fix: Cannot add filters on boolean MySQL columns when the data source is a model (#67123)
* Fix: Cannot add filters on boolean MySQL columns when the data source is a model

Fixes #65826

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

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

* Introduce multimethod

* Improve docstring

* Add db-type-name to changelog

* Make tests work

* improve changelog entry

---------

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Eric Normand <ericwnormand@gmail.com>
2025-12-19 13:59:39 -06:00
Nathan Voxland
a7425eff43 Fix trend lines when aggregating by datetime (#65873) 2025-12-19 13:47:31 -06:00
Brad Anderson
9e53b9b9aa UXW-115 Disables "Export as PDF" button in dashboard share menu if cards are still loading (#67168) 2025-12-19 14:30:46 -05:00
github-actions[bot]
1c5150508b Fix: Redshift external tables have unknown types for string/enum columns on sync (#67028)
* Fix: Redshift external tables have unknown types for string/enum columns on sync

Fixes #63025

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

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

* Add more Iceberg types to Redshift external table types

---------

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Eric Normand <ericwnormand@gmail.com>
2025-12-19 17:54:53 +00:00
John Swanson
c6efa84b64 automatic search index versions (#66898)
- when a spec is registered, store the raw form in an atom. This is so
things like `search.spec/explode-raw-case` can be stored as raw symbols
rather than functions. (Do note that this is technically a bug in a rare
edge case, where the definition of `search.spec/explode-raw-case`
changes and the search index should technically be invalidated - but I
think this is rare and low-impact enough that we can just not care.)

- when we access the current search index version, canonicalize the
stored specs, plus default attributes and attribute types, and sha256
hash the result
2025-12-19 09:08:00 -08:00
Noah Moss
157e484d91 Fix race condition in metabase.util.queue-test/multithreaded-listener-test (#67225) 2025-12-19 11:22:39 -05:00
appleby
de21452107 Use snake_case for MetabotCodeEdit and MetabotCodeEditorBufferContext fields (#67231)
For consistency with other types shared between metabase and ai-service.
2025-12-19 08:04:27 -08:00
bryan
6c8e8aac1d installing merge drivers works with git worktrees (#67199) 2025-12-19 16:03:45 +00:00
Timofey Kachalov
674a804d4c Cleanup docker build caches when building sample apps on CI (#67268) 2025-12-19 19:56:01 +04:00
Nicolò Pretto
232fc1d3ef update collection name in tests to use the new one from the BE (#67280) 2025-12-19 16:16:09 +01:00
John Swanson
d5c3f459ba UXW-2576 show tenant collections in the trash (#67124)
* UXW-2576 show tenant collections in the trash

I also deleted the `audit-namespace-clause` function. It felt like it
didn't do enough to justify its existence - every caller needed to
modify the list of namespaces. Could probably DRY things up a bit still,
but think we should change the approach.

* Check `use-tenants` before returning tenant colls

* s/audit-namespace-clause/namespace-clause helper

`namespace-clause` takes the ns column, ns value, and an optional
argument for whether *this* particular result should include the tenant
collections in the response (since sometimes we want 'em, sometimes we
don't.)

* kondo
2025-12-19 06:58:07 -08:00
Mahatthana (Kelvin) Nomsawadi
e44789763f Fix invalid snowplow schema (#67250)
* Pass the schema validation

* update schema

* Update tests
2025-12-19 14:51:48 +00:00
John Swanson
68fb061106 UXW-2578 - Prevent renaming of tenant collection (#67086)
* Prevent updating tenant specific root collections

* Localize the name of dedicated tenant collections

* rename dedicated tenant collections 'Our Data'

When displayed on the FE for an admin, they can be renamed to something
like "Foobar's tenant collection"

* Internal users see different names

* prevent tenant users to edit their dedicated tenant collection

* Revert "prevent tenant users to edit their dedicated tenant collection"

This reverts commit 08d2d722be.

* Rename `Our Data` to `Our data`

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

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-12-19 06:48:44 -08:00
Nicolò Pretto
ee37ce0408 test(tenants): add e2e for what tenant users should see in core app (#67272) 2025-12-19 15:48:02 +01:00
Nicola Mometto
ff6fffded9 disable chunked encoding if using path style access (#67262) 2025-12-19 13:39:22 +00:00
Phoomparin Mano
0df342cd45 Make "All internal users" sentence-cased in permission editor (#67258) 2025-12-19 20:19:10 +07:00
Nicolò Pretto
adcd80bbd0 My Tenant Collection -> Our data in hooks.ts (#67257) 2025-12-19 14:15:10 +01:00
Phoomparin Mano
a01df0e090 Show embedding picker when logged in as a tenant user (#67189) 2025-12-19 19:42:24 +07:00
Sébastien
b2a256c792 SDK loaderComponent now applies to all loaders (#66646)
* SDK loaderComponent now applies to all loaders

* removed getLoaderComponent, render the loader comp as a react comp, pass it an optional label
2025-12-19 13:28:26 +01:00
Stas Gavrylov
3f79bc36e5 Update OpenAPI spec (#67256) 2025-12-19 11:14:17 +01:00
Phoomparin Mano
7068bbe559 Design changes for tenants onboarding flow in embedding setup guide (#67125) 2025-12-19 16:53:33 +07:00
Phoomparin Mano
2dd017d522 Validation for internal group's tenant collection permission should reference all internal users (#67177) 2025-12-19 16:51:14 +07:00
Mahatthana (Kelvin) Nomsawadi
68c0efa9cd Allow customizing filters values for subscriptions on modular embedding (#67249)
* Allow customizing filter values for subscriptions on modular embedding

* Add tests
2025-12-19 09:50:28 +00:00
Nicolò Pretto
88c9b0bf37 prevent tenant users to edit their dedicated tenant collection name (#67180) 2025-12-19 09:24:25 +00:00
Nemanja Glumac
62a8a7b32e Fix opening an info sidebar when native _variables_ sidebar was already opened (#67165) 2025-12-19 10:04:01 +01:00
Sébastien
ae13d817bf Only import the needed plugins in unit tests (#66751)
* Demo of only importing the relevant plugin in unit test

* Optimize enterprise plugin unit tests with targeted setupEnterpriseOnlyPlugin calls

* fixed tests

* fixup

* .

* fixed test

* removed hasEnterprisePlugin

* fixup

* removed remaining hasEnterprisePlugins and unnecessary setupEnterprise fn

* specificPlugins -> enterprisePlugins

* .

* fixed type

* docs
2025-12-19 07:51:47 +01:00
Romeo Van Snick
0719750252 Add effective type to expression when resolving from ref (#67064)
* Add effective type to expression when resolving from ref

* Add repro for QUE-2567

* Fallback to base type when checking effective types

* Avoid shadowing var

* Add tests for effective-type fallback
2025-12-19 16:12:12 +11:00
Romeo Van Snick
1c4435c17e Python test runs on the BE test runner (#64695)
* Always show debugger

* Move test hook to hooks file

* Update python transform endpoint

* Fix useTestPythonTransform hook

* Update UI for transform editor results

* Add e2e test for python runner

* Fix types

* Add missing config key

* Add python tag to test

* Fix copy output -> logs

* Remove unused helper

* Move isPythonTransformSource to top-level utils

* Remove double padding
2025-12-19 16:11:56 +11:00
Cam Saul
c78ccaaaa0 Several MBQL 4 normalization fixes 🔧 (#67203)
* Fix normalization of MBQL 4 `:aggregation-options` with a `nil` options map

* Update tests

* Fix normalization of Template Tag :options

* Allow raw values as expression definitions

* Automatically remove :ident from joins

* Properly handle aggregations expressions that contain `:if` (alias for `:case`)

* Allow `:coalesce`, `:if`, and `:case` as datetime exprs in MBQL 4

* Test & Kondo fixes 🔧
2025-12-18 15:51:57 -08:00
Aleksandr Lesnenko
373cf5db58 edit & archive transforms collections (#67170)
* archive transforms collections

* edit transforms collections

* better types, placement

* fix
2025-12-18 23:22:04 +00:00
Nemanja Glumac
2d523dc16b Convert the "View SQL" to an icon only (#67159) 2025-12-18 23:05:15 +00:00
Riley Thompson
cde52a68ec Fix bigquery timestamp and timezone casting in aggregation (#67089)
* working fix

* clean up

* clean up test

* kondo

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

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

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

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

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-12-18 22:42:54 +00:00
Sloan Sparger
f9b914af2b [Metabot] Inline SQL entry point (#66688) 2025-12-18 16:08:10 -06:00
Edward Paget
f4d51537fa feat: add branch picker to data studio (#66970)
* feat: add branch picker to data studio

* fixup! address PR feedback

* fixup! PR feedback about sync visibility
2025-12-18 21:48:56 +00:00
Dennis Schridde
283ecedf6d Fix grammar of billing period for Metabase AI (#67191)
Fixes: 2b76c38e1f
Closes: https://github.com/metabase/metabase/pull/67053#issuecomment-3671353062
2025-12-18 20:54:27 +00:00
Dennis Schridde
cabfed364e Fix check-openapi-specs (#67200)
OpenAPI specs were out-of-date, preventing this check to succeed on PRs
that did not change the API.

References: https://github.com/metabase/metabase/actions/runs/20347428135/job/58463226792?pr=67191#step:6:56
2025-12-18 20:53:50 +00:00
Noah Moss
0a53e9f918 Revert "Metabot use case configuration groundwork (#66673)" (#67106)
This reverts commit dce776c8cc.
2025-12-18 21:43:47 +01:00
Jeff Bruemmer
77da2dcc93 chill on the backticks (#67210) 2025-12-18 20:42:47 +00:00
Eric Normand
4346b7d7c3 Add mbql time schema test (#67182)
* Add test

* Move test to temporal-test

* Openapi json

* Add second time string
2025-12-18 20:03:27 +00:00
Jeff Bruemmer
185957ac8c Remove models and metrics section from settings (#67174)
Removed section on adding models and metrics to Metabot collection.
2025-12-18 13:53:55 -05:00
Eric Normand
d7425d04f8 Don't do implicit joins through sensitive FKs (#67056)
* WIP

* Working test! (it reproduces)

* Fhew! I found it!

* Remove printlns

* Also remove sensitive fks in calculation

* Remove stray marker comment

* Move tests to fields-test

* Exclude :retired too

* Move tests and add one for retired

* Add another retired

* Better tests

* Appease the kondo

* Fix broken test
2025-12-18 12:28:38 -06:00
Nicolò Pretto
a4f94cd784 don't show synced collections icon for tenant users (#67161)
* feat(tenants): tenant users should not see the synced folder icon

* empty commit to retrigger ci
2025-12-18 17:46:49 +00:00
Dennis Schridde
935494dfdb Change Metabase AI price to be based on quantity for whole billing period (#67053)
### Description

We want to communicate per-billing-period quantities with customer, instead of always communicate monthly quantities.  Invoiced totals will stay the same.

### How to verify

Describe the steps to verify that the changes are working as expected.

1. Ensure you have a token with the `offer-metabase-ai-tiered` feature, but without the `metabot-v3` feature.
2. Navigate to `/admin/metabot` and see the quantities as per billing period, and not per month.

### Checklist

- [x] Tests have been added/updated to cover changes in this PR

Fixes: 2b76c38e1f
Closes: https://metaboat.slack.com/archives/C07RMUQ0GE5/p1765907134400039
2025-12-18 18:30:45 +01:00
Mahatthana (Kelvin) Nomsawadi
ebb85d6b27 Modular embedding subscription analytics (#66932)
* Update default value locations in comments

* Update snowplow schema for modular embedding analytics

* Add more type safety

* fix 'dashboard.drills' and 'question.drills' default values for guest embeds

* Fix auth type

* Test guest embed authentication

* Log `with-subscriptions`

* Strengthen the type
2025-12-18 17:08:01 +00:00
Riley Thompson
788d7c91e2 fix p1 label, add p0 label, escape title (#67171) 2025-12-18 12:03:42 -05:00
Sloan Sparger
7615ef0b9b [Metabot] Multi-convo support (#66864) 2025-12-18 11:02:34 -06:00
Nathan Voxland
0c01ed9259 Don't allow attachments if the creator doesn't have permission to download (#66827)
* Don't allow attachments if the creator doesn't have permission to download

* Fixed failing test

* Fixed failing test

* Fixed frontend issues

* Fixed frontend issues

* Updated BE code

* Fix unit tests

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2025-12-18 08:44:55 -08:00
Ryan Laurie
1ad2a572ac fix dashboard question picker collection icons (#67139) 2025-12-18 09:38:02 -07:00
Edward Paget
43217e9350 feat: collection selector for remote-sync (#66977)
* fix: dirty state tracking of bulk set collections

* feat: collection selector for remote-sync

* Update enterprise/frontend/src/metabase-enterprise/remote_sync/components/CollectionSyncList/CollectionSyncList.tsx

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

* fixup! remove extraneous errormsg property

---------

Co-authored-by: Anderson <ands.alves.nunes@gmail.com>
2025-12-18 15:53:48 +00:00
Sébastien
6f710a3b4f Fix props wrongly marked as interactive-only (#67008)
* fix props wrongly marked as interactive-only

* also remove interactive from withDownloads
2025-12-18 16:45:09 +01:00
Nicolò Pretto
76bf2624eb flatten collection list for tenant users (#67072)
* Hide external collections sidebar for internal users without tenant collection accesses (#67033)

* show the add button if user can write to root

* update unit tests for shared collections nav

* simplify test mocks

* getIsTenantUser selector

* flatten navbar for tenant users

* move up state and use plugin, keep "Collections" name when the external
collection section is not shown

* polish

* throw new error

* fix unit test

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-12-18 15:29:47 +00:00
Jakub Chodorowicz
30616565b4 OpenAPI -> TypeScript schema generation (#65144)
* add openapi-typescript schema generation

* chore: add live type generation

* Temp fix for self ref schema

* nemanja wants avaible locales schema

* generate openapi.json file on dev or when updating the apis

* now it e2e. you update an api schema => generate openapi.json => hook to update d.ts

* add hey api

* update user profiles

* proper types now

* fix: remove leftover folders and adjust imports

* chore: Claude guide to generate MALI schemas

* feature: add schema for users API

* wip add user type to profile

* remove the ref of the old lib. all hey-api now

* WIP

* Update FE unit mock

* fetch openapi.json from file system instead of the api

* Add in-browser overlay with errors

* disable error overlay

* feat: script to generate openapi spec

* experiments

* do not clean cwd

* Enable pretty-printing for OpenAPI json

* Add OpenAPI spec keys sorting

* Move generated openapi.json to resources/openapi

* Commit generated typings with sorted keys. Add types.get.ts to eslintignore because it has incorrectly linted typing

* wip

* Fix nullable types

* test fixes

* revert hack for self ref schemas as the new lib cna generate it

* Move TS generated types to gitignore. Cleanup.

* revert uncessary schema changes and also fix indentation

* Add types generation to TS CI job

* Update CI to generate and cache TS types

* Fix CI types generation

* Cleanup FE

* reorganized the modules and remove the requiring-resolve

* Fix unit test

* fix: wrong function call to regenerate api spec

* chore: upgrade hey-api (fixes self referencing hey_api type)

* feat: disable type generation for MetabaseLegacyMbqlSchema

* chore: regenerate openapi definition

* chore: regenerate  openapi.json

* feat: add generate-openapi-spec command

* build: use generate-openapi-spec in yarn scripts

* build: add script that verifies the that openapi spec is uptodate

* build: add CI check for openapi schema being uptodate

* build: fix wrong filename of api check script

* internal: use yarn script for schema generation

* internal: generate version in the api schema generation step

* internal: install node 22 in the api generation job

* internal: fix hey api running twice on build hot

* internal: debounce ts api types generation

* bring back debounce logic

* revert changes in users schema

* internal: add malli docs instructions in skills format

* internal: add details to defendpoint+malli skill

* Fix incorrect types:watch initialization in build-hot script

* Remove version field from generated OpenAPI JSON to allow proper versions comparison on CI

* Update OpenAPI JSON schema

* a nice solution for the dynamic timezone enum

* update openapi json

* test fixes

* update openapi json with latest apis

* resolve tips when this happens again

* fix kondo test and revert the locale type in properties api

* update spec to remove locales

* Revert enum usage on UI

* build: types as part of postinstall

* types: replace hardcoded log type values

* build: format types with prettier - compatible with embedding type transforms

* Update OpenAPI schema

* Update OpenAPI schema

* Revert types cache generation

* Address PR comments

* Reset spec format

* Reset spec again

* Merge master and update OpenAPI spec

* Update package.json

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>

* feedback

* resolve comments

* Update OpenAPI spec

* Update OpenAPI spec

* Update OpenAPI spec

* Update OpenAPI spec

* follow derive conventions

* Remove deprecated rspack type check deps

* Add eslint rule to restrict imports from metabase-types/openapi

* Update OpenAPI schema

---------

Co-authored-by: Nicolo-Maria <nicolo.mezzopera@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Nemanja <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
Co-authored-by: Oleksandr Solovyov <o@solovyov.net>
Co-authored-by: Stas Gavrylov <stas@metabase.com>
Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2025-12-18 17:13:32 +02:00
Edward Paget
b2ec3abf62 fix: savingModel prop only "collection" matters (#66906)
The savingModel prop allow "collections" to be written to the
shared-tenant-collection namespace root while other model types are disallowed.

Fixes how this prop is calculated because the original implementation
left off other types of cards. This prop is now just "collection" | null
since collection is the only model type that matters here.
2025-12-18 09:13:27 -06:00
Timofey Kachalov
f6cf387c02 Fix Question parameters remapping, add more e2e (#66878) 2025-12-18 18:56:02 +04:00
Benoit Vinay
4adf66e56c Improvements to pro-self-hosted to cloud migration flow (#66806)
* Change url from checkout to login

* Use store login url when pro-self-hosted plan

* Unit test WIP

* source_plan query param added

* Cleanups

* Move useGetStoreUrl to hooks file

* Unit tests added

* Misc

* Misc

* Remove hooks

* Removed login path page

* Param renamed to `migration-source-plan`

* Unit tests updated
2025-12-18 14:58:01 +01:00
Mahatthana (Kelvin) Nomsawadi
e60c7f127d Update master after 58 beta. We won't need this next beta. (#67000) 2025-12-18 12:34:49 +00:00
Nemanja Glumac
03764dcb92 Stop preserving the sql/native preview panel open/closed state (#67138)
This pull request removes the user setting that persisted the open/closed state of the native query preview sidebar in the notebook editor. The sidebar's visibility is now managed entirely in the UI state (not persisted per user), simplifying the logic for showing or hiding the sidebar and cleaning up related code and tests.

1. opening a notebook editor will *always* start from a closed native preview sidebar
2. state is now managed exclusively by Redux (sidebar state might be preserved until the page reload, but it is not persisted on the backend)
3. We're changing a previous behavior where, if a native preview sidebar was open and we're resizing the window to something small, the sidebar was automatically closed. This PR changes that behavior. i.e. There is no special resize handling anymore. Whatever the (Redux) state of the sidebar is, it will stay like that no matter the window size.
2025-12-18 12:09:01 +00:00
bryan
4b01fe116a Fix sample app e2e tests silently failing when containers don't start (#67127)
The catch block in startContainers was swallowing errors - it would
log and tear down containers but never re-throw. This meant when
health checks failed, the script would print "All done!" and exit 0,
then Cypress would run and fail with a confusing "could not verify
server is running" error.

Now we re-throw after cleanup so the actual failure is surfaced.
2025-12-18 12:01:29 +01:00
Sébastien
e31368df3e Fixes a flaky e2e test for guest embedding (#66954)
* .

* .

* .

* .

* .

* trying without one timeout

* trying without another timeout

* trying without another other timeout

* trying without yet another timeout

* .
2025-12-18 11:33:32 +01:00
Nicolò Pretto
1aa2160ad6 docs(tenants): update "tenant" to "@tenant" (#67069) 2025-12-18 09:32:28 +01:00
Aleksandr Lesnenko
2185185701 Transforms collection tree (#66893)
Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-12-18 05:26:37 +00:00
Romeo Van Snick
2a6741df9c Do not pick unsupported databases automatically in transforms (#64406)
* Do not allow picking unsupported databases in Python data picker

* Do not auto-select disabled items

* Add e2e test for empty data selector

* Simplify ugly if condition

* Fix e2e test

* Do not open datapicker wen going to next step
2025-12-18 15:09:24 +11:00
github-actions[bot]
6f83c4e8a1 Update E2E test timings with averaged data (#66916) 2025-12-18 12:54:12 +13:00
Denis Berezin
32eb9a53ce UXW-2444 support opening Document cards in a new tab (#67057)
* UXW-2444 support opening Document cards in a new tab

* Add e2e tests
2025-12-18 01:13:25 +03:00
John Swanson
1c8d56b2cd UXW-186: Mark Mongo connection URI as a "password" (#65178)
Since it contains a password, it should be treated as one. This way it
will be redacted in the UI and API.
2025-12-17 13:54:33 -08:00
Nick Fitzpatrick
ab0418fd09 Scalar - column might be undefined (#67099) 2025-12-17 17:22:17 -04:00
Nemanja Glumac
4d85779e0f Fix github.ref_name references in backend workflows (#66257)
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-12-17 21:11:26 +00:00
Nick Fitzpatrick
4ba6b26bae Uxw 2512 standardize background headings and margins on all pages (#66908)
* broad strokes

* clean up snippets and metrics pages

* tons of PR feedback

* Hi Dan

* test adjustments

* more adjustments

* fix card issue

* removing text on runs list page

* fixing glossary tests

* PR Feedback

* remove header prop

* page spacing adjustmnets

* Center Viz Empty State, fix python library page

* fix python transform page

* scrolling behavior on Job and Transform list pages

* last bits of shame
2025-12-17 20:42:54 +00:00
Edward Paget
d8f84e991e feat: add dev tool to explain analyze queries (#67059) 2025-12-17 14:10:42 -06:00
Phoomparin Mano
650c2c232d Use sentence case for people tab pages in admin settings (#67048) 2025-12-17 19:53:09 +00:00
Case Nelson
0747444277 fix: druid breakout and agg names must be unique (#59483)
* fix: druid breakout and agg names must be unique

Fixes #10670

* Fix CI

* cljfmt

* format

* format rows

* make it work with druid jdbc

* address comments

* use seq over some?

---------

Co-authored-by: Riley Thompson <riley@metabase.com>
Co-authored-by: Riley Thompson <rileythompson99@gmail.com>
2025-12-17 19:48:03 +00:00
Riley Thompson
e6575a5086 Use mongo field filter alias if available (#67025)
* use mongo field alias if available

* Address comments
2025-12-17 19:45:26 +00:00
Phoomparin Mano
c7029242e9 Move the attribute widget description under the accordion header (#67019) 2025-12-17 19:04:06 +00:00
Phoomparin Mano
29a82f017e Hide authority level picker in new shared collection modal (#67041) 2025-12-18 01:28:08 +07:00
Nemanja Glumac
474e198b9b Reduce the "Attributes" font size in a user form (#67096) 2025-12-17 19:25:43 +01:00
Phoomparin Mano
c5117a19b2 feat(sdk): resolve tenant collection in collection browser (#67050) 2025-12-18 01:23:19 +07:00
Edward Paget
d2212003ef fix: improve search performance with tables (#67055) 2025-12-17 12:04:01 -06:00
Timofey Kachalov
49e37e2e9c Wait for recent dashboards being loaded before we load a resource in Embed JS wizard (#67013) 2025-12-17 21:46:42 +04:00
bryan
c6d105ebd9 fixes yaml-merge-driver migrations during rebase (#66904) 2025-12-17 10:18:06 -07:00
Brad Anderson
7640c6ff02 Improves type-checking with color function, removes unnecessary .includes() calls. Adds maybeColor for the few places where it'd be needed. (#67030) 2025-12-17 11:30:40 -05:00
Brad Anderson
ecf50a755b UXW-2451 Fix opposite light/dark mode colors leaking when table is present (#67017)
* WIP UXW-2451 Fixes issue where changing light/dark mode messes up color variables by removing nested providers in useBodyCellMeasure which probably breaks other things

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-12-17 11:29:53 -05:00
Braden Shepherdson
7d84882a3a [o11y] Log + metrics for lib.convert/clean making material changes (#67094)
This generally indicates an MBQL 4 -> 5 conversion issue, and we need
the signal in the 57 rollout.

Also improves the detail of the logging for when `:dataset_query {}`.
2025-12-17 11:14:22 -05:00
Edward Paget
9a96a65abf fix: dirty state tracking of bulk set collections (#67020) 2025-12-17 09:04:47 -06:00
Alex Yarosh
92f7d79f1a docs - australia (#67039)
* Add Australia (Sydney) to available regions

Added Australia (Sydney) to the list of regions.

* Add Asia Pacific (Sydney) IP addresses to whitelist

Added IP addresses for the Asia Pacific (Sydney) region.

* Reorder South America IP addresses section

* Update cloud region list in change-region.md

Removed duplicate entry for Australia (Sydney) and updated Asia Pacific region.
2025-12-17 10:02:47 -05:00
Nicolò Pretto
55fb97170c refactor: create CollectionListView component that is used both by UserCollectionList and TenantCollectionList (#66937)
* refactor: create CollectionListView component that is used both by
UserCollectionList and TenantCollectionList

* address  PR feedback

* use IconName
2025-12-17 15:14:48 +01:00
Timofey Kachalov
b87cab77ed Fix embedding types casing (#67071) 2025-12-17 17:15:12 +04:00
Timofey Kachalov
43ece9bc5d Adjust text of Static Embedding Alert (#67037) 2025-12-17 13:39:52 +04:00
Edward Paget
9fa1bdfc2f fix: card serdes/descendants misses metrics (#67029) 2025-12-16 20:52:26 -06:00
Fraser
fdf1b06786 Use named exports for entities (#66997) 2025-12-17 02:26:38 +00:00
Brad Anderson
cc29923e52 UXW-2481 Add a button in the Library to publish a table (#66947) 2025-12-16 17:30:10 -05:00
Noah Moss
740d3cac62 add a precondition to segment dependency migration in case it was already run on 57 (#67052) 2025-12-16 17:23:32 -05:00
Gabriel Moreno
a54f99d8b0 UXW-2335 De-emphasis + organize models from the data reference side bar (#66531)
* feat: implement tree-based model browsing grouped by collection

* refactor: better extract grouping logic & rename tree node component

* feat: implement new tree structure for schemas navigator

* refactor: unify `DatabaseTablesPane` and `DatabaseSchemasPane`

* fix: reproductions e2e test

* fix: native e2e tests

* feat: update database icon

* refactor: extract render functions into small separate components

* refactor: grouping functions & fix import

* refactor: remove loaders & bring in RTK queries

* test: extend database pane test suites

test: extend database pane test suites

* fix: identifier extraction

* fix: database name

* fix: tests

* feat: update schema icons, see which tests break

* fix: update potential broken tests to search for correct schema icon

* test: add an additional wait on (seemingly) flaky test
2025-12-16 16:15:43 -04:00
bryan
e273cd3135 update test to match exact string (#67043) 2025-12-16 20:03:15 +00:00
Denis Berezin
e016d21ede UXW-2562 Fix document printing (#66972) 2025-12-16 22:58:24 +03:00
Denis Berezin
5f62734470 UXW-2425 Add event timeline label (#66976)
* UXW-2425 Add event timeline label

* fix: typecheck
2025-12-16 22:57:32 +03:00
Nathan Voxland
d564461410 Manage Table Metadata permission is enough to sync table schema (#65866) 2025-12-16 13:52:25 -06:00
github-automation-metabase
6fcd8c914b Update generated docs (master) (#66992)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-16 14:17:12 -05:00
Cam Saul
90d4c2a753 Fix bad normalization for the :text function in MBQL 4 (#67031) 2025-12-16 19:05:10 +00:00
Nick Fitzpatrick
61146a7e98 Data Model UX (#66847)
* Filter Popover close on click outside

* scroll on mount for field and preview panels, tests

* ci bandaid

* UXW-2510 Fix background color mismatch in table metadata panels

* PR Feedback

* shameful fix

---------

Co-authored-by: Brad Anderson <brad@metabase.com>
2025-12-16 12:02:33 -04:00
Nemanja Glumac
771d131f61 Update version-helpers for v58 (#67010) 2025-12-16 16:56:27 +01:00
John Swanson
11c56c57fe Fix check for card changes (#64374)
* Fix check for card changes

The query coming from the FE looks like:

```
{:aggregation [["count"]],
 :breakout [["field"
             42
             {:base-type "type/DateTime",
             :temporal-unit "month"}]],
 :source-table 7}
```

(note strings like `"count"` and `"month"` and, most importantly, `"type/DateTime"`.)

The card from the DB looked like:

```
{:aggregation [[:count]],
 :breakout [[:field
             42
             {:base-type :type/DateTime,
              :temporal-unit :month}]],
 :source-table 7}
```

When we compare the query to the old version to see if it's changed (and
thus, we should invalidate the verified status) we walk it first,
converting all keywords to strings:

```
  (let [prepare              (fn prepare [card] (walk/prewalk (fn [x] (if (keyword? x)
                                                                        (name x)
                                                                        x))
```

... but this is not the correct way to do this conversion, because
`:type/DateTime` becomes `"DateTime"`. We need to include the namespace
if it's present.

* Compare normalized queries

* Modify `changed?` to only compare updated keys

In the end we're doing a `t2/update!` with the updates passed in. If a
key isn't in the updates, it's not going to be updated.

Simplify `changed?` to just take two arguments, `before` and `after`,
and compare the keys in `after` (after doing the necessary
normalization).

If a key is in `after` but *not* before we can't compare it and should
throw an exception. For example, if we passed a card like
`(t2/select-one [:model/Card :id :name])`, we should throw.

* More sane way to check if a card has changed

Instead of ad-hoc updating keys, use the toucan transforms to just
canonicalize all the values before we compare.

* kondo
2025-12-16 15:55:41 +00:00
github-actions[bot]
28460b6d6c Update translations 2025-12-16 (#67009)
* Update translation sources 2025-12-16

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-12-16 15:03:07 +00:00
Timofey Kachalov
65316d089d Output container logs for Sample App CI (#67003) 2025-12-16 18:08:34 +04:00
Brad Anderson
b34216286f UXW-2368 Fixes Alert's warning background color (#66964) 2025-12-16 09:05:39 -05:00
Nick Fitzpatrick
ac5496288e update logic to only show empty library when a searching (#66866) 2025-12-16 10:00:20 -04:00
Timofey Kachalov
4bdc380aef Update jsonwebtoken dependency (#67006) 2025-12-16 17:35:42 +04:00
John Swanson
e6f7260321 Add cluster lock around data permissions updates (#66960)
We currently have the "revision number", but:

- the intent there is slightly different; we want to prohibit one user
from making changes to the permissions graph before they *see* changes
another user might have made concurrently, not just sequence the
concurrent changes, and

- we allow API users to pass the `force` parameter to skip the revision
check entirely

Note that the reason we have `force` available is to allow people to
change permissions without first making a request to *GET* the
permissions graph (which can in some cases be extremely large). It is
not intended to allow concurrent updates to permissions.
2025-12-16 05:02:08 -08:00
Nemanja Glumac
5d8fa4ad64 Run only the default snapshot for pre-release (#67007)
https://github.com/metabase/metabase/actions/runs/20267445215/job/58194458921 failed because snapshots were running for QA databases, and we don't have those Docker containers up for this job.

Since we don't need them, I have adjusted the snapshot step to only run the default snapshots. There's a comment what to do if we change our mind and want to run external database checks in the future.
2025-12-16 13:30:44 +01:00
Timofey Kachalov
2716118f1b Update Embedding-related dependencies (#67001) 2025-12-16 15:38:07 +04:00
Nemanja Glumac
13b47d4452 Install clojure for pre-release (#66988) 2025-12-16 02:36:35 +00:00
Ryan Laurie
b83f897a89 prettier is not a dev dependency (#66949) 2025-12-16 00:23:29 +00:00
Timothy S. Dean
1aaee4e32c Don't offer drill-throughs when top-level column doesn't exist (#66907)
The summary: we are offering drill-throughs on custom columns defined after aggregation, but those custom columns don't exist in the base query. The error presented in such a way that `lib.underlying/top-level-column` for a dimension was returning `nil`, and we were happily putting that `nil` into the query we constructed.

I created a utility to filter dimensions by whether or not the top-level-column can be resolved, and used this for the underlying-records drill-through (from the original issue) as well as the pivot drill-through (which behaved similarly). If no dimensions have a top-level column, the drill-through is not available. If some do, we offer the partial drill-through.
2025-12-15 16:24:26 -07:00
bryan
aa9b07e600 Fix mage doctor to work without mise and add tests (#66896) 2025-12-15 16:17:54 -07:00
Eric Normand
79106a218c Skip fields with inactive table. (#66967)
* Skip fields with inactive table.

* Remove redundant let

* Better fix.
2025-12-15 17:08:53 -06:00
Timothy S. Dean
bd89348a11 metadata.cljs: always prefer lib/source over source (#66858)
`source` is a legacy key on the frontend that gets translated to `lib/source`. Some maps are using both `source` and `lib/source`, and the translation layer translates keys and values in completely separate steps. When the time comes to translate the legacy value of `source` into a valid value for `lib/source`, the code can't tell what the key was originally named. So already-valid values were going through the translation process, producing invalid values (e.g., `:source/source/aggregations`).

This adds a step to object parsing to detect that both keys are present; when they are, it sets an option to simply skip `source` during the parsing; secondly, it adds a step in the value parsing to check whether the value is already a keyword namespaced by `source/`.
2025-12-15 15:32:44 -07:00
Ryan Laurie
35a7e08bfe remove orphan package.json (#66974) 2025-12-15 15:14:02 -07:00
John Swanson
37b9e0eb8a Include email in forgot password links (#64724)
Theoretically the BE could provide the email if you send in an expired
token, but it seems slightly less controversial to just provide a link
like `/auth/reset_password/the-very-long-token?email=some%40email.com`.

This way having the expired token itself can't reveal any information,
but if you click on an expired link, then it's just 2 clicks to send
yourself a fresh token instead of click -> type email -> click.

Fixes [UXW-658: New user invites expire quickly, adds friction to new user experience](https://linear.app/metabase/issue/UXW-658/new-user-invites-expire-quickly-adds-friction-to-new-user-experience)
2025-12-15 21:56:09 +00:00
Cam Saul
26e5de8e0f Normalize invalid :widget-types correctly (#66965) 2025-12-15 13:38:00 -08:00
Riley Thompson
7ee2668a24 Fix mongo native preview of queries with variables (#66959)
* decode strings before formatting

* require lib.metadata
2025-12-15 16:24:11 -05:00
Denis Berezin
6aac5296de Fix 2 flaky tests (#66839)
* Fix flaky test

* Fix flaky test

* Fix broken pipeline

* Fix flake remote sync test

* Review fixes
2025-12-16 00:21:29 +03:00
John Swanson
c756f9a9b0 collection-id only works with shallow=true (#64476)
Document that we only use `collection-id` when `shallow=true`.
2025-12-15 21:18:56 +00:00
Cam Saul
8f5c1adc27 Eliminate enterprise/sso dep on channel (#66854)
* Eliminate `enterprise/sso` dep on `channel`

* Fix missing require
2025-12-15 12:38:07 -08:00
Edward Paget
12886aeb94 fix: api regexes for all routes without them (#66163)
* fix: api regexes for all routes without them

* fixup! regex can't have ^ or $ in api matches

* fixup! embedding issues

* fixup! nano-id enforce
2025-12-15 13:49:59 -06:00
Edward Paget
672f62f9ee fix: better conversions of v57 remote-sync files (#66894)
* fix: better conversions of v57 remote-sync files

* Fix test for remote synced parent

* fixup! kondo

* fixup! merge brainfart
2025-12-15 19:25:16 +00:00
Braden Shepherdson
f248bb4669 [perf] Fix a sneaky infinite loop in a prod-only error case (#66955)
`util.perf/mapv` checks the `count` of all its collection args, so it's
not safe to call with an infinite `seq`.

`lib.metadata.result-metadata/merge-cols` was doing exactly that in the
case where there was a mismatch between the column counts from lib and
driver. It was passing `(concat short-list (repeat nil))` to `mapv` and
causing an infinite loop!
2025-12-15 19:13:16 +00:00
Alexander Polyankin
00c6163ca5 Remove moderation reviews from graph filters (#66952) 2025-12-15 18:35:45 +00:00
Gabriel Moreno
8d7c058ec0 Restore theme preference after login (#66892)
* fix: restore theme preference after login

* test: add theme restoring e2e sequence

* test: perform manual sign-in for better reproduction

* docs: explain new `useEffect` call on `ColorSchemeProvider.tsx`

* fix: experimentally replace colorscheme change listening method
2025-12-15 13:55:40 -04:00
John Swanson
b7c18ff30d Correctly handle non-string @tenants in JWTs (#66944)
* Correctly handle non-string `@tenants` in JWTs

Previously we threw exceptions if we received an invalid non-string
`@tenant`, like `123` or `false` or `{:foo "bar"}`.

Now we:

- convert integers to strings,

- take strings as-is, and

- throw a meaningful exception for anything else
2025-12-15 16:59:19 +00:00
Riley Thompson
1a4bddf25e Pagerduty for querying on-call (#66776)
* test issue workflow

* set up pager duty notifications for querying on call
2025-12-15 11:55:49 -05:00
metamben
7314318fa8 Move the check for published tables into :model/Database's can-read? (#66674)
This is a refactoring, it should not change the overall behavior.
2025-12-15 19:54:34 +03:00
bryan
d6149a57c4 uninstall the custom migration yaml merge driver (#66910) 2025-12-15 09:54:14 -07:00
github-automation-metabase
987a8ab107 Update generated docs (master) (#66923)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-15 11:47:24 -05:00
Braden Shepherdson
bd40119508 [o11y] Add a new metric to count unique cards with blank queries (#66903)
`:dataset_query {}` should not happen, and indicates a bug in the
MBQL 4 normalization. On reading any card, if its `:dataset_query`
is `{}`, add the ID to an in-memory set and update a Prometheus
metric.
2025-12-15 16:12:07 +00:00
dpsutton
4e38125789 Revert "Quick ci test disabling (#63030)" (#66912)
This reverts commit 9191713854.

used to do this in-house but now we use trunk for this. Old way has
ultimate flexibility. But trunk has some really nice workflows built
in (reporting, creating issues in linear, etc).
2025-12-15 10:09:03 -06:00
Sébastien
0a213ebaa7 Trying to fix the infamous app palette loki flaky (#66935)
* Trying to fix the infamous app palette loki flaky

* .
2025-12-15 15:29:35 +01:00
Egor Grushin
720b73a476 Fix lint-staged token-scan for files with special characters (#66911)
* Fix lint-staged token-scan for files with special characters
2025-12-15 14:08:36 +00:00
Timofey Kachalov
9e62f8c2b7 Additional changes for Embedding names (#66899) 2025-12-13 08:06:31 +04:00
Alex Yarosh
3e071e464c docs: embedding renames (#66869)
* rename to full app and modular embedding

* Update docs/embedding/sdk/quickstart-with-sample-app.md

* Update docs/embedding/full-app-ui-components.md

* Apply suggestions from code review

---------

Co-authored-by: Jeff Bruemmer <jeffbruemmer@gmail.com>
2025-12-12 23:42:27 +00:00
Noah Moss
dce776c8cc Metabot use case configuration groundwork (#66673)
* Add DB infra for metabot use cases

* add enabled? use case setting and hook it up end to end for transforms

* remove transforms use case toggle

* add back migrations, number of tests

* add more missing migrations; lint

* some simplification

* fix some tests

* pull use-case out of tool call request header & fix last test

* more test fixes

* add back commits, move use_case->profile mapping to the appdb

* clean ns

* bump ci

* just store use case names in metabot_message instead of fks

* update test

* serialization fix; refactor

* lint

* restore migrations, address code review

* add back migrations again
2025-12-12 18:09:10 -05:00
Maz Ameli
7ddc7cae7d Update our Table icon (#66900)
* change table icon

* remove the redundant table_spaced icon

* use folder instead of table for Questions tab in entitypicker

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-12-12 22:44:49 +00:00
Timofey Kachalov
e52c6c5717 Show EmptyState with publish button on the GetCode step when an entity is not published (#66789) 2025-12-13 01:10:47 +04:00
Denis Berezin
313f25f84f UXW-2484 fix chart tooltip color (#66855) 2025-12-12 23:54:19 +03:00
Edward Paget
6840c68feb fix: restore deleted migration (#66897) 2025-12-12 20:46:59 +00:00
Edward Paget
cee9d99700 Tenants, External Users, and tenant based JWT with Audit Events (#66661)
* Tenants, External Users, and tenant based JWT with Audit Events

Allow the creation of tenant users

While working on this, I realized that my approach to the "All External
Users" group and renaming the "All Users" group was untenable.

I had been planning to just update these things in the database (create
AEU, rename AU to AIU) in the setter function for the `:use-tenants`
setting. The issue here is caching: we don't want to need to actually
reach out to the database every time we need to fetch the All Users or
All External Users, but it would also be quite unfortunate if one
Metabase instance in a cluster had an outdated view of, e.g. the ID of
"All External Users".

(Although - I'm not really sure how much we use the *name* of "All
Users" when we fetch `(all-users)`, so that might be worth a look.)

For now, I've modified things to just update things dynamically in the
`GET /api/permissions/group` and `GET /api/permissions/group/:id`
endpoints: we show/hide the "All External Users" group, and rename the
"All Users" group, based on whether Tenants are enabled.

Allow the creation of tenants

Listing tenants / tenant members will be a followup PR

lint

doh missing require

fix tests

add a test for enabling tenants changing groups

fix tests, slight change to tenant creation API

kick ci

fix another test

give minimum permissions to ext groups

fix more tests

impl user stategy setting ui

more API endpoints

add more tests, fix a very silly migration

slug validation

fix mariadb/mysql

lint migrations file

kondo

fix test

replace tenant members API with `/user?tenant_id=`

also realized that the `/user/recipients` endpoint needed to be modified
for tenants: tenant users should not see recipients that are not part of
the same tenant. (reminder for later: we will need to add safeguards
around actually creating those pulses, not just assume the API won't
send bad recipients!!)

IF you are an admin, `/api/user` respects a `tenant_id` query param and returns:

- "normal" (non-tenant) users if it's `nil`

- specific-tenant users if not

If you are *not* an admin, `/api/user` ignores the `tenant_id` passed
and only returns users in the same tenant.

`/api/user/recipients` will:

- return ALL users if you are a superuser (both tenant and non-tenant)

- return only users in the SAME tenant as you if not

doh

tenant crud wip

integrate endpoints, fix type errors

Allow getting all external users

previously you could do only

```
GET /api/user                => internal users
GET /api/user?tenant_id=null => internal users
GET /api/user?tenant_id=123  => users in tenant 123
```

now you can do

```
GET /api/user                  => internal users
GET /api/user?tenant_id=null   => internal users
GET /api/user?tenant_id=123    => users in tenant 123
GET /api/user?tenancy=all      => internal + external users
GET /api/user?tenancy=internal => internal users
GET /api/user?tenancy=external => external users (in all tenants)
```

If you specify both `tenancy` and `tenant_id` (regardless of the values
passed) you'll get a 400.

fix my bad rebase

fix bad rebase more

remove #p

mark tenants as `is_active` or not

initial external users management

remove permissions check on the trash endpoint

I don't know why this was added in the first place (I mean, I think I
added it, but I don't know why I did).

The trash is always accessible to everyone. We gate the visibility of
things *in* the trash, but the trash itself is always readable.

no personal collection for tenant users

remove tenant query inside oss

tenant user routes

make it so that you cannot remove users from the external users group

do not send email to tenant users

no login for inactive tenants

disable collection permissions, don't show sent email modal on user success with SMTP

remove all users group has higher permissions warnings for external users group

moving is external checks behind plugins

unit test cleanup, add simple test

read only application permissions for external users

set tenant on login with JWT

incredibly hacky tenant attribute

separate `:attributes` from `:login_attributes`

thinking here is that `login_attributes` are the things you set on the
user, where `attributes` are all the attributes of the user including
things like tenant slug or maybe someday locale etc.

fix build

fix token check

create a tenant collection in a migration

this works, but the tenant collection is always visible to admins, even
if the setting is off.

hide tenant collection from normal users

fixing build and FE rebase

Delete stray "howdy"

Lol, sorry about that.

fix tests

throw instead of silent failure on no tenant

superuser can't be tenant

fix up tenant collections

tenant collection now includes subcollections.

Tenant collections are hidden if the feature isn't enabled.

tenant collections marked in API

bugfix and current user can write any coll

don't add `attributes` key to all users

just the current user on login

invalidate groups when changing user strategy

read only user

{{ tenant_slug }} user attribute

fix be test

rip out tenant collection stuff on BE

fix BE tests

lint

fix magic string

no tenantifying existing users for now

also clean up a complicated, confusing fn.

starting e2e

fixing e2e, adjusting @tenant user attribute

fix permissions editor, add tenant.name e2e test

allow more than one user per tenant

🤦

allow getting only active tenants

*actually* don't replace existing values with nil

getting e2e ready for tenant user provisioning

tenants management ux

e2e coverage on sandboxing, deactivating tenants

replace {{tenant_slug}} with `@tenant.slug`

filter out other-tenant users from pulse creation

rename any existing `@.+` user attributes

prohibit new user attributes starting with `@`

fix migration

ugh, forgot to actually commit this file

add more tests

kondo

use the `tenants` feature

fix a test - missed one `:advanced-permissions`

e2e test coverage, updating tenant attribute to @tenant.slug

Partial Type Fixes

types green

unit tests

adding groups to e2e test, maybe fixing tenant feature check?

Add tenants to tracked snowplow features

Fixing Admin ui

Modernizing tenants page

separate external group in permissions sidebar

permissions editor updates

hardcode that *everyone* has trash access

shame... bad imports

adjusting Main Navbar. using globe icon

CR response

fix tests

fix attributes when tenants are disabled

lock up the 'all external users' collection

tenants route guard

add tests for missing feature and oss

fixing some unit tests, and type errors

set token features in default.cy.snap

unit and e2e test adjustment

another pass on e2e

fix e2e and build

fix a bad merge

Green CI?

reset token after restoring DB

move a test to fix the test

kondo

Move `/api/ee/tenants` to `/api/ee/tenant`

PR Feedback, part 1

move route functions into ee

ADM-1105 permissions editor adjustments for external users

ADM 1104 do not show invite button on external users when there is no tenant

adjusting unit tests

fix no results message for deactivated users page

center no results message

Fix migrations IDs / related tests

adjusting no results message for tehants

fixing unit tests, adding e2e test for permissions

chore: add timestamp columns to tenants (#60575)

* chore: add timestamp columns to tenants

* fixup! add hooks

* kick ci

Auto provision tenants, respect tenants feature (#60571)

deactivate tenant users along with their tenants (#60552)

* deactivate tenant users along with their tenants

Tenant users from deactivated tenants were already prevented from
logging in (we checked the activation status of their tenant) but for
bookkeeping it's probably best to actually deactivate the users
themselves along with their tenants, and reactivate them if the tenant
is reactivated.

* invalidate users when updating a tenant, adjust external users list screen

* e2e test

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>

audit events for tenants (#60647)

* Revert "Delete unused string util from metabase lib (#64389)"

This reverts commit 0af38ef8f0.

* fix the build

* fix tests

* fix rebase error in invite button

* fix more tests

* fix more tests

* fix more tests

* fix more tests

* fix more tests

* fix more tests

* fix another test

* Fix another couple tests

* and more

* and more

* Close the modal to create shared tenant collection after it is created (#66049)

* Fix more tests, nearly all e2e tests passing

* a couple more tests

* couple more tests

* last (???) few tests

* Remove edit permissions in ellipsis menu when viewing shared tenant collection (#66042)

* Suggest external users only when adding tenant group members (#66046)

* feat: separate namespace for tenant collections (#66102)

* fixup! FE build

* feat: add remote-sync support for tenant collections (#66272)

* feat: add remote-sync support for tenant collections

* Update permissions.clj

* fixup! tests

* fixup! enterprise tests

* fixup! mysql/h2

* EMB-1011: add default read perms for namespace

* Fix tests (#66403)

* Fix tests

Not exactly sure how these got merged, I think maybe they were hidden by
GH issues.

* Fix kondo

* fix apparent rebase error

* fixup! EMB-1065 fix namespace filtering

* fixup! some bad perms tests

* fixup! remote sync dep checking across collections

* fixup! remove blank test

* fixup! missing tenant setting

* fixup! add premium feature declaration

* fixup! get test working with h2

* fixup! revert h2 fix

* fixup! revert h2 fix

* fixup! real h2 fix

* Dedicated Tenant Collections

* More fixes

* Tests and more fixes

* Fix rebase error

* rename

* Fix query for shared tenant collections

* fixup! UXW-2386 don't pass `tables` model into tenant root

* fixup! UXW-2436 build correct path for namespaced collections

* Remove test of non-existent fn

* Fix failing frontend unit and e2e tests in tenants feature branch (#66243)

Co-authored-by: John Swanson <john.d.swanson@gmail.com>

* fix failing frontend ESLint errors

* Prefix users and groups as "Internal" in admin settings when tenants are active (#66169)

* Update design of the user strategy modal for tenants (#66182)

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* Add multi-tenancy setup guide to embedding hub (#66113)

* Update design of the tenants listing and internal user page (#66193)

* Give tenant users a personal collection

* Fix BE tests

* another be test

* Add specific error messages for JWT tenant claim errors (#66172)

* kondo/fmt

* fix running jwt tests standalone

* feat: per collection setting (#66475)

* feat: per collection setting

* feat: remove unsynced collections

* fixup! tests

* fixup! lints

* fixup! test

* Remove duplicated tenant permissions

* handle disabling feature more cleanly

when tenants is turned off:

- disable all tenant users

- reject any logins from tenant users

- reject any JWTs that specify a tenant

* Add tenant entity picker e2e tests. Fix one bug surfaced

* uxw-2456: remove drop shadows from dedicated tenant collection cards

* Hide tenant collections permissions tab when tenants are disabled (#66537)

* Hide create shared tenant collection button on sidebar for non-admin users (#66538)

* Hide tenant collections sidebar section when no collections exist for non-admins (#66539)

* Fix dedicated tenant collection root in collection picker as tenant user (#66549)

* fix frontend type-check: only set namespace if it is defined

* EMB-1093: Fix not passing a tenant attribute

Fixes [EMB-1093: If you enable multi-tenants and don't add JWT
attribute, it will
break](https://linear.app/metabase/issue/EMB-1093/if-you-enable-multi-tenants-and-dont-add-jwt-attribute-it-will-break)

* EMB-2459: Fix restrict where collections can be moved to

* Fixup working e2e entity picker tests

* fixup! mysql namespace tests

* fixup! tenant group mapping tests

* fixup! ws

* tree endpoint allows specifying multiple nses

* fix broken test

* Show dedicated tenant collections in collection pickers for admins (#66583)

* feat(sdk-bundle): add tenants ee plugin (#66586)

* fixup! bad ns clause audit feature is off

* fixup! UXW-2473 support non-string attributes

* Hide tenant collections section when there are no visible shared collections (#66597)

* Add tenant cards to search

* fixup! tenant collection cleanup

* EMB-1082 rename strings in the ui (#66603)

* make tenant field required (#66516)

* change `tenant` key to `@tenant`

- if the feature is off, you can still log in if you have the `@tenant`
key set. It will be silently ignored, but a warning will be logged.

- if the feature is on, `@tenant` is a drop-in replacement for `tenant`.

- we'd previously prevented setting user attributes that start with `@`.
This updates `remove-invalid-attributes` to do the same with JWT/SAML
attributes.

* add SAML tests

* Expose SAML attribute for tenant

* External users can't use MB if feature disabled

Plus add tests for:

- tenant user, feature disabled

- tenant user, feature unavailable

* Add missing test files

* Multi-stage embedding data picker should query models and questions from tenant collections (#66598)

* Fix external group tooltip referencing All Internal Users (#66654)

* Allow conversion of tenant <-> internal users

Upon conversion, all previous group memberships are destroyed and the
user is added to either the "All External Users" or "All Users" groups
accordingly.

* feat: implementing new tenant/remote-sync designs (#66567)

* fix missing dep in test file

and a tiny removal of an unnecessary `dissoc`

* fixup!: broken embedding page due to bad rebase conflict resolution

* fixup!: fix type errors

* fixup!: fix frontend jest unit test errors

* fixup! Move search tests requiring EE to EE code

* Fix copy test

* add confirmation warning when disabling tenants (#66697)

* fix test

* more renaming

* fixup!: failing tenants.cy.spec.js test and rename "All tenant users" migration

* fixup! whitespace fixes

* Remove serialization for dropped column

* fixup! missing migration

* fix other wrongly ordered migration

* fixup! Ordering more migrations

* fixup! other tests

* fix test

* fix another test

* api response schemas for tenant endpoints

* kondo

* one more kondo

* fixup! bad test query

* fixup! popover to use the right way of passing args

* Fix push changes modal

* fixup! correct token for entity picker tests

* Fix tenants e2e test with correct attribute

* fixup! tenants tests

* fixup! remove test for old behavior

* fix type on events, removed unused string union values

* update MainNavSharedCollections.unit.spec.tsx to use the new name

* fix linting issue unused import

* remove test file not on master anymore

* fix permissions select

* fix dashboard filters autowiring e2e test

* fix formating of module.edn

* remove useless test file

* add enum for namespaces

* fixup! remove toggle

* Update EntityPickerModal.tsx

* Remove commented tests

* Update e2e test based on feedback

* Split add-attributes-test

* Update test/metabase/collections_rest/api_test.clj

* Fix copy cmd model list

* Remove :put handling code for is_remote_synced

* Update src/metabase/premium_features/settings.clj

* Update resources/migrations/056_update_migrations.yaml

* Remove extraneous regex in api def

* Update frontend/src/metabase-types/analytics/event.ts

* UXW-2536 popup remote-sync modal after request

* Remove the "sidebar" event type

* Improve some backend tests

* Fix remote-sync e2e tests

* refactor: remove useAdminSetting and use settings already in the
component

* same for the jwt form

* move error message to Messages

* variant filled for apply button

* convert attributes to strings on read/write

In practice there is no difference between the value `true` and the
value `"true"`, so let's keep things simple by making all attributes
maps of string->string.

Fixes [UXW-2550: Cannot edit tenant users with non-string attributes](https://linear.app/metabase/issue/UXW-2550/cannot-edit-tenant-users-with-non-string-attributes)

* fw={500} => medium

* add c() to t`Sync {collection.name}`

* useSetting("use-tenants") in MainNavSharedCollections

* fixup extra dialog on permspagelayout

* fix broken tests

* fix the other broken test

* Remove tenant collection app permission

* Fix embedding sdk collection type

* Convert tenants e2e test to typescript

* move setupRemoteSyncEndpoints to server-mocks folder

* actually remove it from test-utils

* Small BE fixes

* use usePrevious from react-use

* Remove custom root tenant collection hook

* Change group detail to use text

* fix sdk type

* Redid git controls with button.group

* fixup! bad test

* fixup! tenant logic and components into plugins

* Update frontend/src/metabase/lib/string.js

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

* fixup! bad merge

* Rearrange last unit test for CollectionPicker

* fixup! PR feedback

* fixup! handle nils and seqs in attributes

* fixup! kondos

* fixup! better stringify

* Add missing maybe to login attributes schema

* fixup! yaml tests

* fixup! sequential check

* fixup! Stringify ldap attributes

* Fix ldap tests

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: John Swanson <john.d.swanson@gmail.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-12-12 12:53:38 -06:00
Anderson
241c2c9576 Add a horizontal border across the top of the dependency graph (transform, metric, table) (#66884) 2025-12-12 15:49:18 -03:00
John Swanson
641ddb52a9 bump search index version (#66890) 2025-12-12 12:28:37 -06:00
Nicolò Pretto
aba6bd6b9b fix: cors popover white-on-white when dark mode (#66881) 2025-12-12 17:39:22 +00:00
Braden Shepherdson
12c938d6b3 [perf] Add metric for lib.computed/weak-map size; speculative fixes (#66404)
OOMs in cloud are linked to this weak map retaining too much. The
exported heap dump reports are suggestive but not conclusive, and I
can't reproduce locally.

Adds `:metabase-query-processor/computed-weak-map-queries` to measure
the size of the weak map. That should sawtooth with GCs as it
accumulates queries and then discards them, but we'll see if it rises
forever on the problem instances.

This also adjusts the caching for a `MetadataProvider`-level entity
(`:metadata/card`) from the weak map to the `MetadataProvider`'s
internal cache. That's speculative, since there's no evidence to link
it to the issue, but it should be at least as effective a cache and
there's less risk of accidentally retaining too much.
2025-12-12 17:26:20 +00:00
Riley Thompson
653d9ab52f Fix clickhouse uuid filtering (#66852)
* fix uuid filtering

* rewrite tests to be more structured
2025-12-12 17:12:48 +00:00
Sébastien
fb303ccd82 Closes EMB-990 add description to columns in CollectionBrowser (#66305)
* Closes EMB-990 add description to columns in CollectionBrowser

* keep the existing behavior with tooltip unless description is explicitely set to be visible

* .

* addressed comments

* cleaned up unit tests
2025-12-12 17:14:17 +01:00
bryan
66bd405f0e Add mage doctor command for dev environment health checks (#66726) 2025-12-12 09:02:10 -07:00
John Swanson
ae9b3684b9 Enforce table collection permissions in search correctly (#66841)
* Ignore collection for unpublished tables

Unpublished tables have no collection and the `collection_id` means
nothing, and should be ignored.

* Add a test

* Fix legacy search permissions

Legacy search ignored the collection permissions for published tables,
so it was possible to get a table back from search even though you
didn't have permission to see it because it was published to a table.
2025-12-12 07:50:53 -08:00
Edward Paget
309d6a6b46 fix: apply deep serialization sort for remote-sync (#66846) 2025-12-12 08:24:14 -06:00
Brad Anderson
1ebb50b914 UXW-2531 Omits "New snippet" option in Library "New" dropdown if user lacks permission (#66835) 2025-12-12 09:10:24 -05:00
Mahatthana (Kelvin) Nomsawadi
f473c192b9 fix(embed-js): Fix EAJS children with ExplicitSize not scaling down (#66821)
* Fix EAJS children with ExplicitSize not scaling down

* Add tests

* Update e2e/test/scenarios/embedding/sdk-iframe-embedding-setup/select-embed-options.cy.spec.ts

Co-authored-by: Sébastien <sebastien@metabase.com>

* Fix formatting issue

---------

Co-authored-by: Sébastien <sebastien@metabase.com>
2025-12-12 13:42:23 +00:00
Sébastien
49503e742f fixes a flaky (#66822) 2025-12-12 12:57:14 +01:00
Mahatthana (Kelvin) Nomsawadi
b5788126a4 Avoid flashing of subscriptions channel selections sidebar (#66870) 2025-12-12 11:11:55 +00:00
Timofey Kachalov
cf87e41548 Adjust EAJS/SDK/adjust full-app names (#66753) 2025-12-12 14:28:16 +04:00
Mahatthana (Kelvin) Nomsawadi
354d5da0d6 fix(sdk-bundle): Fix can't drill numeric string ID dashboard (#66819)
* Fix can't drill numeric string ID dashboard

* Address when ID is an empty string
2025-12-12 09:27:38 +00:00
Kamil Mielnik
0168438c25 GDGT-1386 Auto-populate table name based on transform name (#66813)
* Auto populate targetName in CreateTransformModal

* Update tests

* Fix weird "./../" imports

* Fix logic
2025-12-12 15:58:59 +07:00
Ngoc Khuat
9db0f4c5e8 wraps transforms execute! multimethod with a function (#66555) 2025-12-12 08:12:59 +00:00
Fraser
6ab3820a60 Prepare backend in e2e stress test (#66868) 2025-12-12 05:29:17 +01:00
github-automation-metabase
900bc0c1aa Update generated docs (master) (#66865)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-11 21:21:43 -05:00
Aleksandr Lesnenko
028f67ab34 Segments list revision history, dependencies, list view in published tables (#66678)
* segments: published table segment list, revision history, dependency graph, breadcrumbs, move preview to the menu

* specs

* fix specs

* dedupe tests of segments pages

* fix avatars

* fix rebase

* visuals

* update specs

* final refactoring

* polish

* review

* drop react context although it adds a bit of dupe
2025-12-11 20:58:38 -05:00
Timothy S. Dean
68b1a18e1f Ensure Claude prefers clojure-mcp if it is available. (#66860)
For those of us who use clojure-mcp (https://github.com/bhauman/clojure-mcp), our Claude configuration directly contradicts instructions we're giving it. This PR only adds to our `CLAUDE.md` and our skills a note that **if** clojure-mcp is available, it should prefer it over shell-based methods (like `./bin/mage -repl`).
2025-12-11 17:05:30 -07:00
Denis Berezin
044323c97c UXW-2537 fix row/bar viz crash after native query column rename (#66786)
* UXW-2537 fix row/bar viz crash after native query column rename

* Fix unit tests
2025-12-12 01:59:30 +03:00
Cam Saul
6d6a477a2c Eliminate analytics dependency on channel (#66681)
* Eliminate `analytics` dependency on `channel`

* Update refs to `slack-configured?`

* Kondo
2025-12-11 14:49:40 -08:00
Cam Saul
4509828711 Split up queries and queries-rest modules (#66677) 2025-12-11 14:49:27 -08:00
John Swanson
7b8c62f63c No 500 on deactivating user (#66621)
Fixes https://github.com/metabase/metabase/issues/66599
2025-12-11 14:22:03 -08:00
Ryan Laurie
e7c1fc0c19 Show location of minipicker search items (#66736)
* show paths to minipicker search items

* widen modal and debounce

* show tables as in collections

* fix table display bug
2025-12-11 22:03:49 +00:00
metamben
d2d7f62d66 Trust the model's FK semantic type even for MBQL models (#66788)
* Trust the model's FK semantic type even for MBQL models

Fixes #48427
2025-12-11 21:44:38 +00:00
dpsutton
75e0180a66 Hide analytics-dev-mode setting from generated docs (#66794)
docs scoop up all settings and has ways to avoid. In
`metabase.cmd.env-var-dox/avoid?` This had a docstring and then an extra
docstring. We can just copy the nice docstring to the docstring slot and
put `:doc false`.

```clojure
(defn- avoid?
  "Used to filter out environment variables with high foot-gun indices."
  [env-var]
  (or (false? (:doc env-var))
      (false? (:can-read-from-env? env-var))
              ;; Ideally, we'd move off of this list completely,
              ;; but not all environment variables are defsettings.
      (contains? env-vars-not-to-mess-with (format-prefix env-var))))
```
2025-12-11 15:42:39 -06:00
Anderson
18e227736c Show breadcrumbs on published table page (Library > Data > table) (#66837)
* Show breadcrumbs on published table page (Library > Data > <table>)

* UXW-2524 Makes table breadcrumbs dynamic

* Adjust e2e test

---------

Co-authored-by: Brad Anderson <brad@metabase.com>
2025-12-11 21:41:37 +00:00
Nick Fitzpatrick
2ebcd1631c Various Data Studio Table Adjustments (#66795)
* Various Data Studio Table Adjustments

* remove unneeded comment
2025-12-11 21:08:50 +00:00
Anderson
d85ffad7cb Update Transforms detail view (#66532)
* Adjust UI on transform pages / Implement transforms view-only and edit mode

* Add and fix tests

* Fix tests

* Fix transform notebook query preview issues

* Adjust padding on runs page

* Adjust edit definition font size / query builder header margin / transform header icon

* More layout tweaks / Adjust preview section height calculation

* Fix lint / Make editor content-editable=false when readonly

* Remove unneeded TransformsSectionHeader.tsx

* Rename LibraryEditorHeader->PythonLibraryEditor in PythonLibraryEditorPage

* Fix scrolling behavior on a few pages

* Restore metabot button on transforms pages

* Fix PaneHeader for when we have breadcrumbs, actions and metabot button showing up

* Fix lint / Fix e2e test
2025-12-11 17:56:25 -03:00
Gabriel Moreno
c32c99e982 fix: send document data on analytics call (#66820) 2025-12-11 16:16:40 -04:00
Brad Anderson
789ee55ef8 UXW-2534+UXW-2527 Globally rename "Top folder" to "SQL snippets" in snippet collections + Remove the library option when dealing with collections in the snippet picker (#66787)
* UXW-2527 Disallows Library as an option in the snippet collection modal

* UXW-2534 Renames root sql snippet folder from "Top folder" to "SQL snippets" globally
2025-12-11 15:14:22 -05:00
Riley Thompson
af53e3fa1d Don't add newline to commented out clauses in native query preview (#66700)
* only replace clause if it's not commented

* add tests

* remove sql formatting on frontend
2025-12-11 14:25:56 -05:00
Timofey Kachalov
f3318cab6d Show a spinner button for the Download button when exporting (#66824) 2025-12-11 22:25:55 +04:00
Anderson
f504e28714 Improve database form dirty state awareness (#66684)
* Handle dirty state in the database form properly

* Change approach and add tests
2025-12-11 14:52:40 -03:00
Aleksandr Lesnenko
9b41d14147 fix broken text wrapping in tables in documents (#65254)
* fix broken text wrapping in tables in documents

* render measure root in a portal
2025-12-11 16:41:26 +00:00
Timofey Kachalov
fb721f66e8 Change Embed JS Wizard Upsells (#66756) 2025-12-11 20:13:18 +04:00
Roman Abdulmanov
8f2447f644 Fix for the limit in the static embed context (#66811) 2025-12-11 16:08:36 +00:00
Brad Anderson
87eed4d7c9 UXW-2519 Update Data Studio icon/logo (#66782) 2025-12-11 10:48:31 -05:00
Gabriel Moreno
c10c6c378a UXW-2322-2323 Document stats & analytics (#66665)
* feat: add document metrics to daily stats ping

* feat: add tracking event for leaving document without saving

* fix: leave without saving tracking event

* refactor: move `trackSimpleEvent` call to `analytics.ts`

* refactor: add all dependencies & check for previous value instead

* test: assert snowplow events on leave confirm modal display

* test: add document metrics test
2025-12-11 10:57:27 -04:00
Nathan Voxland
d66071551a Support relative-datetime in legacy mbql (#66214) 2025-12-11 08:51:01 -06:00
Eric Normand
7fec8c9fbf Prevent looping past current-schema-version when already past it (#66785)
* Prevent looping past current-schema-version when already past it.

* Add test for upgrade-card-schema-to-latest

* Make test parallel
2025-12-11 14:44:09 +00:00
Gabriel Moreno
81cd9980b6 refactor: unify TextInputBlurChange component (#66796) 2025-12-11 10:43:16 -04:00
Timofey Kachalov
551ed1694b Fix LegacyStaticEmbeddingAlert trigger when it is visible (#66812) 2025-12-11 18:36:48 +04:00
Nicolò Pretto
02f2d128f7 feat(sdk): skip first /auth/sso request when jwtProviderUri is passed (#66120)
* remove hash logic from /auth/sso endpoint to speed up sdk auth

* remove first /auth/sso request when jwtProviderUri is passed

* add e2e test

* Update enterprise/frontend/src/embedding-sdk-ee/tests/auth-flow/jwt.unit.spec.tsx

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* address feedback: sort fields, remove dead code, don't requier
prefferredAuthMethod when the uri is passed

* Update enterprise/frontend/src/embedding-sdk-ee/auth/auth.ts

Co-authored-by: Sébastien <sebastien@metabase.com>

* stubbing Date

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-12-11 13:20:28 +01:00
Chris Truter
86e5e9d0e0 Optimize u/index-by when used with vf (#66800) 2025-12-11 09:29:04 +00:00
Nicolò Pretto
799f71841a remove hash logic in /auth/sso to speed up auth flow (#66076)
* remove hash logic from /auth/sso endpoint to speed up sdk auth

* fixed e2e test - again

* fixup

* remove nil assertion

---------

Co-authored-by: Sébastien <sebastien@metabase.com>
2025-12-11 09:43:07 +01:00
Cam Saul
d25eba372c Fix user attribute filters against implicitly joined tables that are also sandboxed (#66790) 2025-12-10 21:29:20 -08:00
Anderson
fe84b44bb3 Restore admin-permissions.cy.spec.js e2e test file (#66765)
this file got removed during a master->uxw-394-sub-collections-permissions-toggle merge on the PR #65928
the file had some changes, and removing it was not intended.

the version restored is this one, extracted from the same PR:
ab62f89a2c
2025-12-11 01:55:38 -03:00
Nick Fitzpatrick
6c903ded78 Tree Filter should not be case sensitive (#66792) 2025-12-10 22:15:51 -05:00
Alex Yarosh
d0705fd069 docs: debetify metabot (#66676)
* metabot unbetaying

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-12-10 18:18:08 -05:00
Nick Fitzpatrick
a8f813a149 misc fixes (#66766)
* misc fixes

* memoize useTreeFilter response

* Avoid nested ternaries in LibrarySectionLayout

* Update column definition names, remove dependency graph header, use datetime on library page

---------

Co-authored-by: Anderson <anderson@metabase.com>
2025-12-10 16:42:01 -05:00
Riley Thompson
d358403667 fix typo (#66771) 2025-12-10 15:19:20 -05:00
Denis Berezin
f04e790b90 UXW-285 filter not accessible questions in data picker (#66483)
* UXW-285 filter not accessible questions in data picker

# Conflicts:
#	frontend/src/metabase-types/api/collection.ts

* Fix CI

* Fix e2e

* Fix CI, add e2e

* Add fix for big picker

* fix: CI

* Fix e2e tests
2025-12-10 21:23:56 +03:00
Nick Fitzpatrick
542861c88e Data Studio UX (#66612)
* New Data Studio UX

* cleaning up unused files

* small adjustments

* Groups 5 and 12

* groups 20 and 23

* Group 15 and Linter

* types?

* fixup hooks and routes

* fix item urls

* Fix transforms.cy.spec.ts (group 19)

* Fix transforms-codegen.cy.spec.ts (group 17)

* fix library page

* Fix MetricHeader and other typescript issues

* Fix snippets.cy.spec.ts (group 21)

* Fix modeling-metrics.cy.spec.ts (group 22)

* Create Libray Modal

* snippets tests

* Some Maz Feedback

* Reverts now-unnecessary prop change

* Revert probably unintentional change

* Fix modeling-tables.cy.spec.ts (group 9)

* Fixes date formatting

* Table fixes

* Fix hard-coded strings that need to be translated

* Fix naming

* Rename variables with "model" in the name that don't deal with models anymore

* Removes outdated e2e helpers

* Address @andsalves review comments

* Group 47 Errors

* Rename modeling -> library (#66762)

* Addresses useCollectionPath PR feedback

---------

Co-authored-by: Anderson <anderson@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
2025-12-10 12:17:40 -05:00
Edward Paget
b31ea69d01 fix: update mongo docker/add :drivers to startup (#66764) 2025-12-10 10:23:59 -06:00
Riley Thompson
a173a45e80 Treat postgres bit strings as text (#66618)
* treat bit strings as text

* Add tests

* cast bit string values instead of fields

* only use string value if bit type

* fix kondo

* Add comment
2025-12-10 14:48:17 +00:00
Noah Moss
59154067f9 Deftool macro for Metabot tool APIs; tool API reorganization (#66614)
* tool macro + initial endpoint migration

* more endpoint migrations

* new deftool namespace + tests

* more consistent macro api

* parallelize new tests

* Reorganize: put argument/response schemas near tool defs, add section separators

* lint

* fix test

* remove skip-decode? - not needed

* Use perf/get-in
2025-12-10 14:31:01 +00:00
Jeff Bruemmer
8d920e120b note on metabot context (#66707) 2025-12-10 09:43:44 -03:00
Nicolò Maria Mezzopera
590bd138c5 GDGT-1313 | Bulk metadata usage analytics additions (#66582)
* feat: db managemtn

* WIP: load yamls

* wip: transform

* feat: just toggle on load-analytics-content

* feat: export

* chore: user-email

* analytics-dev-mode

* wip: startup logic

* require ns for init

* kondo

* wip: export route

* wip

* fix api

* feat: download button

* refactor

* fix db yaml

* fix: skip db for import

* chore: move stuff around

* use is-audit-dev toggle

* internal setting

* tighter control on export

* lint FE

* perf

* lint fe

* jar aware

* feat: PR-Env-analytics-dev

* chore: use timer

* fail unless postgres

* tests

* fix tests

* throw out of future

* delete old shell command

* feat: mage commands

* fix: test

* fixes for mage commands

* chore: return schema

* cleanup

* fixes to mage commands

* fix: is-audit-dev can always connect, it's appdb

* update checked out analytics to latest format

* reset on teardown

* reinstate even if no edit

* add analytics:finalize for convenience

* exclude qrtz and liquidbase tables

* feat: add usage analytics fields to v_tables views for PostgreSQL, MySQL, and H2

* feat: add new fields for entity type, estimated row count, owner email, owner user ID, view count, and visibility type in v_tables schema

* Apply suggestion from @bronsa

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

* fix: use unique changeset ID for usage analytics migration

Change the migration ID from v58.2025-11-19T00:00:02 to v58.2025-12-05T00:00:00
to avoid duplicate ID conflict with another changeset.

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

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

* Update resources/migrations/058_update_migrations.yaml

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

* Update frontend/src/metabase/status/components/AnalyticsExportStatus/AnalyticsExportStatus.tsx

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

* Update frontend/src/metabase/collections/components/CollectionHeader/CollectionExportAnalytics.tsx

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

* Update frontend/src/metabase/collections/components/CollectionHeader/CollectionExportAnalytics.tsx

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

* address review comments

* relativize

* remove needless == true

* missing io/file

* whitespace

* test: add regression test ensuring the usage analytics views have the expected fields, and they are synced properly

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
2025-12-10 09:08:41 +01:00
dpsutton
5ccc379d41 add input for the logs-artifact-suffix (#66738)
also fix where the name comes from on the mysql job (it uses version not
job)
2025-12-09 23:22:36 -06:00
dpsutton
a06219bd1b handle uploads from matrix jobs (#66732)
motivating example:
we ran the redshift tests, and had three failures: redshift 1, redshift
2, and redshift transforms.

redshifts 1 and 2 timedout at 60 minutes. But the log upload failed
because the python transform tests failed in 24 minutes and then
uploaded:

from the transform failure run:

```
Run actions/upload-artifact@v4
  with:
    name: test-logs-be-tests-redshift-ee
    path: logs/test-log.json
    retention-days: 1
    if-no-files-found: warn
    compression-level: 6
    overwrite: false
    include-hidden-files: false
  env:
    CI: true
    ...
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
Uploaded bytes 1072768
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact zip is 267d4b085d49ca4d682fedca97832fecb603bbb5a52c0e1d99bd4daa49984ba3
Finalizing artifact upload
Artifact test-logs-be-tests-redshift-ee.zip successfully finalized. Artifact ID 4816135520
Artifact test-logs-be-tests-redshift-ee has been successfully uploaded! Final size is 1072768 bytes. Artifact ID is 4816135520
```

And then from the redshift tests:

```
Run actions/upload-artifact@v4
  with:
    name: test-logs-be-tests-redshift-ee
    path: logs/test-log.json
    retention-days: 1
    if-no-files-found: warn
    compression-level: 6
    overwrite: false
    include-hidden-files: false
  env:
    CI: true
    ...
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
```

The same happens on redshift part 1.

```
Error: Failed to CreateArtifact: Received non-retryable error: Failed
request: (409) Conflict: an artifact with this name already exists on
the workflow run
```

This just introduces on the driver action to look for a
logs-artifact-suffix and use it if present. And on driver jobs that use
a matrix include the matrix.job.name (or matrix.version.name depending
on the exact structure).
2025-12-09 16:57:10 -06:00
Cam Saul
d2d11e9ed0 Fix query normalization issues in v57 (#66722)
* Fix query normalization issues in v57

* Remain strict when saving a query

* replace bad dataset_query with legacy_query

* Test fixes 🔧

* Test/Kondo fix 🔧

---------

Co-authored-by: dan sutton <dan@dpsutton.com>
2025-12-09 14:12:26 -08:00
Jeff Bruemmer
3483583201 docs - note on Metabot usage (#66702)
* note on Metabot usage

* clean up

* clarification
2025-12-09 16:33:44 -05:00
Eric Normand
37ec35a0c3 Make card schema upgrade 23 a no-op (#66719)
* Make card schema upgrade 23 a no-op

* Fix kondo error

* Yay, fix kondo error in other file

* Appease the module check
2025-12-09 16:23:22 -05:00
Riley Thompson
c9969b6552 Revert "Hide cursor in the readonly native editor (#63774)" (#66727)
This reverts commit f901d08b1c.
2025-12-09 20:31:41 +00:00
Denis Berezin
4861323112 UXW-2448 fix untime error with viz settings (#66657) 2025-12-09 22:24:58 +03:00
Prathyush Shankar
b6eae5e33f [docs] Add StarRocks driver to community drivers list (#66720)
Co-authored-by: carc-prathyush-shankar <prathyush.shankar@carbonarc.co>
2025-12-09 14:12:26 -05:00
Aleksandr Lesnenko
235958555f Fix gauge trims decimal parts of ranges (#66714)
* fix floating point numbers usage in gauge

* trigger change only if changed
2025-12-09 18:33:23 +00:00
Dennis Schridde
9e3e43f14a Show different copy on Metabot AI purchase page after trial (#66706)
### Description

In https://github.com/metabase/metabase/pull/65343 we added a page to purchase Metabase AI (Metabot).  Now we are improving the text to:
* Show information about trial only if Metabot was not already trialed
* Improve wording regarding multiple questions / messages in chat

### How to verify

1. Ensure you have a token with the `offer-metabase-ai-tiered` feature, but without the `metabot-v3` feature.
2. Check that the subscription associated with the token had either with (test case 1) or without (test case 2) the `metabase-ai` or the `metabase-ai-tiered` add-on.
3. Navigate to `/admin/metabot` and see the page look like in the mock ups.

### Checklist

- [x] Tests have been added/updated to cover changes in this PR

Closes: https://linear.app/metabase/issue/CLO-4673/show-different-copy-on-metabot-ai-purchase-page-after-trial
Closes: https://linear.app/metabase/issue/CLO-4688/copy-correction-in-the-admin-panel
2025-12-09 18:57:12 +01:00
Egor Grushin
c9222983ee GDGT-1275 make refetching for bulk metadata editing (#66543)
* GDGT-1275 make refetching not only for current path but for all selected nodes.
2025-12-09 17:40:18 +00:00
Brad Anderson
4794cc3081 Fix #66585: Updates static embeds to omit color-scheme settings to preserve legacy transparent iframe behavior (#66662)
* #66585 Updates static embeds to omit color-scheme settings to preserve legacy transparent iframe behavior

* support public embed too (#66693)

* support public embed too

* Imports isPublicEmbedding to prevent app crash

---------

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

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-12-09 11:05:41 -05:00
Phoomparin Mano
4d72176b9e ci(sdk): fix broken docgen by adding interface modifier (#66695) 2025-12-09 15:54:59 +00:00
Sébastien
cc1ddc80f0 closes emb 1021 flaky test again (#66541) 2025-12-09 16:47:52 +01:00
Oleksandr Yakushev
92edd97120 [perf] Add and use m.u.performance/get-in (#65889) 2025-12-09 17:30:18 +02:00
Oleksandr Yakushev
002b049e11 [retry] Rewrite metabase.util.retry to use diehard instead of resilience4j (#66177) 2025-12-09 17:29:21 +02:00
Oleksandr Yakushev
85ab85b6cf Embed necessary part of crypto-random dependency and remove it (#66016) 2025-12-09 17:25:57 +02:00
Ryan Laurie
a09c470b1b Use the correct table icon for questions in the MiniPicker (#66485)
* use correct table icon

* update tests

* use viz icons for questions
2025-12-09 15:19:32 +00:00
Nicola Mometto
1b9b6bb524 Editable usage analytics (#66430)
* feat: db managemtn

* WIP: load yamls

* wip: transform

* feat: just toggle on load-analytics-content

* feat: export

* chore: user-email

* analytics-dev-mode

* wip: startup logic

* require ns for init

* kondo

* wip: export route

* wip

* fix api

* feat: download button

* refactor

* fix db yaml

* fix: skip db for import

* chore: move stuff around

* use is-audit-dev toggle

* internal setting

* tighter control on export

* lint FE

* perf

* lint fe

* jar aware

* feat: PR-Env-analytics-dev

* chore: use timer

* fail unless postgres

* tests

* fix tests

* throw out of future

* delete old shell command

* feat: mage commands

* fix: test

* fixes for mage commands

* chore: return schema

* cleanup

* fixes to mage commands

* fix: is-audit-dev can always connect, it's appdb

* update checked out analytics to latest format

* reset on teardown

* reinstate even if no edit

* add analytics:finalize for convenience

* exclude qrtz and liquidbase tables

* Update frontend/src/metabase/status/components/AnalyticsExportStatus/AnalyticsExportStatus.tsx

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

* Update frontend/src/metabase/collections/components/CollectionHeader/CollectionExportAnalytics.tsx

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

* Update frontend/src/metabase/collections/components/CollectionHeader/CollectionExportAnalytics.tsx

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

* address review comments

* relativize

* remove needless == true

* missing io/file

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
2025-12-09 13:01:52 +00:00
William
470db21b7f Native query parsing understands queries with dependent ctes (#66139)
If you have a query like "WITH query_a AS (...), query_b AS (select ... from query_a) SELECT ... from query_b",
native query parsing understood that query_b in the final query referred to query_b in the WITH, but it didn't realize
that query_a in query_b referred to query_a in the WITH.  Now, it should understand these sorts of depedent ctes.
2025-12-09 02:22:24 -06:00
Timofey Kachalov
d0b8578497 Adjusted auth controls for Guest Embed flow Wizard (#66548) 2025-12-09 09:20:40 +04:00
Egor Grushin
f720766374 GDGT-1315 actualize a branch (#66571) 2025-12-09 02:24:58 +00:00
Alexander Polyankin
4eea91f41d Add documents to broken card responses (#66638)
* add documents

* fix icon

* documents

* Fix lint

* Show documents for questions in the graph (#66663)

* Add documents

* Handle link

* show documents

* X

* Fix

* Fix

* Fix
2025-12-08 19:20:47 -05:00
Nemanja Glumac
f72633bd9f Add mise for automated dev environment setup (#66517) 2025-12-08 22:46:07 +00:00
dpsutton
43e2dce357 Include "all entries for" in mt/all-entries-for (#66668)
this should get all audit log entries for a given model and
model-id. but previously it was using t2/select-one. now it uses
t2/select. whoops
2025-12-08 16:22:31 -06:00
Aleksandr Lesnenko
eda5bd5102 add more specs, fix implicit joins, polish code (#66630) 2025-12-08 22:05:16 +00:00
Cam Saul
569b976fc0 Add Kondo linter to make sure all tests are in a known module and fix violations (#66561)
* Add linter

* `metabase.query-processor-test.*` => `metabase.query-processor.*`

* cljfmt and ignore namespaces outside of module system

* `metabase.timeseries-query-processor-test` => `metabase.query-processor.timeseries-test`

* `metabase-enterprise.upload-test` => `metabase-enterprise.sandbox.upload-test`

* move `metabase-enterprise.models.entity-id-test` into `serialization`

* `metabase-enterprise.content-management.api.collection-test` => `content-verification`

* `metabase-enterprise.notification.payload.core-test` => OSS `notification`

* rename other ee notification payload test namespace

* Last round of fixes? 🔧

* Fix tests 🔧
2025-12-08 21:31:57 +00:00
Riley Thompson
632b5f96a9 fix: format week of year ordinal string safely (#66667)
* check if we should remove square brackets from week of year ordinal

* add tests
2025-12-08 16:30:05 -05:00
Denis Berezin
19e4e35d00 Move documents feature to OSS (#66223)
* Move documents feature to OSS

* Remove plugin

* Move comments, remove public sharing plugin

* Fix some CI issues

* Move documents BE to OSS

* Move documents BE to OSS

* Move documents BE to OSS

* Move documents BE to OSS

* Move documents BE to OSS

* Fix bug with state

* Move rest enterprise imports

* Remove token checks from apis related to documents

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix BE tests

* Fix CI

* Fix CI

* Fix bookmarking a document

* Add branding footer for public document

* Add e2e tests

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* BE fixes for documents to oss  (#66511)

* reinstate sandbox test

* refactor circular deps

* fix: copy documents/comments

* fix path

* remote-sync tests are ee only

* ee only

* documents are not just ee

* kondo

* missing mapping

* set site-url

* fix broken tests

* Fix metabot plugin

* Fix issue where having a metabot block inside a document prevents it from loading when publicly shared (#66564)

* Prevents public document view from crashing when document contains a metabot node. Uses fallback similar to print version.

* Omits SupportingText drag handle when in read-only mode

* Adds e2e test to verify metabot blocks don't crash public documents and aren't editable within them

* Fix accidental spacing change

* Fix unit tests, cleanup e2e test

* fix after merge

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
2025-12-08 23:54:55 +03:00
Eric Normand
d6923507a8 Add schema 23 upgrade (#66601)
* If dataset_query is empty and legacy_query is not, copy legacy query over

* Fix kondo errors and bump schema to 23

* Remove parens

* Baseline update
2025-12-08 15:41:51 -05:00
dpsutton
0aa02bdc36 add events when making cards/dash public or retracting (#64582)
* add events when making cards/dash pubic or retracting

https://github.com/metabase/metabase/issues/64417

When we make a card public, we put a uuid on it and include
`made_public_by_id`. But when you retract the public link, we remove
both bits of information. This is a nice invariant but it removes
information about who publicized a card.

Imagine a card is discovered by have been public. Of course you want to
immediately remove it. But this erases the audit trail (so to speak) of
who made it public. It is not a great idea to delay remediation during
the investigation. Now you can just consult the audit log

* make events

* formatting

* clean up tests a bit

tests were a bit wack. We should have utility functions to get audit
events. Also noticed we are going off of the object id and ignoring the
object. Could lead to gross issues if there's dashboard with id 4 in
there and also card with id 4. so require model on new one

* fmt
2025-12-08 13:12:41 -06:00
Alexander Polyankin
609c502fde Data studio drop models from Library (#66631)
* Remove models

* Remove models

* Move

* Move

* Drop columns for model publishing

* Drop columns for model publishing

* Drop columns for model publishing

* Drop columns for model publishing

* Rename library-models to library-data

* Rename library-models to library-data

* Rename library-models to library-data

* Rename library-models to library-data

* Fix tests

* Fix table URLs
2025-12-08 14:07:28 -05:00
metamben
ecd6168888 Address review comments from #66262 (#66648) 2025-12-08 21:51:28 +03:00
Ryan Laurie
a0a9850b20 Remove URLs from entities (#66282)
* dont need entities for collections methinks

* entities don't handle icons anymore

* revert url change (for now)

* fix tests

* remove urls from entities

* lil fixes

* fix types

* fix indexed entity urls
2025-12-08 08:30:54 -07:00
Ryan Laurie
275d15ca70 dont limit search to library (#66572) 2025-12-08 08:30:33 -07:00
Rodrigo López Dato
aad277faca Remove SLACK_WEBHOOK_URL from .env.example (#66649) 2025-12-08 14:12:41 +00:00
Denis Berezin
8279532cbb UXW-2257 fix theme override after table render (#66620) 2025-12-08 16:26:30 +03:00
Nemanja Glumac
3f8c3b946a E2E setup follow up (#66588) 2025-12-08 21:11:09 +13:00
Oleksandr Yakushev
f4c5bc93d9 [equality] Implement faster inequality operation for Long arguments (#65642) 2025-12-08 01:24:59 +02:00
Oleksandr Yakushev
be2e7054af Replace a solitary usage of clojure.data.xml with clojure.xml (#66573) 2025-12-08 00:55:23 +02:00
Gabriel Moreno
f6937a7021 fix: change 'support agent' to 'Success Engineer' (#66629) 2025-12-06 14:24:57 -04:00
Alexander Polyankin
7e31d3b579 Tables in collections (#66262)
* Empty

* FE

* FE

* Collection items

* Collection items

* Collection items

* Collection items

* Collection items

* Collection items

* Breadcrumbs

* Breadcrumbs

* Breadcrumbs

* Collection menu

* Add collection_id and is_published to metabase_table

* E2E tests

* Extend /collection/.../items endpoints with tables

* Hydrate collection in /api/table/:id, /api/table/:id/query_metadata

* Set collection_id in publish-table endpoint

* Set is_published flag on publish

* Implement unpublish

* Skip mi/can-read? on nil

* E2E tests

* E2E tests

* Name

* Name

* Name

* Name

* Name

* Name

* Name

* Name

* Name

* Publishing

* Publishing

* Improve tests a little

* Format extract-test

* Remove extraneous modules

* Publishing

* Fix some tests and the module config

* Publishing

* Fix search config

* Publishing

* Publishing

* Publishing

* Unpublish tables when their collection is deleted

* Publishing

* Publishing

* Publishing

* Publishing

* Publishing

* Publishing

* Publishing

* Check data permissions when listing tables

* Test that GET /api/database/:id/schema/:schema returns is_published

* Join tables in search via the database or collection, not both

* Publishing

* Publish tables into the singleton models library

* Publishing

* Publishing

* Remove duplication

* Fix tests

* Fix more tests

* Fix test

* Remove duplication

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Extract data model

* Fix tests

* Fix picker

* Fix tests

* Fix HoneySQL expression

* Use case expression instead of MySQL specific if

* Fix picker

* Fix picker

* Fix picker

* Fix picker

* Fix picker

* Remove duplication

* Remove duplication

* Remove duplication

* Remove duplication

* Properly return collections for published tables in search

* Remove duplication

* Fix test

* Use standard MySQL boolean conversion

* Remove duplication

* Remove duplication

* Use postgres compatible query string

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Return the root collection for tables published into it

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix test

* Implement in-place search for MySQL

* Fix tests

* Fix tests

* Fix collections in MySQL search's table results

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Try casting to placate MariaDB

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Add CI debug logging for bit->boolean conversion

* Fix tests

* Fix tests

* Fix tests

* Fix spacing

* Fix spacing

* Fix spacing

* Fix below

* Fix below

* Fix below

* Fix below

* Throw an exception instead of debug logging

* Change publishing

* Change publishing

* Remove unused properties from response

* Handle MariaDB byte array booleans

* Remove unused properties from response

* fix tests

* Remove broken sorting

* Remove debugging exception and add pointer in comment

* Fix perms

* Update Loki Snapshots

* Make test verify that only superusers can (un)publish

* Merge master

* Tables in collections permissions (#66425)

* ,

* Add API return value schemas

* Fixes

* Fix formatting

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Centralize collection exports in core

* Remove trivial liquibase rollback instructions

* Fixes

* Fixes

---------

Co-authored-by: Tamás Benkő <tamas@metabase.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-12-05 20:39:51 -05:00
Nemanja Glumac
5e76c476e2 Clarify MB_PREMIUM_EMBEDDING_TOKEN env var usage (#66627)
Comment out MB_PREMIUM_EMBEDDING_TOKEN in .env.example to prevent
conflicts with Cypress tests that need to start from a clean state, and
set tokens programmatically.
2025-12-06 13:19:09 +13:00
bryan
13e378ff86 bump the hive jdbc library (#66523) 2025-12-06 00:27:49 +01:00
bryan
bcd33be0ae yaml migrations helper, into mage (#66486)
Co-authored-by: Oleksandr Solovyov <o@solovyov.net>
2025-12-05 23:05:00 +00:00
Nemanja Glumac
2164c3bb20 Expand .env.example with Global Context and Local Development sections (#66625)
Add structured configuration for:
  - Global credentials (GitHub, AWS, Docker Hub)
  - Local development settings (app database, server, SMTP, Slack)
  - Feature flags and license tokens

  Reorganize sections with clearer descriptions and documentation links.

  Summary:

  The .env.example now has three main sections:
  1. Global Context - Shared tokens (GitHub, AWS, Docker Hub)
  2. E2E / Cypress Testing - Unchanged, already vetted
  3. Local Metabase Development - App database config,
server/integrations (Jetty, SMTP, Slack), and feature flags
2025-12-06 00:00:18 +01:00
Noah Moss
60f60e1c9b Sort ids before comparison in published-models-test (#66619) 2025-12-05 15:31:30 -07:00
Nemanja Glumac
a87175627a Cache trunk between runs (#66602)
Trunk action supports `use-cache` that should prevent us hitting
GitHub's API rate limits.
2025-12-05 21:41:41 +01:00
Filipe Silva
b3d7753609 fix: strip some attached dwh config keys on update (#66594)
We considered a few options before settling on this one:
1. replace usecase with private HM API
2. disallow db updates via config.yml
3. add config.yml update semantics
4. work around this particular use of config.yml for cloud dwh

1 would be a fair bit of work and testing, 2 could break existing
customers, 3 was a bit of a rabbit hole, and 4 was hacky.

We decided for 1 long term, 4 short term in https://metaboat.slack.com/archives/C010ZSXQY87/p1764869574808769.

Fix https://linear.app/metabase/issue/CLO-4581/metabase-cloud-storage-gets-set-by-default-in-the-upload-csv-everytime
2025-12-05 19:48:31 +00:00
Riley Thompson
c4cabddf8e implement driver.sql/json-field-length for druid-jdbc driver (#66525) 2025-12-05 19:25:52 +00:00
Riley Thompson
88a6c07b9c add starburst ssh (#66568) 2025-12-05 13:26:54 -05:00
Eric Normand
c0238e6024 Add :aggregation as valid argument to a filter. (#66560) 2025-12-05 18:15:20 +00:00
Riley Thompson
ab51e0f700 Only use snowflake dbname value if db value is not present (#66534)
* only use dbname value if db value is not present

* trigger ci

* remove role setting

* trigger ci
2025-12-05 17:59:53 +00:00
Riley Thompson
7a98f93ad7 Include segments in dependencies graph (#66264)
* initial segments dependencies

* add initial frontend for segment dependencies

* fix segment details and dependency analysis version

* fix fe

* Collection menu

* E2E tests

* Add segment to segment dep

* add view this segment link

* add segment calculation and events tests

* fix whitespace

* Fix tests

* fix remaining tests

* fix kondo

* fix kondo

* self review

* include implicit join deps for segments

* whitespace

* fix test

* Fix i18n issue

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-12-05 16:59:09 +00:00
Riley Thompson
4bdbeedf8e exclude snowflake (#66600) 2025-12-05 11:50:57 -05:00
Egor Grushin
b0a44b283b fix: add correct valueFormat for DateInput (GIT-8486, #65480) (#66298)
* fix: add correct valueFormat for DateInput (GIT-8486, #65480)

* GIT-8486 add cleanup after changing locales
2025-12-05 15:25:39 +00:00
Braden Shepherdson
e39fa09638 [QP] If a :field ref by ID needs fallback metadata, include :join-alias (#66563)
Fixes #66464.

This was a corner case in `lib.field.resolution` and `qp.util.add-alias-info`
that regressed in 57. It made the QP less smart about repairing a certain
class of broken queries, which regrettably exist in the wild.

The breakage in question was a `:field` ref in later stage, which had a
numeric field ID and a `:join-alias`. If that field ID was not actually
returned as part of the join anymore, fallback metadata would be
generated by looking up the field by ID. That "works" for non-joined
fields but for an explicitly joined field it would use
`source."SOME_FIELD"` rather than `"The Join Alias"."SOME_FIELD"`, which
causes SQL compilation to fail.
2025-12-05 10:10:40 -05:00
Dennis Schridde
ae8a038ec0 Adjust layout of Metabot purchase page and add video demo (#66580)
### Description

In https://github.com/metabase/metabase/pull/65343 we added a page to purchase Metabase AI (Metabot).  Now we are improving the layout and content to better present the product.

### How to verify

1. Ensure you have a token with the `offer-metabase-ai-tiered` feature, but without the `metabot-v3` and `offer-metabase-ai` features.
2. Navigate to `/admin/metabot` and see the page look like in the mock ups.

### Checklist

- [x] Tests have been added/updated to cover changes in this PR

Closes: https://linear.app/metabase/issue/CLO-4669/make-small-changes-to-ai-page-in-admin
2025-12-05 16:04:27 +01:00
Noah Moss
2af3fde476 Experimental options for improving Metabot Search [resurrected] (#66528)
* Combine metabot search queries using OR

* Fix zero-terms edge case

* Point out a critical defect

* Urgent typo

* Add docstring to join-results-by-rrf function

Co-authored-by: crisptrutski <881351+crisptrutski@users.noreply.github.com>

* Use non-semantic fallback engine for term-queries

* Group experimental options together

* Small fixes and testing

* Workaround for semantic search matching unwatned stuff

* Renaming and wiring

* Remove unused import

* Remove sharp edge around 0 queries

* Fix bug in disjunction for legacy search. Test coverage for it.

* Complete comment

* Whitespace lint

* Try to fix new tests - run in semantic search test group, simplify test configuration

* More test fixes

* More test fixes

* Whitespace lint

* Make appdb search check more explicit

* don't run metabot semantic search tests on h2 because they rely on the appdb backend being available

* address test comments

* remove experimental flags; make this the normal behavior

* fix test

* fix disjunction on h2

* try again to fix search-test

* move search-test to metabase-enterprise.metabot-v3.tools.semantic-search-test since it now requires semantic search to be available

---------

Co-authored-by: Chris Truter <chris@metabase.com>
Co-authored-by: crisptrutski <881351+crisptrutski@users.noreply.github.com>
2025-12-05 14:45:02 +00:00
github-automation-metabase
335cb2c39e Update generated docs (master) (#66491)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-05 09:12:03 -05:00
github-automation-metabase
2227341d69 Update generated docs (master) (#66575)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-05 09:11:31 -05:00
Mahatthana (Kelvin) Nomsawadi
61b0f5f503 feat(sdk-package, embed-js): Subscription supports for SDK/EAJS (#66249)
* Add a subscription button for modular embeddings (#65704)

* Add an entry to the dashboard subscriptions on modular embeddings

* Hide the subscription when email hasn't been set up

* Add tests

* Add subscription button to interactive and editable dashboard components

* Make dashboard button styles consistent + expose subscriptions button

* Fix types

* Fix wrong default `aria-label` for `ToolbarButton`

* Support `withSubscriptions` prop

* Add tests

* Make it so that modifying tests would be easier

* clarify missing assertions with a comment

* Fix types

* Update Loki Snapshots

* Add `withSubscriptions` to storybook

* Remove duplicate test

* Fix comment date format

* Tighthen ToolbarButton prop type

* Avoiding cramping all test combinations into a single test

* Move shared tests to the correct directory

* Make the function parameter order makes more sense

* Simplify SDK dashboard button visibility logic

* Make shared tests more structured

---------

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

* Avoid showing other subscription channels (#66126)

* Make text search easier on an enum

* Prepare state for upcoming change

* Avoid showing the NEW_PULSE screen on SDK

* Add tests

* Fix tests

* Make mocking module more idiomatic

* Update subscription sidebar email edit view content (#66258)

* Update subscription sidebar email edit view content

* Add tests

* Improve test related variable name

* Properly memoize parent callback

* Add dashboard subscriptions option to EAJS dashboards (#66309)

* Expose `withSubscriptions` to EAJS dashboards

* Close subscription sidebar when unchecking `withSubscriptions` checkbox on EAJS

* Add `withSubscriptions` to EAJS dashboards

* Add tests + adjust no email setup tooltip condition

* Add missing unit tests mock

* Only closes sidebar when subscriptions sidebar is open

* Make guest embed warning tooltip aligned with its label

* Fix a test after merging guest embeds

* Update tooltip design from using hovercard to tooltip

* Close the subscription sidebar when the last pulse is archived (#66496)

* close the subscription sidebar when the last pulse is archived

* Ensure we only close the sidebar on the last subscription deletion

* Remove unused code

* simplify mocking

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* Added one happy path e2e test (#66506)

* Added one happy path e2e test

* .

* .

* Pass tests on CI with SMTP server

* Remove unused interceptions

* Use explicit assertions

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* Run maildev in CI

* Fix admins aren't shown subscription list page after creating first subscription (#66372)

* Run maildev in CI

* Fix admins aren't shown subscription list page after creating first one

* Fix test name typo

* Apply suggestions from code review

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* Fix tests after merging another PR

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* Make subscriptions on SDK/EAJS a Pro feature (#66392)

* Make subscriptions on SDK a Pro feature

* Add subscription only to EAJS on pro plan

* Correct directory name

* Fix InteractiveDashboard unit tests to use EE token

* Fix StaticDashboard tests to use EE token feature

* Fix EditableDashboard tests to use EE token feature

* Remove OSS tests because there's no SDK on OSS version

* Update Eajs related terms

* Allow subscriptions SDK plugin to be reinitialized

* Standardize plugin enabled property name for EAJS plugins

* Add embed wizard tests

* Add EAJS tests

* Fix OSS test

* Add missing assertions on Enterprise tests

* Optimize API calls on SDK/EAJS

* Clarify comments

* Use initialize plugin pattern for EAJS

* Fix test name

* Fix assertion because upstream content change

* Auto update EAJS subscriptions options after configure email

* Update no email setup tooltip

* Remove debugging code

* Try to fix 1 nasty E2E test

* Fix the samn test again

* Fix the E2E again™️

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-12-05 05:06:25 +00:00
Nemanja Glumac
fd47d82ba1 E2E test environment setup based on deps.edn :e2e alias (#66431) 2025-12-05 00:55:55 +00:00
bryan
b1ececbe32 Mage sounds (#66482)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-04 17:55:56 -06:00
Oleksandr Yakushev
185aa6841a Remove transducers and core.logic deps (#66510) 2025-12-05 01:50:40 +02:00
Jeff Bruemmer
01e4247864 docs - update quickstart (#66527)
* fix up quickstart

* versions

* consolidate clones

* fix link
2025-12-04 22:06:51 +00:00
Timothy S. Dean
deafc84886 Forward-port regression tests for Issue 66405 affecting v0.56 (#66557)
Copies in regression tests for an issue fixed in 0.56 that didn't affect later versions. Relates to Very Long Names in Tables.
2025-12-04 14:55:27 -07:00
Cam Saul
b4a13bb4c6 Add Kondo linter for defendpoint without response schema (#66294)
* Add Kondo linter for defendpoint without response schema

* Fix Kondo/cljfmt
2025-12-04 21:40:57 +00:00
Edward Paget
09a24ab09d fix: remote-sync icons matching non-collections (#66558) 2025-12-04 19:31:20 +00:00
Timofey Kachalov
5568ace394 Handle unknown theme preset (#66554) 2025-12-04 23:07:24 +04:00
dpsutton
2048f84d4b When setting settings, include 5 minute cookie of updated timestamp (#66338)
* When setting settings, include 5 minute cookie of updated timestamp

if other instances have outdated settings cache, this cookie will let
them know what the requestor has seen. The instance can then know it is
out of date. This won't help for instances that aren't hit by the person
setting the setting.

Motivating example is someone who is doing an embedding onboarding
checklist. And then hits a new instance that hasn't yet loaded the "show
embedding homepage" setting so it flips back to the regular
homepage. The hope here is the person doing this checklist will let the
other instance know it is out of date, reload the settings cache and
then see the embedding setting.

* Interesting strategy here for cookies.

I hated that the route would would set a cookie at a particular key, do
timestamp stuff, etc. I know ring is a map and abstraction, but i added
a new paradigm:

```clojure
(defn- add-settings-last-updated-cookie
  "Add a cookie with the current settings-last-updated timestamp to the response."
  [response]
  (assoc-in response [:mb/cookies :cookie/settings-cache-timestamp] true))
```

This means that just the middleware is responsible for checking and
setting this key. This was largely driven by two different namespaces
having a private def of:

```clojure
(def ^:private settings-last-updated-cookie-name "metabase.SETTINGS_LAST_UPDATED")
```

And it's nice if the ring map can indicate to this middleware to handle
all the key and timestamp stuff and it just has to indicate to set this
with `cookie/settings-cache-timestamp`.

So the request looks like this:

```clojure
{:status 204
 :headers {"X-Frame-Options" "DENY"
           "X-XSS-Protection" "1; mode=block"
           "Last-Modified" "Mon, 1 Dec 2025 17:09:59 GMT"
           "Strict-Transport-Security" "max-age=31536000"
           "X-Permitted-Cross-Domain-Policies" "none"
           "Cache-Control" "max-age=0, no-cache, must-revalidate, proxy-revalidate"
           "X-Content-Type-Options" "nosniff"
           "Content-Security-Policy" "...<lots of junk>..."
           "Expires" "Tue, 03 Jul 2001 06:00:00 GMT"}
 :body nil
 :mb/cookies {:cookie/settings-cache-timestamp true} ;; <---- our new addition
 :cookies {"metabase.DEVICE" {:value "60ac9454-9dd1-439a-afa1-921ff029686d"
                              :http-only true
                              :path "/"
                              :expires "Fri, 1 Dec 2045 17:09:59 GMT"
                              :same-site :lax}}}
```

And then in practice, it looks like this:

Set the setting and get a cookie with the timestamp in response:

```
❯ http put :3000/api/setting/site-name value=foo x-api-key:$KEY
HTTP/1.1 204 No Content
...
Set-Cookie: metabase.SETTINGS_LAST_UPDATED=2025-12-01+17%3A28%3A15.450873%2B00; Path=/; Max-Age=300; SameSite=Lax
...
```

Simulate sending to another instance with a timestamp that exceeds the
currently know timestamp (i'll increment the hour based sent back in
this response)

```
❯ http get :3000/api/user/current x-api-key:$KEY Cookie:metabase.SETTINGS_LAST_UPDATED="2025-12-01+18%3A23%3A51.059155%2B00" | jq '.date_joined'
"2025-12-01T16:51:08.137822Z"
```
(note the 18 vs the 17)

And the logs are this:

```
INFO middleware.settings-cache :: Settings cookie indicates cache is out of date. Refreshing...
DEBUG middleware.log :: GET /api/user/current 200 19ms (11 DB calls) App DB connections: 0/4 Jetty threads: 5/50 (5 idle, 0 queued) (245 total active threads) Queries in flight: 0 (0 queued) {:metabase-user-id 346}
```

* fixes:

- logged known timestamp not weird cookie value
- timestamp is optional, so handle that
- typo in log konwn -> known

* Add tests, add functionality

tests:
ensure it (a) sets the cookie, (b) honors the cookie, and when it
restores the cache, to set the cookie so it doesn't keep thrashing. But
presumably it won't since it's up to date. My "in the future" version is
a bit synthetic.

Functionality wise, updating the cache now returns and this will saet
the header with the most recent cache setting
2025-12-04 10:25:59 -06:00
Sébastien
421ac355e4 Closes EMB-1042 removed flaky e2e test and adds a unit test instead (#66424)
* Closes EMB-1042 removed flaky e2e test and adds a unit test instead

* yeah no timeout

* fixed poor rebase

* better use of fetchmock in unit test
2025-12-04 17:12:51 +01:00
Ryan Laurie
4d0695b9da Make GET /api/ee/library return null instead of message (#66440)
* fancy clojure

* fix frontend to use new format

* fix test
2025-12-04 15:49:57 +00:00
Nemanja Glumac
e8a68aaac0 Upgrade NextJS again (#66547) 2025-12-04 16:12:06 +01:00
Nick Fitzpatrick
fb7d69d69a hide Our Analytics if user does not have access (#66377)
* hide Our Analytics if user does not have access

* adjusting unit tests
2025-12-04 14:52:27 +00:00
Egor Grushin
e3a6420b78 e2e: add e2e reproduction (#66351)
* e2e: add e2e reproduction for adding custom column in Detail viz without saving #63181
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-12-04 13:13:12 +00:00
Timofey Kachalov
25fc5ea0c2 Add the "Theme preset" selection in Embed JS Wizard when no feature token is available (#66495) 2025-12-04 15:01:37 +04:00
Ryan Laurie
63fc190227 Fix icons in data studio collection table (#66530)
* fix icons in data studio collection table

* add unit tests for collectionPage

---------

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2025-12-04 02:53:54 +00:00
Anderson
438230281b Add Snowplow Events for Data Studio (#66383)
* Add Snowplow Events for Data Studio

* Clean up event list

* Drop data_studio_dependency_graph_opened
2025-12-04 00:20:11 +00:00
bryan
2aec7ccbe1 update mage alias + fix it for fish (#66526) 2025-12-03 16:32:36 -07:00
Nemanja Glumac
b748b7f206 dx: Dev bootstrap (#66501) 2025-12-04 00:12:12 +01:00
bryan
021ac994c9 fix port handling + remove top-level invocation (#66473) 2025-12-03 23:48:45 +01:00
Mohamed Elkmeshi
7ad8025757 Use Fixed Postgres Version and Add Persistent Volume to Prevent Data Loss (#66109)
Updated PostgreSQL image version to 16 and added volume for data persistence.
2025-12-03 17:16:53 -05:00
Nick Fitzpatrick
6d1a2ef106 drill into library collections when apropriate (#66438) 2025-12-03 16:49:53 -04:00
Noah Moss
7a5e659c14 Revert "Experimental options for improving Metabot Search (#65691)" (#66522)
This reverts commit c75dd94d02.
2025-12-03 20:37:39 +00:00
Aleksandr Lesnenko
c7acd66fbd Revert "data studio application permission (#66265)" (#66505)
This reverts commit e675d614d7.
2025-12-03 15:17:43 -05:00
Chris Truter
c75dd94d02 Experimental options for improving Metabot Search (#65691) 2025-12-03 19:02:11 +00:00
Riley Thompson
8ce3b6b406 use json unquote (#66512) 2025-12-03 18:29:31 +00:00
Egor Grushin
554ab26066 fix: show confirmation on escape, clickoutside and browser's back actions for SidebarCacheForm (#66173)
* fix: show confirmation on escape, clickoutside and browser's back actions for SidebarCacheForm (#53825)

additional: refactor useConfirmOnRouteLeave hook, add an ability to get router across application without property drilling using hook instead

# Conflicts:
#	frontend/src/metabase/plugins/index.ts

* fix: small adjustment

* fix: small adjustment

* fix: tests

* fix: tests

* fix: created useStackedSidesheets hook to help control stacked sidesheets

* adds a test for useStackedSidesheets that covers #53825 issue

* adds tests for useConfirmOnRouteLeave that cover #53825 issue

* rename useStackedSidesheets to useStackedModals. Add backward compatibility prop opened

* fix: add history provider as well for the future purposes.

* fix typings

* fix code based on comments from PR

* fix tests

* fix tests

* fix tests

* remove useStackedModals. Write e2e for all "closing" actions

* remove useStackedModals. Write e2e for all "closing" actions

* adjusted code according to PR comments

* fix tests

* make tests that asserts the confirmation modal showing if there are dirty form explicit in order to see which of them is broken in CI

* fix tests

* remove "forward" browser's button testing on trying to close a dirty form

* fix tests

* fix tests
2025-12-03 17:56:35 +00:00
Sébastien
3f83679f50 flaky flaky, eggs and baky (#66312) 2025-12-03 17:29:32 +01:00
Sébastien
f17e7985fa Closes EMB-1069 create new embed -> embed (#66457)
* Closes EMB-1069 create new embed - embed

* .
2025-12-03 17:28:48 +01:00
Eric Normand
e883cd1a66 Continue sync even if a table fails (#66432)
* Add reproduction test

* Fix for clickhouse
2025-12-03 10:18:56 -06:00
Oleksandr Yakushev
c9f40f60fc Replace nano-id dependency with already included Encore (#66413) 2025-12-03 14:33:59 +00:00
Sébastien
71a8b3f4c1 fix(sdk-cli): Fixes CLI quickstart not passing in the proper revision in query (#66493)
* Fixes CLI quickstart not passing in the proper revision in query

* .
2025-12-03 11:16:14 +01:00
Anderson
a33f7f45ee Fix sub-collections toggle to stick when permissions selector is closed / Handle permissions dirty state gracefully (#65928)
* Fix sub-collections toggle to stick when permission seletor is closed / Handle dirty state gracefully

* Add e2e tests

* Fix outstanding e2e tests

* Remove e2e test that was expecting the previous undesired behavior

* Update test that accounts for issue #30494

* Add clarifying comment
2025-12-03 00:00:33 -03:00
Anderson
f8d9445828 Keep bars with 100% height when hiding a segment in a 100% stacked chart (#66477) 2025-12-02 23:51:45 -03:00
LP
6a366df534 Fixes 60942 (#61080)
Fixes https://github.com/metabase/metabase/issues/60942

Co-authored-by: Riley Thompson <riley@metabase.com>
2025-12-02 23:09:52 +00:00
Denis Berezin
cd301be781 Persist selected theme in account settings (#66250)
* Persist selected theme in account settings

* Persist selected theme in account settings

* Add e2e

* Add e2e

* Review fixes

* Refactor initial value get to fix e2e tests

* fix e2e

* Fix BE module test

* Fix CI

---------

Co-authored-by: John Swanson <john.d.swanson@gmail.com>
2025-12-03 02:07:10 +03:00
Nick Fitzpatrick
ceb7f93db9 handle users with no first or last names in document comments (#66468) 2025-12-02 17:46:56 -04:00
Timofey Kachalov
581e723cc7 Fix props normalization. Adjust Interactive Embedding text. (#66465) 2025-12-03 01:18:05 +04:00
dpsutton
c8d0e466a3 better tests mimicing what i did in the backport (#66472) 2025-12-02 15:16:29 -06:00
Gabriel Moreno
f6a25e57ce UXW-2404 Remove toggle to disable anonymous analytics on cloud (#66469)
* fix: hide anonymous tracking toggle on cloud plans

* test: update general settings page suite

* fix: feedback on testing & token feature extraction
2025-12-02 15:56:06 -04:00
Aleksandr Lesnenko
e675d614d7 data studio application permission (#66265)
* data studio app permission

* actually transforms are for admins

* check permission for open in data studio

* Auto-set library permissions on data studio permission changes

* Fixed module references

* initial library collection perms

* Fixed module references

* Fixed module references

* Fixed lint errors

* perms

* specs, fixes

* ci

* data studio permission

* Added data-studio permission check to glossary

---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-12-02 14:34:29 -05:00
Nemanja Glumac
e50e049a35 Remove superfluous cache-key in e2e stress-test workflow (#66462) 2025-12-02 19:54:29 +01:00
Gabriel Moreno
36a0145de8 UXW-804 Fix collection name & description character limits (#66380)
* feat: add `maxLength` attributes to collection `name` and `description`

* test: update suites for `CollectionHeader`

* feat: update max length validation for `CollectionInfoSidebar`

* feat: update max length validation for `NewCollectionDialog`

* test: update `CollectionInfoSidebar` and `CollectionCaption` tests

* style: update toast color

* refactor: remove unreachable checks & assertions

* test: remove unnecessary checks and render spread
2025-12-02 17:56:31 +00:00
Sébastien
68fb668302 Closes EMB-1055 static embedding without a theme defaults to dark mode or system settings (#66320)
* Closes EMB-1055 static embedding without a theme defaults to dark mode or system settings

* types

* .
2025-12-02 17:53:04 +01:00
dpsutton
107738831d Lets not log when a user cancels a query (#66292)
* Lets not log when a user cancels a query

look how gross this is

```
2025-11-25 23:03:09,543 ERROR middleware.catch-exceptions :: Error processing query: ERROR: canceling statement due to user request
{:database_id 613,
 :parameterized false,
 :started_at #t "2025-11-25T23:03:03.698696Z[UTC]",
 :via
 [{:status :failed,
   :class clojure.lang.ExceptionInfo,
   :error "Error executing query: ERROR: canceling statement due to user request",
   :stacktrace
   ["--> driver.sql_jdbc.execute$execute_reducible_query$fn__452061$fn__452062.invoke(execute.clj:772)"
    "driver.sql_jdbc.execute$execute_reducible_query$fn__452061.invoke(execute.clj:767)"
    "driver.sql_jdbc.execute$eval451741$fn__451742$fn__451743.invoke(execute.clj:422)"
    "driver.sql_jdbc.execute$fn__451652$do_with_resolved_connection451651__451653.invoke(execute.clj:347)"
    "driver.sql_jdbc.execute$fn__451652$fn__451658.invoke(execute.clj:327)"
    "driver.sql_jdbc.execute$eval451741$fn__451742.invoke(execute.clj:416)"
    "driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:760)"
    "driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:749)"
    ...
     :state "57014",
 :error_type :invalid-query,
 :json_query
 {:lib/type "mbql/query",
  :stages [{:native "select 1, pg_sleep(40)", :lib/type "mbql.stage/native", :template-tags {}}],
  :database 613,
  :parameters [],
  :middleware {:js-int-to-string? true, :userland-query? true, :add-default-userland-constraints? true}},
 :status :failed,
 :class org.postgresql.util.PSQLException,
 :stacktrace
 ["org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2734)"
  "org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2421)"
  "org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372)"
  "org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:518)"
  "org.postgresql.jdbc.PgStatement.execute(PgStatement.java:435)"
  "org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:357)"
  "org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:342)"
  "org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:318)"
  ...
    "query_processor.streaming$_streaming_response$fn__108781$fn__108782$fn__108783.invoke(streaming.clj:225)"
  "query_processor.streaming$_streaming_response$fn__108781$fn__108782.invoke(streaming.clj:223)"
  "query_processor.streaming$do_with_streaming_rff.invokeStatic(streaming.clj:214)"
  "query_processor.streaming$do_with_streaming_rff.invoke(streaming.clj:201)"
  "query_processor.streaming$_streaming_response$fn__108781.invoke(streaming.clj:220)"
  "server.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:83)"
  "server.streaming_response$do_f_STAR_.invoke(streaming_response.clj:81)"
  "server.streaming_response$do_f_async$task__108307.invoke(streaming_response.clj:98)"],
 :card_id nil,
 :context :ad-hoc,
 :error "ERROR: canceling statement due to user request",
 :row_count 0,
 :running_time 0,
 :data {:rows [], :cols []}}

2025-11-25 23:03:09,570 DEBUG middleware.log :: POST /api/dataset 202 [ASYNC: canceled] 5888ms (8 DB calls) App DB connections: 0/6 Jetty threads: 5/50 (4 idle, 0 queued) (228 total active threads) Queries in flight: 0 (0 queued); postgres DB 613 connections: 0/1 (0 threads blocked) {:metabase-user-id 1}
```

how embarassing. we're just canceling a query. we don't need a stacktrace.

and after:

```
2025-11-25 23:39:40,197 DEBUG middleware.log :: POST /api/dataset 202 [ASYNC: canceled] 3076ms (8 DB calls) App DB connections: 1/10 Jetty threads: 4/50 (2 idle, 0 queued) (233 total active threads) Queries in flight: 0 (0 queued); postgres DB 613 connections: 0/2 (0 threads blocked) {:metabase-user-id 1}
```

note the post is cancelled but no big stack trace

* postgres test

* format file

* move postgres tests into postgres
2025-12-02 09:43:57 -06:00
github-automation-metabase
5009187cc3 Update generated docs (master) (#66451)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-02 10:09:22 -05:00
Jakub Chodorowicz
921351ca94 Gdgt 1216 table search should expand dbschema context for matches (#66393)
* WIP: add hierarchical search view

* refactor: reuse existing node models

* feat: handle schema and db selection

* feat: add expansions capability to search

* refactor: small cleanup

* refactor: reuse bulk selection utils on tree and search

* refactor: remove unused getParentSchemaTables

* feat: hide schemas in single schema dbs

* fix: tables in nameless schema are hidden

* test: add cypress tree search results tests

* refactor: type guards function names

* fix: clear selection when search results change

* refactor: handleItemSelect

* rework: use type guard helpers in more places

* rework: unneeded conditional

* refactor: simplify param passed to TablePickerResults

* refactor: remove type casting

* rework: remove unneded type casting

* refactor: simplify conditional

* internal: use existing key serializer

* feat: non languate dependend fallback db name

* rework: improve types

* rework: improve tree node types

* internal: improve useExpandedState to default to closed state

* refactor: use useCallback hook

* refactor: improve type

* refactor: remove confusing return in forEach
2025-12-02 15:34:13 +01:00
Jeff Bruemmer
367bb055ba docs - IAM auth note on postgresql (#66212)
* IAM auth note on postgresql

* move to rds

* rds

* mysql note on verify-ca

* Update docs/databases/connections/aws-rds.md

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

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-12-02 11:17:12 -03:00
Sébastien
eb3d8eb251 Closes EMB-1063 docs url (#66460) 2025-12-02 14:46:36 +01:00
Nemanja Glumac
aad6641a4b Remove custom MB_IS_CYPRESS flag (#66459)
We don't need it anymore because running Cypress now requires
a backend to be running in e2e mode.
2025-12-02 14:08:49 +01:00
Dan Stone
7626544f50 Data studio table filtering improvements (#66362)
* Add display_name filtering to table list

* Re-introduce mixed case LIKE for mysql/maria

Must have been lost in a merge conflict

* Escaping rules

* Kondo
2025-12-02 10:44:12 +00:00
Timofey Kachalov
bfc0e2077a feat(sdk, embed-js): Add Guest Embeds via Embed JS and SDK (#64850) 2025-12-02 13:22:11 +04:00
bryan
1591300b49 updated-files returns all-files + Mage cleanup (#66332) 2025-12-02 00:44:09 +00:00
Gabriel Moreno
741d2ddbab UXW-2310 Fix upsell CTA misalignment & stepper card overflow on custom fonts (#66443)
* fix: avoid breaking spaces on upsell CTA link

* fix: exchange `h` for `mih` on stepper card components and allow for flexible height
2025-12-01 19:20:58 -04:00
github-automation-metabase
0c4c8c06ab Update generated docs (master) (#66353)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-01 16:21:30 -05:00
Cam Saul
7f68894e80 New deps graph tooling to power Mage test watching (#66345) 2025-12-01 19:53:40 +00:00
Ryan Laurie
b933496d37 Don't use entities for Icons (#65633)
* dont need entities for collections methinks

* entities don't handle icons anymore

* revert url change (for now)

* fix tests

* fix verified model icon

* consistent handling of verified model icons
2025-12-01 12:32:53 -07:00
Jeff Bruemmer
32d69c1a4f remove env vars that now have defsettings (#66434) 2025-12-01 19:23:55 +00:00
Alex Yarosh
7096051905 Docs: DBs for editable tables (#66276)
* Add Metabase Sample Database to editable tables support

Updated the list of databases that support editable tables to include Metabase Sample Database.

* Update docs/data-modeling/editable-tables.md

* Update docs/data-modeling/editable-tables.md
2025-12-01 14:07:10 -05:00
Nemanja Glumac
e88075f7d4 Fix snapshots for backport compatibility tests (#66433) 2025-12-01 19:50:28 +01:00
github-automation-metabase
13db04d7a0 Update generated docs (master) (#66300)
Co-authored-by: github-actions <github-actions@github.com>
2025-12-01 13:43:39 -05:00
Jeff Bruemmer
3ae80a41da don't run on draft prs (#66426) 2025-12-01 12:13:37 -05:00
Eric Normand
6414a9d73b Closed connection with many fields (#66051)
Fix legacy path (for snowflake with large number of fields)
2025-12-01 15:53:12 +00:00
Gabriel Moreno
19a79d96c1 Add gantoreno to team.json and github-slack-map.json (#66334)
* feat: add myself (gantoreno) to `team.json` and `github-slack-map.json`

* fix: correct username alphabetical order
2025-12-01 11:01:41 -04:00
Nemanja Glumac
637fa143ff Provide minimal sane defaults to the Cypress runner (#66398)
- If you decide to build the backend, you should run it
- There are no more derived options - everything is explicit
- Running Docker containers is a non-negotiable
    - Tests need these supporting services to run
    - If you really insist on not running them, either comment out those lines temporarily or do not use this script to set up the e2e environment
    - Because of this, there are no more custom envs `QA_DB_ENABLED` and `CYPRESS_QA_DB_MONGO`
- Alternative location (directory) for the e2e copy of the sample-application.db is now set to be `e2e/tmp` since it's already gitignored
2025-12-01 15:44:48 +01:00
Riley Thompson
8393eb2820 Use backfill specific event to prevent card revisions (#66401)
* use backfill specific event

* fix kondo

* add test

* fix config modules

* add migration

* remove migrations
2025-12-01 14:20:52 +00:00
Brad Anderson
e67f25b401 UXW-2209 Update datamodel tracking triggered_from (#66259)
* UXW-2209 Updates datamodel tracking triggered_from to be either "data_studio" or "admin" depending on where the metadata is being edited

* Updates e2e tests
2025-12-01 09:13:11 -05:00
Brad Anderson
39dfac795e UXW-2352 Fix issue where CopyCardForm resets when the destination collection is changed (#66275)
* UXW-2352 Fix issue where CopyCardForm resets when the destination collection is changed

* Unskips now-passing e2e tests

* Fix issue where Duplicate modal doesn't close on success
2025-12-01 09:12:42 -05:00
Egor Grushin
9bef191295 small ui fixes GDGT-1276 (#66406)
* fix GDGT-1276

* fix tests
2025-12-01 12:07:18 +00:00
Nathan Voxland
520de22c5e Fixed semantic-search filtering by collection (#66286) 2025-11-30 20:28:21 -06:00
Oleksandr Yakushev
67a99bb92d [perf] More efficient validator-cache old key eviction (#65890) 2025-11-29 20:03:33 +02:00
Nick Fitzpatrick
cbe07addba should show library (#66343)
* should show library

* tests

* more tests

* types

* uxw-2344

* I guess I forgot this?
2025-11-28 14:33:53 -04:00
Nemanja Glumac
4efe26824e Explicitly use the backend JAR for local Cypress runs (#66349)
The previous version of the build script (`build-for-test`) had a weird quirk that could be both confusing and dangerous. It was building a backend-only JAR in the same location and under same name as the full-blown, all-in-one Metabase JAR. This means that, by running Cypress locally, one could easily override the previously built healthy JAR. It's not catastrophic but it was confusing.

This PR makes it perfectly clear what we're doing, and there should be no conflicts between the JARs any longer.
2025-11-28 12:01:27 +00:00
Nemanja Glumac
b7ff644e78 Have a dedicated runner for SDK host/sample apps (#66378) 2025-11-28 10:09:03 +01:00
Nick Fitzpatrick
ccbda1251f updating watermark svg color and opacity (#66339)
* updating watermark svg color and opacity

* static viz development mark has same color and opacity as dynamic viz
2025-11-27 12:40:49 -04:00
Stas Gavrylov
a07c3b654e Incremental transforms (#65842)
* library collection search

* Fix e2e tests from group-16

* Fix a couple tests from group 42

* Fix e2e tests from group-17

* Fix e2e tests from group-18

* tests: add bulk publishing scenario

fix wrong collection link in case of root collection

* UXW-2315, UXW-2314

* UXW-2294

* more UXW-2315, UXW-2314

* more UXW-2315, UXW-2314

* correct collection types

* Remove Browsing Memory Feature

* Revert "Revert "Don't return library collections by default from APIs""

This reverts commit 814c49473b.

* Revert "Revert "Fixed null type filtering""

This reverts commit 25e0d78408.

* fetch full tree to have library collections visible

* show library in permissions

* Fixing tests

* fix infinite re-render in tree

* rewrite unit tests and fix max depth problem

* fix: publish property not validated in the tree view after table publishing

* Move bulk editing apis to enterprise (#65968)

* Make sidebar sticky

* test: bulk attribute actions for tables, schemas and dbs

* fix more unit tests

* Copy preview section tests

* Copy error handling tests

* Copy undos tests

* Update test

* test: update new ee endpoints paths

* Make new bulk table APIs ee-only (fe)
- Closes GDGT-1251

* Fix global H.DataModel.visit overrides

* Remove redundant cy.reload

* Remove redundant cy.reload

* add select/deselect tests

* use helper

* data picker using proper library endpoint. Fixing types I broke. Endless Shame

* Fix Tree skeleton resizing multiple times during loading
- Closes GDGT-1253

* Improve icon

* Fill content

* don't call getCollectionItems on database collection

* add search tests and support shift click in search

* default table publish collection

* fox: reset bulk form values when selection changes

* Fix e2e tests from group-19

* fix:  fix missing dependencies in useEffect gdgt-1245

* test: refactor test setup action order

* Fix e2e tests from group-20

* Fix e2e tests from group-22

* Fix e2e tests from group-23

* test: restore default db as the first step

* Kondo the kondo config

* default collections for metrics and models outside of data studio

* Move edit test to ee

* Fix list filtering now default is bronze

* Move bulk-edit-test to ee

* Fix table metadata for test

* Revert "Added `collection` argument to search"

This reverts commits:
- 21999e01
- b0f71c03ea
- 4fa0c3b422

* Fixed OSS loading of tables

* Fixed OSS loading of tables

* add tests for filtering

* Fix e2e tests from group 41 / joins-repros

* more tests

* Fix e2e tests from group-20

* Fix e2e tests from group-23

* Fix e2e tests from group-24

* Fix e2e tests from group-26

* Fix e2e tests from group-27

* Fix e2e tests from group-28

* Fix e2e tests from group-30

* constuct initial paths from library collections

* segments editor, hasEnabledNestedQueries

* Fix a couple more (something between groups 40 and 43)

* Fixed module config

* keyboard navigation

* Added library/tree API

* Fix some e2e tests from groups 40 and 42

* Fixing tests

* disable scoped search on the 'database collection', models.cy.spec should be passing now

* Fix e2e tests from group-33

* Minor cleanup

* Fix e2e tests from group-34

* Fixing tests

* Fix e2e tests from group 37 (except one depending on Recents tab)

* Starts fixing e2e tests from oss group

* cleanup

* wait to focus

* hide our analytics in the data studio

* Added library/tree API

* merge library and data studio

* change backend library flag validation to data-studio

* tidy things up

* Make bulk edit inputs non-clearable
- This prevents sending "empty" requests when clearing values
- And clearing does not really make sense here

* fix: test: table rescan and discard mocks are wrong

* fix: test: wrong mock in oss sync table schema

* Remove ^:parallel from bulk edit tests

They can contend and cause deadlocks

* fix: test: failure due to repeated mocking of same route

* test: refactor: cypress table tests

* Update e2e test

* Update e2e test

* Update e2e test

* fix browse nav section test

* Add missing token

* add check icon for published tables

* Removed unused import

* Updates some e2e tests from oss group, removes some now-invalid tests

* test: use default external db, skip transform test

* Starts fixing e2e tests from mongo group

* remove background from not active table in search

* specs

* Fix e2e tests from group-15

* hack fix ci while i'm on meetings

* scoped search is back

* Fix some e2e tests from group-32

* table picker fixes

* Fixed merge

* Fix e2e test from group-42

* merge fixes

* re-enable the recents tab on the data picker modal

* Avoid race condition on list-table-filtering-test

* fix embedding types

* mini picker unit tests

* Fixing tests

* ci, fixes

* fix library collection bugs

* cleanup data studio plugin

* fix lots of unit tests

* fix import

* fix

* Fixed unused import

* Fixed accidental #p

* ci

* revert util

* specs

* specs

* specs

* fix bug / bad type in SchemaFormSelect (#65995)

* Use actual anti join in GET /table query

* Remove old comments

* Activate token after restore

* test: unskip table metadata transform test

* test: fix search tables e2e test

* fix: test: selection in table picker

* Fix Source input disabled when filtering by Metabase transform
- Closes GDGT-1259

* test: fix: filter unused table

* Fix e2e test

* fix: test: datamodel toasts and errors

* Fix e2e test

* Fix e2e tests from group-9

* Fix flaky tests

* GDGT-1244: Fix DB tree virtualization (#66125)

* GDGT-1244: Fix tree virtualization. Replace top with translateY to improve performance

* GDGT-1244: Fix scroll bug. Refactor border styling

* bring back modeling empty state

* test: adjust publishing test

* Fix e2e test from group-22

* Fix e2e test from group-25

* fix allowing cross DB joins

* properly disable invalid items in MiniPicker

* Fix e2e test from group-26

* Fix straggler from oss group

* Starts fixing e2e tests from group-32

* unit test adjustments

* Fix remaining issue with e2e group 37

* fix item filtering

* Update Loki Snapshots

* add recent views to mini picker

* test recents and backparsing

* additional filtering test

* fix minipicker shows items it should not show

* Fixed :here in library API

* Fixed :here in library API

* UXW-2358 publishing outside of the data studio

* Fixed :here in library API

* snapshot

* Fix most e2e tests from group-32

* Lint fixes

* Fixed failing test

* revert fix

* Reapply "Added `collection` argument to search"

This reverts commit f28d9d5af9.

* Quick fix in CollectionPicker/utils.ts

* Fix flaky Remote Sync test (#65862)

* Clean up backend-test matrix (#66158)

* Fix timeseries value detection (#66161)

* Prevent driver tests (#66156)

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>

* Fetch uberjar using a proper action (#66165)

* fix embedding column picking

* Trying CI with search_index.verified

* Fixed failing test

* Translate label

* Fixed failing test

* fix: published info not updated in the tree picker after deleting model

* fix: refactor: publish collection link tests

* Fixed failing test

* Fix remaining e2e tests from group-32

* FileUploadStatus unit test, quesiton reproductions

* create data studio plugin file

* fix hidden items some more

* Fix issue where confirmation modal closes then reopens again then closes again when you archive a dashboard

* fix dark mode

* UXW-2367

* UXW-2378

* Fixed merge issues

* this element is not visible because you can't even open incompatible sample database db

* Fix e2e test from group-14

* fix embedding data picker clicks

* filtering fixes for transforms

* UXW-2372

* update mini picker specs after a fix

* fix flaky join test

* Fixing in-place support for collections

* fix: cannot scroll search results

* ui: tweak search results checkbox spacing to match tree results

* fix: scroll position jump when entering field sort mode gdgt-1269

* Revert "fix: scroll position jump when entering field sort mode gdgt-1269"

This reverts commit bfecdec661.

* UXW-2279 Changes Data Studio's Glossary page background color to background-secondary

* Fix linters

* Fix e2e tests

* fixes for sqlserver

* fix driver changelog

* fix

* more fix

* fix: support params in bigq

* fix: inline params for sqlserver

* fix test

* fix: we do want the unique key

* fix: missing nil in test

* fix clickhouse

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Anderson <anderson@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub@chodorowicz.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
Co-authored-by: dpsutton <dan@dpsutton.com>
Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
2025-11-27 15:52:19 +00:00
Anderson
e80478b006 Prevent database sync status element to overlap pagination (#66225) 2025-11-27 11:16:01 -03:00
Anderson
c8d87bdf7b Do not allow setting up remote sync if git url is not set (#66281) 2025-11-27 11:14:41 -03:00
Anderson
e2ec2f6aff Fix broken PDF export layout due to CSP violation for inline styles (#66337) 2025-11-27 11:14:20 -03:00
Nick Fitzpatrick
ce9ac84ecc Update selector for loki test in Palette.stories (#66333) 2025-11-27 10:07:03 -04:00
Nemanja Glumac
66b5043940 Make file-path triggers more robust (#66311)
This pull request refactors and streamlines the configuration for CI workflows and file path groupings in .github/file-paths.yaml and updates related workflow logic in .github/workflows/run-tests.yml. The changes focus on consolidating shared configuration, improving maintainability, and removing redundant or unused path groups.
2025-11-27 14:01:33 +01:00
Ngoc Khuat
2b607f547a fix false positive logs (#66325) 2025-11-27 12:50:47 +00:00
Jakub Chodorowicz
0400e1bf07 fix: scroll position jump when entering field sort mode gdgt-1269 (#66318)
* fix: scroll position jump when entering field sort mode gdgt-1269

* test: fix failing unit test selector

* fix: e2e test selectors

* fix: test selectors for sync button

* test: adjust sync button selector

* test: fix semantic selector

* Update enterprise/frontend/src/metabase-enterprise/data-studio/data-model/components/TableSection/TableSection.tsx

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

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-11-27 10:48:43 +01:00
appleby
df5abbd1b9 Add :database_type to metabot tools that return column metadata (#66302)
* Add :database_type to metabot tools that return column metadata

Add :database_type to metabot tools that return column metadata in order to give metabot information about the real
database type when generating SQL.

Examples of places the :database_type now appears:

- :used_tables in :user_is_viewing context
- {table,card,metric}-details
- get-query-details
- enhanced-database-tables

* Fix test after rebase onto #66271

Fix get-table-details-database-type-test after rebase (1) use new field-id formatting (2) get-table-details no longer returns implicitly-joinable fields
in the top-level `:fields`.
2025-11-26 23:32:44 +00:00
Egor Grushin
99fa786ec8 fix: flake test number 29943 (#66283)
* fix: flake test number 29943

* mark moveDnDKitElement as deprecated, fix singleused constant
2025-11-26 22:08:24 +00:00
Noah Moss
b561b5c8b9 Revised approach to related_tables and consistent field IDs for implicitly-joined fields (#66271)
* More flexible approach to resolving columns from metabot field_ids

* fix one field-stats-test

* fix field-stats-test

* support nano-ids in field ids (?)

* remove some dead code

* Exclude implicitly joinable fields when fetching cols for table

* try switching field format to use dash

* fix field IDs in a number of tests

* Kondo

* add some unit tests for new field parsing & column lookup helper fns

* Fix more tests

* Fix more tests

* fix regex

* New approach -- use wide field IDs in related_tables and add a related_by field for each table

* Fix some tests

* remove unneeded table

* cleanup, new test

* Revert to passing in & matching on expected prefix

* Address tyler's comments

* accept a regex for the prefix as well

* add back small malli group-by fix from the last PR - removed unintentionally during revision
2025-11-26 15:48:30 -05:00
Nathan Voxland
f2e8e294f8 Add warning for when mismatch in serdes version during loading (#66140) 2025-11-26 14:30:15 -06:00
Riley Thompson
8257c072a9 Revert "Bump com.clickhouse/clickhouse-jdbc from 0.8.4 to 0.9.2 (#64168)" (#66326)
This reverts commit 31f76f5856.
2025-11-26 17:59:28 +00:00
Denis Berezin
08770c8e8f UXW-1778 remove chart hover effects when exporting to png (#66200)
* UXW-1778 remove chart hover effects when exporting to png

* Fix typing and unit tests

* review fix
2025-11-26 19:02:51 +03:00
Nemanja Glumac
4ef178f794 Support building an uberjar with a custom filename (#66315)
* Make uberjar (artifact) file name configurable via env var

Add the ability to customize the output filename for the uberjar build
via the MB_JAR_FILENAME environment variable. This allows backend-only
test builds to use a separate filename (e.g., metabase-backend.jar)
to avoid overwriting the regular all-in-one metabase.jar.
2025-11-26 15:45:19 +00:00
Gabriel Moreno
89443cda94 UXW-2228 Properly mention available subscription & alert channels for non-admins (#66273)
* fix: add missing channels to copy & rendering logic

Mentioned webhooks and Slack where necessary to stay consistent with the
admin UI

* fix: standardize lowercase 'admin' & prefer 'email' over 'SMTP'

* fix: remove extra comma on wording

* test: adjust e2e test assertions

* test: add `DashboardSubscriptionMenuItem.unit.spec.tsx`

* test: extract single case from `describe` block

* test: fix subscriptions e2e case & text lookup on alert spec
2025-11-26 15:04:34 +00:00
Edward Paget
99fd1809cb Get user attributes from attributes map (#66274)
* Get user attributes from attributes map

* fixup! e2e test
2025-11-26 14:38:33 +00:00
Braden Shepherdson
868fb6da0a [MBQL lib] Allow string literals as arg to aggregations like :max (#66220)
Fixes #66199.

`metabase.legacy-mbql.schema`, now used for normalizing MBQL 4 in
place of the old bespoke normalization in earlier versions, regressed in
this weird but legitimate use case: Writing a custom aggregation like
`MAX("String Literal")`.

That's an odd thing to do, but it can be useful to provide a label in an
aggregated query. This is the MBQL equivalent of
`(SELECT ..., 'A' as label FROM ...) UNION ALL (SELECT ..., 'B' as label ...)`
2025-11-26 13:28:57 +00:00
Nicolò Pretto
8a56f6b3bb update file path to include tsx extension for component tests (#66254) 2025-11-26 11:00:31 +01:00
github-automation-metabase
384d24a75b Bump org.clojure/tools.cli from 1.1.230 to 1.2.245 (#64159)
Inspect dependency changes here: https://github.com/clojure/tools.cli/blob/v1.2.245/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-26 00:04:43 +00:00
Cam Saul
e94dd16252 Split Redshift driver tests into two jobs (#66289) 2025-11-25 15:39:13 -08:00
Fraser
561d578043 Fix eslint cache (#66066) 2025-11-26 12:29:56 +13:00
github-automation-metabase
6f778c9269 Bump com.google.guava/guava from 33.4.8-jre to 33.5.0-jre (#63796)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-11-25 23:03:44 +00:00
bryan
9b93bfe279 Only real app-dbs should print setup instructions (#66255) 2025-11-25 23:03:06 +00:00
Nemanja Glumac
dc89b2bbeb Decouple the cleanup logic from running Cypress (#66236)
This pull request refactors the Cypress runner utility to simplify error handling and improve consistency in how test failures are reported. The main change is that runCypress now throws errors on test failures instead of relying on an external exit or cleanup function, which streamlines its usage across different scripts.

This ensures consistent error propagation and simplifies the control flow for callers.
2025-11-25 23:10:02 +01:00
github-automation-metabase
538ebb5f08 Bump cheshire/cheshire from 6.0.0 to 6.1.0 (#63217)
* Bump cheshire/cheshire from 6.0.0 to 6.1.0

Inspect dependency changes here: https://github.com/dakrone/cheshire/blob/6.1.0/ChangeLog.md

* update timestamps to match new cheshire parsing

---------

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2025-11-25 22:02:13 +00:00
Nemanja Glumac
e4325d4e02 Always pass the input conditions to sdk jobs (#66269) 2025-11-25 22:56:17 +01:00
bryan
b453baf5ed Upgrades mage run-tests (#66108) 2025-11-25 21:42:28 +00:00
github-automation-metabase
773a588692 Bump org.apache.commons/commons-lang3 from 3.18.0 to 3.19.0 (#64150)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-11-25 21:38:24 +00:00
github-automation-metabase
31f76f5856 Bump com.clickhouse/clickhouse-jdbc from 0.8.4 to 0.9.2 (#64168)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-11-25 21:35:15 +00:00
github-automation-metabase
81f10bdb3c Update generated docs (master) (#66228)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-25 21:34:41 +00:00
github-automation-metabase
3dcfbce301 Bump org.apache.calcite.avatica/avatica from 1.26.0 to 1.27.0 (#64402)
Inspect dependency changes here: https://github.com/apache/calcite-avatica/compare/avatica-1.26.0-rc0...avatica-1.27.0-rc0

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-25 21:17:19 +00:00
appleby
5c10e2d7a3 Add :database_engine to metabot table-details and card-details (#66227)
These tools already included :database_id in the results; we now include the :database_engine as well, to give metabot
a reminder about which SQL dialect it should generate.
2025-11-25 12:03:13 -08:00
github-automation-metabase
53f51fa289 Bump org.apache.arrow/arrow-memory-netty from 17.0.0 to 18.3.0 (#64401)
* Bump org.apache.arrow/arrow-memory-netty from 17.0.0 to 18.3.0

Inspect dependency changes here:

* Upgrade arrow-memory-core to version 18.3.0

Updated the version of arrow-memory-core from 17.0.0 to 18.3.0.

* Consolidate changes

* Fix formatting

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Cam Saul <github@camsaul.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-25 19:41:46 +00:00
github-automation-metabase
4280e1af7a Bump org.jsoup/jsoup from 1.21.1 to 1.21.2 (#62652)
Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.21.2/CHANGES.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-11-25 19:31:30 +00:00
Phoomparin Mano
0a2255c36f ci(sdk): only setup specific enterprise plugins in sdk unit tests as needed (#66238) 2025-11-26 02:03:22 +07:00
bryan
e1e8d53234 add deprecation support to defendpoint dox-gen (#66053) 2025-11-25 18:35:00 +00:00
Nemanja Glumac
cca02fcf31 Fix JAR health check condition logic (#66266)
Addresses this finding by the Claude code review:
https://github.com/metabase/metabase/pull/66237#discussion_r2560704357
2025-11-25 19:23:11 +01:00
Noah Moss
eb4a9f528e Move audit installation before search initialization again (#66222) 2025-11-25 12:02:01 -05:00
Nemanja Glumac
6e30ce468c Run JAR health check only on master and release branches (#66237) 2025-11-25 17:43:27 +01:00
Alexander Polyankin
96eac2d9da Data Studio (#65281)
* Fix some e2e tests from group-9

* test: add bulk sync action e2e test

* fix column selection

* Fixed module config

* Fix a few e2e tests from oss group

* Fix e2e tests from groups 46 and 47

* Fix e2e tests from groups 44 and 45

* Fix group-3 straggler, some of group-8

* Potentially disastrous change (increases item-picker-level of SchemaList and TableList) to fix test in group-8

* Fix group-6 straggler, some more of group-8

* Updates some more e2e tests from group-9 (some actual failures left)

* Fix e2e tests from group-14

* do enterprise code correctly

* library collection search

* Fix e2e tests from group-16

* Fix a couple tests from group 42

* Fix e2e tests from group-17

* Fix e2e tests from group-18

* tests: add bulk publishing scenario

fix wrong collection link in case of root collection

* UXW-2315, UXW-2314

* UXW-2294

* more UXW-2315, UXW-2314

* more UXW-2315, UXW-2314

* correct collection types

* Remove Browsing Memory Feature

* Revert "Revert "Don't return library collections by default from APIs""

This reverts commit 814c49473b.

* Revert "Revert "Fixed null type filtering""

This reverts commit 25e0d78408.

* fetch full tree to have library collections visible

* show library in permissions

* Fixing tests

* fix infinite re-render in tree

* rewrite unit tests and fix max depth problem

* fix: publish property not validated in the tree view after table publishing

* Move bulk editing apis to enterprise (#65968)

* Make sidebar sticky

* test: bulk attribute actions for tables, schemas and dbs

* fix more unit tests

* Copy preview section tests

* Copy error handling tests

* Copy undos tests

* Update test

* test: update new ee endpoints paths

* Make new bulk table APIs ee-only (fe)
- Closes GDGT-1251

* Fix global H.DataModel.visit overrides

* Remove redundant cy.reload

* Remove redundant cy.reload

* add select/deselect tests

* use helper

* data picker using proper library endpoint. Fixing types I broke. Endless Shame

* Fix Tree skeleton resizing multiple times during loading
- Closes GDGT-1253

* Improve icon

* Fill content

* don't call getCollectionItems on database collection

* add search tests and support shift click in search

* default table publish collection

* fox: reset bulk form values when selection changes

* Fix e2e tests from group-19

* fix:  fix missing dependencies in useEffect gdgt-1245

* test: refactor test setup action order

* Fix e2e tests from group-20

* Fix e2e tests from group-22

* Fix e2e tests from group-23

* test: restore default db as the first step

* Kondo the kondo config

* default collections for metrics and models outside of data studio

* Move edit test to ee

* Fix list filtering now default is bronze

* Move bulk-edit-test to ee

* Fix table metadata for test

* Revert "Added `collection` argument to search"

This reverts commits:
- 21999e01
- b0f71c03ea
- 4fa0c3b422

* Fixed OSS loading of tables

* Fixed OSS loading of tables

* add tests for filtering

* Fix e2e tests from group 41 / joins-repros

* more tests

* Fix e2e tests from group-20

* Fix e2e tests from group-23

* Fix e2e tests from group-24

* Fix e2e tests from group-26

* Fix e2e tests from group-27

* Fix e2e tests from group-28

* Fix e2e tests from group-30

* constuct initial paths from library collections

* segments editor, hasEnabledNestedQueries

* Fix a couple more (something between groups 40 and 43)

* Fixed module config

* keyboard navigation

* Added library/tree API

* Fix some e2e tests from groups 40 and 42

* Fixing tests

* disable scoped search on the 'database collection', models.cy.spec should be passing now

* Fix e2e tests from group-33

* Minor cleanup

* Fix e2e tests from group-34

* Fixing tests

* Fix e2e tests from group 37 (except one depending on Recents tab)

* Starts fixing e2e tests from oss group

* cleanup

* wait to focus

* hide our analytics in the data studio

* Added library/tree API

* merge library and data studio

* change backend library flag validation to data-studio

* tidy things up

* Make bulk edit inputs non-clearable
- This prevents sending "empty" requests when clearing values
- And clearing does not really make sense here

* fix: test: table rescan and discard mocks are wrong

* fix: test: wrong mock in oss sync table schema

* Remove ^:parallel from bulk edit tests

They can contend and cause deadlocks

* fix: test: failure due to repeated mocking of same route

* test: refactor: cypress table tests

* Update e2e test

* Update e2e test

* Update e2e test

* fix browse nav section test

* Add missing token

* add check icon for published tables

* Removed unused import

* Updates some e2e tests from oss group, removes some now-invalid tests

* test: use default external db, skip transform test

* Starts fixing e2e tests from mongo group

* remove background from not active table in search

* specs

* Fix e2e tests from group-15

* hack fix ci while i'm on meetings

* scoped search is back

* Fix some e2e tests from group-32

* table picker fixes

* Fixed merge

* Fix e2e test from group-42

* merge fixes

* re-enable the recents tab on the data picker modal

* Avoid race condition on list-table-filtering-test

* fix embedding types

* mini picker unit tests

* Fixing tests

* ci, fixes

* fix library collection bugs

* cleanup data studio plugin

* fix lots of unit tests

* fix import

* fix

* Fixed unused import

* Fixed accidental #p

* ci

* revert util

* specs

* specs

* specs

* fix bug / bad type in SchemaFormSelect (#65995)

* Use actual anti join in GET /table query

* Remove old comments

* Activate token after restore

* test: unskip table metadata transform test

* test: fix search tables e2e test

* fix: test: selection in table picker

* Fix Source input disabled when filtering by Metabase transform
- Closes GDGT-1259

* test: fix: filter unused table

* Fix e2e test

* fix: test: datamodel toasts and errors

* Fix e2e test

* Fix e2e tests from group-9

* Fix flaky tests

* GDGT-1244: Fix DB tree virtualization (#66125)

* GDGT-1244: Fix tree virtualization. Replace top with translateY to improve performance

* GDGT-1244: Fix scroll bug. Refactor border styling

* bring back modeling empty state

* test: adjust publishing test

* Fix e2e test from group-22

* Fix e2e test from group-25

* fix allowing cross DB joins

* properly disable invalid items in MiniPicker

* Fix e2e test from group-26

* Fix straggler from oss group

* Starts fixing e2e tests from group-32

* unit test adjustments

* Fix remaining issue with e2e group 37

* fix item filtering

* Update Loki Snapshots

* add recent views to mini picker

* test recents and backparsing

* additional filtering test

* fix minipicker shows items it should not show

* Fixed :here in library API

* Fixed :here in library API

* UXW-2358 publishing outside of the data studio

* Fixed :here in library API

* snapshot

* Fix most e2e tests from group-32

* Lint fixes

* Fixed failing test

* revert fix

* Reapply "Added `collection` argument to search"

This reverts commit f28d9d5af9.

* Quick fix in CollectionPicker/utils.ts

* Fix flaky Remote Sync test (#65862)

* Clean up backend-test matrix (#66158)

* Fix timeseries value detection (#66161)

* Prevent driver tests (#66156)

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>

* Fetch uberjar using a proper action (#66165)

* fix embedding column picking

* Trying CI with search_index.verified

* Fixed failing test

* Translate label

* Fixed failing test

* fix: published info not updated in the tree picker after deleting model

* fix: refactor: publish collection link tests

* Fixed failing test

* Fix remaining e2e tests from group-32

* FileUploadStatus unit test, quesiton reproductions

* create data studio plugin file

* fix hidden items some more

* Fix issue where confirmation modal closes then reopens again then closes again when you archive a dashboard

* fix dark mode

* UXW-2367

* UXW-2378

* Fixed merge issues

* this element is not visible because you can't even open incompatible sample database db

* Fix e2e test from group-14

* fix embedding data picker clicks

* filtering fixes for transforms

* UXW-2372

* update mini picker specs after a fix

* fix flaky join test

* Fixing in-place support for collections

* fix: cannot scroll search results

* ui: tweak search results checkbox spacing to match tree results

* fix: scroll position jump when entering field sort mode gdgt-1269

* Revert "fix: scroll position jump when entering field sort mode gdgt-1269"

This reverts commit bfecdec661.

* UXW-2279 Changes Data Studio's Glossary page background color to background-secondary

---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub@chodorowicz.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Anderson <anderson@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Stas Gavrylov <stas@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
Co-authored-by: dpsutton <dan@dpsutton.com>
Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2025-11-25 08:09:59 -08:00
Gabriel Moreno
15bb72ee66 fix: anchor table info popover to bottom (#66226)
Since `position` was set to `top`, the popover had little space to
expand upwards, and the box was cut-off before reaching the anchor
point.
2025-11-25 14:15:12 +00:00
Stas Gavrylov
ce0232662d GDGT-1252: Respect show mini bar chart setting in list view (#66012)
* GDGT-1252: Make list view consider mini-bar-chart setting

* GDGT-1252: Fix incorrect model settings update when changing columns settings

* GDGT-1252: e2e test

* GDGT-1252: Fix unit test for ListViewItem

* GDGT-1252: Address PR comments. Minor refactoring

* GDGT-1252: Refactor DatasetEditor to get rid of modelSettings hack

* GDGT-1252: Update e2e test to cover settings persistence

* Update Loki Snapshots

* Revert Loki update

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-11-25 12:48:09 +02:00
Nemanja Glumac
076267ed7c chore: Upgrade nextjs to resolve dependabot alert (#66203) 2025-11-25 10:08:00 +01:00
Dennis Schridde
a7f3165348 Fix purchase page for paid Metabase AI add-on for non-store users (#66086)
### Description

Missing billing information is treated as an error for purposes of
displaying the purchase page with prices.  Non-store users cannot
retrieve billing information.  Thus, previously, they would always see
an error page: "Error fetching information about available add-ons."
With this change, they see the "Please ask a Metabase Store Admin" page
as intended.

We achieve this by splitting the page content for store users from that
of non-store users.  Only the former needs to load data (billing and
add-on information), so only that page needs `LoadingAndErrorWrapper`.
For store users we show no dynamic content that could fail to load
(apart from a store user's email address, which we gracefully omit if
it is missing).

### How to verify

1. Ensure you have a token with the `offer-metabase-ai-tiered`
   feature, but without the `metabot-v3` and `offer-metabase-ai`
   features.
2. As a Metabase user with an email address that *does not* match any
   of the token's organization's store user email addresses, navigate
   to `/admin/metabot` and see "Please ask a Metabase Store Admin".
3. As a Metabase user with an email address that *does* match any
   of the token's organization's store user email addresses, navigate
   to `/admin/metabot` and see the purchase page with tier selector.

### Checklist

- [x] Tests have been added/updated to cover changes in this PR

Fixes: 2b76c38e1f
Closes: https://metaboat.slack.com/archives/C07RMUQ0GE5/p1763644357893079
2025-11-25 02:37:44 +01:00
Nemanja Glumac
1881164422 Improve how skipped SDK tests are handled (#66211) 2025-11-24 23:29:37 +01:00
Nemanja Glumac
81ba716093 Check for project requirements (#66192)
This PR adds a non-destructive dev script whose only job is to detect and report on your local development environment setup.

## What it does

**`./bin/dev-requirements`** detects:
  - Version managers:
      -  nvm, fnm, n (Node.js version managers)
      - volta, asdf, mise (multi-language support)
      - jenv, sdkman (Java version managers)
  - Installed development tools and their versions
  - Whether your setup meets Metabase's requirements

It cross-references detected versions against project configuration files:
  - Node.js version from `.nvmrc`
  - Clojure version from `deps.edn`
  - Java 21 Temurin distribution requirement

## What it doesn't do

  - No installations
  - No modifications
  - No assumptions about your preferences

The script is purely informational - it shows you what you have, what's required, and recommends mise for version management. Perfect for new contributors or when troubleshooting setup issues.
2025-11-24 22:09:43 +01:00
Nemanja Glumac
f90fbb06ce Delete now unused ci-test-config.json (#66189) 2025-11-24 21:23:35 +01:00
Brad Anderson
76cf73dde5 Fix #65501 - Resets search back to first page when filters change (#66104) 2025-11-24 15:07:39 -05:00
Noah Moss
74b8adabe6 Two quality-of-life improvements for @-mentions (#66131)
* QoL improvements for @-mentions

* Add a unit test for new tab click behavior
2025-11-24 19:30:31 +00:00
Riley Thompson
7d7595996c Add snowflake collate expression (#65944)
* get collate working

* add collate test

* add changelog

* oragnize collate code

* fix driver changelog typo
2025-11-24 14:09:59 -05:00
Riley Thompson
8f23a5b725 Cancel jobs in bigquery (#66054)
* cancel bigquery jobs

* move .cancel to promise handling

* wrap .cancel in try catch finally

* use getqueryresults instead of .query
2025-11-24 19:07:31 +00:00
Edward Paget
05b294f47a feat: use boolean flag for remote-sync status (#66048)
* feat: use boolean flag for remote-sync status

It turns out type is too overloaded to have a 'remote-synced' collection
type. This is behavior that we might want to share around other typed
collections, so this migrates us to use a boolean column for this value instead.

* fixup! e2e test find synced collection

* fixup! e2e collection fixture has correct values

* fixup! make sure flag is set on insert/update
2025-11-24 12:16:43 -06:00
Nemanja Glumac
cb37ce8108 chore: Upgrade zx to resolve dependabot alert (#66207)
Should resolve
https://github.com/metabase/metabase/security/dependabot/275
2025-11-24 18:40:46 +01:00
Denis Berezin
0b42ad89a9 Fix trend viz dates diff calculation for a year unit (#65985) 2025-11-24 18:34:33 +03:00
dpsutton
857bdadd45 bump databricks (#66123)
* bump databricks

This moves over to a thin jar (or regular jar) which provides jdbc
classes and lists its dependencies. We can now bump or pin as we
like. The previous versions were uberjars that had their dependencies
packaged inside.

```clojure
clj -Sdeps '{:deps {com.databricks/databricks-jdbc-thin {:mvn/version "3.0.5"}}}'
Clojure 1.12.1
user=> (Class/forName "com.databricks.client.jdbc.Driver")
com.databricks.client.jdbc.Driver
```

```clojure
clj -Xdeps tree :extra '{:deps {com.databricks/databricks-jdbc-thin {:mvn/version "3.0.5"}}}'
org.clojure/clojure 1.12.1
  . org.clojure/spec.alpha 0.5.238
  . org.clojure/core.specs.alpha 0.4.74
com.databricks/databricks-jdbc-thin 3.0.5
  . com.databricks/databricks-sdk-java 0.69.0
    X org.slf4j/slf4j-api 2.0.9 :older-version
    . org.apache.commons/commons-configuration2 2.11.0 :newer-version
      X org.apache.commons/commons-lang3 3.14.0 :older-version
      . org.apache.commons/commons-text 1.12.0
        X org.apache.commons/commons-lang3 3.14.0 :older-version
      . commons-logging/commons-logging 1.3.2 :newer-version
    X com.fasterxml.jackson.core/jackson-databind 2.15.2 :older-version
...
```

contrasted with

```clojure
❯ clj -Xdeps tree :extra '{:deps {com.databricks/databricks-jdbc {:mvn/version "3.0.1"}}}'
org.clojure/clojure 1.12.1
  . org.clojure/spec.alpha 0.5.238
  . org.clojure/core.specs.alpha 0.4.74
com.databricks/databricks-jdbc 3.0.1
```

* bump to run drivers

* include test namespace change to trigger driver tests
2025-11-24 09:14:19 -06:00
Nemanja Glumac
eed6736230 Fix uberjar fetching for SDK host-apps (#66194) 2025-11-24 15:53:22 +01:00
Noah Moss
144b0b33f8 Move audit installation after search init; change some logs to debug (#66045)
* Move audit installation after search init; change some logs to debug

* change another warn to debug
2025-11-24 14:48:35 +00:00
Sébastien
dcca252247 Closes EMB-997 add a reset function to plugins (#65958)
* reorg

* added reinit fns to oss plugins

* ಠ_ಠ

* Added doc and eslint to prevent import of individual reinitialize functions

* added short doc to reinitialize functions to indicate they're internal
2025-11-24 15:15:15 +01:00
Denis Berezin
a183e8b5b4 Add translation for boolean dash filter value (#66050)
* Add translation for boolean dash filter value

* Fix CI
2025-11-24 16:55:44 +03:00
Edward Paget
3b837a15a0 fix: google auth returns given_name/family_name (#66151)
this was incorrectly using first_name/last_name. This also updates the
existing mocks to return the correct fields.
2025-11-24 13:01:08 +00:00
Nemanja Glumac
6679039b45 Revert "Pin the NodeJS version to the version 22 (#66152)" (#66187)
This reverts commit 58867cac0b.
2025-11-24 12:37:57 +01:00
Nemanja Glumac
58867cac0b Pin the NodeJS version to the version 22 (#66152) 2025-11-24 11:49:49 +01:00
Nemanja Glumac
2e4b7adbcb Parallelize embedding SDK package and uberjar builds (#66122) 2025-11-24 11:47:29 +01:00
Fraser
5aeffcf173 Skip BarChart Watermark loki (#66176) 2025-11-24 10:30:48 +00:00
Nemanja Glumac
721db4d40f Fetch uberjar using a proper action (#66165) 2025-11-21 23:58:57 +01:00
dpsutton
442fd726a3 Prevent driver tests (#66156)
Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2025-11-21 15:36:19 -07:00
Denis Berezin
9e65cc60bf Fix timeseries value detection (#66161) 2025-11-21 23:59:43 +03:00
Nemanja Glumac
44ab6decf0 Clean up backend-test matrix (#66158) 2025-11-21 20:40:40 +01:00
John Swanson
8b369333c3 Fix flaky Remote Sync test (#65862) 2025-11-21 11:29:00 -08:00
Nicolò Pretto
c9e602db2f chore(sdk): remove excessive logs in sdk fixup script (#66133) 2025-11-21 18:19:38 +01:00
Nemanja Glumac
b1fb103a3f Remove redundant static-viz files changed condition (#66138) 2025-11-21 17:41:36 +01:00
Jeff Bruemmer
b631ee88a4 docs - fix docstring (#66134)
* doc string

* edit
2025-11-21 11:39:49 -05:00
Riley Thompson
2df87d3a7f Add empty state to native query DB dropdown (#66090)
* add global search to db dropdown

* Add tests
2025-11-21 10:04:44 -05:00
Egor Grushin
f486c415f9 chore: Add egorgrushin as a team member (#66043)
* chore: Adds egorgrushin to ~/.github/team.json and ~/release/github-slack-map.json.

* chore: fixed the usernames order
2025-11-21 15:02:00 +00:00
Nemanja Glumac
ba5804041b Consolidate embedding CI workflows (#66075) 2025-11-21 11:40:00 +00:00
Nemanja Glumac
9d6564cdaf Fix backend cache paths (#66103) 2025-11-21 11:41:08 +01:00
Sébastien
591b453e4c Closes EMB-1037 preview_embed endpoint for filter search (#66077) 2025-11-21 09:11:52 +01:00
Sébastien
5d087d0d18 Closes EMB-1038 wrong endpoint for embed maps preview (#66063) 2025-11-21 09:11:43 +01:00
Riley Thompson
719ebd0a7b Fix caching of postgres domains in arrays (#66059)
* custom nippy handling for pgobject

* Add domain caching test

* simplify test comparison
2025-11-20 23:22:50 +00:00
Fraser
ff6ec328f3 Create use-page-title hook and remove SetTitle Hoc (#65782) 2025-11-21 10:59:40 +13:00
dpsutton
78978219a6 minimal tests to be run when the label is minimal-tests (#66024)
* minimal tests to be run when the label is `minimal-tests`

* include enterprise tests, fix syntax

* bump CI

* don't fail if label is absent
2025-11-20 15:31:11 -06:00
Jeff Bruemmer
7c8a8f3694 docs - update docs workflow (#66096)
* update docs workflow

* update perms

* more perms

* perms to delete pending reviews

* review deletion

* delete comments

* update skill
2025-11-20 16:23:51 -05:00
Jeff Bruemmer
45abe078f9 docs - supporting text (#66088)
* supporting text

* image

* edits
2025-11-20 15:06:42 -05:00
Jeff Bruemmer
82b95611cf docs - light weeding (#66023)
* spelling

* docstring
2025-11-20 14:21:28 -05:00
Noah Moss
f04fb1bff2 Fix template tag parsing for model references in transforms generated by metabot (#65630)
* Try to fix model references in transforms generated by metabot

* Add an e2e test

* move test later in file

* simplify implementation

* address bot comments

* add comment
2025-11-20 14:10:41 -05:00
Jeff Bruemmer
f200fbe20c docs - lychee action version (#66091)
* lychee action version

* bump versions
2025-11-20 14:09:01 -05:00
Jeff Bruemmer
3413313d3a docs - links workflow (#66087) 2025-11-20 13:46:09 -05:00
Nicolò Pretto
b5c0d93f8e chore(sdk): fix sdk storybook (#66078)
* chore(sdk): fix sdk storybook

* use rootRepoPath for appConfig
2025-11-20 18:24:13 +01:00
Edward Paget
71f7cbc41b fix: handle invalid email address in auth-identity (#66022)
...migrations.

Handles cases where emails were set to longer than the valid length of
254 bytes. Those emails would fail on this migration previously. We're
not currently using auth-identity to lookup email addresses so this
won't cause any incorrect behavior, but also if any emails like this
exist they weren't valid anyway.

Also sets the validCheckSum to ANY like some other SQL migrations to
handle cases where this migration has already been run successfully, as
on stats.
2025-11-20 10:59:43 -06:00
github-automation-metabase
c2619a5036 Auto-update documentation for master (#66056)
* Update generated docs (master)

* Update docs/configuring-metabase/environment-variables.md

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-11-20 14:24:59 +00:00
Nicolò Pretto
e4728d22b8 chore(sdk,ci): fix stress tests for sdk tests (#66065)
* chore(sdk,ci): fix stress tests for sdk tests

* fix baseUrl, cypress explodes if we pass it in ct test config
2025-11-20 11:37:10 +01:00
Timofey Kachalov
2d1b6c4a02 refactor(embed-js): Move EmbedJS + EmbedJS wizard files to OSS folder (#65973) 2025-11-20 14:32:30 +04:00
Ngoc Khuat
b8eb7d65f9 Add bottom padding for Attach results as files section (#62483) 2025-11-20 10:25:16 +01:00
Anderson
28b5fb79f1 Collect customer consent to grant instance access to Metabase success engineers (#65701)
* feat: add api for manage support access grants

* Setup frontend endpoint logic and start work on UI

* Implement create access grant; revoke; UI clean up

* Move section to tools > help / Adjust main UI

* feat: migration to new auth-identity module

* Fix schema migration tests

* Adjust backend fields structure on the backend / Update types and table in the UI

* Implement invitation mechanism and auth provider

* Create a route for the access grant modal

* Fix fe types / Fix clj spaces

* Add some test placeholders

* Remove stray #p

* Add missing index

* refix broken migration

* Change the way we temporarily make the new feature always enabled

* Add email sending on grant creation

* Add login and tests

* Make auths expirable

* Remove extraneous test

* Fix bad syntax in test

* Split two column migration into two migrations

* Fix test syntax issue

* Better expires at test

* Create e2e tests / Split troubleshooting.cy.spec and move to ts

* Add fe unit tests

* Add fe unit tests

* Fix kondo

* Fix config file and settings require

* Revert added disallowed exported namespaces

* Correctly test expiration

* Add tests for revoked at behavior

* Better better expires_at test

* Fix help.cy.spec.ts / Self review updates

* Fixup last issues with module config

* Make password reset is disabled for support users

Improve some email copy

* Real token check

* Move test relying on EE-code out of OSS code

* Send invitation notification after sso user creations

* Fix module config

* fixup! BE feedback

* fixup! altered not found msg

* Use user email as fallack when name is not set on support grants table

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
2025-11-19 23:59:02 -03:00
Sloan Sparger
53cf2ab305 [Metabot] Request cancellation (#65511)
* fix cut not removing text from input

* ensure we fetch all data for all possible models for smart links

* remove unused comment

* fixes smart links in metabot input sometimes degrading into their text representation and fixes some cases where wrong model name ("model" instead of "dataset") was used for metabot links

* fix unit tests

* ui for cancelling a request, handles state updates for canceled requests

* press esc to cancel metabot request, fix state being incorrect on requests after an aborted request

* add test coverage for ui, update test utils to enable aborting requests in unit tests, small bits of clean up

* add tests to processStream function

* update snapshot
2025-11-19 17:35:13 -06:00
Nemanja Glumac
135abb44a5 Consolidate caches (#66036) 2025-11-19 23:03:23 +01:00
Alex Yarosh
8699037548 Change images for development and production settings (#66039)
Updated images in the remote sync documentation to reflect new settings.
2025-11-19 20:50:12 +00:00
Alex Yarosh
03dad76c9f Update plans-blockquote inclusion for documents (#66038) 2025-11-19 15:49:12 -05:00
github-automation-metabase
dca22d0865 Bump org.postgresql/postgresql from 42.7.7 to 42.7.8 (#63804)
Inspect dependency changes here: https://github.com/pgjdbc/pgjdbc/blob/REL42.7.8/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-19 19:21:50 +00:00
github-automation-metabase
a6f98dbd68 Bump com.amazon.redshift/redshift-jdbc42 from 2.1.0.34 to 2.2.0 (#64830)
Inspect dependency changes here: https://github.com/aws/amazon-redshift-jdbc-driver/blob/v2.2.0/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-19 19:09:59 +00:00
github-automation-metabase
2fe9ebdec1 Bump org.apache.tika/tika-core from 3.2.2 to 3.2.3 (#63799)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-19 19:03:52 +00:00
github-automation-metabase
c31762e244 Bump clj-kondo/clj-kondo from 2025.07.28 to 2025.10.23 (#65029)
* Bump clj-kondo/clj-kondo from 2025.07.28 to 2025.10.23

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

* Fix Kondo warning

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-11-19 19:00:12 +00:00
Nicolò Pretto
5585815455 fix(docs): fix sdk docs not being generated correctly (#66030) 2025-11-19 11:58:18 -05:00
Jeff Bruemmer
2f8cc0f153 skills (#65676)
* skills

* docs review workflow

* update skills

* update bug fix workflow to use skills

* headings

* update code workflow to use skills

* updates

* add workflow dispatch to docs review

* edits
2025-11-19 16:54:05 +00:00
Jeff Bruemmer
d00a66f474 Fix YAML syntax for target_branch in workflow (#66018) 2025-11-19 09:50:38 -05:00
Braden Shepherdson
19ba6a165a [QP] Allow one-sided :number/between parameter values (#65987)
Fixes #65714.

These are sent as `:number/<=` or `:number/>=` and the validation was
too strict from 57 onward. Added a test for none, min, max, and both
ends of a Between filter.
2025-11-19 09:35:09 -05:00
Jeff Bruemmer
e0e3099787 Docs 57 latest (#65666)
* update release workflow to 57

* string
2025-11-19 09:27:52 -05:00
Jeff Bruemmer
6d62827416 docs - X version note and cleanup (#65756)
* X version note and cleanup

* note on hotfix x

* edit

* note on beta

* changelog link
2025-11-19 09:14:54 -05:00
Fraser
5a8ec6631a Cache yarn in CI (#65946) 2025-11-19 14:31:11 +01:00
Abed Habli
d5a7dc2e49 Docs: reusing snippet parameters (#65723)
* reusing snippet parameters

* Update docs/questions/native-editor/snippets.md

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

* updating the section

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-11-19 13:25:17 +01:00
Thomas Schmidt
0a3a826537 Metabot tool endpoitns should support MBQL5 (#65844)
* Metabot tool endpoitns should support MBQL5

* Update filter tool to work with MBQL 5

* Fix find-outliers-wrong-query-test

Was attempting to assoc-in/dissoc-in MBQL4 query keys on an MBQL5 query.

---------

Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
2025-11-19 10:32:39 +00:00
Fraser
04cbeab190 Remove ModalWithTrigger (#65994) 2025-11-19 10:22:51 +01:00
Nemanja Glumac
248a95e704 De-clutter the Cypress (nodejs) Module runner (#65881)
Running Cypress tests doesn't have to be hard.

This PR is moving us in a direction where (1) there's some logic that sets up the environment for e2e testing, and then (2) there's a simple command to invoke cypress (aka "decoupling" or "separation of concerns")

Cypress only needs to know which config to look at. It contains all the information it needs to run.

There are two ways to invoke Cypress:

1. Cypress cli
2. Cypress Module API (programmatic entry point)

They should be compatible and interchangeable. Anything you pass to the node module as options can be passed as individual flags to the cli.

```
npx cypress run --config-file path/to/some/config --spec path/to/spec.cy.spec.ts
```

is equivalent to

```
cypress.run({ configFile: "path/to/some/config", spec: "path/to/spec.cy.spec.ts" });
```

This PR removes all abstractions from the actual node module runner.
2025-11-19 10:20:14 +01:00
Kamil Mielnik
c7e2dcd254 GDGT-1235 Fix flaky dashboard parameters test (#65902)
* Fix flaky test

* Remove broken findDashCardAction helper
2025-11-19 15:17:19 +07:00
Fraser
fafd6bb3d8 Refactor ActionExecuteModal (#65573) 2025-11-19 14:38:44 +13:00
Fraser
4fe0ecbeb9 Refactor CustomURLPicker (#65574) 2025-11-19 14:23:46 +13:00
eliotmetabase
e1c31c0d8e Update label placeholder text to Optional for Gauge visualization (#65989)
* Update label placeholder text to Optional for Gauge visualization

* Update unit test
2025-11-18 17:04:14 -08:00
dpsutton
a8e592718f Turn off db routing for clickhouse and it's trick. (#65984)
* Turn off db routing for clickhouse and it's trick.

DB routing needs a "degree of freedom" to run the exact same query
against a different schema/db/instance whatever. Clickhouse only has
database.table. so to db route on the same clickhouse instance you have
to omit the database and let it resolve during query time.

`select * from db.table` can't work. Have to do `select * from table`
and let the connection dictate db1 or db2.

In 56, tables look like this:

```clojure
{:name "upload_records_10k_20251118164620", :schema "db_eafc4346850f435e"}
```

In 57, now they look like this for single db clickhouse things:

```clojure
{:name "upload_records_10k_20251118164620", :schema nil}
```

There are two critical problems here:
1. When uploading, it's not aware to omit the schema. So a table is
created with that schema. During the next sync that table is archived
and a new one with a nil'd schema is created. So the model created for
the uploaded CSV would break as it points to an inactive table. This has
a further compounding issue because now there "appear" to be two schema:
the faked nil one and also a new one like `db_eafc...`.
2. But _all_ tables will be archived in the same manner which were
initially found in 56 or below. These tables will be marked as inactive
and new ones created. Meaning all mbql queries based on clickhouse will
fail.

I wanted to revert this change but there's actually a bit more in the PR
and some conflicts. It also does more than just enabling db-routing so I
think we can perhaps undo the damage in this way more easily.

* remove outdated test
2025-11-18 18:45:46 -05:00
github-automation-metabase
0b5bbd260f Bump compojure/compojure from 1.7.1 to 1.7.2 (#63797)
Inspect dependency changes here: https://github.com/weavejester/compojure/blob/1.7.2/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-18 20:49:24 +00:00
github-automation-metabase
38c0aebd00 Bump io.github.eerohele/pp from 4998a1fdd9d3713d7034d04509e9212204773bf2 to ffc4edc482c057cd9412c62f018a41e9140c618b (#63473)
Inspect dependency changes here: 4998a1fdd9...ffc4edc482

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-18 20:40:55 +00:00
Riley Thompson
41b5904d52 Fix order by custom expression aggregations (#65937)
* fix bigquery order by aggregate custom expression

* add import

* make test work for all drivers
2025-11-18 13:58:53 -05:00
Alex Yarosh
a2975bdb44 Revise quickstart options for Embedded Analytics SDK (#65830)
Reorganized quickstart section for clarity based on user setup.
2025-11-18 12:41:33 -05:00
Edward Paget
e996561416 fix: allow analytics collection perms to be set (#65927)
* fix: allow analytics collection perms to be set

In #65098, we did not fully replicate the behavior of the old graph
endpoint where collection namespacing rules aren't applied to the
"analytics" namespace. Collections in this namespace can be modified as
though they are part of the root `nil` namespace. The bug was in
removing collections not part of the targetted namespace of the
`update-graph!` funciton from the graph to update.

This restores the old behavior by not excluding collection permissions
updates for collections in the "analytics" namespace in the
`remove-collections-from-other-namespaces` function.

it also updates our tests for the collection graph to make sure mock
analytics collections have the right namespace set rather than a `nil` namespace.

* fixup! reset revisions

* fixup! tests to EE module fix tests in EE module
2025-11-18 09:40:22 -06:00
Stas Gavrylov
10e76e3040 Update Table Editing e2e tests to use Postgres instead of SampleDB (#65955)
* Update Table Editing e2e tests to use Postgres instead of SampleDB

* Update table editing e2e tests to include different column types

* Address PR comments
2025-11-18 17:40:06 +02:00
Oleksandr Yakushev
25a97838db Bump Malli to 0.20.0 (#65909) 2025-11-18 17:15:12 +02:00
Brad Anderson
54c23276d7 Documents supporting text - Drag-and-drop (#65854)
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2025-11-18 10:14:27 -05:00
Denis Berezin
58df0d448e Fix incorrect tooltip metric sum in row chart (#65938)
* Fix incorrect tooltip metric sum in row chart

* Review fixes
2025-11-18 18:08:51 +03:00
Nicola Mometto
35c649f88b Nicola/glossary creator api (#65961)
* feat: glossary, actually add creator_id on create endpoints

* feat: add creator_id tests on api
2025-11-18 15:08:26 +00:00
Nicolò Pretto
d981e64f0a move sdk bundle code to the oss folder (#65753)
* move the actual sdk folders

* update rspack config and eslint config

* fix relative import in CommonSdkStoryWrapper

* allow default exports in preview.tsx

* update eslint config to allow imports from frontend/src/embedding-sdk-shared

* remove legacy eslint disable directive

* temporarily 'disable' eslint-disable-next-line no-external-references-for-sdk-package-code that has not been ported yet

* update rspack config to use new paths

* update jest config to use new paths

* add `embedding-sdk-package` to restricted imports

* copy eslint files to apply to the new sdk folders

* add eslint-disable-next-line no-restricted-imports to some places where we need emotion

* fix jest setup

* add and use setupEmbeddingSdkEnterprisePlugins

* use `useSetting` instead of `getApplicationColors` to remove enterprise import

* move defineMetabaseAuthConfig to embedding-sdk-shared

* move MetabotProvider to embedding-sdk-bundle

* fix docs generation issue about types

* fix prettier ignore file

* move back tests to ee folder

* remove ../../../ from imports

* fix eslint issues

* fix, again, jest config :sad:
2025-11-18 15:56:43 +01:00
Sébastien
425856f92a Closes EMB-1021 flaky test e2e tests metabase browser read only mode (#65851)
* .

* .

* .
2025-11-18 15:33:42 +01:00
Anderson
5c87a6c12b Make sure 'Pull changes' button is not truncated on remote sync settings (#65932) 2025-11-18 10:41:45 -03:00
Sébastien
a033c12089 Closes EMB-982 embedding stuck on 404 when navigating with postMessage (#65662)
* Closes EMB-982 postmessage 404

* actual fix

* .

* .

* .
2025-11-18 12:51:32 +01:00
Nicola Mometto
39821ae14e Add creator to transform content view, and include glossary (#65957)
* feat: add creator_id to content view for transforms

* feat: add creator to glossary

* feat: glossary entries in content

* add creator test

* missing creator_id
2025-11-18 11:37:27 +00:00
Fraser
739b062e7c Refactor QuestionRowCount (#65837) 2025-11-18 23:10:34 +13:00
Phoomparin Mano
ec73bb3bae Allow content-disposition header in cross-origin requests (#65918) 2025-11-18 14:59:38 +07:00
github-automation-metabase
566d6d1ad6 Bump thheller/shadow-cljs from 3.2.0 to 3.2.1 (#64165)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-18 01:11:01 +00:00
github-automation-metabase
9a981a80b5 Bump org.apache.logging.log4j/log4j-core from 2.25.1 to 2.25.2 (#64153)
* Bump org.apache.logging.log4j/log4j-core from 2.25.1 to 2.25.2

Inspect dependency changes here:

* Consolidate log4j version bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-11-18 01:09:26 +00:00
github-automation-metabase
ea5d731e6a Bump org.bouncycastle/bcutil-jdk18on from 1.81 to 1.82 (#63808)
* Bump org.bouncycastle/bcutil-jdk18on from 1.81 to 1.82

Inspect dependency changes here:

* Consolidate deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-18 01:06:01 +00:00
github-automation-metabase
cea2da195e Bump io.trino/trino-jdbc from 476 to 477 (#64169)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-18 01:05:19 +00:00
github-automation-metabase
be1889ac0a Bump ring/ring-core from 1.14.2 to 1.15.3 (#64160)
* Bump ring/ring-core from 1.14.2 to 1.15.3

Inspect dependency changes here: https://github.com/ring-clojure/ring/blob/1.15.3/CHANGELOG.md

* Consolidate Ring deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-11-18 01:05:00 +00:00
Cam Saul
94d2daaafd Backend module detangling pre Clojure/conj 2025 edition (#65681)
* Split warehouses and warehouses-rest

* Split warehouse-schema and warehouse-schema-rest

* Split actions and actions-rest

* Split collections and collections-rest

* Split `dashboards` and `dashboards-rest`

* Split public-sharing and public-sharing-rest

* Split embedding and embedding-rest; eliminated driver deps: xrays segments sample-data tiles

* Split users and users-rest

* Split setup and setup-rest

* Some more dev functions

* Update Kondo modules config

* Fix test namespace name

* Fix test failure 🔧
2025-11-17 16:35:15 -08:00
Jeff Bruemmer
85633efccf docs - remote sync rename (#65933) 2025-11-17 17:27:11 -05:00
Riley Thompson
e53d67c763 Update snowflake string filtering (#65853) 2025-11-17 22:18:45 +00:00
William
7a5d365a4d qp catches circular queries involving both sql and mbql cards (#65875) 2025-11-17 15:33:28 -06:00
Brad Anderson
6e0186703f Documents supporting text (#65705)
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-11-17 16:15:22 -05:00
Noah Moss
713a369825 And basic recent views info to metabot user context (#65618)
* add a models filter option to recent_views API

* Add recent views to metabot context with only basic metadata fields included

* clean up; add test
2025-11-17 15:43:05 -05:00
Cam Saul
52eeb00a2e Add MAGE module command; use module system for determining if we can skip driver tests (#65631)
* MAGE modules

* Trivial change

* Trivial change 2

* Add note

* Let's try this

* Don't rely on team label

* Update GH Action

* Fix shell script syntax

* Use same runner type for all jobs in drivers workflow

* We can skip Postgres tests too

* Fix Mage command??

* debug github output

* Test ignoring tests in Lib

* Can we skip fetching the base ref??

* Fix test-ignoring logic

* Ok so maybe we do need to fetch the base ref

* Try git-fetch --depth=1

* Fix drivers not waiting for job

* Remove TODO

* Cache Babashka dependencies

* Update step name

* Make sure Babashka deps are actually saved

* Flip the status codes around

* PR feedback and cleanup
2025-11-17 12:41:30 -08:00
Braden Shepherdson
17291f9d79 [QP] Allow multiple dashboard/card params to exist, if only one is set (#64428)
Fixes #64135.

Previously this code would throw if multiple dashboard and/or card
params were bound to the same SQL variable. Now multiple links are
allowed, provided that only one is actually given a value.

Actually, this logic de-duplicates the values, so if multiple filters
all set the same value, that also works.
2025-11-17 20:23:00 +00:00
Cam Saul
af139fd003 Run Codespell on docs/ (#65925)
* Run Codespell on docs/

* Only run of docs/
2025-11-17 11:29:29 -08:00
Nicola Mometto
97f104ecbf Better human readable table-data-event for audit-log (#65907)
* abstract action-v2-execute events behind table-data-edit for audit-log

* add test

* chore: still publish
2025-11-17 19:14:48 +00:00
dpsutton
d5e562665f Correctly sync routed databases in task (#65441)
* Correctly sync routed databases in task

Before:

```clojure
(sync-and-analyze-database*! 598)
2025-11-04 21:30:48,550 INFO task.sync-databases :: Starting sync task for Database 598.
2025-11-04 21:30:48,626 INFO sync.util :: STARTING: Sync metadata for sqlite Database 598 ''airlines'' (free: 0.54G, total: 1.02G, ratio: 0.53)
2025-11-04 21:30:48,650 ERROR sync.fetch-metadata :: Error while fetching metadata with 'db-metadata'
clojure.lang.ExceptionInfo: Anonymous users cannot access a database with routing enabled.
	at
        metabase_enterprise.database_routing.common$router_db_or_id__GT_destination_db_id.invokeStatic(common.clj:30)
        ....
2025-11-04 21:30:48,660 WARN sync.util :: Error in sync step Sync metadata for sqlite Database 598 ''airlines''
clojure.lang.ExceptionInfo: Anonymous users cannot access a database with routing enabled.
2025-11-04 21:30:48,668 INFO sync.util :: FINISHED: Sync metadata for sqlite Database 598 ''airlines'' (42.6 ms) (free: 0.54G, total: 1.02G, ratio: 0.53)
2025-11-04 21:30:48,669 INFO sync.util :: STARTING: Analyze data for sqlite Database 598 ''airlines'' (free: 0.54G, total: 1.02G, ratio: 0.53)
2025-11-04 21:30:48,678 INFO sync.util :: STARTING: step ''fingerprint-fields'' for sqlite Database 598 ''airlines'' (free: 0.54G, total: 1.02G, ratio: 0.53)
```

And afterwards:

```clojure
2025-11-04 21:31:57,593 INFO task.sync-databases :: Starting sync task for Database 598.
2025-11-04 21:31:57,643 INFO sync.util :: STARTING: Sync metadata for sqlite Database 598 ''airlines'' (free: 0.50G, total: 1.02G, ratio: 0.50)
2025-11-04 21:31:57,666 INFO sql-jdbc.execute :: Obtaining a fresh resilient connection
2025-11-04 21:31:57,671 INFO sync.describe-database :: "Tweets": SELECT privileges confirmed
2025-11-04 21:31:57,684 INFO sync.util :: STARTING: step ''sync-dbms-version'' for sqlite Database 598 ''airlines'' (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,693 INFO sync.util :: FINISHED: step ''sync-dbms-version'' for sqlite Database 598 ''airlines'' (9.0 ms) (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,693 INFO sync.util :: STARTING: step ''sync-timezone'' for sqlite Database 598 ''airlines'' (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,696 INFO sync-metadata.sync-timezone :: :sqlite database 598 default timezone is "UTC"
2025-11-04 21:31:57,700 INFO sync.util :: FINISHED: step ''sync-timezone'' for sqlite Database 598 ''airlines'' (7.1 ms) (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,701 INFO sync.util :: STARTING: step ''sync-tables'' for sqlite Database 598 ''airlines'' (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,706 INFO sync-metadata.tables :: :is_writable of Table 6058 ''Tweets'' changed from null to null
2025-11-04 21:31:57,715 INFO sync.util :: FINISHED: step ''sync-tables'' for sqlite Database 598 ''airlines'' (14.1 ms) (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,715 INFO sync.util :: STARTING: step ''sync-fields'' for sqlite Database 598 ''airlines'' (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,743 INFO sync.util :: FINISHED: step ''sync-fields'' for sqlite Database 598 ''airlines'' (27.3 ms) (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,743 INFO sync.util :: STARTING: step ''sync-fks'' for sqlite Database 598 ''airlines'' (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,755 INFO sync.util :: FINISHED: step ''sync-fks'' for sqlite Database 598 ''airlines'' (12.0 ms) (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,755 INFO sync.util :: STARTING: step ''sync-indexes'' for sqlite Database 598 ''airlines'' (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,758 INFO sync.util :: FINISHED: step ''sync-indexes'' for sqlite Database 598 ''airlines'' (3.1 ms) (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,758 INFO sync.util :: STARTING: step ''sync-metabase-metadata'' for sqlite Database 598 ''airlines'' (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,762 INFO sync.util :: FINISHED: step ''sync-metabase-metadata'' for sqlite Database 598 ''airlines'' (4.0 ms) (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,771 INFO sync.util :: FINISHED: Sync metadata for sqlite Database 598 ''airlines'' (128.4 ms) (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,771 INFO sync.util :: STARTING: Analyze data for sqlite Database 598 ''airlines'' (free: 0.50G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,783 INFO sync.util :: STARTING: step ''fingerprint-fields'' for sqlite Database 598 ''airlines'' (free: 0.49G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,794 INFO sync.analyze :: fingerprint-fields Analyzed [************······································] 😒   25% Table 6058 ''Tweets''
2025-11-04 21:31:57,801 INFO sync.util :: FINISHED: step ''fingerprint-fields'' for sqlite Database 598 ''airlines'' (17.8 ms) (free: 0.49G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,801 INFO sync.util :: STARTING: step ''classify-fields'' for sqlite Database 598 ''airlines'' (free: 0.49G, total: 1.02G, ratio: 0.49)
2025-11-04 21:31:57,806 INFO sync.analyze :: classify-fields Analyzed [*************************·························] 😬   50% Table 6058 ''Tweets''
2025-11-04 21:31:57,809 INFO sync.util :: FINISHED: step ''classify-fields'' for sqlite Database 598 ''airlines'' (7.7 ms) (free: 0.49G, total: 1.02G, ratio: 0.48)
2025-11-04 21:31:57,809 INFO sync.util :: STARTING: step ''classify-tables'' for sqlite Database 598 ''airlines'' (free: 0.49G, total: 1.02G, ratio: 0.48)
2025-11-04 21:31:57,817 INFO sync.analyze :: classify-tables Analyzed [*************************************·············] 😋   75% Table 6058 ''Tweets''
2025-11-04 21:31:57,822 INFO sync.util :: FINISHED: step ''classify-tables'' for sqlite Database 598 ''airlines'' (13.0 ms) (free: 0.49G, total: 1.02G, ratio: 0.48)
2025-11-04 21:31:57,827 INFO sync.util :: FINISHED: Analyze data for sqlite Database 598 ''airlines'' (55.4 ms) (free: 0.49G, total: 1.02G, ratio: 0.48)
```

* add a test

this was the best i could do at first. Whats annoying is that sync steps
are so resilient to errors that it's hard to get their return values. So
kinda hate that i'm checking the database log table for task history but
here we are.

* way better tests

* reorder requires

* update module config

* some cloud dbs have multiple tables in the same catalog

the definition of the dataset is:

```clojure
[["t"
  [{:field-name "f", :base-type :type/Text}]
  [["original-foo"]
   ["original-bar"]]]]
```

But cloud databases often fake the separation with things like
prepending the dataset name to the table name to simulate separation
while using only a single catalog or equivalent

* typo

* assert positive integer on total tables
2025-11-17 12:05:11 -06:00
Phoomparin Mano
b6a8de1d29 EAJS wizard should derive a lighter dashboard background color (#65547) 2025-11-17 23:19:29 +07:00
Nathan Voxland
55abe262c9 Rename remote-sync modes (#65825) 2025-11-17 10:10:56 -06:00
Edward Paget
088a5354fc feat: migration to new auth-identity module (#65716)
* feat: migration to new auth-identity module

* Fix schema migration tests

* Make auths expirable

* Remove extraneous test

* Fix bad syntax in test

* Split two column migration into two migrations

* Fix test syntax issue

* Better expires at test

* Better better expires_at test

* Send invitation notification after sso user creations

* Fix module config
2025-11-17 09:48:08 -06:00
github-automation-metabase
a843870977 Update generated docs (master) (#65892)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-17 09:24:50 -05:00
Nemanja Glumac
049723c814 Remove custom embedding SDK cors config (#65910) 2025-11-17 15:12:19 +01:00
Stas Gavrylov
25270fea3e UXW-1866: UX regression on dropdown list/search with multiple values (#64605)
* UXW-1866: Make MultiAutocomplete dropdown preserve open state when selecting options

* UXW-1866: Fix e2e test

* Add note on running e2e tests for translation functionality

* Fix e2e test

* Fix e2e test
2025-11-17 16:02:13 +02:00
Nemanja Glumac
33f9a3148d Simplify Snowplow Cypress helpers (#65859)
* Remove custom describeWithSnowplow constructs

* Update tests

* Update dev docs

* Log message when sending Snowplow request

* Rename empty describe to 'Snowplow analytics'

* Remove 'describeWithSnowplow' from ESLint rules
2025-11-17 09:11:55 +00:00
Mahatthana (Kelvin) Nomsawadi
2b69c463dd Fix dashboard.backgroundColor: transparent breaking dashboard PDF export (#65847) 2025-11-17 09:04:56 +00:00
Fraser
6845e31f38 Drop react draggable for dnd kit (#65268) 2025-11-17 13:53:05 +13:00
Nemanja Glumac
8b4fb71db4 Remove e2e tests for info popovers in field picker (#65883)
Removed multiple tests related to info popovers for field picker options and saved questions.

This behavior is already covered with a unit test at:
`frontend/src/metabase/common/components/MetadataInfo/ColumnInfoIcon/ColumnInfoIcon.unit.spec.tsx`
2025-11-17 00:48:38 +01:00
metamben
b889dd8e52 MBQL5 segments (#65566) 2025-11-15 21:47:37 +00:00
Fraser
c461d1296c Remove unused types (#65834) 2025-11-15 14:56:03 +13:00
John Swanson
4eda823252 Fix batch-upsert! method for heterogeneous entries (#65177)
* Fix the update keys for postgres search idx upsert

The upsert keys were calculated by looking at the first entry we were
inserting and removing `:id`, `:model`, and `:model_id`.

But the entries are not necessarily homogeneous. In this case, the first
entry is a dashboard (has no `:dashboard_id`) and the second entry is a
card (yes `:dashboard_id`).

This meant we never actually updated the dashboard_id when updating a card.

I attempted to add a test for this:

```
(deftest updates-work-properly
  (mt/with-test-user :rasta
    (mt/with-temp [:model/Dashboard {dash-id :id} {}]
      (let [card-name (str (random-uuid))
            card-id-1 (:id (mt/user-http-request :rasta :post 200 "card/" {:name card-name
                                                                           :collection_id nil
                                                                           :database_id 1
                                                                           :display "table"
                                                                           :creator_id (mt/user->id :rasta)
                                                                           :visualization_settings {}
                                                                           :dataset_query {:type "native" :native {:query "select 123"}
                                                                                           :database 1}}))
            card-id-2 (:id (mt/user-http-request :rasta :post 200 "card/" {:name card-name
                                                                           :collection_id nil
                                                                           :database_id 1
                                                                           :display "table"
                                                                           :creator_id (mt/user->id :rasta)
                                                                           :visualization_settings {}
                                                                           :dataset_query {:type "native" :native {:query "select 123"}
                                                                                           :database 1}}))]
        (mt/user-http-request :rasta :put 200 (str "card/" card-id-1) {:dashboard_id dash-id})
        (is (= [card-name]
               (map :name (:data (mt/user-http-request :rasta :get 200 "search" :q card-name)))))))))
```

The good news is that this test passes after my change. The bad news is
that it also passes without my change. I think what's going on is that
the behavior is different with `*force-sync*` on/off: in async mode, we
get the full batch that contains the updates for `[dashboard, card]`.
In synchronous mode, we get separate batches for `[dashboard]` and then
`[card]`.

I think we might want to rework tests somehow - it would be quite nice
to be able to still run things asynchronously but drain the queue before
making assertions, so the behavior wouldn't be different between
tests/prod.

* add a test
2025-11-14 23:27:45 +00:00
John Swanson
aa549d6910 Don't set last_used_param_values for public (#64432)
Fixes UXW-216
2025-11-14 15:20:19 -08:00
Oreon Lothamer
d5da0f4d38 self-hosting metabase stack (#65262)
* self-hosting metabase stack

* self-hosting config

* self-hosting wait for helm with --atomic
2025-11-14 13:02:53 -10:00
Riley Thompson
dded0d225a Replace snowflake test password auth with key pair auth (#65522)
* replace password with key pair auth

* re enable snowflake tests

* add private key env var

* update private key details for temp dbs

* small changes

* fix describe database test

* fix multi method params

* update test

* update test

* try fix

* check CI

i noticed that this tests pass if we don't put a connection-uri in
there. I'm not sure what the original intent was, but the following
works just fine:

```
{:url "jdbc❄️//<account>.snowflakecomputing.com/?schema=INFORMATION_SCHEMA",
 :properties {"use-password" "false",
              "connection-uri" "jdbc❄️//<account>.snowflakecomputing.com/?user=<user>CI&private_key_file=%2Fprivate%2Fvar%2Ffolders%2F1d%2F3ns5s1gs7xjgb09bh1yb6wpc0000gn%2FT%2Fmetabase-secret_8808579641027884666.tmp&schema=INFORMATION_SCHEMA",
              "client_session_keep_alive" "true",
              "timezone" "UTC",
              "warehouse" "<warehouse>",
              "user" "<user>",
              "ssl" "true",
              "private_key_file" "/var/folders/1d/3ns5s1gs7xjgb09bh1yb6wpc0000gn/T/metabase-secret_8808579641027884666.tmp",
              "week_start" "7",
              "application" "Metabase_Metabase",
              "account" "<account>",
              "db" "\"<db>\"",
              "time_output_format" "HH24:MI:SS.FF3",
              "client_metadata_request_use_connection_ctx" "true"}}
```

When it goes through clojure.java.jdbc. Somehow we are getting a
connection string that doesn't play nice. I _think_ it may just be an
issue with snowflake but i'm not positive.

* remove parallel test markers

* remove parallel marker

when running tests locally with these removed:

```clojure
(run/find-and-run-tests-repl {:only 'metabase.driver.snowflake-test})
...
Ran 49 tests in 116.525 seconds
502 assertions, 1 failure, 0 errors.
{:test 49, :pass 501, :fail 1, :error 0, :type :summary, :duration 116525.006833, :single-threaded 32, :parallel 17}
```
yields only one expected error. Previously using regular stuff also
worked

```clojure
snowflake-test=> (run-tests)

Testing metabase.driver.snowflake-test

Ran 49 tests containing 502 assertions.
1 failures, 0 errors.
{:test 49, :pass 501, :fail 1, :error 0, :type :summary}
```

(again the single test that failed). but using the CLI tool i would get
errors when running them in parallel.

* fixup stupid snowflake

1. i don't know why we are running into multithreading issues now. But
i've removed those tags and the issues are gone.
2.

```clojure
snowflake-test=> (let [spec {:connection-uri "jdbc❄️//account.snowflakecomputing.com/?schema=INFORMATION_SCHEMA&user=<user>&password=<password>&db=%22v5_airports%22"}]
                   [(jdbc/query spec ["select CURRENT_DATABASE() db"])
                    (jdbc/query spec ["select CURRENT_SCHEMA() db"])])
 [({:db "v5_airports"}) ({:db "INFORMATION_SCHEMA"})]
snowflake-test=> (let [spec {:connection-uri "jdbc❄️//account.snowflakecomputing.com/?schema=INFORMATION_SCHEMA&user=<user>&password=<password>&db=v5_airports"}]
                   [(jdbc/query spec ["select CURRENT_DATABASE() db"])
                    (jdbc/query spec ["select CURRENT_SCHEMA() db"])])
[({:db nil}) ({:db nil})]
```

In the above, note that putting the db in the connection string _and
url-encoding it_ (it's already quoted) is necessary.

* conditionally add db

in tests there's not a database so just be smart about it:

```clojure
{:warehouse "<warehouse>",
 :additional-options nil,
 :timezone "UTC",
 :db nil,
 :account "<account>",
 :use-password false,
 :time_output_format "HH24:MI:SS.FF3",
 :user "<user>",
 :subname "//<account>.snowflakecomputing.com/"}
```

* address pr comments

* remove outdated comment

pretty freaky comment eh? I added this when i commented out the
`handle-conn-uri` call underneath it and it caused tests to pass. That
was helpful in identifying the mechanism, but not a good solution. Put a
comment here so that that was not a final state, forgot to remove
comment when we got to a proper final state and `handle-conn-uri` was
fixed.

---------

Co-authored-by: dan sutton <dan@dpsutton.com>
2025-11-14 16:03:39 -05:00
Braden Shepherdson
51067eb586 [QP] Only label remaps for columns that actually need it (#65860)
Fixes #65726.

If you implicitly joined a field that happened to be the target of a
remapping, the QP was labeling it as `:remapped_from` the FK even
though (a) it wasn't really remapped and (b) there was no
corresponding FK column marked as `:remapped_to` the target column.

(Eg. `Orders.PRODUCT_ID` is remapped to `Products.TITLE`. Then I
implicitly join `Products.TITLE` directly and the QP marks it as
remapped from `Orders.PRODUCT_ID` even though it wasn't.)

That caused the FE to do odd things like drop and relabel columns.

This change adjusts the QP so it will ignore plausible remappings that
don't actually get returned from the last stage.
2025-11-14 18:57:02 +00:00
dpsutton
cd39f12e79 Suppress liquibase output (#65858)
We get a bunch of this useless stuff in CI:

```
Placeholder until other changesets

UPDATE SUMMARY
Run:                        641
Previously run:               0
Filtered out:                69
-------------------------------
Total change sets:          710

FILTERED CHANGE SETS SUMMARY
DBMS mismatch:               69
```

Looking for this in liquibase this is not logged but printed to the
console :(.

It goes through this:

```java
    private static void writeMessage(String message, UpdateSummaryOutputEnum showSummaryOutput, OutputStream outputStream) throws LiquibaseException {
        switch (showSummaryOutput) {
            case CONSOLE:
                writeToOutput(outputStream, message);
                break;
            case LOG:
                writeToLog(message);
                break;
            default:
                writeToOutput(outputStream, message);
                writeToLog(message);
        }
    }
```

So we want that enum to be LOG.

```clojure
liquibase=> (clojure.reflect/reflect liquibase.Liquibase)
{:bases #{java.lang.Object java.lang.AutoCloseable},
 :flags #{:public},
 :members #{ ,,,
             #clojure.reflect.Method{:name setShowSummaryOutput,
                                    :return-type void,
                                    :declaring-class liquibase.Liquibase,
                                    :parameter-types [liquibase.UpdateSummaryOutputEnum],
                                    :exception-types [],
                                    :flags #{:public}}
          ,,,}}
```

So easy fix. Set this enum and hopefully it shuts up.
2025-11-14 11:52:49 -06:00
Riley Thompson
854650cd86 Fix athena sync 65728 (#65777)
* claude fix

* simplify

* handle nested fields for athena

* nfc have position 0

* set non leafs as details only

* clean up parser and add tests

* whitespace

* disable nested fields

* kondo

* kondo

* disable nested schema test
2025-11-14 12:52:06 -05:00
Jeff Bruemmer
9cd92bf39c docs - document links new charts (#65828)
* links and new charts

* links

* edits

* Update docs/documents/introduction.md

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-11-14 12:09:24 -05:00
Chris Truter
55deb90598 Fix append for CSVs with really long column names with shared prefixes (#65793) 2025-11-14 15:51:48 +00:00
Nicolò Pretto
679170b832 Preparation for moving sdk code to oss folder (#65428)
* implement plugins for auth

* move some stuff to the oss folder as those file create issues later on

* make embedding-sdk:docs:generate pass

* move metabot to use plugins

* remove imports from package from other folders
2025-11-14 16:28:52 +01:00
Timofey Kachalov
5829365136 fix(sdk, embed-js, static): Fix Static embedding styles (#65796) 2025-11-14 18:24:04 +04:00
lbrdnk
0de9cf68de Revert param values from query results (#65841)
* Revert "Adjust cards-with-filters to work with action cards (#65805)"

This reverts commit d6b857a2c6.

* Revert "Fix mapping of params to later query stages (#65651)"

This reverts commit c98e640426.

* Revert "Compute param values from card results (#64318)"

This reverts commit 2693173e7f.
2025-11-14 15:08:14 +01:00
Nemanja Glumac
2e6c7d97e7 Remove projectId from Cypress config (#65748) 2025-11-14 07:32:34 +01:00
Mahatthana (Kelvin) Nomsawadi
cdad4c95ff fix(sdk-bundle): Fix EditableDashboard sometimes doesn't show the correct tab (#65802)
* Fix SDK save dashboard question to not show collection/dashboard picker

* Fix EditableDashboard sometimes doesn't show the correct tab on first render

* Add an assertion

* left some breadcrumbs

* Update unit tests to be async
2025-11-14 02:53:03 +00:00
Fraser
ba35c6640a remove flaky tag (#65741) 2025-11-14 11:25:16 +13:00
appleby
ab6c2ab72d Fix code that populates :used_tables in metabot context (#65787)
* Fix code that populates :used_tables in metabot context

This was causing :used_tables to be absent in the :user_is_viewing
context, limiting metabot's ability to get sql fixing right without
information about the available tables and their fields.

Call lib-be/normalize-query and lib/native-only-query? in
metabase-enterprise.metabot-v3.context/query-for-sql-parsing and
likewise use lib funcs to get template-tags in
metabase-enterprise.metabot-v3.query-analyzer.parameter-substitution/replace-tags

* Update ai-sql-fixer and tests to work with MBQL5 queries

* Fix metabot-v3.table-utils-test to use MBQL5 queries
2025-11-13 13:39:11 -08:00
Alex Yarosh
5cac3d948d Rename handleLink.tsx to handlelink.tsx (#65821) 2025-11-13 19:56:35 +00:00
Timofey Kachalov
2ea84461c3 fix(sdk-bundle): Temporarily hide the incompatibility banner (#65813) 2025-11-13 22:09:29 +04:00
lbrdnk
d6b857a2c6 Adjust cards-with-filters to work with action cards (#65805)
* Fix cards-with-filters, not all cards have with mapped filters dataset_query

* Check also dataset-query

* Comments

* Test

* grammar

* Update src/metabase/parameters/dashboard.clj

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

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-11-13 19:02:48 +01:00
Alex Yarosh
a4d22112aa docs: click behavior limitation (#65809)
* Add click behavior setup information to introduction

* Update docs/embedding/sdk/introduction.md

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-11-13 17:00:04 +00:00
Mahatthana (Kelvin) Nomsawadi
b7b212287c Update screen reader description to match the new menu copy (#65747)
* Update screen reader description to match the new menu copy

* Update frontend/src/metabase/embedding/components/ArchiveButton.tsx

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-11-13 09:05:32 +00:00
Sébastien
1103abcfce Closes EMB-988 flaky test (#65745)
* closes EMB-988 flaky test

* .

* .

* .
2025-11-13 09:46:23 +01:00
lbrdnk
c98e640426 Fix mapping of params to later query stages (#65651)
* Fix nested field mapping

* whitespace

* Update src/metabase/lib/util.cljc

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

* Remarks

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-11-13 09:06:32 +01:00
Fraser
e8a740900f Update claude code workflow to use v1 action (#65783) 2025-11-13 18:04:04 +13:00
Denis Berezin
1b8036e912 Preserve document cards width on reorder (#65768) 2025-11-13 02:39:58 +03:00
Denis Berezin
ef329bbe6a Documents new questions (#65504)
* Temp

* Add creation modal for structured questions

* Added full implementation for structured questions

* Added full implementation for structured questions

* Added full implementation for native questions

* Refactor question type picker to menu items

* Add proper keyboard navigation, add premissions check

* Add basic e2e tests

* Add basic e2e tests

* Fix types

* Fix types

* Fix types

* Self review

* Self review

* Review fixes - default display, native title

* Add e2e for viz

* Fix unit tests

* Fix e2e tests

* Fix e2e tests

* fix saving an empty question

* Review fixes

* Fix issue with keyboard trigger
2025-11-13 02:39:23 +03:00
Nemanja Glumac
b677b62cdd Load plugin manifest in e2e run mode (#65729)
When we introduced a new e2e run mode, we didn't realize this piece of code needs to be updated as well.
For people who were running the backend from source (but using e2e mode) some drivers might not have worked. Example:
```
"message": "No method in multimethod 'connection-properties' for dispatch value: :sqlite"
```

This commit fixes that.
2025-11-12 22:37:32 +01:00
Nemanja Glumac
b82cf6fdee Remove unused mb_user_defaults env var (#65725)
Cloud never used this to pre-fill the user on MB setup.
We have the same functionality with way less code available today, either way.

Instead of:
```
/setup/user_defaults#123456
```

do this:
```
/setup?first_name=John&last_name=Doe
```
2025-11-12 22:24:29 +01:00
Alex Yarosh
c040219c62 docs: more new plugins + typechecked snippet for links (#65767)
* new plugins

* Update docs/embedding/sdk/plugins.md

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-11-12 21:13:22 +00:00
github-automation-metabase
e9090ff9b8 Update generated docs (master) (#65733)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-12 16:08:49 -05:00
github-automation-metabase
faabcbc119 Update generated docs (master) (#65682)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-12 16:04:55 -05:00
Brad Anderson
5d3f2f8061 Feat: Document link editing (#65399) 2025-11-12 15:12:16 -05:00
Dennis Schridde
2b76c38e1f Add purchase page for paid Metabase AI add-on (#65343)
### Description

In #62513 we added a page to offer a Metabase AI (Metabot) trial.  Now
we want to offer to purchase the paid Metabot add-on.

### How to verify

1. Ensure you have a token with the `offer-metabase-ai-tiered`
   feature, but without the `metabot-v3` and `offer-metabase-ai`
   features.
2. Ensure you have a Metabase API key linked to that same token.
3. Navigate to `/admin/metabot` and see a page offering you to purchase
   different quantities of Metabot queries.
4. Select a quantity (or go with the default of 500), check "I agree",
   then click "confirm purchase".
5. Confirm that your token now has the `metabot-v3` feature and the
   associated subscription has an appropriate Metabase AI product.

### Checklist

- [x] Tests have been added/updated to cover changes in this PR

### Notes

* Rename MetabotPurchasePage to MetabotTrialPage
  - and add the page for the purchase of the paid add-on as
    `MetabotPurchasePage`, to make the name more clearly represent the
    purpose (paid vs. trial).
* Move frontend client for /api/ee/cloud-add-ons into metabase-enterprise/api
* Use ts-pattern instead of hand-crafted type guards in Metabot trial page
* Don't swallow errors when submitting Metabot purchase form
* Create Redux selector to derive isStoreUser
* Test failures to purchase Metabot trial
* Adjust implementation of POST /api/ee/cloud-add-ons/:product-type to dashes instead of underscores
* Require accepting terms of service for Metabot trial
* Move RTK and Formik error handling for Metabot into utils.ts
* Avoid use of any type in Metabot Formik error handling
* Improve control flow with side effects
* Fix typo in log message

Closes: https://linear.app/metabase/issue/CLO-4423/allow-to-buy-metabase-ai-from-the-admin-under-a-token-feature
References: https://github.com/metabase/metabase/pull/62513
Co-authored-by: Benoit Vinay <ben@metabase.com>
2025-11-12 21:11:50 +01:00
Maz Ameli
fd033ce0bf Allow return to focus body of Documents (#65732)
Co-authored-by: Brad Anderson <brad@metabase.com>
2025-11-12 15:11:34 -05:00
Alex Yarosh
b9e93ea0c8 Update chart colors explanation in appearance.md (#65758)
Clarified the explanation regarding the order of chart colors.
2025-11-12 19:14:13 +00:00
Jeff Bruemmer
aead8fab32 document MB_NOTIFICATION_TEMP_FILE_SIZE_MAX_BYTES (#65751) 2025-11-12 18:53:46 +00:00
Alex Yarosh
bef0a89f9f docs: dependencies polish (#65754)
* dependencies polish

* Optimized 2 images, saved 109.1 KB (48.5% smaller)

* reword

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-11-12 18:06:15 +00:00
Ryan Laurie
63f2359659 upload checksums with releases (#65712) 2025-11-12 08:43:01 -07:00
Mahatthana (Kelvin) Nomsawadi
62fe686ffc Fix static embedding or public embed outside iframe not working with #theme (#65740)
* Fix static embedding or public embed outside iframe not working with #theme

* Add tests

* Make embedding prefix/suffix naming consistent
2025-11-12 15:29:45 +00:00
Mahatthana (Kelvin) Nomsawadi
8c5cac2369 Update the delete button copy for better UX (#65688)
* Update the delete button copy for better UX

* Apply suggestions from code review

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

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-11-12 12:53:27 +00:00
Sébastien
d514efc3c3 feat(sdk): Convert plugin system to deferred initialization (#65142)
* Convert plugin system to deferred initialization with undo capability

* fixed wrong rebase

* better initialization

* .

* fixed unit tests

* .

* duh

* added back whitelabel overrides for SDK

* fixup

* fixed unit test

* cleanup
2025-11-12 11:48:59 +01:00
Oleksandr Solovyov
f4c15ce5d7 unstemmed words should still appear in search (#64560)
This is done by putting them in the full-text index using a 'simple' stemmer, just with a lower priority than a normal
stemmed words are.

Fixes #60649
2025-11-12 12:38:47 +02:00
Fraser
1c649fb56f deps: Remove redux-promise and reduce-reducers (#64945) 2025-11-12 11:35:51 +01:00
Fraser
6d349fd1b2 Drop react-copy-to-clipboard (#65674) 2025-11-12 23:17:37 +13:00
Sébastien
5660df7a85 Closes UXW-2237 click on admin logo error (#65581) 2025-11-12 07:07:50 +01:00
Jeff Bruemmer
1951cfe3f7 add command documentation generation (#65727) 2025-11-11 18:00:31 -05:00
Jeff Bruemmer
ea03f4819b changelog link (#65717) 2025-11-11 16:20:51 -05:00
Brad Anderson
af548d9daa Fix: UXW-2235 Prevents 403s from SmartLinks from hiding the whole document (#65609)
* UXW-2235 Prevents 403s from SmartLinks from preventing the whole document from showing (SmartLink renders with "No access" version instead)

* UXW-2235 Adds e2e tests
2025-11-11 15:56:18 -05:00
Rodrigo López Dato
f568cc793b Add /livez and /readyz endpoints (#64479)
* Add /livez and /readyz endpoints

* nit comment

* Update tests with new endpoints

* Update src/metabase/server/routes.clj

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* bad bot

* fix tests

* fix license test failure

https://github.com/metabase/metabase/pull/65034 bumped some jetty deps
from 12.0.24 to 12.1.3. Along for the ride came a new org:

```
org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server 12.1.3
  X org.eclipse.jetty.ee9/jetty-ee9-servlet 12.1.3 :use-top
  . org.eclipse.jetty.ee9/jetty-ee9-webapp 12.1.3
    . org.eclipse.jetty/jetty-xml 12.1.3
      . org.eclipse.jetty/jetty-util 12.1.3
      X org.slf4j/slf4j-api 2.0.17 :use-top
    . org.eclipse.jetty.ee/jetty-ee-webapp 12.1.3 <--- new
```

This has a new org of `org.eclipse.jetty.ee` and no discernable license
in the pom or the jar.

Refresher we look in the pom for things like

```
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
```

or in the jar for some common names of licenses, like in this mysql
connector jar:

```
  -rw-r--r--     134  18-Sep-2023 19:11:56  INFO_SRC
  -rw-r--r--   71049  18-Sep-2023 19:11:56  LICENSE
  -rw-r--r--    1624  18-Sep-2023 19:11:56  README
  -rw-r--r--     846  18-Sep-2023 19:12:04  META-INF/INDEX.LIST
```

I didn't see a license at either of these spots, but consulted
https://mvnrepository.com/artifact/org.eclipse.jetty.ee/jetty-ee-webapp
to see it listed as Apache 2.0 and EPL 2.0

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
Co-authored-by: dan sutton <dan@dpsutton.com>
2025-11-11 16:55:08 -03:00
Ryan Laurie
0cfcfd561e fix auto patches again (#65708)
* fix auto patches again

* revert ??
2025-11-11 11:36:51 -07:00
Uladzimir Havenchyk
046df0694e chore: upgrade mantine/core patch to match installed version (#65340)
* chore: update mantine patch package

* fixup

* fixup

* fixup
2025-11-11 20:48:37 +03:00
Jeff Bruemmer
257f23f104 generate command docs (#65608)
* generate command dox

* clean-up

* restore command.md

* clean-up
2025-11-11 11:53:58 -05:00
Braden Shepherdson
f78cf1648f [perf] Improve quadratic lookups in add-alias-info (#65595)
Part of #64774.

Replaces quadratic (refs * columns) search in `add-alias-info` with map lookups
by ID and `:lib/source-column-alias`. They don't always succeed, but I ran the tests with a fallback case
that checked the old quadratic way too - in no case does the new match fail but the old way succeed.

- Speeds up the basic query of wide tables (see `qp.perf-test`) about 7x, from 8825ms to 1435ms.
- Reduces the big user query from #64774 from 205ms to 145ms on my machine.
2025-11-11 16:23:08 +00:00
Oleksandr Solovyov
559d3357a2 request cancelation: this time for real (#65660)
Transfer-Encoding: chunked will cause Apache HttpClient to wrap body in ContentLengthInputStream,
which, in turn, quote: "NEVER closes the underlying stream".

So 'with-open' closing the stream was never propagated. And the new test with transfer-encoding
header captures that.
2025-11-11 18:12:56 +02:00
Braden Shepherdson
9584d61b16 [perf] Remove unnecessary MBQL 4 -> 5 -> 4 round trips in SQL drivers (#65509)
Part of #64774.

Now that most of the query processor machinery has been ported to use MBQL 5 and the `metabase.lib.core`
functionality, there were several needless round trips between MBQL 4 and 5.

The `driver.sql.qp/preprocess` function was converting queries from MBQL 5 to 4 up front,
and then each of three inner operations (now implemented in MBQL 5) were wrapped to convert 4 to 5 and back.

Removing this wasted effort reduced the time on my machine for the big user query from #64774 from 205ms to 145ms.
2025-11-11 14:55:19 +00:00
Mahatthana (Kelvin) Nomsawadi
13e92995df Fix flaky 'models.cy.spec.js' test (#65690) 2025-11-11 14:52:48 +00:00
Edward Paget
a939c427ad docs: Update api changelog (#65663) 2025-11-11 08:47:51 -06:00
Nemanja Glumac
2b7980868d Fix encoding in "tag for release" workflow (#65689) 2025-11-11 11:17:19 +00:00
Chris Truter
3c92dcd071 Minor fixes around semantic search (#65654) 2025-11-11 11:36:24 +02:00
Fraser
e02de4a3bb Drop usage of cancelable and add unit tests (#65455) 2025-11-11 19:33:56 +13:00
Fraser
b5495dc6aa Refactor DeleteSubscriptionAction (#65575) 2025-11-11 15:35:50 +13:00
Fraser
e976b1af84 Drop clipboardy (#65675) 2025-11-11 12:05:51 +13:00
Riley Thompson
1a827eb9a0 Fix postgres bytea truncation (#65569)
* fix postgres bytea truncation

* use = over =?

* Add issue ref in test
2025-11-10 22:27:17 +00:00
Sloan Sparger
ecd803f067 [Metabot] Misc. bug fixes (#65255)
* fix cut not removing text from input

* ensure we fetch all data for all possible models for smart links

* remove unused comment

* fixes smart links in metabot input sometimes degrading into their text representation and fixes some cases where wrong model name ("model" instead of "dataset") was used for metabot links

* fix unit tests

* fix phantom selection when cutting value from input (context: https://github.com/metabase/metabase/pull/65255\#pullrequestreview-3436250849)
2025-11-10 14:57:58 -06:00
dpsutton
00ee60d8ed Cell count for notifications temp storage (#65518)
* ditch our manual batches of rows for bufferedwriter

Q: Why did we use a manual batch at first?
A: i noticed it was super slow and worked around this. Then realized i
was gzipping it so that was the actual slowdown. The batching was
already done and it didn't hurt anything.

Q: Why get rid of it then?
A: want to move to "cell" based counting. Rows are fine until they get
really wide and then 300 columns * 5,000 rows = 1,500,000 cells in
memory at once. Put some strings in there and we blow up. So lets switch
to cell counting rather than row counting. This is way easier if we only
care about number of rows or cells when holding them in memory. Don't
have to count the batch ourself when streaming. So if that goes row by
row, we just watch for the number of cells as the trigger to switch to
streaming and we are done.

```clojure
temp-storage-test=> (time
                      (mt/test-driver :postgres
                        (select-keys (mt/process-query (mt/native-query {:query "SELECT
    row_num AS id,
    -- Random Integer between 1 and 100000
    floor(random() * 100000 + 1)::INTEGER AS random_int,
    -- Random Float
    (random() * 1000)::NUMERIC(10, 4) AS random_float,
    -- Random Date within the last 5 years
    (current_date - (random() * 5 * 365)::INTEGER)::DATE AS random_date,
    -- Random Timestamp within the last 30 days
    (NOW() - (random() * 30 * '1 day'::interval)) AS random_timestamp,
    -- Random String: Generates a random alphanumeric string about 1000 characters long
    (
        SELECT string_agg(
            chr(
                (CASE WHEN random() < 0.5 THEN 65 ELSE 97 END) + (random() * 25)::INTEGER
            ),
            ''
        )
        FROM generate_series(1, 1000)
    ) AS random_string
FROM
    generate_series(1, 500000) AS row_num;"})
                                                       (temp-storage/notification-rff 2000 :testing))
                                     [:row_count :status :data.rows-file-size :notification/truncated?])))
"Elapsed time: 1457.921083 msecs"
{:row_count 15184,
 :status :completed,
 :data.rows-file-size 16369108,
 :notification/truncated? true}
```

* Switch to cell based counts, not rows

We found in practice some people might have queries with 300
columns. When we keep 5,000 of those in memory, we end up having
1,500,000 cells in memory at once. We then are open again to OOM
issues. So this swaps over to a cell basec count rather than rows to be
a bit more granular.

* Change from 2,000 rows to 20,000 cells

the thinking here is 2,000 rows with 10 values. It's pretty arbitrary though

* rename var for cells to disk threshold

* i have to delete this test because i used `time` in a comment block

* formatting fix
2025-11-10 13:59:26 -06:00
Fraser
a2a31bd9e3 Replace usages of deprecated useSafeAsyncFunction (#65406) 2025-11-11 08:44:29 +13:00
William
c1e548ca9e Remove-replace cleans up empty first stages when reasonable (#65565)
If you have an empty first stage followed by "real" later stages, the frontend produces duplicate buttons in the query
builder.  Cleaning those stages up removes those buttons.
2025-11-10 19:43:18 +00:00
github-automation-metabase
d32fb5f798 Bump com.nimbusds/nimbus-jose-jwt from 10.4.2 to 10.5 (#63228)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-10 19:00:15 +00:00
github-automation-metabase
a8345c94f8 Bump com.github.seancorfield/honeysql from 2.7.1340 to 2.7.1350 (#63219)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1350/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-10 18:48:23 +00:00
Cam Saul
734949f267 BE modularization decoupling Halloween edition (#65236)
* BE modularization: decouple `server` from `core`

* Split up enterprise/api and enterprise/api-routes

* Split up `settings` and `settings-rest`

* Dox for new util

* Add another util function

* Split `permissions` and `permissions-rest`

* Code fixes and additional utils

* Improved deps graph dox
2025-11-10 10:04:36 -08:00
William
14d2f55fa2 Display "previous results" when a join's conditions specify multiple lhs tables (#65239)
When a join's conditions came from multiple tables, we used the first table as the table name, even though some of the cols came from a different table. We now display "Previous results" to denote that the lhs columns are from different tables.
2025-11-10 17:43:33 +00:00
Anderson
e8d760345b Include headers when copying table rows (#65439)
* Include headers when copying table rows

* Fix e2e test

* Fix headers and values out of order when when cells are selected backwards or individually
2025-11-10 13:25:34 -03:00
Ryan Laurie
d52732d113 Fix Collection Tree Collapsing (#65620)
* actually just be smart

* consistent change detection

* remove dead code
2025-11-10 07:56:45 -07:00
Edward Paget
fcacb480e0 fix: batch delete data perms (#65567)
* fix: batch delete data perms

To workaround postgresql parameter limits in the delete query

* Update src/metabase/permissions/models/data_permissions.clj

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>

* Update src/metabase/permissions/models/data_permissions.clj

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>

* Update data_permissions.clj

---------

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2025-11-10 14:50:20 +00:00
Timofey Kachalov
321d9266f2 Close New Modals when pathname is changing (#65472) 2025-11-10 18:27:04 +04:00
github-automation-metabase
4ff0d16f78 Update generated docs (master) (#65643)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-10 09:16:56 -05:00
Timofey Kachalov
7a5a24a347 Adjust reviewers in sdk-release CI workflow (#65652) 2025-11-10 16:56:42 +04:00
Chris Truter
f506b2ce36 Simplify default search engine and active index logic (#65604) 2025-11-10 12:10:21 +00:00
Chris Truter
d7d4141e19 Support search weight overrides per request for tool calls (#65592) 2025-11-10 09:47:17 +00:00
Filipe Silva
d4bbf59cc0 fix: update harbormaster API use, and support public openapi schema (#65549)
* fix: update harbormaster API use

The Harbormaster API was updated to use snake_case in all params
and returns in https://github.com/metabase/harbormaster/pull/6663.

There's an backwards compatible interim period where it will support both kebab-case and snake_case in params, and keep existing returns.
The changes in this PR will make Metabase forwards and backwards compatible with the Harbormaster API changes.

After the interim period, the Harbormaster API will only take and return snake_case data.

* feat: support missing api key on hm.client/call

The OpenAPI spec is now public and the api key is not mandatory.
2025-11-10 09:34:14 +00:00
Fraser
22ebb53487 Refactor SegmentActionSelect (#65576) 2025-11-10 12:07:21 +13:00
Fraser
4e1d6c0796 Refactor edit header (#65577) 2025-11-10 12:07:07 +13:00
Oleksandr Yakushev
cec321e06c [insights] Convert BigDecimals into Doubles early in the pipeline (#65234) 2025-11-10 00:23:44 +02:00
Oleksandr Yakushev
fcce676094 [normalize] Optimize metabase.lib.schema.util (#63470) 2025-11-08 23:50:36 +02:00
Noah Moss
450dddb456 Ensure we normalize queries before detecting transform source type (#65541) 2025-11-08 12:32:01 -05:00
Sébastien
acadfded3e Closes EMB-970 move some callbacks to MetabaseGlobalPluginsConfig (#65590)
* Closes EMB-970 move some callbacks to MetabaseGlobalPluginsConfig

* types
2025-11-08 07:14:54 +01:00
Anderson
4578d66e2e Fix some modals not closing properly without browser history (#65370)
* Fix some modals not closing properly without browser history

* Add e2e test

* Fix tsc
2025-11-07 21:00:49 -03:00
Alex Yarosh
ff2b3d80ff docs: new sdk click and link behavior (#65627)
* new click and link behavior

* Apply suggestions from code review

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

* handle handlelink

* fix typo

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-11-07 18:18:04 -05:00
Nick Fitzpatrick
d3efd21c50 Gdgt 910 rework look and feel of color settings in gauge (#65552)
* updated segments ui

* sober up the needle

* setting up unit tests

* make gauge needle opaque

* remove key, update unit test
2025-11-07 21:15:36 +00:00
Jeff Bruemmer
4d54ae84d5 docs - remote sync edit (#65625)
* turning off remote sync

* theme toggling in command palette

* edtis
2025-11-07 16:13:52 -05:00
Nick Fitzpatrick
15f92af504 Use transparency instead of white for table color ranges (#65426)
* Use transparency instead of white for table color ranges

* adding visual tests
2025-11-07 17:00:07 -04:00
Alex Yarosh
9408112eeb Document supported databases for model persistence (#65621)
Added section listing databases that support model persistence.
2025-11-07 14:21:48 -05:00
Nemanja Glumac
b614b64281 Remove special embedding-sdk e2e test case (#65594) 2025-11-07 19:30:52 +01:00
Timofey Kachalov
7e19ce967f fix(sdk): Accept an entity id as a target collection id for CreateQuestionModal (#64601) 2025-11-07 21:45:08 +04:00
Nicolò Pretto
671e406c28 fix(modular): fix downloads on dashboards loaded by entityIds (#65613)
* fix(modular): fix downloads on dashboards loaded by entityIds

* tests
2025-11-07 17:39:43 +00:00
github-automation-metabase
3dd2b5a7ac Update generated docs (master) (#65596)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-07 11:52:43 -05:00
Nick Fitzpatrick
761e01ff71 update color scheme for google button (#65558)
* update color scheme for google button

* Adding a comment like I was supposed to
2025-11-07 09:36:51 -07:00
Braden Shepherdson
16c875265c [perf] New MetadataProvider and query derived from a real perf issue (#65508)
This has been a very valuable benchmark for processing complex queries,
especially large `:case` statements and nested aggregations.

Adding it with some REPL-able benchmarks in `query-processor.perf-test`.
2025-11-07 15:34:34 +00:00
Sébastien
f2610651a1 fixed flaky (#65599) 2025-11-07 16:01:27 +01:00
Farhanul Haque Khan
5dc4b8809a Add logging configuration to Docker setup (#65521)
---------

Co-authored-by: Rodrigo López Dato <rodrigo@metabase.com>
2025-11-07 14:20:51 +00:00
Jeff Bruemmer
f70a7b3a7f update doc workflow to add manual input (#65597) 2025-11-07 14:18:08 +00:00
Nicola Mometto
5a7f27262d small bugfixes for mysql aws iam support (#65585) 2025-11-07 12:15:37 +00:00
Phoomparin Mano
f893c48fde fix(embed-js): black background is shown on systems with dark mode preferences (#65534)
* reverts the color-scheme meta tag

* adds the color scheme meta tag if entry point is not embed-sdk

* add backend tests for color-scheme meta tags

* add a cypress test for color-scheme
2025-11-07 12:06:18 +00:00
Oleksandr Solovyov
f91fa374af metabot request cancelation (#65538)
this time it is actually working and tests are synchronized with real-world behavior
2025-11-07 13:32:24 +02:00
Dan Stone
aec03f0e37 Avoid DDL races in redshift sync (relation does not exist error) (#65546)
- catalog metadata is not transactional in redshift
- calls like pg_catalog.has_schema_privilege when using a string argument will resolve the oid of the schema/table etc
- if the oid cannot be resolved (e.g. table/schema does not exist) an error is thrown

We occasionally see sync failed due to relation does not exist, one cause might be concurrent test runs / cleanup deleting tables/schemas while running.

I have fixed the first half of the union to use the oid form of these calls which will result in NULL instead of an error while racing with DDL in other runs.

Need to research on external tables before changing the external table sub-query: probably want to join to svv_external_schemas and use the oid there, but not 100% yet.
2025-11-07 10:58:11 +00:00
Nemanja Glumac
ee9dd41cd2 Fall back to the staging token check (#65474) 2025-11-07 09:07:06 +01:00
dpsutton
97206bcf80 Fix docs scalar version (#65553)
* Fix docs

it throws an error in the js console about webassembly not having the
right permissions

Two ways to fix: give permissions, or rollback to a version that works.

I'm pinning to a version that works since we are close to a release.

39.2 breaks, 39.1 works.
I'm also including the recommended stylesheets

In the meantime, i'm going to investigate
resources/openapi/index_external.html.mustache as i'm not sure what uses
this and if it needs to be updated or deleted. Perhaps used by `clojure
-M:ee:doc api-documentation`?

* switch template to pinned 39.1 version
2025-11-06 23:32:45 -05:00
Riley Thompson
02eec9c5b3 Update mongo test after driver upgrade (#65560)
* adjust exception assertion

* make exception msg regex more generic
2025-11-07 01:05:31 +00:00
Denis Berezin
d3f45bcced UXW-2179 Replace 'Add to dashboard' modal with a toast (#65400)
* UXW-2179 Replace 'Add to dashboard' modal with a toast

* fix some e2e tests

* Fix more e2e tests

* Fix more e2e tests

* Fix more e2e tests

* Design fix

* Fix e2e
2025-11-07 02:11:42 +03:00
Jeff Bruemmer
0d3bae5103 docs - metabot can use the glossary (#65562)
* metabot can use the glossary

* link to glossary
2025-11-06 16:50:29 -05:00
Alex Yarosh
410c4aeb12 docs: for for for for for for (#65559)
* Fix typo in 'Checking for breaking changes' section

* Fix typo in 'Checking for breaking changes' section
2025-11-06 16:11:54 -05:00
Alex Yarosh
92a25096ae docs: dependencies on save (#65450)
* Add breaking changes detection information

Added section on checking for breaking changes when saving questions, models, or metrics.

* Add breaking changes check to model editing documentation

Added section on checking for breaking changes when saving a model.

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-11-06 15:21:33 -05:00
Chris Truter
5937d3bb38 Add flag to skip search reindexing on import (#65537)
* Add flag to skip search reindexing when loading entities

* Test flag
2025-11-06 15:06:51 -05:00
github-automation-metabase
85ff7199c0 Bump org.mongodb/mongodb-driver-sync from 5.5.1 to 5.6.1 (#64667)
Inspect dependency changes here: https://github.com/mongodb/mongo-java-driver/compare/r5.5.1...r5.6.1
2025-11-06 18:55:15 +00:00
Jeff Bruemmer
9731625cc4 docs - remote sync (#65443)
* embedding collections

* image, edits, and embedding example

* various edits

* edits

* edits and images

* more edits

* Optimized 4 images, saved 235.2 KB (36.0% smaller)

* library to synced collection

* fix links

* Update docs/installation-and-operation/remote-sync.md

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

* Update docs/installation-and-operation/remote-sync.md

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

* edits

* edits

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

* edits

* more edits

* clean up

* edit

* clean up

* dev instance

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-11-06 17:34:41 +00:00
Nicola Mometto
ff099455d0 Add AWS IAM Authentication Support for PostgreSQL and MySQL (#65418)
* add aws jdbc wrapper

* add aws-iam option to auth-provider-options

* WIP: hook ssl iam in postgres

* wip

* working

* style

* postgres appdb aws iam support

* auth-provider-options-only-aws

* aws iam for mysql

* ssl

* warnings

* as error

* support appdb uri

* add unit tests

* warning

* don't automatically include useSSL

* support ssl-cert configs for mysql appdb

* more unit tests

* refactor

* integration test

* fix: always set useSSL for aws-iam in mysql appdb

* fix mysql uri

* chore

* style

* fix

* connection tests

* setup for CI

* temporarily disable until secrets are setup

* chore: set

* add warning

* Revert "temporarily disable until secrets are setup"

This reverts commit 4ca6eb4607.
2025-11-06 16:26:32 +00:00
Alex Yarosh
5037eec437 Update impersonation.md to include Starburst/Trino (#65542)
Added Starburst/Trino to the list of supported databases for impersonation.
2025-11-06 10:34:54 -05:00
Aleksandr Lesnenko
a5db416a8a use new library icon for remote-synced collections (#65251)
* show new library icon

* UXW-2115 Address PR feedback - makes it so only the Library uses the synced collection icon, not the nested subdirectories

* UXW-2115 Fix getCollectionType condition

* UXW-2115 Removes unnecessary type changes

* UXW-2115 Reverts changes for synced collection icon

---------

Co-authored-by: Brad Anderson <brad@metabase.com>
2025-11-06 14:26:50 +00:00
Timofey Kachalov
b9df4f2f7e Enhance onBeforeRequest into onBeforeRequestHandlers for Api class (#65195) 2025-11-06 13:13:26 +04:00
Riley Thompson
b9f50ff543 Fix databricks tests after driver upgrade (#65498)
* fix databricks tests

* Assert query works with invalid user agent

* Address comments
2025-11-06 02:36:48 +00:00
Sloan Sparger
71f0ce1469 [Dark Mode] Update Metabot illustration (#65185)
* refactor HomeGreeting and convert to use css module over styled components

* update colors for metabot illustration

* bad ai

* rename

* pr feedback

* small adjustments
2025-11-05 20:06:56 -06:00
github-automation-metabase
1969873cb0 Bump com.github.oliyh/martian-clj-http from 0.1.31 to 0.2.1 (#64394)
Inspect dependency changes here: https://github.com/oliyh/martian/compare/0.1.31...0.2.1
2025-11-06 00:29:30 +00:00
github-automation-metabase
8bde92165a Bump net.snowflake/snowflake-jdbc-thin from 3.26.1 to 3.27.0 (#64668)
Inspect dependency changes here:
2025-11-06 00:29:11 +00:00
Nemanja Glumac
4591f96f57 Remove unneeded tests after #65485 (#65517) 2025-11-06 00:10:20 +01:00
dpsutton
08a43180d7 spark failure fix (#65502)
* spark failure fix

I cannot run spark locally so from CI:

```
FAIL in metabase.driver.sparksql-test/friendly-inline-strings-in-convert-to-sql-test (sparksql_test.clj:67)

:sparksql
 The native query returned in query results should use user-friendly splicing
expected: "SELECT COUNT(*) AS `count` FROM `test_data`.`venues` AS `t1` WHERE `t1`.`name` = 'wow'"
  actual: "SELECT COUNT(*) AS `count` FROM `test_data`.`venues` AS `t1` WHERE `t1`.`name` = 'wow'"
    diff:
expected: "SELECT COUNT(*) AS `count` FROM `test_data`.`venues` AS `t1` WHERE `t1`.`name` = 'wow'"
  actual: "SELECT COUNT(*) AS `count` FROM `test_data`.`venues` AS `t1` WHERE `t1`.`name` = decode(unhex('776f77'), 'utf-8')"
```

Locally hit this on an m1 mac:

```
impl.get-or-create :: create-database! failed; destroying :sparksql database “test-data” {mb-test=metabase.driver.sparksql-test/friendly-inline-strings-in-convert-to-sql-test}
java.util.concurrent.TimeoutException: Timed out after 30.0 mins
```

* fix license test failure

https://github.com/metabase/metabase/pull/65034 bumped some jetty deps
from 12.0.24 to 12.1.3. Along for the ride came a new org:

```
org.eclipse.jetty.ee9.websocket/jetty-ee9-websocket-jetty-server 12.1.3
  X org.eclipse.jetty.ee9/jetty-ee9-servlet 12.1.3 :use-top
  . org.eclipse.jetty.ee9/jetty-ee9-webapp 12.1.3
    . org.eclipse.jetty/jetty-xml 12.1.3
      . org.eclipse.jetty/jetty-util 12.1.3
      X org.slf4j/slf4j-api 2.0.17 :use-top
    . org.eclipse.jetty.ee/jetty-ee-webapp 12.1.3 <--- new
```

This has a new org of `org.eclipse.jetty.ee` and no discernable license
in the pom or the jar.

Refresher we look in the pom for things like

```
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
```

or in the jar for some common names of licenses, like in this mysql
connector jar:

```
  -rw-r--r--     134  18-Sep-2023 19:11:56  INFO_SRC
  -rw-r--r--   71049  18-Sep-2023 19:11:56  LICENSE
  -rw-r--r--    1624  18-Sep-2023 19:11:56  README
  -rw-r--r--     846  18-Sep-2023 19:12:04  META-INF/INDEX.LIST
```

I didn't see a license at either of these spots, but consulted
https://mvnrepository.com/artifact/org.eclipse.jetty.ee/jetty-ee-webapp
to see it listed as Apache 2.0 and EPL 2.0
2025-11-05 16:56:07 -06:00
Nemanja Glumac
8a9a134989 Make Trunk analytics always run (#65451)
* Make Trunk analytics always run

This prevents false positives because Trunk analytics actio will now
always analyze test results, and compare them with their own test
quarantine list. It uses this information to know if it should fail the
job or let it pass.

* Introduce dry-run

When a PR is in a draft mode, we don't want to upload results but still
have to quarantine tests.
2025-11-05 23:34:48 +01:00
github-automation-metabase
f6582c78d1 Bump org.clojure/clojure from 1.12.2 to 1.12.3 (#64158)
Inspect dependency changes here: https://github.com/clojure/clojure/blob/clojure-1.12.3/changes.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-05 21:46:55 +00:00
Nick Fitzpatrick
10deae2a03 removing new badge for move questions into their dashboards (#65485) 2025-11-05 17:39:06 -04:00
Braden Shepherdson
b910dc5566 chore: removing a stub CLJC file that got included accidentally (#65437) 2025-11-05 21:05:39 +00:00
Cam Saul
65a4a7c9e8 Fix kondo failure in master (#65496) 2025-11-05 13:04:47 -08:00
Alex Yarosh
8ab634d497 docs : clarify subscription settings (#65179)
* Update wording for subscriptions and alerts section

* Update docs/permissions/application.md

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-11-05 19:08:06 +00:00
github-automation-metabase
9431038a75 Update generated docs (master) (#65453)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-05 14:01:21 -05:00
github-automation-metabase
cccb11b0d2 Bump org.eclipse.jetty/jetty-server from 12.0.24 to 12.1.3 (#65034)
* Bump org.eclipse.jetty/jetty-server from 12.0.24 to 12.1.3

Inspect dependency changes here:

* Add other Jetty deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-11-05 18:19:16 +00:00
github-automation-metabase
53a2da3c62 Bump org.graalvm.polyglot/polyglot from 24.2.2 to 25.0.1 (#65038)
* Bump org.graalvm.polyglot/polyglot from 24.2.2 to 25.0.1

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

* Consolidate deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-11-05 18:18:37 +00:00
github-automation-metabase
8be450aa19 Bump io.netty/netty-common from 4.1.124.Final to 4.2.7.Final (#64827)
* Bump io.netty/netty-common from 4.1.124.Final to 4.2.7.Final

Inspect dependency changes here:

* Consolidate deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-11-05 17:55:34 +00:00
Oleksandr Yakushev
22929ac32b [mage] Use Babashka to run cljfmt on staged files in git pre-commit hook (#65026) 2025-11-05 19:23:53 +02:00
Oleksandr Yakushev
b2b5720843 [flake] Increase test timeout in metabase.app-db.liquibase-test (#64814) 2025-11-05 19:04:08 +02:00
Oleksandr Yakushev
8abb1420e0 [qp] Reuse oridinarily compiled query as inline if it doesn't have params (#64651) 2025-11-05 18:59:22 +02:00
Ryan Laurie
23287f9f28 Toggle dark mode from command palette (#65359)
* toggle dark mode from command palette

* I'm sorry I built this in a dumb way Ryan

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-11-05 16:32:46 +00:00
Noah Moss
06e016fe4e Surface collection descriptions to metabot in search (#65442)
* Surface collection descriptions to metabot in search

* Fetch descriptions as a post-processing step as they're not indexed
2025-11-05 11:15:24 -05:00
Jakub Chodorowicz
be8686b577 feat: make metabot logo follow the bran colors (#65358)
# Conflicts:
#	frontend/src/metabase/common/components/MetabotLogo/MetabotLogo.stories.tsx

# Conflicts:
#	loki.config.js
2025-11-05 16:51:58 +01:00
Aleksandr Lesnenko
71eb726eb5 upgrade to echarts v6 (#64139)
* upgrade to echarts v6

* Update Loki Snapshots

* Fix BE test

* update gridlines helper function

* adjust test

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-11-05 11:45:47 -04:00
Anderson
60c65add21 Make sure /dirty is called when moving an entity out of the library (#65259)
* Make sure /dirty is called when moving an entity out of the library

* Untouch embedding code / Clean up / Add some tests

* Check cache from both entities and RTK / Undo unnecessary changes

* Make sure getCollectionFromCollectionsTree gets collection from latest query
2025-11-05 11:22:47 -03:00
Stas Gavrylov
e65f73716c GDGT-1185: Columns appear twice in model list view until action taken (#65412)
* List View: Fix incorrect bg color initialization

* GDGT-1185: Fix columns list initiation in ListView configuration screen

* GDGT-1185: Update e2e test

* GDGT-1185: Fix lint

* GDGT-1185: Fix unit tests

* GDGT-1185: Address PR comments

* GDGT-1185: Minor refactoring
2025-11-05 16:14:56 +02:00
Ngoc Khuat
be8790142c Proxy apis for store to get plan and addons (#65423) 2025-11-05 13:02:39 +00:00
Uladzimir Havenchyk
d04a2452f4 chore: ignore e2e embedding host apps from linting (#65467) 2025-11-05 15:58:27 +03:00
Oleksandr Solovyov
6ff47bfe22 metabot: handle (and propagate) request cancellation (#65461) 2025-11-05 14:37:27 +02:00
Timofey Kachalov
2df9e2645f Fix getNextSdkVersion helper (#65466) 2025-11-05 16:26:48 +04:00
Nicolò Pretto
1e997d6d5c ci: allow running stress tests on sdk tests (#64759)
* ci: allow running stress tests on sdk tests

* type choice

* yeah this should work 🤞

* ok we should also build the sdk

* maybe this time

* do we need to setup the BE?

* Revert "do we need to setup the BE?"

This reverts commit 7e9092e2c3.

* trying the auto infer thing out

* refactor and move the logic up to dedup it

* rename output

* move up env?

* Revert "move up env?"

This reverts commit f78f72e396.

* increase timeout to make stress test with throttling pass

* increase the timeout even more :shrugs:
2025-11-05 10:31:41 +01:00
Timofey Kachalov
381d156ca6 Use stableStringify for PublicOrEmbedDashboardView story + add StrictUnion type (#65411) 2025-11-05 12:51:48 +04:00
Nemanja Glumac
43301c49ad Stabilize and deduplicate eslint cache (#65410) 2025-11-05 09:31:47 +01:00
Nathan Voxland
a133b31fc4 Renamed Library to Synced Collection (#65447)
Renamed Library to Synced Collection
2025-11-04 23:32:13 -06:00
github-automation-metabase
d632109808 Bump cider/piggieback from 0.6.0 to 0.6.1 (#63218)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-05 00:49:45 +00:00
github-automation-metabase
a316b1d9d3 Bump com.metabase/athena-jdbc from 3.5.0 to 3.6.0 (#64166)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-11-05 00:41:06 +00:00
github-automation-metabase
d7a97b5704 Bump com.google.cloud/google-cloud-bigquery from 2.54.2 to 2.55.3 (#65041)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.55.3/CHANGELOG.md
2025-11-05 00:28:05 +00:00
github-automation-metabase
53fdb817c4 Bump io.github.clojure/tools.build from 0.10.10 to 0.10.11 (#65334)
Inspect dependency changes here: https://github.com/clojure/tools.build/blob/v0.10.11/CHANGELOG.md
2025-11-05 00:21:57 +00:00
github-automation-metabase
ead22c46a3 Bump ch.qos.logback/logback-classic from 1.5.18 to 1.5.20 (#64819)
Inspect dependency changes here:
2025-11-05 00:13:30 +00:00
github-automation-metabase
1615c60cbf Bump org.apache.sshd/sshd-core from 2.16.0 to 3.0.0-M2 (#65031)
Inspect dependency changes here:
2025-11-05 00:08:47 +00:00
github-automation-metabase
b3fa75c941 Bump dk.ative/docjure from 1.21.0 to 1.22.0 (#64821)
Inspect dependency changes here: https://github.com/mjul/docjure/blob/v1.22.0/CHANGELOG.md
2025-11-04 16:05:24 -08:00
github-automation-metabase
2821954e9b Bump software.amazon.awssdk/s3 from 2.33.0 to 2.36.2 (#65039)
* Bump software.amazon.awssdk/s3 from 2.33.0 to 2.36.2

Inspect dependency changes here:

* Consolidate deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-11-05 00:02:22 +00:00
github-automation-metabase
d4acb644ee Bump com.microsoft.sqlserver/mssql-jdbc from 13.2.0.jre11 to 13.2.1.jre11 (#64831)
Inspect dependency changes here:
2025-11-04 23:58:12 +00:00
github-automation-metabase
1236a70059 Bump nrepl/nrepl from 1.4.0 to 1.5.1 (#64823)
Inspect dependency changes here: https://github.com/nrepl/nrepl/blob/v1.5.1/CHANGELOG.md
2025-11-04 15:53:52 -08:00
github-automation-metabase
ab8fcd54b0 Bump com.facebook.presto/presto-jdbc from 0.294 to 0.295 (#64829)
Inspect dependency changes here:
2025-11-04 15:49:09 -08:00
github-automation-metabase
6dbe6594a7 Bump com.databricks/databricks-jdbc from 2.7.3 to 3.0.1 (#64828)
Inspect dependency changes here:
2025-11-04 15:37:15 -08:00
github-automation-metabase
f83b585668 Bump com.amazonaws/aws-java-sdk-core from 1.12.788 to 1.12.792 (#64403)
Inspect dependency changes here:
2025-11-04 15:19:09 -08:00
github-automation-metabase
53d01c5274 Bump cider/cider-nrepl from 0.57.0 to 0.58.0 (#64820)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.58.0/CHANGELOG.md
2025-11-04 15:07:32 -08:00
Timofey Kachalov
8137d490b3 Adjust parameter_mappings for a text dashcard when its variable is removed (#64463) 2025-11-05 02:53:44 +04:00
metamben
e39c2119d2 Add creator_id for transform (#65388)
* Add creator_id for transform

Closes QUE-2715
2025-11-05 01:46:34 +03:00
Nathan Voxland
c471c5640d Improve tracking for new objects that get deleted before sync (#65433) 2025-11-04 16:36:55 -06:00
Fraser
2f49744ee1 Remove parsing from file download e2e tests (#65081)
* Make e2e download tests more lightweight

* Fix helper to handle redirects
2025-11-05 10:18:43 +13:00
Nick Fitzpatrick
283eae65b6 Adding collection name to recent documents (#65376)
* Adding collection name to recent documents

* re-arranging e2e test
2025-11-04 17:07:36 -04:00
Braden Shepherdson
1217fca9a4 [perf] Add lib.computed, optimize wide tables and deep user queries (#65364)
Part of #64774.

Hopefully this is sufficient to unblock users seeing the high CPU times
like in #64774. I discovered other, less significant performance issues
during this investigation that I'll be addressing in follow-up PRs.

### Investigation Notes

The problem query and relevant table metadata from a helpful customer
was taking 950ms to preprocess and compile on my 2022 M1 Max, running
Metabase in dev mode but with Malli schema enforcement disabled.

The query is pretty big! It uses 3 tables with 200-300 columns each,
has several stages including some from a joined card, and ends up with
several stages doing two levels of aggregation. It also includes
several *huge* `:case` expressions.

The optimizations below have reduce the time required from 950ms to 310ms
on my machine. A 3x improvement, but I think there's more to be gained in
the follow-up PRs I mentioned.

### Optimizations

Main optimizations:

- `lib.util/find-stage-index-and-clause-by-uuid` pre-computed and cached
  on each stage, saved 120ms on the above query.
- `lib.metadata.cached-provider/fields` attempts to pre-load the cache
  of individual `lib.metadata/field` calls, having just fetched them
  all, but it used the wrong key and they were all misses instead!
- `expression-metadata` and `aggregation-metadata` are recomputed over
  and over again by their stage and later stages; cache them by value
- `returned-columns` was cached at the top level and frequently missed
  because of dumb details like explicit stage 1 vs. -1 for last stage.
  - Switched it to caching on individual `returned-columns-method`s
    with more precise cache keys.

#### New Caching Approach

Both of the latter two are using a new caching approach: a weak map
using queries as keys. Since CLJ(S) maps are immutable, any change to
the query means a new pointer.

That's still far more eviction than optimal! Most edits to a query
don't actually invalidate most of the cached values! But it's a lot
better than what we had before, and because the map's keys are weak
references, the queries and their cached data are not retained any
longer than the query itself.

### New Benchmarking Tools

I also added a `qp.perf-test` namespace with some metadata providers
with 10-, 100-, 1000- and 10,000-column tables for testing.

So far the tests it performs are quite basic, though. I'll be adapting
the user-provided query into a test case in the future, since it's an
excellent real-world example of a complex but not pathological query.
2025-11-04 20:49:25 +00:00
Jeff Bruemmer
5884bfe547 docs - various edits (#65422)
* various edits

* edits
2025-11-04 14:39:26 -05:00
Aleksandr Lesnenko
9d1d534e51 remote sync analytics (#65129) 2025-11-04 18:38:23 +00:00
Nick Fitzpatrick
2fb4793c24 fix large command palette subtext elements, add loki testing (#65369)
* fix large command palette subtext elements, add loki testing

* how did I miss this?

* updating Overlay demo
2025-11-04 13:23:12 -04:00
Nathan Voxland
954857c036 Clean up remote sync source vs. snapshot APIs (#65122) 2025-11-04 11:00:45 -06:00
Oleksandr Yakushev
6d1d618fff [util] Explicitly test for BigDecimals in real-number? (#65202) 2025-11-04 18:24:45 +02:00
Aleksandr Lesnenko
785c418578 allow disabling remote sync (#65175) 2025-11-04 15:45:41 +00:00
Ryan Laurie
9d1c3c0ab4 Release Log Upgrades (#65186)
* support tag refs in version log

* release log upgrades

* use html url

* no thanks

* update tests

* ok review bot, you win
2025-11-04 08:33:21 -07:00
Brad Anderson
57daa4d5dc Fix #50044 - Updates dashcard loading state so it shows the correct title while it's loading (#65363) 2025-11-04 10:19:19 -05:00
Chris Truter
805badeb79 Flake protection 🥐 (#65415) 2025-11-04 12:27:56 +00:00
Nemanja Glumac
5ea9541981 Fix the auto-patch workflow (#65417) 2025-11-04 13:12:53 +01:00
Abed Habli
72a7ebec91 V57 docs: updating Alerts + Model view (#65353)
* update screenshot

* Updating model list view

* updating screenshots to Model view

* Optimized 4 images, saved 406.0 KB (50.9% smaller)

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-11-04 12:16:11 +01:00
Nemanja Glumac
cdb6640ea4 Resolve a missing pre-release output (#65413)
[ci skip]
2025-11-04 12:07:38 +01:00
Chris Truter
8b90ffd906 Exclude other users collections in metabot search (#65348)
Closes BOT-496
2025-11-04 11:54:34 +02:00
Timofey Kachalov
3758d88539 Add embedding_type field for card/dashboard (#65209) 2025-11-04 12:45:57 +04:00
Aleksandr Lesnenko
d6397e205e skip flaky UpsellBigCard loki specs (#65404)
* skip flaky UpsellBigCard loki specs

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-11-04 08:21:26 +03:00
Noah Moss
01f7eeb023 Recreate model index quartz triggers on job initialization when needed (#65394)
* Recreate model index quartz triggers on job initialization when needed

* whitespace

* rename var + add comment
2025-11-03 19:32:49 -05:00
Nathan Voxland
8f3730dd45 Improving git management for remote sync (#65249) 2025-11-03 16:19:31 -06:00
dpsutton
5e92088c7d remove useless log (#65390)
```
Updating table metadata for Table 5465 ''properati_ar.properties_rent_201607'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5465 ''properati_ar.properties_rent_201607'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5485 ''properati_ar.properties_sell_201706'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5485 ''properati_ar.properties_sell_201706'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5468 ''properati_ar.properties_rent_201602'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5468 ''properati_ar.properties_rent_201602'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5511 ''properati_ar.properties_rent_201612'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5511 ''properati_ar.properties_rent_201612'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5431 ''properati_ar.properties_sell_201802'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5431 ''properati_ar.properties_sell_201802'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5441 ''properati_ar.properties_sell_201707'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5441 ''properati_ar.properties_sell_201707'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5467 ''personal_bq_repro.events_20230519'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5467 ''personal_bq_repro.events_20230519'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5484 ''properati_ar.properties_sell_201708'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5484 ''properati_ar.properties_sell_201708'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5434 ''properati_ar.resultados_apto_credito'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5434 ''properati_ar.resultados_apto_credito'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5501 ''properati_ar.properties_sell_201704'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5501 ''properati_ar.properties_sell_201704'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5433 ''properati_ar.properties_rent_201604'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5433 ''properati_ar.properties_rent_201604'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5478 ''properati_ar.properties_sell_201702'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5478 ''properati_ar.properties_sell_201702'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5498 ''properati_ar.properties_sell_201512'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5498 ''properati_ar.properties_sell_201512'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5447 ''properati_ar.properties_rent_201709'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5447 ''properati_ar.properties_rent_201709'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5463 ''properati_ar.properties_rent_201609'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5463 ''properati_ar.properties_rent_201609'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
Updating table metadata for Table 5448 ''properati_ar.properties_rent_201509'' {mb-quartz-job-type=SyncAndAnalyzeDatabase}
:is_writable of Table 5448 ''properati_ar.properties_rent_201509'' changed from null to null {mb-quartz-job-type=SyncAndAnalyzeDatabase}
```

We unconditionally say we are updating table metadata, but then when we
actually change anything we of course include the table name.

Note here there is some kind of bug that we are changing the
table (which property??) from null to null.
2025-11-03 16:02:18 -06:00
Jeff Bruemmer
2da5fb8aa8 token data (#65396) 2025-11-03 21:43:00 +00:00
Uladzimir Havenchyk
a94a70fe46 chore: cleanup warnings from postcss (#64954)
* chore: cleanup warnings from postcss

* Update frontend/src/metabase/common/components/EmojiPicker/EmojiPicker.module.css

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2025-11-04 00:08:22 +03:00
Oleksandr Yakushev
5880342225 Remove unused metabase.util.formatting.numbers and metabase.util.formatting.time (#63791) 2025-11-03 22:37:47 +02:00
Jeff Bruemmer
89adf23ef7 update api docs (#65382) 2025-11-03 14:30:57 -05:00
Denis Berezin
7c7241d350 UXW-2182 fix codemirror editor suggestions styles in light mode (#65367) 2025-11-03 22:03:53 +03:00
Jeff Bruemmer
9638db8b02 json from data-url (#65374) 2025-11-03 18:47:47 +00:00
AlessioLaiso
bace3da926 Updates 6 illustrations for dark mode (#65375) 2025-11-03 14:31:13 -04:00
Ryan Laurie
898c82ad4c add v57 to version-helpers (#65227) 2025-11-03 18:29:18 +00:00
Ryan Laurie
c9792f6604 Restore calendar hover styles (#65361)
* restore calendar hover styles

* fix calendar picker hover states

* remove unnecessary rule
2025-11-03 11:28:02 -07:00
Noah Moss
ec0bc5e081 Comment out BackfillTransformSourceType migration (#65147) 2025-11-03 13:20:13 -05:00
Nathan Voxland
9b4c474e11 Remote sync should ignore system git settings (#65293) 2025-11-03 11:38:47 -06:00
metamben
8f10457e32 Add archived flag to graph endpoints (#65366)
Fixes QUE-2708
2025-11-03 16:43:27 +00:00
AlessioLaiso
20b3834269 Updates 35 SVG illustrations (#65232)
* Updates 35 SVG illustrations

The same asset now works well for both light and dark mode.

* branding OnboardingIllustration, adding cloug and bug metabot to metabot logo

* PR Feedback

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-11-03 12:24:40 -04:00
Denis Berezin
0150dcfe07 UXW-2170 cleanup chart brush (#65313) 2025-11-03 18:49:40 +03:00
Riley Thompson
2b2a22b86d filter for active fields (#65245) 2025-11-03 15:11:08 +00:00
Noah Moss
d3e976ed53 Annotate draft transforms in user_is_viewing context with source type when possible (#65283)
* Annotate draft transforms in user_is_viewing context with source type when possible

* add unit tests

* Move transform-source-type helper to transform utils; some refactor

* switch to use lib/native-only-query; change default transform query in tests to use mbql5

* switch batch to using lib.query/native?

* switch back to native-only-query?

* clean ns
2025-11-03 09:56:29 -05:00
lbrdnk
c950dad7eb Fix suggested prompts schema and add test (#65299) 2025-11-03 15:33:50 +01:00
lbrdnk
2693173e7f Compute param values from card results (#64318)
* Compute param values from card results

seq for bool

Tests, multi-stage queries

Compute values also for params on nested stages

whitespace

Unused ns

Last stage check first

Docstring

Drop base query's last stage clauses

Address review remarks

Apply suggestions from code review

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

Remove redundant ops

Adjust for test

Search for col also in aggregated result columns

Look for breakoutable column only if source-uuid is present

* symb

* Rebase fix

* fix rebase, remove unused module

* post rebase, fix getting database id

* kondo

* Revamp

* limit

* Adjust the solution for impl joins

* Fix e2e

* Comment

* Cleanup

* Cleanup

* comment

* comment

* Update src/metabase/parameters/dashboard.clj

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

* indent

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-11-03 15:33:39 +01:00
Denis Berezin
3ca4c5a2ee UXW-175 Fix visualization mode switch for pivot table (#65252) 2025-11-03 17:18:36 +03:00
Denis Berezin
9c0910f652 UXW-2172 UXW-2174 remove Document cards click actions (#65191)
* UXW-2172 UXW-2174 remove Document cards click actions

* Fix e2e

* UXW-2172 fix broken click actions for Document cards

* Restore e2e

* Fix typecheck

* review fixes
2025-11-03 17:18:21 +03:00
Mahatthana (Kelvin) Nomsawadi
cbf7579c4c Correct interactive embed query execution count (#65336)
* Simplify the FE API code

* Exclude static embed preview from being counted in analytics

* Update frontend/src/metabase/lib/api.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Clarify comments

* Add tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-03 13:11:10 +00:00
Nemanja Glumac
5ec5c9a9d3 Fix and revive the backend cloverage workflow (#65341) 2025-11-03 11:22:02 +01:00
github-automation-metabase
9ee26d70fd Bump com.ibm.icu/icu4j from 77.1 to 78.1 (#65332)
Inspect dependency changes here:
2025-11-03 09:30:00 +00:00
github-automation-metabase
73aab1d129 Bump djblue/portal from 0.61.0 to 0.62.0 (#65333)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.62.0/CHANGELOG.md
2025-11-03 09:29:14 +00:00
Oleksandr Yakushev
6375368c92 [kondo] Encourage more m.util.performance functions in perf-sensitive namespaces (#65331) 2025-11-03 11:09:43 +02:00
Nemanja Glumac
ee3cfb7e68 Disable CodeQL trap caching (#65275) 2025-11-03 09:52:34 +01:00
metamben
e62903b72a Add test case missing from #65240 (#65327)
The PR #65240 got merged without this test.
2025-11-02 02:58:31 +02:00
metamben
652f725d41 Make transforms available in search for admins only (#65240)
* Make transforms available in search for admins only

Fixes QUE-2710

* Fix test
2025-11-01 02:42:23 +03:00
Dan Stone
2c49eb977d Add missing .result to script output lookup in pre-release (#65298) 2025-10-31 23:02:21 +00:00
Brad Anderson
b70e091fe8 Fix #64685 - Update brand colors in UI without needing refresh (#65292)
* UXW-1991 Fixes various issues both new and old with the Branding page like the colors not updating until refresh and swatches not updating when setting colors back to their defaults

* UXW-1991 Uses hex format for brand colors placeholders

* UXW-1991 Fix persistence issues with setting/unsetting accent colors
2025-10-31 18:39:08 -04:00
Brad Anderson
dff2d77981 UXW-2183 Remove fullscreen dashboard night mode toggle (#65312) 2025-10-31 18:16:07 -04:00
Robert Kosara
60ec838229 Remove mention of "night mode" and image (#65318)
* Remove mention of "night mode" and image

Removed mention of 'Night mode' from fullscreen dashboard instructions.

* Delete dark mode/night mode image
2025-10-31 21:44:44 +00:00
dpsutton
830a6d5c83 Don't count app-db not setup errors in circuit breaker (#65295)
we want to not hammer the network when things are down. But during
startup we don't need to circuit break these errors that we throw before
the app-db is read
2025-10-31 16:33:27 -05:00
github-actions[bot]
e0ebddd4f2 Update translations 2025-10-30 (#65213)
* Update translation sources 2025-10-30

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-10-31 20:45:47 +00:00
metamben
79b350eca6 Make sure enough info about transforms is selected (#65291)
Fixes QUE-2731
2025-10-31 23:41:25 +03:00
Riley Thompson
af1be91a28 Implement connection impersonation for starburst (#64972)
* implemenet impersonation driver methods

* replace starburst impersonation

* use user as default role

* clean up

* enable starburst tests

* mount files to container

* add config files

* fix rules.json

* add starburst impersonation tests

* try fix

* remove old tests

* debug

* Debug'

* add volumes original way

* try again

* revert

* try docker run

* remove services

* add back accessc control

* enable impersonation

* exclude starburst tests again
2025-10-31 18:29:05 +00:00
Robert Kosara
6322ffc3b3 Small edits to v57 docs about Glossary, dark mode, and progress bars (#65253)
* Enhance glossary section with context for definitions

This is a smaller change than I expected, since glossary terms don't show up in searches yet. Might just cut this if it doesn't add anything useful. I also wasn't sure if we should mention Metabot here.

* Add dark mode options

Adds the available options and explains that you don't have to reload the page

* Add a little clarification to the computed goal example

This confused me, so I'm adding this little clarification

* Jeff's suggested change

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

* Remove the bit about LLMs again

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-31 18:17:36 +00:00
Edward Paget
e657e83c3e fix: allow stacktraces to be suppressed in API (#65215)
* fix: allow stacktraces to be suppressed in API

Allows administrators to configure their metabase instance using
MB_HIDE_STACKTRACES to prevent stacktraces from appearing in API
response. For standard responses it replaces unhandled exceptiosn with a
generic message and 500 response. For streaming responses it leaves the
error message and strips out the trace/via keys to prevent exception
info from leaking.

* fixup! dissoc traces from map errors
2025-10-31 09:12:45 -05:00
Nemanja Glumac
4b3c293f04 Remove superfluous python setup from H2 driver test (#65272) 2025-10-31 15:09:48 +01:00
Brad Anderson
1447fa0e95 Fix: UXW-2171 Prevents "Edit Query" from clearing name on chart (#65224) 2025-10-31 09:38:55 -04:00
Edward Paget
cb2510a55d fix: pivoting json values (#65183)
* fix: pivoting json values

* fixup! kondos in test

* Update frontend/src/metabase/lib/data_grid.js

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

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-10-31 08:35:55 -05:00
Nemanja Glumac
90f2e42b19 Sunset e2e cross-version tests (#65269)
Context: https://metaboat.slack.com/archives/C0669P4AF9N/p1761905881175819

The requirements for new and updated attempt at solving this problem are documented in:
https://linear.app/metabase/issue/DEV-1042/design-reliable-cross-version-upgradedowngrade-test-strategy
2025-10-31 14:34:09 +01:00
Mahatthana (Kelvin) Nomsawadi
cbcb70a438 Fix deleted documents were editable (#65136)
* Prevent trashed documents from being edited

* Add test

* Soften the test name tone

* Disallow even updating document when archived via API

* Add BE test

* Fix Cypress test issue reference

* Update tests after merging master

* Only check for archived when not unarchiving

* Don't check archived documents when archiving or unarchiving them

* Add missing condition from merging
2025-10-31 19:15:46 +07:00
lbrdnk
e47e51c229 Metabot glossary integration (#65223)
* Return glossary with user info

* Test glossary in response
2025-10-31 12:25:34 +01:00
Jeff Bruemmer
e6a3974c9a Fix env var doc gen (#65230)
* fix issue with env var gen and some cleanup

* cleanup
2025-10-31 07:00:20 -04:00
Dan Stone
247db60bb7 Increase sync timeout in execution test (#65205)
Redshift sync of even one table can take a really long time (sometimes
over 5 seconds).

Increased to 10 seconds for now.
2025-10-31 10:40:35 +00:00
Jeff Bruemmer
619d9350cc remove registry (#65242) 2025-10-31 03:14:57 +00:00
Nemanja Glumac
9b53db936e Fix logs upload for drivers (#65257)
* Fix logs upload for drivers

When we introduced `continue-on-error` to the "test" step, we had to
update the conditionals for the test report steps as well. I've
introduced a bug by checking for a failure, instead of saying - upload
test reports whenever the job is not successful.

Hint: test.outcome means "step status BEFORE continue-on-error overrides
the exit code"
2025-10-31 02:33:06 +01:00
Nemanja Glumac
024d197e3e Upgrade CodeQL action version (#65250) 2025-10-31 14:04:55 +13:00
metamben
7937c6888c Optimize graph API endpoints (#65172) 2025-10-30 19:41:16 -04:00
github-actions[bot]
3369bf7d15 Update E2E test timings with averaged data (#65024)
Collected timing data from 7 days of test runs.
All specs with timing data were included (simple averages).

🤖 Generated automatically by update-e2e-timings workflow

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
2025-10-30 22:58:27 +00:00
Uladzimir Havenchyk
c7fb07c387 deps: drop react-beautiful-dnd (#64713)
Co-authored-by: Fraser <fraser@metabase.com>
2025-10-31 11:24:41 +13:00
Noah Moss
525dec7eb0 Metabot /debug mode to show tool calls (#64811)
* add debug message type for tool calls

* rename toolCalls -> activeToolCalls

* Basic debug mode slash command to hide/show tool calls

* ToolCallDetailsModal + better formatting

* Fix type

* Fix types, some simplification

* Address minor bot comments

* small changes

* move AgentToolCallMessage into its own file and add copy buttons + tool call id to modal

* fix copied value

* add unit tests

* move failure case further downstream to mitigate any possible customer issue

* ci fixes

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2025-10-30 17:20:39 -05:00
Ryan Laurie
f4dde2f744 fix comma in pre-release workflow (#65248) 2025-10-30 20:51:46 +00:00
Nemanja Glumac
c81e28e240 Support releases with different token testing strategies (#65203) 2025-10-30 21:29:02 +01:00
Alexander Polyankin
b859cbfd59 Extract QueryEditor from transforms (#65160) 2025-10-30 20:03:01 +00:00
Nick Fitzpatrick
99a736360b update document title compare to determine dirty state (#65229) 2025-10-30 19:50:30 +00:00
Alexander Polyankin
93d099427e Enable dependency graph UI (#65210) 2025-10-30 19:38:58 +00:00
Nick Fitzpatrick
6fafafe082 fix falsey check when removing card embed from document (#65222) 2025-10-30 16:36:25 -03:00
Nick Fitzpatrick
1a2035d5a4 update hover colors in UserListElement (#65174)
* update hover colors in UserListElement

* adjusting colors

* updating comment
2025-10-30 16:35:27 -03:00
Phoomparin Mano
186df5d802 fix(sdk): non-editable dashboard should not have "add a chart" button and title should be read-only (#65102) 2025-10-31 02:24:32 +07:00
Sloan Sparger
27d13486ac [Metabot] Copy change for suggested prompts setting description (#65163)
* update copy

* adjust copy for embedded metabot

* oops

* remove randomly

* fix test

* feedback
2025-10-30 13:53:33 -05:00
Edward Paget
41ba6ce845 Fix renamed test helper in documents (#65233) 2025-10-30 18:51:32 +00:00
Riley Thompson
1eb96fc1ec return false instead of throw (#65225) 2025-10-30 18:45:40 +00:00
Edward Paget
bbc81e20b3 test a document creation in personal collection (#65118)
* test a document creation in personal collection

* fixup! ws
2025-10-30 12:33:41 -05:00
Stas Gavrylov
fafc53e645 GDGT-1083: Improve visual design for new List view in Stats before v57 (#64957)
* GDGT-1083: Add new icons

* Remove subtitle column. Restyle inputs. Extend icon selection

* GDGT-1083: Fix minor tags input styling issues

* GDGT-1083: Replace semantic colors with accent colors

* GDGT-1083: Add image column selection option

* GDGT-1083: Add placeholder for image column icon. Fix bug with selected icon

* GDGT-1083: Update formatted column values rendering rules

* GDGT-1083: Fix incorrect entity icon initialization

* GDGT-1083: Add range viz rendering for quantity/score columns

* GDGT-1083: Fix drag from ListViewColumnsSidebar

* GDGT-1083: Fix list header grid

* GDGT-1083: Fix State column styling

* GDGT-1083: Fix incorrect rendering for boolean columns

* GDGT-1083: Fix incorrect column rendering for empty cells

* GDGT-1083: Address design review comments

* GDGT-1083: Fix TS error

* GDGT-1083: Fix image column rendering

* GDGT-1083: Minor refactoring

* GDGT-1083: Update e2e est

* GDGT-1083: Add unit test for ListViewItem component

* GDGT-1083: Fix linter

* Fix eslint

* GDGT-1083: Resolve metabot comments

* GDGT-1083: Get rid of split_currency setting

* wip

* GDGT-1083: Address PR comments

* GDGT-1083: Address PR comments

* GDGT-1083: Replace switch logic with fns. Fix header layout bug

* GDGT-1083: Fix badges cursor in list view

* GDGT-1083: Fix cursor styling when dragging over full tags input

* GDGT-1083: Remove max-width

* GDGT-1083: Fix linter

* GDGT-1083: Fix lint

* GDGT-1083: Fix incorrect imgURL/avatarURL column rendering after refactoring

* Fix incorrect icon background color

* Fix incorrect category columns rendering

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-30 16:58:37 +00:00
Nathan Voxland
d0f5d01eea Create appdb tables in its own connection (#65171) 2025-10-30 10:33:35 -05:00
Nicolò Pretto
a04b79857f remove border from dashboard header where header=false and no tabs (#65161)
* remove border from dashboard header where header=false and no tabs

* move css code up to keep no border in fullscreen
2025-10-30 16:00:07 +01:00
Denis Berezin
9f0f6eb78c UXW-2091 user without collection access to Our Analytics can't save documents (#65159)
* UXW-2091 user without collection access to Our Analytics can't save documents

* fix typecheck

* Fix types

* Add e2e tests
2025-10-30 17:56:02 +03:00
Edward Paget
7ea1d83a67 fix: skip join in stats handler test (#64639) 2025-10-30 09:27:17 -05:00
Edward Paget
9aa6611557 fix: improve collections graph performance (#65098)
* fix: improve collections graph performance

Fixes performance generating and updating a collection graph by avoiding
the cross join of all negative permissions (blocks) between groups and
collections. Instead it builds sparse graph where missing entries for
group/collection paris can be assumed to be :none permissions.

In practice this drops a collection permission update on a graph of 5K
groups and 5K collections from a greater than 10min operation on my
local machine against MySQL to a .5s operation.

* fixup! explicilty disj :root in other places

* fixup! improve some docs

* fixup! improve more docs

* fixup! seq checks

* fixup! blank lines

* fixup! convert raw sql concat into honeysql

* fixup! e2e test
2025-10-30 09:26:26 -05:00
Edward Paget
a7b420eeba Update error message for remote sync dep checking (#65148)
* Update error message for remote sync dep checking

Try to make these error messages less jargony because they are presented
by the user interface when dependency checking content fails.

Closes UXW-2142 and UXW-1879.

* Update some missed tests
2025-10-30 09:25:33 -05:00
dpsutton
7b8edfbad4 Token grace period (#64938)
* Add a grace period to token checks

There's more work on this namespace to be done i think, but this is a
first cut at it. There's a lot of control flow by exceptions which is
how we jump around in here. Fundamentally this should be far
simpler. Will take a crack at that shortly. I also don't love that this
just hammers the `fetch-token-status` function and then memoizes inside
of that. Would prefer simpler layout of `token-features` function and
that can be aware of population issues.

Adds a simple protocol: GracePeriod, which has two functions: save! and
retrieve. On successful token check, we `save!` the response. On errors,
we `retrieve` previous responses. This obviously can be nil in the case
we have never had a successful response, and will become nil once the
grace period's internal notion of time expires.

This implementation is based on guava's cache which has a nifty
expireafterwrite functionality.

```
 (*token-features*) ;; call this function to simulate the check of features
Checking with the MetaStore to see whether token 'f325...d01a' is valid...
Reporting Metabase stats: {... user counts etc}
 -> #{"features come back"}
 ;; meanwhile clear cache to simulate elapsing of 12 hours

 (*token-features*) ;; call function again to simulate check of features
2025-10-22 21:30:26,620 INFO premium-features.token-check :: Checking with the MetaStore to see whether token 'f325...d01a' is valid...
2025-10-22 21:30:26,622 ERROR premium-features.token-check :: Error fetching token status from https://token-check.metabase.com:
clojure.lang.ExceptionInfo: network issues ;; hit network issue

2025-10-22 21:30:26,632 INFO premium-features.token-check :: Using token from grace period
->> #{graceperiod network features}
...

;; here after 5 seconds (in real life will be 36 hours)
2025-10-22 21:31:00,064 WARN premium-features.token-check :: Removing token: f325...d01a from grace period cache {mb-quartz-job-type=Cache}
```

* tests that updating value populates grace period cache

* couple changes

protect against storing nil value. guava cache doesn't like it so gone
it is.

added some tests:

```clojure
(testing "Setting a new value populates the grace period cache"
    (let [new-token (tu/random-token)]
      (binding [http/request (fn [& _] {:status 200
                                        :body "{\"valid\":true,\"status\":\"fake\",\"features\":[\"fake\",\"features\"]}"})]
        (mt/discard-setting-changes [premium-embedding-token]
          (premium-features.settings/premium-embedding-token! new-token)
          (is (= #{"fake" "features"} (token-check/*token-features*)))
          (is (= {:valid true :status "fake" :features ["fake" "features"]}
                 (token-check/retrieve token-check/grace-period new-token)))))))
```

But this ended up leaving a setting table value for this value. i don't
feel like looking into discard setting changes so i'm gonna just remove it

* attempt to simplify the api a bit

the thee important functions are now `token-information`, `harness` and
`decode-token`.

Everyone should use token-information. Harness hooks up the grace period
and retry strategies, and `decode-token` only cares about decoding a
token. It should return the token-status map {:valid true ...} or throw.

* fixup test

* clean up tests and rename a bit

* remove comment block

* remove commented out grace period

* bit of cleanup

* fix with-random-premium-token! macro

* function composes them instead of caller

rather than a caller needing to know all of the layers, i thread them
for you and let you provide all arugments in one function call.

dynamic var for needing to customize layers in tests. largely for
removing the circuit-breaker which is stateful and hard to restart if
you want to simulate errors in tests

* rename test
2025-10-30 08:51:56 -05:00
Damien Chambe
07172f56f7 Update DB2 driver and IBM i driver (#65190)
IBM i has a separate driver , different from DB2 LUW ( linux/unix/windows )
2025-10-30 08:56:12 -04:00
Ngoc Khuat
9f93683518 Usage analytics update v57 (#65055)
* Add documents to content view

* add document to audit_log

* added comment events to the audit log, publish events

* wip: transform events

* glossary

* reversion the content migrations

* include transforms in content

* remote sync audit events

* wip: action v2 event

* kondo

* fix action tests

* transform run event

* add tests for new events

* bump

* tests

* task data

* let's not change the old migration in case we might break the hashsum

* typo

* more typos

* fix bugs in h2/mysql

* add :previous-object

* fix tests

* move branch into details

* fix test

* fix: run tests only on ee

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
2025-10-30 10:43:48 +00:00
Sébastien
23574a80d5 Closes UXW-1993 tooltip columns in visualizer (#65042) 2025-10-30 07:05:27 +01:00
appleby
74113f603b Add :order-by to metabase-enterprise.transforms.api/get-transforms (#65162)
To ensure transforms are returned in a consistent order to and reduce test flakes.

https://metaboat.slack.com/archives/C5XHN8GLW/p1761753664842279
2025-10-30 01:11:13 +00:00
Cam Saul
622125d9d9 Disable Claude code review bot by default (#65184) 2025-10-29 21:04:51 -04:00
Sébastien Corbin
f6b1864d91 Add color-scheme meta tag for light and dark modes (#64324) 2025-10-29 18:20:16 -06:00
metamben
6b098da5de Normalize parameter type category/= to category (#65158)
* Normalize parameter type category/= to category

Stats had exactly one dashboard with one such parameter and that dashboard was immutable because the
before-update hook failed before any update could happen.
2025-10-29 23:42:40 +00:00
Ryan Laurie
6b09c0476c dont break scheduled patches (#65165) 2025-10-29 16:30:18 -06:00
Nathan Voxland
a94c284625 Remote-sync error handling improvements (#65072)
* - Improve remote-sync error messages
- Do a fetch when checking git settings to ensure the current version can be read and is being checked

* Validate git url

* Validate branch name in production mode

* Validate branch name in production mode

* Removed unneeded assoc

* Fixed formatting

* Code improvements

* Code improvements

* Allow direct path URLs

* Allow direct path URLs

* E2e Fixes

* E2e Fixes

* Allow empty branch to be passed
2025-10-29 14:15:33 -07:00
Nick Fitzpatrick
fdac82dba2 show a warning message when removing items from the library (#65169) 2025-10-29 14:00:31 -07:00
Denis Berezin
46b8b2791d UXW-1872 Fix some tooltips text color in dark theme (#65182) 2025-10-29 23:52:59 +03:00
Cam Saul
fd476e892b Fix slow metabase.core.modules-test/modules-config-up-to-date-test (#65168)
* Fix slow `metabase.core.modules-test/modules-config-up-to-date-test`

* Fix docstring location

* The bot caught something else
2025-10-29 12:30:22 -07:00
Timofey Kachalov
63f85c3706 feat(embed-js): Convert EmbedJS wizard into a modal (#65113) 2025-10-29 23:03:34 +04:00
Nick Fitzpatrick
9c6e1d1b7d Dark mode day 5 patch (#65099)
* Dark Mode Dashboard PDFS, bad solution for google login

* various fixes

* handfull of fixes

* PR Feedback

* stupid linter
2025-10-29 11:33:22 -07:00
Cam Saul
7d879a9a86 Legacy MBQL normalization overhaul: 3x faster and bug fixes (#65018)
* Legacy MBQL normalization overhaul

* Kondo + test fixes 🔧

* Cleanup and test fixes 🔧

* Code cleanup

* Test fixes 🔧

* Extra test 🔧

* Some test fixes 🔧

* Test fixes 🔧

* Test fixes 🔧

* Test fixes 🔧

* Fix SerDes test failure

* cljfmt

* Code cleanup

* Fix normalizing :datetime with bytes modes

* Fix legacy MBQL normalization of :datetime

* Handle broken case clauses

* Set Card metadata to nil when invalid

* Fixx

* Fix Kondo
2025-10-29 11:18:28 -07:00
Marcos
80ac5931a0 Fix x axis range calculation when undefined values are present (#65125)
* fix x axis range calculation when null values are present

* only remove undefined values

* rename variable instead of mutating function param
2025-10-29 15:11:14 -03:00
Jeff Bruemmer
fabb975482 docs - public documents and downloads (#65155)
* document public links and downloads

* edits

* link fixes

* Update docs/embedding/public-links.md
2025-10-29 17:57:05 +00:00
Timofey Kachalov
d1c40b6c81 Restore sdk backward compat tests (#65154) 2025-10-29 19:20:08 +04:00
Nemanja Glumac
95fa314e44 Delete superfluous test (#65153)
This is already covered in LicenseAndBillingSettings.unit.spec.tsx
2025-10-29 14:51:55 +00:00
Nick Fitzpatrick
5ded6d9623 Remote sync e2e followup (#65061)
* Fix/unskip some tests / try to make flaky FE test to pass in CI

* adding branching tests, unskipping admin tests

* PR Feedback

* PR Feedback

---------

Co-authored-by: Anderson <anderson@metabase.com>
2025-10-29 11:37:29 -03:00
Nick Fitzpatrick
4c160134ba only delay modal dismiss on success (#65127) 2025-10-29 11:29:06 -03:00
Nemanja Glumac
46894a8008 Update module ownership (#65150) 2025-10-29 15:11:48 +01:00
Nemanja Glumac
215a3c6c49 Fix the hard coded store api url in billing (#65135) 2025-10-29 14:05:30 +00:00
Jeff Bruemmer
4d14b02aa2 documents - add public links (#64630) 2025-10-29 13:38:57 +00:00
Noah Moss
6bcfc60eff Add source_type field to transforms with temporary backfill job (#64970)
* Add type field to transforms with temporary backfill job

* add a default value for tests

* add some new tests, fix serdes

* lint

* remove debugging defs

* revert serdes spec change

* Revert "remove transforms from serdes baseline (?)"

This reverts commit e8fc8fe80bfe15e00eb031b4050877f271b8081f.

* try again to fix serialization tests

* address bot comments

* Revert "try again to fix serialization tests"

This reverts commit 13d78664b79b7f13406d89e1f8f910610ea2cce9.

* Fix search ingestion functions to use :type field + some cleanup

* Update baseline to fix serialization test

* Revert "Update baseline to fix serialization test"

This reverts commit 60cb7909e5a73d04c42d36c915a32bb28d684e37.

* fix up comment

* reset serialization_baseline to version on master

* let's try this again: manually update baseline to add type field

* fix search tests by adding correct types to transfomrs

* update metabot tool apis

* fix revision test

* simplify test

* address feedback - move type setting to the model layer

* simplify tests

* Fix up transform serdes tests: remove top-level type fields and updated_at from being serialized, and fix shape of transforms in extraction tests

* set :type after select just in case; fix serdes tests again

* guard against empty source on select

* remove redundant search spec for transforms (introduced via a previous merge)

* switch from type to source_type to avoid conflict with type field on the frontend

* add better error handling
2025-10-29 08:51:20 -04:00
Timofey Kachalov
1bbe525200 Adjust sample-apps runner for the new token check (#65139) 2025-10-29 16:39:55 +04:00
Phoomparin Mano
83b0eb3174 fix(sdk): secondary background color is not mapped to theme (#65116) 2025-10-29 19:14:15 +07:00
Nicolò Pretto
eeb44b4b5a remove .local reference from rspack as .local lookup is slow and we can (#65060)
use .localhost
2025-10-29 12:08:53 +01:00
Nicola Mometto
0e20f5a8b8 respect column definition order for transform create-table (#65089)
* feat: respect column definition order for transform create-table

* add test
2025-10-29 10:10:51 +00:00
Sébastien
92dad88e6a Closes UXW-2112 preserve default colors when renaming breakout values in cartesian charts (#65053)
* Add tests for getSeriesColors with custom titles

* Closes UXW-2112 custom colors breakout labels

* .
2025-10-29 07:16:52 +01:00
Mahatthana (Kelvin) Nomsawadi
94e1c1e387 fix(sdk): Avoid portal root taking space under flex parents (#65088)
* Avoid portal root taking space under flex parents

* Add missing comment

* Preserve format
2025-10-29 02:32:02 +00:00
Nemanja Glumac
6c6b702b29 Enable Trunk Quarantine for general backend tests (#65128) 2025-10-29 02:17:39 +01:00
Aleksandr Lesnenko
38e2e81388 refetch settings after updating remote sync settings (#65124)
* refetch settings after updating remote sync settings

* specs
2025-10-29 01:00:45 +00:00
Nemanja Glumac
5b2fd35367 Enable Trunk Quarantine for drivers (#64995) 2025-10-29 01:24:54 +01:00
Cam Saul
527b8e8e9a Add custom Kondo linter for defendpoint query parameter naming (#65114)
* Add custom Kondo linter for defendpoint query parameter naming

* cljfmt
2025-10-28 17:17:25 -07:00
William
82ea0f4f7e Fix default tag values for temporal template tags (#65112)
This should stop the log spam and fix dependency backfilling
2025-10-28 17:31:41 -05:00
William
39ceced98f Add support for table-functions and selecting tables directly (#65074)
Basically, the same case found two unrelated bugs.  For one, we don't support table functions like `select * from
my_function()`.  For another, `select orders from orders` is also unsupported but apparently legal (at least in
postgres).  This updates sql parsing/validation to support both things.
2025-10-28 17:31:21 -05:00
Ryan Laurie
a67ad3b258 Correct tooltips across map zoom levels (#65080)
* better event handler attachment logic to account for array size change

* test tooltip correctness
2025-10-28 16:31:07 -06:00
Oleksandr Solovyov
bc6694c1a1 no more Workflows team (#64983) 2025-10-29 00:28:39 +02:00
Jeff Bruemmer
c257c954fb docs -remote sync (#65009)
* draft

* notes

* edits

* edits

* updates

* numbering and links

* edits

* edits

* typos
2025-10-28 22:00:23 +00:00
Nemanja Glumac
689d4f0e9b Run e2e tests using staging tokens (#65044)
This pull request updates the configuration and environment handling for E2E and compatibility tests, mainly to support running tests against a staging license/token server and to improve test reliability. The changes affect GitHub Actions workflows, environment variables, and some test and backend logic.

*Backend Logic for E2E Mode*

Added `is-e2e?` flag in core.clj to distinguish E2E test runs from dev/prod/test modes, allowing for custom behavior in E2E scenarios.
Modified token check logic in token_check.clj to allow E2E tests to use a staging server for license validation.
Changed store API settings in settings.clj to use staging endpoints when in dev or E2E mode, ensuring tests interact with the correct backend.
2025-10-28 22:57:14 +01:00
eliotmetabase
c831d2cabf Update error message to make it more obvious things will be deleted (#65117)
* Update error message to make it more obvious things will be deleted

* Better copy

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

* Update button text as well

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-10-28 14:50:46 -07:00
metamben
bbb0074de4 Fix dependencies backfilling: ignore analysis errors (#65078)
* Fix dependencies backfilling: ignore analysis errors

Fixes QUE-2714

* Catch everything that can fly

* Rename error ignoring macro
2025-10-28 21:12:06 +00:00
Ryan Laurie
d3b69c4c86 DANGEROUSLY allow patches on red commits (#58260)
* DANGEROUSLY allow patches on red commits

* allow override sha

* throw on invalid override

* handle undefined
2025-10-28 13:34:57 -06:00
Cam Saul
ae17be3ee1 Add custom Kondo linter to enforce kebab-case in REST API routes (#65100)
* Add Kondo linter to enforce kebab-case in REST API routes

* Remove Claude guidelines (no longer needed)
2025-10-28 19:01:34 +00:00
Nathan Voxland
4f9dc213ed Fix some indexing race conditions (#64783) 2025-10-28 13:47:15 -05:00
Riley Thompson
280e416af4 exclude databricks from database-schema-filtering-test (#65106) 2025-10-28 18:35:43 +00:00
Alex Yarosh
5db25732ee Update documentation for MB_ATTACHMENT_ROW_LIMIT (#65104) 2025-10-28 18:16:34 +00:00
Oleksandr Yakushev
c51d5b5f79 [malli] Don't include docstrings in mu/defn when compiling CLJS (#63793) 2025-10-28 19:53:35 +02:00
Alexander Polyankin
5b8a087754 Fix search with documents (#65000) 2025-10-28 17:42:09 +00:00
Vamsi Peri
7611b467f3 Remove some instructions from CLAUDE.md (#65103)
Removed instructions and comments regarding emoji usage, spelling conventions, tarot card readings, and formatting for specific users.
2025-10-28 13:29:51 -04:00
Nicolò Pretto
9ac8f80da8 feat(sdk): adds handleLink to customize how links should be open (#64960)
* poc of handleLink

* safer implementation

* make it return a boolean to prevent default

* fix types?

* fix static viz build

* adds tests

* make tests more consistents with fns

* test return value undefined

* Update enterprise/frontend/src/embedding-sdk-shared/lib/sdk-global-plugins.ts

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* refactor plugin call

* fix types

* removed reduntant test

* change the api to use `{handled: boolean}`

* support links rendered as anchor tags, refactor the logic and tests

* add story

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-28 18:05:28 +01:00
Alexander Polyankin
6ef2472613 Prepare dependencies for v57 (#65093) 2025-10-28 16:25:13 +00:00
Phoomparin Mano
c24bea6939 Make HoverCard dropdown default to bg-primary (#65047)
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-10-28 23:19:13 +07:00
Edward Paget
8d09595bb8 Remove the instruction to indent docstrings (#65094)
* Remove the instruction to indent docstrings

* Remove example
2025-10-28 10:57:41 -05:00
Riley Thompson
4a23fc0ee0 Fix add interval honeysql form (#65091)
* add back driver hierarchy

* use driver instead of db-type
2025-10-28 15:28:54 +00:00
Sébastien
e23658dd9a Closes EMB-928 sdk popover flashing at 0,0 (#65086) 2025-10-28 16:17:45 +01:00
Mahatthana (Kelvin) Nomsawadi
afaee50a4c fix(sdk): Fix missing SDK CSS custom properties (#65084)
* Follow core app color order

* Add missing CSS custom properties

* Revert "Follow core app color order"

This reverts commit 01a6a17483.
2025-10-28 14:06:23 +00:00
Riley Thompson
0760630f10 Fix databricks multi-level-schema-wanted-catalogs-test (#65073)
* use schema inclusion filters

* fix test

* remove set dep
2025-10-27 23:16:02 +00:00
Noah Moss
27a078faf0 Move honeysql helper to simplify module dependencies (#64689)
* init branch

* FE - add codemirror diffing, add diff support to native query editor, fake a proposed query

* Add /ee/metabot-tools/get-transforms endpoint

Returns a sequence of all python or native query transforms.

BOT-391 [Backend] Create transform index tool API

* Add test that get-transforms does not include non-native MBQL transforms

* Add /ee/metabot-tools/get-transform-details endpoint

* allow opening metabot on transforms admin pages

* use transforms_codegen profile for metabot on transforms page

* send transform in context

* show metabot on edit + create transforms page

* accept tranform suggestions from metabot

* Cleanup malli schemas for get-transforms and get-transform-details

* add transform context on edit query page

* use transforms instead of data queries

* Parse out tables from transforms in metabot user context

* wip on creation flow

* hack in a message to metabot on save

* quick fix preview error not displaying correctly

* misc. fe improvements

* fix transform context on subsequent edits for the same transform

* half hacky way to use current editor state for context in transform editing

* Switch /ee/metabot-v3/get-transforms from :get to :post

This endpoint doesn't expect args of it's own in the body, but does accept the standard metabot conversation_id that
it echoes back.

* Show 'Apply Changes' button when a transform change is generated by the agent

* handle new transforms better

* Ensure we have a fallback for context items that don't have SQL to parse

* persist diff of transform to the conversation history

* temp - make metabot always visible on transforms admin pages

* Change button label to "Proposed changes to <transform>"

* copy change for create transform buttons in chat

* better hidden message ui

* hack - better emtpy convo text

* hide suggested prompts

* Add basic snippets tools

* ensure proposed queries go through nativeQuery.setQueryText so that template tags are parsed

* better todos

* even better todo list ui

* crude sidebar ui for query transforms diffs

* better suggestion chat ui

* good'nuff @mentions

* debug logging for search table bug

* further logging

* Ensure we parse template tags for transform edits in Metabot sidebar (#64001)

* cleaner, more copy/pastable, better flowing @mentions in metabot

* Fix metabot get-transforms api test to :post not :get

* Update metabot tools test with basic python transform tests

* Ensure transform :source and :target keys get snake cased when returned from metabot tool apis

* Add get-transform-python-library-details metabot tool api endpoint

* Enhance context with :used_tables for python transforms

* surface transforms in @-mention search

* some type fixes

* python FE progress

* python fe improvements + edit experience now works

* clear proposed on cancel

* fix accept in sidebar not saving

* better diff colors

* smaller todos

* cleaner code for todos

* improve ranking of transforms in search by hardcoding a last_viewed_at time in user-recency-expr

* first pass at nested @mentions

* Conditionally add transforms to model->db-model

* Add transforms-python to module deps for metabot

* Move native-query-transform? into transforms.util and re-use existing utils

metabot-v3.tools.transforms defined a couple of helper functions that were nearly identical to ones that have since
been added to transforms.util ns. Move some things around and make use of the existing transforms.util predicates,
which are now exported from the module's core namespace.

* lots of fe clean up

* prevent rewinding conversation for admin pages

* @mention solution that plays nicely with documents

* fix search bug

* fix type issues and few small feedback things

* Add transforms to search for Metabot (#64134)

* index transforms content

* Add support for transforms & query search in metabot search tool API

* fixup whitespace

* update to use new :fields syntax

* Fix up serach-native-query malli types

* Fix the 15-day interval for transforms to be db-agnostic

* move engine loading to metabase.search.init to break circular dep

* fix kondo

* Revert "Fix the 15-day interval for transforms to be db-agnostic"

This reverts commit 11b34e4cd4a8a5a0cf8041a1d82d487ed8c81025.

* add transform to set of appdb scorer models; unrevert db type fix

* fix kondo

* implement requisite multimethods for transforms not to error in in-place search engine

* ensure we enforce metabot/unknown contexts for transforms in in-place search backend as well

* fix filter test

* transform->postprocess to reduce naming ambiguity; add a basic transform ingestion test

* add a metabot result postprocessing test

* add transforms scoring test

* expand ingestion tests

* fix tests + kondo

* address feedback

* make suggestion models configurable for a Metabot instance

* fix @mention recents in documents, update suggestion sidebar component to not accept / reject items + calculate isViewing better

* quick fixes

* for rye guy

* Handful of fixes for transforms search (#64287)

* Add both search and search_v2 endpoints, and fix bug with search-native-query option

* add a docstring

* add a basic unit test for search-native-query option

* address comments

* better state management for suggested transofrms, move css around, clean up suggestion message code

* Update the list of source tables in Python editor when metabot changes it (#64258)

If metabot proposes changes to the list of input tables for a Python transform, update the PythonDataPicker component
to keep it in sync with the text of the transform source.

* python tables reference fix

* bug fixes and better state organization

* better draft support

* fix types

* add on leave modal, clear transforms on route leave, calc dirty state, fix onChange but for native query editor, better logic for showing cta text for transform suggestions

* Ensure transforms get deleted synchronously from the search index (#64382)

* Delete transforms from search index in t2/define-before-delete

* kondo

* fix up tests

* Stop pretending to snake_case transform source and target keys

The malli schemas were wrong, so these weren't actually getting snake_cased anyway.

See also:

https://github.com/metabase/ai-service/pull/387#discussion_r2414569482

* Fix failing test & kondo warning

* Add transforms dependency check API for metabot (#64542)

* WIP - add dependency check API for metabot

* omit bad_cards for now

* update return format

* add tests

* Fix fn call

* revert unneeded refactor

* Fix search transform-ingestion-test to use mt/native-query

* switch test to mt/native-query

* Fix module usage test

* fix up tests to use lib/native-query instead

* try to fix last test

* switch native-query-transform? to use lib.query/native?

* more mbql 5/metabase lib updates

* revert the 1-pixel fix

* Subtract a pixel when computing metabot chat filler height to avoid scrollbar flicker (#64690)

* Fix MetabotAgentSuggestionMessage only show "create" for new transforms (#64598)

https://metaboat.slack.com/archives/C09CR3MT1KR/p1760034396345789

* Surface broken cards from Metabot dependencies check API (#64781)

* fix missing sidebar diff after mbql5 change

* surface broken cards

* add test

* fix kondo

* remove unused code

* Fix up dep check question terminology & schema

* fix up test

* fix up another test

* address feedback

* Update the transform source schema to use ::queries.schema/query

* remove unused require

* address FE feedback

* fix modules config test

* @mentions tests and improvements

* couple of e2e tests fixes

* prevent leave confirmation when saving

* fix most of unit tests

* add back searchable models in metabot @mentions

* More tests for transform search + transform dependencies tool, and some new future-proofing read checks (#64896)

* add some future-proofing read checks to transform deps checks + related tests

* add some more transform search tests

* remove 404 check; move read check later in impl

* convert from toucan transform instance to metadata

* clean ns

* Move honeysql helper to simplify module dependencies

* fix more function calls in tests

* fix more calls

* fix (hopefully) last two calls

* kondo fix

* fix module config

* Fix detection of requires in threading macros

* Add metabase.driver.sql.query-processor back as a driver API namespace

* Add tests for metabot tools snippets and check-transform-dependencies endpoints (#64894)

* Add tests for metabot tools snippets API endpoints

* Add test for metabot tools check-transform-dependencies endpoint

* Remove trailing blank line to appease linter

* copy over appdb implementations of add-interval-honeysql-form to h2x; add back the sql.qp version for other drivers

* switch other driver methods back to sql.qp

* update relevant callsites

* move some test logic

* fix up error

* restore :added meta

* fix tests, move over one more pg timestamp helper

* oops, update callsites

* make function public

* add MetabotChatEditor.unit.spec.tsx

* add links.unit.spec.ts

* add AIMarkdown.unit.spec.tsx

* add MetabotAgentTodoMessage.unit.spec.tsx

* add MetabotAgentSuggestionMessage.unit.spec.tsx

* add metabot/state/reducer.unit.spec.ts w/ tests for suggested transforms state

* add e2e test coverage for create + update flow for both native sql + python transforms

* FE pr feedback and lint fix

* unit test fixes

* fix search test

* add temp metabot toggle button in admin nav

* fix a couple of failing FE tests

* attempt fix ci flake issue with metabot.unit.spec.tsx

* remove metabot-only restriction on transform search

* remove redundant logs in transform api endpoints to address ngoc's comment

* fix a number of transform search tests

* fix another test

* fix hopefully last search test

* bot feedback

* bot feedback

* fix function name

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-10-27 21:53:34 +00:00
Nemanja Glumac
3177f079e8 Upgrade Mantine to v8.3.5 (#65050)
This commit removes our custom Mantine hooks patch because it was resolved upstream.
See: https://github.com/mantinedev/mantine/pull/8189
2025-10-27 21:13:25 +01:00
Nemanja Glumac
49c0589aa8 Remove mage tests from the core classpath (#65046) 2025-10-27 21:06:08 +01:00
William
57afac78ba Make native validation allow using current-level aliases in other clauses (#64701)
Make native validation allow using current-level aliases in other clauses

`select a as b from table where b > 1` wasn't passing validation because the b alias wasn't in scope in the where.
This should now be fixed.

Also, native validation keeps more context when generating references, which should allow for better error messages.
2025-10-27 19:15:57 +00:00
Nick Fitzpatrick
1fed0f701c Dark mode day 4 patch (#64996)
* document resize handles

* metrics background color

* update command palette, account profile to use new form components

* fixing button variant

* fix e2e
2025-10-27 18:58:44 +00:00
Nathan Voxland
e9950fdc21 Additional error handling in appdb reindexing (#65013) 2025-10-27 13:06:02 -05:00
Nemanja Glumac
02f7a885ee Bring back the inlined explicit deduplicate command to postinstall (#65058) 2025-10-27 17:05:41 +01:00
Nemanja Glumac
3def5f4ca9 Fix frontend coverage workflow (#65048)
Instrumentation adds a lot of overhead. Unfortunately, even 30 seconds timeout wasn't enough for some of our unit tests. We're doubling that value in order to minimize the chances of this workflow halting/failing again.

* Add workflow_dispatch trigger

* Rename workflow to 'Frontend Test Coverage'
2025-10-27 09:27:34 -06:00
Nemanja Glumac
fcd7a98745 Do not include already patched libraries in node_modules cache (#65052) 2025-10-27 14:49:59 +01:00
Phoomparin Mano
b025a5bfb7 Add horizontal padding on embedding hub when shown in homepage (#65051) 2025-10-27 20:27:13 +07:00
Phoomparin Mano
02467bd231 Design updates for static and interactive embedding settings (#64930) 2025-10-27 08:45:03 +00:00
Nemanja Glumac
ba60e617ba Temporarily patch the broken FE unit test that times out (#65027) 2025-10-27 09:36:29 +01:00
Nemanja Glumac
7738ae7271 Enable Trunk Quarantine for FE unit tests (#65022) 2025-10-27 11:50:20 +13:00
metamben
08c8d0f1f6 Add implicitly joined tables as dependencies (#65015)
* Add implicitly joined tables as dependencies

Fixes QUE-2705

* Simplify table ID collection

* Align local names with producer function names
2025-10-27 01:11:26 +03:00
Nemanja Glumac
bdef8558a9 Remove manual version resolution for nanoid (#65023)
It already resolves to a higher version than that
which was defined in a resolution.
2025-10-26 21:59:24 +01:00
Jeff Bruemmer
20c7cb44a3 docs - minor edits (#65021)
* minor edits

* Apply suggestions from code review
2025-10-26 15:00:19 +00:00
Uladzimir Havenchyk
90b57af0ae drop patch from cypress-esbuild-preprocessor (#65010) 2025-10-26 00:08:49 +02:00
Uladzimir Havenchyk
6ec03b098e chore: make bookmark button look the same as other action buttons (#64951)
* chore: make bookmark button look the same as other action buttons

* revert active state
2025-10-25 22:50:07 +03:00
Uladzimir Havenchyk
7b7d02442a deps: don't bring node polyfills into browser (#64740)
* deps: don't bring node polyfills into browser

* patch package

* fix lint

* bring back Buffer

* another attempt

* Revert "patch package"

This reverts commit 0aee5326018c25f3281400a9254c37fe2b4e7199.

* update password-generator

* try different config

* add fallback

* one more attempt

* one more attempt

* add back buffer

* one more time

* update rspack

* update rspack config

* drop crypto polyfill and patch package instead

* address review

* update patch
2025-10-25 06:54:41 +00:00
Maz Ameli
5decddf00c Simplify metabot icon (#65017) 2025-10-24 23:59:37 +00:00
John Swanson
bacdb174ee Remote Sync (#62686)
* Fix remote sync settings test

* Fix sync type setting validation test

* Fix check sync task type is production

* Update plain type to collection_type

* Cascade changes to collection type

* Update deps checks when collection type changes

* Fix task type check in export

* move setting check to api for better status report

* add tests for sync-type

* Don't mark newly created entities as updated or removed UXW-1806

* UXW-1821 enabled badge

* UXW-1818: hide branch picker and push button for non-admins

* cleanup and UXW-1814

* remove border from the branch picker button

* cleanup

* UXW-1829 update diff modal ui

* UXW-1807: token should appear masked

* Allow setting of nil token

* UXW-1833: show backend error when saving invalid git settings

* Add new collection update/create events

* Remove per collection imp/exp; change dirty status table

* Redo event handling add removed status

* Sync object table on syncs

* Fix status names

* Added /current-task/cancel API and track version in remote_sync_task

* Add is_remote_synced to api responses

* Fix adding is_remote_sync hydration

* Fixed compilation error

* remove hashp

* Fix loading is_remote_sync hydration

* Resolve ambiguous reference

* Fix n+1 detector

if it gets a heterogeneous set of things we should hydrate each type
separately.

* Add can-create? handlers

* remote sync: a few bugfixes and improvements from my bugbash (#64372)

* Set `collection.type` on archive/unarchive

When unarchiving or archiving collections that have the `remote-synced`
type, we need to set their new type appropriately.

When archiving, we should give them a normal (nil) type.

When unarchiving any collection *to* a remote-synced collection, we
should set the type to `remote-synced`.

* Allow serdes without archived items

and use it in remote sync export.

During dependency checking, we do *not* want to exclude archived items:
if card A uses card B, and card B is archived, we need to include Card B
in the list of dependencies! Otherwise we'll say that it's fine to
remote sync card A when it's not.

* Add tests

* Documents are descendants of collections

* don't include cards as document descendants

* fix tests, dashboard descendants args

* remove #p and unnecessary query

* remove another `#p`

* Update auto sync token to enable import job

* More is_remote_sync hydration fixes

* Fix lints and document oss serdes

* Fix cards to be valid for update events

* Don't actually import if nothing has changed in the remote repo

* Remove hashp

* UXW-1817: change branches should update content

* UXW-1813 ensure sync dirty state is properly invalidated

* UXW-1864 fix how collections changes appear in the diff

* Fix ee-available? check

* Improve is_remote_synced hydration

* Fix some more oss/ee issues

finish remote ChangeLog model

* fix invalidation on removal

* fix missing require

* Don't need to handle transforms directories specially

* fix tests to make sure state is fully reset

* remove duplicate require

* Fix deadlock on import

* Fixing tests

* Fix document tests

* Fix kondos

* handle removed sync_status

* UXW-1851: show moving out of synced collection error

* feature flag, misc fixes

* dirty state tracking for snippets

* Fix ns typo

* Add remote-sync token and config

* enforce remote_sync token feature on the FE

* allow cancelling the remote-sync

* Track timeline

* Force re-import when configuring for production mode

* Fixed compilation error

* Force re-import when configuring for production mode only when auto-sync is enabled

* Throwa 400 error if there are dirty objects when doing an import

* force import button

* Better archiving checks with remote synced collections

* Better tests for documents and remote-sync deps

* Remove hashp

* remote hashp

* Remove other hashp

* More consistent collection write checks

* Fix broken collection tests

* Fix broken documents tests

* improve imports/exports frontend

* Implement can-create? for timeline-event

* tweak copy

* Always update branch setting

* Initial Commit

* Fix more tests

* Remove bad parallel annotations

* Show error toast when adding a collection that has references outside of the repo

* reasonable structure, error handling

* timelines editing is less frequent, we can invalidate dirty state on any edit

* Fix dirty state api tests for mysql

* bring error details back

* Fix collection move tests

* Fix remove parallel from can_restore tests

Splitting this into smaller tests seems to introduce some kind of state
that causes tests to fail in parallel

* Fix make logs use unique names for be tests

* Bump toucan2 versions

* Fix var name

* Fix check that there are exportable collections

* Add test for exportable check

* Started on e2e test

* Fix issue with merge

* Fix arguments to card descendants

* Handle new ingestable interface

* Put back changes in cypress-runner

* Fix remaining failing enterprise tests

* Fix one set of app tests

* Clean remote sync state in obj tests

* single collection

* Fix unit test - enterprise getIcon function only applied when new feature is enabled (ResultItem.unit.spec.tsx)

* Fix ts issues / Clean up

* FE fixes

* Remove parallel annotations

* Fix missing import from merging master

* Fix the fix

* always create collection to sync

* no unsyncing

* Remove associating location to trash from search

* Prevent users from switching branches with unsynced changes + show warning

* Create remote-sync collection when it doesn't exist

* Prevent changing to production with unsynced changes

* Make sure dirty state refetches on admin settings load

* single synced collection ui update

* Cannot change to production mode when there are unsynced changes

* Fix failing query

* unquote branches

* fix eastwood

* fix timeline event publishing

* fix import

* Move dashboard remote sync api tests into ee

...where they can reference the setting

* Created /stash API and renamed create branch api to /create-branch

* Fix settings issue

* Fix remaining permissions message tests

* Make sure drop target always works for trash

* Add checks for if we're in trash elsewhere

* cleanup

* git-sync to remote-sync

* more git-sync to remote-sync

* Don't allow export if it overwrites an external commit

* - Don't assume a "main" branch
- Attempt an import when no remote-sync branch exists when enabling dev mode

* Fix creating remote sync library

* refactor to middleware

* hack: add a delay for refetching instance settings or dirty state after remote sync task finishes

* UXW-1953: confirmation flow when switching branches in prod

* Update modal when switching branches with dirty state / Component refactorings

* Create a branch off the last-used commit, not the branch itself

* Add options modal when trying to push while remote is ahead

* Support force option on export

* Update branch setting and complete task in txn

* Let export! set branch in stash and fix tests

* Fix PR feedback nits

* Update enterprise/backend/src/metabase_enterprise/remote_sync/api.clj

* Consistent documentation style in remote-sync

* Add option to pull from remote / Adjust push/pull icons / Adjust out-of-sync options modal

* modals UI polish

* constants clean up

* Add api schemas and make error messages consistent

* fix check-403 to write-check

* Apply suggestions from code review

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* Clean up a couple components / Move things around

* Address renaming suggestions

* Fix var names and bad merge

* double->float in schema

* Share error handling

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

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

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

* Addressing small PR comments

* Refetch properties when branch is created (current branch changed)

* Make sure /current-task is only called when import and export are not in progress

* Replace unset color variables

* Improve element padding on side panel

* Remove a couple trailing spaces reported by clj whitespace linter

* Show error when settings request fails / Make sure current-task also waits for the PUT settings mutation

* Fix document perm tests

* Allow empty remote-url, moved import and export calls to impl

* Fix minor prettier issue

* Fix another lil lint issue

* temp

* e2e push / pull

* Unify more of the import implementation

* fix CI failures

* fix mysql ci failures

* Address metabot critiques

* Address additional metabot feedback

* last round of docstring feedback

* library admin settings e2e

* Add attribution to TODO

* fix ws

* fix missed commiting file

* fix another missing file

* production switch branches

* More clojure like docstrings

* More docstring fixes

* adding branch switching test

* Address Nick's PR review comments (most of them)

* Fix more nits

* Resolving Nick's comments part 2

* Improving remote-sync settings handling

* attempt to repair synced_folder icon

* Fail if attempting to connect to an uninitialized repo

* correct the name of synced_collection.svg

* add new repository icon

* Add default-branch to source protocol

* Update Git Sync to Remote Sync in Admin settings (#64993)

* Make api docstrings and errors more generic

* Use check-400 to simplify api

* fix ws

* Rollback BaseSMTPConnectionForm.tsx (fixes a e2e test)

* fix e2e tests?

* Fix small merge issue

* Always use `last-version` instead of caring about import vs. export version

* starting warning modal tests

* Fetch source at the beginning of import/export operations

* Fix broken test

* Delete branches that were deleted on remote

* Fix missing test suffix

* Fix eastwood

* Adjust branching e2e test, skip failing tests

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Anderson <anderson@metabase.com>
Co-authored-by: eliotmetabase <eliot@metabase.com>
Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-10-24 15:58:25 -07:00
metamben
bb6d7b1cbc Fix transform target table hydration (#64999) 2025-10-24 21:41:57 +00:00
Nemanja Glumac
f01ea21e37 Do not deduplicate js dependencies automatically (#65004) 2025-10-24 21:53:53 +02:00
Riley Thompson
e937214a8d Include documents and dashboards in dependencies (#64888) 2025-10-24 13:42:24 -04:00
Tyler Plude
d9060d941c [METABOT] Project Code Gen (#63313)
* init branch

* FE - add codemirror diffing, add diff support to native query editor, fake a proposed query

* Add /ee/metabot-tools/get-transforms endpoint

Returns a sequence of all python or native query transforms.

BOT-391 [Backend] Create transform index tool API

* Add test that get-transforms does not include non-native MBQL transforms

* Add /ee/metabot-tools/get-transform-details endpoint

* allow opening metabot on transforms admin pages

* use transforms_codegen profile for metabot on transforms page

* send transform in context

* show metabot on edit + create transforms page

* accept tranform suggestions from metabot

* Cleanup malli schemas for get-transforms and get-transform-details

* add transform context on edit query page

* use transforms instead of data queries

* Parse out tables from transforms in metabot user context

* wip on creation flow

* hack in a message to metabot on save

* quick fix preview error not displaying correctly

* misc. fe improvements

* fix transform context on subsequent edits for the same transform

* half hacky way to use current editor state for context in transform editing

* Switch /ee/metabot-v3/get-transforms from :get to :post

This endpoint doesn't expect args of it's own in the body, but does accept the standard metabot conversation_id that
it echoes back.

* Show 'Apply Changes' button when a transform change is generated by the agent

* handle new transforms better

* Ensure we have a fallback for context items that don't have SQL to parse

* persist diff of transform to the conversation history

* temp - make metabot always visible on transforms admin pages

* Change button label to "Proposed changes to <transform>"

* copy change for create transform buttons in chat

* better hidden message ui

* hack - better emtpy convo text

* hide suggested prompts

* Add basic snippets tools

* ensure proposed queries go through nativeQuery.setQueryText so that template tags are parsed

* better todos

* even better todo list ui

* crude sidebar ui for query transforms diffs

* better suggestion chat ui

* good'nuff @mentions

* debug logging for search table bug

* further logging

* Ensure we parse template tags for transform edits in Metabot sidebar (#64001)

* cleaner, more copy/pastable, better flowing @mentions in metabot

* Fix metabot get-transforms api test to :post not :get

* Update metabot tools test with basic python transform tests

* Ensure transform :source and :target keys get snake cased when returned from metabot tool apis

* Add get-transform-python-library-details metabot tool api endpoint

* Enhance context with :used_tables for python transforms

* surface transforms in @-mention search

* some type fixes

* python FE progress

* python fe improvements + edit experience now works

* clear proposed on cancel

* fix accept in sidebar not saving

* better diff colors

* smaller todos

* cleaner code for todos

* improve ranking of transforms in search by hardcoding a last_viewed_at time in user-recency-expr

* first pass at nested @mentions

* Conditionally add transforms to model->db-model

* Add transforms-python to module deps for metabot

* Move native-query-transform? into transforms.util and re-use existing utils

metabot-v3.tools.transforms defined a couple of helper functions that were nearly identical to ones that have since
been added to transforms.util ns. Move some things around and make use of the existing transforms.util predicates,
which are now exported from the module's core namespace.

* lots of fe clean up

* prevent rewinding conversation for admin pages

* @mention solution that plays nicely with documents

* fix search bug

* fix type issues and few small feedback things

* Add transforms to search for Metabot (#64134)

* index transforms content

* Add support for transforms & query search in metabot search tool API

* fixup whitespace

* update to use new :fields syntax

* Fix up serach-native-query malli types

* Fix the 15-day interval for transforms to be db-agnostic

* move engine loading to metabase.search.init to break circular dep

* fix kondo

* Revert "Fix the 15-day interval for transforms to be db-agnostic"

This reverts commit 11b34e4cd4a8a5a0cf8041a1d82d487ed8c81025.

* add transform to set of appdb scorer models; unrevert db type fix

* fix kondo

* implement requisite multimethods for transforms not to error in in-place search engine

* ensure we enforce metabot/unknown contexts for transforms in in-place search backend as well

* fix filter test

* transform->postprocess to reduce naming ambiguity; add a basic transform ingestion test

* add a metabot result postprocessing test

* add transforms scoring test

* expand ingestion tests

* fix tests + kondo

* address feedback

* make suggestion models configurable for a Metabot instance

* fix @mention recents in documents, update suggestion sidebar component to not accept / reject items + calculate isViewing better

* quick fixes

* for rye guy

* Handful of fixes for transforms search (#64287)

* Add both search and search_v2 endpoints, and fix bug with search-native-query option

* add a docstring

* add a basic unit test for search-native-query option

* address comments

* better state management for suggested transofrms, move css around, clean up suggestion message code

* Update the list of source tables in Python editor when metabot changes it (#64258)

If metabot proposes changes to the list of input tables for a Python transform, update the PythonDataPicker component
to keep it in sync with the text of the transform source.

* python tables reference fix

* bug fixes and better state organization

* better draft support

* fix types

* add on leave modal, clear transforms on route leave, calc dirty state, fix onChange but for native query editor, better logic for showing cta text for transform suggestions

* Ensure transforms get deleted synchronously from the search index (#64382)

* Delete transforms from search index in t2/define-before-delete

* kondo

* fix up tests

* Stop pretending to snake_case transform source and target keys

The malli schemas were wrong, so these weren't actually getting snake_cased anyway.

See also:

https://github.com/metabase/ai-service/pull/387#discussion_r2414569482

* Fix failing test & kondo warning

* Add transforms dependency check API for metabot (#64542)

* WIP - add dependency check API for metabot

* omit bad_cards for now

* update return format

* add tests

* Fix fn call

* revert unneeded refactor

* Fix search transform-ingestion-test to use mt/native-query

* switch test to mt/native-query

* Fix module usage test

* fix up tests to use lib/native-query instead

* try to fix last test

* switch native-query-transform? to use lib.query/native?

* more mbql 5/metabase lib updates

* revert the 1-pixel fix

* Subtract a pixel when computing metabot chat filler height to avoid scrollbar flicker (#64690)

* Fix MetabotAgentSuggestionMessage only show "create" for new transforms (#64598)

https://metaboat.slack.com/archives/C09CR3MT1KR/p1760034396345789

* Surface broken cards from Metabot dependencies check API (#64781)

* fix missing sidebar diff after mbql5 change

* surface broken cards

* add test

* fix kondo

* remove unused code

* Fix up dep check question terminology & schema

* fix up test

* fix up another test

* address feedback

* Update the transform source schema to use ::queries.schema/query

* remove unused require

* address FE feedback

* fix modules config test

* @mentions tests and improvements

* couple of e2e tests fixes

* prevent leave confirmation when saving

* fix most of unit tests

* add back searchable models in metabot @mentions

* More tests for transform search + transform dependencies tool, and some new future-proofing read checks (#64896)

* add some future-proofing read checks to transform deps checks + related tests

* add some more transform search tests

* remove 404 check; move read check later in impl

* convert from toucan transform instance to metadata

* clean ns

* Add tests for metabot tools snippets and check-transform-dependencies endpoints (#64894)

* Add tests for metabot tools snippets API endpoints

* Add test for metabot tools check-transform-dependencies endpoint

* Remove trailing blank line to appease linter

* add MetabotChatEditor.unit.spec.tsx

* add links.unit.spec.ts

* add AIMarkdown.unit.spec.tsx

* add MetabotAgentTodoMessage.unit.spec.tsx

* add MetabotAgentSuggestionMessage.unit.spec.tsx

* add metabot/state/reducer.unit.spec.ts w/ tests for suggested transforms state

* add e2e test coverage for create + update flow for both native sql + python transforms

* FE pr feedback and lint fix

* unit test fixes

* fix search test

* add temp metabot toggle button in admin nav

* fix a couple of failing FE tests

* attempt fix ci flake issue with metabot.unit.spec.tsx

* remove metabot-only restriction on transform search

* remove redundant logs in transform api endpoints to address ngoc's comment

* fix a number of transform search tests

* fix another test

* fix hopefully last search test

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-10-24 11:58:30 -05:00
Cam Saul
15b31fb834 nest-query => Lib (#64940)
* nest-query => Lib

* Fix schema

* Update changelog

* PR feedback from #64901

* Upgrade field resolution to handle CATEGORY_2 => CATEGORY

* Update docstring

* Test fix 🔧

* Test fixes 🔧

* Whoops commit new file

* Test fixes 🔧
2025-10-24 09:42:55 -07:00
Nemanja Glumac
ce56b8e398 Simplify and unify M2 and node-modules caches (#64955) 2025-10-24 18:18:51 +02:00
Sébastien
d2b54425f2 Closes EMB-906 custom branding images for SDK (#64946)
* .

* .

* types

* tidy up

* tidy up again

* tidy up again

* cleanup
2025-10-24 17:35:22 +02:00
metamben
8722548f6d Add permissions checks for the dependencies API (#64965) 2025-10-24 10:57:43 -04:00
Nemanja Glumac
8a542dd80a Introduce Metabase CI caching strategy (#64988) 2025-10-24 16:20:56 +02:00
Marcos
940d244d2d fix stuck loading in 'caching in questions and dashboards' admin section (#64799) 2025-10-24 11:15:50 -03:00
Alex Yarosh
33e9a2cc25 docs: ai chat component (#64989)
* ai chat component

* oops

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

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

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

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

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-24 14:05:48 +00:00
Nick Fitzpatrick
9ddffb2edf handful of fixes (#64854)
* handful of fixes

* trash icon color, fix tooltip text in charts

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-24 09:48:04 -03:00
Uladzimir Havenchyk
c396990a98 fix(command palette): show different skeleton when no recent items (#64929)
* fix(command palette): show different skeleton when no recent items

* cleanup

* make props required

* fix typecheck

* remove default
2025-10-24 11:23:40 +00:00
github-automation-metabase
29f1dac45f Update generated docs (master) (#64975)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-24 07:14:17 -04:00
Mahatthana (Kelvin) Nomsawadi
db9c8dcfbf Wait for timeline to refresh before clicking the checkbox (#64984) 2025-10-24 11:41:08 +01:00
Dan Stone
2dc59090e3 Connection closed flake during python-transform-timeout-status-test round 2 (#64947)
* Remove redundant transaction setting in timeout test

Did not fix flake as expected

* If in a transaction do not open the python log thread
2025-10-24 09:48:04 +00:00
Fraser
a13c7d234d Remove unused packages from package json (#64941) 2025-10-24 20:43:51 +13:00
Fraser
577b1d8fb6 Remove regenorator-runtime (#64942)
Generators are native in browsers now, this dep is not needed
2025-10-24 14:30:23 +13:00
Anderson
6586bba402 Removing docs/* for ignore (#64973)
Due to `useEngineDocMarkdownContent` changes the dynamic imports are needed for `import(`docs/databases/connections/${docFileName}.md`)`

Co-authored-by: Jonathan Sheely <jsheely@thirtytech.net>
2025-10-23 20:03:34 -03:00
dpsutton
686113d2d7 disable snowflake (#64962)
https://linear.app/metabase/issue/DEV-997/reenable-snowflake-in-ci

due date one week
2025-10-23 17:00:56 -05:00
John Swanson
a893803cfb Collections are delete-able (#64414)
* Collections are delete-able

The `can_delete` flag for collections was the only missing bit to have
collections be deletable, since I added an API endpoint to delete
collections a while ago! I thought FE work was required, doh.

Fixes UXW-1090

* Fix e2e tests
2025-10-23 13:16:52 -07:00
Cam Saul
aa200bc31f X-Rays => Lib (#64901)
* Rework X-Rays to use Lib

* Test change

* Fix the last few failing tests

* Remove dead code

* PR feedback

* Claude updates

* Fix typos

* Oops

* e2e test fix 🔧
2025-10-23 10:03:38 -07:00
Alexander Polyankin
1b03fa10a9 Dependency tracking graph (#64202)
* Search

* Search

* Search

* Search

* Search

* Search

* Search

* Search

* New format

* New format

* New format

* New format

* New format

* New format

* updated graph endpoint

* added /graph/node

* remove prn

* add ability to get graph for a single node

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* update graph api again

* Fix viz icon

* CSS hack

* CSS hack

* Fix layout jump

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix tests

* Fix tests

* Fix

* update api

* Fixes

* Add view count

* Add view count

* update api again

* Fix

* Fix

* Fix

* Fix

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* api update

* Fix merge

* Fix merge

* Fix merge

* Search

* Search

* Search

* Search

* Search

* Search

* selection

* selection

* selection

* selection

* selection

* selection

* selection

* selection

* selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Restrict transform search to admin users and add basic test

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Info

* Info

* Add a bunch of fields to the data nodes

* Info

* Info

* Info

* Info

* Hydrate table fields in graph endpoints

* Info

* Info

* Info

* Info

* Info

* Info

* Hydrate table for transforms and db for tables

* Remove comment form

* Info

* Info

* Acknowledge that db id, schema, and table name form a key

* Info

* Info

* Info

* Fixes

* Fixes

* Adjust loading

* Add check

* Add check

* Fixes

* Fixes

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Fix compilation

* Tests

* Tests

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* Handle errors

* Handle errors

* Handle errors

* Handle errors

* Handle errors

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Fix some tests

* Remove view_count for non-questions

* Fix one more test

* Add more tests

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Add e2e tests

* Add e2e tests

* Rename to dependents_count on FE

* Rename :dependents to :dependents_count in the BE

* Fix FE types

* Fix FE types

---------

Co-authored-by: William Zimrin <william@metabase.com>
Co-authored-by: Tamás Benkő <tamas@metabase.com>
2025-10-23 12:17:13 -04:00
Nemanja Glumac
ac8285254b Start utilizing the Trunk Quarantine for E2E tests (#64873) 2025-10-23 14:10:37 +02:00
Sébastien
1a8a04cf82 fix(sdk): Closes EMB-905 no error when embedding MB localhost->distant MB (#64835)
* Closes EMB-905 no error when embedding MB localhost->distant MB

* cleanup
2025-10-23 12:33:32 +02:00
Sébastien
750c6ebb22 Fixes "In HTML, <button> cannot be a descendant of <button>." error and removes console warnings (#64904)
* Removes many console NPE warnings

* button -> icon for widgetStatus

* role

* fixup

* padding

* fixed flaky
2025-10-23 11:56:09 +02:00
Nemanja Glumac
2c71824e61 Sane CI caches PoC - Cypress (#64932) 2025-10-23 13:53:08 +13:00
Nemanja Glumac
a58b2ebefc Remove unused add-to-project action (#64910) 2025-10-22 17:13:39 -07:00
Nathan Voxland
ac22d632bc Improve logging and recovery around errors in reindexing and create-table! (#64897) 2025-10-22 16:07:13 -05:00
Phoomparin Mano
b56f63252b Design polishes for modular embedding and embedding setup guide (#64893) 2025-10-23 03:14:52 +07:00
Uladzimir Havenchyk
62fceee952 fix: restore missing css after migration to new postcss-preset-env (#64874)
* fix: restore missing css after migration to new postcss-preset-env

* update comment

* Update postcss.config.js

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* proper fix

* fix comment

* remove path

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-22 22:36:56 +03:00
Phoomparin Mano
2feb85417d feat(sdk-bundle, embed-js): stacked layout updates for metabot question (#64573) 2025-10-22 19:16:44 +00:00
John Swanson
8dc5cec918 Remove :feature checks on some EE code (#64848)
* Assert premium features for some middleware

* Fix an existing bug

These tests started failing here, which revealed that they formerly
never actually were testing what they thought they were.

A few reasons:
- they turned on `advanced-permissions` feature by itself, so sandboxing
was always off here

- they set up sandboxing in a nonstandard way

- one had a typo so we weren't even wrapping the body with
`with-download-perms!` (it was a separate block entirely)

This hid the bug that some of the tests were intended to reproduce - if
a card used for sandboxing had a native query, then we required that you
have download permissions on the entire database, which is wrong.

* fix test

* make assertions with/without tokens for sandboxing

* Add comments about why `:feature :none`

* Update enterprise/backend/test/metabase_enterprise/sandbox/query_processor/middleware/sandboxing_test.clj

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

* add a nicer docstring and change fn name

replace `any-native-unsandboxed-stage?` with
`any-native-stage-not-introduced-by-sandbox?`

* Block without feature enabled

* CR response

---------

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-10-22 11:20:12 -07:00
Phoomparin Mano
560a253192 Design polishes for EAJS embed wizard (#64895) 2025-10-23 01:19:07 +07:00
github-automation-metabase
753c645216 Update generated docs (master) (#64900)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-22 14:10:00 -04:00
Anderson
bd18384233 Fix unnecessary redirects on Models & Metrics pages (#64489)
* Fix models and metrics links to prevent redirect from /question/:id-slug

* Fix e2e
2025-10-22 13:42:49 -03:00
Nicolò Pretto
67d603aa42 feat(sdk): plugins passed to the provider are passed down to the (#64920)
dashboard
2025-10-22 15:52:18 +00:00
Rodrigo López Dato
b9ac3ab886 Allow app and capacitor schemes as valid origins for Ionic apps (#64719)
* Allow any scheme for URLs, not just http/https

* Explicitly allow app:// and capacitor:// schemes

* fix flakiness in e2e test

* Only accept HTTP/HTTPS when no protocol is specified

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
2025-10-22 11:02:11 -03:00
Nicolò Pretto
bef6cb6908 make mapQuestionClickActions intercept links and fix links to host app (#64623)
* ugly solution #1

* revert the ugly part

* refactor and tests

* fix(modular): make links/click behavior that link to the same origin as the host app work and open them on a new tab

* update tests to expect a click behavior

* clean up tests

* tests for the same domain issue

* add also basic support for links, just in case

* Update e2e/test-component/scenarios/embedding-sdk/dashboard-click-behavior.cy.spec.tsx

* refactor tests as per feedback to use mockIsEmbeddingSdk

* don't remove column settings
2025-10-22 15:07:59 +02:00
Nemanja Glumac
f573f15de1 Replace and remove use-table-list-query (#64772) 2025-10-22 10:33:01 +00:00
Kamil Mielnik
38bf19399d Update onboarding video (#64905) 2025-10-22 09:59:44 +00:00
Cam Saul
f3b85b3e33 Lib column unique key (#64889) 2025-10-22 09:54:57 +00:00
Nemanja Glumac
23f74a039f Update team members in team.json (#64902)
Removed 'kulyk' from Admin team and added multiple members to DevEx team.
2025-10-22 11:19:25 +02:00
Kamil Mielnik
3ad1913339 Separate favicon for dev env (#64845)
* Add separate favicon for dev env

* Don't use dev favicon if a custom one has been set

* Red favicon

* Format code
2025-10-22 16:16:37 +07:00
Dan Stone
e622f71034 Opt logging test out of slower drivers (#64903) 2025-10-22 09:03:45 +00:00
Mahatthana (Kelvin) Nomsawadi
abeef3b5a8 feat(sdk): Let end users archive items in the CollectionBrowser SDK component (#64561)
* Remove unnecessary default value

* Remove unnecessary export

* Show move to trash icon in CollectionBrowser

* Make the trash button easier to work with

* Add a dropdown

* Fix icon

* Archive resources in the collection browser

* Add tests

* Update UX

* Prevent external type change

* Remove custom style
2025-10-22 04:38:59 +01:00
Fraser
2637538cee Use more robust approach to detecting unmocked routes (#64508) 2025-10-22 16:14:26 +13:00
Maz Ameli
5aad91c383 fix border color (#64857) 2025-10-21 20:49:49 -04:00
Maz Ameli
5931cb0d0a Subtler Add Data button in side nav (#64745)
* subtler add data button in side nav

* fix tests

* update test

* fix unrelated broken test

* fix another unrelated broken test

* try fixing test again

* undo changes to unrelated tests

* Cursor's attempt at fixing related test
2025-10-21 15:49:01 -07:00
Cam Saul
8ad785fdbb Deprecate legacy MBQL utils (#64595)
* Deprecate legacy MBQL utils

* Deprecate legacy MBQL utils

* cljfmt

* Fix most tests except long native column names

* Kondo

* Test fixes 🔧

* Fix .clj versus .cljc in Lib

* Disable deprecation warnings

* Fix cljs

* Mega normalization improvements

* Kondo

* Another round of test fixes 🔧

* Schema fix 🔧

* PR feedback; test fixes

* Test fixes 🔧

* Fix BigQuery tests

* Test fix 🔧

* Test fixes 🔧

* Fix Card QP parameter normalization AGAIN 😆

* Oops

* Fix Claude code review

* Fix Claude code review

* Fix BigQuery tests
2025-10-21 15:29:36 -07:00
dpsutton
78308b14f9 Extend db connection timeout in tests (#64886)
* Extend db connection timeout in tests

We allow for 10 seconds in the app, and 3 seconds in test. I extend that
3 seconds to 5 seconds. This should really only affect bigquery.

In bigquery, we test if you "can connect" by connecting to the project
and then attmepting to find any datasets that you are able to see. This
is important because each test run connects to the same project but is
scoped down to fewer datsets. It's possible we could change this
behavior and return if you can list datasets at all, but it is nice if
you can see at least one dataset based on your inclusion and exclusion
filters.

For reference, the filters for my current CI run are:

```clojure
bigquery-cloud-sdk=> (update details :service-account-json (constantly "<<redacted>>"))
{:project-id nil,
 :service-account-json "<<redacted>>",
 :dataset-filters-type "inclusion",
 :dataset-filters-patterns "sha_4c3ca6238018e2b60025297f3e5c39671588adf2_QLGKZKIAOSQXOGGDURQY",
 :include-user-id-and-hash true,
 :project-id-from-credentials "metabase-bigquery-driver"}
```

In my repl, i'm seeing the following behavior:

```clojure
bigquery-cloud-sdk=> (time (let [client (database-details->client details)
                            project-id (get-project-id details)
                            datasets (.listDatasets client project-id (u/varargs BigQuery$DatasetListOption))
                            ]
                        (vec (for [^Dataset dataset (.iterateAll datasets)
                               :let [dataset-id (.. dataset getDatasetId getDataset)]
                               ]
                           dataset-id))))
"Elapsed time: 2692.292292 msecs"
["BQ_tupac_sightings"
 "Shakespeare"
 ...
 "v6_sample_dataset"]
bigquery-cloud-sdk=> (count *1)
273
```

So just enumerating all datasets takes ~2.7 seconds so we are flirting
with the fail limit of 3 seconds.

I extend this to 5 seconds and this should only give a bit of breathing
room to bigquery and everything else remains the same.

* fix flakiness in e2e test

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
2025-10-21 17:15:28 -05:00
Alex Yarosh
3d5410d199 samesite (#64883) 2025-10-21 17:28:05 -04:00
Phoomparin Mano
497ef8ebe1 Embedding hub's checklist endpoint fails due to sample database changes (#64642) 2025-10-22 02:39:38 +07:00
Dan Stone
ec16936ff8 Add new columns to metabase_field for internal-tools/data-apps (#60263)
* Add migrations

* Add new columns to serde spec

* Update serde baseline

Will change again in follow up once sql-jdbc behaviour is ported

* Extend sql-jdbc describe-table

* Sync new field columns

* Extend field our-metadata to the new sync columns

* Fix tests

* Add postgres support new field columns

* Add generic driver tests for nullability and defaults

* Extend clickhouse test driver to :not-null? :default field defs

* Add new columns to mysql describe-fields-sql

* Add new features for better test specification

- :describe-is-nullable
- :describe-default-expr

In both cases if the feature is unsupported, the driver must return `nil` for the respective field metadata keyword.

* Add :database-is-generated test and driver feature

* Fix load-data inserts when rows empty

* Do not return generated-column-sql for redshift

* Fix snowflake-test/describe-table-test

* Fix bigquery load-tabledef when table has no rows

* Use generation_expression rather than :extra for mysql/mariadb

* Fixup driver features

* Amend pk-sync-test to verify the new :database_is_pk behaviour more explicitly as the semantic type changes

* Add sync tests for default/generated/nullable

* Formatting

* Add SQLite support for generated/nullable/default

* Add SQL-Server support for generated/nullable/default

* Only test dynamic dataset databases for now

* For druid JDBC all columns (apart from __time) are nullable

* Vertica does not support generated columns

* Starburst does not support generated columns

* Presto does not support generated columns

* Revert accidental database-required behaviour change

* Assert table synced

* Use def'd datasets rather than inline

* Oracle features

* Vertica features

* Opt starburst, presto out of defaults

* Add :test/create-table-without-data to deal with mongo

* Add some new lines to mig yml

* Add note about sync to driver test

* Do not spam logs for pk changes on upgrade

* Further logging guard refinement

* Fix migration conflicts
2025-10-21 17:59:51 +01:00
Dan Stone
c4cfe78c2c Fix devcontainer deprecated apt-keys call (#64879)
NodeSource should handle its own keys
2025-10-21 16:29:09 +01:00
github-automation-metabase
d0fff0402a Update generated docs (master) (#64858)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-21 11:26:52 -04:00
Alex Yarosh
f267ce0c56 Revise impersonation permissions details (#64878)
Updated impersonation permissions documentation to clarify supported databases and row-level security for PostgreSQL.
2025-10-21 11:14:00 -04:00
Dan Stone
363ed3b959 Ensure idle_in_transaction_session_timeout is large enough during timeout test (#64866) 2025-10-21 15:53:19 +01:00
Noah Moss
b4c65c3299 [semantic search] Separate out embeddable_text from searchable_text and use labeled format for embedding (#64693)
* [Search] Separate out embeddable_text from searchable_text and use labeled format for embedding

* add embeddable_text to test data

* update mock-embeddings in tests to use new format for embeddable strings

* Fix more tests

* Fix more tests

* Fix last tests

* Fix last test

* improve comments & add a test that transform fns are not applied
2025-10-21 10:37:35 -04:00
Nemanja Glumac
195b18d690 Remove unused [ci nocache] CI option (#64852) 2025-10-21 16:36:53 +02:00
Phoomparin Mano
3a0e283b12 Move the SameSite cookie settings from interactive embedding to security tab (#64533) 2025-10-21 21:07:23 +07:00
github-automation-metabase
97c57e7bac chore(sdk): Update published npm version to 0.57.0-alpha.3 (#64870) 2025-10-21 12:43:23 +00:00
Mahatthana (Kelvin) Nomsawadi
92cea5d4f5 Fix download not getting parameters from visualized dashcards (#64754)
* Fix download not getting parameters from visualized dashcards

* Add E2E test

* Make test name clearer
2025-10-21 12:50:03 +01:00
Nemanja Glumac
dbf8855111 Ignore fn-deprecated warnings in cljs logs (#64867) 2025-10-21 13:46:49 +02:00
Kamil Mielnik
292a7c8058 Fix flaky test (#64863) 2025-10-21 11:12:32 +00:00
Dan Stone
83fdbaa65c Ensure field insertion order is consistent with :database-position (#62491)
Avoids FE ordering depending on hash iteration order on initial sync - in particular avoids
breakage in tests relying on id positionally if hashes change.
2025-10-21 09:07:58 +01:00
Mahatthana (Kelvin) Nomsawadi
0ab2b9f4f6 Fix flaky SDK tests (#64699)
* Remove double beforeEach setup probably from a mistake

* Fix the flaky test. I hope...

* Attempt to fix the test that failed the interception

* Revert change

* Fix the flake on Cypress CI
2025-10-21 04:50:17 +01:00
Timofey Kachalov
9d687287fe Fix build-e2e-matrix.unit.spec.js tests (#64851) 2025-10-20 23:51:27 +04:00
Phoomparin Mano
b5e93da266 fix(sdk-bundle, sdk-package): add missing focus color due to dark mode changes (#64641) 2025-10-21 02:15:15 +07:00
Nathan Voxland
78bf0474d6 Removed unneeded liquibase preconditions (#64694) 2025-10-20 11:11:33 -05:00
Nathan Voxland
b7bf8b6ecc Move the creation of the "card_view" tracking from the card APIs to query execution level (#64115) 2025-10-20 11:10:27 -05:00
Ngoc Khuat
65d95d9438 Polymorphic transforms (#64084) 2025-10-20 12:00:01 +00:00
Mahatthana (Kelvin) Nomsawadi
205bd075a9 Fix some events not shown on charts when grouping with different units (#64801)
* Fix some events not shown on charts when grouping with different units

* Take timezone into account

* Add tests

* Simplify return
2025-10-20 12:23:30 +01:00
Nemanja Glumac
0e8804a8cc Avoid setting up python transforms in every e2e test group (#64749) 2025-10-20 11:09:23 +00:00
Kamil Mielnik
6773707b3e Fix multiple flaky e2e tests (#64728)
* Unskip and unjail

* Modernize test

* Fix stubbing

* Remove tag

* Wait for sync to finish

* Fix flaky test

* Update test

* Unmark test as flaky

* Unmark tests as flaky

* Increase timeout

* Add const

* Fix flaky test

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Resync db

* Decrease flakiness

* Add a comment

* Fix flaky test

* Revert

* Out of jail

* Fix flake

* Decrease flakiness

* Try to decrease flakiness

* Revert "Try to decrease flakiness"

This reverts commit 38eadb47a3.

* Try to fix flakiness

* Fix

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Remove redundant blur

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Add comments
2025-10-20 16:57:52 +07:00
Uladzimir Havenchyk
3037854ee0 deps: upgrade rspack (#64800) 2025-10-20 09:53:15 +03:00
Sébastien
14b05dc189 Closes EMB-853 renamed legends get ignored by content translation (followup) (#64706)
* Closes EMB-853 for cartesian charts

* tests

* cleanup
2025-10-20 08:15:49 +02:00
Sébastien
20d149c48d Make switch to data button keyboard accessible/interactive (#64321)
* .

* fixed e2e

* toggle color
2025-10-20 08:14:58 +02:00
Nemanja Glumac
165c061afb Fix rspack alias type issue (#64770)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-10-18 23:53:24 +02:00
Oleksandr Yakushev
2fce0a53a6 Bump Malli to 0.19.2 (#64593) 2025-10-18 19:03:04 +00:00
Nathan Voxland
fd2c44a380 Reduce reflection overhead in search (#64785) 2025-10-17 15:18:37 -05:00
Alexander Polyankin
b86eb24b0c Fix transform e2e tests (#64805) 2025-10-17 20:50:23 +03:00
Uladzimir Havenchyk
8eb405c96b speed up fe build by upgrading svgo (#64671) 2025-10-17 20:18:59 +03:00
Braden Shepherdson
dd5117bdb1 [QP] Fix convertTimezone exprs with no src TZ and SQL source (#64710)
Closes QUE-2613.

`convertTimezone` now checks the type of the field ref, since we might not know to make the compiled
column a timezone-backed column when the previous stage is a native query.
2025-10-17 12:39:44 -04:00
Romeo Van Snick
935fe5a0e5 CodeMirror editor small fixes and dark mode updates (#64791)
* Remove double border

* Remove overflowing corners on functionbrowser

* Fix HelpText header background in dark mode

* Remove dot in customexpression editor

* Fix dark mode completions in native editor

* Move color fixes to CodeMirror component

* Move CodeMirror cursor fix in darkmode to shared CodeMirror module

* Move completion styles to shared CodeMirror component

* Enable highlighting of partials in Python completions

* Remove more shared CM code

* Fix e2e test

* Fix timout in e2e test
2025-10-17 16:38:32 +02:00
Uladzimir Havenchyk
96750294f5 deps: upgrade packages we had duplicated in bundle (#64743)
* deps: upgrade packages we had duplicated in bundle

* update imports
2025-10-17 08:24:59 +00:00
Romeo Van Snick
19a811f282 Fix timeout in e2e test (#64796) 2025-10-17 07:22:00 +00:00
Oleksandr Yakushev
0be7ef31cf [perf] Introduce lean implementations of for and doseq (#64392) 2025-10-17 09:48:39 +03:00
Braden Shepherdson
7c76029e6b [perf] Use cached MetadataProvider on FE; reuse MP in /query_metadata (#64780)
This addresses most of QUE-2686 #64774 but a second PR is required to fix a
56-specific issue that doesn't apply to `master`.

The FE was not using the new
`lib.metadata.cached-provider/cached-metadata-provider` except where
it gets added by `lib/query`. Previously, the FE constructed the
*uncached* MP once (ish) and then passed it to `lib/query` many times.
Each of those queries got its MP wrapped with `cached-metadata-provider`
but the next time the query got converted via `lib/query` its cached
values (eg. `visible-columns`, `returned-columns`) were lost.

This PR wraps the `lib.js.metadata/metadata-provider*` with
`cached-metadata-provider` from the start, so the cached values have
the same lifespan as the `MetadataProvider`, rather than each individual
query.

I also noticed that `/query_metadata` requests don't use
`lib-be.metadata.jvm/with-metadata-provider-cache`, so they end up
recreating `MetadataProvider`s for the same underlying database over and
over. That increases AppDB traffic and CPU usage to recompute
`returned-columns` etc. repeatedly. Both of those scale fast with the
complexity of the query.
2025-10-17 05:34:59 +00:00
metamben
7ee5fffead Allow both db and dbname in Redshift connection details (#64748) 2025-10-17 05:08:59 +00:00
Romeo Van Snick
7491d37214 Do not reset collection selection after canceling action (#64766)
* Do not clear selection when canceling action

* Add repro for metabase#44911
2025-10-17 10:38:25 +11:00
Oleksandr Yakushev
fc98a81852 [malli] Use optimized postwalk when calculating schema-cache-key (#64655) 2025-10-17 01:19:36 +03:00
Oleksandr Yakushev
d76377e784 Fix two backend test flakes (#64782)
* Fix extract-nested-efficient-test flake

* Fix health-check-database-test flake
2025-10-17 00:23:49 +03:00
Oleksandr Yakushev
dddf6568c1 [util] Implement Seqable for rconcat to avoid crashing CIDER (#64656) 2025-10-16 23:12:59 +03:00
Alexander Polyankin
9fd8200087 Convert DataModel queries to MBQL lib (#64633) 2025-10-16 15:16:37 +00:00
Uladzimir Havenchyk
a9c06c5ece chore: speed up frontend build with upgrade of postcss plugin (#64670)
* speed up frontend build

* fix tests

* deduplicate

* add a comment

* deduplicate
2025-10-16 14:52:00 +00:00
Uladzimir Havenchyk
0a2aa0f087 deps: move html2canvas to a separate bundle (#64708) 2025-10-16 17:02:11 +03:00
Marcos
f42ea9842a Add Marcos and Rodrigo to slack map (#64773)
* add rodrigo and marcos to github slack map

* chore: add marcos and rodrigo to github-slack-map
2025-10-16 10:33:49 -03:00
Jeff Bruemmer
448ed2d9e0 fix script link (#64767) 2025-10-16 13:47:03 +02:00
Nicolò Pretto
0bcd797755 disable excessive spam in the prs caused by sdk build (#64733)
* disable excessive spam in the prs

* to-revert: change source code to trigger the build

* test2

* :shrugs:

* Revert "to-revert: change source code to trigger the build"

This reverts commit 37f6abb085.

* clean up and comment
2025-10-16 10:22:05 +02:00
Kamil Mielnik
1a645a55d6 Fix flaky embedding-reproductions test (#64702)
* Fix flaky test

* Increase timeout

* Decrease flakiness

* Fix flaky test

* Try with cypress-iframe

* Decrease flakiness

* Pass selector arg

* Move line

* Add a wait

* Fix test

* Add comment
2025-10-16 07:28:41 +00:00
Romeo Van Snick
d1cb9336da Cancel sql transform preview (#64726)
* Allow canceling SQL transform preview

* Add repro for metabase#64474
2025-10-16 13:14:30 +11:00
John Swanson
f569537850 Fix the fixup-viz-settings hack (#64746)
This fixup broke because QP started returning the db-shaped
viz-settings (e.g. `:table.columns`) instead of the normalized
viz-settings (e.g.
`:metabase.models.visualization-settings/table-columns `) under
`[:json_query :viz-settings]`.

The existing test for this fix did not catch the regression because the
shape of viz settings was faked out for testing, and did not get
transformed like real viz settings. `{:ver 2}` stayed as `{:ver 2}`,
while `{:table.columns []}` is transformed into
`{::visualization-settings/table-columns []}`
2025-10-15 22:07:16 +00:00
John Swanson
392a3ebc48 uxw-1935: mark settings as set by env var (#64569)
A few settings weren't wrapped with `SetByEnvVarWrapper`, so weren't
marked as un-modifiable.
2025-10-15 09:00:37 -07:00
Alexander Polyankin
9e401daa2e Ignore BE exception when checking dependencies (#64716) 2025-10-15 11:36:54 -04:00
Kamil Mielnik
f67961423a Fix flaky documents test (#64711)
* Use H.visitDocument

* Revert

* Decrease flakiness

* Fix chaining

* Revert

* Remove redundant within

* Fix
2025-10-15 17:06:03 +07:00
Kamil Mielnik
a4564a2e12 Unskip and update calendar test + fix date range picker text inputs not in sync with calendar inputs (#64603)
* Fix date range picker text inputs not in sync with calendar inputs (#64602)

* Unskip and update test

* Add repro for #64602

* Add unit tests

* Add issue tags

* Rename date to displayedDate
2025-10-15 05:49:47 +00:00
Alexander Polyankin
0cf0d86421 Deprecate fields in Question.create that are used to manipulate raw MBQL (#64715) 2025-10-15 02:20:50 +00:00
Alexander Polyankin
309e69774e Fix caching with drills (#64723) 2025-10-14 21:49:55 -04:00
Alexander Polyankin
5a880ebfb8 Use MBQL lib for table editing (#64722) 2025-10-14 20:50:33 -04:00
Nemanja Glumac
645543ff3e Remove deprecated radio form (#64679)
* Update the last instance of deprecated `FormRadioWidget`

This commit replaces a deprecated `FormRadioWidget` with the
`FormRadioGroup` component (which is a light wrapper around
the plain Radio.Group from Mantine).

* Remove the deprecated `FormRadio` component
2025-10-15 00:05:35 +02:00
Uladzimir Havenchyk
4b1ee493db chore: use standard colors for skeleton (#64588) 2025-10-14 19:36:38 +00:00
Alex Yarosh
db08e23530 docs: new place for alerts (#64688)
* Revise alert creation instructions in documentation

Updated instructions for creating alerts, including clearer steps and options for different alert types. Adjusted formatting for consistency and added details on editing and managing alerts.

* Enhance clarity in delete and restore documentation

Updated the documentation for deleting and restoring items to clarify the impact on related content and improve phrasing.

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-14 16:45:49 +00:00
Jeff Bruemmer
d5131a98f6 Update iframe resizer script source in documentation (#64718) 2025-10-14 15:46:28 +00:00
Brad Anderson
4f99d70ece UXW-88 Fixed issue where Show values for this series switch is hidden because of the default value for show_stack_values (#64691) 2025-10-14 11:24:04 -04:00
Nick Fitzpatrick
ed772da268 Dark mode Day 2 patches (#64549)
* lots of small fixes

* removing debug code

* adjusting e2e

* small adjustments

* whoops
2025-10-14 15:56:25 +02:00
Kamil Mielnik
1d88be2135 Refactor - Organize TablePicker (#64617)
* Move EmptyState, Search, and Tree to separate files

* Move hooks and constants out of utils

* Move components to a separate directory

* Fix import
2025-10-14 13:42:53 +00:00
Kamil Mielnik
d825953952 Fix flaky tests (#64700) 2025-10-14 17:31:52 +07:00
Kamil Mielnik
bf5799df15 UXW-311 [Sheets] Clicking notification should refresh the page (#64614)
* Fix UXW-311

* Add unit test

* Add tag
2025-10-14 09:23:23 +00:00
Kamil Mielnik
d5addc4c59 Fix flaky models/reproductions test (#64677)
* Fix flaky test

* Update e2e/test/scenarios/models/reproductions.cy.spec.ts

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

* Update e2e/test/scenarios/models/reproductions.cy.spec.ts

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

* Update e2e/test/scenarios/models/reproductions.cy.spec.ts

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-10-14 07:16:01 +00:00
Kamil Mielnik
fe858b408a Fix flaky onboarding/command-palette test (#64678)
* Fix flaky test

* Update comment
2025-10-14 13:30:27 +07:00
Kamil Mielnik
9c48cd347a Fix flaky test (#64681) 2025-10-14 13:30:19 +07:00
Kamil Mielnik
922845855d Fix command palette keyboard shorcut overflow on non-macs (#64606) 2025-10-13 19:54:43 +00:00
Nemanja Glumac
963be74964 Remove deprecated Lib.displayName (#64647) 2025-10-11 17:32:19 +02:00
William
062ba25fe8 add default noop implementation of native-query-deps (#64384)
We call native-query-deps on query save on mongo queries. This ensure that doesn't error, while still flagging if we don't implement native-query-deps for a driver that is supposed to support it.
2025-10-10 17:34:36 -05:00
Alex Yarosh
7d2275e326 docs: details view (#64645)
* details view

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-10 20:53:08 +00:00
dpsutton
db11feef9b use disk at query time of notification payload creation (#64390)
* use disk at query time of notification payload creation

We have some nice work to dump query results to disk if they are larger
than a row-count threshold. But this presupposes that results can fit
into memory. It's completely possible, and relatively easy, to do some
kind of "select *" operation in a dashboard where the only limit that
prevents billions of rows coming back is the excel limit we add in.

This tries to optimistically use the disk. If creates a new rff that has
two modes: in-memory and a gzipped dataoutput stream. The first is in
operation for the first 2,000 rows. If we never exceed this limit it
remains a regular reducing function. Once this threshold is exceeded, we
open a new file and stuff the rows in there and don't keep them in
memory any longer. This prevents us from having to hold the entire
result set in memory at once.

On the consumption side, we have a threshold such that if a file is
_larger_ than this, we won't attempt to load it and render it for static
viz. This is what lets us defensively decline to do an operation that
would reasonably lead to an OOM.

Optimizations for the future:
- give up on file creation once it exceeds the threshold size. We can
easily monitor the size of the file as we go and stop the transduction
or results.
- clear out files more frequently. This will probably litter lots of
temp files, some possibly quite large, on teh disk. We need to more
frequently clear them up. The directory is marked as deleteOnExit, but
we need to ensure we don't put lots of files in there during process
lifetime.
- better error rendering of "too large" error. Right now it hits the
default error rendering (previously it would oom). We can make this
better.
- explore how parallel we can get now. Presumably we are now quite
memory effecient. Can we go back to 3, or 10, worker threads?

* fix typo and reintroduce constant for row threshold

* more references to typo constant

* missed one somehow?

* include pulses (alerts) for autocommit off for downloads

we want to stream results. and now we do into a file so this can respect
the page size which only happens in pg when using autocommit false

* special error msg for too large results/dont attach large results

feedback that query results were too large

alerts also by default include results. let's check for the
render/too-large and not include them in that case. Was actually getting
a seq error on the deftype that holds the file. maybe want to give that
a seqable method?

* fix tests

we had an unrealized temp storage file going through

* unification all to streaming before moving to temp-storage

* move streaming to the temp-storage namespace

* don't deref results if no one wants attachments

* don't log the error here. it's pretty normal

* doc strings

* better logging and truncate results above threshold

once we are above the size that we won't read the file, we don't have to
keep piping results to it.

Concretely, what does this get us? If someone absentmindedly did
`select * from transactions` it could be 100s of GBs or more. Without
this, we would fill up the disk for the instance even though we don't
try to render it in the email. But once we know that there's no way we
will read the contents of the file, we really don't have to write to it
any longer.

* Make settings for size limit and whether to enforce

maybe someone has a beefy machine and they don't mind chugging through
843mb of query results to get a graph. they can easily set
`MB_ENFORCE_NOTIFICATION_TEMP_FILE_SIZE_LIMIT` to false and the old
behavior will be restored. If someone doesn't like the 10mb limit and
prefers a 50mb limit they can do
`MB_NOTIFICATION_TEMP_FILE_SIZE_MAX_BYTES=52428800` and then they will
have the higher limit

* Huge performance improvements

The real gist here is removing the gzip on the output. This was crushing
our performance. 18 seconds instead of ~4 seconds. Real bad. And it's
better to not gzip anyways. We really want to be tied pretty closely to
the size of the results. GZiping uses a ton of cpu and gets it very
compact. But we want a number that is pretty representative of the
results. Repeated values get gzipped down to almost nothing and then
they could still OOM the instance. But 50mb of results might get
squashed down to ~8mb of text. We want to be tethered close the size in
a csv or in memory.

Also changed the serialization to write chunks of rows and not a single
row. Its totally possible that the gzip fix did all of the work and
chunks or individual rows all get put together into the
bufferedoutputstream so it doesn't matter anyways. But the good thing is
that the format of this file is entirely the work of this namespace and
no one else gets to see it.

* Check for fidelity of regular results and disk based

timing wise: running the same card 356 (a join of people, products,
orders) and verify timing stays consistent (we are only 100ms longer
with disk)

```clojure
temp-storage=> (time
                 (-> (toucan2.core/select-one-fn :dataset_query :model/Card :id 356)
                     metabase.query-processor/process-query
                     :data :rows count))
"Elapsed time: 740.709583 msecs"
18760
temp-storage=>
(time (->
        (metabase.notification.payload.execute/execute-card 1 356)
        :result
        (select-keys [:notification/truncated?
                      :status :running_time
                      :data.rows-file-size
                      :data])
        (update :data (fn [d] (select-keys d [:rows])))))
"Elapsed time: 840.608 msecs"
{:status :completed,
 :running_time 724,
 :data.rows-file-size 8056845,
 :data {:rows #object[metabase.notification.payload.temp_storage.StreamingTempFileStorage
                      "0x3336077d"
                      {:status :pending, :val nil}]}}
```

Compare in memory results:

```clojure
temp-storage=> (let [card-id 356
                     regular-rows (-> (toucan2.core/select-one-fn :dataset_query :model/Card :id card-id)
                                      (metabase.query-processor/process-query)
                                      :data :rows)
                     disk-rows    (-> (metabase.notification.payload.execute/execute-card 1 356)
                                      :result :data :rows)
                     dereffed @disk-rows]
                 (doseq [[f results] [["/tmp/results.from-disk" dereffed]
                                      ["/tmp/results.from-qp" regular-rows]]]
                   (with-open [w (clojure.java.io/writer f)]
                     (doseq [row results]
                       (io/copy (str (pr-str row) \newline) w))))
                 [(= regular-rows dereffed) (= (count regular-rows) (count dereffed))])
[true true]
```

and then compare the files written above:

```shell
/tmp
❯ diff results.from-disk results.from-qp

/tmp
❯ echo $?
0
```

* weird postgres types

* postgres 12 didn't like gen_random_uuid so just hardcode one

everyone else promised they wouldn't use
7e3cd49d-bfe1-4620-83dd-0c163719175c for anything important

* formatting, lints

* alignment

* reformat, remove unused aliases

* remove errant comment

* cleanup logic and add some comments

unconditionally add to rowcount and in-memory collection of rows. For
two of three branches, this is "done": (1) collecting in memory, and (2)
streaming to disk but our "batch" isn't full. Only when the batch is a
multiple of 5,000 rows (number completely picked at random, balancing
this) we can then write the row block to disk.

Totally possible this can switch to just writing to disk on each row and
rely on the buffered writer to handle batching. But the use of the
in-memory collection being similar across almost all of the branches
makes this solution feel a bit cleaner for the moment.

also does things like inverting `if-not` so the short branch is at the
top and not hanging at the end where it's esay to miss.

* unify two file size settings

used to have some notion of `enforce` and `file-size-limits` Rather than
juggle both, you can just set the filesize to 0 to make it unbounded

* reuse human-readable-size in more places, fix some typos

* typos, fixes

* prometheus metrics

* followup to metrics

I’ve added a new metric
```clojure
   (prometheus/counter :metabase-notification/temp-storage
                       {:description "Number and type of temporary storage uses"
                        ;; memory, disk, above-threshold, truncated, not-limited
                        :labels [:storage]})
```

to record the different scenarios of query results:
- stayed in `memory`
- wrote them to `disk` but remained under the threshold
- wrote to disk and they went `above-threshold`
- wrote to disk and they went so far above threshold that we abandoned the query so the results were `truncated`
- wrote to disk but the limit was set to 0 so the results were `not-limited`

and these look like: (replaced # with ♯ so git message will include)

```
❯ http get :9191/metrics | grep temp
♯ HELP metabase_notification_temp_storage_total Number and type of temporary storage uses
♯ TYPE metabase_notification_temp_storage_total counter
metabase_notification_temp_storage_total{storage="memory",} 2.0
metabase_notification_temp_storage_total{storage="disk",} 2.0
metabase_notification_temp_storage_total{storage="truncated",} 2.0
```

* make predicates a bit more clojurey

* missed a refactor somehow

* better styling

thread the human readable size through

* styling changes

* bit of formatting

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-10-10 14:35:02 -05:00
Nicola Mometto
9abc92f46e fix: don't take from nil chan (#64589) 2025-10-10 19:20:36 +00:00
dpsutton
74e8f41ff0 turn off some more tests [ci skip] (#64640)
i’m turning off a few tests:

- "metabase-enterprise.transforms-python.transforms-api-test/python-transform-schema-change-integration-test" this
fails in redshift as seen here: https://github.com/metabase/metabase/actions/runs/18413981334/job/52473134679?pr=64390
cc @querying-be

- "metabase.warehouses.api-test/can-rescan-fieldvalues-for-a-db" as seen here:
https://github.com/metabase/metabase/actions/runs/18413981334/job/52473134684?pr=64390

- "metabase.warehouse-schema.api.table-test/update-table-sync-test" as seen here:
https://github.com/metabase/metabase/actions/runs/18413981334/job/52473134684?pr=64390 (same run)
2025-10-10 13:44:15 -05:00
Alex Yarosh
9a192e68de Revise embedding guide and emphasize user accounts (#64637)
Updated the embedding instructions and added a note on user accounts.
2025-10-10 18:31:10 +00:00
Alex Yarosh
5171f664bb doc: Add local currency label style (#64636)
* Add currency label style options to formatting.md

Added options for displaying currency labels in the formatting section.

* Clarify currency label style options

Updated the currency label style section to clarify options for displaying currency labels, including examples for Canadian dollars.

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-10 18:28:03 +00:00
Maz Ameli
763e923003 Follow-ons to dashboard chart improvements (#64308)
* subtler background lines on cartesian charts

* increase font size on cartesian charts and legends to 13px

* improve size and spacing of legends for pies and choropleths

* change legend color to text-primary

* change case and color of pie chart center subtext

* change small funnel text to 13px

* tweak the number of y-axis tick marks when set to auto for small charts

* Update Loki Snapshots

* Update Loki Snapshots

* update specs, polish

* specs

* specs

* cleanup

* Update Loki Snapshots

* subtler background lines on cartesian charts

* increase font size on cartesian charts and legends to 13px

* improve size and spacing of legends for pies and choropleths

* change legend color to text-primary

* change case and color of pie chart center subtext

* change small funnel text to 13px

* tweak the number of y-axis tick marks when set to auto for small charts

* Update Loki Snapshots

merge in updated loki tests

* update specs, polish

* specs

* specs

* cleanup

* Update Loki Snapshots

merge master's loki snapshots

* Update Loki Snapshots

* update be specs

* move border-subtle definition from colors.module to colors.ts

* table border color fixes

* fix overly thick dashboard heading border-bottom

* Cursor's attempt at fixing related tests

* Cursor again attempts to fix tests

* specs

* cleanup

* another attempt to fix specs

* Update Loki Snapshots

* fix cartesian chart and pivot table lines in dark mode

* Update Loki Snapshots

* attempt to fix chart test

* spec

* unrelated test fix but I need to merge this PR

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2025-10-10 11:13:29 -07:00
Alex Yarosh
02cd142074 docs: command palette update (#64634)
* command palette update

Updated keyboard shortcuts for opening the chat sidebar in Metabot documentation.

* Simplify custom action creation instructions

Removed instructions for creating a custom action from the command palette.

* Update appearance settings reference to 'Branding'

* Remove Metabot reference from exploration.md

Removed mention of asking Metabot in the exploration section.
2025-10-10 13:48:54 -04:00
Alex Yarosh
30e330a409 docs: ch transforms only for ch cloud (#64632)
Specify that ClickHouse transforms are only available on ClickHouse Cloud.
2025-10-10 13:29:21 -04:00
Alex Yarosh
43c6d9a938 docs: dark mode (#64534)
* dark mode

* Update docs/configuring-metabase/appearance.md

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* Update docs/people-and-groups/account-settings.md

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* Apply suggestions from code review

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

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-10 16:58:43 +00:00
github-automation-metabase
1c747783e1 Update generated docs (master) (#64597)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-10 12:52:43 -04:00
Nicola Mometto
26e8fd90ed fix broken schema for python transforms (#64625) 2025-10-10 17:39:25 +01:00
Robert Kosara
7b47ae9236 Add boolean keywords to filters and expressions docs (#64592)
* Add 'boolean' to filters page

Added boolean expressions support to custom filter documentation.

* Add boolean keywords to expressions doc

Updated section on conditional operators to include comparison and boolean logic operators.

* Fix anchor so old links work

* Fix missing period

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

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-10-10 16:36:48 +00:00
Nicolò Maria Mezzopera
d0cca704c6 Update GitHub team configuration (#64558)
* chore: update github team

* chore: remove team members from other teams
2025-10-10 16:23:42 +01:00
Uladzimir Havenchyk
dd2effb8f4 actual fix for infinite loop (#64612) 2025-10-10 14:53:28 +00:00
Edward Paget
0c93082c71 fix: ns for metadata provider cache (#64620) 2025-10-10 09:21:30 -05:00
Nicolò Pretto
49152f6a36 Make the e2e create a copy of the sample db, so it doesn't run into locking issues with core app (#64120)
* poc of allowing us to run the backend and the e2e at the same time

* use more scary name as suggested
2025-10-10 15:45:03 +02:00
Braden Shepherdson
21e9d33c66 [MBQL lib] Use :between filters for bucketed time fields (#64218)
When using the `underlying-records` drill ("See these Orders") on a bucketed temporal value, such as a data point in
a time series, use a `:between` filter with the endpoints of the bucket, rather than `:=`.

The queries work with `:=` (because the QP expands them to `:between`) but some parts of the filter UI
render it badly. With `:between`, the filter is rendered properly as a date range.
2025-10-10 13:37:42 +00:00
Braden Shepherdson
eb33b4991e [perf] Cache MetadataProviders for /dashboard/1/params/abc/values (#64541)
Fixes QUE-2651.

Use `lib-be.metadata.jvm/with-metadata-provider-cache` to avoid a pile of duplicate calls to
appdb while hydrating the dashboard.
2025-10-10 13:17:38 +00:00
Uladzimir Havenchyk
92a67eb3b7 skip tests broken after #63913 (#64611) 2025-10-10 07:59:32 -05:00
Jakub Chodorowicz
35f1f1903d Make Metabot logo gray when brand color customization is defined (#64566)
* Make Metabot logo gray when brand color customization is defined

* Add MetabotLogo stories and test them with Loki

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>

---------

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>
2025-10-10 14:37:51 +02:00
Timofey Kachalov
070963f9f9 Allow run-query overlay when query result has missing-required-parameter error (#64521) 2025-10-10 13:30:35 +04:00
Nicolò Pretto
3de66a09e8 tests(sdk): add tests for new mapQuestionClickActions behaviors (#64523) 2025-10-10 10:01:10 +02:00
Kamil Mielnik
6ab4cca8f2 DSN-79 In questions and metrics, Alerts shouldn't be within Sharing menu (#64510)
* Move QuestionAlertsMenuItem usage QuestionSharingMenu to QuestionMoreActionsMenu

* Fix divider logic

* Fix bogus skipToken usage

* Exclude models and some cases

* Add more permission checks

* Move QuestionAlertsMenuItem

* Fix permissions check

* Move unit tests

* Inline setup

* Move tests

* Fix modal situation

* Fix invalid export

* Rename dir

* Update onboarding

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Change order
2025-10-10 12:54:52 +07:00
Mahatthana (Kelvin) Nomsawadi
27d6352a93 Fix value between optional parameters without values not visible (#64550) 2025-10-10 04:56:37 +01:00
Fraser
b12bc41d58 Delete e2e Save modal test (#64350) 2025-10-10 15:48:35 +13:00
Fraser
14f4f37e34 Delete skipped relative time-view-rendering e2e test (#64499) 2025-10-10 15:48:10 +13:00
Fraser
accf8b0b06 Delete skipped filters repro e2e test (#64495) 2025-10-10 15:47:39 +13:00
Marcos
376daff947 fix transforms snippet sidebar add/edit button (#64575) 2025-10-09 18:00:00 -03:00
dpsutton
73d896e661 remove extra pg driver tests (#64581)
* remove extra pg driver tests

it is already covered in

```yaml
  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
            test-args: >-
              :only-tags [:mb/driver-tests]
            exclude-tag: ':mb/transforms-python-test'
```
.github/workflows/drivers.yml

* empty commit to run full drivers test suite
2025-10-09 15:01:11 -05:00
Uladzimir Havenchyk
4260236d61 chore: drop deprecated time handling utils (#64380)
* chore: drop deprecated time handling utils

* fix tz jest tests
2025-10-09 22:53:58 +03:00
lbrdnk
97df7676bd Catch errors in suggested prompts job (#64520)
* Catch connection error in suggested prompts job

* Rather catch any Exception
2025-10-09 21:51:11 +02:00
Cam Saul
1a73c0ac20 MBQL 5 over the wire (#63913)
* Misc Lib improvements

* Restore deleted function... for now

* N+1 hydration fix

* Update tests

* Test fix 🔧

* Mark more stuff in Legacy MBQL utils as deprecated

* Use Lib for query->source-card

* Update modules config

* Update tests 🔧

* Fix the X-Rays

* Test fix (Druid)

* Druid test fix 🔧

* Appease Kondo

* Normalize Card.dataset_query to MBQL 5

* Cleanup

* Some test fixes 🔧

* Fix tests in the parameters module

* Fix 2 more tests

* Fix most of the Dashboard tests

* All Dashboards tests passing

* Another pass: all tests in parameters module are passing again

* cljfmt

* Kondo

* Kondo

* Revert X-Ray changes

* X-Rays WIP

* Finally all X-Rays tests passing

* Kick CI

* People are writing new code doing legacy MBQL manipulation 😒

* I think everything is working now except for SerDes v1

* Test fixes 🔧

* Handful of test fixes 🔧

* Another test fix 🔧

* Kool fixes; delete SerDes v1

* I think I fixed all the failing tests

* Some Kondo fixes 🔧

* Maybe I fixed everything

* Ready to try CI again

* Restore accidentally-deleted namespace

* Fix almost all my complaints with #63248

* Commit lib-be.hash

* Test fixes

* Another test pass

* Kondo warnings

* Kondo (second pass)

* Fix stray parameter

* Test fix 🔧

* parameters.schema needs to be cljc

* Test fixes 🔧

* Test fixes 🔧

* Another round of test fixes 🔧

* cljfmt

* Kondo

* clj-kondo and cljfmt

* .clj => .cljc

* Fix cljs

* Test fixes 🔧

* Test fixes 🔧

* Add queryToJs() and jsToQuery()

* MySQL test fixes? 🔧

* Schema fix 🔧

* PR feedback

* Add DB migrations

* Support fetching legacy queries

* Init metadata provider cache automatically

* Fix migration

* Fix migrations (again)

* Oops check in missing file

* cljfmt, kondo, test fixes 🔧

* Fix build

* Fix MongoDB table-rows-sample

* Fix search for MySQL

* Appease FE linter

* Fix for internal queries

* MongoDB fix 🔧

* Update JS <=> Cljs query functions to take MP

* cljfmt

* Initial FE changes

* Initial FE changes

* Initial FE changes

* Initial FE changes

* Update FE helpers

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Hack

* Fix formatting; normalize before calling lib/query

* Fix for REAL

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix parameters substitution for JS parameter maps

* cljfmt

* Add note

* HACK

* Fix test

* Fix

* Another parameter normalization fix

* Remove X-Rays error

* X-Rays cleanup

* Additional validation for normalizing queries

* Fix

* Fix

* Fix metadata for empty Cards

* Fix

* Fix normalizing :lib/original-binning in :field refs

* Fix

* Correctly normalize MBQL 5 Metric definitions coming from JSON

* Fix

* fromJsQuery should throw on empty queries

* Fix test failure

* Fix

* Fix

* BE test fixes 🔧

* Fix

* Fix more backend tests; Kondo

* Fix

* Allow `=` in X-Rays REST API paths for now

* Fix

* Fix

* Fix

* Set card_id: null for actions

* Fix parameter mappings with card_id = -1

* Set card_id: null for actions

* Remove :lib/original-binning in underlying records drills

* Fix

* Fix

* Misc code cleanup

* Fix transform dependencies native validation

* Fix normalization of template tag :options

* Fix template tag schema

* Improved error message for FK details drill

* Minor tweaks

* Code cleanup

* Thank you Claude bot

* Fix Kondo from #64098

* Fix CLJS test

* Fix CLAUDE.md

* Fix

* Fix

* Don't stomp on valid database IDs with empty ones

* Fix

* Make lib.js/query= work on either JS or Cljs/MBQL 4 or 5

* Fix

* Fix

* Restore normalize

* Restore normalize

* Fix Cljs query caching

* Fix query hash

* Simplify fromJsQuery

* Restore test

* Fix cache

* Fix template tag ordering

* Fix cache issue FOR REALS

* Include batshit amount of nonsense in implicit actions viz settings fields

* Test fix 🔧

* Fix

* Fix

* Fix

* Fix with-template-tags not filtering out invalid tags

* Fix test failure

* Fix

* Fix

* Fix

* MySQL fix deadlocks in tests

* Restore throw code

* Oops

* Rollback connection changes and de-parallelize X-Ray tests

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-10-09 14:45:36 -04:00
Edward Paget
3cf2372445 fix: test log names need to be unique (#64577)
* fix: test log names need to be unique

* fixup! name of var
2025-10-09 18:39:20 +00:00
Braden Shepherdson
023de6e2d1 [QP] Don't remap FKs to their human-readable column if it's hidden (#64435)
Fixes QUE-2561

For example, in our Sample Database, `Orders.PRODUCT_ID` is remapped to
`Products.TITLE` by default. If you go to the **Table Metadata** in admin
and set `Products.TITLE` to "Do not include"
(which is `:visibility-type :sensitive` internally) it should not be
used for remapping.
2025-10-09 13:33:33 -04:00
Jakub Chodorowicz
cda1d6cd46 Uxw 231 auto scroll to selected entity picker item vertically (#64459)
* Add useEffectOnceIf hook

* Fix entity picker list not scrolling to chosen element

* Remove explicit dependencies

* Move useEffectOnceIf to VirtualizedList folder
2025-10-09 18:09:33 +02:00
Cam Saul
5e14ec7894 Skip Claude code review on draft PRs (#64574) 2025-10-09 16:02:48 +00:00
Cam Saul
46a869e3a4 Further restrict Claude PR review code action generated GH token perms (#64527) 2025-10-09 08:58:59 -07:00
metamben
9b0bfe3815 Fix base-type inference in pivot queries (#64472)
* Fix base-type inference in pivot queries

Fixes #64124
2025-10-09 17:30:00 +03:00
Kamil Mielnik
c291a439a5 Allow to opt out specific PR authors from claude-code-review GitHub workflow (#64554)
* Allow to opt out specific PR authors from claude-code-review GitHub workflow

* Exclude more users
2025-10-09 21:09:00 +07:00
dpsutton
5ce301dec0 bump netty common and buffer to 4.1.124.Final (#64537)
We had tried this previously, but the athena driver has these libraries
uberjar'd into it. So we need this to be in lockstep. See
https://github.com/metabase/metabase/pull/63894 for more info.

but i'll include some info here:
there are two copies on the classpath:

```clojure
user=> (enumeration-seq (.. (Thread/currentThread) getContextClassLoader (getResources "io/netty/buffer/ByteBufAllocator.class")))
(#object[java.net.URL 0x3bb34fe "jar:file:/private/tmp/fixed-athena/plugins/bigquery-cloud-sdk.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"]
 #object[java.net.URL 0x4ac1867d "jar:file:/private/tmp/fixed-athena/plugins/athena.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"])
```

one in the bigquery driver jar and one in the athena driver jar. The
bigquery driver jar has an explicit dep and we can control it
independently. The athena jar has it uberjar'd in and we can't control
it independently. So we want to make sure that we are relying on the
version that is (unfortunately) baked into athena.

For this we can see the athena 3.6.0 jar has the following
pom.properties file:
`META-INF/maven/io.netty/netty-buffer/pom.properties`

```properties
artifactId=netty-buffer
groupId=io.netty
version=4.1.124.Final
```

So we will pin that version in bigquery as well so we only have a
single version (but still two copies) on the classpath.

This way whichever classfile is resolved (and this can vary depending on
whether an athena db or bigquery db is synced first, or health checked)
it should behave the same
2025-10-09 08:04:06 -05:00
Phoomparin Mano
cc2991b4b3 Use non-whitelabeled blue color for Metabase logo (#64524) 2025-10-09 19:45:36 +07:00
Marcos
b9f1682706 Fix long snippet names overflow (#64469)
* fix long snippet names overflow

* add percent width so it uses most space both in SQL models and SQL editor

* fix sidebar width in transforms page

* for SnippetRow, use flex instead of width percentages, fix collection row

* fix snippetrow background so it expands snippet instead of inserting it into the editor
2025-10-09 09:35:16 -03:00
github-automation-metabase
e33d81c3e9 Update generated docs (master) (#64546)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-09 08:25:12 -04:00
Kamil Mielnik
26edf3c9dd Hide shallow copy checkbox instead of disabling it (#64559) 2025-10-09 12:05:37 +00:00
Oleksandr Solovyov
af0b621eeb [serdes] do not say "Loading ..." if entity is not being loaded (#64461)
When investigating a separate issue I've noticed that we're logging "Loading ..." even for entities that are not actually being loaded. That's because we were printing this line when something is a dependency - even if it exists in the database and is not provided in the export.

This changes the approach somewhat, we will still have some indication we need some entity, but only at DEBUG level, and instead the "Loading ..." will appear only if we're genuinely about to read something from an export and put it in the database.

Not only it's easier to understand what's going on, it's going to be way less noisy.
2025-10-09 14:22:14 +03:00
Uladzimir Havenchyk
7c1f6a0e5f Command palette and search modal revamp (#64364)
* WRK-903 Update command palette modal (#64039)

* Remove metabot from command palette

* Remove footer

* Style search input

* Icon color

* Remove actions section when there is no search query

* Rename 'recent items' to 'recents'

* Show 10 recents by default

* Style item

* Update copy (Search results -> Results)

* Use project react import convention

* Move link to search results to group header

* Close palette on results link click

* Fix types

* Use disabled prop in useCommandPalette

* Update item bg

* Align search icon

* Update color whem is active

* Update table icon

* Fix wrong item being selected

* Use stack

* Fix icons shrinking

* Hide subtext on overflow

* Update unit tests

* Fix types

* Clean up

* Hide actions in a different way

* Update helper

* Remove redundant changes

* Update unit tests

* Update unit tests

* Update helper

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update tests

* Add a border to search input

* Update test

* Simplify text overflow handling

* Avoid parent().parent()

* ESLint

* Improve assertion

* Improve assertion

* Remove borders between result groups in command palette

* update styles of the app bar (#64105)

* update styles of the app bar

* rework profilelink to ts

* fix some tests

* fix another e2e test

* update search style

* fix shortcuts conflict

* unify search buttons between oss and enterprise

* don't translate metakey

* fix colors

* let's have two keydown handlers

* fix test

* fix typecheck

* address review comments

* fix showplow event in test

* show metabot icon on small screens

* fix test

* do not show metabot button within iframe

* attempt to fix flaky test

* lint

* address review comments

* address review comments

* add a unit test

* update colors

* address comments

* update skeleton

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-10-09 12:34:46 +03:00
Phoomparin Mano
913bb086c3 Password reset should show confirmation toast (#64522) 2025-10-09 15:32:10 +07:00
Nicolò Pretto
5c3726248f feat(sdk)!: allow mapQuestionClickActions to run actions on click and clean the data we pass (#64425)
* support returning one action with "onClick" to call it immediately

* feat(sdk): add question to the clicked object, part of EMB-796

* feat(sdk): clean up the data we pass as `clicked`, part of EMB-796

makes export types checker happy

remove source

* add stories

* only require `onClick` for the "immediate" actions

* address feedback: fix type of onClick and add warning in case of wrong
shape
2025-10-09 10:28:06 +02:00
Timofey Kachalov
9c2513eb29 Set min width for DashCardActionsPanelContainer to fit content (#64525) 2025-10-09 11:42:17 +04:00
Cam Saul
c2515e7921 Remove rules about number of semicolons, Claude cannot understand them. (#64547)
* Remove rules about number of semicolons, Claude cannot understand them.

* Restore the docstring indentation rule
2025-10-09 05:59:47 +00:00
Cam Saul
0ee3c2ffae Make claude code review bot delete old comments (#64544) 2025-10-08 23:40:29 -06:00
Alex Yarosh
c0a07d369c docs: emphasize revoking SQL access for some permissions (#64539)
* docs: emphasize revoked SQL access for some permissions

Clarified permissions regarding native queries in Metabase.

* Update docs/permissions/data.md

* Update docs/permissions/data.md

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-08 17:19:53 -04:00
Edward Paget
5eed781367 allow cc review to be skipped (#64538)
* allow cc review to be skipped

* Update .github/workflows/claude-code-review.yaml

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>

* trying to retrigger when labels change

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-08 16:15:45 -05:00
Uladzimir Havenchyk
bbd050dd95 chore: replace moment with dayjs in time series (#64451)
* chore: replace moment with dayjs in time series

* create a util file

* add a note

* add tests

* update naming
2025-10-08 21:03:24 +00:00
Nick Fitzpatrick
00d21cf20d Fixup of Erroring Questions page (#64119)
* Fixing rerun selected functionality

* Commenting Props
2025-10-08 16:49:14 -04:00
Ryan Laurie
d4eee39154 Misc Dark Mode Fixes 1 (#64484)
* alert colors

* undo text color

* better modal contrast

* Update Saturated Yellow color, Update collection authority form picker

* tooltip secondary color

* Emoji picker transparancy

* make-yellow-not-💩

* fix types

* Update Loki Snapshots

* add border to ye olde model

* cleaning up after nick again

* Alert color and type adjustments

* dashboard autoconnect toast styling

* entity-picker e2e

* Update Loki Snapshots

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-08 16:07:50 -04:00
Alex Yarosh
371b2c2081 docs: python transforms (#64518)
* python transforms

* link

* Apply suggestions from code review

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

* feedback

* more feedback

* Apply suggestions from code review

* links

* Apply suggestions from code review

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-08 18:59:43 +00:00
Alex Yarosh
a48352c7c6 Update date format examples in formatting.md (#64530) 2025-10-08 14:38:41 -04:00
Cam Saul
dcef144251 Claude code review (experimental) (#64487)
* Claude code review (experimental)

* Run my job PLEASE!

* Fix syntax

* More guidelines

* Minor change to see if we can get some useful feedback

* Seriously run my damn workflow

* Add GH token

* Remove paths

* Appease Claude

* Tell Claude how to get the Clojure Style Guide

* Attempt Clojure style guide again

* Give Claude ReadFile perms for the style guide

* Move info about community style guide to CLAUDE.md

* Try again

* Another pass

* Seriously please follow Community style guidelines

* More advice.

* LEARN ABOUT TEST NAMING CLAUDE!!!!

* More advice

* Appease Kondo

* I have a lot to say I guess

* Iterate on CLAUDE.md

* Clarify module linter cheating rule

* CLAUDE u iz dumb

* Chaos

* Dumb as a rocc

* EVEN. MORE. GUIDELINES.

* Clarify semicolon rules more

* Threaten our AI overlords

* Are you dense?

* Annoyed

* BE SUPER DUPER EXPLICIT

* Fun time

* fun

* More dumb comment examples

* Clarify defmethod rules

* SERIOUSLY!!!

* I don't think Claude can count

* More examples of what to avoid

* U not listening

* Clarify

* Use emojys

* Parens

* Be. Even. More. Explicit. About. Semicolons.

* Be SUPER EXPLICIT

* Clarify

* Discourage `qp.store/with-metadata-provider`
2025-10-08 16:32:41 +00:00
Phoomparin Mano
2333182a53 fix(sdk-bundle): missing hover text color in summarization/grouping menus (#64515) 2025-10-08 21:50:05 +07:00
lbrdnk
c12d988306 Revert "Ajust e2e runner options (#64377)" (#64516)
This reverts commit 2375d46cbb.
2025-10-08 14:49:18 +00:00
github-automation-metabase
d19bc1dde6 Update generated docs (master) (#64498)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-08 09:42:16 -04:00
Noah Moss
463ab32c31 Fix Firefox bug where models are not clickable until after selecting & unselecting text (#64491) 2025-10-08 09:29:47 -04:00
Timofey Kachalov
c6f8933e3e Extract SDK bundle error handling tests into a separate test suite (#64502) 2025-10-08 17:22:15 +04:00
Stas Gavrylov
f15ed1a734 WRK-907: [Bug][Data Editing] Do not offer to 'Add option' in FK fields (#64304)
* WRK-907: Remove 'create new' option from table action input for FK parameters

* Address PR comments

* Address PR comments

* Update e2e/test/scenarios/table-editing/table-editing.cy.spec.ts

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

* Apply suggestions from code review

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

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-10-08 14:06:48 +02:00
Oleksandr Solovyov
54b3ad3455 [search] make verified dashboards appear when filtering for "verified" (#64462) 2025-10-08 11:56:24 +00:00
Nicola Mometto
6da9f0a911 use qp directly rather than reaching for internals for python transforms (#64452)
* refactor: use qp directly rather than reaching for internals

* fix sleep test

* kondo

* fix: copy chan, else QP closes it
2025-10-08 12:49:54 +01:00
Nicolò Pretto
82aba4c51d rename tests folder to stories (#64455) 2025-10-08 10:31:38 +00:00
Kamil Mielnik
2dfdc3683b DSN-69 Smart Scalar charts in dashboards shouldn't overflow their card (#64285)
* Move SmartScalar subcomponents to separate files

* Update getValueHeight to support multiple comparisons

* Fix dashcard header height

* Fix overflow with cheap tactics

* Hide all but 1 comparisons if they don't fit

* Fix line height

* Move PreviousValueComparison to its own directory

* Extract DetailCandidate

* Extract VariationPercent

* Extract DetailCandidate

* Remove inTooltip prop in VariationPercent

* Add hidden comparisons to the tooltip

* Update constant

* Add ellipsis badge

* Do not use " • " as text separator

* Make tooltip text white

* Wrap text in the tooltip

* Fix text alignment

* Revert static viz change

* Add e2e test

* Update tests

* Update Loki Snapshots

* Remove separator in static viz

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-08 17:27:38 +07:00
Nicolò Pretto
be441ae625 refactor(sdk): move trasnformSdkQuestion (#64458) 2025-10-08 11:58:27 +02:00
Romeo Van Snick
70d8fda6fa Humanize error messages (#63235)
* Allow passing error/friendly in malli schema's to declare them to be be safe for users to see

* Add a user-friendly error message when aggregations don't contain aggregations

* Allow :error/message to be a thunk

* Add repro for metabase#61893

* Use deferred-tru for error message

* Remove deferred-tru
2025-10-08 20:18:15 +11:00
Phoomparin Mano
eae65a4980 fix(sdk-bundle): fallback and warn on invalid layout in MetabotQuestion (#64478) 2025-10-08 16:16:59 +07:00
Dan Stone
11856c2aea Transform cancellation test & fixes (#63833)
* Fix regression with :async? requests

- callbacks were not passed and clj-http would throw

* Fix data correctness issue if cancelled during table read

Fixes an issue where cancellation during the read stage
could cause the python run to receive (and output) truncated/empty incorrect data and write back / succeed anyway.

* Add cancellation test

* Give script a bit more time for CI

* Disable cancellation test for problematic drivers

* Also disable redshift

* Also disable mongo

* Fix regression due to merge conflict
2025-10-08 08:55:41 +00:00
Dan Stone
3f8edd52ce Add column names / ordering to test-run output (#64448) 2025-10-08 08:53:10 +00:00
Timofey Kachalov
e4cd459865 refactor(sdk, embed-js): Additional code preparations for Anonymous Embedding (#64457) 2025-10-08 12:44:16 +04:00
Oleksandr Solovyov
7ff2822811 disable comments in an iframe (#64098)
* disable comments in an iframe

* Remove comments from UI for embedded scenario

* Make isWithinIframe check external for CommentsMenu

* Add e2e test to check that comments are not available in embedded app

* Update Loki Snapshots

---------

Co-authored-by: stasgavrylov <stasgavrylov@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-08 10:28:01 +02:00
Oleksandr Solovyov
4e7e3f10bc pivot download: use source alias name for matching columns (#64192) 2025-10-08 11:21:23 +03:00
Fraser
46c6bcd677 Error a test that accesses unmocked routes (#64311) 2025-10-08 16:19:43 +13:00
Oleksandr Solovyov
42d5d4f442 make db removal somewhat more efficient (#64366) 2025-10-08 05:53:06 +03:00
Romeo Van Snick
9683555c34 Fix disappearing drill icon (#64228)
* Add missing class to ClickActionIcon

* Remove superflous transition

* Move ClickActionsTextIcon to css

* Move ClickActionControl to css modules and metabase/ui

* Tweak css to match prevouis button height
2025-10-08 10:07:52 +11:00
Aleksandr Lesnenko
734dabb163 propagate original card title and description to visualizer cards (#64340)
* propagate original card title and description to visualizer cards

* specs

* fix broken clicking
2025-10-07 22:34:50 +00:00
Jeff Bruemmer
1e5fba41ed remove docs workflows (#64486) 2025-10-07 20:58:12 +00:00
Jeff Bruemmer
7e9bc67b16 Clarify usage of triple braces in config.yml (#64481) 2025-10-07 19:59:29 +00:00
Phoomparin Mano
a822e1dd94 Temporarily remove tooltip loki tests for embedded questions to unblock ci (#64467) 2025-10-08 02:06:44 +07:00
Phoomparin Mano
9eb0ae7700 feat(embed-js): add the Metabot experience to embed wizard (#64388) 2025-10-08 01:07:30 +07:00
Noah Moss
8a4a4273a7 fix local test failure by sorting related_table ids in metabot tool response (#64464) 2025-10-07 15:41:55 +00:00
lbrdnk
2375d46cbb Ajust e2e runner options (#64377) 2025-10-07 16:53:18 +02:00
Noah Moss
4215b09ac7 Split fields returned to metabot for cards/models into core fields and related_tables (#64385)
* Split fields returned for cards/models into core fields and related_tables

* Update tests, and fix implementation to always include :related_tables

* typo

* fix kondo

* add separate with_related_tables flag to get-table-details API

* add test for new flag

* fix malli recursive schema

* add back query-needed?

* support related-tables when fetching table details as well, not just models

* add get-table-details-related-tables-test

* don't overwrite tyler's 404 fix
2025-10-07 13:59:40 +00:00
github-automation-metabase
be91884957 Update generated docs (master) (#64440)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-07 09:44:57 -04:00
Mahatthana (Kelvin) Nomsawadi
dae7df1c71 Fix long embedding test time (#64449)
* Fix long embedding test time

* Fix failed tests
2025-10-07 19:13:14 +07:00
Kamil Mielnik
8f037b0036 Add "Local symbol" option in "Currency label style" visualization setting (#64360)
* Extract lazy-evaluation of currencyMapCache to an iife

* Add getCurrencySymbolNative

* Add narrow symbol support

* Update unit tests

* Add test

* Add e2e test

* Fix issue with current value not being shown
2025-10-07 18:23:37 +07:00
Duarte Laia
0e247c2772 Fix #54317: Object detail navigation state doesn't reset (#55238)
* Fix #54317: Object detail navigation state doesn't reset
Added a verification that caps the selected object index.

* Fix #54317: Changed useState and reseted index.
Now using useEffect and reseting to the first index.

* Fix #54317: Added an e2e test

* Adjust test to new filters

---------

Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub@chodorowicz.com>
2025-10-07 12:00:54 +01:00
Fraser
d14019cd02 Delete skipped e2e download test that has BE tests (#64442) 2025-10-07 22:48:07 +13:00
Uladzimir Havenchyk
a5d6067de1 chore: migrate renderer_utils from moment to dayjs (#64413) 2025-10-07 12:40:11 +03:00
Timofey Kachalov
8f9a72345b Minor refactoring of services.js (#64408) 2025-10-07 13:18:01 +04:00
Fraser
f14ae0297b Unskip working pivot-tables test (#64349) 2025-10-07 13:35:59 +13:00
Vamsi Peri
952aeefd58 Dark mode (#64016)
* js source of truth for colors

* use more betterer colors

* keyboard shortcut for toggling dark mode

* Adds colorConfig for defining a light and dark color for each color variable

* Copies over dark colors from `dark-mode` branch (excluding variables that don't exist in colorConfig`

* Ports other style changes from `dark-mode` branch

* Revert 3301ed93693

* Ports mantine theme logic from `dark-mode` but uses SSOT colorConfig instead of SEMANTIC_COLOR_SCHEMES

* Fix TS errors

* Fix text color and random white bg on permissions table

* Removing a bunch of usages of JS color... probably breaking things

* Updates mantine color scheme when resolvedColorScheme changes

* a bunch more

* fix progress bars. shame on Nick

* Stubs out forcing light mantine theme when isEmbedding (since it has its own dark mode)

* Fix hard-to-read dark mode straggler caused by one-off bg color

* add orionAlphaInverse colors

* make lighthouse illustration work with CSS vars

* Fixes hover states of query builder header buttons in dark mode

* Updates PivotTables in dark mode to behave similarly to night mode

* Fix upsell CTA hover color in dark mode

* Tweaks admin nav dark mode color

* some small fixes

* Fixes some incorrect brand color values when white-labeling

* Tweaks admin nav bar colors and uses same colors on dark mode as light mode (if it ain't broke...)

* Fix gauge visualization text/input colors in dark mode

* Makes things legible and more consistent in query builder in dark mode

* Fixes a few filter chip stragglers in dark mode

* metabot visits the dark side

* Use ColorSchemeToggle for dashboard night mode button

* Prevents dashboard from using night mode when theme=night is set in the hash

* Update color.ts

* Revert "Prevents dashboard from using night mode when theme=night is set in the hash"

This reverts commit 06a504c088e31c60aca7c7550aa24a0f32edba6c.

* set color scheme for scrollbars

* hard to see toggle in database info

* Embedding and other fixed

* fix blue brand

* Uses canonical dark mode for dashboard night mode and static embedding's dark mode

* Fixes issue where Static Embedding preview pane doesn't show checkerboard background when "Dashboard background" is turned off

* Updates find-never-defined-css-variables.ts so it looks for defined variables in colors.ts. Removes references to now-removed base colors.

* Fixes some TS errors

* happy-ish static viz

* only resolve to color var if name is known

* type corrections, removing auto color scheme

* Passes storybook theme arg to ThemeProvider

* add konami code shortcut for Vamsi

* Fix dashboard context TS errors

* Fix runtime warning

* Prevents whitelabel colors from being used in colors.ts when token lacks whitelabel feature. Updates `filter` and `summarize` colors to use whitelabel value if present.

* re-enable updateColors

* happy types

* Updates storybook renderer to work with stories that set the theme via theme: "dark"

* Fix issue where DatesRangeSdk story doesn't pick up brand color

* green unit tests?

* Reverts unnecessary change carried over from original `dark-mode` POC which changed some loki/storybook backgrounds

* Fix issue where theme switching themes in Question embed previews doesn't appear to do anything

* handfull of e2e suites

* Revives some `theme` infrastructure needed to support `theme=transparent`

* Restores SdkError colors on dark mode (#64306)

* happy unit and e2e tests?

* Fix lint errors

* feat(sdk-bundle): use existing tooltip configuration for dark mode (#64325)

* fix card shadow crash

* backdrop color fix

* Refines ColorSchemeToggle. Color scheme is "auto" by default. When "auto", color scheme is automatically updated when browser/device settings is changed. Switching to the theme that's defined as the browser/device preference will set the color scheme to "auto".

* Adds clarifying "(system preference)" to color scheme toggle tooltip

* embedding e2e, unit tests

* Fix TS error

* update colorConfig for sdkThemeProvider

* force e2e to run in light mode

* Fix embedding-sdk:docs:generate error

* Updates ThemeProvider to ignore  from hash if we're outside of static embeds. This prevents old night mode dashboard urls from messing with the new dark mode.

* Fix issue where dark mode shortcut isn't pulling in the latest values (not toggling right)

* Replace hardcoded value with already-defined constant

* fix quotes in css

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

* use firefox compatible scale

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

* fix css quotes

* fix color scheme toggle

* fix test

* fix conflict

* update test

* PR Feedback

* fix embedding homepage flicker

* e2e adjustment

* adding text-hover, fixing checkbox border

* setup.cy green plz

* e2e test for toggling color scheme

* e2e plz

* type check

* e2e adjustment

* Update Loki Snapshots

* test colors in RGB

* OS check for shortcut

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: AlessioLaiso <7041012+AlessioLaiso@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-06 20:23:21 -04:00
Nemanja Glumac
3dffc9d900 Parameterize cloud-add-on API (#64424)
Instead of hard-coding a "metabase-ai" as the only add-on,
we're now parametrizing this endpoint to accept different
product types, which translates into buying different add-ons.
2025-10-07 00:06:11 +02:00
Fraser
09d2689976 Fix merge e2e timings step (#64405) 2025-10-07 10:48:44 +13:00
dpsutton
f6162a0cce Alternative fix for internal queries (#64376)
* Alternative fix for internal queries

reenable the admin screen for http://localhost:3000/admin/tools/errors

I know we aren't supposed to look at any piece of a query, including
type here, but there are a few reasons i'm doing so.

1. i don't know of any predicates in mbql lib for this
metabase.lib.core doesn't have a `native?` predicate, nor an `mbql?`
predicate. It does seem have predicates about stages but that doesn't
seem applicable here
2. even if it _did_, the internal query is not recognized by lib, so we
then have to teach it internal queries which means the other PR (#64375)
has to be implemented either way, defeating the purpose of this very
simple PR.

```clojure
user=> (metabase.lib.core/any-native-stage? {:limit 1,
                                             :type :internal,
                                             :fn "metabase-enterprise.audit-app.pages.queries/bad-table",
                                             :args [nil nil nil "last_run_at" "desc"],
                                             :offset 0,
                                             :parameters []})
Execution error (ExceptionInfo) at metabase.lib.walk.util/fn$fn (util.cljc:72).
Invalid input: {:lib/type ["missing required key, got: nil"], :stages ["missing required key, got: nil"]}
```

Why aren't there tests?
🤠
Want to contrast the two approaches first. Happy to backfill tests once
the approach is agreeable. This approach here is _very_ simple and lets
the working qp approach continue working without disturbing
metabase.lib. This seems pretty nice because ultimately these internal
queries should/will be replaced. But in the meantime, do we want to
teach lib about them, or just skirt it altogether?

* test that api works for these queries

* enable feature in test
2025-10-06 16:22:02 -05:00
John Swanson
b9b78a2f60 Show audit links for non-admins with perms (#64201)
If a user isn't an admin but has permission to view the Usage Analytics
collection they should see links in the card sidebar.
2025-10-06 13:39:41 -07:00
Timofey Kachalov
1a28ee25c3 refactor(embed-js): Refactor EmbedJS wizard to prepare it for No-user embedding (#64411) 2025-10-06 23:50:20 +04:00
Edward Paget
54919da812 Remove parallel annotation from tests (#64386) 2025-10-06 18:43:43 +00:00
Alex Yarosh
11fec69c5e docs: price change (#64426) 2025-10-06 14:17:23 -04:00
Dan Stone
d12930529f Add /ee/python-transforms/test-run to preview a run (#64362)
The python code is executed by the runner but its output is not saved back. The endpoint blocks
until the output is received.

Any objects in S3 should be deleted before the request returns (or will otherwise be collected via retention)

Limits:
- Run timeout is set to 60 seconds
- Samples up to 100 rows from each input table.
- Outputs up to 100 rows from the python output.
2025-10-06 17:25:10 +01:00
Nicolò Pretto
249e0a0d87 fix(modular): enable external click behavior; fallback to drills for internal click behaviors (#64320)
* fix(modular): enable external click behavior; fallback to drills for
internal click behaviors

* remove cy.pause
2025-10-06 17:48:16 +02:00
lbrdnk
ba8843298e Avoid use of analytics content for suggested prompts (#64370)
* Avoid use of analytics content for suggested prompts

* Docstring
2025-10-06 17:41:49 +02:00
Braden Shepherdson
33db17c7ed [QP] Push required implicitly joined fields down through stages (#64305)
Fixes #63245.

Add `:reversed? true` option to `lib.walk/walk-stages` that reverses the order.

Then use that option for `qp.middleware.add-implicit-joins/second-pass`, since that `second-pass`
is about making sure if stage N needs an implicitly joined column from the previous stage, that the
previous stage actually returns it. #63245 happens when the join clause and usage are 2+ stages apart.
Flipping the iteration order will push the need for the implicitly joined column through as many stages
as necessary.
2025-10-06 10:56:39 -04:00
Marcos
471b6f57e5 Fix wrong timezone in "exclude hours" filters (#64290)
* use local datetime instead of zoned  datetime when creating exclusion filters from parameters

* use local datetime instead of zoned datetime when creating exclusion filters from parameters
2025-10-06 11:10:59 -03:00
Denis Berezin
f7183cf1ca Fix card duplication on move to before flexcontainer (#64205) 2025-10-06 17:30:09 +04:00
github-automation-metabase
8666f82edb Bump io.github.metabase/hawk from 1.0.12 to 1.0.13 (#64395)
Inspect dependency changes here:
2025-10-06 13:29:07 +00:00
Phoomparin Mano
400b10f74c feat(sdk-bundle, embed-js): add metabase-metabot custom element for Embed JS (#64144) 2025-10-06 19:03:01 +07:00
Dan Stone
0d7e892036 Remove high cardinality run-id labels (#64358)
Poor prometheus
2025-10-06 12:49:05 +02:00
Timofey Kachalov
573b3c61a2 refactor(sdk-bundle): Adjust StaticQuestion and SqlParametersList visuals (#64313) 2025-10-06 14:16:35 +04:00
Nemanja Glumac
0af38ef8f0 Delete unused string util from metabase lib (#64389) 2025-10-06 09:38:55 +02:00
Mahatthana (Kelvin) Nomsawadi
7fcd8b3ef7 fix(sdk): Fix SDK TSC errors (#64328)
* Configure ESLint to prevent test files going into SDK build

* Fix SDK build to not include test files

* Fix the config to allow __support__/metadata

* Revert a file I thought was a test file

* Make rules consistent

* Clean up tsconfig pattern

* Make the error message less repeatable
2025-10-06 03:30:12 +01:00
Phoomparin Mano
38260ca608 Remove unused EmbeddingSetup components and hooks (#63841) 2025-10-04 07:05:14 +07:00
Edward Paget
e75dd496b8 fix: add test for join behavior for 64317 fix (#64335) 2025-10-03 15:34:01 -05:00
Edward Paget
c2bea1ca8a feat: card deep links in pulses (#61794)
* feat: card deep links in pulses

* fixup! new fn signature for render-notifications
2025-10-03 15:31:27 -05:00
Nemanja Glumac
52e3cf2142 Replace and remove the deprecated space utility (#64378) 2025-10-03 21:32:37 +02:00
Uladzimir Havenchyk
5b0164a622 chore: replace moment-timezone with dayjs for main app (#63334) 2025-10-03 18:01:51 +00:00
lbrdnk
cebbfb235f Fix localization number separators (#64300)
* Fix incorrect separator on FE and add guard to setting

* Reproduction

* when-some

* Add FE test

* naming

* Update frontend/src/metabase/admin/settings/components/widgets/FormattingWidget.unit.spec.tsx

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

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-10-03 19:25:52 +02:00
Roman Abdulmanov
f69789d465 removed triage notifications (#64369) 2025-10-03 16:18:23 +00:00
lbrdnk
e2334d688a Enable copying of iframe cards (#64232)
* Enable copying of iframe cards

* Use display to decide iframe type

* Add iframe card test
2025-10-03 17:25:05 +02:00
Stas Gavrylov
b71caeacdf WRK 905 Allow commenting on unsaved documents (#64237)
* WRK-905: Allow commenting on an unsaved document

* Fix e2e tests

* Remove 'disabled' prop from CommentsMenu. Remove force click in comments test

* Allow editing document when comments sidebar is opened

* Fix linting

* Fix e2e tests

* Address PR comments. Allow charts editing when comments sidebar is open
2025-10-03 16:32:20 +02:00
Jakub Chodorowicz
0fee338d56 Fix: cannot interact with DashCard actions panel while in edit mode on mobile devices (#64356) 2025-10-03 16:07:16 +02:00
github-automation-metabase
1216cee2ae Update generated docs (master) (#64348)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-03 08:31:04 -04:00
Sébastien
9f1fb57177 Closes EMB-411 no more transparent cell background by default (#64288)
* Closes EMB-411 no more transparent cell background by default

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-03 11:44:04 +02:00
Sébastien
1c18e1023a Closes EMB-854 actually escape the single quote (#64323) 2025-10-03 11:43:37 +02:00
Phoomparin Mano
8cb9ca883d Change embed flow tracking to track step completions for funnel analysis (#63973) 2025-10-03 12:55:01 +07:00
Phoomparin Mano
384d0b5d3b Update alignment and copy for embedding hub (#64279) 2025-10-03 12:06:24 +07:00
Tyler Plude
1561702bdb Return error string in response when model ID is a question instead of 404 (#64342) 2025-10-02 17:25:51 -07:00
Riley Thompson
4d0eef7217 Store transform create/updates in revision table (#64247)
* store transform revisions

* Add tests

* remove unneeded arity

* fix whitespace

* include impl.transform in revisions.init

* move transform test to enterprise folder

* use =? and check unneeded keys were removed

* revert =? use

* dissoc source from transform comparison
2025-10-02 18:40:59 -04:00
Tyler Plude
cc6827ae8c [METABOT] Use limit in final search response (#64336)
* Limit default 50 search results

* tweak
2025-10-02 14:20:26 -07:00
ignacio
08dffba554 minimal change to dashboard caching steps (#64052)
* minimal change

* whoops

* whoops

* Update docs/configuring-metabase/caching.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/configuring-metabase/caching.md

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-10-02 21:12:18 +00:00
Jeff Bruemmer
18b59c1b4d docs - notes on Metabot feedback (#64307)
* notes on feedback

* edit

* link
2025-10-02 17:02:18 -04:00
Anderson
d56be957f0 Show 'See it' link next to 'Saved' button after x-ray is saved as dashboard (#64265)
* Show 'See it' link next to 'Saved' button after x-ray is saved as dashboard

* Use Flex and Group mantine components

* use cy.log instead of JS comments

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>

* reverse the order of e2e assertions/actions

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>

* Fix tests

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2025-10-02 17:09:05 -03:00
Edward Paget
6631ed5389 chore: Remove unused column-level middleware (#64326)
* chore: Remove unused column-level middleware

* fixup! update docstring
2025-10-02 19:55:30 +00:00
Noah Moss
16c4a16025 Fix edge case in to-tsquery-expr (#64330) 2025-10-02 19:15:21 +00:00
Edward Paget
2219786d93 fix: validate ldap server email before save (#62616)
Prevents the user from getting an ugly assertion error on login if the
ldap is misconfigured so we can't read a real email from the server response.
2025-10-02 18:46:33 +00:00
Phoomparin Mano
93052b8a8e Hide the step number circle in the setup flow when we only have one step (#64292) 2025-10-03 01:14:00 +07:00
Sébastien
e01cbfc87e Closes EMB-854 escape single quotes in embed code snippets (#64242)
* Closes EMB-854 escape single quotes in embed code snippets

* .

* .

* cleanup
2025-10-02 15:54:37 +02:00
Oleksandr Solovyov
899d6edb3c Mage run tests via nrepl (#64236) 2025-10-02 16:48:59 +03:00
Kamil Mielnik
5705ba7f81 Move SmartScalar subcomponents to separate files (#64283) 2025-10-02 19:44:59 +07:00
Cam Saul
0261a15e7b QP result metadata should always populate :lib/desired-column-alias (#64063)
* QP result metadata should always populate `:lib/desired-column-alias`

* Don't truncate desired column aliases for Table returned columns
2025-10-02 09:03:54 +00:00
Mahatthana (Kelvin) Nomsawadi
02cec9f38d fix(sdk): Allow token withoutexp, but raise a warning (#64238)
* Allow token without exp, but raise a warning

* Fix typing

* Fix wrong doc link anchor

* Fix doc link accessible label

* Add a test

* Fix sso endpoint calling repeating when jwt doesn't contain `exp`

* Fix unit tests

* Fix test for real!

* Fix test name typo

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

* Use correct terminology "session"

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

* Fix showing no EXP claim warning when the token is being fetched

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

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-10-02 10:01:57 +01:00
Cam Saul
8fa9204d57 Fix formatting for native-query (#64291) 2025-10-02 01:43:18 -07:00
Nicolò Pretto
88229c321e fix(modular): links and type/URL columns should be rendered as clickable (#64243)
links
2025-10-02 10:19:43 +02:00
Timofey Kachalov
4d0d576c13 feat(sdk-bundle): Add SqlParametersList component for InteractiveQuestion and StaticQuestion (#64187) 2025-10-02 10:24:54 +04:00
Timofey Kachalov
7e4dfde94f Adjust sample apps setup (#64274) 2025-10-02 08:59:05 +04:00
William
85fc7cb3fd Dependencies tracking (#63248) 2025-10-01 22:37:16 -04:00
dpsutton
16dc5bece0 Log errors in downgrades (#64309)
Fixes https://github.com/metabase/metabase/issues/62179

Before (and bad) (wordwrap introduced for clarity):
```
2025-08-14 16:17:36,662 WARN app-db.liquibase :: The following
changesets were not rolled back. Likely because they are not in the
changelog file: v56.2025-06-05T16:48:48, v56.2025-06-06T20:11:53,
v56.2025-06-06T20:11:54, v56.2025-06-06T20:11:55,
v56.2025-06-06T20:11:56, v56.2025-06-06T20:11:58,
v56.2025-06-13T15:00:00, v56.2025-07-07T08:02:43,
v56.2025-07-17T20:11:55, v56.2025-07-17T20:11:56 2025-08-14 16:17:36,662
INFO liquibase.logging :: Successfully released change log lock ```
```

And now:

```
2025-10-01 16:00:19,326 INFO app-db.liquibase :: Rolling back app database schema to version 55
2025-10-01 16:00:19,326 INFO app-db.liquibase :: Going to roll back changeset v56.2025-07-17T20:11:56
Rolling Back Changeset: migrations/056_update_migrations.yaml::v56.2025-07-17T20:11:56::edpaget
2025-10-01 16:00:19,328 ERROR app-db.liquibase :: Error rolling back migration v56.2025-07-17T20:11:56
liquibase.exception.RollbackFailedException: liquibase.exception.DatabaseException: ERROR: column "jwt_attributes" does not exist
  Position: 41 [Failed SQL: (0) UPDATE core_user SET login_attributes = jwt_attributes WHERE sso_source = 'jwt']
  	at liquibase.changelog.ChangeSet.rollback(ChangeSet.java:1041)
        ...
Caused by: liquibase.exception.DatabaseException: ERROR: column "jwt_attributes" does not exist
  Position: 41 [Failed SQL: (0) UPDATE core_user SET login_attributes = jwt_attributes WHERE sso_source = 'jwt']
	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:520)
       ... omitted
       ... 65 more
Caused by: org.postgresql.util.PSQLException: ERROR: column "jwt_attributes" does not exist
  Position: 41
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2734)
	... 70 more

2025-10-01 16:00:19,330 WARN app-db.liquibase :: The following
changesets were not rolled back. Likely because there were errors in
rollback (v56.2025-07-17T20:11:56): v56.2025-06-06T20:11:53,
v56.2025-06-06T20:11:54, v56.2025-06-06T20:11:55,
v56.2025-06-06T20:11:56, v56.2025-06-06T20:11:58,
v56.2025-06-13T15:00:00, v56.2025-07-07T08:02:43,
v56.2025-07-17T20:11:55, v56.2025-07-17T20:11:56 2025-10-01 16:00:19,330
INFO liquibase.logging :: Successfully released change log lock
```

How i recreated:
connected to a jar:
```
MB_DB_CONNECTION_URI="postgres://dan:password@localhost:5432/downgrade-checks" MB_JETTY_PORT=2999 java "$(socket-repl 6000)" -jar $JARS/1.56.6.2.jar
```

```sql
downgrade-checks=# alter table core_user drop column jwt_attributes;
ALTER TABLE
```

this will make a downgrade fail:
```yaml
  - changeSet:
      id: v56.2025-07-17T20:11:56
      author: edpaget
      comment: |
        Add sync login_attributes with jwt_attributes, we need to replace jwt_attributes
        with login attributes for users with sso_source jwt so that they will get the new
        behavior where login_attributes can override jwt_attributes
      changes:
        - sql: >-
           UPDATE core_user
           SET jwt_attributes = login_attributes, login_attributes = '{}'
           WHERE sso_source = 'jwt';
      rollback:
        - sql: >-
           UPDATE core_user
           SET login_attributes = jwt_attributes
           WHERE sso_source = 'jwt';
```

This will fail as the `jwt_attributes` column has been removed.

```
Error rolling back migration v56.2025-07-17T20:11:56
liquibase.exception.RollbackFailedException: liquibase.exception.DatabaseException: ERROR: column "jwt_attributes" does not exist
  Position: 41 [Failed SQL: (0) UPDATE core_user SET login_attributes = jwt_attributes WHERE sso_source = 'jwt']
```

And then connect to the jar again, redefine the changes here, and run

```clojure
  (let [data-source (metabase.app-db.core/data-source)]
    (with-open [conn (.getConnection ^javax.sql.DataSource data-source)]
      (with-liquibase [liquibase conn]
        (rollback-major-version! conn liquibase false))))
```
2025-10-01 17:59:50 -05:00
Nathan Voxland
3f15dcd0ad Better error handling when sync-tracking-atoms fails (#64132) 2025-10-01 16:42:11 -05:00
Phoomparin Mano
6e17e96bf0 feat(sdk-bundle): stacked and sidebar layouts for metabot questions (#64142) 2025-10-02 04:03:24 +07:00
Fraser
59dc6a1376 Remove skipped dashboard toast e2e tests (#64266) 2025-10-02 09:36:51 +13:00
John Swanson
4614a37972 Fix u/slugify function's max-length option (#64256)
* Fix `u/slugify` function's max-length option

`u/slugify` url-encoded non-ASCII characters, then took `max-length`
chars off the result.

Both make sense in isolation - but if we're slugifying, e.g., the string
勇士, with max-length 10, this results in:

- first, url encode non-ASCII characters => "%E5%8B%87%E5%A3%AB"
- then, take 10 characters => "%E5%8B%87%"

But a bare `%` character, as in the trailing character above, is not
valid URI syntax.

Discovered in [UXW-666: Users can't download results for questions with
long cyrillic names, error "URL
malformed"](https://linear.app/metabase/issue/UXW-666/users-cant-download-results-for-questions-with-long-cyrillic-names)
but there are probably more cases where this has caused mischief.

* fix test
2025-10-01 11:53:46 -07:00
Alex Yarosh
648039ca1a docs: don't overhype interactive embedding (#64299)
* docs: don't overhype interactive embedding

* Add in-page promo for embedding workshop

Added a promotional section for the embedding workshop.

* Update docs/embedding/interactive-embedding.md

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-01 18:46:48 +00:00
Jeff Bruemmer
2804f26f4b fix placeholder (#64240) 2025-10-01 14:30:33 -04:00
Alex Yarosh
158b78fb25 docs: clickhouse cloud (#64296) 2025-10-01 17:49:45 +00:00
Rodrigo López Dato
9b82a4d92d Add explicit import/export direction to serialization errors (#63777) 2025-10-01 20:30:33 +03:00
dpsutton
5fb41fd3b1 lower log level to debug for field ref issues (#64281)
These log lines will now be debug level warnings rather warning level warnings.
```
<lib.normalize>  Error normalizing MBQL 5
<lib.field.resolution>  We tried every trick we could think
<lib.join>  Failed to find matching column in join
```

Intrepid readers will also notice that moved "Resolved field %s to an
expression. ..." to debug as well.
2025-10-01 11:07:06 -05:00
Rodrigo López Dato
db70faad90 Show full timestamp for revision history entries on hover (#63256) 2025-10-01 15:07:42 +00:00
Alex Yarosh
dddf9d679c docs: serializing new entities (#64284)
Added document comments to the list of non-exported entities.
2025-10-01 10:26:54 -04:00
Uladzimir Havenchyk
c6c0bf73dd tests: wait for data in a flaky test (#64267) 2025-10-01 16:13:00 +03:00
John Swanson
c5da59566e Fix downloading tables grouped by datetime->int (#64245)
* Fix downloading tables grouped by datetime->int

The Linear task has a slightly more involved setup. I found that I could
replicate the issue with a slightly simpler setup:

- set up a simple query:
  - select COUNT from ORDERS
  - group by the day of the month
- log in as the sandboxed user
- try to download the card results (as CSV, XLSX, etc)
- see the error

Why does this happen? I found that, for a sandboxed user, the query
results show the "day of the month" column as having

```
         :base_type :type/DateTime,
         :database_type "TIMESTAMP",
         :effective_type :type/Integer,
```

while an admin user sees the same column as having

```
         :base_type :type/Integer,
         :database_type "INTEGER",
         :effective_type :type/Integer,
```

This seems bizarre and worth looking more into, but honestly shouldn't
really matter - if the effective type is an integer, we certainly
shouldn't be formatting it as a datetime.

`field-is-type?` is only used for checking whether a field is temporal
for formatting purposes, so I think this is a relatively low risk
change, and note that `metabase.lib.types.isa/temporal?` (the
replacement suggested by the deprecation notice for
`metabase.types.core/temporal-field?`) returns `false` for both
cases.

[UXW-660: Pivot tables with integer breakout columns fail to download as formatted XLSX for sandboxed tables](https://linear.app/metabase/issue/UXW-660/pivot-tables-with-integer-breakout-columns-fail-to-download-as)

* Write a test
2025-10-01 05:37:26 -07:00
Kamil Mielnik
f914bf8714 Update table editing e2e tests to not add or remove rows in Sample Database (#64273)
* Update the row deleting test to use writable db

* Update the row adding test to use writable db
2025-10-01 06:16:52 -05:00
Ngoc Khuat
448e9c8278 hide the python runner settings if hosted (#64233) 2025-10-01 08:18:44 +00:00
Nicola Mometto
0ac7bce92b Python runner timeouts (#64095)
* add python runner timeout as setting

* set timeout status

* add timeout status test

* appease kondo

* proper script

* Fix if: expr in upload runner logs

* Fix python runner log name

* Remove setting qualifier

* Add python-runner-timeout-seconds to FE settings type

* Ensure premium feature enabled so setting can be changed

---------

Co-authored-by: Dan Stone <wotbrew@gmail.com>
2025-10-01 09:15:08 +01:00
Romeo Van Snick
ccd8a11ee7 Add context to Save verb and fix similar translation issues (#64077)
* Add context to Save verb

* Add key

* Extract button from nested t

* Find other instances of nested c(...).jt`...${<x>...</x>}...` calls and unnest them
2025-10-01 17:58:46 +10:00
Ngoc Khuat
5164a08b2a Do not run transform test in postgres mysql (#64241) 2025-10-01 04:24:04 +00:00
Romeo Van Snick
e50317d86d Avoid extra interval with single interval in Bar chart (#64175)
* Remove extra interval tick when there is only one interval

* Add repro for metabase#63671

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-01 13:31:05 +10:00
Nathan Voxland
3800f7452a Support dbname for redshift in config files (#64069) 2025-09-30 22:21:49 -05:00
Romeo Van Snick
f89073a6bd Do not show error when loading (#64082)
* Pass isRunning to Visualization

* Hide error when query is running

* Add unit test for metabase#63410
2025-10-01 13:05:11 +10:00
Mahatthana (Kelvin) Nomsawadi
d848a88e64 Fix can't drill SQL questions in embedding SDK (#64083)
* Fix can't drill SQL questions in embedding SDK

* Add tests

* Fix the audit DB should not be able to see SQL

* Fix every CI check failing from updating from master

* Address code feedback, make it more clean

* Fix transducer order
2025-10-01 03:10:46 +01:00
Fraser
356025f41b Unskip issue 42049 reproduction (#63862) 2025-10-01 12:32:49 +13:00
Fraser
a0c2ebd9e9 Delete test for non-existent feature (#63683) 2025-10-01 09:51:40 +13:00
Alex Yarosh
c9bc786c60 remove actions from embedding overview (#64249)
Updated the requirement note for embedding types to clarify that a Pro and Enterprise plan is necessary.
2025-09-30 16:30:50 -04:00
Ramiro Nuñez Dosio
1f024e148d Revise README for clarity and updated links (#64194)
* Revise README for clarity and updated links

Update readme with 

- Product image (TBC which image)
- Update links to latest version (no redirects)
- Add mention of new features (Metabot AI and React SDK)
- Add community section

* Update README.md

Co-authored-by: alexandermkinn <85193003+alexandermkinn@users.noreply.github.com>

* Update README.md

Co-authored-by: alexandermkinn <85193003+alexandermkinn@users.noreply.github.com>

* Update Metabase product screenshot URL

Updated the product screenshot link in the README.

* Update README.md

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

* Update README.md

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

---------

Co-authored-by: alexandermkinn <85193003+alexandermkinn@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeffbruemmer@gmail.com>
2025-09-30 16:05:51 -04:00
Alex Yarosh
7c8a53c4d5 docs: pin shape (#64251)
* pin shape

* Update docs/questions/visualizations/map.md

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

* wording

Clarified limitations on data points for maps and added details about pin types.

* image

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-30 15:15:11 -04:00
John Swanson
bc28d50013 fix: make popular tables clickable (#64208)
Very silly bug, we were just populating the ID with the wrong
thing (`(:database-id table)` instead of `(:db_id table)`), so the FE
couldn't build links correctly.

There was a mismatch between `recent_views` and `popular_items`
endpoints. They have different queries, but are using the same
postprocessing function. So I needed to unify them: both now use
`:db_id`.
2025-09-30 11:31:59 -07:00
Timofey Kachalov
d0af14f90d Fix SegmentedControl colors (#64107) 2025-09-30 20:25:53 +04:00
Eric Normand
6afcf2aed5 Fix ssh tunneling for clickhouse (#63464)
* Fix ssh tunneling for clickhouse

* Remove questionmark

* Use kebab case keys

* Fix kondo;

This is also fixed in https://github.com/metabase/metabase/pull/63645,
so there may be a conflict.

* Don't squash exceptions.

* remove some tests, fix some tests

I removed some tests. Let's be very clear why this is happening. Push
back if you disagree:

```clojure
(deftest clickhouse-connection-fails-test
  (mt/test-driver :clickhouse
    (mt/with-temp [:model/Database db {:details (assoc (:details (mt/db)) :password "wrongpassword") :engine :clickhouse}]
      (testing "`driver/database-supports? :uploads` does not throw even if the connection fails."
        (is (false? (driver/database-supports? :clickhouse :uploads db)))
        (is (false? (driver/database-supports? :clickhouse :uploads nil))))
      (testing "`driver/database-supports? :connection-impersonation` does not throw even if the connection fails."
        (is (false? (driver/database-supports? :clickhouse :connection-impersonation db)))
        (is (false? (driver/database-supports? :clickhouse :connection-impersonation nil))))
      (testing (str "`sql-jdbc.conn/connection-details->spec` does not throw even if the connection fails, "
                    "and doesn't include the `select_sequential_consistency` parameter.")
        (is (nil? (:select_sequential_consistency (sql-jdbc.conn/connection-details->spec :clickhouse db))))
        (is (nil? (:select_sequential_consistency (sql-jdbc.conn/connection-details->spec :clickhouse nil))))))))
```

This test is _GONE_ because it's insane that we are testing that
`conneciton-details->spec` and `database-supports?` is resilient to
opening a connection to a server. That's nuts. We don't do that any
more. Should be the same as if checking `(+ 1 1)` doesn't open a network
connection. We get version information in

```clojure
(def ^:private ^{:arglists '([database])} get-clickhouse-version
  (memoize/ttl
   ^{:clojure.core.memoize/args-fn (fn [[database]] (:details database))}
   (fn [database]
     (sql-jdbc.execute/do-with-connection-with-options
      :clickhouse
      (sql-jdbc.conn/db->pooled-connection-spec database)
      nil
      (fn [^java.sql.Connection conn]
        (with-open [ver-stmt (.createStatement conn)
                    ver-rset (.executeQuery ver-stmt clickhouse-version-query)
                    cloud-stmt (.createStatement conn)
                    cloud-rset (.executeQuery cloud-stmt "SELECT value='1' FROM system.settings WHERE name='cloud_mode'")]
          (cond-> nil
            (.next ver-rset)
            (assoc :version          (.getString ver-rset 1)
                   :semantic-version {:major (.getInt ver-rset 2)
                                      :minor (.getInt ver-rset 3)})

            (.next cloud-rset)
            (assoc :cloud (.getBoolean cloud-rset 1)))))))
   :ttl/threshold default-cache-ttl))

(defmethod driver/dbms-version :clickhouse
  [_driver db]
  (get-clickhouse-version db))
```

We don't need to run this query every time you get a connection spec or
ask if the database supports something. We have the version and if it's
cloud and that's sufficient. The only reason it was opening a connection
was to run the cloud check (`select value=1 from system.settings where
name=cloud_mode`) above.

Also removed:
```clojure
(deftest impersonation-support-check-over-ssh-tunnel-test
  (testing "driver-supports? :connection-impersonation should work through an SSH tunnel (#62377)"
    ;; Use an in-memory SSH server that forwards to the correct port through localhost.
    ;; Since the real database is still reachable locally, it's possible for the driver to ignore the SSH tunnel and
    ;; still connect to the DB. So this test runs twice, once with all correct and once with an incorrect SSH
    ;; password. The latter check should fail (returning false for `driver-supports?`) if the SSH tunnel is being
    ;; respected.
    (mt/test-driver :clickhouse
      (let [username "username", password "password"]
        (with-open [ssh-server (driver.tu/basic-auth-ssh-server username password)]
          (doseq [[correct-password? ssh-password] [[true password] [false "wrong-password"]]]
            (memoize/memo-clear! @#'clickhouse.version/get-clickhouse-version)
            (let [ssh-port (.getPort ssh-server)]
              (with-ssh-tunnel! {:tunnel-enabled true
                                 :tunnel-host "localhost"
                                 :tunnel-auth-option "password"
                                 :tunnel-port ssh-port
                                 :tunnel-user username
                                 :tunnel-pass ssh-password}
                (testing (str "using " ssh-password)
                  (is (= correct-password?
                         (driver/database-supports? :clickhouse :connection-impersonation (mt/id)))))))))))))
```

Again, this is verifying connection resiliency in a call
to `(driver/database-supports? :clickhouse
:connection-impersonation (mt/id))` and ensuring that it uses the ssh
tunnel. This entire concern is gone, and a red flag that it ever
existed.

Changes:
a few tests used the `db` from `with-temp` to do stuff, but now that we
require them to have dbms_version i populated that

in the version check i thought i saw one in test going through with
`dbms-version` and not `dbms_version` so i'm checking both just to be
sure. it's a bit sloppy

* small changes and add back test

* handle dbms-version vs. dbms_version

* fix kondo

---------

Co-authored-by: Riley Thompson <riley@metabase.com>
Co-authored-by: dan sutton <dan@dpsutton.com>
Co-authored-by: Riley Thompson <rileythompson99@gmail.com>
2025-09-30 11:53:45 -04:00
yaojie
99d7d54af3 Set send-server-version? to false to hide Server version from response headers (#57257)
* Set send-server-version? to be false by default

* Update test
2025-09-30 16:40:19 +01:00
Dan Stone
1610538386 MariaDB transform cancellation fix (#64092) 2025-09-30 16:13:41 +01:00
Bergbok
1d94009c3d Update broken link in README (#63000) 2025-09-30 11:12:31 -04:00
Jeff Bruemmer
b8360b6da3 docs - document layout (#64209)
* document layout

* do stuff
2025-09-30 14:58:10 +00:00
Oleksandr Solovyov
cb13bdc086 simpler way to set token: mt/with-random-premium-token! (#64188) 2025-09-30 17:06:53 +03:00
Timofey Kachalov
1704f14bda refactor(sdk): Properly reinitialize metabaseConfig watcher for EmbedJS wizard (#64235) 2025-09-30 17:48:14 +04:00
John Swanson
593ecfb952 Use SQL SECURITY INVOKER for mysql views (#62537)
[UXW-263: Aurora MySQL AppDB can't create Metabase Analytics views
without using `SQL SECURITY
INVOKER`](https://linear.app/metabase/issue/UXW-263/aurora-mysql-appdb-cant-create-metabase-analytics-views-without-using)

Updates all the MySQL view creations to use `SQL SECURITY INVOKER`.
2025-09-30 06:07:10 -07:00
github-automation-metabase
611220c5e0 Update generated docs (master) (#64216)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-30 08:56:57 -04:00
Dan Stone
b77f570c57 Add python runner logs as artifacts on failed tests (#64093)
* Factor out setup/log actions for python runner, use in driver tests

* Remove redundant cd

Co-authored-by: Nicolò Maria Mezzopera <nicolo.mezzopera@metabase.com>

---------

Co-authored-by: Nicolò Maria Mezzopera <nicolo.mezzopera@metabase.com>
2025-09-30 11:59:24 +01:00
Timofey Kachalov
8ba64b7bcd fix(sdk): Fix SDK refresh token race-conditions (#64094) 2025-09-30 13:09:58 +04:00
Nicola Mometto
e1dcfdab2e Do not realize objects in memory early for python transform results (#64034)
* partition documents for mongo insert

* feat: s3/read-to-stream

* don't keep files in memory, stream them

* fix tests

* proper types

* slurp conditionally

* replace_existing

* nil safe

* Tweak InputStream lifetimes

* Fix test now read-to-string returns nil

* Fix kondo / reflection

---------

Co-authored-by: Dan Stone <wotbrew@gmail.com>
2025-09-30 09:42:34 +01:00
Timofey Kachalov
5c9b282361 Update typedoc and its plugins versions (#64219) 2025-09-30 11:43:47 +04:00
Oleksandr Solovyov
cf5c7bd4c3 [search] better search for CamelCased tables and dbs (#64043) 2025-09-30 06:20:14 +00:00
Nemanja Glumac
46adff882f Fix metrics-collection e2e flake (#64204)
We're making the assertion a bit more flexible
without losing the confidence that this test
was supposed to give us when it was created.
2025-09-30 07:50:30 +02:00
Cam Saul
87923e1e1d Fix duplicate coercion on custom columns from joins (#63941)
* Fix duplicate coercion on custom columns from joins

* Fix #63991

* Test fixes 🔧

* Another round of test fixes 🔧

* Test fixes 🔧

* Kondo lint fixes 🔧
2025-09-29 22:16:56 -07:00
Romeo Van Snick
5bd544baf5 Fix native transform editor results UI warts (#64081)
* Pass className to native editor

* Add missing border on top of native editor

* Set minimal editor height so the results panel is always visible

* Move initial height calculation to hook
2025-09-30 14:04:22 +10:00
Anderson
f8d410f858 Change dark ClickHouse icon to be yellow (#64213) 2025-09-29 22:57:18 -03:00
Aleksandr Lesnenko
cfa62e4b8b original card description should be provided to visualizer (#64197) 2025-09-30 00:28:07 +00:00
Romeo Van Snick
fa2820320e Fix zoom and hover on map while editing (#64174)
* Add missing import

* Use late-binding for handlers so they can change without having to recreate markers

* Allow isEditing props to re-render Map component

* Allow disabling zoom control on maps

* Allow clicking the Map action buttons

* Disable zoom and hover when in editing mode

* Add repro for metabase#64138

* Fix e2e tests
2025-09-30 09:03:51 +10:00
Romeo Van Snick
33070f6e06 Fix completion results (#64080)
* Do not shrink grid rows in completion results

* Add e2e test for metabase#63711
2025-09-30 09:03:13 +10:00
Denis Berezin
f43c6462d8 Add support for special intl chars for email formatting (#64060)
* Add support for special intl chars for email formatting

* Fix review comments

* Fix unit tests
2025-09-30 00:16:28 +04:00
Brad Anderson
8f4ccdf2ba Fix #63904: Corrects dashcard selector usage (#64140)
* UXW-1766 Fixes issue where getDashboardHeaderParameters looks at all cached dashcards rather than just the ones from the currently viewed dashboard

* UXW-1766 Adds/updates unit tests
2025-09-29 13:20:34 -04:00
Nemanja Glumac
788bf01ea9 Report Metabot feedback directly to Harbormaster (#64040)
We're introducing a new endpoint in metabase/metabase. It sends the feedback to the backend which then (1) fetches the premium token and (2) constructs the correct store api URL with the same feedback as the payload. Our backend acts as a proxy because the api url contains the token and we can't send it from the FE.
2025-09-29 19:06:51 +02:00
Noah Moss
c4de2725e3 Extract native query content for search indexing rather than the entire dataset_query structure (#64125)
* Extract native query content for search indexing rather than the entire dataset_query structure

* remove inline def

* Fix doc string

* Update search spec field-fields logic to support the :fn syntax to fix test

* Remvoe query_type from expected card spec fields as we're no longer using it to detect native query changes

* Address feedback on :fn semantics, and add a more detailed docstring to define-spec macro
2025-09-29 12:17:17 -04:00
Braden Shepherdson
cd0965a299 [Vertica] Support Vertica UUID columns as :type/UUID (#62512) 2025-09-29 15:38:59 +00:00
Uladzimir Havenchyk
95452f41d3 feat: use new detail view in metadata preview (#63968)
* feat: use new detail view in metadata preview

* drop relationships

* fix e2e helper

* use correct '

* make table responsive

* update helper

* adjust values in tests

* use useSampleData

* rework approach

* update helper

* oops, lost changes

* restore test

* let's add table just in case

* another attempt

* responsive

* restore indexes

* rename index -> rowNumber

* show details group in more cases

* remove force: true

* fix index
2025-09-29 17:31:30 +03:00
John Swanson
b323ecd565 Add a timeout for slow LDAP (#63852)
When the LDAP server is slow, we should fall back to normal
authentication.

For now, use a configurable timeout, defaulting to 15 seconds - this
seems on the high side of reasonable.

[UXW-291: When LDAP is configured, then normal email logins can be blocked if LDAP server is slow/down](https://linear.app/metabase/issue/UXW-291/when-ldap-is-configured-then-normal-email-logins-can-be-blocked-if)
2025-09-29 07:08:10 -07:00
Edward Paget
b2939990fc fix: correct filtering for internal collections (#64065)
* fix: correct filtering for internal collections

* fixup! set is_sample flag on archived collection

filter out analytics namespace
2025-09-29 08:25:36 -05:00
Alexander Polyankin
c63dff0d7b Fixes viz settins for details-only columns (#64113) 2025-09-29 09:12:38 -04:00
John Swanson
521eed05c5 Do not URL-encode default redirect URL (#63965)
I think this was just a mistake - there's no need to URL-encode this and
it actually breaks the redirect.
2025-09-29 06:05:13 -07:00
John Swanson
e88afceba9 Index analytics collections (#64064)
These were excluded from the index, but they should really be in there.
2025-09-29 06:04:02 -07:00
John Swanson
ac2003368e When deleting DB, hide cards from search (#64112)
* When deleting DB, hide cards from search

We have a current issue with search: deleting items does not actually
remove them from search.

This is a particularly nasty version of this, because while usually a
delete follows an update (that marks the card as archived,
which *does* remove it from search), in this case we're just deleting
the items directly as part of an `ON DELETE CASCADE`.

This is a bit hacky, but for now we can just mark them as `archived`
before we delete them to hide them from search.

[UXW-602: Search API returns inexisting cards](https://linear.app/metabase/issue/UXW-602/search-api-returns-inexisting-cards)
2025-09-29 06:03:53 -07:00
Timofey Kachalov
1d2fc06b60 feat(embed-js): Add support of fetchRequestToken for embed-js (#64004) 2025-09-29 16:12:43 +04:00
Kamil Mielnik
581c1e7a38 WRK-871 Details view: JSON formatting missing in details view (#63892)
* Format JSON in new detail view

* Use mantine props

* Use Code

* Use CodeEditor
2025-09-29 10:31:59 +00:00
Romeo Van Snick
17a61a81c8 Add missing import (#64171) 2025-09-29 11:17:26 +02:00
Romeo Van Snick
1d699a5fae Use the entities display name if possible (#64076) 2025-09-29 13:32:11 +10:00
Ngoc Khuat
277d1fdaff Skip sync transforms temp table (#64037) 2025-09-28 15:00:43 +00:00
Oleksandr Yakushev
82b3ba1fcc [perf] Optimize metabase.lib.field.resolution/merge-metadata (#62425) 2025-09-28 13:37:56 +03:00
Dan Stone
dd7845cc83 Improve python error feedback capability (#64053)
* Add i18n / formatting to existing log calls

* Cleanup log conveyance to failure :message

* Improve error feedback capability

- Ensure exception messages do not leak to user logs by default 'Something went wrong'
- Exceptions can carry a `transform-message` key to provide a custom failure message (with i18n)
- Defined messaging for:
   - Error during table copy
   - Error during execution
   - Error during writeback

I would like to follow up with additional context in the form of message log entries for further progress / context of any failure.

Logs can be correlated to metabase logs for stack traces or further debugging. Python output remains presented as-is (traceback etc).
2025-09-27 15:31:57 +00:00
Edward Paget
7e7ed1ac9f fix(scim): support patch requests without a path (#64130)
adheres to the standard and accomodates how we can get these requests
from Okta.
2025-09-26 16:18:45 -05:00
Jeff Bruemmer
19387d8d29 add transforms option (#64128) 2025-09-26 16:45:46 -04:00
Alex Yarosh
7ac8feb49b docs: embedding hub changes (#64012)
* embedding hub changes

* more edits

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-26 20:04:08 +00:00
Alex Yarosh
4447e2c6bc expand embedding comparison table (#64071) 2025-09-26 15:47:01 -04:00
Oleksandr Yakushev
8434b23764 [match] Prevent match-lite from extracting common result that depends on uncommon bindings (#64073)
* [match] Prevent match-lite from extracting common result that depends on uncommon bindings

* [match] Fail if match-lite's :guard is provided with incorrect predicate syntax

Also fix its treatment of named functions passed as predicates.
2025-09-26 22:39:26 +03:00
Jeff Bruemmer
be72407fc8 docs - RLS notes (#64111) 2025-09-26 19:34:07 +00:00
John Swanson
e530911305 Correctly render empty series in static viz (#63987)
* Correctly render empty series in static viz

[UXW-1754: Row chart with an empty series fails to send on static viz](https://linear.app/metabase/issue/UXW-1754/row-chart-with-an-empty-series-fails-to-send-on-static-viz)

`getColumnValueFormatter` and `getColumnValueStaticFormatter` had
different behaviors for empty strings, so this worked on the frontend
but failed for static visualizations.

* cleanup

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-09-26 11:49:59 -07:00
Noah Moss
ca9ba3390d make u/profile log lines look nicer (#64114) 2025-09-26 18:01:53 +00:00
Oleksandr Solovyov
a947f3cb94 [advanced-config] uppercased letter in users email should not fail (#64109)
fixes #62894
2025-09-26 17:20:39 +00:00
Dan Stone
33de954fcf Temporarily disable python transforms tests for BQ/Snowflake (#64118) 2025-09-26 17:15:34 +00:00
Kamil Mielnik
db79c64d3d DSN-73 Verified badge icon should be correct size and nearer text in model and saved question titles (#63871)
* Fix verified badge styling

* Misalign icons :see-no-evil:

* Remove min width on dashboard caption input

* Fix overflow
2025-09-26 16:14:41 +00:00
Jakub Chodorowicz
3e646a69f3 Move dev instances upsell down on embedding settings pages (#64099) 2025-09-26 17:57:27 +02:00
Sébastien
d6c15aab01 Closes EMB-853 renamed legends get ignored by translation (#64023)
* Closes EMB-853 renmaed legends get ignored by translation

* feedback

* if -> ts-pattern
2025-09-26 16:04:57 +02:00
Jeff Bruemmer
34c224b5f2 docs - verified content (#64067) 2025-09-26 13:28:33 +00:00
Sébastien
568443a99c Closes EMB-407 transparent background download pdf (#63836)
* Closes EMB-407 transparent background download pdf

* e2e

* cleanup
2025-09-26 15:18:24 +02:00
github-automation-metabase
5fe1efe15b Update generated docs (master) (#64078)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-26 06:46:56 -04:00
Alexander Polyankin
894176cf26 Add missing transform filters (#63998)
* Params

* Params

* Params

* Params

* Params

* Params

* Rename param

* Transform params

* Transform params

* Transform params

* Transform params

* Transform params

* Transform params

* Transform params

* Transform params

* fixes

* add a test

* add a test

* add a test

* add a test

* add a test

* Fix field filters for type/TextLike

* Fix polling
2025-09-26 06:39:11 -04:00
lbrdnk
c28f66c961 Add guards to metabot and semantic search job implementations (#64031)
* Fix arity

* Add guards for job implementations

* Adjust test
2025-09-26 10:36:00 +02:00
Kamil Mielnik
85e6e7f779 DSN-74 People page should use tabs instead of radios for active/deactivated control (#63817)
* Inline AdminPaneLayout

* Do not show invite button on deactivated tab

* Simplify

* Use modern button

* Add tabs in People page

* Move mb

* Fix typo

* Make people search input full width

* Move tabs to the top
2025-09-26 15:19:24 +07:00
Kamil Mielnik
d44a2cab66 DSN-67 We could improve the "Scanning for Filter Values" setting (#63887)
* Update scanning schedule form to use new UI components

* Update tests
2025-09-26 15:18:35 +07:00
Brad Anderson
e349faa741 Fix: #60843 Prevents dashboard from being saved when clicking "Discard changes" (#63899)
* UXW-333 Prevents `updateDashboardAndCards` from being called when discarding changes (still called when clicking "Save changes")

* UXW-333 Adds e2e test
2025-09-25 17:40:54 -04:00
Aleksandr Lesnenko
817af7b71d pass lat and lon fields to the tile endpoints as query params (#63533)
* for fetching tiles encode field refs as safe base64

* clojure implementation

* update public api

* pass lat and lon fields in query params

* specs

* fix specs

* update preview endpoints and tests

* clean up previous url safe base64 implementation

* fix specs
2025-09-25 21:11:26 +00:00
Jeff Bruemmer
e8cd58b376 Revise contributor instructions in PR template (#64059)
Updated warning section for first-time contributors.
2025-09-25 20:07:31 +00:00
Brad Anderson
62d7beec2b Fix: #63463 Loosens condition that forces saving to dashboard (#63855)
* UXW-709 When drilling into a dashboard card that had a filter applied, the resulting query can now be saved outside of the original dashboard. "New Question"/"New SQL query" via dashboard edit screen behavior is unaffected (still forces you to save to that dashboard).

* UXW-709 Updates unit tests
2025-09-25 15:55:45 -04:00
Brad Anderson
c2ec56beed UXW-172 Fix is-neg condition (#63905) 2025-09-25 15:54:48 -04:00
Nathan Voxland
5274867997 Log system signals for better debugging (#63780) 2025-09-25 13:56:48 -05:00
Anderson
b5a9d7457f Have a separate email content for user joining through setup invitation (#63778)
* Allow redirect url from password reset page

* Add await when inviting user so that errors will be displayed

* Allow for different email content when inviting user from setup / Set returnUrl param

* Code refinements

* Add backend tests

* Add frontend tests

* Run formatter

* handle email content when invitor's first name is empty/unset
2025-09-25 15:36:08 -03:00
Radoš Milićev
12f4387864 Fix links in CONTRIBUTING.md (#63653) 2025-09-25 14:31:54 -04:00
Jakub Chodorowicz
6b5e3bd646 Prg 154 allow running dev env on a custom port (#63875)
* Allow running dev on custom MB_FRONTEND_DEV_PORT

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>

* Unify port env var naming between JS and Clojure

* Add dev server port info

* Update devenv docs

Co-authored-by: Sébastien <sebastien@metabase.com>

* update docs

---------

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-09-25 20:18:33 +02:00
José H.
b7c4063dd9 [docs] Add SPARQL driver in community drivers list (#61994) 2025-09-25 13:57:36 -04:00
Anton
49fcc4a40f Fixed misspell in timezones.md (#64041) 2025-09-25 13:52:24 -04:00
Denis Berezin
7fb62b782b Document Layout - add charts side-to-side (#63101)
* Add working table with 2 columns

* Table layout and dnd polishing

* ResizeNode

* Refactor to use grid container

* Add Card node title ellipsification

* cleanup, add min height

* Fix FlexContainer to work with ResizeNode

* Fix empty ResizeNode after card dnd

* Document layout no dnd kit (#63363)

* using tiptap drag and drop

* Fix some issues with dnd

* Add support for resize node, fix styles

* Remove comments

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>

* Fixes after merge comments

* Fix issues with dnd logic

* Fix issue where rearranging columns within a flexContainer didn't respect which side of a cardEmbed we dropped; it always inserted dragged column to the left.

* Fix issue where moving a cardEmbed out of a flexContainer and placing it right after doesn't wrap the card in a resizer

* Fix issues with dropzones and card id

* Fix issue with column resize handlers

* Fix issues with cards previews on dnd

* Feat: UXW-717 Reconcile comments with document layout (#63593)

* UXW-717 Add comment option to cardEmbed menu
* UXW-717 Wires up comment option in cardEmbed menu
* UXW-717 Stubs out CommentsMenu reorganization so logic can be reused inside cardEmbeds (button and menu item)
* UXW-717 Design tweaks per design feedback (and fixes ts error)
* UXW-717 Updates hover state of cardEmbed ellipsis menu trigger per design feedback

* Fix issues with funnel chart and resizer

* Fix issues with column rearrange

* Fix adding third column position

* UXW-739 Adds ResizeNode wrapper to charts added by metabot

* UXW-749 [1/2] Fix: Cutting/copying a chart from a group then pasting it (cmd+v) results in a chart without a resizeNode

* UXW-749 [2/2] Fix: Copying and pasting from one chart to another doesn't preserve the structure correctly

* Refactor dnd logic - consolidate all use cases in HandleEditorDrop

* remove redundant message and add_message icons

* actually remove redundant message icons

* replace references to old icons with new icons

* Fix issue with dropping a card into existing flexContainer

* Fix issue with moving a card from one flexContainer into another

* UXW-748 - Fix broken document when typing with a card selected

* Handle dropping cards onto paragraphs (#63754)

* Handle dropping cards onto paragraphs

* PR Feedback

* cleanup flex containers

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>

* small feedbacks

* breaking up document drop handler

* UXW-689 - add basic e2e tests

* type fix

* loki diff

* Add more e2e tests

* Fix typecheck

* happy types

* passing document.cy.spec

* Fix e2e tests

* e2e test for card resizing

* flex container column resize tests

* Add node deletion e2e tests

* Fix review issues

* Try to fix typecheck

* Refactor useCommentsButtonProps to a react component

* final PR feedback

* fix removing a card via menu

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-09-25 21:08:49 +04:00
Phoomparin Mano
f393237eb9 Adjust link and action button layout for modular embedding cards (#63876) 2025-09-25 23:00:29 +07:00
Alexander Polyankin
48376d3f63 Fix field filters for type/TextLike (#64045) 2025-09-25 15:47:16 +00:00
github-automation-metabase
a67c48a036 Update generated docs (master) (#64017)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-25 10:29:52 -04:00
Alex Yarosh
8c3d77473a docs: renaming sheets columns (#64011) 2025-09-25 10:29:07 -04:00
Kamil Mielnik
9f029dbb2f WRK-900 [Bug] Detail View: related records are messed up in tables with no PK (#63977)
* Add repro for WRK-900

* Hide relationships when there's no PK
2025-09-25 21:07:38 +07:00
Kamil Mielnik
1adaaae66e WRK-899 Detail view: keep fields used as titles & sub-titles in the regular list of fields (#63889)
* Include header columns in the body of detail view

* Update tests
2025-09-25 21:07:07 +07:00
Oleksandr Solovyov
21956d6ab7 [serdes] NativeQuerySnippet collection_id should not prevent export (#63870)
Previously `extract-query "NativeQuerySnippet"` would use standard method for exporting entities, which checks for
collection_id in entity and prevents its export if it's outside requested collections.

While that makes sense for Cards (and we do escape analysis for those), snippets live in their own separate collection
namespace and this logic is not relevant to them. So now we export either those in requested collections _or_
dependencies of cards that are being exported.
2025-09-25 17:03:23 +03:00
Sébastien
fd94a0b0cb feat(sdk-embed): adds onVisualizationChange to InteractiveDashboard and InteractiveQuestion (#63969)
* Closes EMB-152 add onVisualizationChange callback to SDK embedding components

* .

* .

* .

* fixed schema

* height

* .
2025-09-25 15:59:28 +02:00
Nicola Mometto
7b6fbd6374 Python Transforms (#63700)
* cherry pick driver code (#63628)

* cherry pick driver code

* update changelog

* add type->database-type unit tests

* kondo

* create/insert table

* insert-from-jsonl test

* missing rename-tables for snowflake

* extend rename-tables-test to more drivers

* line breaks

* add driver python transform feature

* handle review comments

* kondo

* feat: replace string->val with a more generic insert-col->val

* remove non transactional impls

* chore: docsstrings

* TODO

* extra test

* fix extra test

* test all base-types

* fix sqls

* setup ci properly (#63693)

* S3 transport layer for python-runner (#63697)

* Add s3 dependencies (#63706)

* port prometheus/instrumentation (#63631)

* port prometheus metrics

* port instrumentation

* instrument existing transform paths

* wider buckets

* remove nil handling

* warn on nil bytes/rows

* add stage-type mapping

* typo

* split CI into separate jobs (#63746)

* Add python_runner.clj (#63747)

* Add python runner

* Kondo

* Traceback fix

* Remove dead code

* start the runner by default

* Cancellation not used yet

* Remove unused keys from fields-metadata

* cherry pick driver fixes

* start for postgres and mysql as well

* clickhouse fixes

* relax for snowflake

* typo

* exclude transform-python-test from appdb

* exclude transforms-python-test as well

* try exclude-tag here too

---------

Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* execute.clj (#63755)

* execute.clj

* with drivers test and execute test

* with wait tables

* missing utils

* /s/open/start

* fix failing tests due to getting the wrong source and target

* kondo

* move cancel-python-code-http-call to python-runner

* Dan's feedback

* we have 2 implementstation of cancel

* and 2 db-routing-enabled?

---------

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

* Transforms python APIs (#63762)

* transforms python api

* new tests pass locally

* clean up the db id utils

* move to util

* fix: missing refer

* chore: missing tests/kondo

* kondo

* more kondo

* fix: make function resilient

* eh, validate on old

* on new

* Add python transform support for jobs (#63764)

* Add python transforms job support

* Fix whitespace in when

* Avoid churn due to new local

* Add feature test

* Add ignore for logs (there might be away to avoid this)

* Use new target-database-id util

* Remove duplicated fn

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: Dan Stone <wotbrew@gmail.com>

* Move transform ordering tests to the python module (#63827)

* Add transform ordering tests to the python module

- Consistent with api tests for python transforms being in the python
module
- In practice transforms module 'knows' about python, so this is
organizational only
- Copied test helpers for now, not sure if functions strong enough to be
shared

* Check :transforms/python

* Proj python/table name len (#63842)

* feat: ensure temp-table-name respects max length

* add unit test

* add limit for missing drivers

* depend on it

* fix: use db instead of db-id

* Proj ptyhon/table swap (#63878)

* add rename feature, rename-table! multimethod

* add table swap with atomic or rename or fallback

* changelog

* drop requirement

* ensure we're testing replace flow

* wait for completion, table already exists

* wip

* add rename-table-test

* fix for snowflake

* fix: support bigints (#63898)

* fix: support bigints

* merge meta

* Frontend for Python Transforms (#63699)

* cherry pick driver code (#63628)

* cherry pick driver code

* update changelog

* add type->database-type unit tests

* kondo

* create/insert table

* insert-from-jsonl test

* missing rename-tables for snowflake

* extend rename-tables-test to more drivers

* line breaks

* add driver python transform feature

* handle review comments

* kondo

* feat: replace string->val with a more generic insert-col->val

* remove non transactional impls

* chore: docsstrings

* TODO

* extra test

* fix extra test

* test all base-types

* fix sqls

* setup ci properly (#63693)

* feat: add Python transform frontend pages

* Integerate with FE

* Fix wrong source field name used for showing script in transform view

* Revert "Fix wrong source field name used for showing script in transform view"

This reverts commit c7dfb541f3.

* Fix edit button not doing anything for python scripts

Closes QUE-2300

* call api proxy instead of internal call, also have settings page for transform

* python transforms now properly being scheduled

* FE select table when creating python transform

* multiple tables

* ensure tables are unique in tables selector

* source alignments

* run test

* dead code

* Better default schema, better docstring

* fixex test run

* add cancel button

* better endpoint name

* add cancel button to test python endpoint

* working button

* Auto-update Python transform function signature when table aliases change

- Automatically updates def transform(...) signature when aliases are modified
- Updates docstring Args section with aligned descriptions and table names
- Adds reset button to restore default slugified aliases
- Validates alias input to only allow valid Python identifiers
- Handles multi-line signatures for many parameters (>80 chars)
- Shows visual distinction between custom and auto-generated aliases
- Fixes code editor layout to prevent overlap with Run button

* feat: settings page with s3 configs

* feat: split settings

* remove placeholders

* eh, rename to appease the munging

* Logs are viewable inline during execution of python transforms

* Some minor fixes around docstring rewriting

* solve more fe lints

* fix type errors

* more type check fixes - including some smelly optional override stuff

* fix delete transform + table

* fix: don't remove indentation before """

* chore: allow empty schemas

* Critical fix: docstring indentation

* Separate file / s3 lifetimes / writes / reads from http calls (#63294)

- python-runner no longer simulates a single http api that does
everything (incl s3 interaction)
- Separates file lifetimes (shared storage) from execution
- Easier to see how to avoid reading into strings (e.g. for piping into
tmp files, follow up)

Earlier on we had a service that managed much of the I/O, metabase now
coordinates it so it makes little sense pretending there is still
an overall http api.
# Conflicts:
#	enterprise/backend/src/metabase_enterprise/transforms/api.clj
#	enterprise/backend/src/metabase_enterprise/transforms/execute.clj
#	enterprise/backend/src/metabase_enterprise/transforms/python_runner.clj
#	enterprise/backend/test/metabase_enterprise/transforms/python_runner_test.clj

* Add first-class PythonTransformSource type

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/transforms/components/QueryEditor/EditorBody/EditorBody.tsx

* Lay python editor out in two columns

* Make python editor resizable

* Move parseCSV to utils

* Split off results into separate component

* Add empty and loading state components

* Split up ExecutionResult component

* Move python execution to separate hook

* Remove color in editor gutter

* Increase indentUnit for python

* Allow extension to be passed to CodeEditor

* Add pandas completions

* Use DataGrid for displaying results

* Python library APIs (#63378)

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
# Conflicts:
#	enterprise/backend/src/metabase_enterprise/api/routes.clj
#	enterprise/backend/src/metabase_enterprise/transforms/python_runner.clj
#	enterprise/backend/test/metabase_enterprise/transforms/python_runner_test.clj
#	enterprise/frontend/src/metabase-enterprise/api/tags.ts
#	resources/migrations/057_update_migrations.yaml

* transforms python module (#63503)

# Conflicts:
#	enterprise/backend/src/metabase_enterprise/transforms/api.clj
#	enterprise/backend/src/metabase_enterprise/transforms/execute.clj
#	enterprise/backend/src/metabase_enterprise/transforms/jobs.clj
#	enterprise/backend/src/metabase_enterprise/transforms/util.clj
#	enterprise/backend/src/metabase_enterprise/transforms_python/python_runner.clj
#	enterprise/backend/test/metabase_enterprise/transforms_python/api_test.clj
#	enterprise/backend/test/metabase_enterprise/transforms_python/e2e_test.clj
#	enterprise/backend/test/metabase_enterprise/transforms_python/python_runner_test.clj

* Use normal title case

* Handle json-line output

* Remove unused props

* Rename PythonEditor to PythonQueryEditor

* Move script rewriter to utils

* Flatten Python transform page

* Rename shared to common

* Remove dead code

* Reduce specialization in Transform editor

* Remove unused props

* Move PythonQueryEditor to top-level components

* Nest Python editor components in PythonTransformEditor

* Restructure Python transform editor

* Split up component more

* Add helpers for python editor

* Disable default schema

* Add test ids

* Fix import path

* Reuse transform save modal

* Fix parameter

* Add e2e tests for python common lib

* Move python transform api to general transforms folder

* Move type to metabase-api/types

* Disable debugger for python transforms for now, allow to open it with query param

* Disable debugger hotkey for python transforms

* Add syntax highlighting to Python script on Transform page

* Remove cancelation code for now

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/transforms/components/RunButton/RunButton.tsx
#	enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformPage/RunSection/RunSection.tsx

* Add more generic RunInfo

* Remove unused LogOutput

* Set up python runner in CI (#63566)

* Check out with submodules in CI

* Include python-runner in docker compose for tests

* Set up python runner in CI

* Fix import

* Update python-runner
# Conflicts:
#	python-runner

* Fix font sizes

* Fix table layout

* Revert "Remove unused LogOutput"

This reverts commit 90c0704344.

* Add LogOutput back to runsection

* Remove duplicate schema field

* Use css instead of styled components

* Fix LogOutput styling

* Add transforms/python feature

* Do not allow picking unsupported databases

* Use slugify from metabase/lib/formatting

* Add type for transform alias map

* Fix some type imports

* Refactor PythonDataPicker

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/transforms/components/PythonTransformEditor/PythonDataPicker/PythonDataPicker.tsx

* Further refactors

* Use data selector for database picker

* Use data picker to pick tables

* Remove unused var

* Improve tests for python transform

* Fix duplicate imports

* Use DatabaseId in python transform

* Remove source/draft ambiguity in types

* Move library types to metabase-types/api

* Remove api transforms

* Remove vibe-comment

* Remove unused component

* Validate source more

* Move TableInput to separate file

* Remove TableOption type

* Simplify props

* Move AliasInput to separate file

* Remove unused props

* Add border to empty results

* Fix import

* Remove extension

* Move draft back to new python transform page

* Fix new python transform page nesting

* Simpify new transform page structure

* Add analytics to history revision and data reference (#63587)

* Transform run cancellation (#62387)

* Add cancellation to transform api

* Use effect to set polling state

* Add cancellation button to run button

* Set up cancellation on transform page

* Use confirmation modal to cancel transform

* Add run cancel button to run list

* Make api endpoint take transform id instead of run id.

* Fix cancelation api

* Add canceled state to TransformRunStatus

* Add canceled state to transform page

* Add polling to RunListPage

* Remove comment in code

* Set status to canceling when you click cancel

* Add canceling status

* Poll when the transform is canceling

* Add copy for runs that are being canceled

* Manually track fetching status for running and canceling

* Handle canceling status in utils

* Avoid wrapping cancel button in run list

* Add test for canceling run on transform page

* Add e2e for canceling test from runs page

* Fix prop type

* Change copy to Canceling

* Add custom color to canceled state

* Remove mock code

* Increase cancelation tiemout

* Fix copy in text

* Fix snowplow event

* Remove void specifier and close modal in handler directyle

* Add optimistic update for run cancelation

* Avoid manually tracking cancelation status

* Avoid useEffect when changing isPolling

* Add in missing helper

* Remove another useEffect

* Add placeholder run when starting

---------

Co-authored-by: Eric Normand <ericwnormand@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>

* Fix command z not working in connection string input (#63689)

- Stop preventing default event handling onPaste.
- Improve Cypress paste emulation to be compatible with React way of handling paste events.

* Transforms prepare for python (#63698)

* pull out transform run utils to prepare for python transforms

* fix: check running-run on transform-id, not run-id

* chore: put on a new line

* Fix #63629: Filter on cards causes an unnecessary horizontal scroll bar for public/static embedding (#63650)

* Closes EMB-50 tabs dimmed out on iOS (#63690)

* S3 transport layer for python-runner (#63697)

* Add s3 dependencies (#63706)

* port prometheus/instrumentation (#63631)

* port prometheus metrics

* port instrumentation

* instrument existing transform paths

* wider buckets

* remove nil handling

* warn on nil bytes/rows

* add stage-type mapping

* typo

* Implement data picker according to designs

* Further adjust to design file

* Fix some e2e tests

* Clone python runner when running CI

* Avoid starting the container in e2e tests twice

* Hide python runner admin route when user does not have the feature for it

* Remove unused variables

* Move Python runner amdin page to transforms plugin

* Do not show Python library link when the user does not have python transforms support

* Hide Python transforms features when the user does not have transforms-python token

* Use useHasTokenFeature hook where possible

* Add transforms-python feature

* Fix e2e tests

* Do not include python-runner in test docker-compose yet

* Tag tests for python transforms with @transforms-python

* Add helper to update Python library

* Add check for python output

* Fix Revert on python library when it does not exist

* Fix e2e test helper

* Add python runner settings in CI

* WIP

* Translate pandas definitions

* Add AnsiLogs component

* Use AnsiLogs in Logs components

* Use AnsiLogs in LogOutput component

* Remove token feature gate in enterprise folder

* Return alias instead of throwing

* Check type in isPythonTransform assertion

* Use isResourceNotFoundError

* Make transforms-python it's own plugin

* /s/localhost/localstack

* Add test for editing Python transform

* Verify that running the transform with the library works

* Add missing transforms-python feature to mocks

* Simplify source layout

* Change setting type of python runner token

* Fix tests

* Use ConcreteTableIds in python transforms only

* Deduplicate codemirror helpers

* Ignore errors in non-parseable JSON lines

* Use useLocation hook to enable debugger

* Use useErrorMessage helper

* Move SourceSection to transforms-python plugin

* Fix codemirror helpers

* Remove undefined color

* Fix types

* Fix codemirror helpers more

* Move transform ordering tests to the python module (#63827)

* Add transform ordering tests to the python module

- Consistent with api tests for python transforms being in the python
module
- In practice transforms module 'knows' about python, so this is
organizational only
- Copied test helpers for now, not sure if functions strong enough to be
shared

* Check :transforms/python

* Proj python/table name len (#63842)

* feat: ensure temp-table-name respects max length

* add unit test

* add limit for missing drivers

* depend on it

* fix: use db instead of db-id

* Proj ptyhon/table swap (#63878)

* add rename feature, rename-table! multimethod

* add table swap with atomic or rename or fallback

* changelog

* drop requirement

* ensure we're testing replace flow

* wait for completion, table already exists

* wip

* add rename-table-test

* fix for snowflake

* Extract sourceDatabaseId helper

* Fix e2e helpers

* Fix error in table picker

* Add missing test-id

* Fix transform tests

* Validate python source

* Fix issues after merge

* Fix tag test

* Fix other tag test

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Nicolo-Maria <nicolo.mezzopera@metabase.com>
Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Chris Truter <chris@metabase.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Eric Normand <ericwnormand@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>

* Proj python fix tests (#63970)

* add premium feature

* fix tests that didn't run previously

* exclude from vertica

* remove internal id from mongo table-rows

* fix: require transforms/python db feature for python transforms

* missing in stats

* fix for mongo

* whitespaces to appease the linter

* more more whitespace for the linter gods

* disambiguate for the e2e tests

* Some small type fixes for Python transforms  (#64021)

* Remove duplicate helper

* Add updateEnterpriseSetting helper for type-correctness

* Add missing python runner settings

* Use correct setting name

---------

Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nicolo-Maria <nicolo.mezzopera@metabase.com>
Co-authored-by: Chris Truter <chris@metabase.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Eric Normand <ericwnormand@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-09-25 13:03:38 +00:00
Romeo Van Snick
eeecd9a10a Fix native preview button in transforms (#63865)
* Allow passing language as a plugin to CodeEditor

* Pull out NativeQueryPreview

* Render NativeQueryPreview in the native transform editor

* Relax prop types

* Add e2e test for query preview in transforms

* Fix e2e tests

* Pass query instead of question

* Use CopyButton instead of bespoke component

* Fix unit test
2025-09-25 20:42:46 +10:00
Roman Abdulmanov
685424df74 fixed colors (#64029) 2025-09-25 10:06:54 +00:00
Phoomparin Mano
c4af9c415b Double scrollbars are showing up on metabase-browser when always show scrollbar is set (#63971) 2025-09-25 16:07:56 +07:00
Mahatthana (Kelvin) Nomsawadi
ca66414190 Reset colors when passing undefined to theme (#63957)
* Reset colors when passing undefined to theme

* Add tests
2025-09-25 10:07:43 +01:00
Tyler Plude
855e846d0a Add result ID to search click event tracking (#64009)
* Add result ID to search click event tracking

* include entity_id in SearchEventSchema type
2025-09-24 22:13:03 -07:00
Alexander Polyankin
270086315f Add last run status info to jobs (#63994) 2025-09-24 20:51:02 -04:00
Alexander Polyankin
16ea0dc141 Rename DatePicker intervals to "past" and "future" (#63993) 2025-09-24 20:49:52 -04:00
Timothy S. Dean
94b9737f0b Handle trailing spaces appropriately in snippet template tags (#63582)
Attempting to use a snippet template-tag with a trailing space in the snippet name (e.g., `{{snippet: foobar }}`) caused an exception to be thrown when running the native query (missing required parameter).

The regex used for identifying snippet tags will now strip trailing spaces appropriately.
2025-09-24 23:05:27 +00:00
Nathan Voxland
4448933543 Add MB_WEBPACK_PORT env variable config (#63355) 2025-09-24 17:15:19 -05:00
Alex Yarosh
a9e0afd420 interactive embedding notes (#64007) 2025-09-24 17:18:31 -04:00
Cam Saul
d018b4a1bc Use Lib for query->source-card; fix busted tests and busted X-Ray code (#63921)
* Misc Lib improvements

* Restore deleted function... for now

* Test fix 🔧

* Mark more stuff in Legacy MBQL utils as deprecated

* Use Lib for query->source-card

* Update modules config

* Update tests 🔧

* Fix the X-Rays

* Druid test fix 🔧

* Appease Kondo
2025-09-24 13:47:57 -07:00
lbrdnk
92011484de Disable fks sync on CH (#63976)
* Disable fks sync

* Describe implementation with warning

* Kondo
2025-09-24 22:34:03 +02:00
Alex Yarosh
c10fd5cd5b docs: db routing with static embedding (#63999)
* docs: db routing with static embedding

Clarified limitations of database routing in Metabase.

* Update docs/permissions/database-routing.md

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-24 20:22:35 +00:00
Oleksandr Yakushev
564556d706 [perf] Suggest drop-in replacements for clojure.core functions from metabase.util.performance (#62971)
* [perf] Suggest drop-in replacements for clojure.core functions from metabase.util.performance

* Fix walk for nil

* [perf] Make metabase.util.performance/reduce compatible with non-iterables (like strings)
2025-09-24 20:08:22 +00:00
Riley Thompson
5e55ecd75c Add regression test for clickhouse jdbc driver (#63906)
* add regression test for clickhouse

* revert to 0.8.4

* fix

* fix tests
2025-09-24 13:50:03 -06:00
Ngoc Khuat
0a33f82baf Fix static viz ignore viz-settings order (#63980) 2025-09-24 19:28:38 +00:00
github-automation-metabase
7ecdc2f757 Update generated docs (master) (#63947)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-24 13:34:01 -04:00
Phoomparin Mano
0bf1ac867f Replace interactive embedding card in embed modal with embed flow (#63942) 2025-09-25 00:14:36 +07:00
Cam Saul
cbdc23a7bf Fix sorting on aggregate columns (#63940)
* Fix sorting on aggregate columns

* cljfmt
2025-09-24 10:55:23 -06:00
Edward Paget
c59e9de090 fix: check email in update before validing for sso (#63915)
Changes to any user attribute for sso users were failing preventing them
from being to set their user locale. This was due to us not checking if
`email` is present in the body of the update request before failing a
`check-403` call if the user has an sso source.
2025-09-24 11:10:58 -05:00
Uladzimir Havenchyk
9668ebe98c chore: upgrade typescript to 5.9 (#61494) 2025-09-24 18:45:28 +03:00
Sébastien
3c2d46151b Closes EMB-851 static embed pin map (#63897)
* Closes EMB-851 static embed pin map

* .

* .

* Update frontend/src/metabase/visualizations/lib/map.ts

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

* Update frontend/src/metabase/visualizations/lib/map.ts

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

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-09-24 17:42:40 +02:00
Alexander Polyankin
1cacd1f510 Constraint available relative directions in the DatePicker for transforms (#63893) 2025-09-24 11:36:39 -04:00
Ryan Laurie
a8074ca04b Thinner + Darker Borders (#63675)
* fix button borders

* update-border-color

* dont mix the colors

* update loki

* update again

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-24 15:31:25 +00:00
Oleksandr Solovyov
28014961c3 add index on report_card.type (#63493) 2025-09-24 15:19:51 +00:00
Tyler Plude
ec5b20af0c [METABOT] Fix bug in Metabot search deduplication (#63943)
* [METABOT] Fix bug in Metabot search deduplication

* rm debug defs
2025-09-24 08:01:06 -07:00
dpsutton
ab68e21cf7 revert nett-common and netty-buffer bumps (#63967)
rather than 4.2.4.Final, they will now be "io.netty/netty-buffer
4.1.118.Final" which puts it the same as that in 3.5.0.

The issue is that both the bigquery-cloud-sdk driver and athena driver
get put onto the classpath and it depends on which order the drivers are
added for resolving which version of this netty buffer dep you get.

```clojure
user=> (metabase.classloader.core/the-classloader)
user=> (enumeration-seq (.. (Thread/currentThread) getContextClassLoader (getResources "io/netty/buffer/ByteBufAllocator.class")))
(#object[java.net.URL 0x3bb34fe "jar:file:/private/tmp/fixed-athena/plugins/bigquery-cloud-sdk.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"]
 #object[java.net.URL 0x4ac1867d "jar:file:/private/tmp/fixed-athena/plugins/athena.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"])
```

One annoying bit to keep track of this is that bigquery uses a regular
jar that specifies its dependencies, so you can you regular tooling:

```
clj -X:deps tree :aliases '[:drivers]' > /tmp/deps.with.netty.downgrade
```

And then see those deps:

```
  . metabase/bigquery-cloud-sdk /Users/dan/projects/work/metabase/modules/drivers/bigquery-cloud-sdk
    . com.google.cloud/google-cloud-bigquery 2.54.2
      . com.google.cloud/google-cloud-core 2.60.0
      . ... [lots omitted]
    . org.apache.arrow/arrow-memory-netty 17.0.0
      X org.apache.arrow/arrow-memory-core 17.0.0 :older-version
      . org.apache.arrow/arrow-memory-netty-buffer-patch 17.0.0
        X org.apache.arrow/arrow-memory-core 17.0.0 :older-version
        . io.netty/netty-buffer 4.1.110.Final
```

This version was created without any pinning of netty. Checking the
athena version is a bit more tricky. We use a fat jar. But you can
download the source from amazon as a jar with deps:

```
athena-jdbc-3.5.0-lean-jar-and-separate-dependencies-jars
```

https://docs.aws.amazon.com/athena/latest/ug/jdbc-v3-driver-previous-versions.html

This zip includes `runtime-dependencies` which includes
`netty-buffer-4.1.jar`

The pom inside of this jar specifies

```xml
  <parent>
    <groupId>io.netty</groupId>
    <artifactId>netty-parent</artifactId>
    <version>4.1.118.Final</version>
  </parent>
```

And `META-INF/maven/io.netty/netty-buffer/pom.properties` specifies

```
artifactId=netty-buffer
groupId=io.netty
version=4.1.118.Final
```

So i am confident now that with the pinning in bigquery and this version
here that regardless of class resolution from
"jar:file:/private/tmp/fixed-athena/plugins/bigquery-cloud-sdk.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"
or
"jar:file:/private/tmp/fixed-athena/plugins/athena.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"
you will get the same class and athena shall work again.
2025-09-24 09:48:38 -05:00
dpsutton
821c0f624b ensure type/* for base-type if otherwise not known (#63930)
* ensure type/* for base-type if otherwise not known

Using the follow query that returns pg arrays:

```sql
SELECT *
FROM (
  VALUES
    (1, ARRAY['https://example.com', 'https://example.org']),
    (2, ARRAY['https://test.com']),
    (3, ARRAY['https://foo.com', 'https://bar.com', 'https://baz.com'])
) AS adhoc_table (id, urls);
```

In 55 this returned a nil base-type

```clojure
user=> (metabase.query-processor.metadata/legacy-result-metadata
         {:database 2
          :type :native,
          :native {:template-tags {},
                   :query "SELECT *\nFROM (\n  VALUES\n    (1, ARRAY['https://example.com', 'https://example.org']),\n    (2, ARRAY['https://test.com']),\n    (3, ARRAY['https://foo.com', 'https://bar.com', 'https://baz.com'])\n) AS adhoc_table (id, urls);"}}
         1)
[{:display_name "id",
  :source :native,
  :field_ref [:field "id" {:base-type :type/Integer}],
  :ident "native[]__id",
  :name "id",
  :database_type "int4",
  :base_type :type/Integer,
  :semantic_type :type/PK}
 {:display_name "urls",
  :source :native,
  :field_ref [:field "urls" {:base-type nil}],
  :ident "native[]__urls",
  :name "urls",
  :database_type "_text",
  :base_type nil}]
```

In master, this just fails. If you remove the type checking in places,
it will eventually return similar.

This base-type is computed in sql-jdbc/metadata

```clojure
(mu/defn query-result-metadata :- [:sequential driver-api/schema.metadata.column]
  "Default implementation of [[metabase.driver/query-result-metadata]] for JDBC-based drivers. Gets metadata without
  actually running a query."
  ([driver :- :keyword
    query  :- :map]
   (driver-api/with-qp-setup [query query]
     (let [database               (driver-api/database (driver-api/metadata-provider))
           {:keys [query params]} (driver-api/compile query)]
       (query-result-metadata driver database query params))))

  ([driver      :- :keyword
    database    :- driver-api/schema.metadata.database
    ^String sql :- :string
    params      :- [:maybe [:sequential :any]]]
   (sql-jdbc.execute/do-with-connection-with-options
    driver
    database
    nil
    (fn [^java.sql.Connection conn]
      (with-open [stmt (sql-jdbc.execute/prepared-statement driver conn sql params)]
        (let [rsmeta (.getMetaData stmt)]
          (mapv (fn [i]
                  (let [database-type (.getColumnTypeName rsmeta i)]
                    {:lib/type      :metadata/column
                     :name          (.getColumnLabel rsmeta i)
                     :database-type database-type
                     :base-type     (or (sql-jdbc.sync.interface/database-type->base-type driver (keyword database-type))
                                        :type/*)}))
                (range 1 (inc (.getColumnCount rsmeta))))))))))
```

Before this change, there was no `or` and
`sql-jdbc.sync.interface/database-type->base-type` would just return
nil.

```clojure
user=> (metabase.driver.sql-jdbc.sync/database-type->base-type :postgres (keyword "_text"))
nil
```

Unfortunately this is a multimethod so we can't easily update it in one
spot to fall back to type/*. Each implementation must take care to do
this. A few do (clickhouse does) but a few dont (snowflake does not). So
we update this call site to ensure we have something from the
multimethod or add our own type/*

Why did this start happening now?
> I think it's because I added :metadata/model-metadata to :metabase.lib.schema.info/info at some point

Query info stashes the model metadata which is
```clojure
[:metadata/model-metadata {:optional true} [:maybe [:sequential ::lib.schema.metadata/lib-or-legacy-column]]]
```

We had been throwing errors asynchronously when trying to save metadata,
but now we have on-thread type mismatch for model metadata, which is
what is in the ticket.

* add test to ensure we can handle existing base_type nil's

this got annoying because legacy metadata from the app-db comes from a
different location. I was adding a card schema migration but this is
better here.

The previous commit makes sure we don't put out more bad data, but this
commit here ensures that we can update the card.
2025-09-24 09:37:11 -05:00
Vamsi Peri
7423aaf572 Remove sessions from sync metadata registry (#63949)
Remove sessions table from sync metadata registry
2025-09-24 14:34:51 +00:00
Phoomparin Mano
03f68f0a2c Add embed flow to the command palette (#63944) 2025-09-24 21:22:55 +07:00
Romeo Van Snick
e8f125c19b Add error info to transform job page (#63623)
* Move cron info up into cron section

* Move schedule explanation logic to utils

* Allow ReactNode as explain message

* Render explain message in cron component

* Add status to transform job page

* Add e2e tests for job error message

* Add assertion to lookup

* Add extract shared logic for run status

* Add missing test-ids

* Select correct section
2025-09-25 00:20:23 +10:00
Romeo Van Snick
21c5271879 Fix failing transform tags test (#63964)
* Do not expect tag to be in popover when it's already selected

* Invalidate specific tags when deleting a tag

* Fix other tag test
2025-09-25 00:19:57 +10:00
Jeff Bruemmer
45d701fd6b docs - updates on documents, comments, and Metabot (#63922) 2025-09-24 14:06:31 +00:00
Uladzimir Havenchyk
7c1152e9d0 chore: fix type usage of parameters in sdk (#63918)
* chore: fix type usage for parameters in sdk

* make types plane
2025-09-24 16:21:54 +03:00
Kamil Mielnik
ab20852102 DSN-70 Custom maps section in Admin should have a nicer empty state for its table (#63874)
* Add empty state to custom maps component

* Add unit test
2025-09-24 11:04:24 +00:00
Phoomparin Mano
137bc61a42 Show toggle for enabling saves for question embeds in embed flow (#63908) 2025-09-24 16:35:02 +07:00
Kamil Mielnik
f567aeece1 Do not render tabs in ParameterSidebar if there's only 1 tab (#63815) 2025-09-24 16:21:16 +07:00
Mahatthana (Kelvin) Nomsawadi
e60e38682b Don't send new user login for SDK or Embedded Analytics JS (#63883)
* Don't send new user login for SDK or Embedded Analytics JS

* Update tests

* Stop using hard-coded string to detect modular embedding headers

* Conform to spacing rule
2025-09-24 08:59:23 +01:00
Timofey Kachalov
84efc79be4 refactor(sdk-bundle): Adjust SDK compatibility warning messages and banners (#63919) 2025-09-24 11:58:32 +04:00
Kamil Mielnik
8de8d13eb6 Update copy (#63823) 2025-09-24 14:55:11 +07:00
Kamil Mielnik
a52d58a3e2 Make info panel headings consistent (color, line-height, margin-bottom) (#63882) 2025-09-24 14:54:27 +07:00
Kamil Mielnik
f34cb3d5c3 Use Tab component in TagEditorSidebar (#63829) 2025-09-24 14:52:49 +07:00
Kamil Mielnik
d8571ccabe Update background color of Field items in TableSection (#63831) 2025-09-24 14:52:15 +07:00
Kamil Mielnik
19f279610b Remove forceActiveStyle prop from ActionButton (#63869) 2025-09-24 14:51:51 +07:00
Riley Thompson
5647233576 Fix starbust query cancellation with isClosed proxy implementations (#63857)
* add isClosed impls to proxys

* use mt/id in test

* test all drivers

* check if statements are supported, refactor statement-supported? multimethod to drive feature

* add namespace to statements feature
2025-09-24 05:10:13 +00:00
Riley Thompson
14481bcf2f Clean up transforms test schemas (#63406)
* clean up transforms test schemas

* use destroy-dataset! for bigquery
2025-09-24 05:08:55 +00:00
Mahatthana (Kelvin) Nomsawadi
bbccbb4842 fix(embed-js): Only report analytics when not in the preview (#63812)
* Only report analytics when not in the preview

This would avoid confusing preview usage with the actual usage

* Ensure analytics would be report even if iframe isn't ready

* Add E2E test

* Make the test pass

* Stop relying on redux store to fetch `site-url`

* Clarify test with comment

* Add tests

* Fix linter

I was naming a file wrong, so it doesn't match unit test spec. This rule
apparently doesn't take tests into account, which is great.
2025-09-24 06:06:45 +01:00
Cam Saul
4b99060f46 Do not recurse forever when resolving bad :field refs for expressions (#63926) 2025-09-23 17:57:27 -07:00
Cam Saul
3903af487f Misc Lib improvements to support wider Lib usage in the backend (#63911)
* Misc Lib improvements

* Restore deleted function... for now

* Test fix 🔧
2025-09-24 00:14:30 +00:00
Phoomparin Mano
0fb061b839 Minor visual improvements for embedding hub (#63813) 2025-09-24 06:14:51 +07:00
Tyler Plude
ab9e7bbcb8 [BOT-292] Metabot with Search 2.0 (#62067)
* Add search endpoint for Metabot and adjusted metadata

* More tests and better split out of logic into separate files

* dedupe search terms and description if they happen to be the same

* fix bad merge conflict

* Answer blending sql querying via search tables (#62415)

* Only put tables used in SQL into context
* Change format of injected database content by reusing existing models
* Create separate function for new schema enchancement
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* Add table reference for implicitly joinable fields in context injection (#62753)

* Update Metabot profile IDs (#62864)

* [Answer blending] Updates to the metabot admin configs (#62551)

* remove ability to configure the selected collection for default metabot

* add verified toggle

* add migrations for metabot collection configuration changes

* add metabot PUT endpoint, rip out metabot entities endpoints and usages, convert FE over to new FE, fix tests

* remove metabot_entity table, model, usage and refactor code to use updated metabot and metabot_prompts schemas

* enforce verification and regenerate prompts on verification + collection id change

* fix bad references

* fix bad regexp for fetch-mock collections by id endpoints breaking unit tests

* fix kondo

* fix + increase tests for enterprise/backend/test/metabase_enterprise/metabot_v3/tools/api_test.clj

* fix migration boolean default value syntax

* maybe fix be tests

* fix some tests

* enforce verified filter on the search endpoint

* factor in verified check into find-metric

* hide verification setting behind token feature check, fix migration lint, do not migrate collection id for default metabot, fix kondo errors

* fix core tests

* fix kondo

* fix most of the failing serialization tests

* fix migration lints

* fix one test file

* maybe fix migration failures

* move test resource file

* prevent default metabot from getting a collection id configured

* yolo

* add cascade delete to entity drop table migration

* increase unit tests for verification config UI

* remove extra add column

* fix migration... i think for real this time

* for real for real fix migrations

* no really

* tests fixes and add preventing verification toggle if the instance does not have the content_verification feature

* fix failing feature tests in ci

* fix one more

* fix cljfmt issue

---------

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

* [Metabot] Quick slash command + dynamic profile ui (#62909)

* quick slash command + dyanmic profile ui

* add back code i did not mean to remove

* fix failing test

* Revert "fix failing test"

This reverts commit b1c7e9efb9.

* [BOT-284] BE for notebook query tool table support (#62710)

* init

* moved query-table endpoint to query-datasource; add support for both model and table ids

* unit test fixes

* use existing card-query and table-query utils

* adding unit tests

* [Answer blending] Respect collection id in search (#63150)

* remove find metric tool

* adjustments to search endpoint

* add tests

* fix failing test in ci

* add way to override the metabot id

* add way to override metabot request id

* fix whitespace lint

* missing paren...

* fix failing test

* New BE `/search` endpoint for ai-service `SearchTool` (#63154)

* new metabot search tool BE endpoint

* remove debug prints

* parallel searches; incomplete effort to return more fields for results

* Simplify result transforming & response schemas

* unit tests

* kondo fixes; pr feedback

* fallback search model list

* remove references to MetabotEntity model which got re-added incorrectly in rebase

* Make internal metabot use verified content by default (#63529)

Update linter for usage of task in metabot-v3

Move suggested-prompts to separate namespace

Add collection condition only when current-user-id

Add startup task

migration

Update tests

Verified cards only

Test

Docstrings

Limit number of entities

Review feedback

* [METABOT] Default use_verified_content to false; tweak prompts (#63843)

* default use_verified_content false; limit amount of prompts

* reworked unit test to not depend on ai-service or appdb contents

* PR feedback

* remove mock of get metrics and models in favor of mt/with-empty-h2-app-db

* Small refactors & simplifications to metabot PUT endpoint and suggested
prompts job

* small simplification, use m/distinct-by for deduping tables

* rm deprecated search_data_sources

* Cleanup and prioritize verified content (#63877)

* Remove now redundant content verification guard

* Prioritize verified content

* Redundant merge

* Test

* ensure field IDs in user_is_viewing context are snake_cased

* Use proper source column alias as name for the model / table fields (#63826)

* Use proper source column alias as name for the model / table fields

* Add name as fallback

* test fix

* switch to using :lib/desired-column-alias, revert test fix

---------

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

* Fix some tests: consistent use of snake_case, and a :lib/source-column-alias fallback for model field :name

* fix more field_id snake_case issues

* fix another snake case issue - revert result_columns back to result-columns

---------

Co-authored-by: Thomas Schmidt <thomas.heinz.schmidt@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-09-23 14:42:29 -07:00
Alex Yarosh
a137631b7f docs: time grouping stages (#63934)
* docs: time grouping stages

* Update docs/dashboards/filters.md
2025-09-23 21:19:43 +00:00
Edward Paget
e4a04ebc05 fix: jetty stats handler tests flake (#63912)
* fix: jetty stats handler tests flake

These tests could hang indefinitely on the `(.join server)` statement
because the core.async/go block handling async requests was incorrectly
doing a blocking take `<!!`. This also updates our :dev alias to enable
core.async to print warnings when using blocking operations in `go` blocks.

* fixup! oncomplete dispatch in go block

* fixup! using alts!! in go block
2025-09-23 16:17:41 -05:00
Stas Gavrylov
432287f763 update comments email template (#63626)
* WRK-893: Update API to store comment html content

* WRK-891: Add HTML content sending in comments. Add proper SmartLink serialization to HTML.

* WRK-891: Update comment email template to display comment content

* WRK-891: Fixes for comment email template. Add space insertion after smartLink

* trigger comment notification by id

* put old api behavior back and cleanup comment notification context

* whitespace

* fix tests

* Fix changeset author

* WRK-891: Fix smart links serialization. Add parent comment display in email

* Add style payload for comments email template

* fix types

* 🙄

* test email changes

* test email again

* make email formatting looking perfect

* cleanup

* require html content to be provided when posting a comment

* fix e2e test

* fix another e2e test

* pass 0 as tiptap placeholder when no label available

---------

Co-authored-by: Oleksandr Solovyov <o@solovyov.net>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-09-23 21:16:18 +00:00
Oreon Lothamer
d8be52f651 use vertica-ce from ecr (#63609)
* use vertica-ce from ecr

* use CI_IAM_ROLE for vertica ECR

* Adjust test

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-09-23 11:09:32 -10:00
Nathan Voxland
6516199e3f Improve FieldValues inactive check (#63847) 2025-09-23 21:04:09 +00:00
Thomas Schmidt
1bba35237e Auto set template tags (#63691) 2025-09-23 19:19:34 +00:00
Alex Yarosh
4337a1baf3 docs: scim <> saml interaction (#63925) 2025-09-23 15:07:38 -04:00
Brad Anderson
23cb8b11c0 Fix: #50011 Hides "Here are some explorations of" when there are no explorations (#63839) 2025-09-23 14:07:33 -04:00
Cam Saul
c863f41c2a Improved mu/defn and mu/fn macros: only evaluate schemas once (#63737)
* Mega Malli fn improvements

* Remove commented out code
2025-09-23 10:44:03 -07:00
Jakub Chodorowicz
34e7a0e9f1 Adjust DB form page width and form fields spacing (#63818)
* Adjust DB form page width and form fields spacing

* Extract layout field settings to one file

* Use lg spacing between form fields

* Conditionally add labelProps property

* Fix typo

* Refactor deprecated default export

* Simplify responsive max width

* Simplify DB page responsive styles

* Add card background to add db form
2025-09-23 18:25:56 +02:00
dpsutton
454a05e3c6 Downgrade athena (#63894)
having issues with classpath. I _think_ that athena is finding the
bigquery provided version of a netty class and that is failing. but it's
a bit difficult to follow.

downgrading now until we can take time to understand and sort it.
2025-09-23 10:53:34 -05:00
Ryan Laurie
1ed050b03d Make Loki work more consistently (#63859)
* fix loki?

* update loki scripts

* use ci

* remove double build

* update scripts

* update documentation
2025-09-23 15:16:54 +00:00
Robert Kosara
9041dbb329 docs: Remove the +New option for creating new models (#63861)
* Remove the +New option for creating new models

* Bring back the from-scratch approach

Based on Alex's requested change, but also realized that you can use the command palette

* Move note about models getting pinned back into the new model section

* Format UI terms using bold instead of italics
2025-09-23 08:08:29 -07:00
lbrdnk
63cc5c3137 Semantic search token usage tracking (#63591)
* Pass type of embedding request

* Initial migration

* Add remaining opts args

* Add SemanticSearchTokenTracking module

* Connect token tracking to ai-service impl

* Add test for token tracking writes.

* Remove prompt_tokens including migration

* Add usage trimmer job

* Trimmer test

* Activate trimmer job

* test

* Record tokens for openai

* Update test

* Use total-tokens

* Comment

* linter

* Add index

* Exclude from copy
2025-09-23 16:50:55 +02:00
Phoomparin Mano
7551f766dd Hide non-customer-facing embedding hub settings (#63838) 2025-09-23 21:45:31 +07:00
John Swanson
f4b675b3f2 Serialize transforms (#63658)
Serialization for transforms
2025-09-23 07:34:17 -07:00
github-automation-metabase
123e0cef51 Update generated docs (master) (#63864)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-23 09:17:55 -04:00
Fraser
eed3bb1e19 Make timing steps continue-on-error (#63881) 2025-09-23 14:11:01 +02:00
Cam Saul
dad9b5c709 Don't spend minutes trying to generate descriptions for massive schemas (#63739)
* Don't spend minutes trying to generate descriptions for massive schemas

* Cljs test fix 🔧
2025-09-23 14:38:07 +03:00
Nicolò Pretto
166e20c944 fix typo in WhatsNewNotification: 'dimiss' -> 'dismiss' 2025-09-23 09:51:15 +00:00
Jakub Chodorowicz
e4d0318213 Migrate last direct usage of settings store url, to useStoreUrl (#63771) 2025-09-23 08:56:04 +02:00
Alexander Polyankin
3913c6e850 Fix pills input padding (#63840) 2025-09-23 02:03:55 +00:00
Fraser
f6384ac6f3 Automatically update e2e timings (#61950) 2025-09-23 10:19:09 +12:00
Maz Ameli
bd6d5e527b Replace usage of info_filled icon with info icon (#63734)
* replace usage of info_filled icon with info icon

* Update Loki Snapshots

* drop unused info_filled icon

* Update Loki Snapshots

* update stories

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-09-22 21:10:42 +00:00
Maz Ameli
4dac7d9dcf remove dropshadow from glossary container (#63730)
Co-authored-by: Stas Gavrylov <stas@metabase.com>
2025-09-22 21:04:20 +00:00
Nemanja Glumac
5bda80e53f Add simple event tracking for drill-thrus and other "click actions" (#63792) 2025-09-22 22:56:04 +02:00
Sébastien
07a34dc556 Removed loki flaky test (#63824) 2025-09-22 13:15:17 -07:00
Alex Yarosh
3a4e2a311c docs: send only attachements (#63846)
* docs: send only attachements

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-22 20:04:43 +00:00
Jeff Bruemmer
f0427f0a34 docs - add glossary and image (#63844) 2025-09-22 16:00:04 -04:00
Jeff Bruemmer
ebcdcf1ce9 Remove .json format from subscription options (#63849) 2025-09-22 15:59:09 -04:00
Nick Fitzpatrick
20afc08468 Hiros document desires (#63035)
* starting document copying

* Document copy from collection page

* remove card node
2025-09-22 16:53:00 -03:00
Alexander Polyankin
c60b139cf4 Fix removing all tags from a transform job (#63837) 2025-09-22 14:24:19 -04:00
Alexander Polyankin
cb7e5a0437 Transforms schedule component (#63767) 2025-09-22 18:04:33 +00:00
Anderson
1e4e4bcae5 Update user invitation email design (#63682)
* Update user invitation email design

* Add alt attr to img element

* Update system event clj test
2025-09-22 14:32:20 -03:00
Phoomparin Mano
f65c0fb194 Add completion checks for creating models in embedding hub (#63661)
* update test and implementation

* update models query to make more sense

* flake fix: try adding timeouts to Done

* remove cy.wait from tests

* wait for model creation

* modify create model tests
2025-09-22 16:33:12 +00:00
Nathan Voxland
fa187a027d Fix crash during reindexing of analytics on upgrade (#63770)
* Don't force reindex on serialization load to be async

* Allow reindex to be controlled when calling load

* Keep load reindex sync for now

* Make reindex async again
2025-09-22 10:30:57 -05:00
Alexander Polyankin
d25a14aec8 Show an error that variables in transforms are not supported (#63759) 2025-09-22 15:30:17 +00:00
Brad Anderson
4a59711053 Fix: #63258 + UXW-570 Fix truncated dashboard notifications (#63726)
* UXW-570 Fix truncated toast messages

* UXW-570 Updates e2e test

* #63258 Fix e2e tests (breaking because toast is wider, blocks previously unobscured elements)
2025-09-22 11:18:46 -04:00
Nemanja Glumac
c33489af35 Add tracking to bookmarks (#63752) 2025-09-22 15:12:24 +00:00
Alexander Polyankin
d6c7ef8e63 Fix MLv2 error with audit v1 (#63772) 2025-09-22 10:27:41 -04:00
Nemanja Glumac
6e7aeb6d71 Add tracking to the metadata changes from admin (#63672) 2025-09-22 16:20:52 +02:00
github-automation-metabase
6db1e7e2ad Update generated docs (master) (#63810)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-22 09:37:11 -04:00
Alexander Polyankin
f901d08b1c Hide cursor in the readonly native editor (#63774) 2025-09-22 13:26:06 +00:00
Alexander Polyankin
5bc7d211ba Remove unsupported buttons from native editor in transforms (#63768) 2025-09-22 09:20:43 -04:00
Alexander Polyankin
d04ffc2925 Change the default editor height for transforms (#63773) 2025-09-22 09:20:27 -04:00
Kamil Mielnik
c471c32f3f Allow to un-resolve deleted comments (#63429) 2025-09-22 10:06:21 +03:00
Romeo Van Snick
d867a09072 Convert MBQL transforms to SQL (#63565)
* Add a controlled version of NotebookNativePreview

* Use ReactNode instead of JSX.Element

* Add a button to toggle native sql

* Add sql preview to transform query editor

* Pull out resizehandle component

* Add e2e test for converting an MBQL transform to a native transform

* Move native query toggle out of header

* Move Native editor sidebar to separate component

* Fix overflow in native sidebar

* Fix copy on button

* Move connected NotebookNativePreview to query_builder

* Remove canConvertToNative prop

* Rename prop

* Move styles to css
2025-09-22 15:42:54 +10:00
github-actions[bot]
090fbc2d5a [chore] Update E2E test timings with recent data (#63327) 2025-09-22 14:27:07 +12:00
Fraser
33fe7b3afe Delete skipped expression popover e2e tests (#63732) 2025-09-22 12:08:46 +12:00
Phoomparin Mano
ea7eeeb15e Update related settings copy and alignment on embedding hub (#63660) 2025-09-20 09:46:30 +07:00
Phoomparin Mano
b693b137f6 Replace the language selection step on the setup flow with the language selector (#63584) 2025-09-20 08:55:34 +07:00
Phoomparin Mano
1a6044bbb3 Use blue shadow on embedding hub card to highlight next step (#63655) 2025-09-20 08:55:24 +07:00
Phoomparin Mano
e5706a4def Adjust the embedding homepage copy and add upsell for OSS (#63646) 2025-09-20 08:55:09 +07:00
Nicolò Maria Mezzopera
0014bbc775 fix(ci): properly account for ci-skip condition in jobs that specify IF condition (#63785) 2025-09-19 22:10:56 +00:00
Alex Yarosh
b96b8fbead docs: fix include in editable tables (#63783) 2025-09-19 17:55:54 -04:00
Phoomparin Mano
7e09b87447 Update embedding hub card copy for embed in your code step (#63656) 2025-09-20 04:46:49 +07:00
Brad Anderson
102025c69c UXW-753 Fix issues with Detail visualization columns getting out of sync (#63769) 2025-09-19 17:12:14 -04:00
Alex Yarosh
80b31c4b1e docs: progress bar (#63779)
* progress bar

* header

* Optimized 3 images, saved 190.8 KB (53.7% smaller)

* link

* Apply suggestions from code review

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

* feedback

* links again?..

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-19 16:59:49 -04:00
Alex Yarosh
d4adbb7ef0 docs: snippets (#63761)
* snippets

* Optimized 5 images, saved 209.2 KB (50.7% smaller)

* link

* sql -> native

* Apply suggestions from code review

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

* Update docs/questions/native-editor/snippets.md

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

* rawwwwww

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-19 16:50:12 -04:00
Jeff Bruemmer
04192e385d docs - model list view (#63727) 2025-09-19 20:48:25 +00:00
Uladzimir Havenchyk
18b9ae17c7 rework comments sidebar (#63636)
don't use Sidesheet and use sidebar on the same level as Metabot sidebar, so both sidebars can be opened side by side
2025-09-19 19:48:46 +00:00
Alexander Polyankin
b69218fe00 Transforms copy changes (#63760) 2025-09-19 15:03:48 -04:00
Alexander Polyankin
61a8141a44 Remove selected tags (#63714) 2025-09-19 18:40:19 +00:00
Cam Saul
2ed9e3e1d4 Delete dead FE code (#63740)
* Delete dead FE code

* Update enterprise/frontend/src/metabase-enterprise/audit_app/lib/cards/queries.js

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-09-19 10:18:13 -07:00
Abed Habli
a1a9e71867 docs: renaming Debian references (#63763)
* Renaming debian

* redirect to the doc
2025-09-19 17:52:17 +02:00
Edward Paget
0ed177ddb1 fix: remove commented out card pivot test (#63701) 2025-09-19 15:41:59 +00:00
Mahatthana (Kelvin) Nomsawadi
814dd5c800 Fix static embedding dashboard calling GET: /api/dashboard unnecessarily (#63753) 2025-09-19 21:32:19 +07:00
Oleksandr Solovyov
8285e38f9c cleanup v3/v2/ (#63634) 2025-09-19 17:25:58 +03:00
github-automation-metabase
8ad7ee944d Update generated docs (master) (#63736)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-19 09:07:22 -04:00
Phoomparin Mano
975002a6f7 Revert the cloud setup flow's layout to match self-hosted setup flow (#63577) 2025-09-19 18:34:03 +07:00
Phoomparin Mano
3fddbec54e feat(embed-js): better error message when useExistingUserSession fails (#63125) 2025-09-19 18:13:18 +07:00
Sébastien
c3461ab646 Closes EMB-816 misleading text for number of rows (#63561)
* Closes EMB-816 misleading text for number of rows

* updated e2e tests

* marked a test as flaky until we figure out what is up with it

* addressed legit comment

* Update Loki Snapshots

* loki

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-19 12:31:22 +02:00
Phoomparin Mano
b5878d9bf5 Show the embedding hub checklist in embedding homepage (#63596) 2025-09-19 16:47:51 +07:00
Oleksandr Solovyov
6206b6f204 document comments: enable user mentions (#63426) 2025-09-19 09:42:06 +03:00
Mahatthana (Kelvin) Nomsawadi
4ef96bd73a feat(embed-js): Add analytics to Embedded Analytics JS (#63580)
* Add Embedded Analytics JS usage snowplow schema

* Add analytics

* Clarify code with comments

* Fix analytics logic + fix typing

* Add unit tests

* Make E2E embedded analytics JS util supports multiple elements

* Fix code not working in Cypress for some reason

* Add E2E test suite

* Fix import order

* Remove extra line

* Fix E2E from util API change

* Update snowplow/iglu-client-embedded/schemas/com.metabase/embedded_analytics_js/jsonschema/1-0-0

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

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

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

* Update e2e/support/helpers/e2e-embedding-iframe-sdk-helpers.ts

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

* Fix E2E by updating a function API

* Pass snowplow schema lint

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-09-19 06:46:35 +01:00
Romeo Van Snick
b336da1517 Allow going back to snippet root collection (#63549)
* Allow going back to root collection from top-level snippet collection

* Add e2e test for snippet collections
2025-09-19 12:23:34 +10:00
Alexander Polyankin
c98dca560d Unskip transform tests (#63733) 2025-09-18 21:50:52 -04:00
github-actions[bot]
e370820778 Fix: Weird menu state shown when there are no questions in recents (#62985)
* Fix: Weird menu state shown when there are no questions in recents

Fixes #62728

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

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

* fix the robot's mess

---------

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-09-18 23:06:45 +00:00
github-actions[bot]
69405a7dea Update translations 2025-09-16 (#63546)
* Update translation sources 2025-09-16

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-09-18 23:06:31 +00:00
Fraser
c0ca9e0493 Only run auto-backport when a backport label is added (#63606)
* Only run auto-backport when a backport label is added

* Assign backported PR to original PR creator
2025-09-18 16:57:42 -06:00
Fraser
ced8d84def Delete out of datte skipped caching test (#63680) 2025-09-19 10:39:24 +12:00
Fraser
8c8279e570 Delete unimplemented FKs in nested queries e2e test (#63684) 2025-09-19 10:39:00 +12:00
Fraser
6afe00b9f1 Fix custom column isNull e2e test (#63685) 2025-09-19 10:38:45 +12:00
Fraser
6e8cca3da7 Unskip join source table e2e tests (#63678) 2025-09-19 10:38:12 +12:00
Maz Ameli
a1582d07de Fix palette preview in Branding section (#63677)
* add tabs

* move reset button and remove needless tableheader

* fix palette preview chart

* change tab text

* cleanup

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-09-18 21:19:11 +00:00
Ryan Laurie
40387cc586 Update ActionButton to typescript (#63454)
* update ActionButton to typescript

* address review comments

* replace ref
2025-09-18 21:14:07 +00:00
Alexander Polyankin
911da7f851 Make transform list pages wider (#63710) 2025-09-18 20:49:56 +00:00
Jeff Bruemmer
4deefb87b3 docs - basic table editing (#63601) 2025-09-18 16:36:23 -04:00
Timofey Kachalov
c56432c2f7 Properly run tiles-query as admin user for static endpoints if JWT token is valid (#63692) 2025-09-19 00:11:33 +04:00
Timofey Kachalov
f9e9a20d94 fix(sdk): Properly load Tiles from MB instance (#63676) 2025-09-19 00:07:31 +04:00
Alex Yarosh
5d68e7363f docs: remove references to date coercion (#63716) 2025-09-18 15:58:58 -04:00
Stas Gavrylov
0efa8eac5b Data Reference – Glossary (#63576)
* feat: add glossary UI

* fix: line-height

* Styling

* Show edit button only on hover

* Make the term required

* Delete modal

* Actions menu

* Fix popovers opened for multiple terms

* Autofocus

* glossary api

* serialization

* support moving from h2 to cloud

* WRK-890: Replaces mocked glossary API with proper integration

* WRK-889: Refactor Glossary editing and overall styling

* WRK-889: Fix layout margin

* WRK-889: Update Glossary styling

* WRK-890: Address design comments. Refactor GlossaryTable into a separate component

* WRK-890: Add unit tests for GlossaryTable component

* WRK-890: Add e2e tests for Glossary

* WRK-890: Cleanup css, fix linter

* add boat empty state

* add explanatory text

* text and font weight tweaks

* tweak placeholder text

* improve delete confirm modal

* WRK-889: Update Glossary styling, implement hotkeys handling

* WRK-890: Add optimistic updates for Glossary editing

* WRK-890: Fix unit tests

* WRK-889: Adjust line height for glossary items

* WRK-889: More styling adjustments for GlossaryRowEditor

* WRK-890: Fix e2e tests

* fix merge results

* WRK-890: Address PR comments

* serialization fixes

---------

Co-authored-by: Konstantin Darutkin <spalt08@mail.ru>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Oleksandr Solovyov <o@solovyov.net>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-09-18 22:38:56 +03:00
Oleksandr Yakushev
6e3dfdb62b Upgrade c3p0 to 0.11.2 (#63213) 2025-09-18 21:47:35 +03:00
lbrdnk
e915bf2d40 Add guards to semantic search jobs (#63694) 2025-09-18 18:57:14 +02:00
Cam Saul
118613ab89 Binning middleware needs to update :lib/original-binning as well (#63673)
* Binning middleware needs to update `:lib/original-binning` as well

* Test fixes 🔧

* cljfmt
2025-09-18 09:37:29 -07:00
Alexander Polyankin
4f764b82ef Do not autopivot transform query results (#63669) 2025-09-18 16:21:09 +00:00
Alexander Polyankin
ce5a554d4d Add transform count to the job list (#63647) 2025-09-18 16:16:51 +00:00
github-automation-metabase
eb5100abc6 Update generated docs (master) (#63679)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-18 11:44:29 -04:00
Sébastien
64630276e3 Closes EMB-50 tabs dimmed out on iOS (#63690) 2025-09-18 15:57:35 +02:00
Brad Anderson
6f660a3090 Fix #63629: Filter on cards causes an unnecessary horizontal scroll bar for public/static embedding (#63650) 2025-09-18 09:51:31 -04:00
Nicola Mometto
eab4bf076d Transforms prepare for python (#63698)
* pull out transform run utils to prepare for python transforms

* fix: check running-run on transform-id, not run-id

* chore: put on a new line
2025-09-18 13:46:24 +00:00
Jakub Chodorowicz
2be60d80c3 Fix command z not working in connection string input (#63689)
- Stop preventing default event handling onPaste.
- Improve Cypress paste emulation to be compatible with React way of handling paste events.
2025-09-18 15:20:03 +02:00
Romeo Van Snick
3038880e46 Transform run cancellation (#62387)
* Add cancellation to transform api

* Use effect to set polling state

* Add cancellation button to run button

* Set up cancellation on transform page

* Use confirmation modal to cancel transform

* Add run cancel button to run list

* Make api endpoint take transform id instead of run id.

* Fix cancelation api

* Add canceled state to TransformRunStatus

* Add canceled state to transform page

* Add polling to RunListPage

* Remove comment in code

* Set status to canceling when you click cancel

* Add canceling status

* Poll when the transform is canceling

* Add copy for runs that are being canceled

* Manually track fetching status for running and canceling

* Handle canceling status in utils

* Avoid wrapping cancel button in run list

* Add test for canceling run on transform page

* Add e2e for canceling test from runs page

* Fix prop type

* Change copy to Canceling

* Add custom color to canceled state

* Remove mock code

* Increase cancelation tiemout

* Fix copy in text

* Fix snowplow event

* Remove void specifier and close modal in handler directyle

* Add optimistic update for run cancelation

* Avoid manually tracking cancelation status

* Avoid useEffect when changing isPolling

* Add in missing helper

* Remove another useEffect

* Add placeholder run when starting

---------

Co-authored-by: Eric Normand <ericwnormand@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-09-18 10:34:50 +00:00
Nemanja Glumac
b2b04e9206 Add analytics to history revision and data reference (#63587) 2025-09-18 09:44:49 +00:00
Alexander Polyankin
ef8111537e Update copy in UpdateTargetModal.tsx (#63667) 2025-09-18 08:11:11 +00:00
Nemanja Glumac
7bce3ff38a Add analytics to Metabot events (#63415)
* Add Metabot events

* Fix tooltip label

* Add new event for metabot chat controlled from the native editor
2025-09-18 08:44:19 +02:00
Cam Saul
066d3a233d Pure Lib QP: remove code to wrap legacy middleware (#63645)
* cumulative-aggregations-middleware => Lib

* Ensure MBQL 5

* Fix NOCOMMIT

* Fix indentation

* Pure-Lib QP :party:

* Remove some more unused legacy MBQL utils
2025-09-18 00:13:20 +00:00
Fraser
095ad3c39c Tag latest flaky tests (#63617) 2025-09-18 11:54:13 +12:00
Fraser
d50561227f Fix skipped chart drill-through e2e tests (#63548) 2025-09-18 11:18:02 +12:00
Ryan Laurie
63f9d193a9 Use Iframe for changelog (#62943)
* use iframe for changelog

* add query params and tabs

* always show update info

it's useful even if you're on the latest version

* remove metabase as configurable host

* always allow changelog/releases in iframes

* fix tests

* fix tests

* update tests

* use root metabase domains

* fix test

---------

Co-authored-by: John Swanson <john.d.swanson@gmail.com>
2025-09-17 14:40:52 -06:00
Alexander Polyankin
0a18c13feb Skip failing tests (#63663) 2025-09-17 18:57:52 +00:00
Nemanja Glumac
a58c63a74f Add analytics to x-rays (#63498) 2025-09-17 19:55:51 +02:00
Alexander Polyankin
96f1ef42a2 Disable transform editing buttons when running (#63642) 2025-09-17 16:05:51 +00:00
Jakub Chodorowicz
fd073fb8b1 PRG-130 Send parse connection string parsing events only on blur (#63558)
* Send parse connection string parsing events only on blur

* Use synchronous last parsing result for monitoring

* Improve test assertions for connection string events

* Make sure we don' track the same parsing event again

* Refactor ts-match to simple if conditions

* Make lastStatus have the same success value depending on non undefined values

* Improve the snowplow Cypress test setup for connection string
2025-09-17 16:03:04 +00:00
Alexander Polyankin
a7971b43b1 Fix table layout issues in transform pages (#63540) 2025-09-17 11:49:22 -04:00
Cam Saul
0d1b4e253a cumulative-aggregations-middleware => Lib (#63592)
* cumulative-aggregations-middleware => Lib

* Ensure MBQL 5

* Fix NOCOMMIT
2025-09-17 15:47:13 +00:00
Sébastien
9986021635 Closes EMB-303 search bar in embedding no longer awfully long (#63632) 2025-09-17 17:09:28 +02:00
Anderson
ae422678b2 [Admin settings] Show help documentation to connect DB in a side panel (#63420)
* [Admin settings] Show help documentation to connect DB in a side panel

* Add unit tests

* Add more tests / tweaks

* Add e2e tests

* Make sure help content is not rendered if not available

* Self-review tweaks

* Use useDocsUrl in DatabaseHelpSidePanel.tsx

* Use aside element for the side panel

* Use await findBy when possible

* Use JSDoc / Remove unnecessary comment

* Add some style to blockquote

* Add test file for useHelpLink

* Fix failing test

* Add analytics event
2025-09-17 11:59:05 -03:00
Cam Saul
8ecc5c6718 add-rows-truncated middleware => Lib (#63616) 2025-09-17 14:52:21 +00:00
Cam Saul
dec95aabe7 resolve-joins middleware => Lib, remove add-source-metadata (#63608) 2025-09-17 14:50:07 +00:00
Ngoc Khuat
98e29f6c39 [Transform python] python lib apis and settings (#63568) 2025-09-17 14:23:11 +00:00
lbrdnk
b110c02981 Fix empty db url for metric collector job (#63633) 2025-09-17 14:15:20 +00:00
github-automation-metabase
a5056280e8 Update generated docs (master) (#63611)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-17 10:10:53 -04:00
Alexander Polyankin
33f5b24a0a Fix flaky "Change target" behavior for transforms (#63526) 2025-09-17 09:15:43 -04:00
Uladzimir Havenchyk
323e6f3823 chore: drop unused files (#63500) 2025-09-17 13:29:30 +03:00
Timofey Kachalov
b5b9bad486 Add the better handling of the missing enterprise token for Sample Apps e2e (#63573) 2025-09-17 11:51:20 +04:00
Thomas Schmidt
7f4cb813c2 Adjust legacy sql generation button to toggle Metabot chat (#63554)
* Adjust legacy sql generation button to toggle Metabot chat

* Change placeholder text
2025-09-17 07:01:08 +00:00
Oleksandr Solovyov
068f460124 [metabot] tool_calls should be a vector (#63579)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-09-17 09:09:28 +03:00
Oleksandr Solovyov
50e10ee9c2 enable metabot stats and prevent recursive token checks (#63574) 2025-09-17 09:09:06 +03:00
Cam Saul
4d54129a72 viz-settings middleware => Lib (#63597) 2025-09-16 22:32:46 -07:00
Cam Saul
3d2789c2f1 Fix #63571 (#63595) 2025-09-16 20:31:19 -07:00
Ryan Laurie
2e4c39904e Handle when tags are not defined (#63588)
Co-authored-by: Fraser <fraser@metabase.com>
2025-09-17 00:29:57 +00:00
Alexander Polyankin
0911bbe3b3 Simplify state management and fix the flicker with the transform run button (#63586)r
* Fix optimistic updates with transforms

* Fix optimistic updates with transforms
2025-09-16 18:49:37 -04:00
Luis Paolini
e08969edd9 Document password handling for special characters (#63590)
* Document password handling for special characters

* Add section on special character passwords in MariaDB

Added information about handling passwords with special characters in MariaDB connection strings.

* Apply suggestions from code review

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

* Update docs/databases/connections/mysql.md

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-09-16 19:22:14 -03:00
Aleksandr Lesnenko
b5942d4f36 respect decimals setting when compact formatting is enabled (#63457) 2025-09-16 17:54:07 -04:00
Alex Yarosh
914d56b2c0 docs: transforms draft (#63594)
* skeleton

* transforms

* privileges

* Apply suggestions from code review

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

* edits

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-16 21:53:21 +00:00
Anton Kulyk
035be556eb Improve the look and feel of charts in dashboards (#62610)
* Fix vertical legend position for cartesian charts

* Set dashcard title font size to 14px

* Decrease legend dot size

* Decrease value labels density for cartesian charts

* Use normal font weight for axis names, labels, etc

* Make y axis split lines solid vs dashed

* Show scalar card title in dashcard header

* Always show pie chart total

* Hide axis names on small dashcards

* Update screenshots

* Fix tests

* Fix number cards font size

* Fix hiding cartesian chart axis

* Fix font styles in other legend components

* Fix e2e tests

* Hide cartesian chart axes independently

* Use different legend style only in dashboards

* Apply min spacing to labels per series

* Fix legend dot size in edit mode

* Update label sizes for funnels and sankey charts

* Use bold font for data labels

* Update screenshots

* prettier

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-16 21:09:38 +00:00
Cam Saul
1919a6cd62 Trivial middleware, qp.compile, qp.execute => Lib (#63419)
* Trivial preprocessing middleware => Lib

* Handle already-native MBQL 5 queries

* substitute-persisted-query => Lib

* A bunch of post-processing middleware is actually MBQL-5 ready

* Fixx 🔧

* Test fixes 🔧

* More fixes 🔧

* Fix more stuff

* Wow even more test fixes =(

* (Hopefully) final round of test fixes

* Kondo

* More test fixes 🔧

* Fixes 🔧
2025-09-16 22:08:09 +03:00
Jeff Bruemmer
1a16244f86 docs - note on images (#63583) 2025-09-16 13:54:25 -04:00
Alexander Polyankin
ea5b0d4a9e Make description input in transforms bigger (#63541) 2025-09-16 15:13:57 +00:00
Ryan Laurie
b84b11532e skip broken about e2e test (#63572) 2025-09-16 08:07:07 -06:00
Oleksandr Solovyov
5e3968f517 report date for metabot usage info to HM (#63560)
* report date for metabot usage info to HM

* disable metabot stats to resurrect stats
2025-09-16 16:45:11 +03:00
Jeff Bruemmer
1b2ebb4fd7 docs - clarify webhook permissions (#63567)
* update webhook docs

* summary

* more perms
2025-09-16 09:30:17 -04:00
github-automation-metabase
d888aa8ee1 Update generated docs (master) (#63542)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-16 09:01:00 -04:00
Ngoc Khuat
7aa3f7fed1 Send pulse skip legacy alerts (#63497) 2025-09-16 11:44:43 +00:00
Phoomparin Mano
be673c4771 Unskip and fix flaky locale test for embedded analytics js (#63518) 2025-09-16 18:05:54 +07:00
Fraser
41db01c5e2 Unskip About page e2e test (#63538) 2025-09-16 22:19:55 +12:00
Oleksandr Solovyov
b0299c474d fix metabot token count query (#63556) 2025-09-16 13:04:04 +03:00
Ngoc Khuat
3275cb9a44 Driver table CRUD to skip QP (#63427) 2025-09-16 09:10:17 +00:00
lbrdnk
e7b70ba03f :metabase-search/semantic-fallback-results-usage (#63442) 2025-09-16 11:00:09 +02:00
Jakub Chodorowicz
25adbcfee8 Adjust label spacing in the db form (#63499)
# Conflicts:
#	frontend/src/metabase/databases/components/DatabaseEngineField/DatabaseEngineSelect.tsx
2025-09-16 10:24:52 +02:00
Timofey Kachalov
94b90013cb refactor(sdk): Replase Zod with Yup for SDK bundle schema validation (#63489) 2025-09-16 10:34:39 +04:00
Oleksandr Solovyov
065d6ce5aa Store Metabot conversation history with token usage and report it to HM (#63073) 2025-09-16 09:02:01 +03:00
Romeo Van Snick
2ce5dc4e46 Native editor sidebar for transforms (#63287)
* Swap cancel and save button

* Render sidebar in native query editor for transforms

* use toggleSnippetSidebar from props

* Fix snippets sidebar

* Export SelectionRange

* Add aria label for data reference button

* Open database on mount

* Add aria-label to snippets button

* Add e2e tests for sidebar in SQL transforms

* Rename prop for clarity

* Return instead of throwing

* Use Lib.rawNativeQuery

* Pass selected text to native editor

* Fix types

* Move longer handlers to hooks in utils

* Handle empty text and reshuffle code
2025-09-16 15:36:49 +10:00
Aleksandr Lesnenko
5b450f29aa support value and goal column selection in progress visualization (#62963)
* progress bar: support value and goal column selection

* design feedback

* fix spacing

* BE review

* FE review

* spec
2025-09-16 04:16:13 +00:00
Nathan Voxland
dbc6913076 Reindex has to be async on language change callback (#63531) 2025-09-16 03:27:35 +00:00
Cam Saul
c1a3971ae8 add-implicit-clauses middleware => Lib (#63360)
* add-implicit-clauses middleware => Lib

* Test fixes 🔧

* Some lib.convert fixes from #61398

* Test fixes 🔧

* More test fixes

* Test fixes 🔧

* Handful of test fixes 🔧

* Discourage use of legacy MBQL utils in QP

* Integrate the platinum metadata provider

* Only one failing test left

* Test fix 🔧

* Kondo

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Test fix 🔧

* Test fix 🔧

* Kondo

* Test fix

* Test fix 🔧

* Skip failing transforms tests

* Mark failing tests flaky
2025-09-15 19:35:54 -07:00
appleby
319fc114ab Update :bookmarked and :user_recency scorer to work with mysql and mariadb (#63205)
* Update :bookmark scorer to work with mysql and mariadb

* Update :user_recency scorer to work with mysql and mariadb
2025-09-15 18:43:22 -07:00
Alexander Polyankin
c456cb5a6f Disable failing transform tests (#63535) 2025-09-15 22:52:32 +00:00
Fraser
a743c86b25 Enable skipped implicit-join and breakout e2e tests (#63486) 2025-09-16 10:50:36 +12:00
Fraser
0348e0b3c3 Remove skipped pie chart label truncation e2e test (#63471) 2025-09-16 10:47:59 +12:00
Fraser
a32eeb88a2 Fix skipped time series binning e2e test (#63428) 2025-09-16 09:37:24 +12:00
Fraser
7ad5cdac94 Fix skipped notebook info popoever e2e tests (#63487) 2025-09-16 09:37:07 +12:00
Phoomparin Mano
0aa42f596f Integration branch for Embedding Hub (#62986)
* Setup sidebar and onboarding page for embedding hub (#62517)

* Add the add data and new dashboard modals to embedding hub (#62528)

* mark sandboxed step as done (#62758)

* Auto-mark 'secure your embeds' step as done when either JWT or SAML is configured (#62736)

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

* Add UTM tags to documentation links in the embedding hub (#62747)

* Add a wizard to select a table to x-ray in embedding hub (#62715)

* Mark the create embed steps in embedding hub as done from embed flow (#62759)

* Add a dropdown to switch embedding solutions in embedding hub (#62870)

* fix(embed-hub): adds key prop to component passed to jt (#63060)

* feat(embed-hub): checklist endpoint (#62875)

* feat(embed-hub): EMB-770 and EMB-742, add checklist endpoint with
'create-dashboard'

* feat(embed-hub): EMB-740 auto mark "Add data" as done

* Revert "mark sandboxed step as done (#62758)"

This reverts commit be775aceed.

* feat(embed-hub): EMB-768 move sandbox check to the BE

* EMB-772: move all "done" checks on the be, move endpoints to ee

* cleanup

fmt

configure enterprise module to make linting pass

test: activate license to make e2e tests pass again

remove fe unit test now that all the logic is on the be

add doc to the endpoint to maybe the tests will pass?

whitespace?

fixes

idk anymore how to make all the linters be happy

last try

refactor has-configured-sso to a function

revert  visibility to see if tests pass

sort config.edn

* tests: remove cy.wait from embed hub tests (#63066)

* Bit of cleanup

- remove warn-on-reflection; there is no interop
- clean up a bit of duplication in sql clause generation
- remove unncessary try/catch around t2 access
- remove a few boolean calls on boolean functions

---------

Co-authored-by: dan sutton <dan@dpsutton.com>

* fix(embed-js): disable the next button when embedded js is disabled (#63134)

* Replace the accordion in embedding hub with steppers (#63271)

* Move embedding settings into its own top-level menu (#63339)

* Add related setting cards to modular embedding and setup guide (#63340)

* Remove the Embed menu from the New menu (#63385)

* Completing later steps on embedding hub should not tick off the former steps (#63393)

* Modular embedding toggle label should depend on toggle states (#63391)

* Add the interactive embedding upsell to the settings page (#63399)

* Lock embed in production step in embedding hub checklist until sso configured (#63449)

* Use ee plugins to check if embedding is enabled in nav (#63446)

* Check for CSV uploads in embedding-hub checklist endpoint (#63501)

* update embedded-analytics-js.md to have consistent quickstart pages

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: dan sutton <dan@dpsutton.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-09-15 22:27:57 +01:00
Brad Anderson
dd68df30c9 Fix: UXW-683 Saving document resets undo history (#63462)
Fixes issue where undo history is deleted on save. Also fixes issue where CommentsSidesheet stays open (big unclosable grey box) when navigating to a different document when it was open.
2025-09-15 16:19:52 -04:00
Jeff Bruemmer
af495f2ff3 elaborate on privacy (#63524) 2025-09-15 14:46:39 -04:00
Alexander Polyankin
c343eaa0a3 Fix flaky transform tests (#63523) 2025-09-15 14:36:33 -04:00
Ngoc Khuat
29c013a78a Add rename-tables! driver method (#63302) 2025-09-15 16:36:13 +00:00
Alexander Polyankin
a85675ef2a Fix some transform flaky tests (#63517) 2025-09-15 12:00:00 -04:00
Alexander Polyankin
8c1582e601 Fix metrics stats in anonymous tracking (#63507) 2025-09-15 15:28:29 +00:00
Jakub Chodorowicz
a7eacc1c96 PRG-138 fix mongo and sql server YAML setup (#63496)
* Move sqlserver description to extra info tooltip

* Fix mongo additional-options not appearing in advanced-options section

# Conflicts:
#	e2e/test/scenarios/admin/databases.cy.spec.js
2025-09-15 17:21:10 +02:00
Jakub Chodorowicz
6ab20070a4 PRG-137 add engine icons (#63491)
* Add new DB engine icons, add icon to regular add DB flow

* Refactor old export style

* update h2 icon

* Fix layout of browse databases cards

* Adjust padding of browse databases cards

* Remove empty comment

* Render default db icon in case of empty engine key
2025-09-15 17:18:18 +02:00
Alexander Polyankin
7bc2093651 Ignore new flaky transform tests until they are fixed (#63516) 2025-09-15 08:34:04 -06:00
Alexander Polyankin
fa9d4ad2a4 Make RTK queries populate metadata created by the getMetadata selector without using the entity framework (#63262) 2025-09-15 10:19:48 -04:00
metamben
ea74e4e1dc Fall back to DESCRIBE if Athena JDBC reports duplicate column names (#63452)
* Fall back to DESCRIBE if Athena JDBC reports duplicate column names

* Make test fail another way

* Fix test

* Verify that the hijacked function gets called
2025-09-15 10:51:27 -03:00
Fraser
1920cc924c Delete old skipped test (#63372) 2025-09-15 21:49:49 +12:00
Sébastien
df7ba12468 Closes EMB-791 custom pivot column title not being translated (#63436) 2025-09-15 10:23:13 +02:00
Romeo Van Snick
35f9175eb0 Hide empty breakout step in readonly notebook (#63367) 2025-09-15 14:28:50 +10:00
Fraser
eeab38518a Remove skipped Metabase Cloud e2e tests (#63417) 2025-09-15 10:57:54 +12:00
Fraser
bc7d55b0dd Remove field filter popover cutoff e2e test (#63418) 2025-09-15 10:57:25 +12:00
Alexander Polyankin
c5b5970b77 Handle legacy viz settings where base-type might not be present (#63468) 2025-09-13 02:14:00 +00:00
Nathan Voxland
c8982e0d1d Fixed lint error (#63460) 2025-09-12 21:42:48 +00:00
Aleksandr Lesnenko
3477b876a2 fix trend chart month cut off (#63453) 2025-09-12 21:08:21 +00:00
Alexander Polyankin
63a60230f1 Migrate the Revision entity to RTK query (#63440) 2025-09-12 17:08:12 -04:00
Jeff Bruemmer
b9838f7cf7 docs - embedding chat (#63259) 2025-09-12 16:32:36 -04:00
Nathan Voxland
c024186f79 Search Indexing Improvements (#63099) 2025-09-12 15:01:39 -05:00
Cam Saul
acbff0c969 ℳℯ𝓉𝒶𝒹𝒶𝓉𝒶 𝒫𝓇ℴ𝓋𝒾𝒹ℯ𝓇 𝒫𝓁𝒶𝓉𝒾𝓃𝓊𝓂 ℰ𝒹𝒾𝓉𝒾ℴ𝓃 (#63368)
* Metadata Provider Platinum Edition

* Revert some formatting changes

* Revert changes to QP tests

* Revert NOCOMMIT changes

* Fix missing ns alias

* Pull in missing changes from other branches

* Misc fixes and changes

* Fixes

* Fix bugs in JVM metadatas

* Fix composed provider not propagating inactive

* JS fixes 🔧

* Test fix 🔧

* Test fixes 🔧

* Test fixes 🔧

* Another JS test fix 🔧

* More FE fixes 🔧

* Don't be too strict

* Set database

* Fix merge conflict

* Fix kondo

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-09-12 18:46:03 +00:00
Jeff Bruemmer
75d56ef281 docs - rename file (#63451)
* rename file

* links
2025-09-12 18:20:26 +00:00
Jeff Bruemmer
d2b1aadf84 docs - docs (#63413) 2025-09-12 13:49:04 -04:00
Ryan Laurie
f07baad1f8 add environment var to disable embedding builds (#63441) 2025-09-12 10:40:59 -06:00
Cam Saul
eecf97f077 Sandboxing middleware => Lib (#63321)
* Sandboxing middleware => Lib

* Test fix 🔧

* Remove some unused stuff

* rename `row-level-restricitions` middleware => `sandboxing`

* Remove TODO

* :model/GroupTableAccessPolicy => :model/Sandbox

* Test fixes 🔧

* Test fix and mark more stuff deprecated

* Test and Kondo fixes 🔧

* "Fix" sandboxes with extra columns because I don't want to update e2e tests

* cljfmt
2025-09-12 09:34:57 -07:00
Alex Yarosh
4768c58a01 docs - add modular embedding to securing embeds (#63444)
* docs - add modular embedding

Also adjust headers a bit because ToC is difficult to scan

* Update docs/embedding/securing-embeds.md

* Update docs/embedding/securing-embeds.md
2025-09-12 16:16:44 +00:00
github-automation-metabase
84530c5a58 Update generated docs (master) (#63421)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-12 12:16:07 -04:00
Ryan Laurie
0d1522742e Make question moving errors bubble correctly (#63409)
* make sure errors bubble correctly

* e2e tests

* fix test
2025-09-12 09:48:37 -06:00
Brad Anderson
2fcecd5de8 Fix: UXW-606 Bookmark drag and drop handle shown when there's nothing to rearrange (#63358)
* UXW-606 Hides bookmark drag handle when there's only one bookmark

* UXW-606 Adds unit tests
2025-09-12 10:25:58 -04:00
Riley Thompson
9164ad955e Disable transforms when db routing is enabled (#63402)
* disable transforms with routing

* disable selecting dbs with routing enabled
2025-09-12 09:32:35 -04:00
Sébastien
293120750e Closes EMB-792 dashcard title and description translation (#63432) 2025-09-12 14:26:59 +02:00
Anton Kulyk
b8b61d0647 Update "Customize Homepage" modal UI (#62280)
* Update "Customize Homepage" modal UI

* Update tests

* Reset selected dashboard on "Cancel" btn click

* Fix button name in test
2025-09-12 13:23:08 +01:00
Anton Kulyk
e4744ae67f Always use "public" schema for x-rays if it exists (#62285)
* Always use "public" schema for x-rays if it exists

* Handle null schema

* Fix type error
2025-09-12 13:13:00 +01:00
Nemanja Glumac
aa59dca84e Make "database" the first option in the "Add data" modal (#63412) 2025-09-12 10:52:22 +02:00
Cam Saul
5f5b2f6d07 Minor lib.convert fixes (#63401)
* Some lib.convert fixes from #61398

* Fix conversion of :dimension pseudo-clauses

* cljfmt
2025-09-11 20:12:13 -07:00
Cam Saul
40420f8d44 Test to confirm #63261 is fixed in master (#63414) 2025-09-12 03:11:34 +00:00
Cam Saul
34bddeb931 Normalize horribly broken fingerprints (#63407)
* Normalize horribly broken fingerprints

* Handle nil fingerprints
2025-09-12 03:02:09 +00:00
github-automation-metabase
16daec0315 Bump com.github.seancorfield/next.jdbc from 1.3.1048 to 1.3.1070 (#63220)
Inspect dependency changes here: https://github.com/seancorfield/next-jdbc/blob/v1.3.1070/CHANGELOG.md
2025-09-12 02:38:10 +00:00
github-automation-metabase
5caa919d59 Bump nrepl/nrepl from 1.3.1 to 1.4.0 (#63222)
Inspect dependency changes here: https://github.com/nrepl/nrepl/blob/v1.4.0/CHANGELOG.md
2025-09-12 02:22:22 +00:00
github-automation-metabase
69bda6feef Bump babashka/fs from 0.5.26 to 0.5.27 (#63216)
Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.27/CHANGELOG.md
2025-09-12 02:18:39 +00:00
github-automation-metabase
cb1c25d58b Bump io.github.metabase/hawk from 1.0.11 to 1.0.12 (#63221)
Inspect dependency changes here:
2025-09-12 02:12:07 +00:00
Anderson
d998df052e [PRG-114] Show help & more specific error message when a database connection fails (#62956)
* Implement new DatabaseFormError component & break DatabaseForm component down

* Implement scrolling actions / Avoid 'div in p' console error

* Fix typing check issues / Add 'Read the docs' link url

* Define 'invite teammate' and 'contact support' urls

* add more tests / further refactoring

* css tweaks

* Simplify tests a bit

* Remove comment / Fix translation cases

* Refactor tests

* Adjust 'Check Host and Port settings' button / Fix css lint

* Fix test

* Add target=_blank to doc links / Use existing color for the error container border

* Use cloud-gateway-ips setting when showing IPs to whitelist / Move some helpers to a local utils.tsx

* Use 'be.visible' over 'exist' in cypress test

* Use useDisclosure

* Make Alert title have dark text color by default / Add storybook case to show warning color variant
2025-09-11 22:07:06 -03:00
Fraser
ce15cfeea9 Mark pagination test as flaky (#63328) 2025-09-12 10:54:50 +12:00
Ryan Laurie
a10afa8256 Deprecate old Alert (#63408) 2025-09-11 21:22:34 +00:00
Alex Yarosh
daca8d6c4e docs: translations are case-insensitive (#63383)
* docs: translations are case-insensitive

* Update docs/embedding/translations.md

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

* Add localization details for embedded Metabase

Added section on localizing embedded Metabase.

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-11 17:09:35 +00:00
Timothy S. Dean
80d6389e6e Handle mixed catalog table errors in Trino sync (#63356)
Trino's Hive plugin shows the tables in question in its metadata, but if you try to get a handle on these tables, it will always throw an exception with error code `UNSUPPORTED_TABLE_TYPE`. The Iceberg plugin has a similar exception for such circumstances.

For us, there doesn't seem to be much difference between not being able to query a table because it's an unsupported type and not being able to query because we don't have permissions, so`have-select-privilege?` is modified to return false in these cases. We can examine the vendor-specific error code on the SQLException to detect them.
2025-09-11 09:53:04 -06:00
Kamil Mielnik
7f723a20de Document Comments (#62800)
* Update Start new thread UI

* Refactor

* Lint migrations

* Lint migrations

* Lint

* Fix comments count

* Thread submit input improvements

* Align 'Start new thread' button

* mention metabase entities

* Stupid link copying

* Deep linking to comments

* fix: sidebar style improvements

* Fix line breaking bug on submit

* Maz Comments styling tweaks (#62964)

* add tabs hiding/showing logic

* only show persistent button for open comments

* move comment buttons to the right

* attempt to fix tests

* always display the add-a-comment input in the sidebar

* Remove unused attr

* Placeholders without flags

* Refactor comments' tabs markup

* Refactor CommentsMenu

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>

* Fix incorrect counter for unresolved comments

* Fix warning

* Fix key warning in Discussions

* Make document read-only when comments sidebar is open

* Refactor URL generation

* Automatically open correct tab for the comment targeted by URL hash

* Clean up

* Use createPortal instead of Portal from metabase/ui to fix CommentsMenu appearing above CommentsSidesheet when visiting a specific comment via URL

* Remove more/less feature

* Set max-height when editing comments, fix scrolling area

* Extra padding

* Make it possible to mention yourself

* Add ability to resolve deleted threads

* Remove ability to comment on resolved threads

* Remove ability to add new comments on Resolved tab

* allow using @ character without showing mention list

* Fix type errors

* Fix types

* Resolve/unresolve deleted comments

* Remove DocumentContext

* Fix inserting mentions on Enter press

* Minor styling fixes for mentions

* Remove unused endpoint

* Clean up

* Remove unused component

* Remove stories

* Fix storybook

* Remove TODO

* Remove unused file

* Remove outdated comment

* Avoid cast

* Remove redundant code

* Deal with any

* Don't trim empty nodes

* Simplify Discussions component

* Align avatar, submit button and code editor

* Do not show last divider if not necessary

* Get rid of currentIndex

* Fix typo

* Remove hack

* Check only unresolved comments when deciding whether to autofocus comment editor when sidebar opens

* Enable inline_code styling in comments

* Rename css file

* Fix cast

* Use top instead of transform

* Use a flag

* Remove commented-out code

* Move getCommentsUrl to utils

* Use Menu

* Add Avatar to metabase/ui

* Bring back accidentally removed code

* Resolve CSS duplication

* Use void

* Add comment

* Add all comments sidebar

* Use createSelector

* Fix no results styling

* Autofocus editor when editing comments

* Disable menu when editing is disabled

* Add a toast when copying the link

* Prevent deleting and editing someone else's comments

* Fix types

* Update copy

* Cleanup all comments sidebar

* Extract isMetabotBlock

* Use CustomStarterKit

* Copy

* feat: add Emoji picker (#62991)

* feat: add Emoji picker

* fix: styles

* fix: class for loading label

* Add ability to inline emojis in CommentEditor

* fix: keyboard events for emoji picker

* fix: focus visible for emoji picker viewport

* Implement proper keyboard support for inline emojis

* Temporarily hide emoji reaction button

* Improve UX around selecting first emoji

---------

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

* Pass editable

* Use mentions plugin

* Fix z-index

* Add reactions BE

* Improve list paddings

* Add users support to SmartLink and MentionExtension

* Remove old mentions

* use semantic colors for Avatar

similar logic to what do for users in admin

* show add comment input when we switch from resolved tab

* Limit number of user results

* feat: add comment reactions (#63072)

* feat: add comment reactions

* fix: typescript

* fix: click to react

* fix: styling

* tweak spacing between replies (#63100)

* fix: reply styles

* Update submit shortcut to Cmd-Enter. Fix emoji picking behavior

* fix: do not close discussion sidesheet on some escape events

* fix: cancel editing on escape press

* Make DocumentPage 400px narrower when comments modal is opened

* Extract shared tiptap-related code

* Move EmojiPicker to common/components

* Fix DiscussionComment error when creator is null

* Fix missing formatting menu in CommentEditor

* Add tests boilerplate

* Allow many reactions on a comment

* Hydrate creator info on deleted comments

* Add first test and helpers

* Add tests for more types of nodes

* Add comment

* Improve test name

* Test highlighting

* Add test for splitting paragraphs

* fix: blur comment editor on submit

* Add schema upgrade test

* Add test for creating comments and threads

* Add tests for deleting comments

* Editing a comment

* Test for Esc

* fix: limit editable functionality and add comment styles (#63161)

* Fix test

* Update test

* Fix flaky test

* Fix tooltip

* fix: do not react on deleted comments

* fix: show resolved threads

* fix duplicate replies display

* Add mentions tests

* Make suggestions taller to accommodate users search results without a vertical scrollbar

* don't count deleted comments for the comment badge

* don't show threads if all comments deleted

* Add emoji tests

* fix: can react true by default

* Fix floating menu positioning in CommentEditor

* fix document / menu selected item styling

* Sort comment reactions by created_at ASC

* Make Esc close emoji popup

* first pass at comments api

* Fix reactions ascending order

* WIP

* fix linting

* model resolution

* update test setup to include _id, so equality check works correctly

* replace is_deleted with deleted_at to detect deleted comments

* fix types

* remove ?new=true from url after adding a new comment

* Fix tests

* Improve arrow navigation when emoji popup is opened. Allow selecting with Tab

* Add test

* Refactor

* Update test

* Fix emoji popup Esc handler removal

* Add formatting tests

* Rename test

* Add e2e API helpers to create and delete comments

* Update test name

* Refactor

* Fix types

* update is not deleted eh

* Add test for the comment button

* Add test

* Add a test

* Add test

* test: basic resolve/unresolve tests (#63243)

* test: add resolve other person thread test

* Add test for disabling document editing when comments are open

* Add test for unsaved document changes

* Add test for show all comments button and fix the issue

* Add tests for deleting/editing other people's comments

* Add e2e tests for comment links

* add e2e tests for all comments

* way better/less verbose permission checks

* test: cannot reply to resolved threads

* ESLint

* Update assertion

* Fix unresolved comments count

* e2e tests for comments reactions

* first iteration of notifications

* fix migration lint errors

* fix module tests

* Add label attribute for SmartLinks to simplify server-side notifications rendering

* add e2e test for removing ?new=true after creating a comment

* Fix

* fix clj syntax

* Remove commented-out code

* Use H.readClipboard()

* Refactor

* Update reaction icon

* Move util

* Lint

* Fix

* Lift conditional rendering, move Reaction component to a separate file

* Refactor

* Do not render invalid links

* Refactor

* Update new comment notification template

* add e2e test for top blocks

* fix: comment date to respect browser locale

* Update reactions icon

* Add 1st test for email subscriptions

* Update email template to match figma, remove the comment content

* Add document icon to email template

* Update test

* Remove protocol from the link

* Extract verifyEmail helper

* fix migrations because mysql is majorly unhappy about those rollbacks

* correct urls for comments, notifications on mentions

* Update assertion

* Insert both comment URL and document URL into the email template

* Fix url

* fix copy tests

* Add a setup for next test

* Implement assertions

* 2nd email variant

* Add another test

* Add an assertion

* add more tests for email template

* Ignore whitespace

* Error handling for mutations - toasts

* add more tests

* feedback: drop blue border from paragraph

* feedback: placeholder

* fix e2e test to pass

* Update setup

* Comments design polish (#63352)

* use new Send icon instead of up_arrow

* remove extra space below a Discussion

* restyle Discussions

* fix CommentEditor spacing

* restyle current user reaction

* only show No Comments message on the All Comments sheet

* add on-hover highlighting for All Comments section

* fix for fe-type-check

* fix test

* Cleanup

---------

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

* put user permissions check back and new api for mentions

* pagination

* Use new GET /api/ee/comment/mentions in frontend

* Use new GET /api/ee/comment/mentions in smart link node

* paid feature in tests

* seed notifications

* oh

* clj-kondo 🤦

* port numbers

* Try to fix flaky test

* attempt to fix flaky e2e

* disable returning users for mentions

* disable mention related tests

---------

Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Konstantin Darutkin <spalt08@mail.ru>
Co-authored-by: Maz Ameli <maz@metabase.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
Co-authored-by: Oleksandr Solovyov <o@solovyov.net>
2025-09-11 22:09:54 +07:00
Aleksandr Lesnenko
179d170826 fix question title layout (#63348)
* fix question title layout

* fix dashboards as well
2025-09-11 10:32:34 -04:00
Aleksandr Lesnenko
b263bd0bc0 fix missing tooltip max width (#63353)
* fix missing tooltip max width

* repro
2025-09-11 10:32:25 -04:00
Aleksandr Lesnenko
4e851e0e19 fix date picker month navigation timezone issue (#63366) 2025-09-11 10:32:15 -04:00
Braden Shepherdson
8ac41c91d2 [ClickHouse] Fix SQL for equality filters on UUID columns (#62922)
Fixes #62492.

A literal UUID was reaching the driver as
`[:value "uuid-string" {:base_type :type/UUID}]`
but this was not recognized as a UUID-valued field because `:value`
clauses have `:base_type` and not `:base-type` like `:field` clauses.

Therefore the `:sql` core driver was rewriting this clause to cast the
UUID field to a string and compare that against the literal string.
With that logic now correctly recognizing such a `:value` clause, the
UUID fields are compared directly. This is much better for indexing,
but also works with *nullable* UUID columns, where the
`CAST(my_uuid AS text)` would cause SQL compilation errors.
2025-09-11 13:59:39 +00:00
lbrdnk
7a122eefd4 Better test isolation for semantic search and related refactor (#63164)
* Make with-index! use new, clean, separate database per test

* Add with-test-db! setup modes

* Comment

* Adjust with-test-db! and related

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

* semantic.tu/db removal

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

* Drop semantic.tu/db  from tu

* Remove once-fixture

* Remove ensure-no-migration-table-fixture

* Comment

* Comment

* Cleanup

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

* Remove redundant test

* Remove remaining usage of with-index!

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

* Cleanup

* Comment

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

* Adjust with-index-contents!

* Fixture to avoid running app-db tests

* Fixture

* Require

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

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

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

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

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-11 13:55:21 +02:00
Sébastien
8ac41c5b91 Closes EMB-756 translations for static embedded visualizer cards (#63067)
* Closes EMB-756 translations for static embedded visualizer cards

* Closes EMB-757 content translated pie loses custom colors

* unit test

* types

* renaming

* better type guards
2025-09-11 12:49:30 +02:00
Oleksandr Solovyov
cffe9615c6 update athena driver to 3.6.0 (#63369) 2025-09-11 12:24:46 +03:00
Jakub Chodorowicz
4ba3309c4c update Metabot AI terms link (#63370) 2025-09-11 10:46:28 +02:00
lbrdnk
9c712173ce Fix test issues in semantic search module (#63319)
* Make dataset-query->dimensions more robust

* *disable-updates*

* Add macro impls for easier debugging

* Make dataset-query->dimensions more resilient

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

* Fix conditional syntax

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

* remove comments

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

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

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

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

* add unit tests

* fix mocks

---------

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

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

* 🤦‍♀️
2025-09-10 12:17:58 -06:00
Cam Saul
63d6945498 optimize-temporal-filters middleware => Lib (#63275)
* optimize-temporal-filters middleware => Lib

* Fix circular dependencies

* Test fix 🔧

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

* Oracle test fix 🔧

* cljs test fix 🔧
2025-09-10 08:15:53 -07:00
Konstantin Darutkin
e539ba98ce fix: do not display value in options when editing FKs (#63332) 2025-09-10 15:28:08 +03:00
Jeff Bruemmer
926b5ea393 update placeholder copy (#63311) 2025-09-09 23:42:08 +00:00
Maz Ameli
00aca4b873 add tooltip to clear-conversation action (#63309) 2025-09-09 16:15:12 -07:00
appleby
e4f11aba66 Ensure results are realized when falling back to in-place results in semantic search (#63254)
* Ensure results are realized when falling back to in-place results in semantic search

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

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

* Kondo

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

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

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

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

So we can create the same shape (i omit description and is_writable to
seemingly no deleterious effect).
2025-09-09 08:18:55 -05:00
Timofey Kachalov
a0243ff3a4 ci(sdk): Skip sdk-bundle test suite for backward-compat SDK tests (#63291) 2025-09-09 16:30:08 +04:00
Konstantin Darutkin
f2d1f9f93d fix: display error messages from BE in Editable Data settings (#63288) 2025-09-09 12:09:47 +00:00
Konstantin Darutkin
71f02e8684 fix: disable row edit button when rows are selected (#63290) 2025-09-09 10:26:15 +00:00
Timofey Kachalov
7a90868ef9 refactor(sdk): Adjust logic of handling release-notes/changelogs for Embedding SDK (#63081) 2025-09-09 12:24:29 +04:00
Timofey Kachalov
48971b48eb feat(sdk): Add "start new conversation" button for MetabotQuestion and adjust its visuals (#63211) 2025-09-09 11:11:21 +04:00
Cam Saul
169f3f79e3 reconcile-breakout-and-order-by-bucketing middleware => Lib (#63267)
* reconcile-breakout-and-order-by-bucketing => Lib

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

* Add repro for metabase#63176

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

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

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

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

I've taken the logic and just called it multiple times, once per schema.
2025-09-08 13:34:45 -05:00
github-automation-metabase
3eb696e22b Update generated docs (master) (#63229)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-08 13:35:50 -04:00
Alexander Polyankin
60da15bf27 Transform list cleanup (#63208) 2025-09-08 13:32:48 -04:00
Noah Moss
3b3e5f91d6 Fix semantic search repair test flake (#63195)
* Use unique doc IDs across semantic search repair tests to fix flakes

* clear gate table before test

* try switching out table name generation
2025-09-08 12:33:29 -04:00
Jeff Bruemmer
0fcff349d1 note on custom expressions (#63249) 2025-09-08 12:08:55 -04:00
Riley Thompson
f8a66a7470 remove use database from snowflake transforms (#63199) 2025-09-08 16:05:57 +00:00
Riley Thompson
4672ea6c34 handle dbrefs properly (#63244) 2025-09-08 10:05:18 -06:00
Konstantin Darutkin
73e4ba5bd8 test: refactor datetime table editing tests (#63239) 2025-09-08 18:47:54 +03:00
Chris Truter
f09dbce65d Protect against nil search_vector (#63172)
Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-09-08 11:51:38 +02:00
Stas Gavrylov
dabaa3007e WRK-874: List view preview improvements (#63159)
* WRK-874: Populate preview for List View customization with sample values

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

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

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

* Fix lint errors

* Add horizontal padding for List view

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

* Tweak padding to avoid jump

* Center 'on' in join condition

* Make gap consistent

* Tighten margins to avoid jump

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

* spec

---------

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

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

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

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

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

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

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

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

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

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

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

Inspect dependency changes here:

* typo

---------

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

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

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

* fix kondo

* add transforms/table featuer for supported drivers

* fix transforms for dbs with no schema

* rename transform datasets to prevent foreign key overlap

* Add clickhouse support

* fix clickhouse tests

* fix redshift tests

* fix bigquery failures

* kondo and filter tests by feature

* fix transform dataset for bigquery

* fix sqlserver transforms with joins

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

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

* use different metadata provider

* filter for left join feature in test

* improve sqlserver compile-transform

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

* clean up

* add sqlserver error test

* Squashed commit of the following:

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

    Add message when a new transform will be created

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

    Allow creating values in schema form select

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

    Allow selecting schemas always, not only when there are schemas

* create schemas

* fix redshift

* add snowflake

* add sqlserver

* add clickhouse

* add bigquery

* Add test

* add default impl

* fix redshift tests

* Move SchemaFormSelect to components folder

* Allow creating schemas in the target update modal

* Allow initial value in SchemaFormSelect

* Only render schema field when the database supports :schemas

* Do not render new schema item if value is empty

* Add unit tests for SchemaFormSelect

* Add e2e tests for schema creation

* check schema exists first

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

* update changelog

* parse query and add into for sqlserver

* add type hints for linter

* Address comments

* realize bigquery execute-raw-queries

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

* Add tooltip when schema is new

* Use hydrated table from transform

* Add e2e tests

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

* Do not add default to databaseId

* Add tests for existing schema with new table

* Fix e2e test

* address comments

* rename connection-details to conn-spec

* Compare against null not empty string

* use find first

* Await request to avoid flakiness in hover

---------

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

Closes QUE-2156

* Placate kondo

* Test with scheduled jobs and filtering by tags

* Fix next_run_start_time test

* Return run timestamps as timezone localized strings

* Handle Zulu

* Prepare job list table for next_run and transforms

* Add JobListParams type and use it in getJobListUrl

* Add new parameters to listTransformJobs handler

* Parse params and pass them down on job list page

* Add filters to job list page

* Add tooltipPosition prop to Icon

* Add TimezoneIndicator component

* Allow rendering React nodes in table headers

* Add timezone indicators to job list and transform list

* Add timezoneToUTCOffset helper

* Add timezone to cron explanation

* Format timestamps as ISO-8601 strings with timezone

* Add next run timestamp

* Hide transform count in list for now

* Add next_run to TransformJob

* Add timezone indicators to run list

* Avoid wrapping timestamps in run list

* Move shared widgets to transforms/components

* Allow passing available shortcuts to filter picker

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

* Add e2e test for filters

* Add UTC offset in tests

* Report run timestamps in UTC and expose system timezone

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

* Expose system-timezone to admins only

* Fix setting docstring

* Fix serdes baseline-comparison-test

* Make transform_job API return run timestamps in UTC

* Placate kondo

* Timezone

* Use system-timezone instead of report-timezone

* Add tests

* Fix test string

---------

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

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

Fixes: 1dd56e5f14
References: https://metaboat.slack.com/archives/C010ZSXQY87/p1757002462314229
2025-09-05 15:37:19 +02:00
Phoomparin Mano
ef5e78f979 feat(embed-js): append entity-types=model to embed flow code snippet if the instance has over 2 models (#63068) 2025-09-05 19:49:50 +07:00
Riley Thompson
f4d3359e33 Remove driver/set-use-database in favour of setting the DB in the jdbc spec (#63047) 2025-09-05 08:38:17 -04:00
Alexander Polyankin
9be149e22f Fix flaky e2e test (#63128)
* attempt to fix

* Try to fix a flaky test

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

* Pass cardId and dashboardId

* Pass cardId and dashboardId

* Fix flaky test

* E2E test

* E2E test
2025-09-05 06:35:47 -04:00
Timofey Kachalov
ab4e737c31 feat(sdk): Add disc/memory caching for hosted bundle on top of etag caching (#63014) 2025-09-05 14:32:34 +04:00
Phoomparin Mano
4a1ce5d04f Send CORS headers for localhost regardless of whether SDK is enabled or not (#61747) 2025-09-05 17:17:52 +07:00
Timofey Kachalov
34f1e6811f Add dev.md placeholder for embedding-sdk-bundle folder (#63160) 2025-09-05 14:05:25 +04:00
Ryan Laurie
805e5beb8b Add base color prohibition to stylelint (#63091)
* add base color rule to stylelint

* allow in colors file

* lint in CI

* better highlighting

* css fixes

* fix all improper color use

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

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

* Update Loki Snapshots

* fix color name

* Update Loki Snapshots

---------

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

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

* update spec

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

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

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-04 09:39:10 -07:00
Jeff Bruemmer
207cbffc05 notes (#63097) 2025-09-04 12:06:25 -04:00
github-automation-metabase
cd962a792e Update generated docs (master) (#63106)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-04 10:52:23 -04:00
metamben
55ab852f4b Add transform dependencies and job transforms endpoints (#62776)
* Add transform dependencies and job transforms endpoints

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

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

* Add description to TitleSection

* Add Dependencies section to transform page

* Add transform order to job page

* Invalidate transform jobs when adding tags to transforms

* Add empty state for job transforms

* Add e2e test for transform and job dependencies

* Fix type for job dependencies component

* transform ordering is well defined

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

* make new function private

* Use neg?

* Remove unused require

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

* extend docstring

* use ->

* update docstring again

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

---------

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

* Add currency picker

* Add currency picker

* Fix flaky test

* Fix flaky test

* E2E test

* E2E test

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

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

* small update

* new appearance setting

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

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

* Apply suggestion from @jeff-bruemmer

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

* Apply suggestion from @jeff-bruemmer

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

* update on the browser

---------

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

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

* Gate metrics test

* Fix handling of pg 57014 error state

* Remove redundant require

* Unrelated cleanup

* dlq metrics test

* Indexer loop metric test

* Indexer metric tests

* Fix poll time

* Metric collector and test

* test name

* whitespace

* Fixture

* Suggestions

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-09-04 13:05:26 +02:00
Timofey Kachalov
32f47019f0 Update SDK docs for Hosted Bundle (#63069) 2025-09-04 12:43:36 +04:00
appleby
2c02a11a51 Update pgvector to pg17 in semantic search docker-compose.yml and CI workflow (#62967)
* Update pgvector to pg17 in semantic search docker-compose.yml

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

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

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

* Remove any and unknown for typing parameter values

* Use ParameterValuesMap where possible

* Fix parameter-parsing

* Fix tests

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

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

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

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

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

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

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

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

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

* Change filters to start_time, end_time, run_method

* Use timestamp literals instead of strings in test

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

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

* Allow custom react elements in displayValue prop

* Add filters for start_time and end_time to run list page

* Allow filtering on multiple run methods

* Add run method filter widget

* Close time filter when changing value

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

* Allow multiple values for run_method filter

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

* Fix e2e test

* Rename the run_method parameter to run_methods

* Remove "local" timestamps

* Return transform run timestamps in the system timezone

* Stop expecting a last_run with a nil value

* Rename run_method to run_methods to match api

---------

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

* Use full page view for editing db connection

* Fix title on edit database page

* fix dataspec  cypress test

* fix missing formLocation prop

* fix add initial data cypress test

* Fix add db test not waiting for db connected

* Fix default schedule cypress test

* Remove unnecessary nullish coalescing and route

* Extract common logic to use-database-connection hook

* Adjust Add DB page width

* Adjust padding for smaller devices

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

* Fix up tests, bug fixes

* Explicitly disable reindex! and reset-tracking

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

* fix tests

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

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

* try again to fix with-index

* fix kondo

* ensure drop table table names get quoted

* switch to using gate table for the anti-join

* add missing assertion in test

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

* make sure index cleanup task is initialized

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

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

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-03 19:08:15 +00:00
bryan
8d6e60df0f stabilize composed regex schemas (#61805) 2025-09-03 19:02:40 +00:00
Ryan Laurie
fd168103b8 set default time in create event modal (#63046) 2025-09-03 18:58:54 +00:00
bryan
f2ddc223b6 block prs coming from master (#61681) 2025-09-03 14:57:53 -04:00
Alex Yarosh
f0de6a74b6 docs links (#63084) 2025-09-03 16:34:21 +00:00
Phoomparin Mano
cefa86ccea Apply the new upsell flow to interactive and embed js upsells (#63062) 2025-09-03 23:32:21 +07:00
Rodrigo López Dato
4d6426249a Suggest to upgrade drivers only for self-hosting (#63079) 2025-09-03 12:28:08 -04:00
Phoomparin Mano
2f34d06d53 feat(embed-js): throws when setting invalid metabaseConfig keys (#63064) 2025-09-03 23:01:01 +07:00
github-automation-metabase
245f9e5090 Update generated docs (master) (#63056)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-03 11:08:39 -04:00
Ryan Laurie
2b28d4e60f Stop pushing useless version info highlights (#62950)
* stop pushing useless version info

* fix dash
2025-09-03 09:06:43 -06:00
dpsutton
128759d892 Fix time-interval filters (#62892)
* Fix time-interval filters

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

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

Locally in dev, we get:

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

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

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

spec:

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

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

With fix:

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

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

Note the missing options in the second position

* test e2e dashboard filters

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

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

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

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

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

2. The logs are all on a single line.

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

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

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

It's _too_ expanded.

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

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

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

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

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

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

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

* quick checkin on CI stuff

* load file to ignore vars

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

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

;; only found 4 tests
;; no ignored vars

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

nil

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

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

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

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

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

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

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

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

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

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

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

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

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

* empty ci-test-config

this will be the file when this merges

* print config when it has vars that we are ignoring

* PR review feedback

typo in example json

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

* fix errors found
2025-09-03 15:36:27 +02:00
Kamil Mielnik
bf19cc9606 Fix flaky test (#63009) 2025-09-03 14:07:42 +07:00
Romeo Van Snick
b53b8411c4 Wrap long question or dashboard names (#62980)
* Add repro for metabase#52872

* Wrap long titles without spaces in saved questions

* Add repro for metabase#52872 for dashboards

* Fix width of dashboard with long name

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

* Fix unit test

* Add repro for metabase#62987

* Lower fuzzing iterations
2025-09-03 09:55:58 +10:00
bryan
f80fee03bd Make Usage Analytics work on mysql (#62357)
Co-authored-by: dan sutton <dan@dpsutton.com>
2025-09-02 22:19:59 +00:00
Jeff Bruemmer
2970fc027f check doc links on PRs (#63041) 2025-09-02 17:04:42 -04:00
Ryan Laurie
a8fe573099 Fix Select Visual Bugs (#62466)
* fix double scroll + padding on select dropdown

* remove overrides for root overflow

* override inline style

* I think this is good

* less bad
2025-09-02 21:00:44 +00:00
Denis Berezin
8bd9ea4b3f Fix multiple datasource viz settings in visualizer (#63004)
* Fix multiple datasource viz settings in visualizer

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

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

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

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

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

* Fix schema-filters-patterns split

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

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

* Align replication schema-filters with HM

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

* preview endpoint changed

* temp frontend modal

* After pairing with Raimon

* Fix lint and fmt errors

* pg replication modal  (#61913)

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

---------

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

* Run prettier and linter on DatabaseReplicationForm

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

* Workaround broken dirty bit

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

* fix enabling of the replication button

* UI updates

* UI updates

* removed package-lock file

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

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

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

* Loading for preview method

* Error handling

* Modal padding and title updates

* Remove info about future email from form

* Misc

* Misc

* DatabaseReplicationStatusInfoProps cleanup

* Misc

* Status modal content padding

* Modal properties

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

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

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

* Align text of replication modal more with Figma

* UI updates 1

* Replication stats spacing updates

* Misc

* Tables listing icons

* Alignment updates

* Layout updates for tables listing

* Misc

* Colours updates

* List updates

* Misc

* Misc text alignment

* Misc

* Scrollable tables list

* Fix tables listing

* Comma separated DB WIP

* Misc

* Fix margins

* Ui updates

* More on setting up and success layout

* Test for spinner

* More on spinner

* Colour update

* Box shadow for spinner

* Spinner size updated

* Spinner padding updated

* Spinner added to setting up step

* Misc

* Sizes updated

* Fix for unit tests

* Debounce for schema filters

* Schema filters onChange

* Remove loading in button is no schema filters

* Loader for preview

* Misc

* feat: check replication table ownership

Same as how HM does it.

* Moved laoder next to the submit button

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

* Remove setFieldValue hack

Was obsoleted by 9cdbeaec7a

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

* Fix linter: Change set IDs are not in order

* Build uberjar container also when pushing a PR branch

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

Fixes: 22507a963a

* Link to postgres docs

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

* Misc

* Modal layout

* Error modal UI updates

* Misc

* More on layout + alignment fixed

* More on error layout

* Fix for modal closing

* rfct: use pg conn preview

* revert owner sync

* rfct: use existing schema filter format

* lint: fix fe

* feat: also show tables that will be replicated

* test: update be tests

* rfct: minor renames for consistency

* fix: cannot replicate 0 tables

* style: fix

* fix: copy

* test: update body prop

* test: add form tests

* fix: progress indicator on bottom

* fix: card styles

* fix: error message when no tables to replicate

* fix: easy stuff from jakub's review

* fix: error state for preview too

* claude: fast FE unit tests

* rfct: use fetchMock in FE test

* fix: remove small error step text

* fix: mocal close should reset setup step

* fix: translate noSyncReason

* fix: catch invalid schema pattern as 400

* rfct: use plain fn for onSubmit

* rfct: raise inline fn

* rfct: use correct token-check alias

* rfct: remove unused preview fields

* rfct: raise free-quota fn

* fix: throw on tunnel or certs

* rfct: remove silly when

* rfct: testable preview-replication and errors map

* test: granular fe error tests

* test: fix BE tests

* test: preview-replication unit tests

* fix: test redef name

* rfct: style and db as dbname

---------

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

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

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

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

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

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

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

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

* Cleanup and added tests

* Make whitespace linter happy

* Fix silly oversight

* Set warn-on-reflection

* Fix issues

---------

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

* Update e2e test for List View
2025-09-02 18:23:07 +03:00
Phoomparin Mano
087a69eb78 fix(sdk): prevent double scrollbars in sdk dashboards (#62962) 2025-09-02 21:20:02 +07:00
Phoomparin Mano
ad621ed1f0 Embed JS should show "Try it out" before docs in admin panel (#62954) 2025-09-02 21:19:15 +07:00
Phoomparin Mano
f4821a0935 feat(sdk): use entity ids directly in collection picker and browser (#60562) 2025-09-02 21:18:18 +07:00
Konstantin Darutkin
54bee8a76b feat: render link to table metadata editing in the error message (#63018) 2025-09-02 14:05:51 +00:00
github-automation-metabase
49080efe82 Update generated docs (master) (#62978)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-02 09:50:28 -04:00
dpsutton
5973b65a81 disable starburst (#62955) 2025-09-02 08:29:16 -05:00
Chris Truter
e0f8ed8415 Return explicit errors when trying to edit a table without a PK (#62893) 2025-09-02 15:51:31 +03:00
Sébastien
ca9ebb9972 Closes EMB-716 publicly shared maps in dashboards (#62990)
* Closes EMB-716 publicly shared maps in dashboards

* string | number -> DashboardId
2025-09-02 11:23:21 +02:00
Phoomparin Mano
dbdf070383 fix(sdk): drills and go to dashcard does not work in dashboard with entity ids (#62953) 2025-09-02 16:21:54 +07:00
Timofey Kachalov
85ab7c0184 refactor(sdk): Improve version-helpers and sdk bundle version injection (#63008) 2025-09-02 12:27:20 +04:00
Fraser
0c17daf51b Enable ts incremental builds (#62910) 2025-09-02 10:29:07 +12:00
Phoomparin Mano
88aaf24794 ci(sdk): version bump for Next.js for host apps e2e tests (#62994) 2025-09-01 22:46:57 +07:00
Nicolò Pretto
a99144ee23 fix: remove helpers from the types of cy (#62662) 2025-09-01 16:57:32 +02:00
Sébastien
022b84e40d Closes EMB-650 move download button to footer for title-less embed tables (#62917)
* Closes EMB-650 move download button to footer for title-less embed tables

* Also show download button in paginated tables

* screenshot

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

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

* .

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-09-01 16:18:35 +02:00
Nicolò Maria Mezzopera
21125870c0 chore: removed not needed cy.wait (#61412) 2025-09-01 14:18:22 +00:00
Jakub Chodorowicz
11f98faf74 Hide CSV panel with no meaningful uploadable dbs (#62854)
* Hide CSV panel with no meaningful uploadable dbs

* Hide add data when no meaningful actions can be performed

* Simplify conditional for shouldShowUploadPanel test

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

* Show CSV tab also when user can upload data

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

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

---------

Co-authored-by: Anderson <ands.alves.nunes@gmail.com>
2025-09-01 13:50:52 +02:00
Cam Saul
b3c3ce62ab Fix deselecting fields in joins with inactive implicitly joined remapped columns (#62846)
* Don't add inactive remaps

* Don't add inactive remaps

* cljfmt

* summer squash

* Fix equality

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

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

* Kondo

* Fix fix

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

* Remove comments

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

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

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

* Don't add inactive remaps

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

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

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

* fix kondo

* add transforms/table featuer for supported drivers

* fix transforms for dbs with no schema

* rename transform datasets to prevent foreign key overlap

* Add clickhouse support

* fix clickhouse tests

* fix redshift tests

* fix bigquery failures

* kondo and filter tests by feature

* fix transform dataset for bigquery

* fix sqlserver transforms with joins

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

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

* use different metadata provider

* filter for left join feature in test

* improve sqlserver compile-transform

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

* clean up

* add sqlserver error test

* parse query and add into for sqlserver

* add type hints for linter

* Address comments

---------

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

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

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

* Mostly working nicely

* Clean up other middleware + test fix

* Finish it up

* Code cleanup

* Kondo

* Fix test 🔧

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

* Test fixes; PR feedback

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

* code cleanup

* Oracle test fix 🔧

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

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

* Add list view toggle control to ViewFooter

* Remove processRemappedColumns, add layout

* Navigation

* Back button,breadcrumbs

* TODO

* Layout

* Layout

* Refactor

* Column detection logic

* Inline

* Fix

* Extract Breadcrumb

* Fix

* Entity name in nav

* Condition

* Fix

* Header

* Style

* Remove

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

* Body

* Add empty list viz

* Update VizStyleToggle to use list display type

* Sidebar

* Style

* Add simple list view

* Add virtualization for ListViz view. Optimize rendering

* Copy

* Hover style

* Add object detail modal opening on list item click

* Remove back button

* Overflows

* a11y

* Redundant css

* Fix

* Fix rendering

* Style links

* Cleanup

* FK pill

* Render images

* Prevent showing old images while new are loading

* Take currency_in_header into account

* Extract `ColumnHeader`

* Cleanup

* Fix spacing, colors

* Refactor relationships

* Update PK drill

* PK drill

* Fix

* Fix

* Improve layout of list items

* Center cells content

* Add sorting

* Fix virtualized behavior

* Fix copy if row name is not available

* Max height for values

* Update ViewStyleToggle rendering rule to fix incorrect list view icon

* Styling fixes

* Make whole list view scrollable

* Hide truncated data warning for list view

* Fix PK drilll

* Don't memo formatted rows

* Fix virtualization

* Use drills for sorting

* Fix virtualization flickering

* Fix drills

* Disable viz settings for list view

* List view visual enhancements (#62124)

* spaecing and font styling

* add entity_type icons to listitems

* display 4 columns instead of 5

* change icon for transaction tables

* add circle for boolean fields

* add badge style to category columns

* add colors to badges, incl Score cols

* Save list questions as tables

* Footer

* Padding and scrolling

* Styling

* Styling

* Remove icon

* Fix useObjectDetail call for ListView

* Fix list view columns alignment

* Move detail view breadcrumbs to AppBar

* Style breadcrumbs

* Fix scrolling

* Show icon if avatar is missing

* Fix react key warning

* Align breadcrumbs with detail view page

* Remove arrow navigation and footer

* Styling

* Error handling

* Styling

* Make Detail View breadcrumbs preserve card settings

* Make DetailView breadcrumbs return to previous ListView state

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

* add company currency and receipt icons

* add new icons to IconName and Icons obj

* Remove duplicate 'currency' icon declaration

---------

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

* Update icons for TransactionTable and CompanyTable

* Make titleColumn always present. Update categoryValue styling

* ListView: Extract rendering logic to ColumnValue component

* Add tooltips for large column values

* Make list item grid always have at list 1 column

* Refactor DatasetEditorInner to typescript

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

* List view customization styling fixes (#62546)

* fix font sizes and spacing

* styling on ReorderableTagsInput

* make the viewsidebar 400px

* Make ReorderableTagsInput dropdown behave like multi-select

* Fix saving. Remove ViewStyleToggle

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

* Remove TabHintToast completely

* Fix container highlight when dragging between inputs

* Fix column settings in ListViz. Fix eslint

* Remove legacy DetailView code

* PR Cleanup

* Fix settings in list item preview

* Fix sorting. Replace custom column items with ColumnItem

* Fix saving models with list display type

* Fix incorrect condition to save list view models as tables

* Fix incorrect columns param in ListViewColumnsSidebar

* Fix list entity icon hover

* Tests – Models List View (#62836)

* Add storybook for ReorderableTagsInput

* wip

* Unit tests for ReorderableTagsInput

* Fix models-metadata related e2e tests

* e2e tests for List View

* Fix eslint

* Unit tests fixes

---------

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

* more settings

* another setting

* more settings
2025-08-29 14:21:27 +00:00
github-automation-metabase
41b42da633 chore(sdk): Update published npm version to 0.57.0-alpha.1 (#62920) 2025-08-29 14:00:29 +00:00
Kamil Mielnik
9319fb8ca6 Do not lock scroll behind detail view sidesheet (#62857) 2025-08-29 07:47:48 +00:00
Jakub Chodorowicz
75e51b4368 Prg 118 backfill provider name field on be side (#62420)
* Populate provider_name field on startup health check

* Serve provider patterns from BE side

* cleanup tests and expand clojure host provider detection

* Fix provider detection test

* Fix regexes for supabase and timescale

* adjust module api exports to standards

* mark private function ins provider-detection namespace

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

* Don't hardcode postgres in health check provider detection

* Make providers api dynamic and ready to support more engines

* Sort lines providers and engines

* Move hostname field tests to a test folder

* memoize detected provider

* Fix for tests for private functions

* Fix import of DatabaseProviderName type

* Use update function for setting provider_name on health check

* Fix typo in test case

* Remove duplicate entry

* simplify detect-provider-from-database call

* Move postgres extra-info to postgres driver module

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

* match provider also using engine

* bit of cleanup

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

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

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

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

---------

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

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

* Handle max = 1 case

---------

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

* Add comment documenting the intentional order

* remove recursive snake case update

* apply fix to both streaming and non streaming

* adding kebab->snake helpers that ignore camelcase

* Fix kondo

---------

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

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

* kondo fixes

* fixing tests by adding metabot premium feature flag

* profile-id-whitelist env var

* metabot-id-whitelist env var

* Revert "metabot-id-whitelist env var"

This reverts commit e46ef63242.

* Revert "profile-id-whitelist env var"

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

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

* use hostname

* fix params

* add test and clarify hostname field

* update helper text

* Apply suggestion from @jeff-bruemmer

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

* update hostname field

* apply suggestion

* improve test

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-28 17:24:42 +00:00
Dan Stone
2c8296bf53 BOT-319 Sem search dead letter queue (DLQ) (#62070)
* Add dead letter queue for the semantic search indexer

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

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

* Add the jitter factor I mistakenly deleted

* Doc fixes

* Slightly better stall recovery log

* Kondo

* Index attempt_at on DLQ table

* Add some more logging

* Init includes DLQ creation

* Fix some rebase collisions

* Formatting

* Add some asserts to show dlq creation during init

* Name test fixed with hashing

* Inline table-name-prefix

* Bump index meta version

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

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

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

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

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

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

* Whitespace cleanup

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

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

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

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

* Simplify honeysql qualified col reference in add-entries!

* Fix comment typo: s/indexes/indexer/

* Add missing seq in try-batch!

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

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

---------

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

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

In javascript, most of the store url stuff is through

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

which is based on `getStoreUrl` which is

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

...

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

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

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

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

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

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

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

This manually constructs a url:

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

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

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

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

* .

* .
2025-08-28 17:27:23 +02:00
Ryan Laurie
a40beb072a Fix Admin Nested Navlink Behavior (#62771)
* fix navigating on folders

* fix types

* conditional path for whitelabeling
2025-08-28 14:21:51 +00:00
Jeff Bruemmer
720c8513c5 relative links (#62827) 2025-08-28 09:24:54 -04:00
Phoomparin Mano
8dc14759a1 Fix flaky test for metabase-browser custom element (#62633) 2025-08-28 19:58:17 +07:00
Nick Fitzpatrick
e6d4839ffc Only clear card defer if request was not already cancelled (#62833) 2025-08-28 09:33:28 -03:00
Uladzimir Havenchyk
33c3ef25dc ci: use openldap from legacy registry (#62859) 2025-08-28 11:23:51 +00:00
Sébastien
b7a16be235 Closes EMB-760 table columns translations (#62760)
* Closes EMB-760 table columns translations

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

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

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-08-28 13:05:07 +02:00
Romeo Van Snick
da1637a882 Allow opening dashboard filters using keyboard (#62716)
* Do not pass Sortable attributes when element is not sortable

* Render parameter value trigger as button

* Add repro for metabase#52674

* Use UnstyledButton

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

* Update Loki Snapshots

* Use UnstyledButton and Box

* Fix syntax error

---------

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

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

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

This reverts commit 6970110108.

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

This reverts commit 30bb713240.

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

This reverts commit 71df2022c1.

* Trigger Build

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

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

* fix: show user-friendly error messages from server

* fix: review fixes

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

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

* fix: update expand row icon (#62268)

* fix: update expand row icon

* fix: review fixes

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

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

* inform admin about insufficient user permissions (#62395)

* fix: tests

* feat: add boolean input type (#62333)

* fix: typecheck

* fix: error display

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

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

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

* feat: show unsaved leave confirmation for table editing modals

* fix: modal order

* fix: review issues

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

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

* fix: date editing test

* fix: disable date test due to flakyness

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

* fix: visual blocker for table data editing

* fix: tests

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

* refactor to use ActionIcon

* fix bolt test

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

* fix: table editing bugs (#62796)

* fix: table editing bugs

* fix: tests

---------

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

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

* enable multi db by default for tests

* multi db as default, set inclusion filters for tests

* update introspection tests

* enable routing

* set enable multi db true as default

* use redef for spec

* clean up

* add more generic test

* update tests

* remove unused code

* clean up

* handle encrypted migration

* fix test and migration id

* move created and updated at fields

* more tests

* mark tests parallel

* fix whitespace

* fix athena test
2025-08-27 14:59:40 +00:00
Filipe Silva
7866ca3e84 fix: ignore case when offering metabot purchase (#62808) 2025-08-27 15:22:43 +01:00
Nick Fitzpatrick
e77320ac9e Git 7934 legends are cut off on pie charts when in documents (#62772)
* render pie charts more like dashcards in documents

* updating ChoroplethMap for documents
2025-08-27 10:42:54 -03:00
Sloan Sparger
9ccb92ab46 [Metabot] Add capabilities to metabot context (#62464)
Expose Metabase instance capabilities in ai-service context for Metabot

---------

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

* loki test

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

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

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

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

* Fix whitespace / alignment

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

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

* Remove references to Debian

* Use H2 database in .env file by default

* Add journalctl command to follow logs

---------

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

* do what metabot do
2025-08-26 15:29:11 -03:00
Aleksandr Lesnenko
e5e2c767a0 fix overflowing text in tables (#62708)
* fix overflowing text in tables

* thanks cubic
2025-08-26 17:28:27 +00:00
appleby
84763ca40d Refactor appdb-based scorers in the semantic search backend (#62690)
* Refactor appdb-based scorers in the semantic search backend

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

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

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

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

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

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

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

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

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

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

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

Where c6a9 is master and 462 is the branch.

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

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

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

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

And we get:

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

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

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

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

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

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

And now we have a correct list of files changed in that PR, not just
files different between current master and current PR.
2025-08-26 11:09:05 -05:00
github-automation-metabase
6f461a78b5 chore(sdk): Update published npm version to 0.57.0-alpha.0 (#62749) 2025-08-26 15:16:41 +00:00
Noah Moss
873f5830d0 Migrate remaining clj-time usages to clojure.java-time (#62696)
* Convert revision usage

* convert pivot test + metabot usages

* convert more tests

* migrate final clj-time usage in logger.core

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

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

This reverts commit 393bc56aad.
2025-08-26 10:49:09 -04:00
Timofey Kachalov
e141921ac8 Use jq for getting the SDK release tag (#62748) 2025-08-26 18:38:00 +04:00
Timofey Kachalov
8442c3a3fd Prepare build scripts for determine-sdk-version job (#62740) 2025-08-26 17:42:01 +04:00
Alexander Polyankin
9ec5f14c6b Make linking top-level parameters with inline parameters in dashboard work (#62691) 2025-08-26 09:00:52 -04:00
Alexander Polyankin
affd550c24 Ignore unsaved parameters when executing dashboard card queries in edit mode (#62680) 2025-08-26 09:00:27 -04:00
Alexander Polyankin
454598b4c0 E2E repro for "Model is being expanded to data sources after edit/distribute" (#62671) 2025-08-26 09:00:16 -04:00
Timofey Kachalov
c2016c28c8 Fix sdk pre-release version calculation and test-unit glob (#62729) 2025-08-26 16:42:40 +04:00
Kamil Mielnik
7dd4936c57 Detail view (#62011)
* Boilerplate

* Remove processRemappedColumns, add layout

* Navigation

* Back button,breadcrumbs

* TODO

* Layout

* Layout

* Refactor

* Column detection logic

* Inline

* Fix

* Extract Breadcrumb

* Fix

* Entity name in nav

* Condition

* Fix

* Header

* Style

* Remove

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

* Body

* Sidebar

* Style

* Copy

* Hover style

* Remove back button

* Overflows

* a11y

* Redundant css

* Fix

* Fix rendering

* Style links

* Cleanup

* FK pill

* Render images

* Prevent showing old images while new are loading

* Take currency_in_header into account

* Cleanup

* Refactor relationships

* Update PK drill

* PK drill

* Fix

* Fix

* Fix copy if row name is not available

* Max height for values

* Fix PK drilll

* Fix drills

* Footer

* Padding and scrolling

* Styling

* Styling

* Remove icon

* Move detail view breadcrumbs to AppBar

* Style breadcrumbs

* Fix scrolling

* Show icon if avatar is missing

* Fix react key warning

* Align breadcrumbs with detail view page

* Remove arrow navigation and footer

* Styling

* Error handling

* Styling

* Support models

* ESLint

* Types

* Types

* Make FK drill take user to the new page

* Update model-indexes.cy.spec.js

* Only consider PKs from the raw underlying source table

* Fix URL

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

This reverts commit c408188fce.

* Revert filtering by source table

* Rename DetailView to DetailViewPage

* Add DetailViewSidesheet boilerplate

* Revert e2e changes

* Lift state

* Rename

* Bring back old drills

* Format code

* Use sidesheet

* Custom stylesheet component

* Styling

* Fix FKs

* Paddings

* Shadow

* Spacing

* Cleanup

* Prev/next buttons

* Add url buttons

* Implement url generation + update model page url

* Fix

* Highlight zoomed row

* Fix

* Memo

* Fix interactivity when object detail is open

* Remove autofocus

* Fix tooltip

* Consistent close button

* Aria

* Pixel-perfect

* Fix types

* Fix FK pill rendering

* Fix types

* Fix

* Fix

* Fix remapping

* Fix types

* Move test id

* Use proper cols

* Remove dead code

* Add testid

* Fix unit test

* Update unit test

* Lift qb redux state usage from TableInteractive to DatasetEditorInner

* Add ... button and separators

* Add object actions menu

* Move getObjectQuery

* Fetch row if missing, update tests

* Update tests

* Update tests

* Update tests

* Hide nav when not useful

* Update tests

* Update tests

* Fix Esc handling

* Arrange separators

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

* Fix viz settings not being applied

* Refactor

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

* Fix actions fetching

* Add test for Esc

* change view detials icon to sidebar_open (#62471)

* Use new icon everywhere

* Fix row highlighting in questions

* Toggleable object detail

* Remove todo

* Fix test

* Make table viz settings affect the detail view

* Fix types

* Move filterByPk

* Fix types

* Use MLv2 to generate query

* Refactor

* Refactor

* Add keyboard navigation

* Fix types

* Fix

* Fix

* Update copy

* Style links

* Make selectors safe

* Responsive detail page

* Re-use Urls.tableRowsQuery

* Use Divider

* Fix pills

* Use palette colors

* Detail view - Tests (#62576)

* Take sidebar presence into rwd calculations

* Add test

* Add a test for toggling

* Add assertions

* Add unit tests for Header

* Add comment

* Add test

* Add tests

* Add tests

* Remove comments

* Add tests

* Add tests and extract helpers

* Fix model breadcrumbs

* Clean up

* Rename tests

* Add 404 tests

* Sort

* Format code

* Add tests

* Add Relationship unit tests

* Clean up

* Handle errors

* Add tests

* Add tests

* Add tests for images

* Proper model breadcrumbs

* Fix ellipsis

* Add assertions

* Add assertions

---------

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

* make parameter widget have the dropdown

* update tests

* cleanup

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

* remove deprecation message from addFields

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

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

* Add readOnly prop to PopoverBackButton

* Add readOnly to FilterPickerHeader

* Add readOnly prop to FilterPickers

* Allow making filter body readOnly

* Pass readOnly to FilterPicker from FilterStep

* Add disabled prop to ClausePopover

* Disable step popovers when readOnly (except for filters)

* Do not disable pointer-events for notebook preview

* Disable popover when button is disabled

* Render readOnly expression popover in readOnly mode

* Make limit step readOnly when readOnly is set

* Add test for readonly notebook

* Disable tooltip on join picker when read-only

* Disable join picker popover when read-only

* Hide back button on date picker

* Simplify backbutton props

* Do not allow going back in readOnly ExpressionWidget

* Allow readOnly AggregationPicker

* Allow opening aggregation popover when it is an expression

* Render aggregation popover when it is a custom expression

* Fix types

* Remove renderPopoverWhenReadOnly flag

* Fix cursor logic on SortStep

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

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

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

== How to test ==

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

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

* UXW-503 Makes CardEmbed error state selectable, bordered

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

* UXW-503 Adds e2e test

* UXW-503 Removes useMemo per PR feedback

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

* add partial index on gated_at for just the tombstone rows

* fix up index creation syntax

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

* fix tests

* fix whitespace, adjust log/docstring

* kondo

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

* add tests

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

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

---------

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

* support mention extension

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

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

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

Clarified instructions on pinning SDK versions for Metabase Cloud instances.

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

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

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

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

* Add e2e test case

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

* Let the backend handle the invite_sent snowplow event

* Change approach to set source value

* Fix unit tests

* Add unwrap() to createUser dispatch

* Remove unused invite param from the /setup endpoint

* Remove unneeded frontend code

* Fix kondo issues
2025-08-25 12:26:11 -03:00
Sloan Sparger
694fbaa5a2 [Search] Increase search reporting (#62200)
* track search_engine

* track request id

* record request id on search_query event

* fix bug with search_click position not factoring in pagination

* report offset on search_query

* report on the entity model

* move changes into new schema file and update referenced schema

* add back view_more event

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

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

* report search term for internal purposes only

* pr feedback

* add test coverage for new search reporting attributes

* maybe fix e2e in ci

* fix failing e2e
2025-08-25 10:15:19 -05:00
Timofey Kachalov
be2773de2b Make SDK backward-compatibility tests required (#62561) 2025-08-25 18:56:57 +04:00
Timofey Kachalov
15f7d3d20e refactor(sdk): Split embedding-sdk-bundle directory into 3 directories (#62613) 2025-08-25 18:36:56 +04:00
Riley Thompson
b39d5925b0 Enable specifying a database for Athena (#62183) 2025-08-25 10:14:41 -04:00
Nick Fitzpatrick
8879b09200 Fix Back Button for document questions and drill thrus (#62519)
* generalize back button

* update document back button

* test adjustments

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

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

* Also translate job descriptions.

* Use fewer hits to the db on startup

* Use site locale

* kick ci

* Remove extraneous arg

* Remove extraneous strs

* Different translation model (on select)

* setup no longer needed from transforms

* Fix

* Test transform tag translation

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

* Update Loki Snapshots

---------

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

* Update Loki Snapshots

---------

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

* Update Loki Snapshots

* Update Loki Snapshots

* Revert "Update Loki Snapshots"

This reverts commit 0fc74e3e68.

* Revert "Update Loki Snapshots"

This reverts commit 438a00eaba.

* Update Loki Snapshots

---------

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

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

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

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

* make it the new default

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

* Apply suggestions from code review

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

* markdown

---------

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

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

* Only query the recent_views table for models it knows about

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

* Cleanup comments

* Improve prometheus metrics for user-recency and add tests

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

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

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

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

* fix whitespace

* fix whitespace

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

* UXW-506 Hides some UI from Download as PDF

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

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

* Fix mapping parameters gap

* Fix usage analytics edit permissions button

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

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

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

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

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

That output looks like:

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

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

* Remove Undo button from toast when undoing a tag

* Avoid wrapping in certain columns for transform lists

* Add test for tag removal invalidation

* Fix unit tests

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

* Fix the test from #60583

* Code cleanup

* I have fixed #39033

* Enable e2e test

* Add ref for #62383

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

* Test update 🔧

* Update the test again

* Test fix 🔧

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

* Preprocess returns MBQL 5

* Split off changes to limit middleware

* Fix Kondo warnings

* Revert changes from Limit PR

* Code cleanup

* Preprocess returns MBQL 5

* Kondo cleanup

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

* Update more tests to use mock metadata providers

* Use even less with-temp

* Remove with-temp in QP middleware viz settings tests

* Rework metrics-test to never use with-temp

* Remove more with-temps

* Update case-test to use mock metadata providers

* Even more with-temps

* Update even more tests

* Fix two more

* Nice

* Revert stricter schema for query-hash

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

* cljfmt

* Test fix 🔧

* Fix permissions

* Split off malli improvements into #62523

* PR cleanup

* PR feedback

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

* Test fixes 🔧

* Test fixes and formatting

* Fix flaky tests

* Add clj-kondo ignores everywhere

* Bug fix 🔧

* PR feedback

* Fix if expressions with default values

* More test fixes 🔧

* Code cleanup

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

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

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

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

* edit

* various fixes

* links

* reinstate note

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

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

* fix test

* chore: check for index-created? in test

* undo

* feat: include index-created-at

* feat: support lazy gating + stale index behavior

* fix tests

* fix

* fix test

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

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

* feat: randomize index name

* force new index

* shorter name

* suffix as part of qualify

* re-init test

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

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

* pick last index

* docstring

* add test

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

* remove index-created? opt

* ensure table always exists

* back out including id/index_created_at in index

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

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

* Oops

* Fix circular deps

* Test fixes 🔧

* Page => cljc

* Test fix 🔧

* Add tests; Kondo fix

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

* Fix up tests, add orphan table handling

* Fix up conflict resolution

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

fix types and opacity

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

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

* store provider name in the app db

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

* Allow setting null value to provider name field

* Fix db tests

fix test

fix test

* Add db submit integration test

fix type error

* Rename mock file name

* Simplify postgesql json form mock

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

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

* upgrade to 8.2.2

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

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

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

* fix unit test and fix utm tags on link

* update docs link

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

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

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

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

* address feedback

* swap static and sdk as per feedback in the pr

---------

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

* add e2e test

* fix tooltips

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

* dont require, and skip

* skip in stress test

* add todos

* comment out vertica

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

* Add e2e test

* Review fixes - deduplicate text truncation

* Add visual test

* Fix CI

* Fix label offset

* Update Loki Snapshots

* Fix issue with static viz

* Update Loki Snapshots

* Fix visual tests

---------

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

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

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

* debug

* fix PR creation

* whitespace

* trailing space

* update release

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

* Add BE logic

* Fix

* Review fixes

* Review fixes

* fixup! use linear time deduplication

---------

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

* improve summary

* check out branch prior to gen

* update master and release

* run at different time

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

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

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

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

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

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

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

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

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

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

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

* Add visual test

* Update Loki Snapshots

---------

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

* Introduce settings

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

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

* Allow rendering databases as disabled in DataSourceSelectors

* Allow rendering databases as disabled in NativeQueryEditor

* Add features for transforms/* to type

* Disable unsupported source tables in the native queyr transform builder

* Allow disabling databases in DataPicker

* Allow passing shouldDisableItem from Notebook to DataStep

* Disable unsupported databases in datapicker for transforms

* Remove type error in filter

* Pass shouldDisableItem to more pickers

* Add missing database to item

* Filter out unsupported questions too

* Remove database property again from DataPickerItem

* Fix item type

* Rename db_id to database_id

* Pass database_id in collection picker

* Disable unsupported tables, metrics and dashboards

* Hide recent items that have been disabled

* Padd shouldDisableItem to more sub-pickers

* Add database metadata to table

* Add shouldDisableItem to TablePickers

* Rename helper

* Simplify types

* Add hook to avoid using metadata

* Disable questions based on unsupported databases in question picker

* Allow disambiguating RecentItem from TableItem

* Disallow transforms on audit databases

* Add tests for unsupported databases

* Add unit tests for disabling items

* Disable dashboards in Question picker

* Use plain ORDERS_ID

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

* Pull out helper into separate definiton

* Add test about creating transforms from metrics

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

* Use Loader from metabase/ui

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

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

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

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

* PR feedback

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

* update script

* add release workflow

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

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

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

* Add e2e test

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

* Trim the connection URI at first step

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

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

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

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

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

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

,,,

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

and after:

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

* eastwood doesn't like new qualified method stuff

* Attempt to fix flaky tests

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

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

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

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

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

Sending a notification like

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

now results in:

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

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

For illustration, let's say I do this:

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

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

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

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

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

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

* Move log context ex-data to special key

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

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

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

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

* Track job runs

* Add event when new transform is created

* Track transform create menu interactions

* Add tests for snowplow events

* Pull out transform manual runs into analytics file

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

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

* Move parameters to correct location when converting joins

* Fix conversion of joins with filters

* Splice join parameters together

* QP params => Lib

* Fix Kondo warnings

* Simplify PR [ci skip]

* Beautiful QP middleware

* Beautiful QP middleware.

* Add notez

* Test fixes 🔧

* JVM metadata provider fix 🔧

* Kondo & cljfmt

* Test fixes 🔧

* kondo

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

* Fix the schema

* Revert unneeded changes

* Fix busted tests 🔧

* Fix two more busted tests.

* Fix even more broken tests

* Fix broken tests 🔧

* Improved normalization for :value clauses

* Test fix 🔧

* Test fix 🔧

* Fix resolution of field name refs in first stage

* Test fixes 🔧

* Another round of test fixes 🔧

* Fix :expression ref parameters

* Maybe fix flakes

* Test fixes 🔧

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

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

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

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

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

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

This permanently deletes a collection and anything contained inside it.

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

Now you have:

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

(because C was trashed directly).

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

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

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

* Don't get the parent for no reason

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

* update workflow

* edits

* format

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

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

* Tighten up test assertions in native-query-test

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

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

* backwards compatible

* changelog

* more explicit changelog

* stronger wording

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

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

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

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

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

* sort active-engines by default-engine first

* more logging around appdb init

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

* committing forgotten files

* e2e adjustments and fixes

* test adjustments

* remove shameful hardcoded font sizes

* fix font size on switches

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

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

* Extract upsell styles to per component css modules

* Regression - bring back margins to cta in large upsellbigcard

* Add upsell components to loki visual tests

* Fix too big margin in upsell large variant

* Align storybook story with the real usage

* Update Loki Snapshots

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

---------

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

* Save changes

* Redshift passes tests

* Fix placeholder

* Fix placeholder

* Rename execution to run

* Rename execution to run

* Rename execute to run on the backend

* Rename execution to run

* add default jobs for the default tags

* Snowflake and SQLServer passing tests

* Fix issues stemming from BE renames

* Rename execution to run

* Rename execution to run

* Rename execution to run

* assorted updates

* Rename execution to run

* E2E tests

* E2E tests

* E2E tests

* E2E tests

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

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

* fix `api.transform-job-test`

* E2E tests

* E2E tests

* Add inverse to tag insertion

* Fix whitespace in yaml (my favorite ;)

* E2E tests

* Add defaultly-tagged jobs back in

* Fix mysql migration (rollback order)

* Appease migration linter

* Oops

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

* E2E tests

* E2E tests

* E2E tests

* don't run transforms on audit dbs

* Isolate transforms tests from regular test data

* Woof! Migrations now lint correctly

* m. changeset ids (sorry)

* E2E tests

* Better delete rollbacks

* Whitespace

* Last whitespace lint issue

* E2E tests

* Brain fart mistake.

* Remove excess drop table

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Better rollback for mysql

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* better error message when target already exists

* Get API tests passing again

* Add some multimethod unit tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* timeouts use a setting

* jobs check whether things are already running

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Change default job names.

* E2E tests

* E2E tests

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

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Fix execute test

* E2E tests

* E2E tests

* Allow nil schema in api

* E2E tests

* Run all transforms tests on ci

* Fix mysql ordering

* E2E tests

* Cancel targeting for worker_run_cancelation deletion

* E2E tests

* E2E tests

* only postgres supports transforms

* Rename worker_* to transform_*

* E2E tests

* Delete tag initialization

* E2E tests

* Fix up API tests, get BigQuery working

* Remove bigquery support flag for transforms/table

* worker_run_cancelation -> transform_run_cancelation

* No more worker

* Add missing file

* make transform_id and transform.id types consistent

* QUE-2140

* Remove views/materialized views

* Seed transforms data at startup

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

* m.

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* convert localized strings into actual strings on job seed insert

* fix some tests

* add docstrings for transforms api routes

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Migration fix?

* Revert "Migration fix?"

This reverts commit a4704c2203.

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* readd accidentally deleted h2 defmethod

* don't serialize transform models

* Remove with-transform-runs

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

* cleanup ns

* Remove with-transform-tags

* Fix silly tru mistakes

* Remove test-transform

* Migration fix?

* Simplify tests using defaults

* Migration fix?

* cljfmt

* cljfmt

* Use with-temp

* Seed tags/jobs based on internal setting

* cljfmt

* cljfmt

* cljfmt

* Better cleanup in tests

* assorted kondo and transform job hydration updates

* FE tests

* remove worker from config.edn

* start running all tests again

* Kondo transform_job.clj

* Kondo models/transform.clj

* Kondo models/transform_job.clj

* Kondo models/transform_run.clj

* FE tests

* test fixes

* Kondo ordering.clj

* Kondo schedule.clj

* test fixes

* test fixes

* test fixes

* test fixes

* FE tests

* Fix models?

* Fix models?

* m. cleanup

* Fix tests

* kondo passes

* Add entity ids

* Make entity_id s nullable

* Re-add entity ids to seeded tags and jobs

* Use model names in seed tests

* Better relative positioning in UI for tags

* Rename join tables

* Fix tests

* Fix tests

* Update entity_id

* kondo

* formatting

* formatting

* e2e test for default jobs and tags

* e2e test for default jobs and tags

* Remove transforms-gating for transforms default value seeding.

* e2e test for default jobs and tags

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* add tests

* add tests

* add tests

* add tests

* add tests

* Comment out failing test

* Fix kondo complaints

* Remove unique constraint on tag name.

* Lint fix.

* Re-add necessary rollbacks for old SQL versions

* Re-add timeout and cancelation on timeout

* update changelog

* Remove transforms-seeded setting

* Last bits of cleanup from local review

* Add transforms.jobs to init

* Missed a DRY spot.

* Fix schemas

* Remove dead code

* Merge master

* Merge master

* Remove dead code

* linter

* update transform job run when already-run transform completes

---------

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

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

* Apply suggestions from code review

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

---------

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

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

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

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

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

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

* Ditch overall sidebar for now (#61523)

* Remove list of cards sidebar

* Some type fixes

* Review fixes

* feat: associate in_report cards w/ report_document

* feat: associate cards with reports in create

* better markdown serde

* switch to prosemirror ast

* chore: add enterprise card test

* remove snapshots

* less redux

* send used card ids

* drop flushSync error

* remove replace question, drop refresh question

* fix backend not starting

* saving new report should not show LeaveRouteConfirmModal

* polish

* Insert into reports from metabot (#61642)

* insert from metabot

* Metabot plugin and hook

* make stuff nicer

* cleanup

* no more snapshots

* run build and docker uberjar on push

* remove trigger for uberjar

* Print Report

* cleanup

* always create a card clone when embedding

* always clone non in_report cards

* disable metabot sidebar on mob+b

* stop header bouncing

* jumping layout when loading

* why scroll to bottom when opened

* gross emojis

* cleaning up emoji ui a bit

* icons

* fe: reports -> documents

* update metabot question creation parsing

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

* do not leak prosemirror styles into charts

* chore: rename everything to document (#61743)

strip out snapshotting code

* fix FE usage of documents api

* fix embedding dashboard-only cards to documents

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

* mention all entities

* split mention vs command, allow mentioning other entities

* paste smartlinks

* missing import

* fix links to tables

* fix layout

* auto focus on title on new documents

* UXW-404 Improves image formatting

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

* Fix issues with multiple in-flight requests

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

* Document Metadata

* Fix some CI issues

* Persist cards when saving document (#61818)

* chore: remove document version model

* persist cards only when saving documents

* chore: remove in_document type

* feat: return document creator

* feat: save cards with parameters pass in as cards

in POST and PUT requests to documents

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

search, recents, collection items

* chore: fixup search and card tests

* contract

* feat: update document ast with new card ids

* fix: report -> document in collection api

* fix: ws

* feat: clone cards not associated with document

* chore: add tests for document permissions

* fix contract

* fetch root collection

* update message

* must be working now

* fix sidebar

---------

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

* wip but working sql query editor in documents

* feat: revision history for documents

* feat: include revision info in collection tree res

* document entity

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

* feat: allow documents to be archived

* Document Collection Item Caching

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

* fix UXW-412 again

* feat: allow documents to be bookmarked

* fix: hide documents in collection items if not EE

* fix: add perms info to documents in collections

* fix: always add documents to bookmark lookup

* feat: add document delete endpoint

* fix: require non-blank string for name

* App Bar Breadcrumbs for documents

* fix: tests and lints

* fix: ordering of migrations for mysql

* fix: for OSS tests

* fix: tests and kondos

* fix: module sort

* New metabot documents API

* UXW-400: formatting floating menu

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

* swap icon

* l10n

* fix: bad var reference in tests

* undo moves should work once archived is boolean

* Show tooltip with precise time in document metadata

* Updates MetabotEmbed to work with upcoming BE changes

* Updates MetabotEmbed to always use draft cards

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

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

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

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

* fixed drills & query editing for metabot cards

* fix: foreign key indexes

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

* fix: add entity id column to documents

* add title to untitled docs

* UXW-453 Fix 404 when clicking draft card title

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

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

* hide object detail row in document tables

* UXW-459 Fix issues with LeaveRouteConfirmModal and new documents

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

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

* improved mention and command

* clean

* fix replace question

* do not show bubble menu on disallowed nodes

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

* Localizes "Created with Metabot" text

* drop emojis

* no emojis and markdown downloading

* fix metadata fetching

* initial e2e tests

* fix: set null on collection cascade for documents

mirrors behavior for dashboards and cards

* fix: remove documents token hack

* feat: documents in search

Also supports view_counts and last_viewed_at for documents

* fix: emit documentment read on api get

* fix: in_place search fixes and test fixes

* fix: migration order

* fix: set type to :question dashboard_id to nil

* fix: more in-place search fixes for documents

* fix: final in-place search test fixes

* fix: handle inadvertent documents in oss tests

* mention + command feedback

* placeholder

* fix command search

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

* fix command

* feat: support pinning documents

* fixup! pinning reconcilation with documents

* feat: support serdes on documents (#62032)

* fix: kondo warning on unused var

* updated styles

* bump padding

* Markdown Loki Test

* UXW-462 Adds database picker in metabot block

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

* refactor

* feedback on the command

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

* improve state management UXW-463 UXW-450

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

* feat: add documents to recents

* fix: whitespace and round-trip serdes test

* fix: whitespace exclusion path

* fix: token features in recent views test

* Able to generate sql charts

* fix: casing in tests

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

* more e2e tests

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

* Update menu items (#62072)

* Update commands and remove descriptions

* Removes unused code

---------

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

* feat: return can_restore, can_delete for docs

* Updates Document type with newly added properties

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

* Move, Archive, and Bookmark in documents page

* bury shame

* UXW-472 Adds ArchivedEntityBanner for documents

* fix: remove extraneous precondition migration

* UXW-451 Adds some light dataset error handling

* Reverts probably-accidental change

* feat: check for name length

* Reports fix fe ci (#62046)

* Fix some CI issues

* Fix some CI issues

* Fix typecheck issues

* Fix lint

* Fix unit tests

* Fix e2e tests

* fix pivot query editing in documents

* better command popover positioning

* UXW-473 fix layout

* fix z-index

* only include tables you can use for native query builder

* Fix typecheck

* Light documents metabot cleanup

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

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

* cleanup

* attempting to get a card embed in storybook

* Fix documents stories

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

* fix: bookmark inside a collection error

* Removes now-unused extensions

* chore: tests for metabot tools

* Add token check on the FE

* fix: remove unused ns from test

* Review fixes

* Revert token check

* Add token check on the FE

* fix: correctly serialize token status to FE

* Fix e2e tests (#62113)

* Fix e2e tests

* Fix e2e

* fix: use adhoc metadata if card id is negative

* chore: add tests for isSavedCard guard

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

* Fix typecheck

* fix: token feature tests

* fix: add docs to stats ping

* Fix typecheck

* Fix e2e

* Reverts now-unnecessary changes

* Reverts more now-unnecessary changes

* Address cubic PR feedback (type guards)

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

* Fix e2e

* PR feedback (code cleanliness)

* PR feedback (simplify custom node definition)

* adding loki references

* delete loki reference files

* adding missing loki reference files

* auto-fix generated sql (#62167)

---------

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

* PR feedback (unit test + remove unused classes)

* addressing some minor feedback

* chore: add table utils tests

* review

* Cleans up types

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

* review

* cleanup documents selectors

* remove unnecessary type cast in visualizationUtils.ts

* remove versioning mention in comments

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

* Code review fixes

* remove inline styles from FormatButton

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

* remove inline styles

* drop unused suggestion styles

* consistent hook names

* drop unused dep

* remove any from DocumentPage

* clean up change callbacks of the editor component

* drop unused onClode prop in EmbedQuestionSettingsSidebar

* provide correct reportTimezone to ModifyQuestionModal

* make runQuestionQuery optional

* NativeQueryModal cleanup

* clean up NativeQueryModal

* drop unused code in useDocumentState

* unnecessary casting

* reset error state

* drop unused prop

* bubble menu disallowed nodes

* dedupe similar hooks

* review

* fix: kondos

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

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

* fix: PR comments

* fix: remove schema ns

* Potential fix for e2e test failing on CI only

---------

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

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

* Fix typo in gate test: documen -> document

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

* make starburst not required

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

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

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

* Fix e2e tests

* Fix e2e tests part 2

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

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

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

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

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

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

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

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

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

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

---------

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

* copy docker compose, add defenterprise integration

* WIP getting the integration working

* fix up reindex! call

* fix whitespace

* kick ci

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

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

* Add a couple of helpful comments for manual testing

* Add ability to change db-url at the repl

* Add can-read? checks for search results

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

* sort kondo modules

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

* remove a blank line

* fix remaining clj-kondo issues

* Add semantic search test workflow (#61065)

* Add new workflow for semantic search

* Add a quick example test to see if things work

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

* Sparks of joy

* Add a delay to appease the kondo gods

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

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

* fix results postprocessing, add verified field to search index

* scaffold a basic query test

* index filtering tests

* quicky and dirty implementation of the requested ui changes

* Add basic connection pooling + tests

* Fix test indentation

* add test for verified content, refactor tests a bit

* address comments

---------

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

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

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

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

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

* update tests

* Register semantic-search premium feature

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

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

* Fix t2-instance derivation from search docs

Lookup in database as the search document model is lossy

* Test collection based permission checks apply to search results

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

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

* fixups

* fixups

* fix up error in tests

* add semantic-search to stats ping to quiet test

* quiet another test

* fix whitespace

* fix kondo warnings

* fix up and simplify embedding tests

* fix core init test

* fix more tests

* tweak setting defaults + comments, remove debugging code

* fix compilation

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

* fix lint issues

* Batched index updates for semantic search (#61117)

* kick ci

* Add comment to trigger reindex job

* Fix docstring typo

* Batch index updates for semantic search

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

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

* Create metabase-enterprise.semantic-search.test-util and move once-fixture there

* Move other test helpes and macros into the semantic.test-util ns

* Factor out with-indexable-documents! from with-index!

* Move binding of search.ingestion/*force-sync* into with-temp-index-table!

Questionable, but realistically can't see tests wanting to use a temp index table without forcing sync reindex.

* Add table-exists-in-db?! to semantic.test-util

* Add some basic tests for funcs in the semantic.index namespace

* Add tests for batched index updates

* Disable flaky tests

* Fix up issues post-rebase

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>

* Fix accidental blocking search index init (#61200)

* kick ci

* Fix accidental eager index initialisation

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>

* Batched requests to OpenAI for fetching vector embeddings (#61217)

* Batch calls to openai according to token counts

* refactor

* mock the new batch embedding function

* mock both batched and unbatched embedding functions in tests

* a little code consolidation

* address comments

* Init db connection in reindex! if needed

* Add more DB existance checks for safety

* fix fe tests

* Lower batch size, improve logging, and make it configurable via env var (#61274)

* Lower batch size, improve logging, and make it configurable via env var

* fix whitespace

* Remove transaction from batched semantic search index updates (#61229)

* Drop uneccessary ! from table-exists-in-db?!

* Don't wrap batched index updates in a transaction

https://github.com/metabase/metabase/pull/61117#discussion_r2214828302

* Filter indexed entities from semantic search index

* Create HNSW index on semantic search embeddings column (#61238)

* Create HNSW index on semantic search embeddings column

* Add test for HNSW index creation

* Ensure identifiers are quoted when formatting honey sql in semantic search index

The nano-ids used in temp table names when testing (and various other places) might contain uppercase chars or hyphens which need to be quoted.

* Fix batch-delete! log message

* alter create-index-table! to not wipe the index if it already exists, and use the upsert API during index population (stop-gap changes to try to get the staging instance working)

* fix document filtering

* Only create HNSW embeddings index :if-not-exists (#61305)

Since init! no longer wipes the index table if it already exists, we also need to only create the embeddings HNSW
index if it does not exist.

* Better batching for semantic search (#61299)

* streaming embedding results to the index-updating code

* rework

* suppress kondo

* Parameterization refactor (#61328)

Adds the `index` and `embedding-model` parameters to functions in `index` and `embedding` respectively. This allows a degree more flexibility and less coupling to global variables which restrict how indexing functions can be used. 

The goal is this PR supports changes regarding active/pending and the embedding model being something you can play with at runtime.

* Add embedding-model parameter

* Restore previous top-level transaction behaviour on init/reindex

* Reduced redundancy

* Embedding test fixes

* Fixup comments

* Fix rebase goofs

* Fix tests again

* Joy

* Add `index` parameter, composed of table-name and embedding model

* Keep index name in the index structure

* English is a hard language

* Remove `:redef` we no longer want

* Another merge goof fix

* Fix bug in associating batched embeddings with original documents (#61347)

* Fix bug in associating batched embeddings with original documents

* tweak

* add log

* Quick follow-up optimization to prior PR: don't iterate over all of filtered-documents in each batch

* [Metabot] Hybrid search w/ RRF (#61353)

* rrf based hybrid search implemented

* keyword results weighted more heavily by name, corrected some issues with the rrf calc

* fix final result ranking

* move tsvector-related util functions into search.util and expose in the search interface to fix kondo errors

* Taking a stab at fixing SQL injection risks following existing postgres tsvector querying pattern

* Move postgres tsvector util tests

* gracefully handle nil names

* switch back to raw embedding literals but validate their contents

* add back perm checks (whoops)

* add back str/replace for ts-search-expr, bump up cosine distance cutoff

* tweak cutoff again, fix create index test

* remove str/replace usage bc it seems unneeded

* fix rrf calc

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>

* Remove indexed-entities from the semantic search model-set and documents reducible (#61304)

* Remove indexed-entities from the semantic search model-set

* Add comment about filter-read-permitted and indexed-entity docs

* Add prometheus metrics for semantic search backend (#61309)

* Add :metabase-search/semantic-index-size prometheus metric

And update it on upsert-index! / delete-from-index!

This metric mirrors the corresponding :metabase-search/appdb-index-size

* Add :metabase-search/semantic-embedding-tokens prometheus metric

* Make log levels / messages more consistent

* Remove vestigial populate! reference

* Record actual token usage as reported by OpenAI API response

* BOT-255 Index metadata system (#61379)

* Add index-metadata system

Adds the necessary indirection to support more advanced index table
management.

- Allows multiple indexes to exist
- Indexes are tracked by a new index_metadata table
- A single active pointer determines which index to use for the current
search engine backend
- It is assumed table == logical index and there is no other
partitioning, hence the unique constraint
- Some small simplifications to index.clj (drop index-name, assume names
are prefixed with the table name)
- The top level orchestration code happens in a new pgvector-api
namespace to avoid bloating the enterprise hooks (which assume a global
environment), and allow the api level to be properly parameterized.

* Kondo

* Appease kondo with require for next.jdbc in comment block

---------

Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>

* Enable fts on native query contents in the semantic search backend (#61576)

* Enable fts on native query contents in the semantic search backend

Update the semantic search backend to handle fts of native query contents in exactly the same way as the appdb
backend, namely: all keyword search content gets indexed into two separate columns, one with and one without native
query contents. At runtime, we decide which column to query against based on the user's search setting.

For now, this only modifies the keyword search side of the hybrid search result. The semantic search on the vector
embeddings still does not include native query contents, but any keyword matches can still get blended into the result
set by the RRF ranking.

* Ensure index names do not exceed postgres max of 63 characters

* Allow to toggle NativeQuery independent of DisableSemanticSearch in SearchSidebar.tsx

* Cleanup whitespace

* Add native-query-test

* Add :native_query to semnatic.tu/mock-documents

* Add upsert-index!-tsvectors-test

* Remove unecessary :raw wrapper from column names

* Remove unused =? alias

* [Semantic Search] Embedding generation support for OpenAI compatible APIs (#61641)

* make open base url configurable, add arctic-embed support, sanitize index table name for models with slashes + commas + periods

* make table names slightly shorter

* Update enterprise/backend/src/metabase_enterprise/llm/settings.clj

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* Update enterprise/backend/src/metabase_enterprise/semantic_search/index.clj

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* Update enterprise/backend/src/metabase_enterprise/semantic_search/index.clj

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* split off provider name to make index shorter

* Fix tests failing due to removing text-embedding-3-large model

* Abbreviate model names to ensure we do not exceed postgres identifier name limit

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>

* Ensure that semantic search entrypoints are safe to call without init! (#61438)

* Ensure that semantic search entrypoints are safe to call without init!

* Move more helpers into semantic.test-util namespace

* Add tests for calling semantic search entrypoints prior to calling init!

* Adjust fix and tests to work better with new index-metadata apis

And also log a warning and return nil if anyone calls into update-index! or delete-from-index! prior to calling init!

* set default for ee-openai-api-base-url setting

* BOT-258 semantic indexed entities (#61527)

* kick ci

* Semantic search filtering, basic querying tests, connection pooling, etc (#61098)

* fix results postprocessing, add verified field to search index

* scaffold a basic query test

* index filtering tests

* quicky and dirty implementation of the requested ui changes

* Add basic connection pooling + tests

* Fix test indentation

* add test for verified content, refactor tests a bit

* address comments

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* FE - default to app db search, enable semantic in command palette and search page, add disable semantic search on search page

* Init permission support for indexed entities

* fix kondo

* Fix rebase errors

* Fix rebase errors

* pr feedback

* unit test index entity perm filter

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* BOT-259 Semantic search filter parity (#61396)

* kick ci

* Semantic search filtering, basic querying tests, connection pooling, etc (#61098)

* fix results postprocessing, add verified field to search index

* scaffold a basic query test

* index filtering tests

* quicky and dirty implementation of the requested ui changes

* Add basic connection pooling + tests

* Fix test indentation

* add test for verified content, refactor tests a bit

* address comments

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* FE - default to app db search, enable semantic in command palette and search page, add disable semantic search on search page

* Remaining search filter support minus has_temporal_dimensions

* ignore public API warning about metabase.search.filter

* Fix collection filter impl

* fix kondo

* [no ci] remove comments

* More efficient querying

* Fix rebase errors

* fix merge

---------

Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* try something else

* Remove semantic HNSW index breaking where clause (#61765)

* Adjust semantic search query to favor HNSW index over seq scans (#61768)

* Adjust semantic search query to favor HNSW index over seq scans

* remove limit and SET random_page_cost

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* [SEMANTIC] base64 embeddings and better logging (#61809)

* Improved logging; base64 embedding

* trim double

* Use parse-double over parseDouble

* fix search.engine/init! return  (#61825)

* fix: return model frequencies from search.engine/init!

* fix: document return type of init!, like per delete! and update!

* fix: calc for batches

* semantic search instrumentation (#61790)

* intrument semantic search

* test for analytics

* typo

* fix: id is numeric

* move test next to metrics one

* Support switching between :semantic and :appdb engines (#61826)

* add test

* lift util

* feat: add full api test

* fix: appdb available when search-engine is semantic

* Fallback to appdb search if semantic search doesn't return enough results (#61815)

* Fallback to appdb or in-place search if not enough results are returned from semantic search

* Dedupe combined results

* Bump up hybrid search query limit + make it configurable

* tweak setting doc, fix reflection warning in test code

* clean up tests

* move fallback implementation into the EE namespace, add a new setting for min results threshold

* fix lint issues

* ensure tests set semantic-search feature

* Do not realise document reducibles (#61860)

* wip

* batched streaming upsert-index!

* fix: actually dedupe searchable_text

* Revert "try something else"

This reverts commit eec29881c5.

* can still inner seq

* push indexed-entities last

* fix: semsearch delete

* lift delete-from-index-batch-sql

* test

* dedupe test

* style

* comment

* indexed entities last in search

* Semantic search test fixes (#61884)

* Fix api-engine-switching-test

* Test - switch test fixture to :each to see if it removes a race condition

* Revert "Test - switch test fixture to :each to see if it removes a race condition"

This reverts commit 33386c602b.

* another test - ensure init-delay is derefed before getting datasource

* remove compose-fixtures

* Revert "remove compose-fixtures"

This reverts commit 16c882a599.

* another test

* test

* add back some of core-test

* comment out all code but leave in ns

* add back fixtures

* add back one test

* replace with stub test

* remove compose-fixtures

* fix tests with a try/finally in db_test.clj

* oops, add back :once

* also revert back fixture order

* more cleanup

* use with-index! in appdb-available-with-semantic-test rather than trying to generate real embeddings

* Fix db test

* Only fetch embeddings when needed (#61918)

* chore: use appropriate builder-fn instead of unqualify-keys

* feat: cache on already seen embeddings

* add test

* distinct-on content

* better logging

* reuse test impl

* note

* repl utils

* we have if-not-exists semantics, so no point in not invoking it on init.

We need to invoke it else the new index won't get picked up.
This will change anyway once we have proper migrations with #BOT-278

* fix tests

* Incorporate metadata into semantic search result ranking (#61906)

* Move common code into search.scoring and add search.engine/scorers for backend-specific scorers

* Refactor to remove search.engine/scorers

* Add new index columns required by scoring expressions

* Add metadata score to semantic search backend

* Give up on reusing scorer expressions between appdb and semantic search

* Add :all-scores stats to semantic search query results

* Fix failing pgvector query test

* Adjust rrf weight to fix failing query tests

* Add premium scorers for verified and official_collection

* Get rid of single-use test helper dog-training-native-query-json

* Add scoring tests

* Fix for permissions issue in test

* Remove extra whitespace in bindings

* [Semantic Search] Add AI Service as an embeddings providers (#61850)

* wip

* clean up and better abbrev logic

* fix provider references

* remove magic int

* do not munge model name if not needed

* add / fix tests

* make mock index have a shorter name

* shorten nanoid

* math was not mathing

* fix kondo error

* death by lints

* [BOT-260] sem search consistency, gating and indexer loops (#61602)

* Add document gating

Adds a document gating mechanism and async indexing job.

- Allows indexing to recover if it encounters a transient error.
- Avoids data loss during indexing due to process death
- Provides an ordering which is more closely related to logical record
validity times rather than write time into the index.

* Fix some test docstrings

* Fix some loop tests

* Schedule indexer only if the instance has the :semantic-search feature

* Avoid redundant replay of the very last gate entry when the quartz job fires

* Add a quick candidate-filter byte equality test

* Refine loop interrupt/error test (get rid of old gunk)

* Use shared `tu/spy` instead of copy-pasta

* Replace candidate filter with simple set of last seen

Use TEXT for hash for eq convenience.

* Avoid future foot guns with a (letfn) refactor of indexing-step

Avoids issues that might later be introduced by the 'accidental' closure of (actual) variables that might later be changed during this side-effecting operation. In particular the move-to-next-watermark local function.

^:once was suggested but a hoisted letfn that can only close over args (which keeps the mutable indexing-state at the forefront of ones mind) keeps us honest.

* Check if engine enabled and supported during indexer task

Previously was only checking if the db was configured.

* Be more careful about Instant and timestamp representation.

Preferred is sql.Timestamp for now due to the default setup of postgres / JDBC.

* Fix up some asserts that still reflected byte hashes

* Add a quick e2e index everything test.

Find horrific pagination bug. Fix that.

We did not account for having enough ties that our buffer was full. This was likely in tests even with the high precision of the pg clock because:
- we coerced stuff to Instant which lost precision
- we generally did not account for tie breaks in pagination (bad form)

So we are paginating properly using the secondary id as a tie break. Within the confidence time only, as otherwise this would be dangerous (it is right to stall if you see too much until the lag time has elapsed). This stops stalls if lots of documents share a buffer.

Will follow up with another test that forces time collisions to assert this tie break behaviour independently.

* Test fixes

* Joy

* Add indexer docstring

* Thread pool for semantic search index batch updates (#61947)

* parallel batch processing for index updates

* tweak setting docs

* switch back to transducing version

* Revert "switch back to transducing version"

This reverts commit 4a99c3c6869e28f56d794d8057f006700cfc8432.

* fix setting name

* revamp approach - use a ThreadPoolExecutor with a custom rejection policy

* fix tests

* add concurrency test

* Fix up tests by adding a serial mode that disables thread pool usage

* Fix final test -- ensure we spy on & call only on the 4-arity version of upsert-documents

* Switch to custom retry handler

* Still wrap executor in a delay for lazy initialization

* Fix upt ests

* Fix final tests

* [Semantic Search] Remove disable semantic search filter (#61973)

* remove disable semantic search filter

* fix failing test

* Collapse indexed-entity ids in semantic search results (#61952)

* Collapse indexed-entity ids in semantic search results

The indexed-entity results have composite ids like model-index-id:model-pk. We need to extract the model-pk and attach
that as the :id on the results. Otherwise, the links generated by the frontend are invalid like
/model/12345-blah/1234:62681

* Add indexed-entity-id->model-{index-id,pk} to search.util

And use indexed-entity-id->model-index-id in filter-can-read-indexed-entity

* Fix test failure due to overly long index name

* Use dimensions param in OpenAI api calls (#62010)

* Use dimensions param in OpenAI api calls

* Use starts-with?

* Improved fallback logic & prometheus metrics for semantic search (#62024)

* Add prometheus metrics to track appdb search fallback logic

* undo broken function call

* Update logic to not fallback if no results were filtered out

* fix more tests

* Tweaks

* Try again to fix tests

* Address comments

* update docstring

* Fix non-batched get-embedding for openai and ai-service providers (#62050)

* Fix non-batched get-embedding for openai and ai-service providers

We were passing a single text string rather than a seq of texts, resulting in an error when we tried to get the token
count.

    ERROR semantic-search.embedding :: Failed to generate OpenAI embedding for text of length: 8
    java.lang.ClassCastException: class java.lang.Character cannot be cast to class java.lang.String

* Add test for extract-base64-response-embeddings

* Add test-get-embedding

* Semantic search indexing status endpoint (#62082)

* add search-items-count function

* Add endpoint for reporting indexed count + total estimate

* try to fix test

* Temp commit to debug CI failure

* Add honeysql classpath to debug output

* Revert "Add honeysql classpath to debug output"

This reverts commit 4395f420f7.

* Revert "Temp commit to debug CI failure"

This reverts commit 36fbf047d6.

* Fix honeysql create-index :raw forms (#62144)

Something changed with honeysql 2.7.1340 and :raw forms in the tail of a create-index now get unwrapped and need to be
nested in another vector.

For example, in earliers versions

    (sql/format
     (sql.helpers/create-index
      [:foo-idx :if-not-exists]
      [:foo-table :using-hnsw [:raw "embedding vector_cosine_ops"]]))

produced an sql string like

   CREATE INDEX IF NOT EXISTS foo_idx ON foo_table USING HNSW (embedding vector_cosine_ops)

but on 2.7.1340 you get

   CREATE INDEX IF NOT EXISTS foo_idx ON foo_table USING HNSW (raw EMBEDDING VECTOR_COSINE_OPS)

Unclear if this is a honeysql bug or we're doing something unsupported, but fix it with a workaround for now by
wrapping the :raw in an extra vector like [[:raw "foo"]], in order to get CI green.

* Move reindex/index to gate the documents (#62101)

* switch init/reindex to gated updates

* nil stats

* sync index in test

* non deterministic search result

* Semantic search migration (#62043)

* Migration

* Rebase follow-up

* [Semantic Search] Add admin setting to enable semantic search (#61622)

* add basic setting switch for enabling semantic search, upsell component, logic for falling back to default search in settings, and basic e2e test

* fix type issue

* Fix serialization baseline test

* finished

* small fixes

* do not animate progress bar when progress === 100

* impl PR feedback

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>

* revert e2e diffs (#62173)

* Re-order semantic search index columns to test schema migration (#62172)

* Re-order semantic search index columns

Mostly to test schema migration, but this also makes the table contents easier to scan in PgAdmin / psql imho by
putting ids next to ids, timestamps next to timestamps, etc.

* migration 1

* cleanup

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* fix reflection warnings in tests (#62151)

* fix reflection warnings in test

* just use bound-fn*

---------

Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: Mihael Konjević <konjevic@gmail.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-08-15 15:17:51 +01:00
Jeff Bruemmer
384288806b fix links (#62193) 2025-08-15 08:59:59 -04:00
Timofey Kachalov
f7e06aac9d refactor(sdk): Add type-checking for SDK Bundle exports (#62202) 2025-08-15 15:56:29 +04:00
Timofey Kachalov
16232d530b refactor(sdk): Rename component-level MetabaseProvider to ComponentProvider (#62175) 2025-08-15 14:48:57 +04:00
Maz Ameli
3035ab0fb4 Add company, currency, and receipt icons (#62196)
* add company currency and receipt icons

* add new icons to IconName and Icons obj

* Remove duplicate 'currency' icon declaration

---------

Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>
2025-08-15 10:07:33 +03:00
Cam Saul
fe43845ee2 API Keys module cleanup (#62116)
* API Keys module cleanup

* Test fixes 🔧

* Fix Kondo errors

* Unmark these tests as `^:parallel` for now because I do not have the energy for dealing with MySQL

* I don't have time to fight MySQL

* Test fix 🔧
2025-08-14 16:08:58 -07:00
Cam Saul
bf85745bbb add-alias-info => Lib and misc bug fixes (#60231)
* add-alias-info => MLv2

* Restore deleted test

* WIP

* WIP [ci skip]

* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

* Restore accidentally-deleted `native-query-snippet` fn

* Fix accidental edits

* Make `visible-columns` stage-only

* More minor caching improvements

* cljfmt & kondo

* More minor caching improvements

* Fix #35252

* cljfmt & kondo

* Another round of test fixes and lint fixes 🔧

* Test fixes 🔧

* Test fix 🔧

* PR feedback

* Test & Lint fixes 🔧

* Test fix 🔧

* Kondo/cljfmt

* Appease Eastwood

* cljfmt run against everything

* Revert changes to deps.edn

* Did I fixx??

* cljfmt/kondo

* Fix Oracle test failure

* Fix nested fields (MongoDB)

* cljfmt

* Nested column name fixes

* Fix Mongo for reals

* Revert BigQuery breaking stuff

* Fix equality for binned columns

* Test fix 🔧

* Remove dead :ident keys

* Fix is_verified field refs

* Fix is_verified field refs

* Some sanity checking

* Fix typo

* Fixx

* Ok, don't be super fussy about bad code using :type/Text as a parameter

* Fix validation of legacy expression refs inside stage parameters

* Fix aggregation names not being deduplicated

* :as-alias

* replace saigon with bangkok

* use ho chi minh as equivalent replacement

* use bangkok for sqlserver

* update us/pacific to america/los_angeles

* Test debugging

* Fix debugging

* Test fixes 🔧

* Fix busted hardcoded e2e query and add disallowed-keys helper

* cljfmt

* Update deprecation notices 56 => 57

* Kick the can down the road

* Fix another busted test 🔧

* Improve field resolution even more 😒

* cljfmt

* Fix sandboxing with bad field refs.

* Ok I give up I guess I just accidentally fixed sandboxing with custom columns

* cljfmt

* I fixed it

* Appease the linter

* Test fixes 🔧

* OOOPS

* Fix test

* prettier

---------

Co-authored-by: Riley Thompson <rileythompson99@gmail.com>
2025-08-14 13:50:12 -07:00
Sloan Sparger
250f5453fb [Metabot] User feedback (#62048)
* UI for metabot feedback

* copy and spacing tweaks (#62049)

* switch to download based approach

* test

---------

Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-14 14:18:58 -05:00
Marcos
3334d7ad75 Add secondary role explanation for snowflake impersonation to docs (#62178)
* add secondary role explanation for snowflake impersonation

* fix with suggestions

* fix impersonation docs with suggestions
2025-08-14 16:02:50 -03:00
Phoomparin Mano
b9ccb9c883 Fix embed flow persistence by reducing scope of persisted items (#62177) 2025-08-14 18:27:30 +00:00
Aleksandr Lesnenko
5144a0c868 delete unused snapshots (#62180) 2025-08-14 18:09:35 +00:00
Timofey Kachalov
940be59861 feat(sdk): Add etag-based caching for the Hosted Embedding SDK bundle (#61283) 2025-08-14 20:28:13 +04:00
Jeff Bruemmer
63a634de52 update generated docs (#62138) 2025-08-14 12:27:01 -04:00
Jeff Bruemmer
2c62a6763b update env var doc gen script (#62068) 2025-08-14 09:58:36 -04:00
Chris Truter
da57ec87d0 Improve input_type assignments in /actions-v2/execute-form (#62097) 2025-08-14 15:55:23 +02:00
Nicola Mometto
751254246a populate field-values during get-field-values tool if not present (#62020)
* BOT-285: ensure field statistics are populated

* chore: test

* extend field-values treatment to dummy tools

* no more need for ensure-field-values!

* chore: use get-or-create

* style

* remove unused require

* fix

* nil safety

* extract
2025-08-14 12:42:24 +00:00
Nicolò Pretto
13835ef100 refactor(simple-embed): drop MetabaseEmbed and pass to the iframe the component name (#61967)
* wip

* wip2

* fix and wip

* wip

* fiiiix

* use the component name inside the iframe

* fix tests

* use custom elements attributes in the preview

* clean up

* clean up

* merge question with new question in the iframe code

* remove SdkIframeEmbedTagSettings

* styles -> S

* restore defaultTheme functionality that was merged on master

* fix test, now the iframe is not reset and we don't need to select the table again
2025-08-14 14:21:27 +02:00
Timofey Kachalov
f3ef92f7ca fix(sdk): Scope Mantine styles to SDK (#62103) 2025-08-14 15:39:12 +04:00
Ngoc Khuat
49389aea80 Send dashboard subscription with attachments only (#61784) 2025-08-14 05:25:00 +00:00
Timofey Kachalov
240160f605 Add an eslint rule that warns for external references inside the Embedding SDK NPM package code (#61417) 2025-08-14 02:06:15 +04:00
Jeff Bruemmer
7aeb66ccce docs - add JS to table and list of links (#62135) 2025-08-13 17:42:06 -04:00
Jeff Bruemmer
3721cd73ba data sandboxing -> row and column security (#62132) 2025-08-13 20:24:54 +00:00
Timofey Kachalov
840c232c5f refactor(sdk): Adjust SDK CLI to work with Hosted Bundle (#61406) 2025-08-14 00:21:00 +04:00
Alex Yarosh
f277e1f0c3 docs: JSON unfolding (#62129)
* Update json-unfolding.md

* Apply suggestions from code review
2025-08-13 16:19:15 -04:00
Alex Yarosh
d0ab801141 Update translations.md (#62127) 2025-08-13 16:18:19 -04:00
Edward Paget
b44c4d3c8e fix: handle special cased migration (#62110) 2025-08-13 14:31:32 -05:00
Timofey Kachalov
1b3446fe16 feat(sdk): SDK Backward Compatibility support via Hosted Bundle (#60554) 2025-08-13 23:19:43 +04:00
Ngoc Khuat
7948d6df58 Update channel test permission model (#62015) 2025-08-13 18:28:25 +00:00
Phoomparin Mano
5062575687 Default is-save-enabled to false on Embed JS and embed flow (#62094) 2025-08-14 01:02:30 +07:00
Riley Thompson
821510a5c4 Replace Asia/Saigon with Asia/Ho_Chi_Minh (#62105)
* replace saigon with bangkok

* use ho chi minh as equivalent replacement

* use bangkok for sqlserver

* update us/pacific to america/los_angeles
2025-08-13 17:22:01 +00:00
Nicolò Maria Mezzopera
fe478e275a Fix: Don't containerize on doc-only change and explicit artifact name (#62091)
* Fix containerize job to only run when uberjar succeeds

The containerize job now properly checks that the uberjar job succeeded
before attempting to containerize. This prevents containerization from
being triggered on documentation-only changes where the uberjar job
is skipped.

Added: needs.uberjar.result == 'success' condition

* Set default output name for fetched artifacts to "metabase.jar"
2025-08-13 12:01:00 +02:00
Phoomparin Mano
2e884c4ce6 CodeMirror styling in custom expression fails in Embed JS as the CSP nonce is missing (#61959)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-08-13 16:03:53 +07:00
Phoomparin Mano
57a07bdb4c Allow downloads should show even when drills is off (#61969) 2025-08-13 16:03:26 +07:00
Chris Truter
9586169df9 Move actions to the right timezone (#62073) 2025-08-13 10:27:05 +02:00
Chris Truter
3c955df9e9 Prevent configuration of disabled database-local settings (#62018)
- Add :database-feature to SettingDefinition schema to specify required driver features
- Update validate-settable-for-db\! to check database driver feature support
- Add validation to ensure :database-feature is only used with database-local settings
- Fix validation logic to throw when driver does NOT support required feature
- Add comprehensive tests for database feature validation
- Update defsetting macro documentation with :database-feature option

This allows database-local settings like database-enable-actions and
database-enable-table-editing to require specific driver features
(e.g. :actions, :actions/data-editing) before they can be enabled.
2025-08-13 11:24:55 +03:00
Jeff Bruemmer
a36b1553ee docs - images and edits (#62064) 2025-08-12 21:09:19 +00:00
Alex Yarosh
0cfee32754 docs: DB routing new DBs (#62081)
* db routing update

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-12 20:47:58 +00:00
Nicolò Maria Mezzopera
22507a963a Fix CI workflows nesting and artifact download (#61919)
* Fix uberjar containerization and implement flexible fetch-artifact action

Resolves issues where uberjars weren't getting containerized when adding the
build-docker-uberjar label to PRs or when manually dispatching workflows.

Major changes:
- Create containerize-uberjar.yml workflow for centralized containerization logic
- Create uberjar-containerize-labeled.yml for PR label-triggered builds
- Extract containerization from uberjar.yml to avoid 3-level workflow nesting
- Add containerization to run-tests.yml for master branch pushes
- Implement flexible extract-path parameter in fetch-artifact action
- Replace preserve-structure boolean with string-based path specification
- Update all workflows to use appropriate extract-path values

The fetch-artifact action now supports:
- extract-path: "." (current directory with custom output-name)
- extract-path: "target/uberjar" (maintains original structure)
- extract-path: "custom/path" (any directory structure)

Containerization now works in all scenarios:
- Master push/merge → run-tests.yml → containerize-uberjar.yml
- PR with build-docker-uberjar label → uberjar-containerize-labeled.yml
- Manual dispatch → containerize-uberjar.yml

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix fetch-artifact action to avoid moving file to itself

Prevents "mv: source and destination are the same file" error when
extract-path matches the existing jar location (e.g. target/uberjar).

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor fetch-artifact action to be more DRY

- Consolidate JAR path logic into a single function
- Export JAR_PATH to GITHUB_ENV for use in subsequent steps
- Remove repetitive path determination code
- Reduce lines of code from 113 to 108

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add Docker Hub link and pull command to PR comment

Enhanced the PR comment after containerization to include:
- Docker tag name (branch with slashes replaced by dashes)
- Direct link to Docker Hub repository tag page
- Ready-to-use docker pull command

This makes it easier for developers to find and pull the built image.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add get-docker-info action and update workflows to utilize it for Docker image retrieval

* Refactor post-comment job to streamline Docker info retrieval and PR comment posting in containerize workflow

* Remove unnecessary blank lines in fetch-artifact and get-docker-info actions for cleaner code

* Update containerize job conditions to trigger on pull request labels for Docker builds

* revert using fetch-artifact for release artifacts
2025-08-12 10:19:08 -10:00
Alex Yarosh
e9ab99a8f1 docs: add saml to embed JS (#62074)
* Update embedded-analytics-js.md

* Update docs/embedding/embedded-analytics-js.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-12 19:22:24 +00:00
github-automation-metabase
a12945b800 Bump org.apache.commons/commons-compress from 1.27.1 to 1.28.0 (#61777)
Inspect dependency changes here:
2025-08-12 16:23:06 +00:00
Riley Thompson
8c049ad6fe Only test normal drivers in nested-array-query-test (#62045)
* only test normal drivers

* run tier 3 if changes in src/metabase/driver
2025-08-12 15:41:27 +00:00
github-automation-metabase
d50129f95c Bump com.github.seancorfield/honeysql from 2.7.1310 to 2.7.1340 (#61772)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1340/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 15:01:26 +00:00
Jeff Bruemmer
99c391fb9f field filter intro (#62059) 2025-08-12 08:06:53 -05:00
Anderson
47f6a9ac46 chore: add andsalves as a team member (#62041) 2025-08-12 10:04:30 -03:00
github-automation-metabase
0f0d91d824 Bump com.microsoft.sqlserver/mssql-jdbc from 12.10.0.jre11 to 13.1.1.jre11-preview (#61486)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 23:00:29 -07:00
github-automation-metabase
dd41094d50 Bump org.eclipse.jetty/jetty-server from 12.0.22 to 12.0.24 (#62001)
* Bump org.eclipse.jetty/jetty-server from 12.0.22 to 12.0.24

Inspect dependency changes here:

* Consolidate Jetty deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 22:59:35 -07:00
github-automation-metabase
676c64a2aa Bump clj-kondo/clj-kondo from 2025.04.07 to 2025.07.28 (#61771)
* Bump clj-kondo/clj-kondo from 2025.04.07 to 2025.07.28

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.07.28/CHANGELOG.md

* Fix some of the Kondo warnings -- seems like there are false positives

* Fix Kondo warnings

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 22:21:13 -07:00
github-automation-metabase
709df6c4ac Bump com.facebook.presto/presto-jdbc from 0.292 to 0.293 (#59521)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:14:27 -07:00
github-automation-metabase
f2096262fa Bump org.graalvm.polyglot/polyglot from 24.2.1 to 24.2.2 (#61248)
* Bump org.graalvm.polyglot/polyglot from 24.2.1 to 24.2.2

Inspect dependency changes here: https://github.com/oracle/graal/compare/graal-24.2.1...graal-24.2.2

* Consolidate GraalVM deps bumps

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 20:14:03 -07:00
github-automation-metabase
73763282b7 Bump org.apache.logging.log4j/log4j-core from 2.24.3 to 2.25.1 (#60904)
* Bump org.apache.logging.log4j/log4j-core from 2.24.3 to 2.25.1

Inspect dependency changes here:

* Merge other Log4j version bumps

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Cam Saul <github@camsaul.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:12:16 -07:00
github-automation-metabase
43f07d3c88 Bump net.clojars.wkok/openai-clojure from 0.22.0 to 0.23.0 (#61776)
Inspect dependency changes here: https://github.com/wkok/openai-clojure/blob/0.23.0/CHANGELOG.md
2025-08-12 02:32:30 +00:00
github-automation-metabase
ecc7d9ba86 Bump io.github.clojure/tools.build from 0.10.9 to 0.10.10 (#61775)
Inspect dependency changes here: https://github.com/clojure/tools.build/blob/v0.10.10/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-12 02:32:22 +00:00
github-automation-metabase
c9205461c1 Bump com.google.cloud/google-cloud-bigquery from 2.51.0 to 2.54.0 (#61778)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.54.0/CHANGELOG.md
2025-08-12 02:32:08 +00:00
github-automation-metabase
65974dc29d Bump clj-http/clj-http from 3.13.0 to 3.13.1 (#60246)
Inspect dependency changes here: https://github.com/dakrone/clj-http/blob/3.13.1/changelog.org

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 02:31:52 +00:00
github-automation-metabase
b452abc839 Bump djblue/portal from 0.59.2 to 0.60.2 (#61997)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.60.2/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 01:52:21 +00:00
github-automation-metabase
debcec5881 Bump io.github.seancorfield/build-uber-log4j2-handler from v2.24.0 to v2.25.1 (#60900)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-08-11 18:19:12 -07:00
github-automation-metabase
2f15322530 Bump io.netty/netty-buffer from 4.2.1.Final to 4.2.3.Final (#61250)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 18:17:56 -07:00
github-automation-metabase
cce80c3f1d Bump diehard/diehard from 0.11.13 to 0.12.0 (#59517)
Inspect dependency changes here: https://github.com/sunng87/diehard/blob/0.12.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:43:56 +00:00
github-automation-metabase
5647025c0c Bump com.github.seancorfield/next.jdbc from 1.3.1002 to 1.3.1048 (#59516)
Inspect dependency changes here: https://github.com/seancorfield/next-jdbc/blob/v1.3.1048/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:41:28 +00:00
github-automation-metabase
ebb0d64993 Bump babashka/fs from 0.5.25 to 0.5.26 (#59146)
Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.26/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:06:08 +00:00
Denis Berezin
96a1ed0b8f UX-west FE bug fixes (#61948)
* UXW-466 enterprise-login-page-logo

* fix dash subscription popover cut off #59888

* Fix collection menu tooltips position #59379
2025-08-12 02:13:18 +03:00
github-automation-metabase
8d6ba8f390 Bump ring/ring-mock from 0.6.1 to 0.6.2 (#62003)
Inspect dependency changes here: https://github.com/ring-clojure/ring-mock/compare/0.6.1...0.6.2
2025-08-11 21:14:08 +00:00
github-automation-metabase
6ee5cbf07a Bump com.nimbusds/nimbus-jose-jwt from 10.4 to 10.4.1 (#62005)
Inspect dependency changes here:
2025-08-11 21:13:05 +00:00
github-automation-metabase
aba008b9b7 Bump org.apache.tika/tika-core from 3.1.0 to 3.2.2 (#61998)
Inspect dependency changes here:
2025-08-11 21:08:59 +00:00
github-automation-metabase
a9a088ef1f Bump com.oracle.database.jdbc/ojdbc17 from 23.8.0.25.04 to 23.9.0.25.07 (#61780)
Inspect dependency changes here:

Co-authored-by: dpsutton <dan@dpsutton.com>
2025-08-11 21:05:45 +00:00
github-automation-metabase
3fc274a4cf Bump com.fasterxml.woodstox/woodstox-core from 7.1.0 to 7.1.1 (#58758)
Inspect dependency changes here: https://github.com/FasterXML/woodstox/compare/woodstox-core-7.1.0...woodstox-core-7.1.1

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:59:30 +00:00
bryan
ba8f1f3ccf mage: Replace blank lines with empty strings + mage ls (#61987) 2025-08-11 20:55:21 +00:00
github-automation-metabase
db122be70b Bump com.amazon.redshift/redshift-jdbc42 from 2.1.0.32 to 2.1.0.34 (#62004)
Inspect dependency changes here: https://github.com/aws/amazon-redshift-jdbc-driver/blob/v2.1.0.34/CHANGELOG.md
2025-08-11 20:42:57 +00:00
github-automation-metabase
9781d9b7cd Bump cider/cider-nrepl from 0.55.7 to 0.57.0 (#60245)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.57.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 13:38:13 -07:00
github-automation-metabase
3feae381dd Bump org.xerial/sqlite-jdbc from 3.49.1.0 to 3.50.3.0 (#61485)
Inspect dependency changes here: https://github.com/xerial/sqlite-jdbc/compare/3.49.1.0...3.50.3.0
2025-08-11 13:31:34 -07:00
github-automation-metabase
9c2156a025 Bump commons-net/commons-net from 3.11.1 to 3.12.0 (#61773)
Inspect dependency changes here:
2025-08-11 13:07:45 -07:00
Riley Thompson
4ac4d34af7 handle nested arrays (#61977) 2025-08-11 15:44:04 -04:00
github-automation-metabase
9a4c0bb7c3 Bump io.netty/netty-common from 4.2.2.Final to 4.2.3.Final (#61251)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-08-11 12:36:37 -07:00
github-automation-metabase
ebd8ecb06c Bump com.github.seancorfield/honeysql from 2.7.1310 to 2.7.1325 (#61481)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1325/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:27:50 -07:00
github-automation-metabase
98a9b04fb1 Bump thheller/shadow-cljs from 3.1.4 to 3.1.8 (#61484)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:26:11 -07:00
github-automation-metabase
19f1e5517a Bump djblue/portal from 0.59.2 to 0.60.1 (#61774)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.60.1/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:25:13 -07:00
Jeff Bruemmer
ee248d5fff fix typos (#62029) 2025-08-11 17:09:12 +00:00
Jacob Joseph
b3d4d009aa Update filters.md (#61983)
we removed the gear icon from filters on dashboard editing, but the docs were still referring to it
2025-08-11 12:02:04 -05:00
Gustavo Saiani
d2f01b00eb Remove promo banner (#62023) 2025-08-11 14:01:01 -03:00
Sloan Sparger
a076cca120 [Metabot] Remove non-streaming metabot code (#61988)
* remove streaming code

* remove comment
2025-08-11 11:57:10 -05:00
Riley Thompson
42e48c71e0 Enable DB routing for Starburst and Presto (#61949)
* enable db routing for starburst

* enable presto routing
2025-08-11 16:23:59 +00:00
Riley Thompson
b3a9f566df Enable athena routing (#61934) 2025-08-11 11:22:39 -04:00
Aleksandr Lesnenko
5ef76f8592 fix visualizer cards don't have dashcard description setting (#62006) 2025-08-11 11:51:21 -03:00
Jeff Bruemmer
fbc7f9668d Update embedded-analytics-js.md (#62012) 2025-08-11 08:17:27 -05:00
Nicola Mometto
4c79e29cca Archive deleted tables (#61592)
* add migration

* add table before update to correctly set deactivated_at

* no need for schema

* archive tables

* tests

* note

* include active to index

* guard against nil changes

* doc

* guard against archival

* note

* prper count

* serdes/test

* extra safety guard

* more accurate logging

* use epocSecond

* more error validation

* change suffix

* add rollback mig

* move migrations to v56

* safer
2025-08-11 14:11:12 +01:00
Thomas Schmidt
0ab4df1655 Support markdown links in Metabot response (#61732) 2025-08-11 06:55:22 +00:00
Phoomparin Mano
4b128f68a9 Update parameters section subtitle for questions in embed flow (#61968) 2025-08-09 21:44:36 +07:00
Lodewijk Wensveen
b0687c26d2 fix(formatting): round compact numbers with Intl; preserve legacy k casing (closes #59454) (#61645)
* test(formatting): add compact rounding edge cases (refs #59454)

* fix(formatting): round compact numbers with Intl; preserve legacy k casing (closes #59454)

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2025-08-09 03:29:46 -04:00
Cam Saul
c6674c0185 [Lib] make visible-columns only work on stages (#61943)
* Make `visible-columns` stage-only

* More minor caching improvements
2025-08-09 00:35:00 +00:00
John Swanson
69b313f83e Format datetimes with user locale (#61680)
Bind the `*formatting-locale*` to the user's locale (falling back to the
system locale).

Also use `i18n/site-locale` instead of `(Locale. (system/site-locale))`,
which Does The Right Thing instead of incorrectly calling the
single-arity version of `Locale.`.

Fixes [UXW-208: Dashboard card download result using date locale from
instance and ignore user
locale](https://linear.app/metabase/issue/UXW-208/dashboard-card-download-result-using-date-locale-from-instance-and)

Fixes [UXW-142: Date formatting has undefined behavior (broken on my machine)](https://linear.app/metabase/issue/UXW-142/date-formatting-has-undefined-behavior-broken-on-my-machine)
2025-08-08 15:41:27 -05:00
Marcos
d76385094e fix examples in timezone docs (#61979) 2025-08-08 14:36:42 -06:00
Denis Berezin
772e56a62e Fix tabs alignment for horizontal tabs with grow (#61895)
* Fix tabs alignment for horizontal tabs with grow

* Review fixes
2025-08-08 23:10:55 +03:00
Oleksandr Yakushev
ab2eb8a1f9 [perf] Fix metabase.util.performance cljc-related issues (#61847)
* [perf] Fix metabase.util.performance cljc-related issues

* [perf] Move faster walk implementation into clj-only namespace
2025-08-08 22:12:39 +03:00
Denis Berezin
d1dd7964c2 fix: update loki after icon change (#61974) 2025-08-08 21:48:06 +03:00
Phoomparin Mano
a1206f3886 Fix pivot tables in static embedding having white cell backgrounds in dark mode (#61939) 2025-08-08 23:16:07 +07:00
Nicolò Pretto
6c24ddee41 test(embed-js): migrate tests to use custom element api (#61965)
* test(embed-js): migrate tests to use custom element api

* use CreateApiKeyResponse

* Update e2e/test/scenarios/embedding/sdk-iframe-embedding/sdk-iframe-embedding.cy.spec.ts

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-08-08 15:51:03 +00:00
Nicolò Pretto
e4afb704fe test(simple-embed): add test for is-saved-enabled, initial-sql-parameters and target-collection for metabase-question (#61830) 2025-08-08 17:14:08 +02:00
Edward Paget
aedb754045 fix: login_attrs -> jwt_attrs for jwt users (#61940)
* fix: login_attrs -> jwt_attrs for jwt users

Enables the new behavior where login attributes persist between jwt
logins for existing jwt-based users.

* fixup! add rollback migration

* fixup! yaml syntax
2025-08-08 08:50:33 -05:00
Alex Yarosh
1991635e2a docs: embedded analytics js (#61955)
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-08 10:57:40 +01:00
Timothy S. Dean
8ad7691ba9 Fix revision history for old cards (#61755)
Cards created before v0.55 lack the `:card_schema` field in their revision history. When loading these old revisions, the system throws "Cannot SELECT a Card without including :card_schema" because the Card model's `after-select` expects this field to always be present.

Existing code adds the legacy default `card_schema` value (20) in `revert-to-revision!`. This PR adds the value (20) to old revisions in `revision.clj`'s `after-select`.

This allows users to view revision history and revert cards that were created before the v0.55 upgrade.
2025-08-07 19:47:40 -06:00
Denis Berezin
30df0133e7 Fix navigate forwards to a Details modal for QB (#61835)
* Fix navigate forwards to a Details modal for QB

* Add e2e tests

* Fix e2e tests
2025-08-08 03:05:35 +03:00
AlessioLaiso
c2cee019de Updates the info and info_filled icons (#61938)
* Updates the info and info_filled icons

* use currentcolor fill instead

* remove fixed width and height and rely on viewBox

* tweak svg paths slightly

* fix y position

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-07 21:06:54 +00:00
Denis Berezin
812d1eceef Fix creator list UI on search page (#61936) 2025-08-07 23:44:16 +03:00
Fraser
d7653edd9d Upgrade fetch mock to v12 (#61857) 2025-08-08 07:28:15 +12:00
Cam Saul
f294fb48b7 Fix QP preprocessing middleware disabling Malli checks (#59324)
* Fix QP preprocessing middleware disabling Malli checks

* Test fix

* Yet another fix

* WIP

* Update preprocess.clj
2025-08-07 12:17:28 -07:00
Aleksandr Lesnenko
19f3c013aa fix annoying tooltip (#61883) 2025-08-07 15:36:39 -03:00
Cam Saul
5edd511b5b Finish untangling the metadata knot (#61767)
* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

* Restore accidentally-deleted `native-query-snippet` fn

* Fix accidental edits

* Fix metadata calculation for joins that contain joins

* All Lib tests are passing

* The PR that fixes everything [WIP] [ci skip]

* Test fix 🔧

* Sort namespaces

* Docstring formatting

* [Lib tests] 100 failures, 33 errors.

* [Lib] 98 failures, 24 errors.

* [Lib] 76 failures, 17 errors.

* [Lib] 49 failures, 4 errors

* [Lib] 46 failures, 2 errors.

* [Lib] 15 failures, 0 errors.

* [Lib] 13 failures, 0 errors.

* All Lib tests passing

* [QP tests] 2 failures, 1 error.

* Revert :encode/cache-key

* Minor caching performance improvements

* Fix nest breakouts/cumulative aggregations

* Add some more stuff to lib.core

* Test fixes/cljfmt/kondo

* Test fix 🔧

* Test fixes and fix some busted tests

* OMG CACHE SO MUCH FASTER!!!!!

* Fix MongoDB

* Fix tests and support mock segments

* Code cleanup and test fixes 🔧

* Test fix 🔧

* Fix set versus map

* PR feedback

* cljfmt

* More PR feedback and tighten up the field resolution code a bit

* Some schema cleanup

* PR feedback

* PR feedback

* Add TODO

* PR feedback

* Remove implementation of join `visible-columns` which is the same as :default

* Remove unused Card visible columns

* Restore the Card implementation of visible columns in THIS PR.
2025-08-07 11:25:42 -07:00
Phoomparin Mano
b46048533c fix(sdk): send CORS headers for error messages when embedding is disabled (#61808) 2025-08-07 23:46:32 +07:00
Cam Saul
d0c0516fa2 Fix busted tests from #53373 (#61899) 2025-08-07 09:06:33 -07:00
Edward Paget
eeb46a43f1 fix: jwt auth doesn't wipe login_attributes (#61927)
Missed this from the big remerge, where login attributes were being
reset to an empty value on jwt login. Also fixed not including the
jwt-group-sync on the initial formik state.
2025-08-07 11:05:02 -05:00
Phoomparin Mano
31412ebe1e Remove Beta badge from Embedded Analytics JS (#61920) 2025-08-07 22:45:47 +07:00
Phoomparin Mano
5b885a5447 Temporarily replace docs and quickstart with "Try it out" (#61926) 2025-08-07 22:45:29 +07:00
Nicolò Pretto
8df9924e76 fix(sdk): targetCollection should take precedence over recent dashboard (#61874) 2025-08-07 17:40:39 +02:00
Cam Saul
f6d3a73bb3 Add mbql-5-query macro (#61898)
* Add `mbql-5-query` macro

* Remove new test
2025-08-07 09:39:55 -06:00
Luiz Arakaki
2581cc50b4 add snowflake csid as Metabase_Metabase (#61866) 2025-08-07 14:14:37 +00:00
Cam Saul
be36bd367d More Lib metadata caching improvements and faster remove-inactive-field-refs (#61897)
* More Lib metadata caching improvements

* Faster remove-inactive-field-refs middleware
2025-08-07 10:06:22 -04:00
Roman Abdulmanov
064110eaa2 feat: endpoint for retrieve embedding token from jwt (#61540)
* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Some small cleanup

- remove unnecessary try/catch clauses

- rename/rework unnecessary public wrapper fn

- make `jwt` required for the endpoint

- only return session token, not any JWT data

* Test fixes

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-08-07 08:39:01 -05:00
Phoomparin Mano
794d472d29 Tag an embed flow test "persists chart embed options" as flaky (#61865) 2025-08-07 20:28:12 +07:00
Tony-metabase
dd9668fd41 Fix Payload Type Typo for Notifications (#61823)
* Fix Payload Type for Notifications

* Update api.html
2025-08-07 14:15:26 +02:00
Nicolò Pretto
5a2c86ad40 chore(sdk): post release 56 workflow changes (#61909)
* chore(sdk): post release 56 workflow changes

* update changelogs
2025-08-07 12:22:14 +02:00
Nicolò Pretto
35a47b2418 change rspack to allow testing custom domains locally easier (#61800) 2025-08-07 09:31:05 +00:00
Jakub Chodorowicz
304d4cda21 add connection string form prefill feature (#61323)
* wip: add connection string form prefill feature;

add tests

* Refactor deprecated export format

* Skip jdbc:prefix when parsing

* Add snowflake support

* Add success message

* Add a feedback message when pasting a connection string

* Refactor field mapping

* wip use regexes to parse connection strings

* make port optional

* Add snowflake

* Add bigquery and clickhouse

* Add Athena support

* Add Amazon Redshift

* Improve clickhouse

* Add failure message

* Add databricks and druid

* Add MySQL

* Add presto

* Adapt snowflake, create objectToString helper

* Add Apache Spark

* Add SQL server

* Add Oracle

* Add Starburst

* Add vertica

* Reset connection string input on change of key

* Map only when select db and protocol matches

* Fix and refactor semicolon params parsing

* Add tracking to database string uri parsing

* create mapping config with placeholders

use placeholders also in tests

* Create engineKeys types

* Create Cypress paste command using synthetic react events

* Use fade transition for feedback animation

* Add e2e tests for connection strings form filling

* fill in display name from connection string

* Add succes failure text test

* Validate form after filling in fields

* Use more standard fallback for paste

* Remove unused regex parsing implementation

* use mass setFields for fomik setting values

* Add test case for clearing existing values, including engine select field

* Fix form fields being overwritten when pasting connection string

* Add onPaste behavior and use simpler paste mechanism in Cypress

* Fix typo

* Extract and use engineKey type and isEngineKey guard

* Make connection string field controlled by formik

Fix submit values

Fix type error

* Remove unneeded prop justify

* Run regex just for currently selected db

* Fix naming of the test file

* Add e2e db connection test

* Fix missing path in th rspack emedding setup

* Explain why connection string is not sent to BE

* use pojo instead of map for db engines config

* Revert to * export to maintain consistency

* fix connection string test

* create a more meaningful type name
2025-08-07 11:25:36 +02:00
Nicolò Pretto
211f371fd5 mock /app/embed.js in test to the dev server to have up to date version (#61598)
in e2e tests
2025-08-07 11:03:46 +02:00
Cam Saul
3a5e8d1471 QP Binning middleware => Lib (#61530)
* QP Binning middleware => Lib

* Test fixes 🔧

* Resolution should propagate fingerprints from card metadata

* Revert accidental snapshots skip
2025-08-06 16:08:45 -07:00
eliotmetabase
93ec57af84 Update Admin Webapp and DashViz to UX West (#61849)
* Update teams and modules

* Update codeowners
2025-08-06 13:48:23 -07:00
lbrdnk
e5b8670c6d Add MB_SYNC_LEAF_FIELDS_LIMIT setting (#61842)
* Add MB_MONGODB_FIELD_LIMIT setting

* Update tests

* Make the setting generic
2025-08-06 22:40:17 +02:00
lbrdnk
88b979623a Check data permissions of result metadata columns (#61740)
* Add result_metadata perms check to qp

* Check result metadata view data on card put

* Throw the exception

* Test

* Add perm check for ad-hoc referencing cards

* Docstrings

* Use seq

* Order of checks

* Apply suggestions from code review

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Simplify into

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-08-06 22:11:10 +02:00
Maz Ameli
458913d017 Add table link to metadata page (#61764)
* add table link to metadata page

* Table

* Add a e2e test

* Add a e2e test

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-08-06 19:21:50 +00:00
John Swanson
d9373fa6d8 Include columns that are not specifically excluded (#61761)
When streaming data for a query, we were only including columns if a)
the viz settings for the column were completely empty, or if b) the viz
settings for the columns included specifically enabling that column.

The problem occurs most clearly for things like native SQL queries.

If you construct a query like

```
SELECT id FROM venues;
```

and then set the column viz settings to *something* non-empty (most easy
way: just hide the `id` column and then show it again), and then save
the card, then change the query to:

```
SELECT id, name FROM venues;
```

then if you download the CSV for this card (even after saving it!)
you'll get a result that only contains `id` and not `name`.

A few tests needed to change here because they were implicitly assuming
the old behavior, but I don't think that's entirely intentional. This
behavior was different than the behavior in the Metabase application
proper, where UI results would show all the columns (in the above
example, they'd immediately show `id` *and* `name`).
2025-08-06 10:20:08 -07:00
Alex Yarosh
34e884c47a docs: jwt docs (#61876)
* jwt edits

* Optimized 2 images, saved 188.8 KB (46.0% smaller)

* why are y'all 'waiting for the status to be reported'

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-06 16:59:46 +00:00
Timofey Kachalov
ee9d5d3832 feat(sdk): Add "SDK incompatibility with instance" banner (#61859) 2025-08-06 19:34:36 +04:00
Riley Thompson
230784e3fb Always set connection role for Redshift (#61869) 2025-08-06 15:16:03 +00:00
Phoomparin Mano
8119bc5c8c feat(sdk): add translation context and aria-label to embedding sdk settings (#61856) 2025-08-06 21:42:42 +07:00
Phoomparin Mano
94570c4c1b Add color reset button to embed flow (#61839) 2025-08-06 21:40:16 +07:00
Timofey Kachalov
aade35f0db refactor(sdk): Minor imports/code adjustments for Hosted Bundle (#61862) 2025-08-06 18:11:28 +04:00
Timofey Kachalov
289e00d760 refactor(sdk): Add styles for custom SDK spinner loader (#61864) 2025-08-06 13:25:25 +00:00
Jakub Chodorowicz
7428fee268 Prg-108-add-gem-icon-and-free-trial-cta-in-interactive-embedding (#61714)
* Create Upsell CTA component

* Replace pro labe with gem in embed upsell

* Create and use UpsellCta in Embedding Upsell

* Rebuiltd the logic for showing links and upsells in embedding modal

* Add UpsellCta tests

* Remove unneeded hook

Fix test and URL rendering for hosted

* Remove unneeded hook useInteractiveEmbeddingCta

* Fix test not running in target build (OSS)

* Fix embedded modal ee end premium cloud tests

* Add missing translation tag

* Use single upsellcta styling
2025-08-06 11:51:04 +02:00
Timofey Kachalov
ffad0df277 refactor(sdk): Prepare e2e code for Hosted Bundle (#61852) 2025-08-06 13:12:08 +04:00
Nicolò Maria Mezzopera
d86d74ba5f PR-envs and ci skip should work together (#61448)
* feat: promote uberjar as the single uberjar creation workflow

* chore: remove useless   reuse-existing-artifacts

* refactor: streamline PR environment workflow by removing wait_for_uberjar input and simplifying uberjar retrieval

* fix: ensure default editions are used if container info retrieval fails

* chore: don't build uberjar outside of run-tests

* fix: update uberjar artifact name to use the current SHA instead of PR head SHA

* fix: update uberjar artifact names to use PR head SHA when available

* fix: update uberjar workflow to simplify input parameters and improve conditional checks

* fix: add concurrency settings to uberjar workflow

* fix: update documentation condition in run-tests workflow

* fix: add default node version

* fix: update conditions for container info retrieval and containerization steps

* fix: update default node version to 22 in uberjar workflow

* Update .github/workflows/uberjar.yml

* Update .github/workflows/uberjar.yml

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-08-06 09:08:29 +00:00
Phoomparin Mano
141cff0fe8 Fix upsell button and auth links in embedding admin settings (#61802) 2025-08-06 15:21:14 +07:00
Timofey Kachalov
cc758a125d refactor(sdk): Convert webpack.embedding-sdk.config to rspack and prepare for Hosted Bundle (#61822) 2025-08-06 10:09:46 +04:00
Cam Saul
4b8d3a1dc8 Flaky test fix for metabase.queries.api.card-test/we-can-get-a-list-of-dashboards-a-card-appears-in (#61619)
* Flaky test fix for metabase.queries.api.card-test/we-can-get-a-list-of-dashboards-a-card-appears-in

* Fix formatting

* cljfmt

* Fix Kondo warning
2025-08-05 16:18:13 -07:00
Case Nelson
c9106f66f1 fix: handle arrays in sparksql (#61690) 2025-08-05 20:58:21 +00:00
Alexander Polyankin
efac2b8f96 [Release blocker] Revert fuzzy matching changes (#61828)
* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Test fixes
2025-08-05 15:55:38 -04:00
Phoomparin Mano
ab30c325db Rename embed-iframe route to embed-js (#61803) 2025-08-06 02:47:46 +07:00
Alexander Polyankin
d11ce55c79 [Release blocker] Revert join custom columns changes (#61827) 2025-08-05 15:19:32 -04:00
Cam Saul
81b5c133b2 Ensure we're actually using a cached metadata provider in tests (somewhat faster Lib/QP tests) (#61702)
* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

* Restore accidentally-deleted `native-query-snippet` fn

* Fix accidental edits

* Test fix 🔧

* Sort namespaces
2025-08-05 18:58:24 +00:00
Phoomparin Mano
673c5b93ed Add enable_embedding_simple to stats.clj (#61807) 2025-08-05 22:01:08 +07:00
Ngoc Khuat
44ec7bc393 [Action v2] Undo / Redo (#61677) 2025-08-05 13:24:50 +00:00
Timofey Kachalov
62b48d1795 refactor(sdk): Prepare src/metabase code for Hosted Bundle (#61801) 2025-08-05 15:25:26 +04:00
Timofey Kachalov
da35b08918 refactor(sdk): Add x-metabase-version header to BE responses (#61799) 2025-08-05 12:35:50 +04:00
Timofey Kachalov
4a56e706eb Migrate webpack.shared.config.js to rspack (#61796) 2025-08-05 12:34:24 +04:00
Phoomparin Mano
d8a03a312f Update copy from new iframe to Embedded Analytics JS in embed flow (#61788) 2025-08-05 01:13:01 +04:00
dpsutton
81f880637b bump hive to 4.1.0 (#61766)
solves:
https://github.com/metabase/metabase/security/code-scanning/305
https://github.com/metabase/metabase/security/code-scanning/304
https://github.com/metabase/metabase/security/code-scanning/301
https://github.com/metabase/metabase/security/code-scanning/302

does not solve:
https://github.com/metabase/metabase/security/code-scanning/490
2025-08-04 15:32:00 -05:00
Oleksandr Yakushev
9a6dd6456f [pivot] Implement optimized clj->js and use it when recalculating pivots on frontend (#61241) 2025-08-04 21:22:22 +03:00
Phoomparin Mano
698be3e9f7 Revert "feat(sdk): hide tables by default in embedding data picker if there a…" (#61792) 2025-08-04 22:17:36 +07:00
Phoomparin Mano
f232f68588 Cleanup stacked card background on embed flow preview (#61782) 2025-08-04 17:29:10 +07:00
Oleksandr Yakushev
75ef744af8 [m.u.performance] Make performance namespace cross-platform (#61159) 2025-08-02 02:05:40 +03:00
Phoomparin Mano
84e35e40da feat(sdk): hide tables by default in embedding data picker if there are more than 2 models (#61022)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-08-01 21:27:33 +00:00
Riley Thompson
d3f48b79a5 Enable DB routing for Databricks (#61630) 2025-08-01 16:56:46 -04:00
Jeff Bruemmer
643695fc44 docs - update expressions list (#61727)
* date funcs

* summary
2025-08-01 15:43:19 -04:00
Jeff Bruemmer
fd29d268d3 docs - update time grouping example (#61752)
* Update time-grouping-parameters.md

* tags

* edit
2025-08-01 15:42:16 -04:00
dpsutton
1a14bd6eba submit init function, not results (#61733)
was blocking on startup
stacktrace below is representative. has a few other things like reveal
but shows that we get into a huge loop over all cards and you end up
waiting for the instance to be ready for a long time
```
	at metabase.lib.card$fn__77290$fn__77297.invoke(card.cljc:71)
	at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303$fn__77304.invoke(card.cljc:141)
	at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$mapv.invokeStatic(core.clj:7050)
	at clojure.core$mapv.invoke(core.clj:7050)
	at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303.invoke(card.cljc:141)
	at metabase.lib.card$fn__77302$fn__77308.invoke(card.cljc:120)
	at metabase.lib.card$fn__77316$card_cols_STAR_77315__77317.invoke(card.cljc:163)
	at metabase.lib.card$fn__77316$fn__77322.invoke(card.cljc:157)
	at metabase.lib.card$fn__77350$card_metadata_columns77349__77351.invoke(card.cljc:223)
	at metabase.lib.card$fn__77350$fn__77354.invoke(card.cljc:217)
	at metabase.lib.card$eval77367$_AMPERSAND_f__77368.invoke(card.cljc:257)
	at metabase.lib.card$eval77367$fn__77372.invoke(card.cljc:242)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.field.resolution$fn__80775$resolve_in_card_returned_columns80774__80776.invoke(resolution.cljc:352)
	at metabase.lib.field.resolution$fn__80775$fn__80784.invoke(resolution.cljc:346)
	at metabase.lib.field.resolution$fn__80788$resolve_in_card_or_stage_metadata80787__80789.invoke(resolution.cljc:365)
	at metabase.lib.field.resolution$fn__80788$fn__80801.invoke(resolution.cljc:358)
	at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invokeStatic(resolution.cljc:410)
	at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invoke(resolution.cljc:390)
	at metabase.lib.field.resolution$fn__80844$resolve_from_previous_stage_or_source80843__80845.invoke(resolution.cljc:440)
	at metabase.lib.field.resolution$fn__80844$fn__80861.invoke(resolution.cljc:434)
	at metabase.lib.field.resolution$fn__80865$resolve_field_ref80864__80867.invoke(resolution.cljc:471)
	at metabase.lib.field.resolution$fn__80865$fn__80878.invoke(resolution.cljc:457)
	at metabase.lib.field$eval80922$_AMPERSAND_f__80923.invoke(field.cljc:62)
	at metabase.lib.field$eval80922$fn__80925.invoke(field.cljc:60)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680$fn__74681.invoke(calculation.cljc:287)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680.invoke(calculation.cljc:286)
	at metabase.lib.metadata.calculation$fn__74679$fn__74684.invoke(calculation.cljc:275)
	at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329$fn__80331.invoke(breakout.cljc:43)
	at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$mapv.invokeStatic(core.clj:7050)
	at clojure.core$mapv.invoke(core.clj:7050)
	at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329.invoke(breakout.cljc:42)
	at metabase.lib.breakout$fn__80328$fn__80334.invoke(breakout.cljc:35)
	at metabase.lib.stage$fn__81784$breakouts_columns81783__81785.invoke(stage.cljc:59)
	at metabase.lib.stage$fn__81784$fn__81787.invoke(stage.cljc:55)
	at metabase.lib.stage$fn__81843$summary_columns81842__81844.invoke(stage.cljc:92)
	at metabase.lib.stage$fn__81843$fn__81846.invoke(stage.cljc:86)
	at metabase.lib.stage$eval81986$_AMPERSAND_f__81988.invoke(stage.cljc:290)
	at metabase.lib.stage$eval81986$fn__81996.invoke(stage.cljc:283)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:513)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:510)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.queries.models.card$dataset_query__GT_dimensions.invokeStatic(card.clj:1270)
	at metabase.queries.models.card$dataset_query__GT_dimensions.invoke(card.clj:1262)
	at metabase.queries.models.card$extract_non_temporal_dimension_ids.invokeStatic(card.clj:1277)
	at metabase.queries.models.card$extract_non_temporal_dimension_ids.invoke(card.clj:1274)
	at metabase.search.ingestion$execute_function_attr.invokeStatic(ingestion.clj:68)
	at metabase.search.ingestion$execute_function_attr.invoke(ingestion.clj:63)
	at metabase.search.ingestion$execute_all_function_attrs$fn__131886.invoke(ingestion.clj:80)
	at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1309)
	at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
	at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1314)
	at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
	at clojure.lang.PersistentHashMap.kvreduce(PersistentHashMap.java:238)
	at clojure.core$fn__8559.invokeStatic(core.clj:6987)
	at clojure.core$fn__8559.invoke(core.clj:6967)
	at clojure.core.protocols$fn__8287$G__8282__8296.invoke(protocols.clj:174)
	at clojure.core$reduce_kv.invokeStatic(core.clj:6998)
	at clojure.core$reduce_kv.invoke(core.clj:6989)
	at metabase.search.ingestion$execute_all_function_attrs.invokeStatic(ingestion.clj:76)
	at metabase.search.ingestion$execute_all_function_attrs.invoke(ingestion.clj:73)
	at metabase.search.ingestion$__GT_document.invokeStatic(ingestion.clj:87)
	at metabase.search.ingestion$__GT_document.invoke(ingestion.clj:85)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at medley.core$distinct_by$fn__15232$fn__15233.invoke(core.cljc:290)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at clojure.core$completing$fn__8562.invoke(core.clj:7010)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at toucan2.pipeline$with_init$fn__51829.invoke(pipeline.clj:327)
	at clojure.core$completing$fn__8562.invoke(core.clj:7010)
	at toucan2.jdbc.result_set$reduce_result_set.invokeStatic(result_set.clj:156)
	at toucan2.jdbc.result_set$reduce_result_set.invoke(result_set.clj:125)
	at toucan2.jdbc.query$reduce_jdbc_query.invokeStatic(query.clj:51)
	at toucan2.jdbc.query$reduce_jdbc_query.invoke(query.clj:22)
	at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invokeStatic(pipeline.clj:19)
	at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invoke(pipeline.clj:9)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
	at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
	at toucan2.pipeline$transduce_execute$with_connection_STAR___51727.invoke(pipeline.clj:78)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invokeStatic(connection.clj:13)
	at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invoke(connection.clj:11)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
	at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.pipeline$transduce_execute.invokeStatic(pipeline.clj:77)
	at toucan2.pipeline$transduce_execute.invoke(pipeline.clj:64)
	at clojure.lang.Var.invoke(Var.java:401)
	at toucan2.pipeline$transduce_compiled_query.invokeStatic(pipeline.clj:244)
	at toucan2.pipeline$transduce_compiled_query.invoke(pipeline.clj:240)
	at toucan2.pipeline$transduce_built_query.invokeStatic(pipeline.clj:252)
	at toucan2.pipeline$transduce_built_query.invoke(pipeline.clj:246)
	at toucan2.pipeline$transduce_query_primary_method_default.invokeStatic(pipeline.clj:272)
	at toucan2.pipeline$transduce_query_primary_method_default.invoke(pipeline.clj:269)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
	at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
	at toucan2.pipeline$transduce_query_STAR_.invokeStatic(pipeline.clj:278)
	at toucan2.pipeline$transduce_query_STAR_.invoke(pipeline.clj:274)
	at toucan2.pipeline$transduce_with_model.invokeStatic(pipeline.clj:293)
	at toucan2.pipeline$transduce_with_model.invoke(pipeline.clj:280)
	at toucan2.pipeline$transduce_parsed.invokeStatic(pipeline.clj:309)
	at toucan2.pipeline$transduce_parsed.invoke(pipeline.clj:295)
	at clojure.lang.AFn.applyToHelper(AFn.java:160)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$apply.invoke(core.clj:662)
	at toucan2.pipeline$reducible_fn$reify__51862.reduce(pipeline.clj:404)
	at clojure.core$transduce.invokeStatic(core.clj:7025)
	at clojure.core.Eduction.reduce(core.clj:7874)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$reduce.invoke(core.clj:6947)
	at metabase.util$rconcat$reify__16182.coll_reduce(util.cljc:1188)
	at clojure.core$transduce.invokeStatic(core.clj:7026)
	at clojure.core.Eduction.reduce(core.clj:7874)
	at clojure.core$transduce.invokeStatic(core.clj:7025)
	at clojure.core$transduce.invokeStatic(core.clj:7021)
	at clojure.core$transduce.invoke(core.clj:7012)
	at metabase.search.appdb.index$index_docs_BANG_.invokeStatic(index.clj:279)
	at metabase.search.appdb.index$index_docs_BANG_.invoke(index.clj:275)
	at metabase.search.appdb.core$populate_index_BANG_.invokeStatic(core.clj:169)
	at metabase.search.appdb.core$populate_index_BANG_.invoke(core.clj:168)
	at metabase.search.appdb.core$eval132669$fn__132671.invoke(core.clj:182)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at metabase.search.core$init_index_BANG_$iter__133794__133798$fn__133799.invoke(core.clj:91)
	at clojure.lang.LazySeq.force(LazySeq.java:50)
	at clojure.lang.LazySeq.realize(LazySeq.java:89)
	at clojure.lang.LazySeq.seq(LazySeq.java:106)
	at clojure.lang.RT.seq(RT.java:555)
	at clojure.core$seq__5488.invokeStatic(core.clj:139)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24)
	at clojure.core.protocols$fn__8266.invokeStatic(protocols.clj:74)
	at clojure.core.protocols$fn__8266.invoke(protocols.clj:74)
	at clojure.core.protocols$fn__8207$G__8202__8220.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6965)
	at clojure.core$reduce.invoke(core.clj:6947)
	at metabase.search.core$init_index_BANG_.invokeStatic(core.clj:88)
	at metabase.search.core$init_index_BANG_.doInvoke(core.clj:80)
	at clojure.lang.RestFn.invoke(RestFn.java:411)
	at metabase.search.task.search_index$init_BANG_$fn__173098.invoke(search_index.clj:38)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394$with_transaction_STAR___126395.invoke(cluster_lock.clj:61)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at metabase.app_db.connection$do_transaction$thunk__61025.invoke(connection.clj:145)
	at metabase.app_db.connection$do_transaction.invokeStatic(connection.clj:164)
	at metabase.app_db.connection$do_transaction.invoke(connection.clj:141)
	at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invokeStatic(connection.clj:201)
	at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invoke(connection.clj:174)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invokeStatic(connection.clj:249)
	at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invoke(connection.clj:245)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:58)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:212)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394.invoke(cluster_lock.clj:53)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invokeStatic(connection.clj:18)
	at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invoke(connection.clj:15)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at metabase.app_db.connection$do_with_connection_primary_method_default.invokeStatic(connection.clj:132)
	at metabase.app_db.connection$do_with_connection_primary_method_default.invoke(connection.clj:130)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
	at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invokeStatic(cluster_lock.clj:53)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invoke(cluster_lock.clj:51)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407$do_with_cluster_lock_STAR__STAR___126409.invoke(cluster_lock.clj:78)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:662)
	at metabase.util.retry$decorate$fn$reify__126370.call(retry.clj:110)
	at io.github.resilience4j.retry.Retry.lambda$decorateCallable$5(Retry.java:306)
	at metabase.util.retry$decorate$fn__126369.doInvoke(retry.clj:111)
	at clojure.lang.RestFn.invoke(RestFn.java:400)
	at metabase.util.retry$fn__126375$make126374__126376$fn__126377.invoke(retry.clj:120)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:82)
	at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:75)
	at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
	at metabase.search.task.search_index$init_BANG_.invokeStatic(search_index.clj:37)
	at metabase.search.task.search_index$init_BANG_.invoke(search_index.clj:33)
	at metabase.search.task.search_index$eval173156$fn__173157.invoke(search_index.clj:46)
	at metabase.startup.core$run_startup_logic_BANG_$fn__173079.invoke(core.clj:30)
	at metabase.startup.core$run_startup_logic_BANG_.invokeStatic(core.clj:28)
	at metabase.startup.core$run_startup_logic_BANG_.invoke(core.clj:24)
	at metabase.core.core$init_BANG__STAR_.invokeStatic(core.clj:181)
	at metabase.core.core$init_BANG__STAR_.invoke(core.clj:117)
	at metabase.core.core$init_BANG_.invokeStatic(core.clj:194)
	at metabase.core.core$init_BANG_.invoke(core.clj:189)
	at dev$init_BANG_.invokeStatic(dev.clj:143)
	at dev$init_BANG_.invoke(dev.clj:139)
	at dev$start_BANG_.invokeStatic(dev.clj:180)
	at dev$start_BANG_.invoke(dev.clj:176)
	at dev$eval206099.invokeStatic(NO_SOURCE_FILE:1)
	at dev$eval206099.invoke(NO_SOURCE_FILE:1)
	at clojure.lang.Compiler.eval(Compiler.java:7739)
	at clojure.lang.Compiler.eval(Compiler.java:7729)
	at clojure.lang.Compiler.eval(Compiler.java:7694)
	at clojure.core$eval.invokeStatic(core.clj:3232)
	at clojure.core$eval.invoke(core.clj:3228)
	at vlaaad.reveal.repl$wrap_eval$fn__37945.invoke(repl.clj:90)
	at clojure.main$repl$read_eval_print__9248$fn__9251.invoke(main.clj:437)
	at clojure.main$repl$read_eval_print__9248.invoke(main.clj:437)
	at clojure.main$repl$fn__9257.invoke(main.clj:459)
	at clojure.main$repl.invokeStatic(main.clj:459)
	at clojure.main$repl.doInvoke(main.clj:368)
	at clojure.lang.RestFn.applyTo(RestFn.java:140)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:662)
```
2025-08-01 14:25:50 -05:00
Jeff Bruemmer
debb945c57 link to intro page (#61744) 2025-08-01 19:22:18 +00:00
Phoomparin Mano
8d195dc6db Add note on useExistingUserSession's browser compatibility (#61663) 2025-08-02 02:00:22 +07:00
John Swanson
1eccdad5f4 Format scalar currencies correctly (#61664)
Previously we were treating all currency formatting as if we were in a
table, and only adding the currency symbol if `currency-in-header` were
explicitly set to `false` for the column.

When formatting a scalar value, though, we want to always add the
currency symbol inline (since there is no header in this case).

I found that `metabase.channel.render.body/format-cell` and
`metabase.formatter.core/format-number` were actually only used to
format *scalar* cells and *scalar* numbers (as opposed to cells in a
table), so I renamed them for a bit more clarity and added a new
optional argument, `scalar?`, to
`metabase.formatter.core/number-formatter`. When passed (and truthy) the
currency symbol will be splatted into the formatted number even if
`:currency-in-header` is not `false`.
2025-08-01 09:51:31 -07:00
Ryan Laurie
3f07958eae [ci run] Fix deprecated input (#61700)
* replaced deprecated Input with TextInput

* udpate a couple more things

---------

Co-authored-by: iamkabilash <iamkabilash@gmail.com>
2025-08-01 10:51:06 -06:00
Jeff Bruemmer
0947c6b604 docs - minor edits (#61735)
* minor edits

* Update docs/permissions/row-and-column-security.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-08-01 16:47:09 +00:00
Jeff Bruemmer
e62c8f1fff docs - rename data sandboxing to row and column security (#61682) 2025-08-01 12:35:02 -04:00
John Swanson
efb70a343a do not throw on empty query for /search (#61615)
instead just pass `(not-empty q)` to the search subsystem, which will
convert it to `nil` if it's empty and pass it unchanged if it's not.

I still don't think this is probably the ideal user experience when you
navigate to `/search` but it's not an error at least.
2025-08-01 08:48:45 -07:00
John Swanson
6f34845c13 Fix zero measure count issue for pivot tables (#61565) 2025-08-01 08:23:26 -07:00
Riley Thompson
11f24779e2 Always set roles on connections (#61563)
* always set roles on connections

* add deps

* include sql-jdbc.execute

* kondo warn on reflection
2025-08-01 14:51:25 +00:00
Brad Anderson
086a00ab8d Fix: UXW-382 - Public Links menu item within sharing menu is too large (#61628)
* UXW-382 Updates "Public link" menu item for admins when public links aren't enabled so it doesn't look obviously broken

* UXW-382 Updates tests

* UXW-382 Updates "enable public links" menu item to be disabled per PR feedback

* UXW-382 Swaps core styles for mantine props per PR feedback
2025-08-01 10:50:58 -04:00
Nicolò Pretto
ed82963a86 chore(sdk): bump minimum react version to 18 (#61718) 2025-08-01 16:36:02 +02:00
Edward Paget
0fe24156a3 fix: issues generating valid urls for map tiles (#61634)
* fix: issues generating valid urls for map tiles

Fixes to issues generating map tiles, one is on x-ray dashboards we need
to check that we're not in a real dashboard and send an ad hoc tile
request.

Second if the field ref sent in the request has options we need to
remove the 'base-type' option because the type will be encoded as
something like test%2FFloat and the way Jetty decodes URLs before
parsing turns it into a '/' in a position a path separator cannot be:
https://github.com/jetty/jetty.project/issues/7713

* fixup! typeguard dashbaord id

* Update maps.cy.spec.js

* fixup! better handle null field opts
2025-08-01 08:40:27 -05:00
Riley Thompson
ad3ec1b797 Enable DB routing for snowflake (#61434) 2025-08-01 09:24:24 -04:00
Jeff Bruemmer
9276aaad2a docs - update generated docs (#61689)
* config template

* api docs

* env var docs
2025-08-01 09:21:27 -04:00
Timofey Kachalov
c69ef65bff feat(sdk): Use Mantine styles with CSS layer for the SDK (#61475) 2025-08-01 17:12:25 +04:00
Nicolò Pretto
87f36432ca allow setting the default cypress browser via env CYPRESS_BROWSER (#61652)
* allow setting the default cypress browser via env CYPRESS_BROWSER

* keep --browser have higher priority than the env
2025-08-01 12:19:34 +02:00
Nicolò Pretto
00ceb1aff2 remove references to ENTERPRISE_TOKEN (#61667)
* update docs that referenced old envs CYPRESS_ALL

* remove requirement on ENTERPRISE_TOKEN that's not needed anymore
2025-08-01 12:18:09 +02:00
Nicolò Pretto
b243e4e4d4 prepare the sdk workflow for 56 release (#61704) 2025-08-01 08:31:34 +00:00
Oleksandr Yakushev
7c2347fef6 [qp] Use metabase.util.performance/postwalk instead of regular clojure.walk (#60722) 2025-08-01 06:10:20 +00:00
Ryan Laurie
ab0ed63e26 update build info for v56 (#61676) 2025-07-31 20:18:24 -06:00
Ryan Laurie
d34ddd45c2 fix release notes preview action (#61671) 2025-07-31 20:18:16 -06:00
bryan
b07b86a367 enable cider middleware in dev-start (#61678)
Co-authored-by: Raimon Grau <raimonster@gmail.com>
2025-07-31 23:18:52 +00:00
Ryan Laurie
c4db9bf7fe fix native models test (#61697) 2025-07-31 22:20:33 +00:00
Cam Saul
d389949074 Re-implementation of metabase.driver.common.parameters.* that uses Lib (#61158)
* Re-implementation of `metabase.driver.common.parameters.*` that uses Lib

* Fix Kondo warnings

* Move tests that have nothing to do with drivers to QP

* Test fixes 🔧

* Test fixes 🔧

* Try simplifying the PR
2025-07-31 18:14:41 -04:00
bryan
0a9b808754 update jar-download to handle {v,}1.56.0-beta (#61696) 2025-07-31 22:11:21 +00:00
Riley Thompson
f1057b6420 Enable DB routing for Redshift (#61390)
* db routing for redshift

* simplify test

* dataset name multimethod

* small change

* use delayed defs

* add redshift ci routing env var

* small fix

* update dataset definitions

* change back to original data
2025-07-31 17:14:50 -04:00
Jakub Chodorowicz
28bf41bb17 Replace getStoreUrl usage with useStoreUrl (#61534)
* Replace getStoreUrl usage with useStoreUrl

* Refactor getStoreUrl

* Add harcoded default store URL (live store)
2025-07-31 15:09:31 -06:00
Oleksandr Yakushev
73bcc90a68 [pivot] Replace json-roundtrip with explicit type conversions (#61384) 2025-08-01 00:09:26 +03:00
Oleksandr Yakushev
74a6335bd3 [legacy-mbql] Optimize normalize-tokens (#60721) 2025-08-01 00:03:43 +03:00
Riley Thompson
fa3b11fcde Retry have-select-privilege? on error (#61236)
* feat: driver/do-with-resilient-connection

* feat: :keep-open? option to do-with-connection-with-options

* feat: attempt describe-database with resilient connection

* feat: execute jdbc query with retry conn

* test

* avoid recursive issues

* simplify

* changelog

* type hint

* force local conn, so the connection being closed won't close outer unrealized result sets

* working test

* more test

* opts

* style

* add test for connection options

* notes

* fix test

* docstring

* Update src/metabase/driver/sql_jdbc/execute.clj

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* logs

* better logs

* try to close conn when it's no longer valid

* pull out logic to is-conn-open

* is-conn-open? test

* clarify

* Update docs/developers-guide/driver-changelog.md

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* update version

* chore: move tests to right namespace

* retry have select privilege on error

* add test

* improve test

* remove let

* separate connection for each test

* clean up test

* try druid jdbc ci fix

* close connection during test

* use do with resilient connection in test for druid

* formatting

* always set role if supported

* Fix clickhouse and sqlserver

* impersonation test

* use normal-driver-select

* address comments

* kondo

* remove debug

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-07-31 19:38:56 +00:00
Denis Berezin
f8f5e20c1f UXW-381 Fix collections bulk action buttons UI (#61640) 2025-07-31 19:06:57 +03:00
Alex Yarosh
06712c46e5 Update database-routing.md (#61672) 2025-07-31 15:39:59 +00:00
Brad Anderson
f9d74d1f3b Fix: UXW-28 When deleting a tab with questions saved to the dashboard, no option offered to keep and move those questions (#61526)
* UXW-28 Adds confirmation modal when deleting a tab that contains dashboard-only cards

* UXW-28 Makes confirmation modal smarter; uses short version if all questions on a tab are dashboard questions, lists affected questions if it's a mix

* UXW-28 Adds tests
2025-07-31 10:51:35 -04:00
Brad Anderson
1dffd98bd7 UXW-314 Fix action icon inconsistencies (#61639) 2025-07-31 08:48:04 -06:00
Nicola Mometto
909354fe89 Attempt to reconnect during select probing if connection is closed (#60857)
* feat: driver/do-with-resilient-connection

* feat: :keep-open? option to do-with-connection-with-options

* feat: attempt describe-database with resilient connection

* feat: execute jdbc query with retry conn

* test

* avoid recursive issues

* simplify

* changelog

* type hint

* force local conn, so the connection being closed won't close outer unrealized result sets

* working test

* more test

* opts

* style

* add test for connection options

* notes

* fix test

* docstring

* Update src/metabase/driver/sql_jdbc/execute.clj

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* logs

* better logs

* try to close conn when it's no longer valid

* pull out logic to is-conn-open

* is-conn-open? test

* clarify

* Update docs/developers-guide/driver-changelog.md

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* update version

* chore: move tests to right namespace

* impersonation test

* use normal-driver-select

* trigger CI

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-07-31 15:19:49 +01:00
Edward Paget
944ca02530 chore: remove stray #p (#61665)
Not sure why kondo didn't get this.
2025-07-31 09:08:50 -05:00
Vamsi Peri
a2b720a743 Delete .github/workflows/claude.yml (#61666) 2025-07-31 13:27:43 +00:00
eliotmetabase
3f19d40ca1 Temporary change to fix CI, will update modules properly (#61662) 2025-07-31 13:05:34 +00:00
Phoomparin Mano
e357c4f0db Design cleanup for embedding sdk settings page (#61653) 2025-07-31 19:57:52 +07:00
Timofey Kachalov
8563b74b89 Remove circular references in SDK package (#61657) 2025-07-31 16:16:13 +04:00
Nicolò Pretto
6558cca6a4 feat(simple-embed): parse attributes with json5 to be more permissive… (#61648)
* feat(simple-embed): parse attributes with json5 to be more permissive with quotes

* Update package.json

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix tests

* Apply suggestion from @heypoom

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-31 11:57:30 +00:00
Phoomparin Mano
435e905ffd Hide Embed menu from "New" button if the user is not an admin (#61658) 2025-07-31 18:39:58 +07:00
Oleksandr Solovyov
3063577208 update snowflake's commons-lang3 to clear out security issue (#61656) 2025-07-31 13:38:27 +02:00
Timofey Kachalov
1c6c3681a8 Add backend-sources as triggers to SDK compatibility tests (#61650) 2025-07-31 14:28:48 +04:00
Chris Truter
84f0a92394 Assign correct MB version metadata to data-editing functions (#61647) 2025-07-31 09:31:04 +00:00
Chris Truter
9019aab71e BE support for Table Data Editing (#61490)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2025-07-31 08:34:17 +00:00
Cam Saul
abdfe5062c Faster field ref resolution (#61529)
* Remove debugging stuff

* 14 failures, 1 error.

* 10 failures, 1 error.

* 10 failures, 0 errors.

* Better log messages

* Faster field ref resolution

* Test fixes 🔧

* Some test fixes 🔧

* Remove resolve-joined-fields middleware

* Fix lib.underlying calculation of fields with join aliases

* Fix busted pivot tests

* Remove unused fn

* More resolution fixes

* drill-thru use vars so we can get updated fns in the REPL

* Consolidate the lib metadata => legacy metadata functions

* Add a pile of additional tests

* Migrate the `resolve-joined-fields` middleware (#39884)

* Support automatically removing duplicate refs in `:fields` and `:breakouts` during normalization

* More cleanup and extra tests 🔧

* Add ::mbql.s/OrderBys

* Mess with logging in resolution even more

* Order bys should be distinct ignoring keys like :base-type or namespaced keys

* I have fixed #60587

* One last round of test fixes??

* Test fix

* Code cleanup

* Fix test failures 🔧

* MongoDB test fix

* Fix Oracle test 🔧

* MongoDB test fix 🔧

* cljfmt

* e2e test fix?

* Test fix 🔧

* Less noisy logging

* Improve field resolution for implicit joins; PR feedback (part 1)

* PR feedback (part 2) and extra dox
2025-07-30 23:35:25 +00:00
eliotmetabase
adefc0f0b7 Create UX West, remove Admin Webapp and Dashviz (#61644) 2025-07-30 23:34:58 +00:00
dpsutton
fadfd67275 Test drivers on folder changes (#61633)
* Run tests if files in lib/drivers/qp are changes

check src/metabase/lib, src/metabase/query_processor, modules/drivers

we key off of team label but this is hopefully close enough to what we
really want

* run an action linter

```
❯ actionlint /Users/dan/projects/work/metabase/.github/workflows/drivers.yml
.github/workflows/drivers.yml:440:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
.github/workflows/drivers.yml:537:15: description is required in metadata of "Wait for localhost port to be ready" action at "/Users/dan/projects/work/metabase/.github/actions/await-port/action.yml" [action]
    |
537 |       - uses: ./.github/actions/await-port
    |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:587:13: description is required in metadata of "Test database driver" action at "/Users/dan/projects/work/metabase/.github/actions/test-driver/action.yml" [action]
    |
587 |       uses: ./.github/actions/test-driver
    |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:743:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
```

acitonlint seems pretty nice

not fixing the exclude-tag since that seems to work just fine

* fix syntax

* fetch base branch for file checks

to see if we changed files, need the base

* indentation is fun. super fast iteration

* resequence if before run
2025-07-30 18:28:38 -05:00
dpsutton
a204791f86 run third tier on devex team label (#61577)
* run third tier on devex team label

* empty to poke CI

* make prepare-statement private

probably good for this to be private either way, but this is done now to
kick CI and run tests that aren't running in CI

* close single quote
2025-07-30 17:09:57 -05:00
Edward Paget
4e7f0f28d3 fix: snyk set org and repo for open source limits (#61605) 2025-07-30 15:56:54 -05:00
John Swanson
a15d4122f2 Don't try to update setting as non-admin (#61567)
We're using a setting as a half-baked way to track whether we've ever
created a non-table chart. We do this regardless of whether you're an
admin or not, but the endpoint responds with a 403 if you're not an
admin.

Honestly motivation here was fixing [UXW-152: 403 thrown for non-admins
when viewing question re:
non-table-chart-generated](https://linear.app/metabase/issue/UXW-152/403-thrown-for-non-admins-when-viewing-question-re-non-table-chart)
but it feels a little silly. But... it's not *completely* unreasonable.
2025-07-30 20:47:37 +00:00
Case Nelson
8bc377369b refactor: drop with-temp from field-ref-repro tests (#61566) 2025-07-30 16:23:42 -04:00
Uladzimir Havenchyk
2ff3bb736f deps: update deps that use form-data to the fixed versions (#61582)
* deps: update deps that use form-data to the fixed versions

* downgrade jsdom
2025-07-30 20:06:09 +00:00
Uladzimir Havenchyk
badbd28565 deps: upgrade on-headers dep (#61589) 2025-07-30 20:05:11 +00:00
Nathan Voxland
c45c500628 Check for dev namespace better (#61610) 2025-07-30 14:46:08 -05:00
Uladzimir Havenchyk
a95c69a0b3 deps(release): update slack api and form-data packages (#61584) 2025-07-30 22:32:48 +03:00
Case Nelson
1319841229 dev: add the ability to run native ddl as part of dataset definitions (#61343)
* dev: add the ability to run native ddl as part of dataset definitions

* Fixing tests

* Fix kondo

* Fix tests and kondo

* Fix clickhouse tests

* Fix another clickhouse test

* Fix bigquery test

* Fix bigquery test

* Trigger Build
2025-07-30 13:24:53 -06:00
Edward Paget
e0bacfea5e feat: update group mapping text for jwt behavior (#61273)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* feat: make jwt group attribute admin configurable

* feat: update group mapping text for jwt behavior
2025-07-30 19:17:41 +00:00
Rodrigo López Dato
987ed5d7da Typo (#61624) 2025-07-30 16:01:04 -03:00
Nicolò Pretto
431afb660b feat(new-embed): log an error when the parsing of a json attribute fails (#61617)
* feat(new-embed): log an error when the parsing of a json attribute fails

* Update enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/webcomponents.ts

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-30 20:51:21 +02:00
Edward Paget
b11f0905f3 fix: allow scalar user-attributes (#61613)
* fix: allow scalar user-attributes

Only drop collections which cannot be converted to strings when
generating database queries.

* fixup! remove unused namespace

* fixup! use keep to retain false booleans
2025-07-30 18:42:56 +00:00
Phoomparin Mano
7eee4b5da1 docs(sdk): missing documentation for question components (#61616) 2025-07-30 18:27:12 +00:00
John Swanson
4bef26a524 Remove quotes around UUIDs in XLSX downloads (#61614)
I'm ignoring `styles` and `typed-styles` here just like the `Object`
implementation or the `String` implementation.
2025-07-30 12:31:31 -05:00
Phoomparin Mano
9edd0db967 Embed preview for simple embedding fails on production due to localhost checks (#61606) 2025-07-30 23:41:37 +07:00
Sébastien
f51780142f feat(sdk): download button is now in an always visible ... menu (#61556)
* Closes EMB-669: download button is now in an always visible ... menu

* renamed file and component

* Update Loki Snapshots

* fixed unit tests

* e2e

* e2e

* e2e

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-30 17:11:42 +02:00
Ryan Laurie
98ce261480 don't pass empty strings to question create API (#61467)
* don't pass empty strings to question create API

* add unit tests

* handle null

* even better
2025-07-30 15:10:21 +00:00
Phoomparin Mano
f7e1511dcd Update settings page and use Embedded Analytics JS as the public name (#61597) 2025-07-30 21:50:41 +07:00
Edward Paget
f1d46ecf36 feat: make jwt group attribute admin configurable (#61234)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* feat: make jwt group attribute admin configurable
2025-07-30 14:43:20 +00:00
Ngoc Khuat
f93123f2a2 Fix alert with goal archived even though goal is not met (#61586) 2025-07-30 13:37:53 +00:00
Oleksandr Yakushev
6a73a95940 [dev] Add devtools-to-flamegraph script (#61157) 2025-07-30 15:42:05 +03:00
Phoomparin Mano
40d897d7f1 Add the Beta badge to "New > Embed" menu (#61593) 2025-07-30 19:03:41 +07:00
Oleksandr Solovyov
89a7f3c1b6 update nimbus-jose-jwt (#61581) 2025-07-30 11:17:02 +00:00
Phoomparin Mano
eb671b92ab Check for simple embedding's enabled settings and token feature (#61590) 2025-07-30 17:51:01 +07:00
Rodrigo López Dato
aa0cdb546d Fix empty latest version (#61578) 2025-07-30 00:43:01 -04:00
Nathan Voxland
8132b400d2 /api/dashboard/save should use the submitter's id as creator_id (#61524) 2025-07-29 17:33:38 -05:00
Dennis Schridde
8c80f88e30 Fix race condition of ee-extra release trigger (#61559)
The workflow in the `metabase-ee-extra` repository could run before the
container image tags were created by the workflow in the `metabase`
repository, causing the former to fail.  Fix by making the image push
an explicit dependency of the ee-extra trigger.
2025-07-29 23:46:31 +02:00
Nathan Voxland
c004ea2d46 Created prototype API for dev work (#61473) 2025-07-29 16:36:13 -05:00
Luiz Arakaki
78adcf7380 Rename sandboxing row column security (#58369)
Rename sandboxing to row and column security
2025-07-29 17:15:37 -03:00
dk-gervais
7bc29f3f9a Update community-drivers.md (#61431)
Add the InterSystems IRIS Metabase driver to the list of Community Drivers
2025-07-29 15:59:32 -04:00
Edward Paget
d7cf38d3cf fix: simplify sandbox permissions management (#61542)
This works by just totally removing the permission grants created by
sandboxes. Instead we use the `gtapped-table` flag added by the
sandboxing middleware to add just the gtapped-table itself to set of
necessary table create-query permissions and exclude any joined tables
from being added to this set.

If those tables are included elsewhere in the query (not the part
created by the sandbox), they will be added to the set of tables to
check normally and the query will be blocked if the user doesn't have
query-builder perms.
2025-07-29 14:22:49 -05:00
Edward Paget
72bca32bcd fix: new child collections use parent's namespace (#60202)
Child collections are automatically created with the same namespace as
their parent collection. Since we enforce a validation that this must be
true it seems simpler for api clients to have this value set for them
rather than requiring them to supply the namespace attribute (though it
still remains optional to pass one.)
2025-07-29 14:02:29 -05:00
Edward Paget
14b2815113 feat: auto assign jwt users to groups by name (#61221)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* Update common.clj
2025-07-29 14:01:50 -05:00
Phoomparin Mano
9b0241aa11 Rename feature token name from embedding_iframe_sdk to embedding_simple (#61548) 2025-07-30 01:38:15 +07:00
Edward Paget
13a851f3c1 feat: add audit log events for groups (#60946)
As part of the tenanting project we want to emit audit events when users
join/leave tenant groups (or these groups are otherwise modified).
2025-07-29 13:01:45 -05:00
Jeff Bruemmer
9dcd19054e docs - custom smtp server (#61549)
* custom smtp server

* notes

* edits
2025-07-29 13:48:36 -04:00
Nicolò Pretto
0c64aaa4a7 custom elements api for new simple embedding (#60646)
* wip

* experiment of callback to see if it works on vue with .callback={}

* basic e2e test for dashboard

* more tests and cleanup

* remove my-app playground

* rm unused file

* use custom elements for the preview

* support for async and defer, defaulting to defer

* clean up custom elements code

* rename drills props

* Revert "experiment of callback to see if it works on vue with .callback={}"

This reverts commit 89a38dca47.

* fix theme not being restored from persisted settings

* fix: load script  for preview from instance url, make iframe loaded data
attribute work

* change the snippet to use new defer syntax

* support for exploration with question-id=new

* cleanup

* fix types

* Revert "fix types"

This reverts commit bbc8eb8b59.

* Revert "support for exploration with question-id=new"

This reverts commit 4c3f041629.

* reimplement support for exploration

* fix parameters conditional rendering

* fix linting issues

* fix embed code snippet

* fix(new-embed): allow multiple questions/dashboards on the same page

* test for multiple questions

* add note about theme

* feat(sdk): expose the title prop in StaticQuestion (#61001)

* attempot to make tests more stable

* fix types

* maybe fix tests?

* test for ci

* put back support for is-save-enabled

* H.getIframeBody -> H.getSimpleEmbedIframeContent as it should be less flaky

* restore logic

* fix exploration not working in test

* moved comment to the correct place

* potential fix for handleMessage, ignore messages from other iframes

* use question for exploration templates

* fix type errors

* skip flaky "persists default and hidden parameters"

* fix template: exploration in embed flow

* always enable embedding-simple on embed flow tests

* refactor the custom elements tests to use the generic helpers

* fix tests :fingercrossed:

* default title to true

* update helper to grab the first 37.65

* default drills to true

* we're now showing the title by default

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-29 18:57:04 +02:00
Nicola Mometto
ef8bc2ea06 reassign sem to querying (#61551) 2025-07-29 16:41:08 +00:00
Jacob Joseph
915a78f13a Update upgrading-metabase.md (#61552)
note about running on JAR with higher version.
2025-07-29 15:40:10 +00:00
Ryan Laurie
7427caa8d0 Remove release/update channel selection (#61369)
* remove release/update channel selection

* 😁

* white space is dark space in dark mode

* obey the linter

* update comment
2025-07-29 07:54:32 -06:00
Phoomparin Mano
35bc7c8b9a Fix flaky tests for simple embedding due to toasts blocking the next button (#61541) 2025-07-29 20:39:46 +07:00
Nick Fitzpatrick
ff36018fb9 Add includeDashboardQuestions to the useAvailableData check (#61507)
* Add includeDashboardQuestions to the useAvailableData check

* fix spelling
2025-07-29 09:04:10 -03:00
Nicola Mometto
b7d5408300 move me and libor to metabot (#61536) 2025-07-29 13:00:00 +01:00
Sébastien
7bc79ed0a5 Added 'hide' button to SDK problem banner (#61532) 2025-07-29 12:34:49 +02:00
Phoomparin Mano
4e87da201c Auto-enable simple embedding in embed flow instead of react sdk (#61463)
Co-authored-by: Roman Abdulmanov <roman@metabase.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-07-29 16:44:33 +07:00
github-automation-metabase
ea826ef62b Bump net.thisptr/jackson-jq from 1.3.0 to 1.4.0 (#61483)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-29 08:23:27 +00:00
Cam Saul
1270cf7271 [Lib] Remove idents part 6 (#61511) 2025-07-28 18:37:54 -07:00
Cam Saul
fc23270381 [Release blocker fix] Correctly handle remapping inside joins (#61442)
* Do not add new extra empty stages when converting a join from legacy

* Update gitignore

* Simplified fix for #60444

* Fix QUE-1607

* Test fix 🔧

* Fix QUE-1621

* Additional tests.

* Test fix 🔧

* Remove dead code -- schemas for idents in legacy MBQL schema

* Test fix 🔧

* Fix QUE-1623

* Test fix 🔧

* Fix failing tests

* Test fixes 🔧

* Make sure join metadata goes in the right place

* Additional tests

* Make sure join metadata goes in the right place

* Less verbose logging

* Test fixes 🔧

* Some extra tests 🔧

* Another test fix 🔧

* Remove unused export

* Cleanup

* Code cleanup

* Update tests 🔧

* test fixes

* Improve/fix metadata calculation

* Test fixes 🔧

* Update tests

* Test fix 🔧

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧

* PR feedback

* Test fix 🔧
2025-07-29 01:30:50 +00:00
Cam Saul
1d5a79395d Remove 'fix bad references' middleware (#61472) 2025-07-28 20:21:23 -04:00
Fraser
cc3ddf8359 Add content translation to multi-autocomplete (#61263) 2025-07-29 09:40:28 +12:00
Jeff Bruemmer
5b5c5e7298 docs - time grouping parameters for sql queries (#60951) 2025-07-28 17:20:42 -04:00
bryan
0b3df70817 force ref checkout for pull_request type trigger (#61514) 2025-07-28 12:27:36 -06:00
Jeff Bruemmer
5e7f3e9467 docs - metadata editing (#61501) 2025-07-28 14:04:32 -04:00
Edward Paget
ffb583c99e feat: separate jwt-set attributes from manual-set (#61458)
* allow tenant attributes CRUD (#60347)

wip merge user and tenant attributes

WIP use new api

Split Mapping Editor

types fixed

so much unit testing

handle null cases

update tests

update a couple more e2e tests

less silly test

make things nicer

invalidate user cache on tenant update

* feat: separate jwt-set attributes from manual-set

* fixup! typescript stuff

* feat: restore structrue-attributes merging

Co-Authored-by: Dan Sutton <dan@metabase.com>

* feat: use merged attributes in routing/sandbox/etc

Co-Authored-By: John Swanson <john.swanson@metabase.com>

* fixup! move group manager test to ee

* fixup! kondo

* fixup! modal spec

* fixup! cypress tests

* fixup! migration timestamp

* fixup! one more cherry pick oopsie

* fixup! sandboxing cypress helper fixes

* fixup! more cypress updates

* fixup! remove eslint directive

* fixup! remove 2-arity router-dbor-id->destination-db-id

All the places it was called with 2-arity were explicitly passing in
@api/current-user anyway

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Dan Sutton <dan@metabase.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-07-28 16:50:15 +00:00
Edward Paget
be8e6611c3 fix: handle headerless translations csv (#61025)
* fix: handle headerless translations csv

* fixup! PR feedback

Also fixes an issue with error line number reporting without headers

* feat: allow csv headers to be in any order

* fixup! error reporting test
2025-07-28 16:31:29 +00:00
Edward Paget
f182885389 fix: run each snyk project individually (#61430)
* fix: remove categories on push

* fix: run each project individually

* fix: run jobs in parallel with pom caching

* fixup! dry it up

* Update snyk.yml
2025-07-28 11:04:40 -05:00
Edward Paget
3bb4d5e74d chore: add more query permission test scenarios (#61095)
* chore: test deeply nested cards with mixed perms

* chore: test custom expressions and aggregations

* chore: add more tests for blocks and joins

* fixup! whitespace

* fixup! remove confusing comments
2025-07-28 15:17:23 +00:00
Ryan Laurie
17bea4176a Update diagnostic info instructions (#61504) 2025-07-28 08:59:24 -06:00
Aleksandr Lesnenko
e22ab60e01 allow hide if no results setting in visualizer (#61471) 2025-07-28 11:53:25 -03:00
Oleksandr Solovyov
04c1d21645 welcome everyone (#61316) 2025-07-28 17:07:40 +03:00
Chris Truter
e446ba2c3d Allow "blank" search for fieldvalues (#61497) 2025-07-28 14:07:13 +00:00
Oleksandr Solovyov
93390d9f57 upgrade liquibase and postgres (#59774)
---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-07-28 08:39:24 -05:00
Brad Anderson
29f56b541f UXW-35 Fixes #56249 in a way that still preserves the fix for #51611 (#61462) 2025-07-28 09:33:49 -04:00
Kamil Mielnik
d786ffbff8 SEM-527 Table picker item text overflows (#61444)
* Bring the effect back

* Add a comment
2025-07-28 16:25:08 +07:00
Roman Abdulmanov
58cfd55861 Updated team.json (#61488) 2025-07-28 09:58:19 +01:00
Phoomparin Mano
6625097d66 Update the embedding sdk admin settings to add simple embedding toggle (#61392)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-28 10:24:44 +02:00
Braden Shepherdson
ef21542b10 [MBQL Lib] Use stubs for cards and metrics in lib cache keys (#61386)
Fixes #61253.

Here's the breakdown of the issue, since it's subtle:
- These objects can contain some vanilla JS objects which in embedding
  contexts can be `Object.preventExtensions()`'d.
  - Eg. the `:visualization-settings` on a card or metric.
- `lib.metadata.cache` uses these objects as part of the cache key.
- Those become the keys of a CLJS map, which uses `cljs.core/hash`
- JS objects and arrays have pointer equality (`identical?` or `===`)
  semantics.
- The default `cljs.core.IHash/-hash` uses `goog.getUid(obj)`.
- That subtly mutates objects, adding a non-`enumerable`
  `closure_uid_123456789` property with an arbitrary sequence number.
- That's adding a property, which is a violation if
  `Object.preventExtensions()` (or `Object.freeze()`) has been used.
    - That silently does nothing by default, but throws in strict mode.

This PR modifies the cache key logic (which already has special handling
for `:lib/metadata`) to replace `:lib/type :metadata/card` and
`:metadata/metric` maps with a stub like `[:metric/card 123]`.
2025-07-28 07:43:18 +00:00
github-automation-metabase
645b55cfaf Bump commons-codec/commons-codec from 1.18.0 to 1.19.0 (#61482)
Inspect dependency changes here: https://github.com/apache/commons-codec/compare/commons-codec-1.18.0-RC1...commons-codec-1.19.0-RC1
2025-07-28 07:13:25 +00:00
Uladzimir Havenchyk
351fdc90cf chore: reduce usage of moment-timezone (#61388)
* drop unused redux functions

* drop time parsing in event cards

* replace moment types with dayjs

* use dayjs for tz guessing

* drop moment from a hook

* drop unused time functions
2025-07-28 06:02:59 +00:00
Fraser
05e78aae4a Use H helpers insteaed of commands cypress (#61403)
* Use H helpers insteaed of commands cypress
2025-07-28 09:11:50 +12:00
Fraser
b0b8348dad Remove flaky tag from content translation tests (#61439) 2025-07-28 09:11:36 +12:00
Cam Saul
831fb413cc [Lib] Misc metadata calculation and conversion bugfixes (#61437)
* Do not add new extra empty stages when converting a join from legacy

* Update gitignore

* Fix QUE-1607

* Test fix 🔧

* Fix QUE-1621

* Additional tests.

* Test fix 🔧

* Remove dead code -- schemas for idents in legacy MBQL schema

* Test fix 🔧

* Fix QUE-1623

* Test fix 🔧
2025-07-26 04:10:14 +00:00
bryan
aab42da74c remove unused dependency (#61374) 2025-07-25 21:38:12 +00:00
bryan
1dc85bcbae run known fixtures ahead of running tests (#61461) 2025-07-25 21:34:55 +00:00
Edward Paget
5e79cee71f fix: improve db drop down perf by prefiltering (#60652) 2025-07-25 15:48:09 -05:00
github-automation-metabase
23d194ca63 Bump io.github.camsaul/toucan2 from 1.0.565 to 1.0.566 (#59909)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-25 20:40:19 +00:00
Edward Paget
1cc4b87479 fix: mysql failure in saml setting test (#61460) 2025-07-25 18:40:18 +00:00
Phoomparin Mano
61d8979597 Update CORS and SSO handler to allow simple embedding client header (#61416) 2025-07-26 01:09:23 +07:00
Phoomparin Mano
206f7eaccb feat(sdk): expose the title prop in StaticQuestion (#61001) 2025-07-25 23:06:56 +07:00
Sébastien
832e2b7ac5 Viz 1323 visualizer cant combine single series chart and breakout (#61216)
* Closes VIZ-1322 VIZ-1323 looser compatibility

* fixup

* fixup

* fixed tests

* removed commented out blocks

* cleanup

* fixed unit test

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-07-25 17:33:09 +02:00
Chris Truter
dc973f0cb8 Add test coverage for search indexing during deserialization (#61047)
The test gives a bit of false confidence, as it passed before we added the forced re-indexing at the end of the import.

We probably want a way to keep the transaction open until after the ingestor has processed the messages from the toucan hooks... but that sounds quite invasive and brittle to pull off.
2025-07-25 15:14:40 +00:00
Edward Paget
08f7daa02a fix: reject dictionary locales not defined by mb (#60955)
If a locale is not defined for metabase we should not allow
content-translation dictionaries to uploaded with it. Since these
locales can't be used anyway it results in a confusing user experience.
2025-07-25 15:04:23 +00:00
Oisin Coveney
f2b8b44d48 Convert index.js/jsx to index.ts/tsx (#61373) 2025-07-25 14:30:19 +00:00
Phoomparin Mano
9d3ed0c9f2 Add defsetting and update embedding card in admin setting (#61292)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-25 21:01:05 +07:00
Oisin Coveney
0d14cb4aac Revert "Convert DashboardGrid to a functional component (#61364)" (#61449)
This reverts commit 647058ec89.
2025-07-25 13:56:19 +00:00
Oisin Coveney
647058ec89 Convert DashboardGrid to a functional component (#61364)
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-25 14:21:03 +03:00
Oisin Coveney
f58709dc20 Change InteractiveQuestion stories to SdkQuestion (#61445) 2025-07-25 13:52:36 +03:00
Phoomparin Mano
457cde39db Show simple embedding legal disclaimer and auto-enable embedding (#61375)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-07-25 17:51:45 +07:00
github-automation-metabase
3b028ee825 Bump net.snowflake/snowflake-jdbc-thin from 3.24.2 to 3.25.1 (#60910)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-25 09:14:46 +00:00
Fraser
c22ec1ebbd Remove waits from map e2e test (#61395) 2025-07-25 08:21:41 +12:00
Luis Paolini
d46d9d4dc9 Allow a width param for preview_png exporting (#61348)
* Allow a width param for exporting

* Fix linter
2025-07-24 17:20:25 -03:00
Jeff Bruemmer
08cd4c5d37 docs - user-generated content translation (#61102) 2025-07-24 18:48:15 +00:00
Tyler Plude
99a91de1b4 VIZ-1202 - Visualizer compatibility BE search filters (#60912)
* Populate search index col of non temporal dimension ids using clojure fn

* Add non_temporal_dim_ids filter param to search request

* fix kondo

* Add stub impl of new filter to in-place

* Add metadata provider cache

* Adding has-temporal-dim filter; fix tests

* fix lint

* Fix merge

* Hookup frontend to proper BE search filters; remove deprecated impl of has-temporal-dimensions

* Fix kondo

* Fix lingering refs to has-temporal-dimensions

* Fix lingering refs to has-temporal-dimensions

* fix test

* Fix test

* Remove FE compatibility code that was ported to BE; fix typing of partition helper

* Add helper for parsing non-temporal-dim-ids endpoint param; fix the conditional in FE

* remove debug let

* Add pr ref to comment

* Include dimension filter params in request only if cartesian

* remove specs that depended on checkDimensionCompatibilityForCartesianCharts

* PR feedback

* use existing dataset query transform

* Optimized 1 images, saved 76.0 KB (48.2% smaller)

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-24 11:38:54 -07:00
dpsutton
2fcd6ed374 handle strings rather than empty strings (#61426)
sqlserver returns columns with empty strings. not bad. just handle it
2025-07-24 13:38:35 -05:00
github-automation-metabase
680b24023c Bump com.taoensso/nippy from 3.5.0 to 3.6.0 (#59907)
Inspect dependency changes here: https://github.com/taoensso/nippy/blob/v3.6.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-24 18:10:22 +00:00
Jakub Chodorowicz
67aeb818ab Feature/smoother upgrade flow for customers (#61007)
* Prg-81-implement-logic-for-opening-store-and-receiving-messages (#60702)

* Add new self hosted upsell flow path

* Add upsell flow hook

* Add company name to params passed to store

* Update url parameters to snake case

* Remove redundant ampersand

* Clean up useEffect dependencies

* Add store origin to token activation message

* Improve put token mock

* Snake case return_url param

* Update messages' types

* Add source check on event

* Use dynamic store value (#60865)

* Create selector for store url

* Use dynamic store value in use upsell flow

* Improve store url selector

* Create useStoreUrl hook and deprecate getStoreUrl selector

* Increase the timeout of toast messages (#60966)

* increase the timeout of toast messages

* Send notification even if reference to store window was lost

* Add metabase window name (#60964)

* Prg-91-migrate-upsell-components-to-support-ee-upsell-flow (#60850)

* Enhance upsell functionality by adding onClick support to UpsellBanner and integrating useUpsellFlow in admin settings

Fix function name

* Use match pattern in UpsellBanner

* Add Upsell baner with click stories and tests

* Add upsell flow to dev instances banner

* Integrate upsell flow into UpsellBanner components

* Fix unrelated tests

* Improve the test assertion

* Prg-95-migrate-upsellcard-to-the-new-upsell-flow (#60989)

* Add onClock to UpsellCard component

* Migrate UpsellCard components to use self hosted upsell flow

* Disable new flow in dev instances upsell (#61048)

* Allow overriding store-url in dev env (#60967)

* Fix upsell flow with undefined store variable (#61056)

* Show failure toast even if connection with store was lost

* Add store-url to e2e default db setup

* Allow undefined store-url value in use upsell flow

* Fix failing unit tests

* Prg 96 migrate upsellbigcard to the new upsell flow (#61063)

* Migrace BigCard to use onClick

* Migrate BigCard upsells

* Add onClick to UpsellPill (#61076)

* Prg-104-run-the-new-upsell-flow-only-for-self-hosted-mb-instances (#61122)

* Disable new upsell flow on hosted instances

* Fix wrong match on UpsellBigCard

* Use getIsHosted selector

add test

* Fix e2e test - selecting upsell button

* Fix extra toast triggered with new upsells

* Add upsell flow to embedding ugprade link, remove binary notice from EE self serve (#61207)

* Fix typos

* Use existing link styles
2025-07-24 20:09:14 +02:00
Cam Saul
f197cbb591 lib/order-by should ignore duplicates (QUE-1604) (#61402) 2025-07-24 10:47:35 -07:00
bryan
85e8bcbc3d add CLA-passing email and name for bump commit (#61277) 2025-07-24 11:37:16 -06:00
bryan
50d9b94ccb run only when the Type:Documentation label set (#61427) 2025-07-24 17:25:20 +00:00
Phoomparin Mano
aa7ced174f feat(sdk): do not show "New Question" as fallback for new question (#61015) 2025-07-25 00:10:38 +07:00
bryan
7de1211bab mage -escherize-pr-summary (#61352) 2025-07-24 09:53:22 -07:00
Phoomparin Mano
fd5a433265 fix(sdk): hide the "back to previous results" button in questions (#61018) 2025-07-24 23:48:46 +07:00
Cam Saul
1bd2398307 Fix conversion of joins with :fields in last stage to legacy (QUE-1603) (#61401) 2025-07-24 09:08:59 -07:00
Nicolò Maria Mezzopera
2dc4715824 chore: Refactor sync wait times to use a constant for delay and adjus… (#61415)
* chore: Refactor sync wait times to use a constant for delay and adjust retry limits

* Update e2e/support/helpers/e2e-qa-databases-helpers.js
2025-07-24 14:38:32 +00:00
Edward Paget
e07751fe9e fix: flake dashboard card test (#60146) 2025-07-24 14:23:48 +00:00
Edward Paget
3cde309b3c fix: make test not parallel to avoid flake (#61327) 2025-07-24 09:05:00 -05:00
Kamil Mielnik
a1a437bd26 SEM-526 Filtering preview crashes when table is hidden (#61265)
* Fix crash

* Add test

* Update comment
2025-07-24 13:42:45 +00:00
Kamil Mielnik
59d8776683 SEM-362 Table picker should render anchor elements (#61272)
* Fix tags invalidation for bulk tables update

* Add MassTableVisibilityToggle

* Render mass toggle for schemas

* Add the button for dbs
- fix not-currently-selected branches in the tree not updating

* Fix types

* Align icon

* Align chevron icon

* Always show the toggle button for hidden tables

* Change color of hidden tables

* Only use ids of relevant tables

* Add tests

* Add test

* Take all visibility options into account

* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle

* Fix color

* Render table picker items as anchors

* Remove measuring elements as elements have constant size

* Fix types and tests

* Add test
2025-07-24 20:06:33 +07:00
github-automation-metabase
f5e92dbce9 Bump org.apache.commons/commons-lang3 from 3.17.0 to 3.18.0 (#60901)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-24 15:30:04 +03:00
Oisin Coveney
fea73a4f5c Rename InteractiveQuestion symbols to SdkQuestion (#61213) 2025-07-24 12:07:08 +00:00
Uladzimir Havenchyk
3a7474eadc Revert "drop typescript-plugin-css-modules with stylus dependency to unblock …" (#61391)
This reverts commit 8a4c87a136.
2025-07-24 10:56:11 +00:00
Timofey Kachalov
967745c312 Adjust API docs sort order respecting the kind (#61407) 2025-07-24 13:17:15 +04:00
Cam Saul
0cf80c77f2 [Lib] Finish removing idents (#61310)
* [Lib] Finish removing idents

* Fix Kondo warnings

* cljfmt

* Another pass at fixing Kondo warnings

* Test fix 🔧

* Test fix 🔧

* Test fixes 🔧

* A few more fixes 🔧

* Another pass

* Test fix 🔧

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧
2025-07-23 19:17:23 -07:00
Gustavo Saiani
09e2ee40e7 Update links (#61356) 2025-07-23 20:21:06 -03:00
Fraser
994e2ff647 Translate boolean content (#61366) 2025-07-24 10:32:21 +12:00
Fraser
afabd18f56 Add CLAUDE.md and copilot-instructions.md (#61313)
* Add CLAUDE.md and copilot-instructions.md
2025-07-24 10:32:08 +12:00
github-automation-metabase
a5e13bedd8 Bump org.postgresql/postgresql from 42.7.5 to 42.7.7 (#59518)
Inspect dependency changes here: https://github.com/pgjdbc/pgjdbc/blob/REL42.7.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-23 21:23:40 +00:00
bryan
5085f8ee19 rewrite clj-kondo/ignore for consistency (#61372) 2025-07-23 14:59:39 -06:00
Phoomparin Mano
341e81611e Migrate the new embed flow's snippets to use custom elements (#61330) 2025-07-23 20:38:46 +00:00
github-automation-metabase
22ddd2cba8 Bump djblue/portal from 0.59.1 to 0.59.2 (#61246)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.59.2/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 14:27:31 -06:00
bryan
3df17fd3a8 Add custom and default responses to openapi docs (#61339) 2025-07-23 13:39:29 -06:00
bryan
c3dbced191 [github actions] skip pngs optimize for merges (#61378) 2025-07-23 13:26:35 -06:00
dpsutton
8e836010fb Extra logging for temp storage (#61342)
Suspecting that instances OOM due to loading these into
memory. Increasing context and logging to help diagnose this:

When running tests:

```
clj -X:dev:test :only '["test/metabase/notification" "test/metabase/pulse"]'
...
DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 57167}
[main] DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 718167}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
```

Adding an optional preamble that is just `pr-str`'d and logging a human
readable size of the file that is saved
2025-07-23 14:26:17 -05:00
Jeff Bruemmer
634c7942cd docs - join expressions (#61376) 2025-07-23 19:20:46 +00:00
Alex Yarosh
5cdf070465 Update impersonation.md (#61380) 2025-07-23 15:15:46 -04:00
Cam Saul
f1c7740a45 add-dimension-projections middleware => Lib (#61349)
* add-dimension-projections middleware => Lib (#39877)

* Ban mt/with-column-remappings inside QP tests

* Update pivot QP code to not convert to legacy

* Rename middleware

* Use the remap metadata provider in sandboxing tests
2025-07-23 09:59:33 -07:00
github-automation-metabase
df80eb95b6 Bump commons-validator/commons-validator from 1.9.0 to 1.10.0 (#60899)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 16:40:36 +00:00
github-automation-metabase
a525192b0b Bump org.apache.logging.log4j/log4j-jcl from 2.24.3 to 2.25.1 (#60905)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 10:30:34 -06:00
Ryan Laurie
07f1e62fae correct ci skip label check (#61370) 2025-07-23 16:13:48 +00:00
Anton Kulyk
b614b303ea Fix sorting dashboard header filters (#61220) 2025-07-23 15:56:14 +01:00
Nicolò Pretto
739e461866 skip assigning milestones to embed sdk PRs, closes EMB-658 (#61361) 2025-07-23 15:43:53 +02:00
Nicolò Maria Mezzopera
cd987d88a7 feat: await for async setup function (#61365) 2025-07-23 14:11:05 +02:00
Uladzimir Havenchyk
8a4c87a136 drop typescript-plugin-css-modules with stylus dependency to unblock builds (#61362) 2025-07-23 10:36:38 +01:00
Nicolò Pretto
f3953111ce fix unknown prop handleAxis on SdkIframeEmbedSetup (#61335) 2025-07-23 07:55:13 +00:00
Kamil Mielnik
d1345439f9 Remove unused functions (#61320)
* Remove fetchRealDatabasesWithMetadata

* Remove fetchTables

* Remove useActionListQuery
2025-07-23 14:00:08 +07:00
Sébastien
73b8863eb6 Closes VIZ-703 formatting of time values is incorrect (#61195) 2025-07-23 05:28:07 +02:00
Aleksandr Lesnenko
783d3ceca4 update parameters UI (#60746)
* update parameter styles, keep only one variant

* review

* specs

* Update Loki Snapshots

* lint

* tweak ui

* Update Loki Snapshots

* review

* fix spec

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-23 00:58:37 +00:00
bryan
6d31996556 add CLA-signed metabase automation user git config (#61350) 2025-07-22 22:54:46 +00:00
github-automation-metabase
f3f462d9cc Bump org.jsoup/jsoup from 1.20.1 to 1.21.1 (#60249)
Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.21.1/CHANGES.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-22 16:47:10 -06:00
Jeff Bruemmer
1f0b41a30b add upgrade guide for SDK (#61031) 2025-07-22 20:18:57 +00:00
github-automation-metabase
1880b20c34 Bump com.amazonaws/aws-java-sdk-core from 1.12.785 to 1.12.788 (#61252)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-22 13:41:26 -05:00
Jeff Bruemmer
37cfdcfd3e docs - script to generate country codes table. (#61329)
* script to generate country codes

* link
2025-07-22 16:03:56 +00:00
Brad Anderson
a7ecc9e669 Closes VIZ-1311 - Slow loading dashcards with no average query duration shows 0 (#61035)
Tweaks slow-loading hover cards
2025-07-22 12:03:44 -04:00
Ryan Laurie
fda455fabc Enable CI skipping on PRs (#61307)
* dont run tests on pr with ci skip

* static viz too

* label instead of title
2025-07-22 09:47:26 -06:00
Sébastien
5d5f73f403 Closes VIZ-46 number formatting for remapped columns (#61201) 2025-07-22 17:35:54 +02:00
Sloan Sparger
7304c050ab [Metabot] Ensure state is saved on streamed responses (#61282) 2025-07-22 09:58:20 -05:00
github-actions[bot]
e8dee796db Update translations 2025-07-22 (#61314)
* Update translation sources 2025-07-22

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-07-22 14:55:23 +00:00
eliotmetabase
3e605c6d87 Update uberjar.yml to remove unused branches (#61306)
Remove branches that no longer exist from uberjar workflow to clean it up a bit
2025-07-22 09:00:23 -05:00
Brad Anderson
1fc73ccc47 Closes VIZ-1318 - Visualize in another way uses the Card Definition rather than the Dashboard Card (#61230)
Changes how the bug is fixed from trying to send parameters to using dataset fallbacks if a query fails
2025-07-22 09:29:14 -04:00
Ngoc Khuat
3441035d2d port the condition expression to master (#61045) 2025-07-22 09:57:12 +00:00
Oleksandr Solovyov
d530b9a45c hashp without stdout redirect (#61315) 2025-07-22 09:30:50 +00:00
github-automation-metabase
5be18b9afd Bump hiccup/hiccup from 1.0.5 to 2.0.0 (#59908)
Inspect dependency changes here: https://github.com/weavejester/hiccup/blob/2.0.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-22 07:45:53 +00:00
Fraser
0a61f6688f Move Content Translation settings and tweak copy (#61039) 2025-07-22 14:27:21 +12:00
Tyler Plude
6421b4187e Add tsplude to metabot team (#61286) 2025-07-21 17:45:15 -07:00
Cam Saul
40ce015882 Overhaul add-implicit-joins, fix/consolidate metadata normalization and other issues (#61168)
* Overhaul add-implicit-joins middleware

* Restore the wacko metadata updating code

* Ok, joins ARE allowed to have :fields.

* Fix JS tests 🔧

* Fix QUE-1563

* Test fixes 🔧

* Fix 100 more broken things

* Test fixes

* Use same distinct-ref logic as lib

* More test fixes 🔧

* Make add-alias-info better at matching things

* Consolidate the legacy result metadata schemas

* cljfmt

* Use `:decode/normalize` in the REST API for boring things like metadata

* Another round of test fixes 🔧

* Restore kondo ignore

* Another round of test fixes 🔧

* cljfmt

* PR feedback 🔧
2025-07-21 13:54:28 -07:00
github-automation-metabase
b7d02f7d6c Bump commons-io/commons-io from 2.19.0 to 2.20.0 (#61245)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-21 19:30:06 +00:00
Chris Truter
bf0624f700 Lint against incorrect time elapsed measurements (#61169) 2025-07-21 17:36:46 +00:00
Nicolò Maria Mezzopera
9f823bd747 chore: remove cy.wait in favour of waiting for element presence (#61226)
* chore: remove wait in favour of waiting for modal to disappear

* feat: wait for query to be completed to possibly avoid DB race condition

* feat: wait for the table name to be shown in the ui before clicking it

* chore: removed un-needed waits

* Update e2e/test/scenarios/admin/admin-reproductions.cy.spec.js

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-07-21 17:26:39 +00:00
Aleksandr Lesnenko
f881594d61 fix timeline events merging logic (#61239) 2025-07-21 13:02:29 -04:00
Romeo Van Snick
8401e8715d Disable :case and :coalesce type-compatibility checks (#61279)
* Disable :case and :coalesce type-compatibility checks

* Skip test
2025-07-21 16:56:26 +00:00
Jakub Chodorowicz
1cd2a7dafe Fix flaky SettingsPage test (#61009)
* Fix flaky SettingsPage test

* Use role selector
2025-07-21 17:44:14 +02:00
Romeo Van Snick
cd77efaf80 Relocate expressions code (#61120)
* Move expression widget into subfolder

* Import expression components from top-level

* Move expression helpers to metabase/querying/expressions

* Fix fuzzing paths

* Fix comment

* Add missing exports from expressions

* Remove unused exports

* Sort exports

* Add helper to get supported clauses

* Rename complete to suggestions for consistency

* Move tokenAtPos to position module

* Move assertion helpers to utils

* Split up pratt/types

* Use token text instead of slicing source

* Remove superflouous from and to on token

* Remove superflouous from, to and len on token

* Remove content helper

* Remove superflous fields on Token

* Rename compiler to compile-expression

* Fix imports

* Fix exports

* Remove eslint directives

* Move FK_SYMBOL to formatting/constants

* Use () => undefined instead of jest.fn
2025-07-21 17:35:57 +02:00
Brad Anderson
e50e3ddad8 VIZ-1287 Adds pressed state for visualizer Settings button (#61101) 2025-07-21 11:25:40 -04:00
Alexander Polyankin
b6174a8a0c Make Booleans work without Category (#61202) 2025-07-21 15:10:24 +00:00
github-actions[bot]
4956974743 Update translations 2025-07-17 (#61144)
* Update translation sources 2025-07-17

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jacob Joseph <likeshumidity@users.noreply.github.com>
2025-07-21 14:49:44 +00:00
Sébastien
2c2863cb9d Update team.json (#61254) 2025-07-21 16:32:54 +02:00
Kamil Mielnik
1e22b1971c SEM-505 The Preview button should be more noticeable and accessible (#61260)
* Move buttons into the sticky container, make preview button always present

* Update tests

* Make the preview button toggle the state
2025-07-21 21:19:45 +07:00
Rodrigo López Dato
0ff7a8887c Fix "Docker Hub" capitalization (#61268) 2025-07-21 11:03:48 -03:00
Kamil Mielnik
4e04711a2d Mass hide/unhide tables (#61206)
* Fix tags invalidation for bulk tables update

* Add MassTableVisibilityToggle

* Render mass toggle for schemas

* Add the button for dbs
- fix not-currently-selected branches in the tree not updating

* Fix types

* Align icon

* Align chevron icon

* Always show the toggle button for hidden tables

* Change color of hidden tables

* Only use ids of relevant tables

* Add tests

* Add test

* Take all visibility options into account

* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle
2025-07-21 13:56:15 +00:00
Romeo Van Snick
f38a0f6769 Allow supression of case and coalesce arg typechecks (#61264)
* Allow supression of case and coalesce arg typechecks

* Add test for ignored type-check

* Configure *suppress-expression-type-check?* in tests

* Fix formatting
2025-07-21 15:44:39 +02:00
Oisin Coveney
7e1ab4e2c7 Make sure that user plugin dashcard menu has priority over default menu (#61262) 2025-07-21 15:56:02 +03:00
Oisin Coveney
13d4abff0b Fix dashboard loading state for empty dashboards (#61052) 2025-07-21 14:46:30 +03:00
Ngoc Khuat
f1f175e4e5 Reversion the migration to fix v_alerts from 56 to 55 (#61161) 2025-07-21 12:42:36 +02:00
Nicolò Pretto
f4ac64fd80 Hide sample database mentions in <DatabaseForm> in the embedding setup (#61067)
* refactor DatabaseForm to fix unwanted changes to the embedding setup

* text-secondary

* clean up types
2025-07-21 11:00:05 +02:00
Kamil Mielnik
ff7eb5f1f5 SEM-497 Filtering preview inputs get auto-focused (#61190)
* Add autoFocus prop to filter components

* Disable autoFocus in preview

* Update unit tests

* Add test
2025-07-21 14:23:18 +07:00
Fraser
b241401b2d Fix Cloud SMTP Connection Card styling (#61115) 2025-07-21 09:41:31 +12:00
William
fea9b59511 Allow field filters and time groupings to specify an alias (#61118)
As is, field filters and time groupings assume that they can just refer to the field normally.  In queries where aliases are
used/required, this doesn't work so well.  Letting users specify the alias to use in place of the normal field
reference handles this case.

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-07-18 14:34:41 -05:00
Sloan Sparger
0374a8ac42 [Metabot] Improve loading experience logic (#61173)
* improve loading experience logic and fix bug where there are tool calls without messages causing messages to get cramed together with no space

* add a unit test
2025-07-18 14:03:46 -05:00
Aleksandr Lesnenko
d43c0a418b Fix visualizer cards crash due to inability to find the x-axis dimension column (#61180)
* fix visualizer cards crash

* reapply metabase#60892

* spec
2025-07-18 14:37:43 -04:00
Nick Fitzpatrick
d3435af399 Change styling for Home Help Component (#60180)
* Updating HomeHelpCard

* remove duplicated style
2025-07-18 15:02:22 -03:00
Alexander Polyankin
43ff1d6a13 Multiple values for native query parameters (#60984) 2025-07-18 17:45:33 +00:00
Nicolò Pretto
c4aca6545e fix(sdk): when starting from an entity id dashboard, use the numeric id (#61188)
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-18 22:18:52 +07:00
Uladzimir Havenchyk
f7288acbfe test: ensure popover contains delete permanently in trash (#61199) 2025-07-18 17:46:45 +03:00
Nicola Mometto
c57656fbfa Bigquery nested fields fix (#61193)
* scope by table-name

* add test
2025-07-18 15:09:44 +01:00
bryan
f24a7fdc18 crush every docs png in the repo (#61172) 2025-07-18 13:51:57 +00:00
Alberto Perdomo
22e6fd8d57 Update SDK NPM link in docs (#61192) 2025-07-18 15:17:13 +02:00
Nick Fitzpatrick
52d9ba6670 adjusting layout for <Tab.Tab> and <Button> components (#60992)
* adjusting layout for <Tab.Tab> and <Button> components

* update UserListElement
2025-07-18 09:55:36 -03:00
Uladzimir Havenchyk
0c2dddf2bc test: fix another flakiness in model re-mapping test (#61186) 2025-07-18 15:37:00 +03:00
Kamil Mielnik
aa691b0888 SEM-501 Add warning when multiple Entity Name field semantic types exist on the same table (#61148)
* Add warning

* Show prefixes

* Add test
2025-07-18 12:07:58 +02:00
Anton Kulyk
037cd61c9e Allow "focusing" a recently moved dashboard filter (#61085)
* Add `extraAction` prop to `undo` object

* Make `setEditingParameter` switch tab if needed

* Put a dashboard filter in the viewport

* Fix toast text appearance

* Hide "Show filter" button when moving to top nav

* Add e2e test

* Fix tests
2025-07-18 10:57:48 +01:00
Kamil Mielnik
5e08c9e9e1 SEM-390 Change copy of "Duration" to "Reset to defaults after" for log level customization (#61183)
* Update copy

* Update copy

* Bring back non-numeric prefix

* Reduce flickering (thanks @romeovs)

* Fix test
2025-07-18 16:42:34 +07:00
Oisin Coveney
2568336e90 Make ArchivedEntityBanner a context component (#60939) 2025-07-18 10:40:10 +03:00
Uladzimir Havenchyk
0ba623e4ba test: fix flakiness in model mapping test (#61146) 2025-07-18 10:39:14 +03:00
Vamsi Peri
4ff56367f9 Fix transparent background for SQL editor autocomplete suggestions (#61178)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-17 21:43:47 -04:00
Tyler Plude
c1484f5f57 Sort currency options by name not code (#60794)
* fix currency sort order in settings dropdown

* Preserve priority currency order; apply sort helper to other currency select inputs

* currency.js -> currency.ts

* move sort to cljc; revert FE changes

* rm unnecessary comment
2025-07-17 18:15:46 -07:00
Aleksandr Lesnenko
59193a2267 sort parameters in subscription sidebar (#61119) 2025-07-17 20:28:23 -04:00
Sloan Sparger
fb99cfcdc6 [Metabot] Fix horizontal scrollbar when response contains code (#61174) 2025-07-17 18:57:26 -05:00
Aleksandr Lesnenko
cfb3d5ad2e improve getParameterMappingOptions (#61113) 2025-07-17 19:43:49 -04:00
Tyler Plude
9eb27dc5c9 VIZ-1281 - Fix include-current for dashboard parameters (#60890)
* Pass parameter format options to lib

* pr feedback
2025-07-17 15:51:13 -07:00
dpsutton
9753a8a64d Ensure postgres downloads don't OOM (#60807)
* Ensure postgres downloads don't OOM

Fixes https://github.com/metabase/metabase/issues/60733

For performance reasons we set autocommit to true. this has an
unfortunate consequence that the postgres driver does not honor batch
sizes. We go through a lot of trouble to hook the streaming results of a
query to the output stream of the download, but the postgres jdbc driver
will realize all rows in memory.

A fast way forward is to set autocommit to false only when
`write?` (previous condition) or when executing a postgres download, as
reported in https://github.com/metabase/metabase/issues/60733.

How to test:
this is difficult. In CI we use

```clojure
  :ci
  {:jvm-opts ["-Xmx12g"
              "-Xms12g"
```

So hitting a query that would deterministically OOM the instance
requires a lot more muscle than we realistically want to use.

I'm running the following tests locally:

```
  :small-ram
  {:jvm-opts ["-Xmx400m"
              "-Xms400m"
              "-Dci=TRUE"]}
```

```clojure
(defn- readable [bytes]
  (cond (nil? bytes)  "0 bytes"
        (zero? bytes) "0 bytes"
        :else
        (let [units ["b" "kb" "mb" "gb" "tb"]
              magnitude   1024.0]
          (loop [[unit & remaining] units
                current (double bytes)]
            (if (and (seq remaining) (> current magnitude))
              (recur remaining (/ current magnitude))
              (format "%.1f %s" current unit))))))

(defn- consume
  [^java.io.InputStream is]
  (let [arr (byte-array 8024)]
    (loop [c 0, gas 5000000]
      (let [r (java.io.InputStream/.read is arr 0 (alength arr))]
        (cond (zero? gas)
              (throw (ex-info "Ran out of gas" {}))
              (neg? r) c
              :else (recur (+ c r) (dec gas)))))))

(deftest large-csv-test
  (mt/test-driver :postgres
    (testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
      (let [large-query "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
            result (mt/user-real-request :crowberto :post 200 "dataset/csv"
                                         {:request-options {:as :stream}}
                                         {:query       (mt/native-query
                                                        {:query large-query})
                                          :format_rows true})
            size (consume result)]
        (is (> size 2000000000)
            (format "Only consumed %s but expected ~2gb" (readable size)))))))
```

and then

```
❯ time source pg.env && DRIVERS=postgres clojure -X:dev:test:small-ram :only metabase.driver.postgres-test/large-csv-test

Running QP tests against these drivers: #{:postgres}

LONG TEST in metabase.driver.postgres-test/large-csv-test
Test took 23.358 seconds seconds to run

Ran 1 tests in 32.825 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 32825.099875, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 40.7 s.
All tests passed.
Running after-run hooks...
```

Why not add these tests now?
We probably should write a full memory regression suite. This is a great
candidate for a first one. But it seems silly to run a new CI job with
just this one job. Push back if you think i'm wrong.

Another area of pushback:
I took the lazy way when determining if a driver should have autocommit
set to false or not: i hardcoded it.

```clojure
(and (-> options :download?) (= driver :postgres))
```

The alternative is some method of a new driver multimethod or
driver-supports?. The former feels a bit heavy-weight, the latter feels
not quite right since this is almost a non-support and all other jdbc
drivers do support it, presumably?

I'm quite open to pushback here and invite comments if you see a better way.

* Can't use an if for write?

You'd think you can use an if here but the previous code used a when and
is silent on write?. Lots of tests fail relating to datasets in test
setup and uploads. Don't want to debug that in this bug fix context so
leaving a todo

* remove old arity metadata. thanks eastwood!

* Don't set autoCommit for all postgres and descendant drivers

```clojure
(ns ^:mb/memory metabase.memory.csv-test
  (:require
   [clojure.test :refer :all]
   [metabase.test :as mt]
   [metabase.driver :as driver]))

(set! *warn-on-reflection* true)

(defn- readable [bytes]
  (cond (nil? bytes)  "0 bytes"
        (zero? bytes) "0 bytes"
        :else
        (let [units ["b" "kb" "mb" "gb" "tb"]
              magnitude   1024.0]
          (loop [[unit & remaining] units
                 current (double bytes)]
            (if (and (seq remaining) (> current magnitude))
              (recur remaining (/ current magnitude))
              (format "%.1f %s" current unit))))))

(defn- consume
  [^java.io.InputStream is]
  (let [arr (byte-array 8024)]
    (loop [c 0, gas 5000000]
      (let [r (java.io.InputStream/.read is arr 0 (alength arr))]
        (cond (zero? gas)
              (throw (ex-info "Ran out of gas" {}))
              (neg? r) c
              :else (recur (+ c r) (dec gas)))))))

(def driver->query
  {:sqlite "WITH RECURSIVE generate_series(value) AS (
  SELECT 1
  UNION ALL
  SELECT value + 1 FROM generate_series WHERE value + 1 <= 1000000
)
SELECT replace(hex(zeroblob(1024)), '00', 'xx') FROM generate_series;"
   :postgres "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
   :clickhouse "SELECT repeat('x', 2048)
FROM system.numbers
LIMIT 1000000;"
   :redshift "WITH series AS (
  SELECT ROW_NUMBER() OVER () as i
  FROM stl_scan s1, stl_scan s2
  LIMIT 1000000
)
SELECT REPEAT('x', 2048) FROM series;"})

(deftest large-csv-test
  (mt/test-drivers #{:postgres :sqlite :clickhouse :redshift}
    (testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
      (let [large-query (or (driver->query driver/*driver*)
                            (throw (ex-info "Driver doesn't implement big query"
                                            {:driver driver/*driver*
                                             :available (keys driver->query)})))
            result (mt/user-real-request :crowberto :post 200 "dataset/csv"
                                         {:request-options {:as :stream}}
                                         {:query       (mt/native-query
                                                        {:query large-query})
                                          :format_rows true})
            size (consume result)]
        (is (> size 2000000000)
            (format "Only consumed %s but expected ~2gb" (readable size)))))))

(comment
  (mt/set-test-drivers! #{:postgres})
  (mt/set-test-drivers! #{:sqlite})
  (mt/set-test-drivers! #{:clickhouse})
  (mt/set-test-drivers! #{:redshift})
  (mt/test-drivers #{:redshift}
    (mt/db))

  )

```

Verify this with

```
  :small-ram
  {:jvm-opts ["-Xmx400m"
              "-Xms400m"
              "-Dci=TRUE"]}
```

and then

```
;; driver.env:
;; local clickhouse
export MB_CLICKHOUSE_TEST_password="password"
export MB_CLICKHOUSE_TEST_username="default"

;; local postgres
export MB_POSTGRESQL_TEST_USER=dan

export MB_REDSHIFT_TEST_PASSWORD=<value>
export MB_REDSHIFT_TEST_USER=<value>
export MB_REDSHIFT_TEST_DB=<value>
export MB_REDSHIFT_TEST_HOST=<value>
```

and then running:

```
❯ source driver.env && DRIVERS=redshift clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running tests in metabase.memory.csv-test/large-csv-test
Finding tests took 8.3 s.
Running 1 tests
Running before-run hooks...
Running QP tests against these drivers: #{:redshift}
..
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 188.320 seconds seconds to run

Ran 1 tests in 188.338 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 188337.678584, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 3.3 mins.
All tests passed.
Running after-run hooks...
```

redshift takes a while.

contrast with

```
❯ source driver.env && DRIVERS=clickhouse,postgres clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running QP tests against these drivers: #{:postgres :clickhouse}
...
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 46.638 seconds seconds to run

Ran 1 tests in 46.655 seconds
4 assertions, 0 failures, 0 errors.
{:test 1, :pass 4, :fail 0, :error 0, :type :summary, :duration 46655.436333, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 56.5 s.
All tests passed.
Running after-run hooks...
```

both running locally happen in ~1 minute compared to 3 minutes for redshift

* Remove commented out old arity

this funciton used to have two arities for clarity. But it wasn't
another entrypoint, it was just trying to keep things a bit cleaner. But
the result is that at the point where we used the string sql query we
didn't have the `info` map in lexical scope. Fixing this across arities
would have pushed us into 7 positional args, so you might want to switch
to a map, but honestly, it's just the same function.
2025-07-17 17:06:12 -05:00
Cam Saul
ea6a639b63 [Lib] Remove idents part 4 (#61149)
* [Lib] Remove idents part 4

* Kondo
2025-07-17 14:38:30 -07:00
bryan
2454ab7188 Mage Token Git Precommit Scanner (#60729)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-17 12:41:22 -06:00
Uladzimir Havenchyk
517f98bf5c test: fix flakiness in visualizer test (#61104) 2025-07-17 20:19:24 +03:00
Kamil Mielnik
0e75b6bbac SEM-463 Responsive buttons (#60928)
* Add ResponsiveButton component

* Prevent focus state being cut off

* Make the buttons responsive in the table section

* Make the buttons responsive in field section

* Extract useResponsiveButtons

* Add comments

* Extract useResponsiveButtons in FieldSection

* Add aria-label to the button

* Add tests

* Test tooltips

* Fix indent
2025-07-17 17:17:44 +00:00
Timofey Kachalov
82bad2ee19 Fix positioning of the Mantine Modal in SDK (#60917) 2025-07-17 20:54:03 +04:00
Phoomparin Mano
87afb2783f Reduce flakiness in new iframe embed locale test (#60973) 2025-07-17 23:33:03 +07:00
Anton Kulyk
ca73c4406e Add dashboard_filter_moved analytics event (#61084)
* Add `dashboard_filter_moved` analytics event

* Update event
2025-07-17 17:17:49 +01:00
Kamil Mielnik
e0e25ed230 Fix SEM-499 (#61131) 2025-07-17 23:11:57 +07:00
Cam Saul
2505c039bf [Lib] remove 'idents' part 3 (#60875)
* [Lib] remove 'idents' part 1

* [Lib] remove idents part 2

* [Lib] remove idents part 3

* Update tests

* Remove ident-related tests for Cards

* Remove more ident tests

* Remove more ident-related tests

* Fix Kondo warnings
2025-07-17 08:10:14 -07:00
Jeff Bruemmer
f2ce68cd98 Update saml-google.md (#61137) 2025-07-17 10:58:59 -04:00
Sloan Sparger
dc5ed72564 [Metabot] Add new teammates to Team Metabot (#61143) 2025-07-17 09:53:08 -05:00
Anton Kulyk
58717801ec Add "Move filter" menu (#60784)
* Add "move filter" menu

* Add undo

* Handle single tab dashboards

* Update text color for checked items

* Fix collapsed menu appearance

* Add tests

* Fix error when a tab doesn't have any dashcards

* Fix "Top of page" option selected color

* Use "card.title" viz setting

* Truncate long card titles

* Update "Disconnect from cards" button appearance

* Fix type error

* Make the select searchable, touch up on appearance

* Fix e2e test

* Add `moveDashboardFilter` helper

* Fix e2e test name

* Remove subtitles

* Update icon color

* Update icon color
2025-07-17 15:49:22 +01:00
bryan
92d757b132 Mage jar-download custom dir fix (#61138) 2025-07-17 14:48:37 +00:00
Nicolò Pretto
ff702a180c skip sdk compat tests as they're failing (#61136)
* skip sdk compat tests as they're failing

* make the yml pass validation
2025-07-17 14:35:22 +00:00
Phoomparin Mano
878fc256b6 Do not update new iframe embed flow preview if the same resource is chosen (#61014) 2025-07-17 20:41:16 +07:00
Alexander Polyankin
edfb5fe39c Make temporal unit variables work like regular variables (#60995) 2025-07-17 09:32:36 -04:00
Kamil Mielnik
d626289c81 SEM-512 It would be great if all toasts in Table Metadata had an Undo (#60974)
* Add undos in FieldSection

* Add undos in FormattingSection

* Add undos in MetadataSection

* Add undos in FieldItem

* Organize TableVisibilityToggle

* Add undos in BehaviorSection

* Add undos in TableSection

* Add trim()

* Never pass 2nd argument in onChange callbacks from Select

* Add undos in DataSection

* Fix SEM-499

* Add undos in RemappingPicker

* Reduce duplication

* Simplify code

* Rename

* Prevent undo loops in FieldSection

* Remove redundant param

* Refactor toasts in FieldSection

* Prevent undo loops in FormattingSection

* Prevent undo loops in MetadataSection

* Prevent undo loops in BehaviorSection

* Prevent undo loops in DataSection

* Prevent undo loops in TableSection

* Prevent undo loops in FieldItem

* Prevent undo loops in TableVisibilityToggle

* Prevent undo loops in RemappingPicker

* Reuse useMetadataToasts

* Fix types

* Fix undoing semantic type

* Update unit tests

* Update NameDescriptionInput unit tests

* Simplify argument

* Update tests, fix viz formatting inputs not respecting prop updates

* Revert "Fix SEM-499"

This reverts commit bb9f098433.

* Add more tests

* Avoid casting

* Remove redundant cast
2025-07-17 12:30:33 +00:00
Chris Truter
0adf8b5d5b Refresh Search index after loading serialized entities (#61053) 2025-07-17 12:12:33 +00:00
Oisin Coveney
9a6113cff5 Rename files, components, and types to SdkQuestion (#60996) 2025-07-17 15:12:06 +03:00
Oisin Coveney
59c1d93c76 Convert dashboard sidebar components to use dashboard context (#60715) 2025-07-17 14:56:45 +03:00
Kamil Mielnik
ff989915fb Fix flaky test (#61126) 2025-07-17 18:50:07 +07:00
Kamil Mielnik
19e9ec0cd3 SEM-503 + SEM-504 + SEM-509 + SEM-510 Micro UI/UX improvements (#60970)
* SEM-503 Add blue border to selected field

* SEM-504 Border radius of table/field name and description boxes should match that of setting cards

* SEM-509 Improve microcopy for table and field editing instructions

* SEM-510 Field descriptions could use "paragraph" text style with greater line height
2025-07-17 14:12:36 +07:00
Cam Saul
f67919695d MBQL 5 normalization should automatically add options maps (#61081) 2025-07-16 17:56:11 -07:00
Cam Saul
466f7879da [Lib] remove 'idents' part 2 (#60874)
* [Lib] remove 'idents' part 1

* [Lib] remove idents part 2

* Remove ident-related tests for Cards

* Remove more ident-related tests

* Fix Kondo warnings
2025-07-16 17:55:35 -07:00
Alexander Polyankin
bdfae3d613 Boolean variables in native queries (#60991) 2025-07-16 19:41:56 -04:00
Sloan Sparger
424bb4d19e [Metabot] Add text for search tool when being called (#61099) 2025-07-16 16:54:21 -05:00
Riley Thompson
b75ef21b91 Enable DB routing for BigQuery (#60516)
* save

* revert redshift changes

* kondo

* add ci routing var

* redshift rough work

* cleanup bigquery changes

* remove bigquery specific redefs and bindings

* add separate var for dataset

* custom routing info per driver

* update changelog

* cljfmt

* fix fe lint

* use deferred-tru

* dissoc db_routing_info for tests

* fix other tests

* fix kondo and lint

* use yaml

* fix whitespace

* change log

* kondo and eastwood

* use markdown for routing info

* remove unneeded driver method

* cleanup

* fix tests

* fix remaining test

* add fe test

* add extra info in register-lazy-loaded-driver

* address pr comment

* improve doc string

* add text-secondary color to database info markdown

* update markdown

* alphabetical order

* move db routing info from db to session properties

* FE adjustments

* dont parse extra info

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-07-16 17:20:26 -04:00
Tyler Plude
3f01f61624 VIZ-1048 - Visualizer Data Importer Improvements (#59139)
* poc

* timing logs

* Only render compatible datasets

* Build uberjar to be able to test in cloud with more data

* search index support for display

* search index support for exclude-display and has-temporal-dimensions

* fix weird filter vs index column bug

* fix temporal filter

* required ids search index filter

* fix build by removing :display from search render-terms

* adding h2 compatibility

* fixing alignment

* whitespace

* all clicks are add clicks now

* reverted labels change

* whitespace

* whitespace

* mutation -> query, load compatibles at startup

* using viz icons in dataset list

* remove exclude_display

* consolidate search endpoint

* rename display param to display_type

* allignment

* fix filter tests

* test fixes

* Closes VIZ-1185: revert "using viz icons in dataset list"

This reverts commit 7f4d177e977643f90250a5add2f946d6f35ad2a0.

* closes VIZ-1184 copy for "no results"

* closes VIZ-1183 spacing between input and results

* removed log statement

* fixed type

* fixed basics.cy.spec.ts

* fixed dashboard-questions.cy.spec.js

* fixed sharing-reproductions.cy.spec.js

* fixed snowplow-tracking.cy.spec.ts

* fixed funnels.cy.spec.ts

* fixed others

* fix import

* return new fields in results for in-place engine

* test fix

* test fix attempt

* rm backup file

* fixed more e2e tests

* fixup

* more stabilization of e2e tests

* tweak whitespace

* first attempt to fix failing postgres tests

* try a simpler approach

* closes VIZ-1227 search not triggered when no datasource is selected

* new attempt to parameterize the define-spec macro with app-db

* removing non-temporal-dimension-ids filter

* fix cljkondo

* fix test

* fixed e2e (snowplow)

* fixed e2e (funnels)

* fixed e2e (basics)

* better loading state, better typing

* reverted type change

* uncomment e2e cartesian; remove unused search param; fix bg color

* Fix query to resolve to false instead of nil

---------

Co-authored-by: Eliot Daigneault-Mestre <eliot@metabase.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-07-16 14:08:03 -07:00
metamben
4927b35f0f Stop offering expressions and aggregation being edited as columns (#61033)
* Stop offering expressions and aggregation being edited as columns

Fixes #61010

* Add repro for metabase#61010

* Add test for custom columns too

* Update expected error message in e2e test

* Detect cycles in resolver too

* Revert "Detect cycles in resolver too"

* Add e2e test for referencing custom expressions that are just wrappers

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-17 00:03:34 +03:00
Nemanja Glumac
481065bc8f Optimize writable QA DB snapshot creation process (#60898) 2025-07-16 20:47:37 +00:00
Braden Shepherdson
d10fafd538 [parameters] Use MBQL lib to query for field values from a card (#60510)
Fixes #44077. Fixes #35840.

Previously this used some custom legacy MBQL manipulation. It was
incorrect and led to a handful of bugs. Now it's a straightforward
edit of the query powered by MBQL lib.
2025-07-16 16:20:28 -04:00
Romeo Van Snick
b76a18112a Fix parameter target popover empty state (#60990)
* Add missing min-height to ParameterTargetList

* Add repro for metabase#60987

* Update list when clearing cache

* Remove minWidth

* Always disable virtualization in AccordionList

* Use Mantine Popover in DashCardCardParameterMapperButton

* Remove virtualization from AccordionList altogether

* Remove superflouous wrapper for Clause popover

* Add box sizing to dashcardmapper

* Remove withBorders prop

* Remove more unused instance properties from AccordionList

* Add repro for metabase#46767

* Add key to parameter mapping button

* Trap focus in parameter mapping popover

* Close toasts to avoid overlapping popovers

* Ignore search box in check

* Add missing tooltip

* Fix selector

* Fix selector

* Close popover when selecting value

* Revert "Remove superflouous wrapper for Clause popover"

This reverts commit 5a13c826f4.

* Use H.tooltip helper

* Use cy.trigger instead of realHover

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-16 20:43:28 +02:00
Jacob Joseph
b39cfa3b6a Update sql-parameters.md (#61096)
fixed missing double quotes
2025-07-16 18:29:41 +00:00
Riley Thompson
23eeb71330 Clear secret file memoization when DB details have changed (#60503)
* clear secret file memoization on db update

* add rsa env vars

* improve test

* add more narrow test

* improve test

* refactor snowflake private key test to create and drop user per test

* use accountadmin role

* try granting sysadmin

* try using accountadmin role

* use correct details

* throw exceptions for unimplemented methods

* clean up test code
2025-07-16 14:19:07 -04:00
Edward Paget
1e088b195a fix: don't recurse in check-block-permissions (#61078) 2025-07-16 13:09:14 -05:00
SabarigirisanSivakumarREO
5601b31019 Locale updates on LanguageStep submit (#60184) 2025-07-16 11:58:29 -06:00
SabarigirisanSivakumarREO
6c6e042e20 Update button focus styling in setup flow (#60175)
* Button focus has been updated

* fixed color usage & onlyIcon button
2025-07-16 11:58:04 -06:00
Riley Thompson
6f94207bdf Use different login and user names for sqlserver impersonation setup (#60743)
* use different login and user names for sqlserver impersonation setup

* Require role

* fix sqlserver test

* move feature supported def

* remove outdated test
2025-07-16 13:42:11 -04:00
Ryan Laurie
83178c42e9 Show Application Permission Saving Errors (#61038)
* show errors when saving permissions

* use new confirm modal
2025-07-16 17:16:34 +00:00
Ryan Laurie
366e28ab80 fix git log logic for release logs (#61012) 2025-07-16 11:04:23 -06:00
Ryan Laurie
e3a45d5996 Shard jest tests (#53638)
* shard jest tests

* dont fail fast

* remove coverage
2025-07-16 11:03:36 -06:00
Ryan Laurie
23ed37fcb3 run frontend test coverage nightly (#61077)
* run frontend test coverage nightly

* SPACE
2025-07-16 11:01:59 -06:00
Uladzimir Havenchyk
2768c95be3 test: fix flakiness in table resizing (#61064) 2025-07-16 19:30:50 +03:00
Phoomparin Mano
0b73abd44e Make new iframe embed flow's parameter placeholder text contextual (#61006) 2025-07-16 23:28:46 +07:00
Filipe Silva
1dd56e5f14 Postgres Replication to Cloud Storage (#59709)
* feat: harbormaster openapi client

* feat: pg replication backend

* feat: pg replication frontend

* ci: label for build docker job

* fix: update attached-dwh crufty tables on sync :update

Fix https://linear.app/metabase/issue/CLO-4223/mb-does-not-update-crufty-table-settings-on-config-change

* fixup: minor FE review items

* fixup: pg-replication -> database-replication

* fixup: use db driver feature in DatabaseReplicationSection

* fixup: jt link needs unique k

* fix: cache? not cache on setting
2025-07-16 11:09:01 -05:00
lbrdnk
bcd9ce522b Fix coercion overwrite (#61055)
* Fix coercion overwrite

* Adjust test
2025-07-16 17:14:17 +02:00
Uladzimir Havenchyk
87d57b5880 test: fix flakiness in dashcard resizing (#61066) 2025-07-16 18:14:04 +03:00
Nicolò Maria Mezzopera
8eec882c31 docs: add callout to driver build to the beginning of the guide (#61071) 2025-07-16 16:53:01 +02:00
Mahatthana (Kelvin) Nomsawadi
1bf726bddc feat(sdk): Create new dashboard question from EditableDashboard (#60920)
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-16 21:22:37 +07:00
Brad Anderson
75df8b0ce6 Removes blue slow-loading card border (#60998) 2025-07-16 09:37:10 -04:00
Rodrigo López Dato
788fd1922c Fix "Github" capitalization in all Markdown files (#61034) 2025-07-16 09:02:03 -04:00
Alberto Perdomo
cc23721d9c docs(sdk): add limitations around leaflet 1 (#61057)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-16 20:00:38 +07:00
Oisin Coveney
2ff890692e feat(sdk): Add withDownloads to the static question (#60976) 2025-07-16 15:46:01 +03:00
Abed Habli
8a6b842320 docs: leaf fields sync limit for MongoDB (#61011)
* adding the leaf fields limit

* updating
2025-07-16 10:00:47 +02:00
Nicolò Maria Mezzopera
c5118e2517 fix css issues in the Native Query Editor (#60929)
* feat: swap span for flex in Trigger component with chevron

* chore: use span in flex component

* feat: add small left padding to native editor action buttons

* chore: fix typo on data-testid file

* chore: force viewport to be big enough in cy test

* feat: force the test to small window and execute the drag vertically
2025-07-16 09:03:44 +02:00
Ngoc Khuat
bdc56af8e7 Simplify slack channel implementation (#60838) 2025-07-16 10:37:50 +07:00
14422 changed files with 1587681 additions and 696718 deletions

View File

@@ -0,0 +1,12 @@
Generate a CI failure report for PR $PR_NUM_OR_URL (or current branch if no argument given).
Run `./bin/mage ci-report $PR_NUM_OR_URL` to generate the report, then:
1. **Summarize the failures** - What tests failed and in which jobs?
2. **Categorize** - Are these real failures, flaky tests, or infrastructure issues?
3. **Recommend next steps**:
- If flaky: suggest rerunning with `gh run rerun <run-id> --failed -R metabase/metabase`
- If real: identify the root cause and suggest fixes
- If infrastructure: note the issue type (timeout, OOM, network)
Focus on actionable insights. If all checks are passing, confirm that briefly.

View File

@@ -0,0 +1 @@
Run mutation testing for $ARGUMENTS

View File

@@ -0,0 +1,86 @@
## Linting and Formatting
- **Lint PR:** `./bin/mage kondo-updated master` (or whatever target branch)
- Call the command one time at the beginning, record the results, then work through the problems one at a time.
- If the solution is obvious, then please apply the fix. Otherwise skip it.
- If you fix all the issues (and verify by rerunning the kondo-updated command):
- commit the change with a succinct and descriptive commit message
- **Lint File:** `./bin/mage kondo <file or files>`
- Use the linter as a way to know that you are adhering to conventions in place in the codebase
- **Lint Changes:** `./bin/mage kondo-updated HEAD`
- **Format:** `./bin/mage cljfmt-files [path]`
## Testing
- **Run a test:** `./bin/mage run-tests namespace/test-name`
- **Run all tests in a namespace:** `./bin/mage run-tests namespace`
- **Run all tests for a module:** `./bin/mage run-tests test/metabase/notification` Because the module lives in that directory.
Note: the `./bin/mage run-tests` command accepts multiple args, so you can pass
`./bin/mage run-tests namespace/test-name namespace/other-test namespace/third-test`
to run 3 tests, or
`./bin/mage run-tests test/metabase/module1 test/metabase/module2` to run 2 modules.
## Code Readability
- **Check Code Readability:** `./bin/mage -check-readable <file> [line-number]`
- Run after every change to Clojure code
- Check specific line first, then entire file if readable
## REPL Usage
> **Note:** If you have `clojure-mcp` tools available (check for tools like `clojure_eval`),
> **always prefer those over `./bin/mage -repl`**. The MCP tools provide better integration,
> richer feedback, and avoid shell escaping issues. Only use `./bin/mage -repl` as a fallback
> when clojure-mcp is not available.
- **Evaluating Clojure Code:** `./bin/mage -repl '<code>'`
- See "Sending Code to the REPL" section for more details
### Sending Code to the REPL
- Send code to the metabase process REPL using: `./bin/mage -repl '(+ 1 1)'` where `(+ 1 1)` is your Clojure code.
- See `./bin/mage -repl -h` for more details.
- If the Metabase backend is not running, you'll see an error message with instructions on how to start it.
#### Working with Files and Namespaces
1. **Load a file and call functions with fully qualified names**:
To call `your.namespace/your-function` on `arg1` and `arg2`:
```
./bin/mage -repl --namespace your.namespace '(your-function arg1 arg2)'
```
DO NOT use "require", "load-file" etc in the code string argument.
#### Understanding the Response
The `./bin/mage -repl` command returns three separate, independent outputs:
- `value`: The return value of the last expression (best for data structures)
- `stdout`: Any printed output from `println` etc. (best for messages)
- `stderr`: Any error messages (best for warnings and errors)
Example call:
```bash
./bin/mage -repl '(println "Hello, world!") '\''({0 1, 1 3, 2 0, 3 2} {0 2, 1 0, 2 3, 3 1})'
```
Example response:
```
ns: user
session: 32a35206-871c-4553-9bc9-f49491173d1c
value: ({0 1, 1 3, 2 0, 3 2} {0 2, 1 0, 2 3, 3 1})
stdout: Hello, world!
stderr:
```
For effective REPL usage:
- Return data structures as function return values
- Use `println` for human-readable messages
- Print errors to stderr

View File

@@ -0,0 +1,153 @@
# Metabase Clojure Style Guide
This guide covers Clojure and ClojureScript coding conventions for Metabase. See also: `CLOJURE_STYLE_GUIDE.adoc` for the Community Clojure Style Guide.
## Naming Conventions
**General Naming:**
- Acceptable abbreviations: `acc`, `i`, `pred`, `coll`, `n`, `s`, `k`, `f`
- Use `kebab-case` for all variables, functions, and constants
**Function Naming:**
- Pure functions should be nouns describing the value they return (e.g., `age` not `calculate-age` or `get-age`)
- Functions with side effects must end with `!`
- Don't repeat namespace alias in function names
**Destructuring:**
- Map destructuring should use kebab-case local bindings even if the map uses `snake_case` keys
## Documentation Standards
**Docstrings:**
- Every public var in `src` or `enterprise/backend/src` must have docstring
- Format using Markdown conventions
- Reference other vars with `[[other-var]]` not backticks
**Comments:**
- `TODO` format: `;; TODO (Name YYYY-MM-DD) -- description`
## Code Organization
**Visibility:**
- Make everything `^:private` unless it is used elsewhere
- Try to organize namespaces to avoid `declare` (put public functions near the end)
**Size and Structure:**
- Break up functions > 20 lines
- Lines ≤ 120 characters
- No blank non-comment lines within definition forms (except pairwise `let`/`cond`)
## Style Conventions
**Keywords and Metadata:**
- Prefer namespaced keywords for internal use: `:query-type/normal` not `:normal`
- Tag variables with `:arglists` metadata if they're functions but wouldn't otherwise have it
## Tests
**Organization:**
- Break large tests into separate `deftest` forms for logically separate test cases
- Test names should end in `-test` or `-test-<number>`
**Performance:**
- Mark pure function tests `^:parallel`
## Modules
**OSS Modules:**
- Follow `metabase.<module>.*` pattern
- Source in `src/metabase/<module>/`
**Enterprise Modules:**
- Follow `metabase-enterprise.<module>.*` pattern
- Source in `enterprise/backend/src/metabase_enterprise/<module>/`
**Module Structure:**
- REST API endpoints go in `<module>.api` or `<module>.api.*` namespaces
- Put module public API in `<module>.core` using Potemkin imports
- Put Toucan models in `<module>.models.*`
- Put settings in `<module>.settings`
- Put schemas in `<module>.schema`
**Module Linters:**
- Do not cheat module linters with `:clj-kondo/ignore [:metabase/modules]`
## REST API Endpoints
**Required Elements:**
- All new endpoints must have response schemas (`:- <schema>` after route string)
- All endpoints need Malli schemas for parameters (detailed and complete)
- All new REST API endpoints MUST HAVE TESTS
**Naming Conventions:**
- Query parameters use kebab-case
- Request bodies use `snake_case`
- Routes use singular nouns (e.g., `/api/dashboard/:id`)
**Behavior:**
- `GET` endpoints should not have side effects (except analytics)
- `defendpoint` forms should be small wrappers around Toucan model code
## MBQL (Metabase Query Language)
**Restrictions:**
- No raw MBQL introspection outside of `lib`, `lib-be`, or `query-processor` modules
- Use Lib and MBQL 5 in new source code; avoid legacy MBQL
## Database and Models
**Naming:**
- Model names and table names should be singular nouns
- Application database uses `snake_case` identifiers
**Best Practices:**
- Use `t2/select-one-fn` instead of fetching entire rows for one column
- Put correct behavior in Toucan methods, not separate helper functions
## Drivers
**Documentation:**
- New driver multimethods must be mentioned in `docs/developers-guide/driver-changelog.md`
**Implementation:**
- Driver implementations should pass `driver` argument to other driver multimethods
- Don't hardcode driver names in implementations
- Minimize logic inside `read-column-thunk` in JDBC-based drivers
## Miscellaneous
**Examples:**
- Example data should be bird-themed if possible
**Linter Suppressions:**
- Use proper format for kondo suppressions
- No `#_:clj-kondo/ignore` (keyword form)
**Configurable Options:**
- Don't define configurable options that can only be set with environment variables
- Use `:internal` `defsetting` instead

View File

@@ -0,0 +1,8 @@
# Autonomous Development Workflow
- Do not attempt to read or edit files outside the project folder
- Add failing tests first, then fix them
- Work autonomously in small, testable increments
- Run targeted tests, and lint continuously during development
- Prioritize understanding existing patterns before implementing
- Don't commit changes, leave it for the user to review and make commits

View File

@@ -0,0 +1,84 @@
# Metabase Writing Style Guide
## Core Principles
Write like you're talking to a colleague. Be conversational, not formal. Get people what they need quickly. Know your audience and match the complexity.
## Tone and Voice
**Do:**
- Use contractions ("can't" not "cannot")
- Say "people" or "companies" instead of "users"
- Be friendly but not peppy
- Acknowledge limitations honestly ("that's on us, not them")
- Jokes and Easter eggs are okay (permit them, don't suggest them)
**Don't:**
- Use exclamation points excessively
- Rely on tired tropes about nerdiness
- Use corporate jargon ("utilize", "offerings", "actionable insights")
- Tell people something is cool (show them instead)
## Structure and Clarity
**Lead with the important stuff:**
- Most important information first
- Lead with the ask, then provide context
- Cut text that adds little value (when in doubt, cut it)
- Each paragraph should have one clear purpose
**Make headings do the work:**
- Convey your actual point, not just the topic
- "Use headings to highlight key points" not "How to write a good heading"
- Use sentence case, no punctuation except question marks
- No links in headings unless entire heading is a link
## Instructions and Examples
**Tell people what to do:**
- Give the action before explaining why
- Put commands in execution order
- Provide context, steps, and reasoning
- Don't describe tasks as "easy" or "simple"
**Answer unasked questions:**
- Include answers to "dumb" questions you had when learning
- Don't literally include the question, just give the answer
## Formatting
**Code vs. UI elements:**
- Backticks for code, variable names, parameters only
- **Bold** for UI elements and labels (e.g., "Click the **Save** button")
- Don't use backticks or quotes for UI elements
## Writing Mechanics
- Limit pronouns when introducing new terms (repeat the term to reinforce it)
- Ampersands only in proper nouns, never as substitute for "and"
## Terminology Preferences
Use familiar terms from tools people already know:
- "Summarize" (like Excel) instead of "aggregate"
- "Take a look at" instead of "reference"
- "Filter" instead of technical database terms when appropriate
## Red Flags
Avoid these patterns:
- Multiple exclamation points
- Linking "here"
- Bullet lists to explain (use prose)
- Numbers that will change (guard against change)
- Describing things as "easy" or "simple"
- Stock photography-worthy content

View File

@@ -0,0 +1,21 @@
## Linting and Formatting
- **Lint:** `bun run lint-eslint-pure`
- Run ESLint on the codebase
- **Format:** `bun run prettier`
- Format code using Prettier
- **Type Check:** `bun run type-check-pure`
- Run TypeScript type checking
## Testing
### JavaScript/TypeScript Tests
- **Test a specific file:** `bun run test-unit-keep-cljs path/to/file.unit.spec.js`
- **Test by pattern:** `bun run test-unit-keep-cljs -t "pattern"`
- Runs tests matching the given pattern
### ClojureScript Tests
- **Test ClojureScript:** `bun run test-cljs`
- Run ClojureScript tests

View File

@@ -0,0 +1,420 @@
---
name: add-malli-schemas
description: Efficiently add Malli schemas to API endpoints in the Metabase codebase with proper patterns, validation timing, and error handling
---
# Add Malli Schemas to API Endpoints
This skill helps you efficiently and uniformly add Malli schemas to API endpoints in the Metabase codebase.
## Reference Files (Best Examples)
- `src/metabase/warehouses/api.clj` - Most comprehensive schemas, custom error messages
- `src/metabase/api_keys/api.clj` - Excellent response schemas
- `src/metabase/collections/api.clj` - Great named schema patterns
- `src/metabase/timeline/api/timeline.clj` - Clean, simple examples
## Quick Checklist
When adding Malli schemas to an endpoint:
- [ ] Route params have schemas
- [ ] Query params have schemas with `:optional true` and `:default` where appropriate
- [ ] Request body has a schema (for POST/PUT)
- [ ] Response schema is defined (using `:-` after route string)
- [ ] Use existing schema types from `ms` namespace when possible
- [ ] Consider creating named schemas for reusable or complex types
- [ ] Add contextual error messages for validation failures
## Basic Structure
### Complete Endpoint Example
```clojure
(mr/def ::Color [:enum "red" "blue" "green"])
(mr/def ::ResponseSchema
[:map
[:id pos-int?]
[:name string?]
[:color ::Color]
[:created_at ms/TemporalString]])
(api.macros/defendpoint :post "/:name" :- ::ResponseSchema
"Create a resource with a given name."
[;; Route Params:
{:keys [name]} :- [:map [:name ms/NonBlankString]]
;; Query Params:
{:keys [include archived]} :- [:map
[:include {:optional true} [:maybe [:= "details"]]]
[:archived {:default false} [:maybe ms/BooleanValue]]]
;; Body Params:
{:keys [color]} :- [:map [:color ::Color]]
]
;; endpoint implementation, ex:
{:id 99
:name (str "mr or mrs " name)
:color ({"red" "blue" "blue" "green" "green" "red"} color)
:created_at (t/format (t/formatter "yyyy-MM-dd'T'HH:mm:ssXXX") (t/zoned-date-time))}
)
```
## Common Schema Patterns
1. Route Params (the 5 in `api/user/id/5`)
2. Query Params (the sort+asc pair in `api/users?sort=asc`)
3. Body Params (the contents of a request body. Almost always decoded from json into edn)
4. The Raw Request map
Of the 4 arguments, deprioritize usage of the raw request unless necessary.
### Route Params
Always required, typically just a map with an ID:
```clojure
[{:keys [id]} :- [:map [:id ms/PositiveInt]]]
```
For multiple route params:
```clojure
[{:keys [id field-id]} :- [:map
[:id ms/PositiveInt]
[:field-id ms/PositiveInt]]]
```
### Query Params
Add properties for `{:optional true ...}` and `:default` values:
```clojure
{:keys [archived include limit offset]} :- [:map
[:archived {:default false} [:maybe ms/BooleanValue]]
[:include {:optional true} [:maybe [:= "tables"]]]
[:limit {:optional true} [:maybe ms/PositiveInt]]
[:offset {:optional true} [:maybe ms/PositiveInt]]]
```
### Request Body (POST/PUT)
```clojure
{:keys [name description parent_id]} :- [:map
[:name ms/NonBlankString]
[:description {:optional true} [:maybe ms/NonBlankString]]
[:parent_id {:optional true} [:maybe ms/PositiveInt]]]
```
### Response Schemas
#### Simple inline response:
```clojure
(api.macros/defendpoint :get "/:id" :- [:map
[:id pos-int?]
[:name string?]]
"Get a thing"
...)
```
#### Named schema for reuse:
```clojure
(mr/def ::Thing
[:map
[:id pos-int?]
[:name string?]
[:description [:maybe string?]]])
(api.macros/defendpoint :get "/:id" :- ::Thing
"Get a thing"
...)
(api.macros/defendpoint :get "/" :- [:sequential ::Thing]
"Get all things"
...)
```
## Common Schema Types
### From `metabase.util.malli.schema` (aliased as `ms`)
Prefer the schemas in the ms/* namespace, since they work better with our api infrastructure.
For example use `ms/PositiveInt` instead of `pos-int?`.
```clojure
ms/PositiveInt ;; Positive integer
ms/NonBlankString ;; Non-empty string
ms/BooleanValue ;; String "true"/"false" or boolean
ms/MaybeBooleanValue ;; BooleanValue or nil
ms/TemporalString ;; ISO-8601 date/time string (for REQUEST params only!)
ms/Map ;; Any map
ms/JSONString ;; JSON-encoded string
ms/PositiveNum ;; Positive number
ms/IntGreaterThanOrEqualToZero ;; 0 or positive
```
**IMPORTANT:** For response schemas, use `:any` for temporal fields, not `ms/TemporalString`!
Response schemas validate BEFORE JSON serialization, so they see Java Time objects.
### Built-in Malli Types
```clojure
:string ;; Any string
:boolean ;; true/false
:int ;; Any integer
:keyword ;; Clojure keyword
pos-int? ;; Positive integer predicate
[:maybe X] ;; X or nil
[:enum "a" "b" "c"] ;; One of these values
[:or X Y] ;; Schema that satisfies X or Y
[:and X Y] ;; Schema that satisfies X and Y
[:sequential X] ;; Sequential of Xs
[:set X] ;; Set of Xs
[:map-of K V] ;; Map with keys w/ schema K and values w/ schema V
[:tuple X Y Z] ;; Fixed-length tuple of schemas X Y Z
```
Avoid using sequence schemas unless completely necessary.
## Step-by-Step: Adding Schemas to an Endpoint
### Example: Adding return schema to `GET /api/field/:id/related`
**Before:**
```clojure
(api.macros/defendpoint :get "/:id/related"
"Return related entities."
[{:keys [id]} :- [:map [:id ms/PositiveInt]]]
(-> (t2/select-one :model/Field :id id) api/read-check xrays/related))
```
**Step 1:** Check what the function returns (look at `xrays/related`)
**Step 2:** Define response schema based on return type:
```clojure
(mr/def ::RelatedEntity
[:map
[:tables [:sequential [:map [:id pos-int?] [:name string?]]]]
[:fields [:sequential [:map [:id pos-int?] [:name string?]]]]])
```
**Step 3:** Add response schema to endpoint:
```clojure
(api.macros/defendpoint :get "/:id/related" :- ::RelatedEntity
"Return related entities."
[{:keys [id]} :- [:map [:id ms/PositiveInt]]]
(-> (t2/select-one :model/Field :id id) api/read-check xrays/related))
```
## Advanced Patterns
### Custom Error Messages
```clojure
(def DBEngineString
"Schema for a valid database engine name."
(mu/with-api-error-message
[:and
ms/NonBlankString
[:fn
{:error/message "Valid database engine"}
#(u/ignore-exceptions (driver/the-driver %))]]
(deferred-tru "value must be a valid database engine.")))
```
### Enum with Documentation
```clojure
(def PinnedState
(into [:enum {:error/message "pinned state must be 'all', 'is_pinned', or 'is_not_pinned'"}]
#{"all" "is_pinned" "is_not_pinned"}))
```
### Complex Nested Response
```clojure
(mr/def ::DashboardQuestionCandidate
[:map
[:id ms/PositiveInt]
[:name ms/NonBlankString]
[:description [:maybe string?]]
[:sole_dashboard_info
[:map
[:id ms/PositiveInt]
[:name ms/NonBlankString]
[:description [:maybe string?]]]]])
(mr/def ::DashboardQuestionCandidatesResponse
[:map
[:data [:sequential ::DashboardQuestionCandidate]]
[:total ms/PositiveInt]])
```
### Paginated Response Pattern
```clojure
(mr/def ::PaginatedResponse
[:map
[:data [:sequential ::Item]]
[:total integer?]
[:limit {:optional true} [:maybe integer?]]
[:offset {:optional true} [:maybe integer?]]])
```
## Common Pitfalls
### Don't: Forget `:maybe` for nullable fields
```clojure
[:description ms/NonBlankString] ;; WRONG - fails if nil
[:description [:maybe ms/NonBlankString]] ;; RIGHT - allows nil
```
### Don't: Forget `:optional true` for optional query params
```clojure
[:limit ms/PositiveInt] ;; WRONG - required but shouldn't be
[:limit {:optional true} [:maybe ms/PositiveInt]] ;; RIGHT
```
### Don't: Forget `:default` values for known params
```clojure
[:limit ms/PositiveInt] ;; WRONG - required but shouldn't be
[:limit {:optional true :default 0} [:maybe ms/PositiveInt]] ;; RIGHT
```
### Don't: Mix up route params, query params, and body
```clojure
;; WRONG - all in one map
[{:keys [id name archived]} :- [:map ...]]
;; RIGHT - separate destructuring
[{:keys [id]} :- [:map [:id ms/PositiveInt]]
{:keys [archived]} :- [:map [:archived {:default false} ms/BooleanValue]]
{:keys [name]} :- [:map [:name ms/NonBlankString]]]
```
### Don't: Use `ms/TemporalString` for Java Time objects in response schemas
```clojure
;; WRONG - Java Time objects aren't strings yet
[:date_joined ms/TemporalString]
;; RIGHT - schemas validate BEFORE JSON serialization
[:date_joined :any] ;; Java Time object, serialized to string by middleware
[:last_login [:maybe :any]] ;; Java Time object or nil
```
**Why:** Response schemas validate the internal Clojure data structures BEFORE they are serialized to JSON. Java Time objects like `OffsetDateTime` get converted to ISO-8601 strings by the JSON middleware, so the schema needs to accept the raw Java objects.
### Don't: Use `[:sequential X]` when the data is actually a set
```clojure
;; WRONG - group_ids is actually a set
[:group_ids {:optional true} [:sequential pos-int?]]
;; RIGHT - matches the actual data structure
[:group_ids {:optional true} [:maybe [:set pos-int?]]]
```
**Why:** Toucan hydration methods often return sets. The JSON middleware will serialize sets to arrays, but the schema validates before serialization.
### Don't: Create anonymous schemas for reused structures
Use `mr/def` for schemas used in multiple places:
```clojure
(mr/def ::User
[:map
[:id pos-int?]
[:email string?]
[:name string?]])
```
## Finding Return Types
1. **Look at the function being called**
```clojure
(api.macros/defendpoint :get "/:id"
[{:keys [id]}]
(t2/select-one :model/Field :id id)) ;; Returns a Field instance
```
2. **Check Toucan models for structure**
Look in `src/metabase/*/models/*.clj` for model definitions.
3. **Use clojure-mcp or REPL to inspect**
```bash
./bin/mage -repl '(require '\''metabase.xrays.core) (doc metabase.xrays.core/related)'
```
4. **Check tests**
Tests often show the expected response structure.
## Understanding Schema Validation Timing
**CRITICAL CONCEPT:** Schemas validate at different points in the request/response lifecycle:
### Request Parameter Schemas (Query/Body/Route)
- Validate AFTER JSON parsing
- Data is already deserialized (strings, numbers, booleans)
- Use `ms/TemporalString` for date/time inputs
- Use `ms/BooleanValue` for boolean query params
### Response Schemas
- Validate BEFORE JSON serialization
- Data is still in Clojure format (Java Time objects, sets, keywords)
- Use `:any` for Java Time objects
- Use `[:set X]` for sets
- Use `[:enum :keyword]` for keyword enums
### Serialization Flow
```
Request: JSON string → Parse → Coerce → Handler
Response: Handler → Schema Check → Encode → Serialize → JSON string
```
## Workflow Summary
1. **Read the endpoint** - understand what it does
2. **Identify params** - route, query, body
3. **Add parameter schemas** - use existing types from `ms`
4. **Determine return type** - check the implementation
5. **Define response schema** - inline or named with `mr/def`
6. **Test** - ensure the endpoint works and validates correctly
## Testing Your Schemas
After adding schemas, verify:
1. **Valid requests work** - test with correct data
2. **Invalid requests fail gracefully** - test with wrong types
3. **Optional params work** - test with/without optional params
4. **Error messages are clear** - check validation error responses
## Tips
- **Start simple** - begin with basic types, refine later
- **Reuse schemas** - if you see the same structure twice, make it a named schema
- **Be specific** - use `ms/PositiveInt` instead of `pos-int?`
- **Document intent** - add docstrings to named schemas
- **Follow conventions** - look at similar endpoints in the same namespace
- **Check the actual data** - use REPL to inspect what's actually returned before serialization
## Additional Resources
- [Malli Documentation](https://github.com/metosin/malli)
- Metabase Malli utilities: `src/metabase/util/malli/schema.clj`
- Metabase schema registry: `src/metabase/util/malli/registry.clj`

View File

@@ -0,0 +1,504 @@
---
name: analytics-events
description: Add product analytics events to track user interactions in the Metabase frontend
allowed-tools: Read, Write, Edit, Grep, Glob
---
# Frontend Analytics Events Skill
This skill helps you add product analytics (Snowplow) events to track user interactions in the Metabase frontend codebase.
## Quick Reference
Analytics events in Metabase use Snowplow with typed event schemas. All events must be defined in TypeScript types before use.
**Key Files:**
- `frontend/src/metabase-types/analytics/event.ts` - Event type definitions
- `frontend/src/metabase-types/analytics/schema.ts` - Schema registry
- `frontend/src/metabase/lib/analytics.ts` - Core tracking functions
- Feature-specific `analytics.ts` files - Tracking function wrappers
## Quick Checklist
When adding a new analytics event:
- [ ] Define event type in `frontend/src/metabase-types/analytics/event.ts`
- [ ] Add event to appropriate union type (e.g., `DataStudioEvent`, `SimpleEvent`)
- [ ] Create tracking function in feature's `analytics.ts` file
- [ ] Import and call tracking function at the interaction point
- [ ] Use `trackSimpleEvent()` for basic events (most common)
## Event Schema Types
### 1. Simple Events (Most Common)
Use `SimpleEventSchema` for straightforward tracking. It supports these standard fields:
```typescript
type SimpleEventSchema = {
event: string; // Required: Event name (snake_case)
target_id?: number | null; // Optional: ID of affected entity
triggered_from?: string | null; // Optional: UI location/context
duration_ms?: number | null; // Optional: Duration in milliseconds
result?: string | null; // Optional: Outcome (e.g., "success", "failure")
event_detail?: string | null; // Optional: Additional detail/variant
};
```
**When to use:** 90% of events fit this schema. Use for clicks, opens, closes, creates, deletes, etc.
### 2. Custom Schemas (legacy, no events are being added)
Consider adding new event schema only in very special cases.
**Examples:** `DashboardEventSchema`, `CleanupEventSchema`, `QuestionEventSchema`
## Step-by-Step: Adding a Simple Event
### Example: Track when a user applies filters in a table picker
#### Step 1: Define Event Types
Add event type definitions to `frontend/src/metabase-types/analytics/event.ts`:
```typescript
export type DataStudioTablePickerFiltersAppliedEvent = ValidateEvent<{
event: "data_studio_table_picker_filters_applied";
}>;
export type DataStudioTablePickerFiltersClearedEvent = ValidateEvent<{
event: "data_studio_table_picker_filters_cleared";
}>;
```
#### Step 2: Add to Union Type
Find or create the appropriate union type and add your events:
```typescript
export type DataStudioEvent =
| DataStudioLibraryCreatedEvent
| DataStudioTablePublishedEvent
| DataStudioGlossaryCreatedEvent
| DataStudioGlossaryEditedEvent
| DataStudioGlossaryDeletedEvent
| DataStudioTablePickerFiltersAppliedEvent // <- Add here
| DataStudioTablePickerFiltersClearedEvent; // <- Add here
```
#### Step 3: Create Tracking Functions
In your feature's `analytics.ts` file (e.g., `enterprise/frontend/src/metabase-enterprise/data-studio/analytics.ts`):
```typescript
import { trackSimpleEvent } from "metabase/lib/analytics";
export const trackDataStudioTablePickerFiltersApplied = () => {
trackSimpleEvent({
event: "data_studio_table_picker_filters_applied",
});
};
export const trackDataStudioTablePickerFiltersCleared = () => {
trackSimpleEvent({
event: "data_studio_table_picker_filters_cleared",
});
};
```
#### Step 4: Use in Components
Import and call the tracking function at the interaction point:
```typescript
import {
trackDataStudioTablePickerFiltersApplied,
trackDataStudioTablePickerFiltersCleared,
} from "metabase-enterprise/data-studio/analytics";
function FilterPopover({ filters, onSubmit }) {
const handleReset = () => {
trackDataStudioTablePickerFiltersCleared(); // <- Track here
onSubmit(emptyFilters);
};
return (
<form
onSubmit={(event) => {
event.preventDefault();
trackDataStudioTablePickerFiltersApplied(); // <- Track here
onSubmit(form);
}}
>
{/* form content */}
</form>
);
}
```
## Using SimpleEventSchema Fields
### Example: Event with target_id
```typescript
// Type definition
export type DataStudioLibraryCreatedEvent = ValidateEvent<{
event: "data_studio_library_created";
target_id: number | null;
}>;
// Tracking function
export const trackDataStudioLibraryCreated = (id: CollectionId) => {
trackSimpleEvent({
event: "data_studio_library_created",
target_id: Number(id),
});
};
// Usage
trackDataStudioLibraryCreated(newLibrary.id);
```
### Example: Event with triggered_from
```typescript
// Type definition
export type NewButtonClickedEvent = ValidateEvent<{
event: "new_button_clicked";
triggered_from: "app-bar" | "empty-collection";
}>;
// Tracking function
export const trackNewButtonClicked = (location: "app-bar" | "empty-collection") => {
trackSimpleEvent({
event: "new_button_clicked",
triggered_from: location,
});
};
// Usage
<Button onClick={() => {
trackNewButtonClicked("app-bar");
handleCreate();
}}>
New
</Button>
```
### Example: Event with event_detail
```typescript
// Type definition
export type MetadataEditEvent = ValidateEvent<{
event: "metadata_edited";
event_detail: "type_casting" | "semantic_type_change" | "visibility_change";
triggered_from: "admin" | "data_studio";
}>;
// Tracking function
export const trackMetadataChange = (
detail: "type_casting" | "semantic_type_change" | "visibility_change",
location: "admin" | "data_studio"
) => {
trackSimpleEvent({
event: "metadata_edited",
event_detail: detail,
triggered_from: location,
});
};
// Usage
trackMetadataChange("semantic_type_change", "data_studio");
```
### Example: Event with result and duration
```typescript
// Type definition
export type MoveToTrashEvent = ValidateEvent<{
event: "moved-to-trash";
target_id: number | null;
triggered_from: "collection" | "detail_page" | "cleanup_modal";
duration_ms: number | null;
result: "success" | "failure";
event_detail: "question" | "model" | "metric" | "dashboard";
}>;
// Tracking function
export const trackMoveToTrash = (params: {
targetId: number | null;
triggeredFrom: "collection" | "detail_page" | "cleanup_modal";
durationMs: number | null;
result: "success" | "failure";
itemType: "question" | "model" | "metric" | "dashboard";
}) => {
trackSimpleEvent({
event: "moved-to-trash",
target_id: params.targetId,
triggered_from: params.triggeredFrom,
duration_ms: params.durationMs,
result: params.result,
event_detail: params.itemType,
});
};
// Usage with timing
const startTime = Date.now();
try {
await moveToTrash(item);
trackMoveToTrash({
targetId: item.id,
triggeredFrom: "collection",
durationMs: Date.now() - startTime,
result: "success",
itemType: "question",
});
} catch (error) {
trackMoveToTrash({
targetId: item.id,
triggeredFrom: "collection",
durationMs: Date.now() - startTime,
result: "failure",
itemType: "question",
});
}
```
## Naming Conventions
### Event Names (snake_case)
```typescript
// Good
"data_studio_library_created"
"table_picker_filters_applied"
"metabot_chat_opened"
// Bad
"DataStudioLibraryCreated" // Wrong case
"tablePickerFiltersApplied" // Wrong case
"filters-applied" // Use underscore, not hyphen
```
### Event Type Names (PascalCase with "Event" suffix)
```typescript
// Good
DataStudioLibraryCreatedEvent
TablePickerFiltersAppliedEvent
MetabotChatOpenedEvent
// Bad
dataStudioLibraryCreated // Wrong case
DataStudioLibraryCreated // Missing "Event" suffix
```
### Tracking Function Names (camelCase with "track" prefix)
```typescript
// Good
trackDataStudioLibraryCreated
trackTablePickerFiltersApplied
trackMetabotChatOpened
// Bad
DataStudioLibraryCreated // Missing "track" prefix
track_library_created // Wrong case
logLibraryCreated // Use "track" prefix
```
## Common Patterns
### Pattern 1: Feature-Specific Union Types
Group related events together:
```typescript
export type DataStudioEvent =
| DataStudioLibraryCreatedEvent
| DataStudioTablePublishedEvent
| DataStudioGlossaryCreatedEvent;
export type MetabotEvent =
| MetabotChatOpenedEvent
| MetabotRequestSentEvent
| MetabotFixQueryClickedEvent;
// Then add to SimpleEvent union
export type SimpleEvent =
| /* other events */
| DataStudioEvent
| MetabotEvent
| /* more events */;
```
### Pattern 2: Conditional Tracking
Track different events based on user action:
```typescript
const handleSave = async () => {
if (isNewItem) {
await createItem(data);
trackItemCreated(newItem.id);
} else {
await updateItem(id, data);
trackItemUpdated(id);
}
};
```
## Common Pitfalls
### Don't: Add custom fields to SimpleEvent
```typescript
// WRONG - SimpleEvent doesn't support custom fields
export const trackFiltersApplied = (filters: FilterState) => {
trackSimpleEvent({
event: "filters_applied",
data_layer: filters.dataLayer, // ❌ Not in SimpleEventSchema
data_source: filters.dataSource, // ❌ Not in SimpleEventSchema
with_owner: filters.hasOwner, // ❌ Not in SimpleEventSchema
});
};
// RIGHT - Use only standard SimpleEventSchema fields
export const trackFiltersApplied = () => {
trackSimpleEvent({
event: "filters_applied",
});
};
// Or use event_detail for a single variant
export const trackFilterApplied = (filterType: string) => {
trackSimpleEvent({
event: "filter_applied",
event_detail: filterType, // ✓ "data_layer", "data_source", etc.
});
};
```
### Don't: Forget to add event to union type
```typescript
// Define the event
export type NewFeatureClickedEvent = ValidateEvent<{
event: "new_feature_clicked";
}>;
// ❌ WRONG - Forgot to add to SimpleEvent union
// Event won't be recognized by TypeScript
// ✓ RIGHT - Add to appropriate union
export type SimpleEvent =
| /* other events */
| NewFeatureClickedEvent;
```
### Don't: Mix up event name formats
```typescript
// WRONG
event: "dataStudioLibraryCreated" // camelCase
event: "data-studio-library-created" // kebab-case
event: "Data_Studio_Library_Created" // Mixed case
// RIGHT
event: "data_studio_library_created" // snake_case
```
### Don't: Track PII or sensitive data
```typescript
// WRONG - Don't track user emails, names, or sensitive data
trackSimpleEvent({
event: "user_logged_in",
event_detail: user.email, // ❌ PII
});
// RIGHT - Track non-sensitive identifiers only
trackSimpleEvent({
event: "user_logged_in",
target_id: user.id, // ✓ Just the ID
});
```
### Don't: Forget to track both success and failure
```typescript
// WRONG - Only tracking success
try {
await saveData();
trackDataSaved();
} catch (error) {
// ❌ No tracking for failure case
}
// RIGHT - Track both outcomes
try {
await saveData();
trackDataSaved({ result: "success" });
} catch (error) {
trackDataSaved({ result: "failure" });
}
```
## Testing Analytics Events
While developing, you can verify events are firing:
1. **Check browser console** - When `SNOWPLOW_ENABLED=true` in dev, events are logged
2. **Use shouldLogAnalytics** - Set in `metabase/env` to see all analytics in console
3. **Check Snowplow debugger** - Browser extension for Snowplow events
Example console output:
```
[SNOWPLOW EVENT | event sent:true], data_studio_table_picker_filters_applied
```
## File Organization
### Where to put tracking functions:
```
Feature-specific analytics functions:
frontend/src/metabase/{feature}/analytics.ts
enterprise/frontend/src/metabase-enterprise/{feature}/analytics.ts
Event type definitions (all in one place):
frontend/src/metabase-types/analytics/event.ts
Core tracking utilities:
frontend/src/metabase/lib/analytics.ts
```
## Real-World Examples
See these files for reference:
- **Simple events**: `enterprise/frontend/src/metabase-enterprise/data-studio/analytics.ts`
- **Events with variants**: `frontend/src/metabase/dashboard/analytics.ts`
- **Complex events**: `frontend/src/metabase/query_builder/analytics.js`
- **Event type examples**: `frontend/src/metabase-types/analytics/event.ts`
## Workflow Summary
1. **Identify the user interaction** to track
2. **Decide on event name** (snake_case, descriptive)
3. **Define event type** in `event.ts` using `ValidateEvent`
4. **Add to union type** (create feature union if needed)
5. **Create tracking function** in feature's `analytics.ts`
6. **Import and call** at the interaction point
7. **Test** that events fire correctly
## Tips
- **Be specific** - `filters_applied` is better than `action_performed`
- **Use past tense** - `library_created` not `create_library`
- **Group related events** - Create feature-specific event union types
- **Track meaningful actions** - Not every click needs tracking
- **Consider the data** - What would you want to analyze later?
- **Stay consistent** - Follow existing naming patterns in the codebase
- **Document context** - Use `triggered_from` to track where the action happened

View File

@@ -0,0 +1,144 @@
---
name: clojure-review
description: Review Clojure and ClojureScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing Clojure/ClojureScript code.
allowed-tools: Read, Grep, Bash, Glob
---
# Clojure Code Review Skill
@./../_shared/clojure-style-guide.md
@./../_shared/clojure-commands.md
## Review guidelines
**What to flag:**
- Check compliance with the Metabase Clojure style guide (included above)
- If `CLOJURE_STYLE_GUIDE.adoc` exists in the working directory, also check compliance with the community Clojure style guide
- Flag all style guide violations
**What NOT to post:**
- Do not post comments congratulating someone for trivial changes or for following style guidelines
- Do not post comments confirming things "look good" or telling them they did something correctly
- Only post comments about style violations or potential issues
Example bad code review comments to avoid:
> This TODO comment is properly formatted with author and date - nice work!
> Good addition of limit 1 to the query - this makes the test more efficient without changing its behavior.
> The kondo ignore comment is appropriately placed here
> Test name properly ends with -test as required by the style guide.
**Special cases:**
- Do not post comments about missing parentheses (these will be caught by the linter)
## Quick review checklist
Use this to scan through changes efficiently:
### Naming
- [ ] Descriptive names (no `tbl`, `zs'`)
- [ ] Pure functions named as nouns describing their return value
- [ ] `kebab-case` for all variables and functions
- [ ] Side-effect functions end with `!`
- [ ] No namespace-alias repetition in function names
### Documentation
- [ ] Public vars in `src` or `enterprise/backend/src` have useful docstrings
- [ ] Docstrings use Markdown conventions
- [ ] References use `[[other-var]]` not backticks
- [ ] `TODO` comments include author and date: `;; TODO (Name 2025-01-01) -- description`
### Code Organization
- [ ] Everything `^:private` unless used elsewhere
- [ ] No `declare` when avoidable (public functions near end)
- [ ] Functions under 20 lines when possible
- [ ] No blank, non-comment lines within definition forms (except pairwise constructs in `let`/`cond`)
- [ ] Lines ≤ 120 characters
### Tests
- [ ] Separate `deftest` forms for distinct test cases
- [ ] Pure tests marked `^:parallel`
- [ ] Test names end in `-test` or `-test-<number>`
### Modules
- [ ] Correct module patterns (OSS: `metabase.<module>.*`, EE: `metabase-enterprise.<module>.*`)
- [ ] API endpoints in `<module>.api` namespaces
- [ ] Public API in `<module>.core` with Potemkin
- [ ] No cheating module linters with `:clj-kondo/ignore [:metabase/modules]`
### REST API
- [ ] Response schemas present (`:- <schema>`)
- [ ] Query params use kebab-case, bodies use `snake_case`
- [ ] Routes use singular nouns (e.g., `/api/dashboard/:id`)
- [ ] `GET` has no side effects (except analytics)
- [ ] Malli schemas detailed and complete
- [ ] All new endpoints have tests
### MBQL
- [ ] No raw MBQL manipulation outside `lib`, `lib-be`, or `query-processor` modules
- [ ] Uses Lib and MBQL 5, not legacy MBQL
### Database
- [ ] Model and table names are singular nouns
- [ ] Uses `t2/select-one-fn` instead of selecting full rows for one column
- [ ] Logic in Toucan methods, not helper functions
### Drivers
- [ ] New multimethods documented in `docs/developers-guide/driver-changelog.md`
- [ ] Passes `driver` argument to other driver methods (no hardcoded driver names)
- [ ] Minimal logic in `read-column-thunk`
### Miscellaneous
- [ ] Example data is bird-themed when possible
- [ ] Kondo linter suppressions use proper format (not `#_:clj-kondo/ignore` keyword form)
## Pattern matching table
Quick scan for common issues:
| Pattern | Issue |
| -------------------------------------------- | ----------------------------------------------------------- |
| `calculate-age`, `get-user` | Pure functions should be nouns: `age`, `user` |
| `update-db`, `save-model` | Missing `!` for side effects: `update-db!`, `save-model!` |
| `snake_case_var` | Should use kebab-case |
| Public var without docstring | Add docstring explaining purpose |
| `;; TODO fix this` | Missing author/date: `;; TODO (Name 2025-01-01) -- description` |
| `(defn foo ...)` in namespace used elsewhere | Should be `(defn ^:private foo ...)` |
| Function > 20 lines | Consider breaking up into smaller functions |
| `/api/dashboards/:id` | Use singular: `/api/dashboard/:id` |
| Query params with `snake_case` | Use kebab-case for query params |
| New API endpoint without tests | Add tests for the endpoint |
## Feedback format examples
**For style violations:**
> This pure function should be named as a noun describing its return value. Consider `user` instead of `get-user`.
**For missing documentation:**
> This public var needs a docstring explaining its purpose, inputs, and outputs.
**For organization issues:**
> This function is only used in this namespace, so it should be marked `^:private`.
**For API conventions:**
> Query parameters should use kebab-case. Change `user_id` to `user-id`.

View File

@@ -0,0 +1,69 @@
---
name: clojure-write
description: Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.
---
# Clojure Development Skill
## Tool Preference
When `clojure-mcp` tools are available (e.g., `clojure_eval`, `clojure_edit`), **always use them**
instead of shell commands like `./bin/mage -repl`. The MCP tools provide:
- Direct REPL integration without shell escaping issues
- Better error messages and feedback
- Structural Clojure editing that prevents syntax errors
Only fall back to `./bin/mage` commands when clojure-mcp is not available.
@./../_shared/development-workflow.md
@./../_shared/clojure-style-guide.md
@./../_shared/clojure-commands.md
## REPL-Driven Development Workflow
- Start with small, fundamental functions:
- Identify the core features or functionalities required for your task.
- Break each feature down into the smallest, most basic functions that can be developed and tested independently.
- Write and test in the REPL:
- Write the code for each small function directly in the REPL (Read-Eval-Print Loop).
- Test it thoroughly with a variety of inputs, including typical use cases and relevant edge cases, to ensure it
behaves as expected.
- Integrate into source code:
- Once a function works correctly in the REPL, move it from the REPL environment into your source code files (e.g.,
within appropriate namespaces).
- Gradually increase complexity:
- Build upon tested, basic functions to create more complex functions or components.
- Compose smaller functions together, testing each new composition in the REPL to verify correctness step by step.
- Ensure dependency testing:
- Make sure every function is fully tested in the REPL before it is depended upon by other functions.
- This ensures that each layer of your application is reliable before you build on it.
- Use the REPL fully:
- Use the REPL as your primary tool to experiment with different approaches, iterate quickly, and get immediate
feedback on your code.
- Follow functional programming principles:
- Keep functions small, focused, and composable.
- Use Clojure's functional programming features—like immutability, higher-order functions, and the standard
library—to write concise, effective code.
## How to Evaluate Code
### Bottom-up Dev Loop
1. Write code into a file.
2. Evaluate the file's namespace and make sure it loads correctly with:
```
./bin/mage -repl --namespace metabase.app-db.connection
```
3. Call functions in the namespace with test inputs, and observe that the outputs are correct
Feel free to copy these REPL session trials into actual test cases using `deftest` and `is`.
4. Once you know these functions are good, return to 1, and compose them into the task that you need to build.
## Critical Rules for Editing
- Be careful with parentheses counts when editing Clojure code
- After EVERY change to Clojure code, verify readability with `-check-readable`
- End all files with a newline
- When editing tabular code, where the columns line up, try to keep them aligned
- Spaces on a line with nothing after it is not allowed

View File

@@ -0,0 +1,163 @@
---
name: docs-review
description: Review documentation changes for compliance with the Metabase writing style guide. Use when reviewing pull requests, files, or diffs containing documentation markdown files.
allowed-tools: Read, Grep, Bash, Glob
---
# Documentation Review Skill
@./../_shared/metabase-style-guide.md
## Review mode detection
**IMPORTANT: Before starting the review, determine which mode to use:**
1. **PR review mode**: If the `mcp__github__create_pending_pull_request_review` tool is available, you are reviewing a GitHub PR
- Use the pending review workflow to post all issues as one cohesive review
- Follow the workflow steps in "PR review mode format" below
2. **Local review mode**: If the MCP tool is NOT available, output issues in the conversation
- Format all issues in a numbered markdown list (as described in "Feedback format" below)
## Review process
1. **Detect review mode** - Check if `mcp__github__create_pending_pull_request_review` is available
2. Read the changes through once to understand intent
3. Check all issues that violate style guide or significantly impact readability
4. Only flag issues worth mentioning - if it won't make a material difference to the reader, skip it
5. **REQUIRED: Number ALL feedback sequentially** - Start from Issue 1 and increment for each issue found
## Review checklist
Run through the diff looking for these issues:
**Tone and voice:**
- [ ] Formal/corporate language ("utilize" not "use", "offerings", etc.)
- [ ] "Users" instead of "people" or "companies"
- [ ] Excessive exclamation points or overly peppy tone
- [ ] Telling readers something is cool instead of showing them
**Structure and clarity:**
- [ ] Important information buried instead of leading
- [ ] Verbose text that adds little value
- [ ] Paragraphs without clear purpose
- [ ] Vague headings that don't convey the point
- [ ] Instructions explain "why" before telling "what to do"
- [ ] Tasks described as "easy" or "simple"
**Links and references:**
- [ ] Linking the word "here" instead of descriptive text
- [ ] Links in headings (unless entire heading is a link)
**Formatting:**
- [ ] Ampersands as "and" substitute (except proper nouns)
- [ ] Inconsistent list formatting
**Code and examples:**
- [ ] Code examples that don't work or would error
- [ ] Commands not in execution order
- [ ] Full-width screenshots instead of scoped UI elements
- [ ] Excessive or unnecessary images
**Sentence construction:**
- [ ] Overuse of pronouns when introducing new terms
## Quick scan table
| Pattern | Issue |
| ----------------------------- | --------------------------------------------- |
| we can do X, our feature | Should be "Metabase" or "it" |
| click here, read more here | Need descriptive link text |
| easy, simple, just | Remove condescending qualifiers |
| users | Should be "people" or "companies" if possible |
## Feedback format
**MANDATORY REQUIREMENT: Every single issue MUST be numbered sequentially starting from Issue 1.**
This numbered format is NON-NEGOTIABLE. It allows users to efficiently reference specific issues (e.g., "fix issues 1, 3, and 5") and track which feedback has been addressed.
### Local review mode format
When outputting issues in the conversation (local mode), use this format:
```markdown
## Issues
**Issue 1: [Brief title]**
Line X: Succinct description of the issue
[code or example]
Suggested fix or succinct explanation
**Issue 2: [Brief title]**
Line Y: Description of the issue
Suggested fix or explanation
**Issue 3: [Brief title]**
...
```
**Examples:**
> **Issue 1: Formal tone**
> Line 15: This could be more conversational. Consider: "You can't..." instead of "You cannot..."
> **Issue 2: Vague heading**
> Line 8: The heading could be more specific. Try stating the point directly: "Run migrations before upgrading" vs "Upgrade process"
### PR review mode format
When posting to GitHub (PR mode), use the **pending review workflow**:
**Workflow steps:**
1. **Start a review**: Use `mcp__github__create_pending_pull_request_review` to begin a pending review
- This creates a draft review that won't be visible until submitted
2. **Get diff information**: Use `mcp__github__get_pull_request_diff` to understand the code changes and line numbers
- This helps you determine the correct file paths and line numbers for comments
3. **Identify ALL issues**: Read through all changes and identify every issue worth mentioning
- Collect all issues before posting any comments
- Number them sequentially (Issue 1, Issue 2, Issue 3, etc.)
4. **Add review comments**: Use `mcp__github__add_pull_request_review_comment_to_pending_review` for each issue
- **CRITICAL**: Post ALL comments in a SINGLE response using multiple tool calls in parallel
- Each comment should reference a specific file path and line number from the diff
- Start each comment body with `**Issue N: [Brief title]**`
- Include the description and suggested fix
5. **Submit the review**: Use `mcp__github__submit_pending_pull_request_review` to publish all comments at once
- Use event type `"COMMENT"` (NOT "REQUEST_CHANGES") to make it non-blocking
- **Do NOT include a body message** - Leave the body empty or omit it entirely
- All comments will appear together as one cohesive review
**Comment format example:**
```
**Issue 1: Formal tone**
This could be more conversational. Consider: "You can't..." instead of "You cannot..."
```
**IMPORTANT**:
- Each issue gets its own review comment attached to the pending review
- Number ALL comments sequentially (Issue 1, Issue 2, Issue 3, etc.)
- Always start the comment body with `**Issue N: [Brief title]**`
- **MUST add all comments in parallel in a single response** - Do NOT add them one after another in separate responses
- Do NOT output a summary message to the conversation - only post GitHub review comments
- When submitting the review, do NOT include a body parameter (or leave it empty) to avoid cluttering the PR with summary text
- The review will appear as a single review with multiple comments when submitted
## Final check
1. Remove any issues from your assessment that won't make a material difference to the reader if addressed. Only flag issues worth the author's time to fix.
2. **Verify all issues are numbered sequentially** starting from Issue 1 with no gaps in numbering.
3. Confirm the format exactly matches: `**Issue N: [Brief title]**` where N is the issue number.
4. **In PR mode**: Verify each issue was posted as a separate GitHub comment (not output to conversation).

View File

@@ -0,0 +1,96 @@
---
name: docs-write
description: Write documentation following Metabase's conversational, clear, and user-focused style. Use when creating or editing documentation files (markdown, MDX, etc.).
allowed-tools: Read, Write, Grep, Bash, Glob
---
# Documentation Writing Skill
@./../_shared/metabase-style-guide.md
## When writing documentation
### Start here
1. **Who is this for?** Match complexity to audience. Don't oversimplify hard things or overcomplicate simple ones.
2. **What do they need?** Get them to the answer fast. Nobody wants to be in docs longer than necessary.
3. **What did you struggle with?** Those common questions you had when learning? Answer them (without literally including the question).
### Writing process
**Draft:**
- Write out the steps/explanation as you'd tell a colleague
- Lead with what to do, then explain why
- Use headings that state your point: "Set SAML before adding users" not "SAML configuration timing"
**Edit:**
- Read aloud. Does it sound like you talking? If it's too formal, simplify.
- Cut anything that doesn't directly help the reader
- Check each paragraph has one clear purpose
- Verify examples actually work (don't give examples that error)
**Polish:**
- Make links descriptive (never "here")
- Backticks only for code/variables, **bold** for UI elements
- American spelling, serial commas
- Keep images minimal and scoped tight
**Format:**
- Run prettier on the file after making edits: `bun run prettier --write <file-path>`
- This ensures consistent formatting across all documentation
### Common patterns
**Instructions:**
```markdown
Run:
\`\`\`
command-to-run
\`\`\`
Then:
\`\`\`
next-command
\`\`\`
This ensures you're getting the latest changes.
```
Not: "(remember to run X before Y...)" buried in a paragraph.
**Headings:**
- "Use environment variables for configuration" ✅
- "Environment variables" ❌ (too vague)
- "How to use environment variables for configuration" ❌ (too wordy)
**Links:**
- "Check out the [SAML documentation](link)" ✅
- "Read the docs [here](link)" ❌
### Watch out for
- Describing tasks as "easy" (you don't know the reader's context)
- Using "we" when talking about Metabase features (use "Metabase" or "it")
- Formal language: "utilize", "reference", "offerings"
- Too peppy: multiple exclamation points
- Burying the action in explanation
- Code examples that don't work
- Numbers that will become outdated
### Quick reference
| Write This | Not This |
| -------------------------- | ------------------ |
| people, companies | users |
| summarize | aggregate |
| take a look at | reference |
| can't, don't | cannot, do not |
| **Filter** button | \`Filter\` button |
| Check out [the docs](link) | Click [here](link) |

View File

@@ -0,0 +1,114 @@
---
name: mutation-testing
description: Run mutation testing on a Clojure namespace, generate tests to kill surviving mutations, and open draft PRs with Linear issue tracking.
---
# Mutation Testing Skill
This skill runs mutation testing end-to-end: generates a coverage report, groups functions, shells out to `claude -p` to write tests, verifies mutations are killed, and creates draft PRs with Linear issues.
## Prerequisites
- A running nREPL connected to the Metabase dev environment
- `LINEAR_API_KEY` environment variable set with a valid Linear personal API key
- `gh` CLI authenticated with GitHub
- `claude` CLI available on PATH
## Reference Files
- `dev/src/dev/coverage.clj` — mutation testing engine (generates reports, runs mutations)
- `dev/src/dev/mutation_testing.clj` — orchestration, Linear API, PR helpers
## Invocation
The argument is a Clojure namespace, optionally followed by a base branch:
```
/mutation-testing metabase.lib.order-by
/mutation-testing metabase.lib.order-by --base-branch release-x.52.x
/mutation-testing metabase.lib.order-by --project-id abc-123
/mutation-testing metabase.lib.order-by --base-branch release-x.52.x --project-id abc-123
```
- `--base-branch`: defaults to the value in config (set via `set-config!`), or `"master"` if not configured.
- `--project-id`: if provided, issues are added to this existing Linear project instead of creating a new one.
## Steps
### 1. Parse arguments
Parse `$ARGUMENTS` to extract:
- **namespace** (required) — the first positional argument
- **`--base-branch`** (optional) — if present, the next argument is the base branch name
- **`--project-id`** (optional) — if present, the next argument is an existing Linear project ID
### 2. Load and configure
```clojure
(require '[dev.mutation-testing :as mut-test] :reload)
(require '[dev.coverage :as cov] :reload)
```
If this is the first invocation (or the REPL was restarted), set up the Linear team:
```clojure
(mut-test/list-teams!)
(mut-test/set-config! {:team-id "<id>"})
```
### 3. Run
```clojure
(mut-test/run! '<target-ns>)
;; Or with options:
(mut-test/run! '<target-ns> {:base-branch "release-x.52.x"})
(mut-test/run! '<target-ns> {:project-id "abc-123"})
(mut-test/run! '<target-ns> {:base-branch "release-x.52.x" :project-id "abc-123"})
```
Pass the opts map with `:base-branch` and/or `:project-id` if those flags were provided in the arguments.
This will:
1. Generate a baseline mutation testing report
2. Create a Linear project for the namespace
3. Group functions by coverage relationships
4. For each group: create branch → invoke Claude to write tests → verify → retry if needed → commit & push → create Linear issue → create draft PR
5. Print a summary with PR links
### 4. Handle failures
If a group fails mid-processing, `run!` catches the error and continues to the next group. To retry a single group manually:
```clojure
;; Get the parsed namespace info
(def parsed (mut-test/parse-namespace '<target-ns>))
;; Run coverage to get the data
(def coverage-results (cov/test-namespace (:target-ns parsed) [(:test-ns parsed)]))
;; Group and find the one you want
(def groups (mut-test/group-functions coverage-results))
;; Process just that group
(mut-test/process-group! parsed (nth groups <index>))
```
### 5. Verify the prompt (dry run)
To inspect what Claude will see without invoking it:
```clojure
(def parsed (mut-test/parse-namespace '<target-ns>))
(def coverage-results (cov/test-namespace (:target-ns parsed) [(:test-ns parsed)]))
(def groups (mut-test/group-functions coverage-results))
(println (mut-test/build-test-prompt
(merge (select-keys parsed [:target-ns :test-ns :source-path :test-path])
(select-keys (first groups) [:fn-names :mutations]))))
```
## Configuration
- **Team ID**: Set once per REPL session via `(mut-test/list-teams!)` and `(mut-test/set-config! {:team-id "..."})`
- **Project ID**: Set automatically when `run!` calls `create-project-for-namespace!`
- **Base Branch**: Defaults to `"master"`. Override via `(mut-test/set-config! {:base-branch "release-x.52.x"})` or pass `{:base-branch "..."}` as the second arg to `run!`
- **Project ID**: If set (via `set-config!` or `run!` opts), `run!` reuses the existing Linear project instead of creating a new one

View File

@@ -0,0 +1,20 @@
---
name: typescript-review
description: Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.
allowed-tools: Read, Grep, Bash, Glob
---
# TypeScript/JavaScript Code Review Skill
@./../_shared/typescript-commands.md
## Code Review Guidelines
Review pull requests with a focus on:
- Readability and maintainability
- Appropriate test coverage
- Compliance with project coding standards and conventions
- Code quality and best practices
- Type safety and proper TypeScript usage
- React best practices (when applicable)

View File

@@ -0,0 +1,9 @@
---
name: typescript-write
description: Write TypeScript and JavaScript code following Metabase coding standards and best practices. Use when developing or refactoring TypeScript/JavaScript code.
---
# TypeScript/JavaScript Development Skill
@./../_shared/development-workflow.md
@./../_shared/typescript-commands.md

View File

@@ -25,6 +25,7 @@
:reduce-without-init {:level :warning}
:redundant-call {:level :warning}
:redundant-fn-wrapper {:level :warning}
:redundant-str-call {:level :warning}
:self-requiring-namespace {:level :warning}
:single-key-in {:level :warning}
:unsorted-imports {:level :warning}
@@ -55,19 +56,25 @@
;;
;; globally-enabled custom linters
;;
: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/check-defmulti-arglists {:level :warning}
:metabase/check-def-check-not-uppercase-name {:level :warning}
:metabase/check-def-no-underscores {:level :warning}
:metabase/check-me-humanize {:level :warning}
:metabase/defsetting-must-specify-export {:level :warning}
:metabase/defsetting-namespace {:level :warning}
:metabase/discourage-millis-duration {: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/no-jsqlparser-imports {:level :warning}
:metabase/require-shape-checker {:level :warning}
:metabase/tests-must-live-in-known-modules {:level :warning}
:metabase/validate-defendpoint-route-uses-kebab-case {:level :warning}
:metabase/validate-defendpoint-query-params-use-kebab-case {:level :warning}
:metabase/validate-logging {:level :warning}
:metabase/validate-mb-driver-tests {:level :warning}
:metabase/validate-mb-once {:level :warning}
:metabase/validate-deftest
{:level :warning
@@ -172,7 +179,12 @@
metabase.driver.sql-jdbc.execute/execute-prepared-statement!
metabase.notification.models/create-notification!
metabase.pulse.send/send-pulse!
metabase.query-processor.store/store-database!
metabase-enterprise.transforms-python.python-runner-test/execute!
;; Workspace isolation functions are safe in parallel tests because they operate on
;; isolated, test-specific workspaces and databases that don't affect other tests
metabase-enterprise.workspaces.isolation/destroy-workspace-isolation!
metabase-enterprise.workspaces.isolation/ensure-database-isolation!
metabase-enterprise.workspaces.test-util/create-ready-ws!
;; Safe in tests, where we typically use a private, temporary index per thread.
metabase.search.core/reindex!
metabase.util/run-count!
@@ -214,7 +226,10 @@
;; misc config for built-in linters
;;
:invalid-arity {:skip-args [metabase.lib.util.match/match]} ; TODO (cam): can we fix these?
:invalid-arity {:skip-args [metabase.lib.util.match/match
metabase.lib.util.match/match-lite
metabase.lib.util.match/match-many
metabase.lib.util.match/replace-lite]} ; TODO (cam): can we fix these?
:refer-all {:level :warning, :exclude [clojure.test]}
:unused-referred-var {:exclude {compojure.core [GET DELETE POST PUT]}}
@@ -225,10 +240,7 @@
{:exclude
[(build.uberjar/with-duration-ms)
(cljs.test/is [=? malli=])
(clojure.core.logic/fresh)
(clojure.core.logic/matcha)
(clojure.core.logic/run)
(clojure.test/is [query= =? malli= qv=])
(clojure.test/is [=? malli= qv=])
(clojure.tools.macro/macrolet)
instaparse.core/transform
(metabase.server.streaming-response/streaming-response)
@@ -236,29 +248,32 @@
(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/match-many)
(metabase.lib.util.match/replace)
(metabase.lib.util.match/replace-in)
(metabase.lib.util.match/replace-lite)
(metabase.driver-api.core/match)
(metabase.driver-api.core/match-one)
(metabase.driver-api.core/match-lite)
(metabase.driver-api.core/match-many)
(metabase.driver-api.core/replace)
(metabase.driver-api.core/replace-in)
(metabase.driver-api.core/replace-lite)
(metabase.query-processor.middleware.cache-backend.interface/with-cached-results)
(metabase.util.regex/rx [opt])
(metabase.util/prog1 [<>])
(taoensso.nippy/extend-freeze)
(taoensso.nippy/extend-thaw)]}
;; TODO (Cam 8/22/25) -- what's the point of marking stuff deprecated if we don't have Kondo enforce it? We should
;; remove all of these and add individual ignores as needed.
:deprecated-var
{:exclude
{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.query-processor.middleware.resolve-joins/maybe-resolve-source-table {:namespaces ["metabase.*"]}
metabase.query-processor.util/normalize-token {:namespaces ["metabase.*"]}}}
{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.query-processor.util/normalize-token {:namespaces ["metabase.*"]}}}
:discouraged-var
{clojure.core/print {:message "Use metabase.util.log instead of clojure.core/print"}
@@ -273,6 +288,7 @@
clojure.java.jdbc/with-db-connection {:message "Use sql-jdbc.execute/do-with-connection-with-options (for drivers) or t2/with-connection (for the app DB) instead of jdbc/with-db-connection"}
clojure.java.jdbc/with-db-metadata {:message "Use sql-jdbc.execute/do-with-connection-with-options + .getMetaData instead of jdbc/with-db-metadata"}
clojure.pprint/pprint {:message "Use metabase.util.log instead of clojure.pprint/pprint"}
clojure.pprint/print-table {:message "Use metabase.util.log instead of printing directly to the console"}
clojure.string/lower-case {:message "Use metabase.util/lower-case-en instead of clojure.string/lower-case"}
clojure.string/upper-case {:message "Use metabase.util/upper-case-en instead of clojure.string/upper-case"}
compojure.core/context {:message "Use metabase.api.util.handlers/route-map-handler instead of compojure.core/context, it is much faster and supports OpenAPI spec generation"}
@@ -291,14 +307,22 @@
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.convert/->legacy-MBQL {:message "Conversion to legacy MBQL is discouraged, please use Lib to manipulate MBQL queries"}
metabase.lib.core/->legacy-MBQL {:message "Conversion to legacy MBQL is discouraged, please use Lib to manipulate MBQL queries"}
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.util.match/match {:message "Use lib.util.match/match-many instead of lib.util.match/match."}
metabase.lib.util.match/match-one {:message "Use lib.util.match/match-lite instead of lib.util.match/match-one."}
metabase.lib.util.match/replace {:message "Use lib.util.match/replace-lite instead of lib.util.match/replace."}
metabase-enterprise.transforms.interface/execute! {:message "Use metabase-enterprise.transforms.execute/execute! instead of metabase-enterprise.transforms.interface/execute!"}
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"}}
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."}
cheshire.core {:message "Use metabase.util.json instead of cheshire.core directly."}
clj-time.core {:message "Use java-time.api or metabase.util.date-2 instead of clj-time"}
clojure.tools.logging {:message "Use metabase.util.log instead of clojure.tools.logging directly"}
grouper.core {:message "Use metabase.util.grouper instead of grouper.core"}
honeysql.core {:message "Use Honey SQL 2. Honey SQL 1 is removed as a dependency in Metabase 49+."}
@@ -403,15 +427,19 @@
:lint-as
{cljs.cache/defcache clojure.core/deftype
clojure.core.cache/defcache clojure.core/deftype
clojure.core.logic/defne clj-kondo.lint-as/def-catch-all
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
com.climate.claypoole/with-shutdown! clojure.core/let
instaparse.core/defparser clojure.core/def
metabase-enterprise.action-v2.test-util/with-test-tables! clojure.core/let
metabase-enterprise.content-translation.routes-test/with-new-secret-key! clojure.core/fn
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-enterprise.workspaces.test-util/with-resources! clojure.core/let
metabase-enterprise.workspaces.test-util/with-workspaces! clojure.core/let
metabase.actions.test-util/with-actions clojure.core/let
metabase.transforms.test-util/with-transform-cleanup! 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
@@ -439,8 +467,8 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
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/->
metabase.query-processor.pipeline-queries-test/pmbql-query clojure.core/->
metabase.query-processor.pipeline-queries-test/run-pmbql-query clojure.core/->
metabase.query-processor.error-type/deferror clojure.core/def
metabase.query-processor.middleware.cache.impl/with-reducible-deserialized-results clojure.core/let
metabase.query-processor.middleware.process-userland-query-test/with-query-execution! clojure.core/let
@@ -469,6 +497,7 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.test/with-temp-file clojure.core/let
metabase.test/with-user-in-groups clojure.core/let
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
@@ -478,8 +507,9 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.util.malli/defn- schema.core/defn
metabase.util.malli/fn schema.core/fn
metabase.util.namespaces/import-fns potemkin/import-vars
metabase.util.performance/doseq clojure.core/doseq
metabase.util.performance/for clojure.core/for
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
monger.operators/defoperator clojure.core/def
@@ -497,10 +527,20 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
{cljs.test/deftest hooks.clojure.test/deftest
cljs.test/is hooks.clojure.test/is
cljs.test/use-fixtures hooks.clojure.test/use-fixtures
clojure.core/def hooks.clojure.core.def/lint-def
clojure.core/definterface hooks.clojure.core.def/lint-def
clojure.core/defmacro hooks.clojure.core.defmacro/lint-defmacro
clojure.core/defmulti hooks.clojure.core.defmulti/lint-defmulti
clojure.core/defn hooks.clojure.core.defn/lint-defn
clojure.core/defn- hooks.clojure.core.defn/lint-defn
clojure.core/defonce hooks.clojure.core.def/lint-def
clojure.core/defprotocol hooks.clojure.core.def/lint-def
clojure.core/defrecord hooks.clojure.core.def/lint-def
clojure.core/deftype hooks.clojure.core.def/lint-def
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
@@ -508,7 +548,12 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase-enterprise.advanced-permissions.models.permissions.application-permissions-test/with-new-group-and-current-graph hooks.common/with-two-top-level-bindings
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.dependencies.api-test/with-dependents-test! hooks.common/with-two-bindings
metabase-enterprise.metabot-v3.tools.dependencies-test/with-dependent-transforms! hooks.common/with-two-bindings
metabase-enterprise.semantic-search.db.connection/with-migrate-tx hooks.common/let-one-with-optional-value
metabase-enterprise.serialization.api-test/with-serialization-test-data! hooks.common/with-three-bindings
metabase-enterprise.serialization.test-util/with-temp-dpc hooks.toucan2.tools.with-temp/with-temp
metabase-enterprise.transforms-python.drivers-test/with-test-table hooks.common/with-two-bindings
metabase.api.common.internal-test/with-jetty-server hooks.common/with-one-binding
metabase.api.macros/defendpoint hooks.metabase.api.macros/defendpoint
metabase.app-db.schema-migrations-test.impl/test-migrations hooks.metabase.app-db.schema-migrations-test.impl/test-migrations
@@ -517,28 +562,31 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.channel.template.handlebars-test/with-temp-template! hooks.common/with-vec-first-binding
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-rest.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-rest.api-test/with-chain-filter-fixtures hooks.common/let-one-with-optional-value
metabase.dashboards-rest.api-test/with-simple-dashboard-with-tabs hooks.common/with-one-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.bigquery-cloud-sdk-test/calculate-bird-scarcity hooks.metabase.query-processor.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
metabase.embedding.api.embed-test/with-temp-dashcard hooks.common/let-one-with-optional-value
metabase.embedding-rest.api.embed-test/do-response-formats hooks.common/with-two-bindings
metabase.embedding-rest.api.embed-test/with-chain-filter-fixtures! hooks.common/let-one-with-optional-value
metabase.embedding-rest.api.embed-test/with-temp-card hooks.common/let-one-with-optional-value
metabase.embedding-rest.api.embed-test/with-temp-dashcard hooks.common/let-one-with-optional-value
metabase.legacy-mbql.schema.macros/defclause hooks.metabase.legacy-mbql.schemas.macros/defclause
metabase.legacy-mbql.schema.macros/defclause* hooks.metabase.legacy-mbql.schemas.macros/defclause*
metabase.legacy-mbql.schema.macros/one-of hooks.metabase.legacy-mbql.schemas.macros/one-of
metabase.lib.schema.mbql-clause/define-catn-mbql-clause hooks.metabase.lib.schema.mbql-clause/define-mbql-clause
metabase.lib.schema.mbql-clause/define-mbql-clause hooks.metabase.lib.schema.mbql-clause/define-mbql-clause
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
@@ -549,20 +597,20 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.permissions.core/disable-perms-cache hooks.common/do*
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
metabase.public-sharing.api-test/with-temp-public-card hooks.common/let-one-with-optional-value
metabase.public-sharing.api-test/with-temp-public-dashboard hooks.common/let-one-with-optional-value
metabase.public-sharing.api-test/with-temp-public-dashboard-and-card hooks.common/with-three-bindings
metabase.public-sharing-rest.api-test/with-required-param-card! hooks.common/with-one-binding
metabase.public-sharing-rest.api-test/with-temp-public-card hooks.common/let-one-with-optional-value
metabase.public-sharing-rest.api-test/with-temp-public-dashboard hooks.common/let-one-with-optional-value
metabase.public-sharing-rest.api-test/with-temp-public-dashboard-and-card hooks.common/with-three-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.queries-rest.api.card-test/with-card-param-values-fixtures hooks.common/let-one-with-optional-value
metabase.queries-rest.api.card-test/with-temp-native-card hooks.common/with-two-bindings
metabase.queries-rest.api.card-test/with-temp-native-card-with-params hooks.common/with-two-bindings
metabase.query-processor.expressions-test/calculate-bird-scarcity hooks.metabase.query-processor.expressions-test/calculate-bird-scarcity
metabase.query-processor.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
@@ -610,10 +658,11 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
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-random-premium-token! hooks.common/with-one-binding
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-temporary-setting-values hooks.metabase.test.util/with-temporary-setting-values
metabase.users.api-test/with-temp-user-email! hooks.common/with-one-binding
metabase.users-rest.api-test/with-temp-user-email! hooks.common/with-one-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
@@ -637,43 +686,43 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.xrays.api.automagic-dashboards-test/with-indexed-model! hooks.metabase.xrays.api.automagic-dashboards-test/with-indexed-model!}
:macroexpand
{clojurewerkz.quartzite.jobs/build macros.quartz/build-job
clojurewerkz.quartzite.schedule.cron/schedule macros.quartz/schedule
clojurewerkz.quartzite.schedule.simple/schedule macros.quartz/simple-schedule
clojurewerkz.quartzite.triggers/build macros.quartz/build-trigger
metabase-enterprise.database-routing.e2e-test/with-temp-dbs! macros.metabase-enterprise.database-routing.e2e-test/with-temp-dbs!
metabase-enterprise.impersonation.util-test/with-impersonations! macros.metabase-enterprise.impersonation.util-test/with-impersonations!
metabase-enterprise.query-reference-validation.api-test/with-test-setup! macros.metabase-enterprise.query-reference-validation.api-test/with-test-setup!
metabase-enterprise.sandbox.test-util/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.sandbox.test-util/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.serialization.test-util/with-world macros.metabase-enterprise.serialization.test-util/with-world
metabase-enterprise.test/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.test/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase.collections.api-test/with-collection-hierarchy! macros.metabase.collections.api-test/with-collection-hierarchy!
metabase.collections.api-test/with-some-children-of-collection! macros.metabase.collections.api-test/with-some-children-of-collection!
metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-card-referencing! macros.metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-card-referencing!
metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing! macros.metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing!
metabase.lib.common/defop macros.metabase.lib.common/defop
metabase.lib.filter/deffilter macros.metabase.lib.filter/deffilter
metabase.parameters.chain-filter-test/chain-filter macros.metabase.parameters.chain-filter-test/chain-filter
metabase.parameters.chain-filter-test/chain-filter-search macros.metabase.parameters.chain-filter-test/chain-filter
metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing! macros.metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing!
metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing! macros.metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing!
metabase.queries.api.card-test/with-ordered-items macros.metabase.queries.api.card-test/with-ordered-items
metabase.query-analysis.models.query-analysis-test/with-test-setup macros.metabase.query-analysis.models.query-analysis-test/with-test-setup
metabase.query-analysis.task.test-setup/with-test-setup! macros.metabase.query-analysis.task.test-setup/with-test-setup!
metabase.query-processor.streaming/streaming-response macros.metabase.query-processor.streaming/streaming-response
metabase.server.statistics-handler-test/with-server macros.metabase.server.statistics-handler-test/with-server
metabase.test.data.users/with-group-for-user macros.metabase.test.data.users/with-group-for-user
metabase.test.util/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!
metabase.test.util/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values
metabase.test/with-group-for-user macros.metabase.test.data.users/with-group-for-user
metabase.test/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!
metabase.test/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values
metabase.users.models.user-test/with-groups! macros.metabase.users.models.user-test/with-groups!
metabase.util.namespaces/import-fn macros.metabase.util.namespaces/import-fn
metabase.xrays.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}}
{clojurewerkz.quartzite.jobs/build macros.quartz/build-job
clojurewerkz.quartzite.schedule.calendar-interval/build macros.quartz/build-job
clojurewerkz.quartzite.schedule.cron/schedule macros.quartz/schedule
clojurewerkz.quartzite.schedule.simple/schedule macros.quartz/simple-schedule
clojurewerkz.quartzite.triggers/build macros.quartz/build-trigger
metabase-enterprise.database-routing.e2e-test/with-temp-dbs! macros.metabase-enterprise.database-routing.e2e-test/with-temp-dbs!
metabase-enterprise.impersonation.util-test/with-impersonations! macros.metabase-enterprise.impersonation.util-test/with-impersonations!
metabase-enterprise.query-reference-validation.api-test/with-test-setup! macros.metabase-enterprise.query-reference-validation.api-test/with-test-setup!
metabase-enterprise.sandbox.test-util/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.sandbox.test-util/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.serialization.test-util/with-world macros.metabase-enterprise.serialization.test-util/with-world
metabase-enterprise.test/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.test/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase.collections-rest.api-test/with-collection-hierarchy! macros.metabase.collections-rest.api-test/with-collection-hierarchy!
metabase.collections-rest.api-test/with-some-children-of-collection! macros.metabase.collections-rest.api-test/with-some-children-of-collection!
metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-card-referencing! macros.metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-card-referencing!
metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing! macros.metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing!
metabase.lib.common/defop macros.metabase.lib.common/defop
metabase.lib.filter/deffilter macros.metabase.lib.filter/deffilter
metabase.parameters.chain-filter-test/chain-filter macros.metabase.parameters.chain-filter-test/chain-filter
metabase.parameters.chain-filter-test/chain-filter-search macros.metabase.parameters.chain-filter-test/chain-filter
metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-card-referencing! macros.metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-card-referencing!
metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-dashcard-referencing! macros.metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-dashcard-referencing!
metabase.queries-rest.api.card-test/with-ordered-items macros.metabase.queries-rest.api.card-test/with-ordered-items
metabase.query-analysis.models.query-analysis-test/with-test-setup macros.metabase.query-analysis.models.query-analysis-test/with-test-setup
metabase.query-analysis.task.test-setup/with-test-setup! macros.metabase.query-analysis.task.test-setup/with-test-setup!
metabase.query-processor.streaming/streaming-response macros.metabase.query-processor.streaming/streaming-response
metabase.server.statistics-handler-test/with-server macros.metabase.server.statistics-handler-test/with-server
metabase.test.data.users/with-group-for-user macros.metabase.test.data.users/with-group-for-user
metabase.test.util/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!
metabase.test.util/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values
metabase.test/with-group-for-user macros.metabase.test.data.users/with-group-for-user
metabase.test/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!
metabase.test/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values
metabase.users.models.user-test/with-groups! macros.metabase.users.models.user-test/with-groups!
metabase.util.namespaces/import-fn macros.metabase.util.namespaces/import-fn
metabase.xrays.related-test/with-world macros.metabase.xrays.related-test/with-world}}
:config-in-comment
{:linters {:unresolved-symbol {:level :off}}}
@@ -700,48 +749,75 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
:name metabase-lib}
{:pattern "^metabase\\.lib\\..*"
:name metabase-lib-excluding-legacy-mbql}
{:pattern "^metabase\\.legacy-mbql\\..*"
:name legacy-mbql-namespaces}
;;
;; QP source namespaces: `metabase.query-processor.*`, `metabase-enterprise.sandbox.query-processor.*`, and
;; `metabase.driver.*`, excluding `-test` namespaces.
;; QP and driver source namespaces: `metabase.query-processor.*`, `metabase-enterprise.sandbox.query-processor.*`,
;; and `metabase.driver.*`, excluding `-test` namespaces.
;;
{:pattern "metabase(?:(?:(?:-enterprise\\.sandbox)?\\.query-processor\\.)|(?:\\.driver\\.)).*(?<!-test)$"
:name qp-and-driver-source-namespaces}
;;
;; driver namespaces
;; QP source namespaces
;;
{:pattern "metabase\\.driver.*$"
{:pattern "metabase(?:(?:-enterprise\\.sandbox)?\\.query-processor\\.).*(?<!-test)$"
:name qp-source-namespaces}
;;
;; driver namespaces, including tests
;;
{:pattern "metabase\\.driver(?:-api)?.*$"
:name driver-namespaces}
;;
;; Perf-sensitive namespaces are currently the union of metabase.lib.*, driver namespaces, and QP (without tests).
;;
{:pattern "^(?!.*-test(?:\\..*)?$)(?!.*test-util)(?!^metabase\\.test.*)^metabase\\.(lib|driver|legacy-mbql|query-processor).*"
:name performance-sensitive}
;;
;; general QP tests are ones that run across multiple drivers. Anything `metabase.query-processor*-test`,
;; `metabase.driver.sql*-test` (excluding SQLServer and SQLite), or
;; `metabase-enterprise.sandbox.query-processor*-test`
;;
{:pattern "^metabase(?:((?:-enterprise\\.sandbox)?\\.query-processor)|(?:\\.driver\\.sql(?!server)(?!ite))).*-test$"
:name general-qp-and-driver-test-namespaces}]
:name general-qp-and-driver-test-namespaces}
{:pattern "(?:^mage.*)"
:name mage-namespaces}]
:config-in-ns
{test-namespaces
{:linters
{: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}
:metabase/defsetting-namespace {:level :off}}
{:inline-def {:level :off}
:missing-docstring {:level :off}
:private-call {:level :off}
:metabase/defsetting-must-specify-export {:level :off}
:metabase/defsetting-namespace {:level :off}
:metabase/test-helpers-use-non-thread-safe-functions {:level :warning} ; more config in `.clj-kondo/config/test-helpers/config.edn
:hooks
{:analyze-call
{clojure.core/defmacro hooks.clojure.core.defn/non-thread-safe-form-should-end-with-exclamation
clojure.core/defn hooks.clojure.core.defn/non-thread-safe-form-should-end-with-exclamation
clojure.core/defn- hooks.clojure.core.defn/non-thread-safe-form-should-end-with-exclamation}}}
:discouraged-var
{metabase.driver/database-supports? {:level :off}
metabase.lib.convert/->legacy-MBQL {:level :off}
metabase.lib.core/->legacy-MBQL {:level :off}}}}
source-namespaces
{: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}
:metabase/validate-defendpoint-has-response-schema {:level :warning}
:metabase/validate-escaped-single-quotes-in-i18n {:level :warning}
:metabase/validate-string-or-str-args-to-i18n {: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"}}}}
clojure.core/eval {:message "Don't use eval outside of tests"}}
:discouraged-namespace
{metabase.legacy-mbql.jvm-util {:message "Avoid legacy MBQL utils, use Lib instead"}
metabase.legacy-mbql.normalize {:message "Avoid legacy MBQL normalization, use MBQL 5 + lib/normalize instead"}
metabase.legacy-mbql.predicates {:message "Avoid legacy MBQL utils, use Lib instead"}
metabase.legacy-mbql.schema {:message "Avoid the legacy MBQL schema, use MBQL 5 + lib.schema instead"}
metabase.legacy-mbql.schema.helpers {:message "Avoid the legacy MBQL schema, use MBQL 5 + lib.schema instead"}
metabase.legacy-mbql.schema.macros {:message "Avoid the legacy MBQL schema, use MBQL 5 + lib.schema instead"}
metabase.legacy-mbql.util {:message "Avoid legacy MBQL utils, use Lib instead"}
metabase.query-processor.store {:message "Please do not use the QP Store outside of legacy QP or driver code. Use MBQL 5/Lib or lib.metadata.jvm/applicaton-database-metadata-provider instead."}}}}
printable-namespaces
{:linters
@@ -753,7 +829,7 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
clojure.string/lower-case {:level :off}
clojure.string/upper-case {:level :off}}}}
;; enable all the extra linters we haven't enabled in the core app yet in MLv2. It's all new code so we can adhere
;; enable all the extra linters we haven't enabled in the core app yet in Lib. It's all new code so we can adhere
;; to the new stricter rules from day 1
metabase-lib
{:linters
@@ -766,45 +842,142 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
;; eventually we should do this for the whole codebase, but the args are in the opposite order so switching them
;; all at once isn't trivial, at least we can stop using it in new code.
:discouraged-var
{medley.core/map-keys {:message "Use clojure.core/update-keys"}
medley.core/map-vals {:message "Use clojure.core/update-vals"}
metabase.test/with-temp {:message "Don't use application database inside MLv2 code"}}
{medley.core/map-keys {:message "Use metabase.util.performance/update-keys"}
medley.core/map-vals {:message "Use clojure.core/update-vals"}
metabase.lib.convert/->legacy-MBQL {:level :off}
metabase.lib.core/->legacy-MBQL {:level :off}
metabase.test/with-temp {:message "Don't use application database inside Lib code"}}
:discouraged-namespace
{metabase.driver {:message "MLv2 code should be independent of driver code/methods"}
metabase.test {:message "MLv2 tests should only use MLv2 test helpers"}
metabase.test.data {:message "MLv2 tests should only use MLv2 test helpers"}
metabase.util.malli.schema {:message "Prefer metabase.lib.schema schemas in MLv2 code"}
toucan.db {:message "Don't use application database inside MLv2 code"}
toucan.models {:message "Don't use application database inside MLv2 code"}
toucan.util.test {:message "Don't use application database inside MLv2 code"}
toucan2.core {:message "Don't use application database inside MLv2 code"}}}}
{metabase.driver {:message "Lib code should be independent of driver code/methods"}
metabase.test {:message "Lib tests should only use Lib test helpers"}
metabase.test.data {:message "Lib tests should only use Lib test helpers"}
metabase.util.malli.schema {:message "Prefer metabase.lib.schema schemas in Lib code"}
toucan.db {:message "Don't use application database inside Lib code"}
toucan.models {:message "Don't use application database inside Lib code"}
toucan.util.test {:message "Don't use application database inside Lib code"}
toucan2.core {:message "Don't use application database inside Lib code"}}}}
metabase-lib-excluding-legacy-mbql
{}
legacy-mbql-namespaces
{:linters
{:discouraged-var
{metabase.legacy-mbql.util/unique-name-generator {:message "Use metabase.lib.util/unique-name-generator or non-truncating-unique-name-generator"}}}}
{:discouraged-namespace
{metabase.legacy-mbql.jvm-util {:level :off}
metabase.legacy-mbql.normalize {:level :off}
metabase.legacy-mbql.predicates {:level :off}
metabase.legacy-mbql.schema {:level :off}
metabase.legacy-mbql.schema.helpers {:level :off}
metabase.legacy-mbql.schema.macros {:level :off}
metabase.legacy-mbql.util {:level :off}
metabase.query-processor.store {:level :off}}
;; the `metabase.legacy-mbql` stuff is all deprecated, so we don't need to warn inside the module about other stuff
;; in the module being marked deprecated or discouraged.
:deprecated-namespace {:level :off}
:deprecated-var {:level :off}}}
driver-namespaces
{:linters
{:discouraged-var
{metabase.driver/database-supports? {:level :off}}}}
{metabase.driver/database-supports? {:level :off}}
;; don't warn about the legacy MBQL namespaces being deprecated or discouraged in driver code now, we don't have a
;; real alternative YET so it's not a helpful warning.
:discouraged-namespace
{metabase.legacy-mbql.jvm-util {:level :off}
metabase.legacy-mbql.normalize {:level :off}
metabase.legacy-mbql.predicates {:level :off}
metabase.legacy-mbql.schema {:level :off}
metabase.legacy-mbql.schema.helpers {:level :off}
metabase.legacy-mbql.schema.macros {:level :off}
metabase.legacy-mbql.util {:level :off}
metabase.query-processor.store {:level :off}}
:deprecated-namespace
{:exclude
[metabase.driver.common.parameters
metabase.driver.common.parameters.dates
metabase.driver.common.parameters.operators
metabase.driver.common.parameters.parse
metabase.driver.common.parameters.values
metabase.legacy-mbql.jvm-util
metabase.legacy-mbql.normalize
metabase.legacy-mbql.predicates
metabase.legacy-mbql.schema
metabase.legacy-mbql.schema.helpers
metabase.legacy-mbql.schema.macros
metabase.legacy-mbql.util
metabase.query-processor.store]}
:deprecated-var
{:exclude
{metabase.legacy-mbql.schema.helpers/is-clause? {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.schema.helpers/mbql-clause? {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/query->source-table-id {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/aggregation-at-index {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/assoc-field-options {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/expression-with-name {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/field-options {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/negate-filter-clause {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/normalize-token {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/update-field-options {:namespaces ["metabase\\.driver.*"]}}}}}
performance-sensitive
{:linters
{:discouraged-var
{clojure.core/empty? {:message "Use metabase.util.performance/empty?"}
clojure.core/not-empty {:message "Use metabase.util.performance/not-empty"}
clojure.core/every? {:message "Use metabase.util.performance/every?"}
clojure.core/mapv {:message "Use metabase.util.performance/mapv"}
clojure.core/run! {:message "Use metabase.util.performance/run!"}
clojure.core/get-in {:message "Use metabase.util.performance/get-in"}
clojure.core/select-keys {:message "Use metabase.util.performance/select-keys"}
clojure.core/some {:message "Use metabase.util.performance/some"}
clojure.core/update-keys {:message "Use metabase.util.performance/update-keys"}
clojure.walk/keywordize-keys {:message "Use metabase.util.performance/keywordize-keys"}
clojure.walk/postwalk {:message "Use metabase.util.performance/postwalk"}
clojure.walk/prewalk {:message "Use metabase.util.performance/prewalk"}
clojure.walk/walk {:message "Use metabase.util.performance/walk"}
clojure.walk/for {:message "Use metabase.util.performance/for"}
clojure.walk/doseq {:message "Use metabase.util.performance/doseq"}}}}
qp-and-driver-source-namespaces
{:linters
{:discouraged-namespace
{metabase.util.malli.schema {:message "Prefer metabase.lib.schema or metabase.legacy-mbql.schema schemas in QP/driver code"}
toucan.db {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}
toucan.models {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}
toucan.util.test {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}
toucan2.core {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}}
{metabase.query-processor.store {:level :off}
metabase.util.malli.schema {:message "Prefer metabase.lib.schema or metabase.legacy-mbql.schema schemas in QP/driver code"}
toucan.db {:message "Don't use application database directly in QP code; use the MetadataProvider"}
toucan.models {:message "Don't use application database directly in QP code; use the MetadataProvider"}
toucan.util.test {:message "Don't use application database directly in QP code; use the MetadataProvider"}
toucan2.core {:message "Don't use application database directly in QP code; use the MetadataProvider"}}
:discouraged-var
{medley.core/map-keys {:message "Use clojure.core/update-keys"}
{medley.core/map-keys {:message "Use metabase.util.performance/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"}}}}
metabase.app-db.core/query {:message "Don't use application database directly in QP code; use the MetadataProvider"}
metabase.app-db.core/reducible-query {:message "Don't use application database directly in QP code; use the MetadataProvider"}
metabase.lib.convert/->legacy-MBQL {:level :off}
metabase.lib.core/->legacy-MBQL {:level :off}}}}
qp-source-namespaces
{}
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 lib.tu/remap-metadata-provider instead of with-column-remappings in QP tests"}
metabase.test.util/with-column-remappings {:message "Use lib.tu/remap-metadata-provider instead of with-column-remappings in QP tests"}
metabase.test/with-temp {:message "Use lib.tu/mock-metadata-provider in QP tests. Exceptions: tests for code that doesn't use MPs or models not supported by MPs"}
toucan2.tools.with-temp/with-temp {:message "Use lib.tu/mock-metadata-provider in QP tests. Exceptions: tests for code that doesn't use MPs or models not supported by MPs"}}
:metabase/disallow-hardcoded-driver-names-in-tests
{:level :warning}}}
mage-namespaces
{:linters
{:discouraged-java-method
{java.lang.System {exit
{:level :error
:message "Don't use System/exit directly. Instead use mage.util/exit and let mage handle exiting the process"}}}}}}}

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
;; TODO -- seems silly to maintain different blacklists and whitelists here than we use for the deftest `^:parallel`
;; checker...
{:explicitly-safe
#{ ;; these toucan methods might actually set global values if it's used outside of a transaction,
#{;; these toucan methods might actually set global values if it's used outside of a transaction,
;; but since mt/with-temp runs in a transaction, so we'll ignore them in this case.
toucan2.core/delete!
toucan2.core/update!
@@ -13,7 +13,10 @@
toucan2.core/insert-returning-pk!
toucan2.core/insert-returning-pks!
clojure.core.async/<!!
clojure.core.async/<!
clojure.core.async/>!!
clojure.core.async/>!
clojure.core.async/alts!
clojure.core.async/alts!!
clojure.core.async/close!
clojure.core.async/poll!
@@ -97,7 +100,7 @@
metabase.permissions.models.permissions/update-data-perms-graph!
metabase.permissions.models.permissions/update-group-permissions!
metabase.permissions.test-util/with-restored-perms!
metabase.public-sharing.api-test/add-card-to-dashboard!
metabase.public-sharing-rest.api-test/add-card-to-dashboard!
metabase.pulse.send/send-notifications!
metabase.pulse.send/send-pulse!
metabase.query-processor.streaming.interface/begin!

View File

@@ -1,24 +0,0 @@
(ns macros.metabase.collections.api-test)
(defmacro with-collection-hierarchy! [bindings & body]
`(let [~'a nil
~'b nil
~'c nil
~'d nil
~'e nil
~'f nil
~'g nil]
~'a
~'b
~'c
~'d
~'e
~'f
~'g
~bindings
~@body))
(defmacro with-some-children-of-collection! [collection-or-id-or-nil & body]
`(let [~'&ids ~collection-or-id-or-nil]
~'&ids
~@body))

View File

@@ -0,0 +1,24 @@
(ns macros.metabase.collections-rest.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,13 +0,0 @@
(ns macros.metabase.embedding.api.embed-test)
(defmacro with-embedding-enabled-and-temp-card-referencing!
[table-kw field-kw [card-binding] & body]
`(let [~card-binding [~table-kw ~field-kw]]
~@body))
(defmacro with-embedding-enabled-and-temp-dashcard-referencing!
[table-kw field-kw [dash-binding card-binding dashcard-binding] & body]
`(let [~dash-binding [~table-kw ~field-kw]
~(or card-binding '_) nil
~(or dashcard-binding '_) nil]
~@body))

View File

@@ -0,0 +1,13 @@
(ns macros.metabase.embedding-rest.api.embed-test)
(defmacro with-embedding-enabled-and-temp-card-referencing!
[table-kw field-kw [card-binding] & body]
`(let [~card-binding [~table-kw ~field-kw]]
~@body))
(defmacro with-embedding-enabled-and-temp-dashcard-referencing!
[table-kw field-kw [dash-binding card-binding dashcard-binding] & body]
`(let [~dash-binding [~table-kw ~field-kw]
~(or card-binding '_) nil
~(or dashcard-binding '_) nil]
~@body))

View File

@@ -1,13 +0,0 @@
(ns macros.metabase.public-sharing.api-test)
(defmacro with-sharing-enabled-and-temp-card-referencing!
[table-kw field-kw [card-binding] & body]
`(let [~card-binding [~table-kw ~field-kw]]
~@body))
(defmacro with-sharing-enabled-and-temp-dashcard-referencing!
[table-kw field-kw [dash-binding card-binding dashcard-binding] & body]
`(let [~dash-binding [~table-kw ~field-kw]
~(or card-binding '_) nil
~(or dashcard-binding '_) nil]
~@body))

View File

@@ -0,0 +1,13 @@
(ns macros.metabase.public-sharing-rest.api-test)
(defmacro with-sharing-enabled-and-temp-card-referencing!
[table-kw field-kw [card-binding] & body]
`(let [~card-binding [~table-kw ~field-kw]]
~@body))
(defmacro with-sharing-enabled-and-temp-dashcard-referencing!
[table-kw field-kw [dash-binding card-binding dashcard-binding] & body]
`(let [~dash-binding [~table-kw ~field-kw]
~(or card-binding '_) nil
~(or dashcard-binding '_) nil]
~@body))

View File

@@ -1,13 +0,0 @@
(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,13 @@
(ns macros.metabase.queries-rest.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,9 +0,0 @@
(ns macros.metabase.server.statistics-handler-test)
(defmacro with-server
[_ _ [connector chan-start-handle chan-finish-handle chan-done-request] & body]
`(let [~connector nil
~chan-start-handle nil
~chan-finish-handle nil
~chan-done-request nil]
~@body))

View File

@@ -1,16 +0,0 @@
(ns macros.metabase.xrays.domain-entities.malli)
(defmacro define-getters-and-setters [schema & defs]
`(do
(comment ~schema) ;; Reference the schema
~@(for [[sym _path] (partition 2 defs)]
`(do
(defn ~(vary-meta sym
assoc :export true)
"docs" [_x#] nil)
(defn ~(vary-meta (symbol (str "with-" (name sym)))
assoc :export true)
"docs" [x# _new#] x#)
(defn ~(vary-meta (symbol (str (name sym) "-js"))
assoc :export true)
"docs" [x#] x#)))))

View File

@@ -0,0 +1,38 @@
(ns hooks.clojure.core
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]))
(defn- all-uppercase? [symb]
(let [s (str symb)]
(= s #_{:clj-kondo/ignore [:discouraged-var]} (str/upper-case s))))
(defn- has-underscores? [symb]
(str/includes? (str symb) "_"))
(defn- check-symbol-is-kebab-case [symbol-node]
(let [symb (hooks/sexpr symbol-node)]
(when (or (all-uppercase? symb)
(has-underscores? symb))
(hooks/reg-finding! (assoc (meta symbol-node)
:message "Use kebab-case for function and variable names; don't use special notation for constants."
:type :metabase/check-def-kebab-case)))))
(defn lint-def* [{:keys [node]}]
(let [[_def & args] (:children node)
name-symbol (some (fn [arg]
(when (and (hooks/token-node? arg)
(symbol? (hooks/sexpr arg)))
arg))
args)]
(check-symbol-is-kebab-case name-symbol)))
(defn lint-def [x]
(lint-def* x)
x)
(comment
(defn x []
(let [node (-> "(def ^:private TYPE->MODEL {\"document\" :model/Document})"
hooks/parse-string)]
(lint-def {:node node}))))

View File

@@ -0,0 +1,52 @@
(ns hooks.clojure.core.def
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]))
(defn- uppercase-name?
"Whether the symbol is clearly an uppercase name like `TYPE-CONSTANTS` or `SOME_CONSTANT` or `TYPE->MODEL`."
[s]
(and (re-find #"[A-Z0-9]+(?:[-_]>?[A-Z0-9]+)+" s)
;; ignore stuff like `->SCREAMING_SNAKE_CASE`... this is ok
(not (str/includes? s "SCREAMING_SNAKE_CASE"))))
(defn- has-underscores? [s]
(and (str/includes? s "_")
;; ignore stuff like `->snake_case` and `->SCREAMING_SNAKE_CASE`
(not (str/includes? s "snake_case"))
(not (str/includes? s "SCREAMING_SNAKE_CASE"))))
(defn- check-symbol-is-kebab-case [symbol-node]
(let [symb (hooks/sexpr symbol-node)
s (str symb)]
(cond
(uppercase-name? s)
(hooks/reg-finding!
(assoc (meta symbol-node)
:message "Use lower-case names for functions and variables; don't use special notation for constants. [:metabase/check-def-check-not-all-uppercase]"
:type :metabase/check-def-check-not-uppercase-name))
(has-underscores? s)
(hooks/reg-finding!
(assoc (meta symbol-node)
:message "Use kebab-case names for functions and variables. [:metabase/check-def-no-underscores]"
:type :metabase/check-def-no-underscores)))))
(defn lint-def* [{:keys [node]}]
(let [[_def & args] (:children node)
name-symbol (some (fn [arg]
(when (and (hooks/token-node? arg)
(symbol? (hooks/sexpr arg)))
arg))
args)]
(check-symbol-is-kebab-case name-symbol)))
(defn lint-def [x]
(lint-def* x)
x)
(comment
(defn x []
(let [node (-> "(def ^:private TYPE->MODEL {\"document\" :model/Document})"
hooks/parse-string)]
(lint-def {:node node}))))

View File

@@ -0,0 +1,7 @@
(ns hooks.clojure.core.defmacro
(:require
[hooks.clojure.core.def]))
(defn lint-defmacro [x]
(hooks.clojure.core.def/lint-def* x)
x)

View File

@@ -2,6 +2,7 @@
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.clojure.core.def]
[hooks.common]))
(defn- check-arglists [report-node arglists]
@@ -49,4 +50,5 @@
(defn lint-defmulti [x]
(defmulti-check-for-arglists-metadata (:node x))
(hooks.clojure.core.def/lint-def* x)
x)

View File

@@ -2,6 +2,7 @@
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.clojure.core.def]
[hooks.common]))
(defn- end-with-exclamation?
@@ -50,6 +51,11 @@
(non-thread-safe-form-should-end-with-exclamation* node config))
{:node node})
(defn lint-defn [x]
(non-thread-safe-form-should-end-with-exclamation x)
(hooks.clojure.core.def/lint-def* x)
x)
(comment
(require '[clj-kondo.core :as clj-kondo])
(def form (str '(defmacro a

View File

@@ -99,12 +99,48 @@
:message "Metabase namespaces should have the form metabase[-enterprise].<module>.* [:metabase/namespace-name]"
:type :metabase/namespace-name)))))))
(defn- ns-form-node->import-node [ns-form-node]
(some (fn [node]
(when (and (hooks/list-node? node)
(let [first-child (first (:children node))]
(and (hooks/keyword-node? first-child)
(= (hooks/sexpr first-child) :import))))
node))
(:children ns-form-node)))
(defn- jsqlparser-import?
"Check if a symbol or string represents a jsqlparser import."
[s]
(str/starts-with? (str s) "net.sf.jsqlparser"))
(defn- lint-jsqlparser-imports [ns-form-node]
(when-let [import-node (ns-form-node->import-node ns-form-node)]
(doseq [node (rest (:children import-node))
:when (not (contains? (hooks.common/ignored-linters node) :metabase/no-jsqlparser-imports))]
(cond
;; Handle (net.sf.jsqlparser.foo Bar Baz) form
(hooks/list-node? node)
(let [package-node (first (:children node))
package-name (when package-node (str (hooks/sexpr package-node)))]
(when (jsqlparser-import? package-name)
(hooks/reg-finding! (assoc (meta node)
:message "Don't import net.sf.jsqlparser classes directly. This code should be agnostic to the parsing library. [:metabase/no-jsqlparser-imports]"
:type :metabase/no-jsqlparser-imports))))
;; Handle net.sf.jsqlparser.foo.Bar form (single class import)
(hooks/token-node? node)
(when (jsqlparser-import? (hooks/sexpr node))
(hooks/reg-finding! (assoc (meta node)
:message "Don't import net.sf.jsqlparser classes directly. This code should be agnostic to the parsing library. [:metabase/no-jsqlparser-imports]"
:type :metabase/no-jsqlparser-imports)))))))
(defn lint-ns [x]
(doto (:node x)
lint-require-shapes
lint-requires-on-new-lines
(lint-modules (modules/config x))
lint-namespace-name)
lint-namespace-name
lint-jsqlparser-imports)
x)
(comment

View File

@@ -52,7 +52,13 @@
(defn- lint-require* [node current-ns config]
(let [[_require & args] (:children node)
required-namespaces (keep unwrap-require args)]
required-namespaces (->> (keep unwrap-require args)
;; `require` runs through `cc/load-libs` which allows
;; #{:as :reload :reload-all :require :use :verbose :refer :as-alias}
;; as args. If you use a REPL tool that applies clj-kondo linting (e.g., Clojure MCP)
;; you may wish to `:reload` or `:reload-all` a namespace. So we shouldn't assume all
;; args are keywords:
(remove keyword?))]
(lint* node current-ns config required-namespaces)))
(defn- lint-requiring-resolve* [node current-ns config]

View File

@@ -2,7 +2,8 @@
(:require
[clj-kondo.hooks-api :as hooks]
[clojure.string :as str]
[hooks.common]))
[hooks.common]
[hooks.common.modules :as modules]))
(defn- warn-about-disallowed-parallel-forms [form config]
(letfn [(error! [form message]
@@ -102,7 +103,39 @@
(:children node))))]
(walk node)))
(defn deftest [{:keys [node cljc lang config]}]
(defn- test-namespace-lives-outside-of-module-system? [ns-symb]
(some (fn [prefix]
(str/starts-with? (name ns-symb) prefix))
["build-drivers."
"build."
"i18n." ; bin/i18n
"lint-migrations-file-test"
"main-test" ; bin/release-list
"metabase.deps-edn-test"
"metabase.driver."
"metabase.test."
"metabase.test.data."
"metabuild-common."])) ; utils for build scripts
(let [warned-namespaces (atom #{})]
(defn deftest-check-in-valid-module
"Check whether a `deftest` lives in a known module -- important so our system to only run a subset of tests based on
which modules have changes picks them up correctly. (DEV-1125)"
[{:keys [node], ns-symb :ns, :as input}]
(when (and ns-symb
(not (test-namespace-lives-outside-of-module-system? ns-symb))
;; only warn once per namespace
(not (contains? @warned-namespaces ns-symb)))
(swap! warned-namespaces conj ns-symb)
(let [known-modules (set (keys (:metabase/modules (modules/config input))))
current-module (modules/module ns-symb)]
(when (or (not current-module)
(not (contains? known-modules current-module)))
(hooks/reg-finding! (assoc (meta node)
:message (format "All tests must live in a known module; %s is not a known module" (pr-str current-module))
:type :metabase/tests-must-live-in-known-modules)))))))
(defn deftest [{:keys [node cljc lang config], :as input}]
;; run [[deftest-check-parallel]] only once... if this is a `.cljc` file only run it for the `:clj` analysis, no point
;; in running it twice.
(when (or (not cljc)
@@ -110,7 +143,8 @@
(deftest-check-parallel node (get-in config [:linters :metabase/validate-deftest])))
(deftest-check-not-horrifically-long node (get-in config [:linters :metabase/i-like-making-cams-eyes-bleed-with-horrifically-long-tests]))
(deftest-check-no-driver-keywords node (get-in config [:linters :metabase/disallow-hardcoded-driver-names-in-tests]))
{:node node})
(deftest-check-in-valid-module input)
input)
;;; this is a hacky way to determine whether these namespaces are required in the `ns` form or not... basically `:ns`
;;; will come back as `nil` if they are not.

View File

@@ -1,4 +1,6 @@
(ns hooks.common.modules)
(ns hooks.common.modules
(:require
[clojure.string :as str]))
(defn ignored-namespace? [config ns-symb]
(some
@@ -17,14 +19,19 @@
(module 'metabase-enterprise.whatever.core) => enterprise/whatever"
[ns-symb]
{:pre [(simple-symbol? ns-symb)]}
(or (some->> (re-find #"^metabase-enterprise\.([^.]+)" (str ns-symb))
second
(symbol "enterprise"))
(some-> (re-find #"^metabase\.([^.]+)" (str ns-symb))
second
symbol)))
;; treat something like `metabase.driver-test` (for a module that hasn't fully been updated to use `.core`
;; namespaces) as being in the `driver` module
(let [ns-symb (if (str/ends-with? (name ns-symb) "-test")
(symbol (str/replace (name ns-symb) #"-test$" ""))
ns-symb)]
(or (some->> (re-find #"^metabase-enterprise\.([^.]+)" (str ns-symb))
second
(symbol "enterprise"))
(some-> (re-find #"^metabase\.([^.]+)" (str ns-symb))
second
symbol))))
(defn module-api-namespaces
(defn- module-api-namespaces
"Set of API namespace symbols for a given module. `:any` means you can use anything, there are no API namespaces for
this module (yet). If unspecified, the default is just the `<module>.core` namespace."
[config module]
@@ -44,6 +51,12 @@
(symbol (str ns-prefix ".core"))
(symbol (str ns-prefix ".init"))}))))
(defn- module-friends
[config module]
"Set of modules that are `:friends` of `module`, i.e. allowed to use *any* namespace from the module, not just the
designated [[module-api-namespaces]]."
(set (get-in config [:metabase/modules module :friends])))
(defn allowed-modules
"Set of namespace symbols that `module` is allowed to use. `:any` means it's allowed to use anything."
[config module]
@@ -54,11 +67,22 @@
(or (= allowed-modules :any)
(contains? (set allowed-modules) required-module))))
(defn allowed-module-namespace? [config ns-symb]
(defn- allowed-module-namespace? [config current-module ns-symb]
(let [module (module ns-symb)
module-api-namespaces (module-api-namespaces config module)]
module-api-namespaces (module-api-namespaces config module)
module-friends (module-friends config module)]
(or (empty? module-api-namespaces)
(contains? module-api-namespaces ns-symb))))
(contains? module-api-namespaces ns-symb)
(contains? module-friends current-module))))
(defn- rest-module? [module]
(str/ends-with? module "-rest"))
(defn- routes-module? [module]
(str/ends-with? module "-routes"))
(defn- core-module? [module]
(str/ends-with? module "core"))
(defn usage-error
"Find usage errors when a `required-namespace` is required in the `current-module`. Returns a string describing the
@@ -74,8 +98,19 @@
current-module
current-module)
(not (allowed-module-namespace? config required-namespace))
(not (allowed-module-namespace? config current-module required-namespace))
(format "Namespace %s is not an allowed external API namespace for the %s module. [:metabase/modules %s :api]"
required-namespace
required-module
required-module)))))
required-module)
;; (for now) rest modules are allowed to use one another; `routes` is ok because it collects routes together
;; and `core` is ok because [[metabase.core.init]] might need to init some of the `-routes` modules'
;; namespaces
(and (not ((some-fn rest-module? routes-module? core-module?) current-module))
(rest-module? required-module))
(format "Do not use -rest modules (%s) in non-rest modules (%s) -- move things from %s to %s if needed"
required-module
current-module
required-module
(symbol (str/replace required-module #"-rest$" "")))))))

View File

@@ -1,7 +1,67 @@
(ns hooks.metabase.api.macros
(:require
[clj-kondo.hooks-api :as api]
[hooks.common]))
[clojure.string :as str]))
(defn- validate-route!
"Make sure the route uses kebab-case rather than snake_case."
[route]
(letfn [(validate-route-string! [route-string]
(when (and (api/string-node? route-string)
(str/includes? (api/sexpr route-string) "_"))
(api/reg-finding! (assoc (meta route-string)
:message "REST API routes and query params should use kebab-case, not snake_case"
:type :metabase/validate-defendpoint-route-uses-kebab-case))))]
(cond
(api/string-node? route)
(validate-route-string! route)
;; otherwise route is a vector like ["/abc/:d/" :d <regex>]
(api/vector-node? route)
(validate-route-string! (first (:children route))))))
(defn- validate-query-params!
"Make sure query params use kebab-case rather than snake_case.
This only works on inline schemas for now. If you define the schema elsewhere then we'd have to implement this
validation in Clojure-land since we can't resolve the schemas in Kondo. It should however still work on complicated
schemas like
[:merge <map-1> <map-2>]"
[query-param-schema-node]
(letfn [(map-schema? [node]
(and (api/vector-node? node)
(when-let [first-child (first (:children node))]
(and (api/keyword-node? first-child)
(= (api/sexpr first-child) :map)))))
(map-schema-keys [{:keys [children], :as _node}]
(let [child-schemas (if (api/map-node? (second children))
(drop 2 children)
(drop 1 children))]
(keep (fn [child-schema]
(when (api/vector-node? child-schema)
(when-let [k (first (:children child-schema))]
(when (api/keyword-node? k)
k))))
child-schemas)))
(validate-map-schema! [form]
;; only warn once per endpoint -- just once on the first bad node
(when-let [bad-node (some (fn [key-node]
(when (str/includes? (str (api/sexpr key-node)) "_")
key-node))
(map-schema-keys form))]
(api/reg-finding! (assoc (meta bad-node)
:message "REST API routes and query params should use kebab-case, not snake_case"
:type :metabase/validate-defendpoint-query-params-use-kebab-case))))
(validate! [node]
(cond
(and (api/vector-node? node)
(map-schema? node))
(validate-map-schema! node)
(api/vector-node? node)
(doseq [child (:children node)]
(validate! child))))]
(validate! query-param-schema-node)))
(defn defendpoint
[arg]
@@ -18,16 +78,25 @@
(cons nil more))
[params & body] more
[bindings schemas] (when (api/vector-node? params)
(loop [bindings [], schemas [], [x y & more] (:children params)]
(loop [bindings [], schemas [], [x y z & more] (:children params)]
(cond
(not x)
[bindings schemas]
(= (api/sexpr x) :-)
(recur bindings (conj schemas y) more)
(and (api/keyword-node? y)
(= (api/sexpr y) :-))
(recur (conj bindings x) (conj schemas z) more)
:else
(recur (conj bindings x) schemas (cons y more)))))]
(recur (conj bindings x) (conj schemas nil) (list* y z more)))))]
(validate-route! route)
(when-not result-schema
(api/reg-finding! (assoc (meta node)
:message "All REST API endpoints should have a detailed response schema"
:type :metabase/validate-defendpoint-has-response-schema)))
(let [[_route-param-schema query-param-schema _body-param-schema] schemas]
(when query-param-schema
(validate-query-params! query-param-schema)))
(-> (api/list-node
(list
(api/token-node 'do)
@@ -54,3 +123,27 @@
body))))
(with-meta (meta node)))))]
(update arg :node update-defendpoint)))
(comment
(defn -defendpoint [form]
(-> {:node (-> form pr-str api/parse-string)}
defendpoint
:node
api/sexpr))
(defn x []
(-defendpoint '(api.macros/defendpoint :get "/:id/syncable_schemas" ; snake_case route should trigger a warning
"Returns a list of all syncable schemas found for the database `id`."
[{:keys [id]} :- [:map
[:id ms/PositiveInt]]
;; snake_case query parameter, should trigger a warning
{:keys [filter_by]} :- [:map
[:filter_by {:optional true} :string]]]
(let [db (get-database id)]
(api/check-403 (or (:is_attached_dwh db)
(and (mi/can-write? db)
(mi/can-read? db))))
(->> db
(driver/syncable-schemas (:engine db))
(vec)
(sort)))))))

View File

@@ -33,18 +33,36 @@
(defclause [ag:var var] field-or-expression FieldOrExpressionDef)
=>
(def ag:var [FieldOrExpressionDef])"
[{:keys [node]}]
(let [[_defclause clause-name-form & arg-specs] (:children node)]
{:node (-> (hooks/list-node
(list
(hooks/token-node 'def)
(unwrap-defclause-clause-name clause-name-form)
(hooks/string-node "Docstring.")
(collect-defclause-body-schemas arg-specs)))
(with-meta (meta node)))}))
[{:keys [node], :as x}]
(let [[_defclause clause-name & arg-specs] (:children node)]
(assoc x :node (-> (hooks/list-node
(list
(hooks/token-node 'do)
(-> (hooks/keyword-node (keyword "metabase.legacy-mbql.schema" (name (hooks/sexpr clause-name))))
(with-meta (meta clause-name))
(hooks/reg-keyword! 'metabase.legacy-mbql.schemas.macros/defclause))
(collect-defclause-body-schemas arg-specs)))
(with-meta (meta node))))))
(defn defclause*
"e.g.
(defclause [ag:var var] field-or-expression FieldOrExpressionDef)
=>
(def ag:var [FieldOrExpressionDef])"
[{:keys [node], :as x}]
(let [[_defclause clause-name schema] (:children node)]
(assoc x :node (-> (hooks/list-node
(list
(hooks/token-node 'do)
(-> (hooks/keyword-node (keyword "metabase.legacy-mbql.schema" (name (hooks/sexpr clause-name))))
(with-meta (meta clause-name))
(hooks/reg-keyword! 'metabase.legacy-mbql.schemas.macros/defclause*))
schema))
(with-meta (meta node))))))
(comment
(defn- defclause* [form]
(defn- expand-defclause [form]
(hooks/sexpr
(:node
(defclause
@@ -55,15 +73,35 @@
form)))}))))
(defn- x []
(defclause* '(defclause [ag:var var]
field-or-expression FieldOrExpressionDef)))
(expand-defclause '(defclause var
field-or-expression FieldOrExpressionDef)))
;; =>
(def ag:var "Docstring." [FieldOrExpressionDef])
(do :metabase.legacy-mbql.schema/var [FieldOrExpressionDef])
(defn- y []
(defclause* '(defclause var
x (some-list-schema)
y (optional FieldOrExpressionDef)
z (rest (some-other-schema)))))
(expand-defclause '(defclause var
x (some-list-schema)
y (optional FieldOrExpressionDef)
z (rest (some-other-schema)))))
;; =>
(def var "Docstring." [(some-list-schema) FieldOrExpressionDef (some-other-schema)]))
(do :metabase.legacy-mbql.schema/var [(some-list-schema) FieldOrExpressionDef (some-other-schema)]))
(defn one-of [{:keys [node], :as x}]
(let [[_one-of & schema-nodes] (:children node)
node' (-> (hooks/vector-node
(mapv (fn [schema-node]
(if (and (hooks/token-node? schema-node)
(simple-symbol? (hooks/sexpr schema-node)))
(-> (hooks/keyword-node (keyword "mteabase.legacy-mbql.schema" (name (hooks/sexpr schema-node))))
(with-meta (meta schema-node)))
schema-node))
schema-nodes))
(with-meta (meta node)))]
(assoc x :node node')))
(comment
(defn- expand-one-of [form]
(hooks/sexpr (:node (one-of {:node (hooks/parse-string (with-out-str (clojure.pprint/pprint form)))}))))
(defn- z []
(expand-one-of '(one-of absolute-datetime relative-datetime time))))

View File

@@ -0,0 +1,16 @@
(ns hooks.metabase.query-processor.expressions-test
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.metabase.test.data :as data]))
(defn calculate-bird-scarcity
[{{[_ formula filter-clause] :children} :node}]
(let [formula* (data/replace-$id-special-tokens formula)
filter-clause* (or (some-> filter-clause data/replace-$id-special-tokens)
(hooks/token-node 'nil))
node* (hooks/list-node
(list
(hooks/token-node 'do)
formula*
filter-clause*))]
{:node node*}))

View File

@@ -1,16 +0,0 @@
(ns hooks.metabase.query-processor-test.expressions-test
(:require
[clj-kondo.hooks-api :as hooks]
[hooks.metabase.test.data :as data]))
(defn calculate-bird-scarcity
[{{[_ formula filter-clause] :children} :node}]
(let [formula* (data/replace-$id-special-tokens formula)
filter-clause* (or (some-> filter-clause data/replace-$id-special-tokens)
(hooks/token-node 'nil))
node* (hooks/list-node
(list
(hooks/token-node 'do)
formula*
filter-clause*))]
{:node node*}))

View File

@@ -97,7 +97,6 @@
metabot-get-prompt-templates-url
metabot-prompt-generator-token-limit
multi-setting-read-only
notebook-native-preview-shown
notebook-native-preview-sidebar-width
notification-link-base-url
num-metabot-choices
@@ -119,10 +118,10 @@
reset-token-ttl-hours
retired-setting
retry-initial-interval
retry-max-attempts
retry-max-retries
retry-max-interval-millis
retry-multiplier
retry-randomization-factor
retry-jitter-factor
saml-application-name
saml-attribute-email
saml-attribute-firstname

View File

@@ -1,6 +1,6 @@
(ns hooks.metabase.test.util
(:require [clj-kondo.hooks-api :as hooks]
[hooks.common :as common]))
(:require
[clj-kondo.hooks-api :as hooks]))
(defn- namespaced-symbol-node? [node]
(when (hooks/token-node? node)

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

@@ -43,6 +43,17 @@
'{:metabase/modules {api {:uses #{search}}
search {:api #{metabase.search.core}}}}))))
(deftest ^:parallel module-checker-friends-test
(is (= []
(lint-modules
'(ns metabase.search-rest.api
(:require
[metabase.search.config :as search.config]
[metabase.search.core :as search]))
'{:metabase/modules {search {:api #{metabase.search.core}
:friends #{search-rest}}
search-rest {:uses #{search}}}}))))
(deftest ^:parallel module-checker-api-namespaces-ignore-test
(is (empty? (lint-modules
'(ns metabase.api.search

View File

@@ -1,6 +1,7 @@
(ns hooks.metabase.api.macros-test
(:require
[clj-kondo.hooks-api :as api]
[clj-kondo.impl.utils]
[clojure.test :refer :all]
[hooks.metabase.api.macros]))
@@ -69,3 +70,41 @@
(respond :x)
(catch Throwable e
(raise e))))))))
(defn- defendpoint [form]
(hooks.metabase.api.macros/defendpoint
{:node (-> form pr-str api/parse-string)}))
(defn- defendpoint-warnings
[form]
(binding [clj-kondo.impl.utils/*ctx* {:config {:linters {:metabase/validate-defendpoint-route-uses-kebab-case {:level :warning}
:metabase/validate-defendpoint-query-params-use-kebab-case {:level :warning}}}
:ignores (atom nil)
:findings (atom [])
:namespaces (atom {})}]
(defendpoint form)
@(:findings clj-kondo.impl.utils/*ctx*)))
(deftest ^:parallel validate-route-kebab-case-test
(is (=? [{:message "REST API routes and query params should use kebab-case, not snake_case"
:type :metabase/validate-defendpoint-route-uses-kebab-case
:row pos-int?
:col pos-int?}]
(defendpoint-warnings
'(api.macros/defendpoint :get "/:id/syncable_schemas" ; snake_case route should trigger a warning
"Returns a list of all syncable schemas found for the database `id`."
[{:keys [id]}]
id)))))
(deftest ^:parallel validate-query-params-kebab-case-test
(is (=? [{:message "REST API routes and query params should use kebab-case, not snake_case",
:type :metabase/validate-defendpoint-query-params-use-kebab-case
:row pos-int?
:col pos-int?}]
(defendpoint-warnings
'(api.macros/defendpoint :get "/:id/syncable-schemas"
"Returns a list of all syncable schemas found for the database `id`."
[{:keys [id]}
{:keys [filter_by]} :- [:map
[:filter_by {:optional true} :string]]]
id)))))

View File

@@ -38,321 +38,324 @@
;; zero get indented 2 spaces if not on the first line regardless of number of elements on the first line.
:extra-indents
{;; clojure.core stuff
fn* [[:inner 0]]
let* [[:block 1]]
with-meta [[:default]]
fn* [[:inner 0]]
let* [[:block 1]]
with-meta [[:default]]
;; library stuff. Libraries that specify their own `:style/indent` specs are included in the section after this
;; since it is generated automatically.
clojure.core.logic/fresh [[:block 1]]
clojure.core.logic/matcha [[:block 1]]
clojure.core.logic/run [[:block 2]]
clojure.core.match/match [[:block 1]]
clojure.test.check.properties/for-all [[:block 1]]
clojure.test.check.properties/for-all* [[:block 1]]
clojure.test.check/quick-check [[:block 1]]
clojure.tools.macro/macrolet [[:block 1] [:inner 2 0]]
clojurewerkz.quartzite.jobs/build [[:default]]
clojurewerkz.quartzite.jobs/with-description [[:default]]
clojurewerkz.quartzite.jobs/with-identity [[:default]]
clojurewerkz.quartzite.schedule.cron/schedule [[:default]]
clojurewerkz.quartzite.schedule.cron/with-misfire-handling-instruction-do-nothing [[:default]]
clojurewerkz.quartzite.triggers/build [[:default]]
clojurewerkz.quartzite.triggers/with-description [[:default]]
clojurewerkz.quartzite.triggers/with-identity [[:default]]
clojurewerkz.quartzite.triggers/with-priority [[:default]]
clojurewerkz.quartzite.triggers/with-schedule [[:default]]
def-map-type [[:block 2] [:inner 1]]
defprotocol+ [[:block 1] [:inner 1]]
defrecord+ [[:block 2] [:inner 1]]
deftype+ [[:block 2] [:inner 1]]
net.cgrand.macrovich/case [[:block 0]]
potemkin.namespaces/import-vars [[:default]]
potemkin.types/def-map-type [[:block 2] [:inner 1]]
potemkin.types/defprotocol+ [[:block 1] [:inner 1]]
potemkin.types/defrecord+ [[:block 2] [:inner 1]]
potemkin.types/deftype+ [[:block 2] [:inner 1]]
potemkin/def-map-type [[:block 2] [:inner 1]]
potemkin/defprotocol+ [[:block 1] [:inner 1]]
potemkin/defrecord+ [[:block 2] [:inner 1]]
potemkin/deftype+ [[:block 2] [:inner 1]]
potemkin/import-vars [[:default]]
taoensso.nippy/extend-freeze [[:inner 0]]
taoensso.nippy/extend-thaw [[:inner 0]]
throttle.core/with-throttling [[:block 1]]
clojure.core.match/match [[:block 1]]
clojure.test.check.properties/for-all [[:block 1]]
clojure.test.check.properties/for-all* [[:block 1]]
clojure.test.check/quick-check [[:block 1]]
clojure.tools.macro/macrolet [[:block 1] [:inner 2 0]]
clojurewerkz.quartzite.jobs/build [[:default]]
clojurewerkz.quartzite.jobs/with-description [[:default]]
clojurewerkz.quartzite.jobs/with-identity [[:default]]
clojurewerkz.quartzite.schedule.cron/schedule [[:default]]
clojurewerkz.quartzite.schedule.cron/with-misfire-handling-instruction-do-nothing [[:default]]
clojurewerkz.quartzite.triggers/build [[:default]]
clojurewerkz.quartzite.triggers/with-description [[:default]]
clojurewerkz.quartzite.triggers/with-identity [[:default]]
clojurewerkz.quartzite.triggers/with-priority [[:default]]
clojurewerkz.quartzite.triggers/with-schedule [[:default]]
def-map-type [[:block 2] [:inner 1]]
defprotocol+ [[:block 1] [:inner 1]]
defrecord+ [[:block 2] [:inner 1]]
deftype+ [[:block 2] [:inner 1]]
net.cgrand.macrovich/case [[:block 0]]
potemkin.namespaces/import-vars [[:default]]
potemkin.types/def-map-type [[:block 2] [:inner 1]]
potemkin.types/defprotocol+ [[:block 1] [:inner 1]]
potemkin.types/defrecord+ [[:block 2] [:inner 1]]
potemkin.types/deftype+ [[:block 2] [:inner 1]]
potemkin/def-map-type [[:block 2] [:inner 1]]
potemkin/defprotocol+ [[:block 1] [:inner 1]]
potemkin/defrecord+ [[:block 2] [:inner 1]]
potemkin/deftype+ [[:block 2] [:inner 1]]
potemkin/import-vars [[:default]]
taoensso.nippy/extend-freeze [[:inner 0]]
taoensso.nippy/extend-thaw [[:inner 0]]
throttle.core/with-throttling [[:block 1]]
;; the rest of the stuff in this list is generated automatically based on `:style/indent` specs
;; by running [[dev.generate-cljfmt-config/specs]]... use that code to update this list
metabase-enterprise.cache.config-test/with-temp-persist-models [[:block 1]]
metabase-enterprise.impersonation.util-test/with-impersonations! [[:inner 0]]
metabase-enterprise.sandbox.test-util/with-gtaps! [[:inner 0]]
metabase-enterprise.sandbox.test-util/with-gtaps-for-user! [[:inner 0]]
metabase-enterprise.sandbox.test-util/with-user-attributes [[:block 2]]
metabase-enterprise.serialization.test-util/with-dbs [[:inner 0]]
metabase-enterprise.serialization.test-util/with-random-dump-dir [[:block 1]]
metabase-enterprise.serialization.test-util/with-world [[:block 0]]
metabase-enterprise.sso.integrations.jwt-test/with-users-with-email-deleted [[:block 1]]
metabase-enterprise.test/with-gtaps! [[:inner 0]]
metabase-enterprise.test/with-gtaps-for-user! [[:inner 0]]
metabase-enterprise.test/with-user-attributes [[:block 2]]
metabase.actions.actions-test/with-actions-test-data-and-actions-permissively-enabled [[:block 0]]
metabase.actions.test-util/with-actions [[:block 1]]
metabase.actions.test-util/with-actions-disabled [[:block 0]]
metabase.actions.test-util/with-actions-enabled [[:block 0]]
metabase.actions.test-util/with-actions-test-data [[:inner 0]]
metabase.actions.test-util/with-actions-test-data-and-actions-enabled [[:block 0]]
metabase.actions.test-util/with-actions-test-data-tables [[:block 1]]
metabase.actions.test-util/with-empty-db [[:inner 0]]
metabase.actions.test-util/with-temp-test-data [[:inner 0]]
metabase.api.common/check [[:default]]
metabase.api.common/define-routes [[:block 0]]
metabase.api.common/let-404 [[:block 1]]
metabase.app-db.core/with-application-db [[:inner 0]]
metabase.app-db.liquibase/with-liquibase [[:block 1]]
metabase.app-db.liquibase/with-scope-locked [[:block 1]]
metabase.app-db.schema-migrations-test.impl/test-migrations [[:block 2]]
metabase.cmd.copy/step [[:block 1]]
metabase.cmd.copy/with-connection-rollback-only [[:block 1]]
metabase.cmd.copy/with-disabled-db-constraints [[:block 2]]
metabase.collections.api-test/with-collection-hierarchy [[:block 1]]
metabase.collections.api-test/with-french-user-and-personal-collection [[:block 2]]
metabase.collections.api-test/with-some-children-of-collection [[:block 1]]
metabase.collections.models.collection-test/with-collection-hierarchy [[:block 1]]
metabase.collections.models.collection-test/with-current-user-perms-for-collections [[:block 1]]
metabase.collections.models.collection-test/with-personal-and-impersonal-collections [[:block 1]]
metabase.config/build-type-case [[:block 0]]
metabase.dashboards.models.dashboard-test/with-dash-in-collection [[:inner 0]]
metabase.driver-api.core/match [[:inner 0]]
metabase.driver-api.core/match-one [[:inner 0]]
metabase.driver-api.core/replace [[:inner 0]]
metabase.driver-api.core/replace-in [[:inner 0]]
metabase.driver.bigquery-cloud-sdk.query-processor/with-temporal-type [[:default]]
metabase.driver.druid.client/DELETE [[:default]]
metabase.driver.druid.client/GET [[:default]]
metabase.driver.druid.client/POST [[:default]]
metabase.driver.druid.query-processor-test/druid-query [[:block 0]]
metabase.driver.druid.query-processor-test/druid-query-returning-rows [[:block 0]]
metabase.driver.mongo.query-processor/mongo-let [[:block 1]]
metabase.driver.sql-jdbc.actions/with-jdbc-transaction [[:block 1]]
metabase.driver.sql-jdbc.connection/with-connection-spec-for-testing-connection [[:block 1]]
metabase.driver.sql-jdbc.execute.diagnostic/capturing-diagnostic-info [[:block 1]]
metabase.driver.sql.query-processor/apply-top-level-clause [[:default]]
metabase.driver/with-driver [[:block 1]]
metabase.embedding.api.embed-test/do-response-formats [[:block 1]]
metabase.embedding.api.embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]
metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-card-referencing [[:block 3]]
metabase.embedding.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing [[:block 3]]
metabase.embedding.api.embed-test/with-new-secret-key [[:block 0]]
metabase.embedding.api.embed-test/with-temp-card [[:block 1]]
metabase.embedding.api.embed-test/with-temp-dashcard [[:block 1]]
metabase.embedding.api.preview-embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]
metabase.embedding.api.preview-embed-test/with-new-secret-key [[:block 0]]
metabase.lib.binning/with-binning [[:default]]
metabase.lib.core/with-binning [[:default]]
metabase.lib.core/with-join-alias [[:default]]
metabase.lib.core/with-join-conditions [[:default]]
metabase.lib.join/with-join-alias [[:default]]
metabase.lib.join/with-join-conditions [[:default]]
metabase.lib.test-util.macros/$ids [[:inner 0]]
metabase.lib.test-util.macros/mbql-query [[:inner 0]]
metabase.lib.util.match/match [[:inner 0]]
metabase.lib.util.match/match-one [[:inner 0]]
metabase.lib.util.match/match-lite [[:inner 0]]
metabase.lib.util.match/match-lite-recursive [[:inner 0]]
metabase.lib.util.match/replace [[:inner 0]]
metabase.lib.util.match/replace-in [[:inner 0]]
metabase.models.interface/define-batched-hydration-method [[:inner 0]]
metabase.models.interface/define-simple-hydration-method [[:inner 0]]
metabase.parameters.chain-filter-test/with-clean-field-values-for-field [[:block 1]]
metabase.parameters.chain-filter-test/with-fk-field-to-field-remapping [[:block 0]]
metabase.parameters.chain-filter-test/with-human-readable-values-remapping [[:block 0]]
metabase.permissions.core/allow-changing-all-users-group-members [[:block 0]]
metabase.permissions.core/disable-perms-cache [[:block 0]]
metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing [[:block 3]]
metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing [[:block 3]]
metabase.public-sharing.api-test/with-temp-public-card [[:block 1]]
metabase.public-sharing.api-test/with-temp-public-dashboard [[:block 1]]
metabase.public-sharing.api-test/with-temp-public-dashboard-and-card [[:block 1]]
metabase.pulse.api.alert-test/with-alert-in-collection [[:block 1]]
metabase.pulse.dashboard-subscription-test/with-link-card-fixture-for-dashboard [[:block 2]]
metabase.pulse.models.pulse-test/with-dashboard-subscription-in-collection [[:block 1]]
metabase.pulse.models.pulse-test/with-pulse-in-collection [[:inner 0]]
metabase.queries.api.card-test/with-cards-in-readable-collection [[:block 1]]
metabase.queries.api.card-test/with-cards-in-writeable-collection [[:block 1]]
metabase.queries.api.card-test/with-ordered-items [[:inner 0]]
metabase.queries.api.card-test/with-temp-native-card! [[:block 1]]
metabase.queries.api.card-test/with-temp-native-card-with-params! [[:block 1]]
metabase.query-processor-test.pipeline-queries-test/pmbql-query [[:block 1]]
metabase.query-processor-test.pipeline-queries-test/run-pmbql-query [[:block 1]]
metabase.query-processor.debug/debug> [[:block 0]]
metabase.query-processor.error-type/deferror [[:block 1]]
metabase.query-processor.middleware.cache-backend.interface/with-cached-results [[:block 4]]
metabase.query-processor.middleware.process-userland-query-test/with-query-execution [[:block 1]]
metabase.query-processor.store/cached [[:block 1]]
metabase.query-processor.store/with-metadata-provider [[:inner 0]]
metabase.query-processor.streaming/streaming-response [[:block 1]]
metabase.query-processor.test-util/format-rows-by [[:default]]
metabase.request.core/as-admin [[:block 0]]
metabase.request.core/with-current-request [[:inner 0]]
metabase.request.core/with-current-user [[:inner 0]]
metabase.request.core/with-limit-and-offset [[:inner 0]]
metabase.request.session/as-admin [[:block 0]]
metabase.request.session/with-current-user [[:inner 0]]
metabase.sample-data.impl-test/with-temp-sample-database-db [[:block 1]]
metabase.search.api-test/do-test-users [[:block 1]]
metabase.server.middleware.session/as-admin [[:block 0]]
metabase.server.middleware.session/with-current-user [[:inner 0]]
metabase.server.streaming-response-test/with-streaming-response-thread-pool [[:block 0]]
metabase.server.streaming-response-test/with-test-driver-db! [[:block 0]]
metabase.server.streaming-response/streaming-response [[:block 2]]
metabase.session.api/http-401-on-error [[:block 0]]
metabase.settings.core/define-multi-setting [[:inner 0]]
metabase.settings.core/defsetting [[:block 1]]
metabase.settings.models.setting.multi-setting/define-multi-setting [[:inner 0]]
metabase.settings.models.setting/defsetting [[:block 1]]
metabase.sync.fetch-metadata/log-if-error [[:block 1]]
metabase.sync.sync-metadata.fields-test/with-test-db [[:block 0]]
metabase.sync.util/do-with-start-and-finish-debug-logging [[:default]]
metabase.sync.util/sum-for [[:block 1]]
metabase.sync.util/sync-operation [[:block 3]]
metabase.sync.util/with-db-logging-disabled [[:default]]
metabase.sync.util/with-duplicate-ops-prevented [[:default]]
metabase.sync.util/with-emoji-progress-bar [[:block 1]]
metabase.sync.util/with-error-handling [[:block 1]]
metabase.sync.util/with-start-and-finish-logging [[:default]]
metabase.sync.util/with-start-and-finish-logging* [[:default]]
metabase.sync.util/with-sync-events [[:default]]
metabase.task-history.models.task-history/with-task-history [[:block 1]]
metabase.task.core/rerun-on-error [[:block 1]]
metabase.task.impl/rerun-on-error [[:block 1]]
metabase.test.data.datasets/test-driver [[:inner 0]]
metabase.test.data.datasets/test-drivers [[:inner 0]]
metabase.test.data.one-off-dbs/with-blank-db [[:block 0]]
metabase.test.data.one-off-dbs/with-blueberries-db [[:block 0]]
metabase.test.data.users/with-test-user [[:inner 0]]
metabase.test.data/$ids [[:inner 0]]
metabase.test.data/dataset [[:inner 0]]
metabase.test.data/mbql-query [[:inner 0]]
metabase.test.data/native-query [[:block 0]]
metabase.test.data/query [[:block 1]]
metabase.test.data/run-mbql-query [[:inner 0]]
metabase.test.data/with-empty-h2-app-db! [[:block 0]]
metabase.test.data/with-temp-copy-of-db [[:block 0]]
metabase.test.util.public-settings/with-additional-premium-features [[:block 1]]
metabase.test.util.public-settings/with-premium-features [[:block 1]]
metabase.test.util.thread-local/test-helpers-set-global-values! [[:block 0]]
metabase.test.util/discard-setting-changes [[:block 1]]
metabase.test.util/let-url [[:block 1]]
metabase.test.util/throw-if-called! [[:block 1]]
metabase.test.util/with-temp-scheduler [[:block 0]]
metabase.test.util/with-temp-vals-in-db [[:block 3]]
metabase.test.util/with-user-in-groups [[:inner 0]]
metabase.test/$ids [[:inner 0]]
metabase.test/as-admin [[:inner 0]]
metabase.test/dataset [[:inner 0]]
metabase.test/discard-setting-changes [[:block 1]]
metabase.test/format-rows-by [[:default]]
metabase.test/let-url [[:block 1]]
metabase.test/mbql-query [[:inner 0]]
metabase.test/native-query [[:block 0]]
metabase.test/query [[:block 1]]
metabase.test/run-mbql-query [[:inner 0]]
metabase.test/test-driver [[:inner 0]]
metabase.test/test-drivers [[:inner 0]]
metabase.test/test-helpers-set-global-values! [[:block 0]]
metabase.test/throw-if-called! [[:block 1]]
metabase.test/with-actions [[:block 1]]
metabase.test/with-actions-disabled [[:block 0]]
metabase.test/with-actions-enabled [[:block 0]]
metabase.test/with-actions-test-data [[:inner 0]]
metabase.test/with-actions-test-data-and-actions-enabled [[:block 0]]
metabase.test/with-actions-test-data-tables [[:block 1]]
metabase.test/with-additional-premium-features [[:block 1]]
metabase.test/with-current-user [[:inner 0]]
metabase.test/with-driver [[:block 1]]
metabase.test/with-empty-db [[:inner 0]]
metabase.test/with-empty-h2-app-db! [[:block 0]]
metabase.test/with-metadata-provider [[:inner 0]]
metabase.test/with-premium-features [[:block 1]]
metabase.test/with-temp [[:inner 0]]
metabase.test/with-temp-copy-of-db [[:block 0]]
metabase.test/with-temp-scheduler [[:block 0]]
metabase.test/with-temp-test-data [[:inner 0]]
metabase.test/with-temp-vals-in-db [[:block 3]]
metabase.test/with-test-user [[:inner 0]]
metabase.test/with-user-in-groups [[:inner 0]]
metabase.timeseries-query-processor-test.util/test-timeseries-drivers [[:block 0]]
metabase.timeseries-query-processor-test/run-mbql-query [[:inner 0]]
metabase.upload.impl-test/with-upload-table! [[:inner 0]]
metabase.upload.types/with-currency [[:default]]
metabase.upload.types/with-parens [[:default]]
metabase.util.async/cancelable-thread [[:block 0]]
metabase.util.date-2/with-time-zone-same-instant [[:default]]
metabase.util.encryption-test/with-secret-key [[:block 1]]
metabase.util.honey-sql-2/with-database-type-info [[:default]]
metabase.util.i18n/deferred-trs [[:default]]
metabase.util.i18n/deferred-tru [[:default]]
metabase.util.i18n/trs [[:default]]
metabase.util.i18n/trsn [[:default]]
metabase.util.i18n/tru [[:default]]
metabase.util.i18n/trun [[:default]]
metabase.util.jvm/auto-retry [[:block 1]]
metabase.util.jvm/varargs [[:block 1]]
metabase.util.jvm/with-us-locale [[:block 0]]
metabase.util.malli/disable-enforcement [[:block 0]]
metabase.util.malli/with [[:default]]
metabase.util.malli/with-api-error-message [[:default]]
metabase.util.namespaces/import-fns [[:default]]
metabase.util.queue-test/await-test-while [[:block 1]]
metabase.util/auto-retry [[:block 1]]
metabase.util/case-enum [[:block 1]]
metabase.util/ignore-exceptions [[:block 0]]
metabase.util/or-with [[:block 1]]
metabase.util/profile [[:block 1]]
metabase.util/prog1 [[:inner 0]]
metabase.util/varargs [[:inner 0]]
metabase.util/with-us-locale [[:block 0]]
metabuild-common.core/exit-when-finished-nonzero-on-exception [[:block 0]]
metabuild-common.core/step [[:block 1]]
metabuild-common.entrypoint/exit-when-finished-nonzero-on-exception [[:block 0]]
metabuild-common.steps/step [[:block 1]]
methodical.core/defmethod [[:inner 0]]
methodical.core/defmulti [[:inner 0]]
methodical.core/with-dispatcher [[:default]]
methodical.core/with-method-table [[:default]]
methodical.core/with-prefers [[:default]]
methodical.interface/with-dispatcher [[:default]]
methodical.interface/with-method-table [[:default]]
methodical.interface/with-prefers [[:default]]
methodical.macros/defmethod [[:inner 0]]
methodical.macros/defmulti [[:inner 0]]
saml20-clj.sp.response/validate-confirmation-datas [[:block 1]]
toucan2.connection/with-transaction [[:block 1]]
toucan2.core/build [[:block 0]]
toucan2.core/compile [[:block 0]]
toucan2.core/debug [[:block 0]]
toucan2.core/define-after-insert [[:inner 0]]
toucan2.core/define-after-select [[:inner 0]]
toucan2.core/define-after-update [[:inner 0]]
toucan2.core/define-before-delete [[:inner 0]]
toucan2.core/define-before-insert [[:inner 0]]
toucan2.core/define-before-select [[:inner 0]]
toucan2.core/define-default-fields [[:inner 0]]
toucan2.core/define-named-query [[:block 1]]
toucan2.core/deftransforms [[:block 1]]
toucan2.core/with-transaction [[:block 1]]
toucan2.tools.after-insert/define-after-insert [[:inner 0]]
toucan2.tools.after-select/define-after-select [[:inner 0]]
toucan2.tools.after-update/define-after-update [[:inner 0]]
toucan2.tools.after/define-after-impl [[:default]]
toucan2.tools.before-delete/define-before-delete [[:inner 0]]
toucan2.tools.before-insert/define-before-insert [[:inner 0]]
toucan2.tools.before-select/define-before-select [[:inner 0]]
toucan2.tools.compile/build [[:block 0]]
toucan2.tools.compile/compile [[:block 0]]
toucan2.tools.compile/resolved [[:block 0]]
toucan2.tools.debug/debug [[:block 0]]
toucan2.tools.default-fields/define-default-fields [[:inner 0]]
toucan2.tools.named-query/define-named-query [[:block 1]]
toucan2.tools.simple-out-transform/define-out-transform [[:inner 0]]
toucan2.tools.transformed/deftransforms [[:block 1]]
toucan2.tools.with-temp/with-temp [[:inner 0]]
toucan2.util/try-with-error-context [[:inner 0]]}}
metabase-enterprise.cache.config-test/with-temp-persist-models [[:block 1]]
metabase-enterprise.impersonation.util-test/with-impersonations! [[:inner 0]]
metabase-enterprise.sandbox.test-util/with-gtaps! [[:inner 0]]
metabase-enterprise.sandbox.test-util/with-gtaps-for-user! [[:inner 0]]
metabase-enterprise.sandbox.test-util/with-user-attributes [[:block 2]]
metabase-enterprise.serialization.test-util/with-dbs [[:inner 0]]
metabase-enterprise.serialization.test-util/with-random-dump-dir [[:block 1]]
metabase-enterprise.serialization.test-util/with-world [[:block 0]]
metabase-enterprise.sso.integrations.jwt-test/with-users-with-email-deleted [[:block 1]]
metabase-enterprise.test/with-gtaps! [[:inner 0]]
metabase-enterprise.test/with-gtaps-for-user! [[:inner 0]]
metabase-enterprise.test/with-user-attributes [[:block 2]]
metabase-enterprise.workspaces.models.workspace-log/track! [[:block 2]]
metabase.actions.actions-test/with-actions-test-data-and-actions-permissively-enabled [[:block 0]]
metabase.actions.test-util/with-actions [[:block 1]]
metabase.actions.test-util/with-actions-disabled [[:block 0]]
metabase.actions.test-util/with-actions-enabled [[:block 0]]
metabase.actions.test-util/with-actions-test-data [[:inner 0]]
metabase.actions.test-util/with-actions-test-data-and-actions-enabled [[:block 0]]
metabase.actions.test-util/with-actions-test-data-tables [[:block 1]]
metabase.actions.test-util/with-empty-db [[:inner 0]]
metabase.actions.test-util/with-temp-test-data [[:inner 0]]
metabase.api.common/check [[:default]]
metabase.api.common/define-routes [[:block 0]]
metabase.api.common/let-404 [[:block 1]]
metabase.app-db.core/with-application-db [[:inner 0]]
metabase.app-db.liquibase/with-liquibase [[:block 1]]
metabase.app-db.liquibase/with-scope-locked [[:block 1]]
metabase.app-db.schema-migrations-test.impl/test-migrations [[:block 2]]
metabase.cmd.copy/step [[:block 1]]
metabase.cmd.copy/with-connection-rollback-only [[:block 1]]
metabase.cmd.copy/with-disabled-db-constraints [[:block 2]]
metabase.collections-rest.api-test/with-collection-hierarchy [[:block 1]]
metabase.collections-rest.api-test/with-french-user-and-personal-collection [[:block 2]]
metabase.collections-rest.api-test/with-some-children-of-collection [[:block 1]]
metabase.collections.models.collection-test/with-collection-hierarchy [[:block 1]]
metabase.collections.models.collection-test/with-current-user-perms-for-collections [[:block 1]]
metabase.collections.models.collection-test/with-personal-and-impersonal-collections [[:block 1]]
metabase.config/build-type-case [[:block 0]]
metabase.dashboards.models.dashboard-test/with-dash-in-collection [[:inner 0]]
metabase.driver-api.core/match [[:inner 0]]
metabase.driver-api.core/match-one [[:inner 0]]
metabase.driver-api.core/match-lite [[:inner 0]]
metabase.driver-api.core/match-many [[:inner 0]]
metabase.driver-api.core/replace [[:inner 0]]
metabase.driver-api.core/replace-lite [[:inner 0]]
metabase.driver-api.core/replace-in [[:inner 0]]
metabase.driver.bigquery-cloud-sdk.query-processor/with-temporal-type [[:default]]
metabase.driver.druid.client/DELETE [[:default]]
metabase.driver.druid.client/GET [[:default]]
metabase.driver.druid.client/POST [[:default]]
metabase.driver.druid.query-processor-test/druid-query [[:block 0]]
metabase.driver.druid.query-processor-test/druid-query-returning-rows [[:block 0]]
metabase.driver.mongo.query-processor/mongo-let [[:block 1]]
metabase.driver.sql-jdbc.actions/with-jdbc-transaction [[:block 1]]
metabase.driver.sql-jdbc.connection/with-connection-spec-for-testing-connection [[:block 1]]
metabase.driver.sql-jdbc.execute.diagnostic/capturing-diagnostic-info [[:block 1]]
metabase.driver.sql.query-processor/apply-top-level-clause [[:default]]
metabase.driver/with-driver [[:block 1]]
metabase.driver/with-swapped-connection-details [[:block 2]]
metabase.embedding-rest.api.embed-test/do-response-formats [[:block 1]]
metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]
metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-card-referencing [[:block 3]]
metabase.embedding-rest.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing [[:block 3]]
metabase.embedding-rest.api.embed-test/with-new-secret-key [[:block 0]]
metabase.embedding-rest.api.embed-test/with-temp-card [[:block 1]]
metabase.embedding-rest.api.embed-test/with-temp-dashcard [[:block 1]]
metabase.embedding-rest.api.preview-embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]
metabase.embedding-rest.api.preview-embed-test/with-new-secret-key [[:block 0]]
metabase.lib.binning/with-binning [[:default]]
metabase.lib.core/with-binning [[:default]]
metabase.lib.core/with-join-alias [[:default]]
metabase.lib.core/with-join-conditions [[:default]]
metabase.lib.join/with-join-alias [[:default]]
metabase.lib.join/with-join-conditions [[:default]]
metabase.lib.test-util.macros/$ids [[:inner 0]]
metabase.lib.test-util.macros/mbql-5-query [[:inner 0]]
metabase.lib.test-util.macros/mbql-query [[:inner 0]]
metabase.lib.util.match/match [[:inner 0]]
metabase.lib.util.match/match-one [[:inner 0]]
metabase.lib.util.match/match-lite [[:inner 0]]
metabase.lib.util.match/match-many [[:inner 0]]
metabase.lib.util.match/replace [[:inner 0]]
metabase.lib.util.match/replace-lite [[:inner 0]]
metabase.lib.util.match/replace-in [[:inner 0]]
metabase.models.interface/define-batched-hydration-method [[:inner 0]]
metabase.models.interface/define-simple-hydration-method [[:inner 0]]
metabase.parameters.chain-filter-test/with-clean-field-values-for-field [[:block 1]]
metabase.parameters.chain-filter-test/with-fk-field-to-field-remapping! [[:block 0]]
metabase.parameters.chain-filter-test/with-human-readable-values-remapping! [[:block 0]]
metabase.permissions.core/allow-changing-all-users-group-members [[:block 0]]
metabase.permissions.core/disable-perms-cache [[:block 0]]
metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-card-referencing [[:block 3]]
metabase.public-sharing-rest.api-test/with-sharing-enabled-and-temp-dashcard-referencing [[:block 3]]
metabase.public-sharing-rest.api-test/with-temp-public-card [[:block 1]]
metabase.public-sharing-rest.api-test/with-temp-public-dashboard [[:block 1]]
metabase.public-sharing-rest.api-test/with-temp-public-dashboard-and-card [[:block 1]]
metabase.pulse.api.alert-test/with-alert-in-collection [[:block 1]]
metabase.pulse.dashboard-subscription-test/with-link-card-fixture-for-dashboard [[:block 2]]
metabase.pulse.models.pulse-test/with-dashboard-subscription-in-collection [[:block 1]]
metabase.pulse.models.pulse-test/with-pulse-in-collection [[:inner 0]]
metabase.queries-rest.api.card-test/with-cards-in-readable-collection [[:block 1]]
metabase.queries-rest.api.card-test/with-cards-in-writeable-collection [[:block 1]]
metabase.queries-rest.api.card-test/with-ordered-items [[:inner 0]]
metabase.queries-rest.api.card-test/with-temp-native-card [[:block 1]]
metabase.queries-rest.api.card-test/with-temp-native-card-with-params [[:block 1]]
metabase.query-processor.debug/debug> [[:block 0]]
metabase.query-processor.error-type/deferror [[:block 1]]
metabase.query-processor.middleware.cache-backend.interface/with-cached-results [[:block 4]]
metabase.query-processor.middleware.process-userland-query-test/with-query-execution [[:block 1]]
metabase.query-processor.pipeline-queries-test/pmbql-query [[:block 1]]
metabase.query-processor.pipeline-queries-test/run-pmbql-query [[:block 1]]
metabase.query-processor.store/cached [[:block 1]]
metabase.query-processor.store/with-metadata-provider [[:inner 0]]
metabase.query-processor.streaming/streaming-response [[:block 1]]
metabase.query-processor.test-util/format-rows-by [[:default]]
metabase.query-processor.timeseries-test.util/test-timeseries-drivers [[:block 0]]
metabase.query-processor.timeseries-test/run-mbql-query [[:inner 0]]
metabase.request.core/as-admin [[:block 0]]
metabase.request.core/with-current-request [[:inner 0]]
metabase.request.core/with-current-user [[:inner 0]]
metabase.request.core/with-limit-and-offset [[:inner 0]]
metabase.request.session/as-admin [[:block 0]]
metabase.request.session/with-current-user [[:inner 0]]
metabase.sample-data.impl-test/with-temp-sample-database-db [[:block 1]]
metabase.search.api-test/do-test-users [[:block 1]]
metabase.server.middleware.session/as-admin [[:block 0]]
metabase.server.middleware.session/with-current-user [[:inner 0]]
metabase.server.streaming-response-test/with-streaming-response-thread-pool [[:block 0]]
metabase.server.streaming-response-test/with-test-driver-db! [[:block 0]]
metabase.server.streaming-response/streaming-response [[:block 2]]
metabase.session.api/http-401-on-error [[:block 0]]
metabase.settings.core/define-multi-setting [[:inner 0]]
metabase.settings.core/defsetting [[:block 1]]
metabase.settings.models.setting.multi-setting/define-multi-setting [[:inner 0]]
metabase.settings.models.setting/defsetting [[:block 1]]
metabase.sync.fetch-metadata/log-if-error [[:block 1]]
metabase.sync.sync-metadata.fields-test/with-test-db [[:block 0]]
metabase.sync.util/do-with-start-and-finish-debug-logging [[:default]]
metabase.sync.util/sum-for [[:block 1]]
metabase.sync.util/sync-operation [[:block 3]]
metabase.sync.util/with-db-logging-disabled [[:default]]
metabase.sync.util/with-duplicate-ops-prevented [[:default]]
metabase.sync.util/with-emoji-progress-bar [[:block 1]]
metabase.sync.util/with-error-handling [[:block 1]]
metabase.sync.util/with-start-and-finish-logging [[:default]]
metabase.sync.util/with-start-and-finish-logging* [[:default]]
metabase.sync.util/with-sync-events [[:default]]
metabase.task-history.models.task-history/with-task-history [[:block 1]]
metabase.task.core/rerun-on-error [[:block 1]]
metabase.task.impl/rerun-on-error [[:block 1]]
metabase.test.data.datasets/test-driver [[:inner 0]]
metabase.test.data.datasets/test-drivers [[:inner 0]]
metabase.test.data.one-off-dbs/with-blank-db [[:block 0]]
metabase.test.data.one-off-dbs/with-blueberries-db [[:block 0]]
metabase.test.data.users/with-test-user [[:inner 0]]
metabase.test.data/$ids [[:inner 0]]
metabase.test.data/dataset [[:inner 0]]
metabase.test.data/mbql-query [[:inner 0]]
metabase.test.data/query [[:block 1]]
metabase.test.data/run-mbql-query [[:inner 0]]
metabase.test.data/with-empty-h2-app-db! [[:block 0]]
metabase.test.data/with-temp-copy-of-db [[:block 0]]
metabase.test.util.public-settings/with-additional-premium-features [[:block 1]]
metabase.test.util.public-settings/with-premium-features [[:block 1]]
metabase.test.util.thread-local/test-helpers-set-global-values! [[:block 0]]
metabase.test.util/discard-setting-changes [[:block 1]]
metabase.test.util/let-url [[:block 1]]
metabase.test.util/throw-if-called! [[:block 1]]
metabase.test.util/with-temp-scheduler [[:block 0]]
metabase.test.util/with-temp-vals-in-db [[:block 3]]
metabase.test.util/with-user-in-groups [[:inner 0]]
metabase.test/$ids [[:inner 0]]
metabase.test/as-admin [[:inner 0]]
metabase.test/dataset [[:inner 0]]
metabase.test/discard-setting-changes [[:block 1]]
metabase.test/format-rows-by [[:default]]
metabase.test/let-url [[:block 1]]
metabase.test/mbql-query [[:inner 0]]
metabase.test/query [[:block 1]]
metabase.test/run-mbql-query [[:inner 0]]
metabase.test/test-driver [[:inner 0]]
metabase.test/test-drivers [[:inner 0]]
metabase.test/test-helpers-set-global-values! [[:block 0]]
metabase.test/throw-if-called! [[:block 1]]
metabase.test/with-actions [[:block 1]]
metabase.test/with-actions-disabled [[:block 0]]
metabase.test/with-actions-enabled [[:block 0]]
metabase.test/with-actions-test-data [[:inner 0]]
metabase.test/with-actions-test-data-and-actions-enabled [[:block 0]]
metabase.test/with-actions-test-data-tables [[:block 1]]
metabase.test/with-additional-premium-features [[:block 1]]
metabase.test/with-current-user [[:inner 0]]
metabase.test/with-driver [[:block 1]]
metabase.test/with-empty-db [[:inner 0]]
metabase.test/with-empty-h2-app-db! [[:block 0]]
metabase.test/with-metadata-provider [[:inner 0]]
metabase.test/with-premium-features [[:block 1]]
metabase.test/with-temp [[:inner 0]]
metabase.test/with-temp-copy-of-db [[:block 0]]
metabase.test/with-temp-scheduler [[:block 0]]
metabase.test/with-temp-test-data [[:inner 0]]
metabase.test/with-temp-vals-in-db [[:block 3]]
metabase.test/with-test-user [[:inner 0]]
metabase.test/with-user-in-groups [[:inner 0]]
metabase.upload.impl-test/with-upload-table! [[:inner 0]]
metabase.upload.types/with-currency [[:default]]
metabase.upload.types/with-parens [[:default]]
metabase.util.async/cancelable-thread [[:block 0]]
metabase.util.date-2/with-time-zone-same-instant [[:default]]
metabase.util.encryption-test/with-secret-key [[:block 1]]
metabase.util.honey-sql-2/with-database-type-info [[:default]]
metabase.util.i18n/deferred-trs [[:default]]
metabase.util.i18n/deferred-tru [[:default]]
metabase.util.i18n/trs [[:default]]
metabase.util.i18n/trsn [[:default]]
metabase.util.i18n/tru [[:default]]
metabase.util.i18n/trun [[:default]]
metabase.util.jvm/auto-retry [[:block 1]]
metabase.util.jvm/varargs [[:block 1]]
metabase.util.jvm/with-us-locale [[:block 0]]
metabase.util.malli/disable-enforcement [[:block 0]]
metabase.util.malli/with [[:default]]
metabase.util.malli/with-api-error-message [[:default]]
metabase.util.namespaces/import-fns [[:default]]
metabase.util.queue-test/await-test-while [[:block 1]]
metabase.util/auto-retry [[:block 1]]
metabase.util/case-enum [[:block 1]]
metabase.util/for-map [[:block 1]]
metabase.util/ignore-exceptions [[:block 0]]
metabase.util/or-with [[:block 1]]
metabase.util/profile [[:block 1]]
metabase.util/prog1 [[:inner 0]]
metabase.util/varargs [[:inner 0]]
metabase.util/with-us-locale [[:block 0]]
metabuild-common.core/exit-when-finished-nonzero-on-exception [[:block 0]]
metabuild-common.core/step [[:block 1]]
metabuild-common.entrypoint/exit-when-finished-nonzero-on-exception [[:block 0]]
metabuild-common.steps/step [[:block 1]]
methodical.core/defmethod [[:inner 0]]
methodical.core/defmulti [[:inner 0]]
methodical.core/with-dispatcher [[:default]]
methodical.core/with-method-table [[:default]]
methodical.core/with-prefers [[:default]]
methodical.interface/with-dispatcher [[:default]]
methodical.interface/with-method-table [[:default]]
methodical.interface/with-prefers [[:default]]
methodical.macros/defmethod [[:inner 0]]
methodical.macros/defmulti [[:inner 0]]
saml20-clj.sp.response/validate-confirmation-datas [[:block 1]]
toucan2.connection/with-transaction [[:block 1]]
toucan2.core/build [[:block 0]]
toucan2.core/compile [[:block 0]]
toucan2.core/debug [[:block 0]]
toucan2.core/define-after-insert [[:inner 0]]
toucan2.core/define-after-select [[:inner 0]]
toucan2.core/define-after-update [[:inner 0]]
toucan2.core/define-before-delete [[:inner 0]]
toucan2.core/define-before-insert [[:inner 0]]
toucan2.core/define-before-select [[:inner 0]]
toucan2.core/define-default-fields [[:inner 0]]
toucan2.core/define-named-query [[:block 1]]
toucan2.core/deftransforms [[:block 1]]
toucan2.core/with-transaction [[:block 1]]
toucan2.tools.after-insert/define-after-insert [[:inner 0]]
toucan2.tools.after-select/define-after-select [[:inner 0]]
toucan2.tools.after-update/define-after-update [[:inner 0]]
toucan2.tools.after/define-after-impl [[:default]]
toucan2.tools.before-delete/define-before-delete [[:inner 0]]
toucan2.tools.before-insert/define-before-insert [[:inner 0]]
toucan2.tools.before-select/define-before-select [[:inner 0]]
toucan2.tools.compile/build [[:block 0]]
toucan2.tools.compile/compile [[:block 0]]
toucan2.tools.compile/resolved [[:block 0]]
toucan2.tools.debug/debug [[:block 0]]
toucan2.tools.default-fields/define-default-fields [[:inner 0]]
toucan2.tools.named-query/define-named-query [[:block 1]]
toucan2.tools.simple-out-transform/define-out-transform [[:inner 0]]
toucan2.tools.transformed/deftransforms [[:block 1]]
toucan2.tools.with-temp/with-temp [[:inner 0]]
toucan2.util/try-with-error-context [[:inner 0]]}}

35
.codespellignore Normal file
View File

@@ -0,0 +1,35 @@
afterAll
ags
altho
Brite
cancelation
cancelations
caracteres
copyin
datas
edn
eduction
hasTable
hasTables
horizontalX
horizontalY
juxt
methodd
nd
notIn
optionA
ot
pass-thru
requestor
re-use
re-used
ser
serieses
sortings
titel
trs
trsn
tru
trun
unparseable
withs

24
.codespellrc Normal file
View File

@@ -0,0 +1,24 @@
[codespell]
skip =
*.csv,
*.edn,
*.geojson,
*.json,
*.tsv,
*.unit.spec.*,
*.xml,
docs/developers-guide/drivers/driver-tests.md,
docs/developers-guide/e2e-tests.md,
docs/questions/query-builder/expressions-list.md,
docs/questions/visualizations/country-codes.md,
e2e/test/scenarios/admin/i18n/content-translation/constants.ts,
frontend/src/cljs,
frontend/src/metabase/querying/expressions/tokenizer/lezer.js,
frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/language.ts,
frontend/src/metabase/static-viz/constants/char-sizes.ts,
frontend/src/metabase/visualizations/lib/mapping_codes.ts,
frontend/*/mocks/*,
modules/drivers/mongo/src/metabase/driver/mongo/operators.clj,
src/metabase/analyze/classifiers/name.clj,
src/metabase/util/currency.cljc,
ignore-words = .codespellignore

View File

@@ -1,11 +1,11 @@
FROM mcr.microsoft.com/vscode/devcontainers/java:21
# Set up nodesource, install node, yarn, fontconfig for static viz, rlwrap for dev ergonomics
# Set up nodesource, install node, bun, fontconfig for static viz, rlwrap for dev ergonomics
RUN ( curl -fsSL https://deb.nodesource.com/setup_22.x | bash ) \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com \
&& apt-get update && apt-get -y install --no-install-recommends nodejs yarn rlwrap fontconfig
&& apt-get update && apt-get -y install --no-install-recommends nodejs rlwrap fontconfig \
&& npm install -g bun
# install Clojure
RUN curl https://download.clojure.org/install/linux-install-1.12.0.1488.sh | bash

View File

@@ -61,6 +61,7 @@
(eval . (put-clojure-indent 'u/prog1 1))
(eval . (put-clojure-indent 'u/select-keys-when '(:form)))
(eval . (put-clojure-indent 'with-meta '(:form)))
(eval . (put-clojure-indent 'ws.log/track! 2))
;; these ones have to be done with `define-clojure-indent' for now because of upstream bug
;; https://github.com/clojure-emacs/clojure-mode/issues/600 once that's resolved we should use `put-clojure-indent'
;; instead. Please don't add new entries unless they don't work with `put-clojure-indent'

View File

@@ -1,5 +1,4 @@
.babel_cache
docs/*
target/*
.circleci
.cpcache

163
.env.example Normal file
View File

@@ -0,0 +1,163 @@
# ==============================================================================
# 0. METABASE DEVELOPMENT ENVIRONMENT
# ==============================================================================
#
# Central configuration for local Metabase development.
# Copy to .env and uncomment/modify values as needed.
#
# Usage:
# op inject --in-file .env.example --out-file .env (populate using CLI)
# cp .env.example .env (populate manually)
#
# Hint: Auto-load environment variables with mise or direnv:
# mise - mise.toml: [settings] env_file = ".env" (https://mise.jdx.dev)
# direnv - Create .envrc with: dotenv .env (https://direnv.net)
#
# Full Metabase environment configuration reference:
# https://www.metabase.com/docs/latest/configuring-metabase/environment-variables
#
# ⚠️ Make sure the same var is not exported multiple times in different contexts.
# ==============================================================================
# 1. GLOBAL CONTEXT
# ==============================================================================
#
# Shared credentials and tokens used across multiple dev workflows.
# GitHub - For gh CLI, API access, and CI integrations
# https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
# GITHUB_TOKEN=your-PAT
# AWS - For S3, Athena, Redshift, and other AWS services
# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
# AWS_ACCESS_KEY_ID=your-access-key
# AWS_SECRET_ACCESS_KEY=your-secret-key
# AWS_REGION=us-east-1
# Docker Hub - Avoid rate limits when pulling images
# https://docs.docker.com/security/for-developers/access-tokens/
# DOCKER_USERNAME=your-username
# DOCKER_PASSWORD=your-access-token
# ==============================================================================
# 2. LOCAL METABASE DEVELOPMENT
# ==============================================================================
#
# Settings for running Metabase locally. Most have sensible defaults—only
# configure what you need.
# 2.1 Application Database
# ------------------------------------------------------------------------------
# Where Metabase stores its own data (dashboards, users, settings, etc.).
# https://www.metabase.com/docs/latest/installation-and-operation/configuring-application-database
# Option A: Individual connection parameters
# MB_DB_TYPE="postgres"
# MB_DB_HOST="localhost"
# MB_DB_PORT=5432
# MB_DB_DBNAME="metabase"
# MB_DB_USER="<username>"
# MB_DB_PASS="<password>"
# Option B: Single connection URI (overrides individual params)
# MB_DB_CONNECTION_URI="jdbc:postgresql://localhost:5432/metabase?user=<username>&password=<password>"
# 2.2 Server & Integrations
# ------------------------------------------------------------------------------
# https://www.metabase.com/docs/latest/configuring-metabase/customizing-jetty-webserver
# Jetty server (defaults: localhost:3000)
# MB_JETTY_HOST="localhost"
# MB_JETTY_PORT=3000
# SMTP for testing email notifications (use with maildev/maildev container)
MB_EMAIL_SMTP_HOST="localhost"
MB_EMAIL_SMTP_PORT=1025
MB_EMAIL_SMTP_USERNAME="admin"
MB_EMAIL_SMTP_PASSWORD="admin"
# 2.3 Feature Flags & Tokens
# ------------------------------------------------------------------------------
# Use staging server for license validation (avoids hitting production)
METASTORE_DEV_SERVER_URL="https://token-check.staging.metabase.com"
# Metabase license token
# Uncomment this line only when running local dev and NEVER when running Cypress
# Tests need to start from zero, and set different tokens programmatically (on-demand)
# MB_PREMIUM_EMBEDDING_TOKEN="op://Shared/Metabase License Dev Tokens/Licenses/MB_ALL_FEATURES_TOKEN"
# Skip embedding SDK build for faster frontend compilation
# SKIP_EMBEDDING_SDK="true"
# ==============================================================================
# 3. E2E / CYPRESS TESTING
# ==============================================================================
#
# Configuration for running Cypress end-to-end tests locally.
#
# The whole environment is already orchestrated via deps.edn using :e2e alias.
# Treat it as a source of truth for JVM flags and ENVs whether you decide to run
# backend on your own, or using `bun run test-cypress` (local test runner).
#
# You don't _have to_ export any of these vars (except for the tokens below).
# Things will still work.
# 3.1. E2E Application Database (H2 required)
# ------------------------------------------------------------------------------
# Whether to run the enterprise or the open-source Metabase version
MB_EDITION="ee"
# Which file to use for the ephemeral testing application database?
# MB_DB_FILE="./e2e/tmp/cypress-test.db"
# Where does Cypress go to look for the application? (defaults: localhost:4000)
# MB_JETTY_HOST="localhost"
# MB_JETTY_PORT=4000
# Frontend dev server port (for hot reload). Must match the port used by `yarn build-hot`.
# MB_FRONTEND_DEV_PORT=8080
# 3.2 E2E Local Runner Setup
# ------------------------------------------------------------------------------
# Whether to run true e2e test suite, or SDK component tests (e2e | component)
CYPRESS_TESTING_TYPE="e2e"
# Whether to start Cypress in an interactive (open) mode with full GUI
CYPRESS_GUI="true"
# Whether to generate application database dumps (colloquially "snapshots")
# Keep this enabled unless you're experimenting, or know what you're doing.
GENERATE_SNAPSHOTS="true"
# E2E tests run the backend from source by default.
# To run tests against a JAR instead, set the JAR_PATH variable.
#
# Hint: build the JAR with ./bin/build.sh
# JAR_PATH="target/uberjar/metabase.jar"
# 3.3 E2E Tokens
# ------------------------------------------------------------------------------
#
# These make sense for Metabase core devs only
# op inject --in-file .env.example --out-file .env
CYPRESS_MB_ALL_FEATURES_TOKEN="op://Shared/Metabase License Dev Tokens/Licenses/MB_ALL_FEATURES_TOKEN"
CYPRESS_MB_STARTER_CLOUD_TOKEN="op://Shared/Metabase License Dev Tokens/Licenses/MB_STARTER_CLOUD_TOKEN"
CYPRESS_MB_PRO_CLOUD_TOKEN="op://Shared/Metabase License Dev Tokens/Licenses/MB_PRO_CLOUD_TOKEN"
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN="op://Shared/Metabase License Dev Tokens/Licenses/MB_PRO_SELF_HOSTED_TOKEN"
# 3.4 E2E Misc.
# ------------------------------------------------------------------------------
# To make Node.js match the instance tz
TZ="US/Pacific"
# Export this environment variable when running tests on Apple Silicon.
# DO NOT USE Docker Desktop. Use Orbstack instead. Metabase will fail to connect
# to the dockerized Mongo QA database otherwise.
EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU=1

View File

@@ -1,4 +0,0 @@
frontend/src/cljs
frontend/src/cljs_release
e2e/support/cypress_sample_database.js
e2e/support/cypress_sample_instance_data.js

View File

@@ -1,337 +0,0 @@
/* eslint-disable import/no-commonjs */
/* eslint-disable no-undef */
// `postcss-modules` lints css modules class names, but it currently crashes
// eslint on vscode. If you use webstorm or want to run the lint for the cli, you
// can use this flag to enable it. This is set to true in CI
const shouldLintCssModules =
process.env.LINT_CSS_MODULES === "true" || process.env.CI;
const plugins = ["react", "no-only-tests", "ttag", "i18next"];
if (shouldLintCssModules) {
plugins.push("postcss-modules");
}
module.exports = {
rules: {
strict: [2, "never"],
"no-undef": 2,
"no-var": 1,
"no-unused-vars": [
"error",
{
vars: "all",
args: "none",
varsIgnorePattern: "^_.+$",
ignoreRestSiblings: true,
},
],
"no-empty": [1, { allowEmptyCatch: true }],
// Note: adding this rule to a eslint config file in a subfolder will remove
// *not* carry over the restricted imports from parent folders, you will
// need to copy them over
"no-restricted-imports": [
"error",
{
paths: [
{
name: "moment",
message: "Moment is deprecated, please use dayjs",
},
{
name: "moment-timezone",
message: "Moment is deprecated, please use dayjs",
},
],
},
],
curly: [1, "all"],
eqeqeq: [1, "smart"],
"import/no-default-export": 2,
"import/no-named-as-default": 0,
"import/no-commonjs": 1,
"import/order": [
"error",
{
"newlines-between": "always",
alphabetize: {
order: "asc",
orderImportKind: "asc",
caseInsensitive: false,
},
groups: [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
],
warnOnUnassignedImports: false,
},
],
"sort-imports": [
"error",
{
// allows this rule to work with import/order
ignoreDeclarationSort: true,
},
],
"no-console": [2, { allow: ["warn", "error", "errorBuffer"] }],
"react/no-is-mounted": 2,
"react/prefer-es6-class": 2,
"react/display-name": 1,
"react/prop-types": 2,
"react/no-did-mount-set-state": 0,
"react/no-did-update-set-state": 0,
"react/no-find-dom-node": 0,
"react/no-children-prop": 2,
"react/no-string-refs": 2,
"react/no-unescaped-entities": 2,
"react/jsx-no-target-blank": 2,
"react/jsx-key": 2,
"react/forbid-component-props": [2, { forbid: ["sx"] }],
"react-hooks/exhaustive-deps": [
"warn",
{ additionalHooks: "(useSafeAsyncFunction)" },
],
"prefer-const": [1, { destructuring: "all" }],
"no-restricted-globals": ["error", "close"],
"no-useless-escape": 0,
"no-only-tests/no-only-tests": [
"error",
{
block: [
"describe",
"it",
"context",
"test",
"tape",
"fixture",
"serial",
"Feature",
"Scenario",
"Given",
"And",
"When",
"Then",
"describeWithSnowplow",
],
},
],
complexity: ["error", { max: 55 }],
...(shouldLintCssModules
? {
"postcss-modules/no-undef-class": "error",
}
: {}),
},
globals: {
before: true,
cy: true,
Cypress: true,
},
env: {
browser: true,
es6: true,
commonjs: true,
jest: true,
"jest/globals": true,
},
parser: "babel-eslint",
plugins,
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:depend/recommended",
"plugin:storybook/recommended",
"plugin:i18next/recommended",
],
settings: {
"import/internal-regex": "^metabase/|^metabase-lib/",
"import/resolver": {
webpack: {
typescript: true,
},
},
"import/ignore": ["\\.css$"],
react: {
version: "detect",
},
"postcss-modules": {
baseDir: "./frontend/src",
},
},
parserOptions: {
ecmaFeatures: {
legacyDecorators: true,
},
},
overrides: [
{
files: ["*.js", "*.jsx", "*.ts", "*.tsx"],
rules: {
"no-unconditional-metabase-links-render": "error",
"no-color-literals": "error",
"no-literal-metabase-strings": "error",
"depend/ban-dependencies": [
"error",
{
allowed: [
"underscore",
"moment",
"lodash.orderby",
"lodash.debounce",
],
},
],
},
},
{
files: [
"*.unit.spec.*",
"frontend/src/metabase/admin/**/*",
"frontend/src/metabase/setup/**/*",
"enterprise/frontend/src/metabase-enterprise/whitelabel/**/*",
"frontend/lint/**/*",
"*.stories.*",
"stories-data.*",
"e2e/**/*",
"**/tests/*",
"release/**/*",
"webpack.config.js",
"rspack.config.js",
],
rules: {
"no-color-literals": "off",
"no-unconditional-metabase-links-render": "off",
"no-literal-metabase-strings": "off",
},
},
{
files: [
"*.unit.spec.*",
"frontend/lint/**/*",
"*.stories.*",
"stories-data.*",
"e2e/**/*",
"**/tests/*",
"release/**/*",
"webpack.config.js",
"rspack.config.js",
],
rules: {
"i18next/no-literal-string": "off",
},
},
{
extends: ["plugin:@typescript-eslint/recommended"],
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
rules: {
"prefer-rest-params": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/consistent-type-imports": [
"error",
{
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_.+$",
varsIgnorePattern: "^_.+$",
ignoreRestSiblings: true,
destructuredArrayIgnorePattern: "^_.+$",
},
],
// This was introduced in 6.0.0
"@typescript-eslint/no-unsafe-declaration-merging": "off",
},
},
{
extends: [
"plugin:jest/recommended",
"plugin:jest-dom/recommended",
"plugin:testing-library/react",
"plugin:jest-formatting/recommended",
],
plugins: ["jest", "jest-dom", "testing-library", "jest-formatting"],
files: [
"*.unit.spec.ts",
"*.unit.spec.tsx",
"*.unit.spec.js",
"*.unit.spec.jsx",
],
rules: {
"jest/valid-title": ["error", { ignoreTypeOfDescribeName: true }],
"jest/expect-expect": [
"error",
{
assertFunctionNames: ["expect*", "assert*"],
additionalTestBlockFunctions: [],
},
],
},
},
{
// Enable jest formatting for cypress tests too, the plugin logic just works
extends: ["plugin:jest-formatting/recommended"],
files: ["*.cy.spec.ts", "*.cy.spec.js"],
},
{
files: ["frontend/src/**/*"],
rules: {
"no-restricted-syntax": [
"error",
{
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/**/*"],
rules: {
"no-restricted-syntax": [
"error",
{
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: {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"import/no-commonjs": "off",
"import/no-default-export": "off",
"import/order": "off",
"import/no-unresolved": "off",
"no-color-literals": "off",
},
},
],
};

7
.gitattributes vendored Normal file
View File

@@ -0,0 +1,7 @@
# Custom merge driver for YAML migration files
# Treats each changeset as an atomic unit to avoid conflicts within changesets
# Execute this in your shell to enable custom merge driver:
# echo '\n[include]\npath=../.gitconfig' >> .git/config
#
# TODO (Bryan 12/12/25) -- reenable this when we can completely verify correctness
# resources/migrations/*.yaml merge=yaml-migrations

5
.gitconfig Normal file
View File

@@ -0,0 +1,5 @@
# execute this in your shell to enable custom merge driver:
# echo '\n[include]\npath=../.gitconfig' >> .git/config
[merge "yaml-migrations"]
name = YAML migration changeset-aware merge
driver = bin/mage -merge-yaml-migrations %O %A %B %L %P

50
.github/CODEOWNERS vendored
View File

@@ -1,11 +1,13 @@
# Before changing this file, make sure you have read how we use it:
# https://www.notion.so/metabase/Pull-Request-Code-Review-Guide-374f05df889748b69d67af753f9bc9b8?pvs=4#36550c04ceab40b5a8b8bee6264b090c
enterprise/frontend/src/embedding-sdk @metabase/embedding
enterprise/frontend/src/embedding-sdk-package @metabase/embedding
enterprise/frontend/src/embedding-sdk-bundle @metabase/embedding
enterprise/frontend/src/embedding-sdk-shared @metabase/embedding
frontend/src/metabase/embedding-sdk @metabase/embedding
frontend/src/metabase/public/containers/PublicOrEmbeddedQuestion @metabase/embedding
frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard @metabase/embedding
frontend/src/metabase/ui @metabase/core-frontend-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
@@ -20,8 +22,8 @@ docs/developers-guide # exclude from tech-writer ownership
#
# modules/drivers @metabase/drivers
src/metabase/driver/sql_jdbc/actions.clj @metabase/core-workflows
test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-workflows
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
@@ -53,8 +55,8 @@ test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-workflows
# 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
@@ -71,11 +73,11 @@ test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-workflows
# 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
@@ -95,8 +97,8 @@ test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-workflows
# 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
@@ -122,11 +124,11 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# 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
@@ -158,8 +160,8 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# 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
@@ -182,8 +184,8 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# 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
@@ -200,8 +202,8 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# src/metabase/public_sharing @metabase/core-backend-admin-webapp
# test/metabase/public_sharing @metabase/core-backend-admin-webapp
# src/metabase/pulse @metabase/core-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
@@ -218,8 +220,8 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# src/metabase/sample_data @metabase/core-backend-admin-webapp
# test/metabase/sample_data @metabase/core-backend-admin-webapp
# src/metabase/search @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,23 +0,0 @@
---
name: Epic (Internal Use)
about: This issue is used to track a feature/project that may span several days
to weeks to implement. This is used by the core Metabase team to project plan
and manage work.
title: "[Epic] Title"
labels: ".Epic"
---
### Links
- [product doc](LINK_TO_PRODUCT_DOC)
- [technical design doc](LINK_TO_TECHNICAL_DESIGN_DOC)
- [testing plan](LINK_TO_TESTING_PLAN)
- feature branch: `BRANCH_NAME`
- issue links: _related issues, if any_
### Implementation Plan
```[tasklist]
#### Milestone 1
- [ ] _Add tasks here_
```

View File

@@ -7,16 +7,13 @@ assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**What problem will this feature request solve?**
**Describe the solution you'd like**
**Describe the solution you'd like.**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**How does this feature request impact you?**
For example, is it a minor inconvenience, or does it block important work?
**How important is this feature to you?**
**Additional context**
**Additional information**
Add any other context or screenshots about the feature request here.

View File

@@ -1,14 +0,0 @@
---
name: Task (Internal Use)
about: This issue is used to track a smaller feature/task that does not require
being broken down to milestones. This is used by the core Metabase team to
project plan and manage work.
labels: ".Task"
---
**Context**
- issue links: _related issues if any_

View File

@@ -3,7 +3,7 @@
> **Warning**
>
> If that is your first contribution to Metabase, please sign the [Contributor License Agreement](https://docs.google.com/a/metabase.com/forms/d/1oV38o7b9ONFSwuzwmERRMi9SYrhYeOrkbmNaq9pOJ_E/viewform) (unless it's a tiny documentation change). Also, if you're attempting to fix a translation issue, please submit your changes to our [Crowdin project](https://crowdin.com/project/metabase-i18n) instead of opening a PR.
> If that is your first contribution to Metabase, please sign the [Contributor License Agreement](https://docs.google.com/a/metabase.com/forms/d/1oV38o7b9ONFSwuzwmERRMi9SYrhYeOrkbmNaq9pOJ_E/viewform). Also, if you're attempting to fix a translation issue, please submit your changes to our [Crowdin project](https://crowdin.com/project/metabase-i18n) instead of opening a PR.
Closes https://github.com/metabase/metabase/issues/[issue_number]
@@ -25,3 +25,4 @@ _Upload a demo video or before/after screenshots if sensible or remove the secti
### Checklist
- [ ] Tests have been added/updated to cover changes in this PR
- [ ] If adding new Loki tests: they pass [stress testing](https://github.com/metabase/metabase/actions/workflows/loki-stress-test-flake-fix.yml)

View File

@@ -5,7 +5,7 @@ PENDING CI / PENDING REVIEW / READY _(choose one and update accordingly)_
- Reproduces #XXXXX
### How to test this manually?
- `yarn test-cypress`
- `bun run test-cypress`
- `relative/path/to/the/file`
> _(For still unfixed bug)_
- Replace `it.skip()` with `it.only()` to run the test in isolation

View File

@@ -1,4 +1,5 @@
name: Wait for localhost port to be ready
name: await-port
description: Wait for localhost port to be ready
inputs:
port:

View File

@@ -0,0 +1,36 @@
name: Cleanup Python Runner
description: Cleanup python-runner services and upload logs as artifacts
inputs:
upload-logs:
description: 'Whether to upload logs (typically on failure)'
required: false
default: 'false'
logs-artifact-suffix:
description: 'The unique name of the .zip artifact containing the logs'
required: false
default: ''
runs:
using: composite
steps:
- name: Cleanup python-runner services
if: always()
run: |
echo "Stopping python-runner services..."
if [ -d "python-runner" ]; then
cd python-runner
make stop || echo "WARNING: Failed to stop python runner"
fi
shell: bash
- name: Upload python-runner logs
if: ${{inputs.upload-logs == 'true' && inputs.logs-artifact-suffix != ''}}
uses: actions/upload-artifact@v4
with:
name: python-runner-logs-${{inputs.logs-artifact-suffix}}
path: |
python-runner.out.log
python-runner.err.log
retention-days: 1
if-no-files-found: warn

View File

@@ -74,7 +74,7 @@ runs:
git push -u origin ${BACKPORT_BRANCH}
BACKPORT_PR_URL=$(gh pr create --base "${TARGET_BRANCH}" --head "${BACKPORT_BRANCH}" --label "was-backported" --assignee "${GITHUB_ACTOR}" --title "🤖 backported \"${ORIGINAL_TITLE}\"" --body "${PR_BODY}")
BACKPORT_PR_URL=$(gh pr create --base "${TARGET_BRANCH}" --head "${BACKPORT_BRANCH}" --label "was-backported" --assignee "${{ github.event.pull_request.user.login }}" --title "🤖 backported \"${ORIGINAL_TITLE}\"" --body "${PR_BODY}")
BACKPORT_PR_NUMBER=${BACKPORT_PR_URL##*/}
echo "backport_pr_number=$BACKPORT_PR_NUMBER" >> $GITHUB_OUTPUT

View File

@@ -17,8 +17,6 @@ runs:
- name: Prepare backend environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: cross-branch-migrations
- name: Run backend on base branch
run: |

View File

@@ -2,9 +2,24 @@ name: Fetch artifact
description: Fetches a specific artifact and downloads it to the current directory
inputs:
name:
description: The name of the artifact to fetch
commit:
description: Commit SHA for the artifact
required: true
edition:
description: Metabase edition (ee or oss)
required: true
release:
description: Whether this is a release artifact (uses metabase-release- prefix)
required: false
default: "false"
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"
@@ -17,15 +32,21 @@ runs:
script: | # js
const fs = require('fs');
const isRelease = "${{ inputs.release }}" === "true";
const prefix = isRelease ? "metabase-release" : "metabase";
const artifactName = `${prefix}-${{ inputs.edition }}-${{ inputs.commit }}-uberjar`;
console.log(`Looking for artifact: ${artifactName}`);
const artifacts = await github.rest.actions.listArtifactsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
name: "${{ inputs.name }}",
name: artifactName,
per_page: 1,
});
if (!artifacts.data?.artifacts?.[0]?.id) {
throw new Error(`No artifacts found for ${{ inputs.commit }}`);
core.setFailed(`No artifacts found for ${artifactName}`);
return;
}
const artifact_id = artifacts.data.artifacts[0].id;
@@ -39,25 +60,59 @@ runs:
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/mb.zip`, Buffer.from(download.data));
- name: unzip uberjar artifact
shell: bash
run: unzip mb.zip
- name: Move the Uberjar
- name: Extract and rename JAR
shell: bash
run: | # bash
if [ -e "metabase.jar" ]; then
echo "metabase.jar is already in the right place"
elif [ -e "target/uberjar/metabase.jar" ]; then
echo "moving metabase.jar to current directory"
mv target/uberjar/metabase.jar metabase.jar
OUTPUT_NAME="${{ inputs.output-name }}"
EXTRACT_PATH="${{ inputs.extract-path }}"
# Create a temporary directory for extraction to avoid conflicts
TEMP_DIR=$(mktemp -d)
# Extract to temporary directory
unzip mb.zip -d "$TEMP_DIR"
# Create target directory
mkdir -p "$EXTRACT_PATH"
# Find the jar and move all files from its directory
if [ -e "$TEMP_DIR/metabase.jar" ]; then
# Move all files to extract path
mv "$TEMP_DIR"/* "$EXTRACT_PATH/" 2>/dev/null || true
# Rename the jar to custom name if different
if [ "$OUTPUT_NAME" != "metabase.jar" ]; then
mv "$EXTRACT_PATH/metabase.jar" "$EXTRACT_PATH/$OUTPUT_NAME"
fi
elif [ -e "$TEMP_DIR/target/uberjar/metabase.jar" ]; then
# Move all files from uberjar directory to extract path
mv "$TEMP_DIR/target/uberjar"/* "$EXTRACT_PATH/" 2>/dev/null || true
# Rename the jar to custom name if different
if [ "$OUTPUT_NAME" != "metabase.jar" ]; then
mv "$EXTRACT_PATH/metabase.jar" "$EXTRACT_PATH/$OUTPUT_NAME"
fi
else
echo "Could not find the metabase.jar file"
echo "Could not find metabase.jar in extracted files"
exit 1
fi
# Clean up temporary directory
rm -rf "$TEMP_DIR"
# Set the JAR_PATH environment variable
if [ "$EXTRACT_PATH" == "." ]; then
echo "JAR_PATH=$OUTPUT_NAME" >> $GITHUB_ENV
else
echo "JAR_PATH=$EXTRACT_PATH/$OUTPUT_NAME" >> $GITHUB_ENV
fi
- name: Verify that this is a valid JAR file
shell: bash
run: 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,37 @@
name: Get cache keys
description: |
Get deterministic cache keys for Maven and Node.js caches based on the centrally controlled cache prefix,
and the suffix based on the runner OS and the current week of the year.
outputs:
m2-cache-key:
description: "The cache key for the Maven cache."
value: ${{ steps.keys-factory.outputs.m2-cache-key }}
node-cache-key:
description: "The cache key for the Node.js cache."
value: ${{ steps.keys-factory.outputs.node-cache-key }}
eslint-cache-key:
description: "The cache key for Eslint cache"
value: ${{ steps.keys-factory.outputs.eslint-cache-key }}
cypress-cache-key:
description: "The cache key for Cypress cache"
value: ${{ steps.keys-factory.outputs.cypress-cache-key }}
runs:
using: "composite"
steps:
- name: Generate and output cache keys
id: keys-factory
run: |
M2_CACHE_PREFIX='M2'
NODE_CACHE_PREFIX='node-modules'
ESLINT_CACHE_PREFIX='eslint'
CYPRESS_CACHE_PREFIX='cypress'
WEEK_OF_YEAR=$(/bin/date "+%G-%V")
CACHE_SUFFIX="${{ runner.os }}-$WEEK_OF_YEAR"
echo "m2-cache-key=$M2_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUT
echo "node-cache-key=$NODE_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUT
echo "eslint-cache-key=$ESLINT_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUT
echo "cypress-cache-key=$CYPRESS_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUT
shell: bash

View File

@@ -0,0 +1,74 @@
name: Get Docker Info
description: Determines Docker repository and tag based on branch and edition
inputs:
branch:
description: Branch name (defaults to current branch)
required: false
default: ${{ github.head_ref || github.ref_name }}
edition:
description: Edition (ee or oss)
required: false
default: ee
owner:
description: Repository owner (defaults to current repo owner)
required: false
default: ${{ github.repository_owner }}
outputs:
repo:
description: Docker repository name
value: ${{ steps.docker-info.outputs.repo }}
tag:
description: Docker tag
value: ${{ steps.docker-info.outputs.tag }}
full_image:
description: Full Docker image name (repo:tag)
value: ${{ steps.docker-info.outputs.full_image }}
editions:
description: JSON array of editions to build
value: ${{ steps.docker-info.outputs.editions }}
runs:
using: "composite"
steps:
- name: Determine Docker info
id: docker-info
uses: actions/github-script@v7
with:
script: | # js
const branch = '${{ inputs.branch }}';
const edition = '${{ inputs.edition }}';
const owner = '${{ inputs.owner }}';
console.log(`Determining Docker info for branch: ${branch}, edition: ${edition}`);
let repo, tag, editions;
if (branch === 'master') {
// Master builds both editions with specific repos
editions = ['ee', 'oss'];
tag = 'latest';
if (edition === 'ee') {
repo = `${owner}/metabase-enterprise-head`;
} else {
repo = `${owner}/metabase-head`;
}
} else {
// All other branches only build EE to metabase-dev
editions = ['ee'];
tag = branch.replaceAll('/', '-'); // slashes make docker sad
repo = `${owner}/metabase-dev`;
}
const fullImage = `${repo}:${tag}`;
// Set outputs
core.setOutput('repo', repo);
core.setOutput('tag', tag);
core.setOutput('full_image', fullImage);
core.setOutput('editions', JSON.stringify(editions));
console.log(`Docker image: ${fullImage}`);
console.log(`Editions: ${JSON.stringify(editions)}`);

View File

@@ -0,0 +1,19 @@
name: Maximize disk space
description: Removes unused stuff from GH runner
runs:
using: "composite"
steps:
- name: Maximize build space
shell: bash
run: |
echo "-- Dotnet"
sudo rm -rf /usr/share/dotnet
echo "-- Android"
sudo rm -rf /usr/local/lib/android
echo "-- Haskell"
sudo rm -rf /opt/ghc
echo "-- CodeQL"
sudo rm -rf /opt/hostedtoolcache/CodeQL
df -h

View File

@@ -1,15 +1,13 @@
name: Prepare back-end environment
description: |
Prepare the backend. Installs jdk, Clojure, and fetches the cache for m2.
inputs:
java-version:
required: true
default: '21'
default: "21"
clojure-version:
required: true
default: '1.12.0.1488'
m2-cache-key:
description: 'Key to cache M2 packages from Maven Central'
required: true
default: 'm2'
default: "1.12.0.1488"
runs:
using: "composite"
@@ -18,23 +16,29 @@ runs:
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java-version }}
distribution: 'temurin'
distribution: "temurin"
- name: Install Clojure CLI
shell: bash
continue-on-error: true
run: |
curl -O https://download.clojure.org/install/linux-install-${{ inputs.clojure-version }}.sh &&
sudo bash ./linux-install-${{ inputs.clojure-version }}.sh
- name: Check to see if dependencies should be cached
if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }}
run: echo "Commit message includes [ci nocache]; dependencies will NOT be cached"
shell: bash
- name: Get M2 cache
uses: actions/cache@v4
if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }}
- name: Get M2 cache key
uses: ./.github/actions/get-cache-keys
id: get-cache-keys
- name: Install uv (for Python package installation)
uses: astral-sh/setup-uv@v7
with:
enable-cache: false
version: "0.10.2" # keep in sync with mise.toml
github-token: ${{ github.token }}
- name: Restore M2 cache
uses: actions/cache/restore@v4
with:
path: |
~/.m2
~/.gitlibs
key: ${{ runner.os }}-${{ inputs.m2-cache-key }}-${{ hashFiles('**/deps.edn') }}
restore-keys: |
${{ runner.os }}-${{ inputs.m2-cache-key }}-
key: ${{ steps.get-cache-keys.outputs.m2-cache-key }}

View File

@@ -3,7 +3,7 @@ description: Cypress preparation steps
inputs:
working-directory:
description: "Optional working directory for yarn commands"
description: "Optional working directory for bun commands"
required: false
default: "."
@@ -15,28 +15,27 @@ outputs:
runs:
using: "composite"
steps:
- name: Install Chrome v111
uses: browser-actions/setup-chrome@v1
- name: Install Chrome v144
uses: browser-actions/setup-chrome@v2
with:
# https://chromium.cypress.io/linux/stable/111.0.5563.146
chrome-version: 1097615
chrome-version: 144
id: setup-chrome
- name: Check to see if dependencies should be cached
if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }}
run: echo "Commit message includes [ci nocache]; dependencies will NOT be cached"
shell: bash
- name: Get cache keys
uses: ./.github/actions/get-cache-keys
id: get-cache-keys
- name: Get Cypress cache
uses: actions/cache@v4
if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }}
uses: actions/cache/restore@v4
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-Cypress-${{ hashFiles('**/yarn.lock') }}
key: ${{ steps.get-cache-keys.outputs.cypress-cache-key }}
- name: Ensure that Cypress executable is ready
run: |
yarn cypress install
yarn cypress cache path
yarn cypress cache list
yarn cypress verify
bun run cypress install
bun run cypress cache path
bun run cypress cache list
bun run cypress verify
shell: bash
working-directory: ${{ inputs.working-directory }}

View File

@@ -1,8 +1,13 @@
name: Prepare front-end environment
description: "Prepare the front-end environment for the CI build"
inputs:
node-version:
description: "The version of Node.js to use, overriding .nvmrc"
required: false
apply-patches:
description: "Whether to patch frontend dependencies with patch-package."
required: true
default: "true"
runs:
using: "composite"
steps:
@@ -12,26 +17,48 @@ runs:
node-version: ${{ inputs.node-version }} # this overrides, if present
node-version-file: ".nvmrc"
- name: Check to see if dependencies should be cached
if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }}
- name: Install bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.7"
token: ${{ github.token }}
- name: Get cache keys
uses: ./.github/actions/get-cache-keys
id: get-cache-keys
- name: Restore M2 cache
uses: actions/cache/restore@v4
with:
path: |
~/.m2
~/.gitlibs
key: ${{ steps.get-cache-keys.outputs.m2-cache-key }}
- name: Get bun cache directory
id: bun-cache
run: |
echo "Commit message includes [ci nocache]; dependencies will NOT be cached"
yarn cache clean
BUN_CACHE_DIR=$(bun pm cache)
echo "Bun cache directory: $BUN_CACHE_DIR"
echo "dir=$BUN_CACHE_DIR" >> $GITHUB_OUTPUT
shell: bash
- name: Get M2 cache
uses: actions/cache@v4
if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }}
with:
path: ~/.m2
key: ${{ runner.os }}-cljs-${{ hashFiles('**/shadow-cljs.edn') }}
- name: Get node_modules cache
uses: actions/cache@v4
- name: Restore node_modules cache
uses: actions/cache/restore@v4
id: node-modules-cache
if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }}
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock', '**/patches/*.patch') }}
path: |
${{ steps.bun-cache.outputs.dir }}
node_modules
key: ${{ steps.get-cache-keys.outputs.node-cache-key }}
- run: yarn install --frozen-lockfile --prefer-offline
# postinstall lifecycle hook can be dangerous in CI so we only run it locally (see package.json)
# If a job wants to patch packages, it does so explicitly in the CI. This setting is opt-out.
# For example, we never want to cache node_modules with patches already applied so cache-generator.yml skips that step.
- name: Clean install
run: bun install --frozen-lockfile
shell: bash
- name: Patch frontend dependencies
if: inputs.apply-patches == 'true'
run: bun run patch-package
shell: bash

View File

@@ -0,0 +1,14 @@
name: Prepare Release Scripts
description: Set up bun and build release scripts
runs:
using: composite
steps:
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.7"
token: ${{ github.token }}
- name: Build release scripts
shell: bash
run: cd ${{ github.workspace }}/release && bun install --frozen-lockfile && bun run build

View File

@@ -0,0 +1,132 @@
name: Prepare Shoppy E2E environment
description: Shared setup steps for Shoppy E2E tests (regular and synthetic)
inputs:
commit:
description: "Commit SHA for artifact retrieval"
required: true
sample-app-branch-name:
description: "Branch name for the sample app"
required: true
sample-app-environment:
description: "Environment (production/development)"
required: true
staging-mb-all-features-token:
description: "Staging MB all features token"
required: true
shoppy-iam-role:
description: "Shoppy IAM role for AWS credentials"
required: true
shoppy-metabase-app-db-s3-bucket:
description: "S3 bucket for Shoppy app DB dump"
required: true
shoppy-metabase-app-db-s3-key:
description: "S3 key for Shoppy app DB dump"
required: true
shoppy-metabase-app-db-user:
description: "Shoppy Metabase app DB user"
required: true
shoppy-metabase-app-db-database:
description: "Shoppy Metabase app DB database"
required: true
metastore-dev-server-url:
description: "Metastore dev server URL"
required: true
shoppy-datadog-application-id:
description: "Shoppy Datadog application ID"
required: true
shoppy-datadog-client-token:
description: "Shoppy Datadog client token"
required: true
outputs:
chrome-path:
description: "Path to Chrome executable"
value: ${{ steps.cypress-prep.outputs.chrome-path }}
sample_app_branch_exists:
description: "Whether the sample app branch exists"
value: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists }}
runs:
using: "composite"
steps:
- uses: ./.github/actions/maximize-disk-space
# 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: Retrieve uberjar artifact for ee
uses: ./.github/actions/fetch-artifact
with:
commit: ${{ inputs.commit }}
edition: ee
extract-path: "target/uberjar"
output-name: "metabase.jar"
- name: Retrieve Embedding SDK dist artifact
uses: actions/download-artifact@v4
with:
name: embedding-sdk-${{ inputs.commit }}
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
shell: bash
env:
SAMPLE_APP_BRANCH_NAME: ${{ inputs.sample-app-branch-name }}
run: |
REPO_URL="https://github.com/metabase/shoppy.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: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ inputs.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: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' }}
shell: bash
run: |
aws s3 cp s3://${{ inputs.shoppy-metabase-app-db-s3-bucket }}/${{ inputs.shoppy-metabase-app-db-s3-key }} ./e2e/tmp/db_dumps/shoppy_metabase_app_db_dump.sql
- name: Prepare and launch Shoppy containers
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' }}
shell: bash
env:
SAMPLE_APP_BRANCH_NAME: ${{ inputs.sample-app-branch-name }}
SAMPLE_APP_ENVIRONMENT: ${{ inputs.sample-app-environment }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ inputs.staging-mb-all-features-token }}
METASTORE_DEV_SERVER_URL: ${{ inputs.metastore-dev-server-url }}
METABASE_APP_DB_USER: ${{ inputs.shoppy-metabase-app-db-user }}
METABASE_APP_DB: ${{ inputs.shoppy-metabase-app-db-database }}
SHOPPY_DATADOG_APPLICATION_ID: ${{ inputs.shoppy-datadog-application-id }}
SHOPPY_DATADOG_CLIENT_TOKEN: ${{ inputs.shoppy-datadog-client-token }}
SHOPPY_DATADOG_SITE: "us5.datadoghq.com"
SHOPPY_DATADOG_ENV: "staging"
run: npx tsx ./e2e/runner/embedding-sdk/sample-apps/start-ci.ts shoppy-e2e
- name: Prune build cache
shell: bash
run: docker builder prune -af
- name: Log free disk space
shell: bash
run: df -h /

View File

@@ -2,9 +2,10 @@ name: Prepare Uberjar Artifact
description: Prepare and upload Metabase JAR as a GitHub artifact.
inputs:
name:
required: true
description: Artifact name
edition:
required: false
default: "ee"
description: Metabase edition (ee or oss)
runs:
using: "composite"
@@ -18,7 +19,7 @@ runs:
- name: Upload JARs as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
name: metabase-${{ inputs.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
path: |
./target/uberjar/metabase.jar
./COMMIT-ID

View File

@@ -1,33 +0,0 @@
name: Run Embedding SDK Storybook
runs:
using: "composite"
steps:
- name: Prepare frontend environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Compile CLJS
run: yarn build-pure:cljs
shell: bash
- name: Build Storybook
run: yarn build-storybook-embedding-sdk
shell: bash
- name: Serve Storybook
run: yarn http-server storybook-static -p 6006 &
shell: bash
- name: Wait for Storybook to become available
run: |
echo "Waiting for Storybook to be served..."
while ! curl --silent --fail http://localhost:6006; do
sleep 5
echo "Retrying..."
done
echo "Storybook is being served!"
shell: bash

View File

@@ -0,0 +1,77 @@
name: Embedding SDK Bundle Size Check
description: |
Downloads the current branch's uberjar and builds the base ref's
embedding-sdk.js from source, compares their sizes,
and sets output if the size change exceeds the threshold.
inputs:
edition:
description: 'Metabase edition (ee or oss)'
required: true
base-ref-commit:
description: 'Commit SHA of the base ref (e.g. merge base).'
required: true
threshold-percent:
description: 'Percent threshold for bundle size change'
required: true
outputs:
status:
description: "Bundle size status: increased, decreased, or stable"
value: ${{ steps.compare.outputs.status }}
size_change_percent:
description: "size change percent (positive = increase, negative = decrease)"
value: ${{ steps.compare.outputs.size_change_percent }}
runs:
using: "composite"
steps:
- name: Prepare backend
uses: ./.github/actions/prepare-backend
- name: Prepare frontend
uses: ./.github/actions/prepare-frontend
- name: Download current uberjar
uses: actions/download-artifact@v4
with:
name: metabase-${{ inputs.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
path: temp/current-uberjar
- name: Extract embedding-sdk.js from current uberjar
shell: bash
run: unzip -j temp/current-uberjar/target/uberjar/metabase.jar frontend_client/app/embedding-sdk.js -d temp/current-bundle
- name: Checkout base ref
uses: actions/checkout@v4
with:
ref: ${{ inputs.base-ref-commit }}
path: temp/base-ref-src
- name: Build base-ref embedding-sdk.js
shell: bash
run: |
cd temp/base-ref-src
bun install
MB_EDITION=${{ inputs.edition }} bun run build-release
- name: Compare sizes and set output
id: compare
shell: bash
run: |
current_size=$(wc -c < temp/current-bundle/embedding-sdk.js) || { echo "::error::Failed to read current bundle"; exit 1; }
base_ref_size=$(wc -c < temp/base-ref-src/resources/frontend_client/app/embedding-sdk.js) || { echo "::error::Failed to read base-ref bundle"; exit 1; }
[ "$current_size" -gt 0 ] && [ "$base_ref_size" -gt 0 ] || { echo "::error::Bundle file is empty"; exit 1; }
diff=$((current_size - base_ref_size))
percent=$(( diff * 100 / base_ref_size ))
echo "Current size: $current_size bytes"
echo "Base ref size: $base_ref_size bytes"
echo "Difference: $diff bytes ($percent%)"
threshold="${{ inputs.threshold-percent }}"
if [ "$percent" -gt "$threshold" ]; then
status="increased"
elif [ "$percent" -lt "$(( -threshold ))" ]; then
status="decreased"
else
status="stable"
fi
echo "status=$status" >> $GITHUB_OUTPUT
echo "size_change_percent=$percent" >> $GITHUB_OUTPUT

View File

@@ -0,0 +1,14 @@
name: Setup Python Runner
description: Setup python-runner for tests
inputs:
metabase-automation-token:
description: Token for accessing the python-runner repository
required: true
runs:
using: composite
steps:
- name: Setup python-runner
run: ./.github/scripts/setup-python-runner.sh
shell: bash
env:
METABASE_AUTOMATION_USER_TOKEN: ${{ inputs.metabase-automation-token }}

View File

@@ -1,4 +1,5 @@
name: Test database driver
description: Test database driver
inputs:
junit-name:
required: true
@@ -8,29 +9,47 @@ inputs:
build-static-viz:
required: true
default: false
logs-artifact-suffix:
required: false
description: Suffix to append to the test logs artifact name to avoid conflicts in matrix jobs
edition:
required: false
default: 'ee'
description: Edition to test (oss or ee)
outputs:
test-outcome:
description: "The outcome of the test run (success, failure, cancelled, skipped)"
value: ${{ steps.run-test.outcome }}
runs:
using: "composite"
steps:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: driver
- name: Prepare front-end environment
if: ${{ inputs.build-static-viz == 'true' }}
uses: ./.github/actions/prepare-frontend
if: ${{ inputs.build-static-viz == 'true' }}
- name: Build static viz frontend
run: yarn build-static-viz
shell: bash
if: ${{ inputs.build-static-viz == 'true' }}
run: bun run build-static-viz
shell: bash
env:
MB_EDITION: ee
- name: Test database driver
run: clojure -X:dev:ci:ee:ee-dev:drivers:drivers-dev:test ${{ inputs.test-args }}
run: clojure -X:dev:ci:${{ inputs.edition }}:${{ inputs.edition }}-dev:drivers:drivers-dev:test ${{ inputs.test-args }}
shell: bash
id: run-test
# Trunk Quarantine controls the final state of the run in the CI!
# Even if this step fails we let it pass, and then `trunk-io/analytics-uploader` determines
# whether to fail or to pass the whole job, based on the quarantine list.
continue-on-error: true
- name: Publish Test Report (JUnit)
uses: dorny/test-reporter@v1
if: failure()
# As per the documentation: https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#steps-context
# test.outcome gives us access to the result before `continue-on-error` overrides it and sets it to 'success'.
# We want test reports even if the test step gets cancelled (e.g. times out), hence we match anything that is not a 'success'.
if: ${{ steps.run-test.outcome != 'success' }}
with:
path: "target/junit/**/*_test.xml"
name: JUnit Test Report ${{ inputs.junit-name }}
@@ -39,9 +58,11 @@ runs:
list-tests: failed
fail-on-error: false
- name: Upload Logs on Failure
if: failure()
if: always() && steps.run-test.outcome != 'success'
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ github.job }}
name: ${{ format('test-logs-{0}{1}', github.job, inputs.logs-artifact-suffix && format('-{0}', inputs.logs-artifact-suffix) || '') }}
path: logs/test-log.json
retention-days: 1
# Failing to upload the artifact should never affect the outcome of the whole test run.
continue-on-error: true

41
.github/actions/update-cache/action.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Update cache
description: |
Update a GitHub Actions cache based on a provided path and key.
If a cache entry already exists for the given key, it is first removed.
This ensures immutability of cache entries, and prevents runtime errors.
inputs:
path:
description: "The path(s) to cache, separated by newlines."
required: true
key:
description: "The cache key to use."
required: true
runs:
using: "composite"
steps:
- name: Check if the cache entry exists
id: cache-lookup
uses: actions/cache/restore@v4
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
lookup-only: true # Important bit: the action will not fetch anything, just check for the cache existence.
- name: Delete the cache entry if it exists
if: ${{ steps.cache-lookup.outputs.cache-hit == 'true' }}
run: |
echo "Cache entry found for key '${{ inputs.key }}'. Deleting it to ensure immutability."
gh api \
--method DELETE \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/actions/caches?key=${{ inputs.key }}
env:
GH_TOKEN: ${{ github.token }}
shell: bash
- name: Save the new cache entry
uses: actions/cache/save@v4
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}

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

@@ -20,7 +20,9 @@ inputs:
required: true
variant:
required: false
default: ''
default: ""
previous-step-outcome:
required: true
runs:
using: "composite"
@@ -48,11 +50,13 @@ runs:
aws s3 cp ${OUTPUT_FILE}.zip s3://$BUCKET/$DATE/$GITHUB_RUN_ID/$GITHUB_RUN_ATTEMPT/
- name: Upload results to Trunk
if: ${{ always() && !(github.event_name == 'pull_request' && github.event.pull_request.draft == true) }}
if: always() # Important! This step must always run because it controls job's exit code.
uses: trunk-io/analytics-uploader@main
with:
junit-paths: ${{ inputs.input-path }}
variant: ${{ inputs.variant || inputs.output-name }}
org-slug: metabase
dry-run: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == true }} # quarantine, but do not upload results
token: ${{ inputs.trunk-api-token }}
continue-on-error: true
use-cache: true
previous-step-outcome: ${{ inputs.previous-step-outcome }}

View File

@@ -1,3 +1,5 @@
version: 1
name: "Metabase CodeQL config"
paths-ignore:

55
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,55 @@
# Metabase Developer Assistant Instructions
For detailed coding standards and conventions, see `CLAUDE.md` and the skills in `.claude/skills/`.
## Code Review Standards
Review focus areas: Security → Performance → Testing → Documentation (in priority order)
When reviewing code, use these emoji prefixes to categorize feedback:
- 🔒 Security concerns
- ⚡ Performance opportunities
- 🧹 Cleanup needs
- 📚 Documentation gaps
- 🚨 Blocking issues
- 💭 Clarification questions
### Security Critical Issues
- Check for hardcoded secrets, API keys, or credentials
- Look for SQL injection and XSS vulnerabilities
- Verify proper input validation and sanitization
- Review authentication and authorization logic
- Ensure enterprise features use the plugin system (no enterprise code in OSS)
### Performance Red Flags
- Identify N+1 database query problems
- Spot inefficient loops and algorithmic issues
- Check for memory leaks and resource cleanup
- Review caching opportunities for expensive operations
### Code Quality Essentials
- Functions should be focused and appropriately sized
- Use clear, descriptive naming conventions
- Ensure proper error handling throughout
- Remove dead code and unused imports
### Review Style
- Only flag actual issues worth mentioning
- Do not post "looks good" comments or congratulate following conventions
- Be specific and actionable in feedback
- Explain the "why" behind recommendations
- Ask clarifying questions when code intent is unclear
### Review Format
- Condense feedback into as few comments as possible
- Prefer a single summary comment over dozens of inline comments
- Only use inline comments for critical issues that require immediate attention
- For non-critical issues, link to the specific line from the summary instead
- Delete all stale comments and summaries on each new push or CI run
Language-specific rules are in `.github/instructions/*.instructions.md`.

View File

@@ -11,27 +11,32 @@ shared_specs: &shared_specs
- "test/**/*.cljc"
- "test/**/*.cljs"
frontend_ci: &frontend_ci
shared_ci: &shared_ci
- ".github/actions/prepare-frontend/**"
- ".github/actions/prepare-backend/**"
- ".github/workflows/run-tests.yml"
shared_e2e: &shared_e2e
- "e2e/runner/**"
- "e2e/snapshot-creators/**"
- "e2e/support/**"
frontend_ci: &frontend_ci
- *shared_ci
- ".github/workflows/frontend.yml"
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"
- "bun.lock"
- "**/tsconfig*.json"
- "package.json"
- "babel.config.json"
- ".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
@@ -40,9 +45,14 @@ frontend_sources: &frontend_sources
- "enterprise/frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
- "frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
frontend_embedding_sdk_sources:
- *frontend_configs
- "enterprise/frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
# Used only in .github/workflows/conventional-commit-pr-title-reminder.yml
frontend_embedding_sources:
- "enterprise/frontend/src/{embedding,embedding-*}/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
- "enterprise/frontend/src/metabase-enterprise/{embedding,embedding-*}**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
# Used only in .github/workflows/embedding-sdk-labels-reminder.yml
frontend_embedding_sdk_package_sources:
- "enterprise/frontend/src/embedding-sdk-package/**/!(*.spec).{js,jsx,ts,tsx,css}"
frontend_specs: &frontend_specs
- *shared_specs
@@ -68,15 +78,16 @@ frontend_loki_ci: &frontend_loki_ci
- ".storybook/**"
backend_ci: &backend_ci
- ".github/actions/prepare-frontend/**"
- ".github/actions/prepare-backend/**"
- *shared_ci
- ".github/actions/test-driver/**"
- ".github/workflows/backend.yml"
- ".github/workflows/drivers.yml"
backend_presto_kerberos:
- "**/presto_jdbc/**"
- "**/presto-jdbc/**" # the driver module has a hyphen. underscores are classpaths
- "**/presto_jdbc.clj"
- "**/presto_jdbc_test.clj"
- ".github/workflows/presto-kerberos-integration-test.yml"
backend_sources: &backend_sources
@@ -109,9 +120,9 @@ sources: &sources
- *backend_sources
e2e_ci: &e2e_ci
- ".github/actions/prepare-frontend/**"
- ".github/actions/prepare-backend/**"
- *shared_ci
- ".github/actions/prepare-uberjar-artifact/**"
- ".github/actions/fetch-artifact/action.yml"
- ".github/actions/e2e-prepare-containers/**"
- ".github/actions/prepare-cypress/**"
- ".github/workflows/e2e-*"
@@ -119,33 +130,40 @@ e2e_ci: &e2e_ci
e2e_specs: &e2e_specs
- e2e/!(test-host-app)**/*.cy.*.{js,ts}
e2e_cross_version: &e2e_cross_version
- ".github/workflows/e2e-cross-version.yml"
- "e2e/test/scenarios/cross-version/**"
embedding_sdk_ci: &embedding_sdk_ci
- *shared_ci
- ".github/actions/prepare-uberjar-artifact/**"
- ".github/actions/fetch-artifact/action.yml"
- ".github/actions/prepare-cypress/**"
- ".github/workflows/embedding-sdk*.yml"
e2e_embedding_sdk:
- *frontend_embedding_sdk_ci
- *sources
- "e2e/component/**/*.cy.*.{js,ts}"
e2e_embedding_sdk_compatibility:
embedding_sdk_components:
- *default
- *frontend_embedding_sdk_ci
- *embedding_sdk_ci
- *sources
- *shared_e2e
- "e2e/test-component/**/*.cy.*.{js,jsx,ts,tsx}"
embedding_sdk_host_sample_apps:
- *default
- *embedding_sdk_ci
- *frontend_sources
- *backend_sources
- *shared_e2e
- "e2e/embedding-sdk-host-apps/**"
- "e2e/runner/embedding-sdk/**"
- "e2e/test-host-app/**/*.cy.*.{js,ts}"
snowplow: &snowplow
- ".github/workflows/snowplow.yml"
- "snowplow/**"
e2e_all:
- *default
- *e2e_ci
- *sources
- *e2e_specs
- "e2e/**"
snowplow:
- ".github/workflows/snowplow.yml"
- "snowplow/**"
- *snowplow
documentation:
- "docs/**"
@@ -160,6 +178,7 @@ yaml:
- "**/*.yaml"
codeql:
- ".github/workflows/codeql.yml"
- "frontend/src/**"
- "enterprise/frontend/src/**"
@@ -180,3 +199,15 @@ cljs:
- *shared_specs
- ".github/workflows/cljs.yml"
- "shadow-cljs.edn"
openapi:
- ".github/workflows/openapi.yml"
- "src/metabase/api/**"
- "src/metabase/api_routes/**"
- "src/metabase/*_rest/api.clj"
- "src/metabase/*/api.clj"
- "src/metabase/*/api/*.clj"
- "enterprise/backend/src/metabase_enterprise/**/api.clj"
- "enterprise/backend/src/metabase_enterprise/**/api/*.clj"
- "resources/openapi/**"
- "package.json"

View File

@@ -0,0 +1,9 @@
---
applyTo: "**/*.{clj,cljs,cljc}"
---
# Clojure/ClojureScript Code Review
When reviewing Clojure or ClojureScript code, apply the guidelines in these files:
- `.claude/skills/_shared/clojure-style-guide.md`
- `.claude/skills/clojure-review/SKILL.md`

View File

@@ -0,0 +1,9 @@
---
applyTo: "docs/**/*.md"
---
# Documentation Review
When reviewing documentation, apply the guidelines in these files:
- `.claude/skills/_shared/metabase-style-guide.md`
- `.claude/skills/docs-review/SKILL.md`

View File

@@ -0,0 +1,11 @@
---
applyTo: "**/*.{ts,tsx,js,jsx}"
---
# TypeScript/JavaScript Code Review
When reviewing TypeScript or JavaScript code, apply the guidelines in these files:
- `.claude/skills/typescript-review/SKILL.md`
- `docs/developers-guide/frontend.md`
- `frontend/CLAUDE.md`

171
.github/scripts/average-e2e-timings.js vendored Normal file
View File

@@ -0,0 +1,171 @@
const fs = require("fs");
const path = require("path");
const { execSync } = require("child_process");
const collectAndAverageTimings = async ({
github,
context,
daysBack = 7,
existingTimingsPath = "e2e/support/timings.json",
}) => {
try {
const artifacts = await findMergedTimingArtifacts({
github,
context,
daysBack,
});
if (artifacts.length === 0) {
throw new Error("No timing artifacts found in the specified time range");
}
const timingData = await downloadAndExtractArtifacts(
artifacts,
github,
context,
);
if (timingData.length === 0) {
throw new Error("No valid timing data extracted from artifacts");
}
const averagedTimings = averageTimings(timingData);
averagedTimings.durations.sort((a, b) => a.spec.localeCompare(b.spec));
fs.writeFileSync(
existingTimingsPath,
JSON.stringify(averagedTimings, null, 2),
);
console.log(`✅ Updated ${existingTimingsPath} with new timing data`);
return { artifactCount: timingData.length };
} catch (error) {
console.error("❌ Error in collectAndAverageTimings:", error.message);
throw error;
}
};
const findMergedTimingArtifacts = async ({ github, context, daysBack }) => {
const cutoffDate = new Date();
cutoffDate.setDate(cutoffDate.getDate() - daysBack);
console.log(
`Searching for merged timing artifacts created after ${cutoffDate.toISOString()}`,
);
const artifacts = [];
let page = 1;
while (true) {
try {
const { data } = await github.rest.actions.listArtifactsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
name: "merged-e2e-timings",
per_page: 100,
page,
});
const validArtifacts = data.artifacts
.filter((a) => new Date(a.created_at) > cutoffDate && !a.expired)
.map(({ name, created_at, id }) => ({ name, created_at, id }));
artifacts.push(...validArtifacts);
if (
data.artifacts.some((a) => new Date(a.created_at) <= cutoffDate) ||
data.artifacts.length < 100
) {
break;
}
page++;
} catch (error) {
console.log(
`Error fetching artifacts page ${page - 1}: ${error.message}`,
);
break;
}
}
console.log(`Found ${artifacts.length} merged timing artifacts total`);
return artifacts;
};
const downloadAndExtractArtifacts = async (artifacts, github, context) => {
const tempDir = "timing-artifacts-temp";
fs.mkdirSync(tempDir, { recursive: true });
const timingData = [];
for (const artifact of artifacts) {
try {
console.log(`Downloading artifact: ${artifact.name}`);
const zipPath = path.join(tempDir, `${artifact.name}.zip`);
const extractPath = path.join(tempDir, artifact.name);
const { data } = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
archive_format: "zip",
});
fs.writeFileSync(zipPath, Buffer.from(data));
fs.mkdirSync(extractPath, { recursive: true });
execSync(`unzip -q "${zipPath}" -d "${extractPath}"`);
const timingFilePath = path.join(extractPath, "runTimings.json");
if (fs.existsSync(timingFilePath)) {
const content = JSON.parse(fs.readFileSync(timingFilePath, "utf8"));
if (content.durations?.length) {
timingData.push(content);
console.log(
`✅ Extracted timing data from ${artifact.name} (${content.durations.length} specs)`,
);
} else {
console.log(`⚠ Invalid timing data structure in ${artifact.name}`);
}
} else {
console.log(`⚠ No timing data found in ${artifact.name}`);
}
fs.rmSync(extractPath, { recursive: true });
} catch (error) {
console.log(`❌ Error processing ${artifact.name}: ${error.message}`);
}
}
fs.rmSync(tempDir, { recursive: true });
console.log(
`Successfully extracted timing data from ${timingData.length}/${artifacts.length} artifacts`,
);
return timingData;
};
const averageTimings = (timingDataArray) => {
if (!timingDataArray.length) {
throw new Error("No timing data to process");
}
const specTimings = timingDataArray
.flatMap((data) => data.durations)
.filter((item) => item.spec && typeof item.duration === "number")
.reduce((acc, { spec, duration }) => {
(acc[spec] = acc[spec] || []).push(duration);
return acc;
}, {});
const durations = Object.entries(specTimings).map(([spec, durations]) => ({
spec,
duration: Math.round(
durations.reduce((sum, d) => sum + d, 0) / durations.length,
),
}));
return { durations };
};
module.exports = { collectAndAverageTimings, averageTimings };

View File

@@ -0,0 +1,132 @@
const { averageTimings } = require("./average-e2e-timings");
describe("averageTimings", () => {
it("should throw error when given empty array", () => {
expect(() => averageTimings([])).toThrow("No timing data to process");
});
it("should work for n=1", () => {
const input = [
{
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
},
];
const result = averageTimings(input);
expect(result.durations).toHaveLength(2);
expect(result.durations).toContainEqual({
spec: "test1.cy.js",
duration: 1000,
});
expect(result.durations).toContainEqual({
spec: "test2.cy.js",
duration: 2000,
});
});
it("should calculate average for multiple specs", () => {
const input = [
{
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
},
{
durations: [
{ spec: "test1.cy.js", duration: 2000 },
{ spec: "test2.cy.js", duration: 4000 },
],
},
];
const result = averageTimings(input);
expect(result.durations).toHaveLength(2);
expect(result.durations).toContainEqual({
spec: "test1.cy.js",
duration: 1500,
});
expect(result.durations).toContainEqual({
spec: "test2.cy.js",
duration: 3000,
});
});
it("should round averages to nearest integer", () => {
const input = [
{
durations: [{ spec: "test1.cy.js", duration: 1001 }],
},
{
durations: [{ spec: "test1.cy.js", duration: 1002 }],
},
];
const result = averageTimings(input);
expect(result.durations[0].duration).toBe(1002);
});
it("should ignore invalid entries", () => {
const input = [
{
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: "invalid" },
{ duration: 2000 }, // missing spec
{ spec: "test3.cy.js", duration: 3000 },
],
},
];
const result = averageTimings(input);
expect(result.durations).toHaveLength(2);
expect(result.durations).toContainEqual({
spec: "test1.cy.js",
duration: 1000,
});
expect(result.durations).toContainEqual({
spec: "test3.cy.js",
duration: 3000,
});
});
it("should handle merging different specs", () => {
const input = [
{
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
},
{
durations: [
{ spec: "test1.cy.js", duration: 3000 },
{ spec: "test3.cy.js", duration: 1000 },
],
},
];
const result = averageTimings(input);
expect(result.durations).toHaveLength(3);
expect(result.durations).toContainEqual({
spec: "test1.cy.js",
duration: 2000,
});
expect(result.durations).toContainEqual({
spec: "test2.cy.js",
duration: 2000,
});
expect(result.durations).toContainEqual({
spec: "test3.cy.js",
duration: 1000,
});
});
});

View File

@@ -3,14 +3,8 @@
// grouping some specific tests together, other tests are split into chunks
const DEFAULT_SPEC_PATTERN = "./e2e/test/scenarios/**/*.cy.spec.*";
const EMBEDDING_SDK_SPEC_PATTERN =
"./e2e/test/scenarios/embedding-sdk/**.cy.spec.*";
const specialTestConfigs = [
{
name: "embedding-sdk",
specs: EMBEDDING_SDK_SPEC_PATTERN,
},
{
name: "oss-subset",
edition: "oss",
@@ -18,6 +12,7 @@ const specialTestConfigs = [
specs: DEFAULT_SPEC_PATTERN,
},
{ name: "mongo", tags: "@mongo", specs: DEFAULT_SPEC_PATTERN },
{ name: "python", tags: "@python", specs: DEFAULT_SPEC_PATTERN },
];
/**

View File

@@ -21,10 +21,10 @@ describe("buildMatrix", () => {
});
it("should apply default specs path when empty entry is provided", () => {
const result = testBuildMatrix("", 5);
const result = testBuildMatrix("", 6);
expect(result.regularChunks).toBe(2);
expect(result.config.length).toBe(5);
expect(result.regularChunks).toBe(3);
expect(result.config.length).toBe(6);
});
it("should name regular test groups sequentially", () => {
@@ -43,9 +43,9 @@ describe("buildMatrix", () => {
expect(result.regularChunks).toBe(0);
expect(result.config.length).toBe(3);
expect(result.config[0].name).toBe("embedding-sdk");
expect(result.config[1].name).toBe("oss-subset");
expect(result.config[2].name).toBe("mongo");
expect(result.config[0].name).toBe("oss-subset");
expect(result.config[1].name).toBe("mongo");
expect(result.config[2].name).toBe("python");
});
it("should correctly calculate regularChunks for non-default spec pattern", () => {
@@ -83,9 +83,9 @@ describe("buildMatrix", () => {
it("should return special test configs when default spec pattern is provided", () => {
const result = testBuildMatrix("./e2e/test/scenarios/**/*.cy.spec.*", 50);
expect(result.config[47].name).toBe("embedding-sdk");
expect(result.config[48].name).toBe("oss-subset");
expect(result.config[49].name).toBe("mongo");
expect(result.config[47].name).toBe("oss-subset");
expect(result.config[48].name).toBe("mongo");
expect(result.config[49].name).toBe("python");
});
it("should not return special test configs when non-default spec pattern is provided", () => {

View File

@@ -1,24 +1,66 @@
exports.updateComment = updateComment;
const TYPES = new Set([
"feat",
"fix",
"perf",
"docs",
"style",
"refactor",
"test",
"build",
"ci",
]);
/**
* @param title {string}
*/
function isConventionalTitle(title) {
const match = /^(?<type>\w+)\((?<rawScopes>[^)]+)\):/.exec(title);
if (!match) {
return false;
}
const [, type, rawScopes] = match;
const scopes = rawScopes
.split(",")
.map((scope) => scope.trim())
.filter(Boolean);
return TYPES.has(type) && scopes.length > 0;
}
/** @param {import('@types/github-script').AsyncFunctionArguments} AsyncFunctionArguments */
async function updateComment({ github, context }) {
async function updateCommentForEmbedding({ github, context }) {
const githubUsername = context.payload.sender.login;
const comment = `${CONVENTIONAL_COMMIT_REMINDER_COMMENT_IDENTIFIER}
@${githubUsername} You have modified embedding SDK code. Please make sure the PR title follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) style.
Here are all the supported types that will be shown in the changelog:
const comment = `${CONVENTIONAL_COMMENT_IDENTIFIER}
@${githubUsername} You have modified embedding code. Please make sure the PR title follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) style.
Here are all the supported types:
- \`feat\`
- \`fix\`
- \`perf\`
- \`docs\`
- \`style\`
- \`refactor\`
- \`test\`
- \`build\`
- \`ci\`
These types \`docs\`, \`style\`, \`refactor\`, \`test\`, \`build\`, and \`ci\` are also encouraged for non-changelog related tasks.
Please also make sure to include \`sdk\` scope, otherwise, the changelog will not include this task.
Please also make sure to include a scope.
For example, these are valid PR titles:
- \`feat(sdk): Add interactive dashboard component\`
- \`feat(sdk): Support theming pie chart\`
- \`fix(sdk): Fix static dashboard crash\``;
- \`feat(sdk-bundle): Add interactive dashboard component\`
- \`fix(sdk-package): Fixed MetabaseProviderPropsStore logic\`
- \`fix(sdk-package, embed-js): Fix API\``;
return updateComment(comment, { github, context });
}
/**
* @param comment {string}
* @param {import('@types/github-script').AsyncFunctionArguments} AsyncFunctionArguments
*/
async function updateComment(comment, { github, context }) {
const owner = context.repo.owner;
const repo = context.repo.repo;
const pullRequestNumber = context.issue.number;
@@ -49,20 +91,19 @@ For example, these are valid PR titles:
}
}
const CONVENTIONAL_COMMIT_REMINDER_COMMENT_IDENTIFIER =
"<!---conventional commit reminder comment ID-->";
const CONVENTIONAL_COMMENT_IDENTIFIER =
"<!---conventional comment identifier-->";
/**
* @typedef Comment
* @property {string} body
*
* @param {Comment[]} comments
* @param comments {{body: string}[]}
*/
function getExistingConventionalCommitReminderComment(comments) {
for (const comment of comments) {
if (
comment.body.startsWith(CONVENTIONAL_COMMIT_REMINDER_COMMENT_IDENTIFIER)
) {
if (comment.body.startsWith(CONVENTIONAL_COMMENT_IDENTIFIER)) {
return comment;
}
}
}
exports.isConventionalTitle = isConventionalTitle;
exports.updateCommentForEmbedding = updateCommentForEmbedding;

View File

@@ -0,0 +1,45 @@
const { isConventionalTitle } = require("./utils");
describe("isConventionalTitle", () => {
it("returns true for a simple conventional commit", () => {
expect(isConventionalTitle("feat: add new feature")).toBe(false);
});
it("returns true for a commit with a scope", () => {
expect(isConventionalTitle("fix(api): correct API bug")).toBe(true);
});
it("returns true for a commit with multiple scopes, comma separated", () => {
expect(isConventionalTitle("feat(build,deps): update dependencies")).toBe(
true,
);
});
it("returns true for a commit with multiple scopes, comma separated with space", () => {
expect(isConventionalTitle("feat(build, deps): update dependencies")).toBe(
true,
);
});
it("returns false for a commit with round brackets in a message", () => {
expect(isConventionalTitle("feat: (something) update dependencies")).toBe(
false,
);
});
it("returns false for missing colon", () => {
expect(isConventionalTitle("feat add feature")).toBe(false);
});
it("returns false for invalid type", () => {
expect(isConventionalTitle("invalidType: some message")).toBe(false);
});
it("returns false for empty message", () => {
expect(isConventionalTitle("feat:")).toBe(false);
});
it("returns false for empty input", () => {
expect(isConventionalTitle("")).toBe(false);
});
});

41
.github/scripts/csv-to-mb.js vendored Normal file
View File

@@ -0,0 +1,41 @@
/**
* jsonData must be in the format:
* [
* { column1: value1, column2: value2, ... },
* { column1: value3, column2: value4, ... },
* ...
* ]
*/
function jsonToCsvFormData(jsonData) {
const formData = new FormData();
const csvHeader = Object.keys(jsonData[0]).join(',') + '\n';
const csvContent = jsonData.map(row =>
Object.values(row).map(value => `"${String(value).replace(/"/g, '""')}"`).join(',')
).join('\n');
const blob = new Blob([csvHeader + csvContent], { type: 'text/csv' });
formData.append('file', blob, 'data.csv');
return formData;
}
function uploadCsvToMb({ baseUrl, tableId, jsonData, mode = 'append' }) {
const formData = jsonToCsvFormData(jsonData);
const operation = mode === 'replace' ? 'replace-csv' : 'append-csv';
return fetch(`${baseUrl}/api/table/${tableId}/${operation}`, {
method: 'POST',
headers: {
"x-api-key": process.env.API_KEY
},
body: formData
})
.then(response => {
if (!response.ok) {
throw new Error(`Upload failed`);
}
return { success: true };
});
}
module.exports = { uploadCsvToMb };

Some files were not shown because too many files have changed in this diff Show More