Compare commits

...

1214 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
9211 changed files with 921433 additions and 516469 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

@@ -29,7 +29,7 @@ This guide covers Clojure and ClojureScript coding conventions for Metabase. See
**Comments:**
- `TODO` format: `;; TODO (Name M/D/YY) -- description`
- `TODO` format: `;; TODO (Name YYYY-MM-DD) -- description`
## Code Organization
@@ -42,7 +42,7 @@ This guide covers Clojure and ClojureScript coding conventions for Metabase. See
- Break up functions > 20 lines
- Lines ≤ 120 characters
- No blank lines within definition forms (except pairwise `let`/`cond`)
- No blank non-comment lines within definition forms (except pairwise `let`/`cond`)
## Style Conventions

View File

@@ -1,21 +1,21 @@
## Linting and Formatting
- **Lint:** `yarn lint-eslint-pure`
- **Lint:** `bun run lint-eslint-pure`
- Run ESLint on the codebase
- **Format:** `yarn prettier`
- **Format:** `bun run prettier`
- Format code using Prettier
- **Type Check:** `yarn type-check-pure`
- **Type Check:** `bun run type-check-pure`
- Run TypeScript type checking
## Testing
### JavaScript/TypeScript Tests
- **Test a specific file:** `yarn test-unit-keep-cljs path/to/file.unit.spec.js`
- **Test by pattern:** `yarn test-unit-keep-cljs -t "pattern"`
- **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:** `yarn test-cljs`
- **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

@@ -54,14 +54,14 @@ Use this to scan through changes efficiently:
- [ ] 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 1/1/25) -- description`
- [ ] `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 lines within definition forms (except pairwise constructs in `let`/`cond`)
- [ ] No blank, non-comment lines within definition forms (except pairwise constructs in `let`/`cond`)
- [ ] Lines ≤ 120 characters
### Tests
@@ -118,7 +118,7 @@ Quick scan for common issues:
| `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 1/1/25) -- description` |
| `;; 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` |

View File

@@ -54,8 +54,6 @@ Run through the diff looking for these issues:
**Formatting:**
- [ ] Backticks on UI elements (should use **bold**)
- [ ] Backticks used as quotation marks
- [ ] Ampersands as "and" substitute (except proper nouns)
- [ ] Inconsistent list formatting
@@ -74,7 +72,6 @@ Run through the diff looking for these issues:
| Pattern | Issue |
| ----------------------------- | --------------------------------------------- |
| `Button name` or `UI element` | Should use **bold** not backticks |
| 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 |
@@ -108,13 +105,10 @@ Suggested fix or explanation
**Examples:**
> **Issue 1: Backticks on UI elements**
> Line 42: This uses backticks for the UI element. Use **bold** instead: **Filter** not `Filter`.
> **Issue 2: Formal tone**
> **Issue 1: Formal tone**
> Line 15: This could be more conversational. Consider: "You can't..." instead of "You cannot..."
> **Issue 3: Vague heading**
> **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
@@ -145,10 +139,11 @@ When posting to GitHub (PR mode), use the **pending review workflow**:
- All comments will appear together as one cohesive review
**Comment format example:**
```
**Issue 1: Backticks on UI elements**
This uses backticks for the UI element. Use **bold** instead: **Filter** not `Filter`.
```
**Issue 1: Formal tone**
This could be more conversational. Consider: "You can't..." instead of "You cannot..."
```
**IMPORTANT**:

View File

@@ -40,7 +40,7 @@ allowed-tools: Read, Write, Grep, Bash, Glob
**Format:**
- Run prettier on the file after making edits: `yarn prettier --write <file-path>`
- Run prettier on the file after making edits: `bun run prettier --write <file-path>`
- This ensures consistent formatting across all documentation
### Common patterns

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

@@ -12,8 +12,9 @@ allowed-tools: Read, Grep, Bash, Glob
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
- Clear and correct JSDoc comments
- Type safety and proper TypeScript usage
- React best practices (when applicable)
- React best practices (when applicable)

View File

@@ -1,7 +1,7 @@
;; -*- comment-column: 100; -*-
{:config-paths ["macros" "src" "config"]
:linters
{ ;;
{;;
;; enabled optional linters (these are disabled by default)
;;
@@ -50,13 +50,15 @@
;; disabled linters
;;
:redundant-ignore {:level :off} ; lots of false positives, see https://github.com/clj-kondo/clj-kondo/issues/2414
:redundant-ignore {:level :off} ; lots of false positives, see https://github.com/clj-kondo/clj-kondo/issues/2414
:unexpected-recur {:level :off} ; TODO (cam): I think we just need to tell it how to handle MBQL match and we can enable this?
;;
;; globally-enabled custom linters
;;
: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}
@@ -65,8 +67,8 @@
: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/test-helpers-use-non-thread-safe-functions {:level :warning} ; more config in `.clj-kondo/config/test-helpers/config.edn`
: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}
@@ -178,6 +180,11 @@
metabase.notification.models/create-notification!
metabase.pulse.send/send-pulse!
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!
@@ -191,7 +198,7 @@
:metabase/disallow-hardcoded-driver-names-in-tests
;; don't include `:h2` since that will probably lead to a mountain of tests where we are specifically testing
;; middleware or compilation behavior with just H2 since it's the default.
{:drivers #{ ;; core drivers
{:drivers #{;; core drivers
#_:h2
:postgres
:mysql
@@ -219,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]}}
@@ -238,13 +248,17 @@
(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 [<>])
@@ -296,10 +310,14 @@
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."}
@@ -418,11 +436,10 @@
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.transforms.api-test/with-transform-tags clojure.core/let
metabase-enterprise.transforms.api-test/with-worker-runs clojure.core/let
metabase-enterprise.transforms.test-util/with-transform-cleanup! clojure.core/let
metabase-enterprise.transforms.execute/with-transform-lifecycle clojure.core/let
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
@@ -510,7 +527,16 @@
{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
@@ -522,8 +548,10 @@
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
@@ -758,22 +786,17 @@
:config-in-ns
{test-namespaces
{:linters
{:inline-def {:level :off}
:missing-docstring {:level :off}
:private-call {: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
:discouraged-var
{metabase.driver/database-supports? {:level :off}
metabase.lib.convert/->legacy-MBQL {:level :off}
metabase.lib.core/->legacy-MBQL {:level :off}}}
: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}}}
metabase.lib.core/->legacy-MBQL {:level :off}}}}
source-namespaces
{:linters

View File

@@ -10,7 +10,7 @@
;; ## `team`:
;;
;; The team that owns this module. This has to match one of the team names in `.github/team.json` EXACTLY. You can
;; run [metabase.core.modules-test/all-modules-have-teams-test]] to make sure you did this correctly.
;; run [[metabase.core.modules-test/all-modules-have-teams-test]] to make sure you did this correctly.
;;
;; ## `api`:
;;
@@ -39,6 +39,17 @@
;; 2. A set of module symbols. This is the list of modules that are allowed to be referenced. An empty set means no
;; other modules are allowed to be referenced; this is the default for any modules that aren't listed here.
;;
;; ## `friends`:
;;
;; 'Friend' in the C++ sense; set of modules that are allowed free access into the internals of this module including
;; namespaces that are not `:api` namespaces. This is useful when writing modules that are 'extensions' of other
;; modules, for example `enterprise/search` might be enterprise extensions of `search`, or `search-rest` might be the
;; REST API component for `search`.
;;
;; search
;; {...
;; :friends #{enterprise/search search-rest}}
;;
;; ## Tips
;;
;; PRO TIP: Check out the [[dev.deps-graph]] namespace for helpful tools to see where a module is used externally, and
@@ -168,7 +179,8 @@
api-routes
{:team "UX West"
:api #{metabase.api-routes.core}
:api #{metabase.api-routes.cmd
metabase.api-routes.core}
:uses :any}
app-db
@@ -264,6 +276,7 @@
events
models
premium-features
request
settings
util}}
@@ -349,7 +362,8 @@
{:team "UX West"
:api #{metabase.collections.core
metabase.collections.models.collection
metabase.collections.models.collection.root}
metabase.collections.models.collection.root
metabase.collections.schema}
:uses #{api
api-keys
app-db
@@ -365,11 +379,11 @@
collections-rest
{:team "UX West"
:api #{metabase.collections-rest.api}
:api #{metabase.collections-rest.api
metabase.collections-rest.init}
:uses #{api
app-db
collections
config
eid-translation
events
lib-be
@@ -380,6 +394,8 @@
queries
request
revisions
settings
transforms
upload
util}}
@@ -394,7 +410,6 @@
models
request
users
users-rest
util}}
;; technically this 'uses' `enterprise/core` and `test` since it tries to load them to see if they exists so we know
@@ -486,6 +501,18 @@
util
xrays}}
data-studio
{:team "Gadget"
:api #{metabase.data-studio.api}
:uses #{api
database-routing
driver
events
request
sync
util
warehouse-schema}}
database-routing
{:team "UX West"
:api #{metabase.database-routing.core}
@@ -496,7 +523,8 @@
:api #{metabase.documents.api
metabase.documents.core
metabase.documents.init
metabase.documents.prose-mirror}
metabase.documents.prose-mirror
metabase.documents.schema}
:uses #{activity-feed
api
app-db
@@ -514,11 +542,13 @@
view-log}}
driver
{:team "Drivers"
{:team "Querying"
:api #{metabase.driver
metabase.driver.common
metabase.driver.common.parameters
metabase.driver.common.parameters.parse
metabase.driver.connection
metabase.driver.connection.workspaces
metabase.driver.ddl.interface
metabase.driver.h2
metabase.driver.impl
@@ -527,15 +557,22 @@
metabase.driver.postgres
metabase.driver.settings
metabase.driver.sql
metabase.driver.sql-jdbc
metabase.driver.sql-jdbc.connection
metabase.driver.sql-jdbc.execute
metabase.driver.sql-jdbc.execute.diagnostic
metabase.driver.sql-jdbc.sync
;; TODO (lbrdnk 2025/12/17): We should revisit addition of the following line. I've added it to make
;; tests pass as we are using it directly with ee/workspaces module. I believe later, when workspaces
;; are in better state quality wise, it should become part of the driver api and that should be used
;; instead of calling directly into the normalize module.
metabase.driver.sql.normalize
metabase.driver.sql.query-processor
metabase.driver.sql.util
metabase.driver.sync
metabase.driver.util}
:uses #{app-db
:uses #{analytics
app-db
appearance
auth-provider
classloader
@@ -548,13 +585,14 @@
premium-features
query-processor
settings
sql-tools
system
util
warehouse-schema
warehouses}}
driver-api
{:team "Drivers"
{:team "Querying"
:api #{metabase.driver-api.core}
:uses #{actions
api
@@ -598,7 +636,6 @@
metabase.embedding.validation}
:uses #{analytics
api
config
premium-features
server
settings
@@ -609,6 +646,7 @@
:api #{metabase.embedding-rest.api}
:uses #{api
dashboards
database-routing
eid-translation
embedding
events
@@ -698,61 +736,46 @@
lib
{:team "Querying"
:api #{metabase.lib.binning
metabase.lib.binning.util
metabase.lib.card
metabase.lib.computed ; temporarily so that `qp.compile` can use it as lib memoization evolves
metabase.lib.core
:api #{metabase.lib.core
metabase.lib.equality
metabase.lib.field
metabase.lib.field.resolution
metabase.lib.filter
metabase.lib.filter.desugar.jvm ; only so [[metabase.legacy-mbql.jvm-util]] can use defined regexes
metabase.lib.hierarchy
metabase.lib.init
metabase.lib.join.util
metabase.lib.metadata
metabase.lib.metadata.cached-provider
metabase.lib.metadata.column
metabase.lib.metadata.invocation-tracker
metabase.lib.metadata.protocols
metabase.lib.metadata.result-metadata
metabase.lib.normalize
metabase.lib.options
metabase.lib.query
metabase.lib.schema
metabase.lib.schema.actions
metabase.lib.schema.aggregation
metabase.lib.schema.binning
metabase.lib.schema.common
metabase.lib.schema.constraints
metabase.lib.schema.expression
metabase.lib.schema.expression.temporal
metabase.lib.schema.expression.window
metabase.lib.schema.id
metabase.lib.schema.info
metabase.lib.schema.join
metabase.lib.schema.literal
metabase.lib.schema.mbql-clause
metabase.lib.schema.measure
metabase.lib.schema.metadata
metabase.lib.schema.metadata.fingerprint
metabase.lib.schema.middleware-options
metabase.lib.schema.order-by
metabase.lib.schema.parameter
metabase.lib.schema.ref
metabase.lib.schema.settings
metabase.lib.schema.template-tag
metabase.lib.schema.temporal-bucketing
metabase.lib.schema.test-spec
metabase.lib.schema.util
metabase.lib.temporal-bucket
metabase.lib.schema.validate
metabase.lib.types.isa
metabase.lib.util
metabase.lib.util.match
metabase.lib.walk}
metabase.lib.util.match}
:uses #{config
graph
legacy-mbql
types
util}}
util}
:friends #{legacy-mbql ;; Reuses internal schemas and a few helper functions. Deeply coupled to MBQL.
lib-be ;; BE-specific extension of lib; tight coupling is acceptable.
query-processor ;; Necessarily manipulates MBQL; better to pull most logic into a new module.
enterprise/sandbox ;; Really part of the QP, though its lives in the enterprise/ tree.
}}
lib-be
{:team "Querying"
@@ -763,6 +786,24 @@
settings
util}}
llm
{:team "Metabot"
:api #{metabase.llm.api
metabase.llm.init}
:uses #{analytics
api
driver
lib
lib-be
models
premium-features
request
settings
sql-tools
sync
util
warehouse-schema}}
logger
{:team "DevEx"
:api #{metabase.logger.api
@@ -787,6 +828,19 @@
settings
util}}
measures
{:team "Querying"
:api #{metabase.measures.api}
:uses #{api
events
lib
lib-be
models
permissions
remote-sync
search
util}}
model-persistence
{:team "Querying"
:api #{metabase.model-persistence.api
@@ -821,10 +875,19 @@
:uses #{api
app-db
classloader
collections
events
legacy-mbql
lib
lib-be
permissions
query-processor
remote-sync
search
settings
util}}
transforms
util}
:friends #{transforms}}
native-query-snippets
{:team "Querying"
@@ -837,6 +900,7 @@
models
permissions
premium-features
remote-sync
util}}
notification
@@ -854,6 +918,7 @@
config
dashboards
driver
embedding
events
models
parameters
@@ -878,6 +943,7 @@
metabase.parameters.custom-values
metabase.parameters.dashboard
metabase.parameters.field
metabase.parameters.field-values
metabase.parameters.init
metabase.parameters.params
metabase.parameters.schema
@@ -916,6 +982,7 @@
{:team "UX West"
:api #{metabase.permissions-rest.api}
:uses #{api
app-db
audit-app
events
permissions
@@ -943,12 +1010,16 @@
:api #{metabase.premium-features.api
metabase.premium-features.core
metabase.premium-features.init}
:uses #{api
:uses #{analytics
api
app-db
classloader
config
events
internal-stats
settings
startup
task
util}}
product-feedback
@@ -1005,6 +1076,7 @@
collections
config
driver
embedding
events
lib
models
@@ -1036,6 +1108,7 @@
config
content-verification
dashboards
documents
events
lib
lib-be
@@ -1101,8 +1174,10 @@
metabase.query-processor.init
metabase.query-processor.interface
metabase.query-processor.metadata
metabase.query-processor.middleware.add-remaps
metabase.query-processor.middleware.annotate
metabase.query-processor.middleware.cache-backend.db
metabase.query-processor.middleware.catch-exceptions
metabase.query-processor.middleware.constraints
metabase.query-processor.middleware.limit
metabase.query-processor.middleware.permissions
@@ -1170,7 +1245,8 @@
:api #{metabase.request.core
metabase.request.init
metabase.request.schema}
:uses #{api
:uses #{analytics
api
config
embedding
permissions ; FIXME
@@ -1234,11 +1310,11 @@
settings
startup
task
util
warehouses}}
transforms
util}}
secrets
{:team "Drivers"
{:team "Querying"
:api #{metabase.secrets.core}
:uses #{api driver models premium-features util}}
@@ -1248,11 +1324,11 @@
metabase.segments.schema}
:uses #{api
events
legacy-mbql
lib
lib-be
models
permissions
remote-sync
search
util
xrays}}
@@ -1347,6 +1423,23 @@
system
util}}
sql-parsing
{:team "DevEx"
:api #{metabase.sql-parsing.core}
:uses #{analytics
util}}
sql-tools
{:team "DevEx"
:api #{metabase.sql-tools.core
metabase.sql-tools.init}
:uses #{analytics
driver
lib
settings
sql-parsing
util}}
sso
{:team "UX West"
:api #{metabase.sso.api
@@ -1358,6 +1451,7 @@
permissions
premium-features
settings
system
util}}
startup
@@ -1420,9 +1514,12 @@
metabase.task-history.core
metabase.task-history.init}
:uses #{api
app-db
config
models
permissions
premium-features
query-processor
request
task
util}}
@@ -1442,6 +1539,8 @@
api
app-db
config
lib
lib-be
premium-features
search
util}}
@@ -1466,11 +1565,69 @@
:uses #{analytics
api
collections
config
events
models
util}}
transforms
{:team "Querying"
:api #{metabase.transforms.core
metabase.transforms.feature-gating
metabase.transforms.init
metabase.transforms.interface
metabase.transforms.schema
metabase.transforms.util}
:uses #{analytics
api
channel
database-routing
driver
events
lib
lib-be
models
premium-features
queries
query-processor
revisions
settings
sync
task
task-history
util}
:friends #{models
enterprise/transforms-python
enterprise/workspaces}}
transforms-inspector
{:team "Gadget"
:api #{metabase.transforms-inspector.core
metabase.transforms-inspector.schema}
:uses #{driver
lib
lib-be
query-processor
sql-tools
transforms
util}}
transforms-rest
{:team "Gadget"
:api #{metabase.transforms-rest.api.transform
metabase.transforms-rest.api.transform-job
metabase.transforms-rest.api.transform-tag}
:uses #{api
driver
events
models
query-processor
request
server
sql-tools
transforms
transforms-inspector
util}}
types
{:team "Querying"
:api #{metabase.types.core
@@ -1481,6 +1638,7 @@
{:team "Querying"
:api #{metabase.upload.api
metabase.upload.core
metabase.upload.db
metabase.upload.init}
:uses #{analytics
api
@@ -1508,41 +1666,42 @@
users
{:team "UX West"
:api #{metabase.users.init
:api #{metabase.users.core
metabase.users.init
metabase.users.models.user
metabase.users.models.user-parameter-value
metabase.users.schema
metabase.users.settings}
:uses #{api
batch-processing
channel
config
events
models
permissions
premium-features
settings
setup
system
tenants
util}}
users-rest
{:team "UX West"
:api #{metabase.users-rest.api}
:uses #{analytics
api
appearance
auth-identity
collections
batch-processing
channel
config
events
models
notification
permissions
premium-features
request
settings
setup
system
tenants
util
enterprise/advanced-permissions}}
users-rest
{:team "UX West"
:api #{metabase.users-rest.api}
:uses #{api
appearance
auth-identity
collections
config
events
models
permissions
premium-features
request
sso
tenants
users
@@ -1596,7 +1755,6 @@
api
app-db
audit-app
config
driver
lib
lib-be
@@ -1605,6 +1763,7 @@
permissions
premium-features
query-processor
remote-sync
search
util
warehouses}}
@@ -1621,6 +1780,7 @@
lib
models
parameters
permissions
premium-features
query-processor
request
@@ -1629,7 +1789,6 @@
upload
util
warehouse-schema
warehouses-rest
xrays}}
warehouses
@@ -1742,15 +1901,28 @@
metabase-enterprise.advanced-permissions.common
metabase-enterprise.advanced-permissions.models.permissions.group-manager}
:uses #{api
audit-app
lib
permissions
premium-features
query-permissions
query-processor
remote-sync
util
warehouses
enterprise/impersonation}}
enterprise/agent-api
{:team "Metabot"
:api #{metabase-enterprise.agent-api.api}
:uses #{api
auth-identity
query-processor
request
server
util
enterprise/metabot-v3}}
enterprise/ai-entity-analysis
{:team "Metabot"
:api #{metabase-enterprise.ai-entity-analysis.api}
@@ -1820,7 +1992,7 @@
setup
startup
sync
users-rest
users
util
enterprise/serialization}}
@@ -1862,6 +2034,14 @@
util
enterprise/harbormaster}}
enterprise/cloud-proxy
{:team "Cloud"
:api #{metabase-enterprise.cloud-proxy.api}
:uses #{api
premium-features
util
enterprise/harbormaster}}
enterprise/content-translation
{:team "UX West"
:api #{metabase-enterprise.content-translation.routes}
@@ -1891,20 +2071,15 @@
:uses #{premium-features}}
enterprise/data-studio
{:team "Gadget"
{:team "UX West"
:api #{metabase-enterprise.data-studio.api}
:uses #{api
collections
database-routing
driver
events
models
permissions
premium-features
request
sync
util
warehouse-schema}}
util}}
enterprise/database-replication
{:team "Cloud"
@@ -1932,7 +2107,7 @@
settings
util
warehouse-schema
warehouses-rest}}
warehouses}}
enterprise/dependencies
{:team "Querying"
@@ -1941,7 +2116,9 @@
metabase-enterprise.dependencies.init}
:uses #{analyze
api
app-db
collections
config
documents
driver
events
@@ -1954,9 +2131,11 @@
premium-features
queries
query-processor
request
revisions
settings
task
transforms
util}}
enterprise/email
@@ -1999,7 +2178,7 @@
util}}
enterprise/impersonation
{:team "Drivers"
{:team "Querying"
:api #{metabase-enterprise.impersonation.api}
:uses #{api
audit-app
@@ -2039,44 +2218,46 @@
util}}
enterprise/metabot-v3
{:team "Metabot"
:api #{metabase-enterprise.metabot-v3.api
metabase-enterprise.metabot-v3.client
metabase-enterprise.metabot-v3.core
metabase-enterprise.metabot-v3.init
metabase-enterprise.metabot-v3.tools.api}
:uses #{activity-feed
api
app-db
audit-app
collections
config
documents
driver
legacy-mbql
lib
lib-be
models
native-query-snippets
permissions
premium-features
pulse
query-processor
request
search
server
settings
store-api
sync
system
task
users-rest
util
warehouse-schema
warehouses-rest
enterprise/dependencies
enterprise/transforms
enterprise/transforms-python}}
{:team "Metabot"
:api #{metabase-enterprise.metabot-v3.api
metabase-enterprise.metabot-v3.client
metabase-enterprise.metabot-v3.core
metabase-enterprise.metabot-v3.init
metabase-enterprise.metabot-v3.tools.api}
:friends #{enterprise/agent-api}
:uses #{activity-feed
api
app-db
audit-app
collections
config
documents
driver
legacy-mbql
lib
lib-be
models
native-query-snippets
parameters
permissions
premium-features
pulse
query-processor
request
search
server
settings
sql-tools
store-api
sync
system
task
transforms
users
util
warehouses
enterprise/dependencies
enterprise/transforms-python}}
enterprise/permission-debug
{:team "UX West"
@@ -2110,7 +2291,8 @@
task
task-history
util
enterprise/serialization}}
enterprise/serialization
enterprise/transforms-python}}
enterprise/sandbox
{:team "UX West"
@@ -2191,6 +2373,7 @@
appearance
collections
config
events
logger
models
plugins
@@ -2206,6 +2389,7 @@
native-query-snippets
permissions
premium-features
remote-sync
util}}
enterprise/sso
@@ -2233,7 +2417,6 @@
:uses #{analytics
api
collections
collections-rest
embedding
premium-features
queries
@@ -2271,46 +2454,29 @@
enterprise/transforms
{:team "Querying"
:api #{metabase-enterprise.transforms.api
metabase-enterprise.transforms.core
metabase-enterprise.transforms.init
metabase-enterprise.transforms.instrumentation
metabase-enterprise.transforms.interface
metabase-enterprise.transforms.util}
:uses #{analytics
api
app-db
driver
events
lib
lib-be
models
premium-features
queries
query-processor
request
search
settings
sync
task
task-history
util}}
:api #{}
:uses #{premium-features}}
enterprise/transforms-python
{:team "Querying"
:api #{metabase-enterprise.transforms-python.api
metabase-enterprise.transforms-python.init}
metabase-enterprise.transforms-python.core
metabase-enterprise.transforms-python.init
metabase-enterprise.transforms-python.python-runner}
:uses #{analytics
api
app-db
config
driver
events
lib
lib-be
models
permissions
query-processor
settings
util
enterprise/transforms}}
transforms
util}}
enterprise/upload-management
{:team "UX West"
@@ -2319,7 +2485,32 @@
models
premium-features
upload
util}}}
util}}
enterprise/workspaces
{:team "Metabot"
:api #{metabase-enterprise.workspaces.api
metabase-enterprise.workspaces.init}
:uses #{api
api-keys
app-db
config
database-routing
driver
events
lib
lib-be
models
queries
;; NOTE: we will remove this once we get "pure transforms" module.
query-processor
request
settings
sql-tools
system
transforms
util
enterprise/transforms-python}}}
;; namespaces matching these patterns (with `re-find`) are excluded from the module linter. Since regex literals
;; aren't allowed in EDN just used the `(str <regex>)` version i.e. two slashes instead of one.

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!

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

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

@@ -31,7 +31,7 @@
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]
@@ -51,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]
@@ -61,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
@@ -81,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

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

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

@@ -90,6 +90,7 @@
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]]
@@ -119,7 +120,10 @@
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]]
@@ -133,6 +137,7 @@
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]]
@@ -154,8 +159,9 @@
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/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]]

View File

@@ -1,23 +1,35 @@
Brite
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

View File

@@ -1,3 +1,24 @@
[codespell]
skip = *.csv,*.edn,*.geojson,*.json,*.tsv,*.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/static-viz/constants/char-sizes.ts,frontend/src/metabase/visualizations/lib/mapping_codes.ts,modules/drivers/mongo/src/metabase/driver/mongo/operators.clj
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,10 +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-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

@@ -40,33 +40,88 @@
# 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"
# ==============================================================================
# 2. E2E / CYPRESS TESTING
# 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 `yarn test-cypress` (local test runner).
# 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.
# 2.1. E2E Application Database (H2 required)
# 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"
# MB_DB_FILE="./e2e/tmp/cypress-test.db"
# Where does Cypress go to look for the application?
MB_JETTY_PORT=4000
# Where does Cypress go to look for the application? (defaults: localhost:4000)
# MB_JETTY_HOST="localhost"
# MB_JETTY_PORT=4000
# 2.2 E2E Local Runner Setup
# 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)
@@ -85,7 +140,7 @@ GENERATE_SNAPSHOTS="true"
# Hint: build the JAR with ./bin/build.sh
# JAR_PATH="target/uberjar/metabase.jar"
# 2.3 E2E Tokens
# 3.3 E2E Tokens
# ------------------------------------------------------------------------------
#
# These make sense for Metabase core devs only
@@ -96,7 +151,7 @@ CYPRESS_MB_STARTER_CLOUD_TOKEN="op://Shared/Metabase License Dev Tokens/Licenses
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"
# 2.4 E2E Misc.
# 3.4 E2E Misc.
# ------------------------------------------------------------------------------
# To make Node.js match the instance tz
@@ -106,55 +161,3 @@ TZ="US/Pacific"
# 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
# ==============================================================================
# 3. LOCAL METABASE DEVELOPMENT
# ==============================================================================
#
# Settings for running Metabase locally. Most have sensible defaults—only
# configure what you need.
# 3.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>"
# 3.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"
# 3.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"

View File

@@ -1,5 +0,0 @@
frontend/src/cljs
frontend/src/cljs_release
e2e/support/cypress_sample_database.js
e2e/support/cypress_sample_instance_data.js
e2e/embedding-sdk-host-apps

View File

@@ -1,356 +0,0 @@
/* eslint-disable import/no-commonjs */
/* eslint-disable no-undef */
const path = require("path");
// `postcss-modules` lints css modules class names, but it currently crashes
// eslint on vscode. If you use webstorm or want to run the lint for the cli, you
// can use this flag to enable it. This is set to true in CI
const shouldLintCssModules =
process.env.LINT_CSS_MODULES === "true" || process.env.CI;
const plugins = ["react", "no-only-tests", "ttag", "i18next"];
if (shouldLintCssModules) {
plugins.push("postcss-modules");
}
module.exports = {
ignorePatterns: ["!.storybook"],
rules: {
strict: [2, "never"],
"no-undef": 2,
"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-duplicates": ["warn", { considerQueryString: true }],
"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"],
"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",
],
},
],
complexity: ["error", { max: 55 }],
...(shouldLintCssModules
? {
"postcss-modules/no-undef-class": "error",
}
: {}),
},
globals: {
before: true,
cy: true,
Cypress: true,
},
env: {
browser: true,
es2020: 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: {
config: path.resolve(__dirname, "./rspack.main.config.js"),
typescript: true,
},
},
"import/ignore": ["\\.css$"],
react: {
version: "detect",
},
"postcss-modules": {
baseDir: "./frontend/src",
},
},
parserOptions: {
ecmaFeatures: {
legacyDecorators: true,
},
},
overrides: [
{
files: ["*.js", "*.jsx", "*.ts", "*.tsx"],
rules: {
"jtag-missing-key": "error",
"no-unconditional-metabase-links-render": "error",
"no-color-literals": "error",
"no-literal-metabase-strings": "error",
"no-oss-reinitialize-import": "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/**/*",
"enterprise/frontend/src/metabase-enterprise/embedding/**/*",
"frontend/lint/**/*",
"*.stories.*",
"**/.storybook/*",
"stories-data.*",
"e2e/**/*",
"**/tests/*",
"release/**/*",
"rspack.config.js",
"rspack.main.config.js",
"rspack.embedding-sdk-package.config.js",
"rspack.embedding-sdk-bundle.config.js",
],
rules: {
"no-color-literals": "off",
"no-unconditional-metabase-links-render": "off",
"no-literal-metabase-strings": "off",
},
},
{
files: [
"*.unit.spec.*",
"frontend/lint/**/*",
"*.stories.*",
"stories-data.*",
"e2e/**/*",
"**/tests/*",
"release/**/*",
"rspack.main.config.js",
],
rules: {
"i18next/no-literal-string": "off",
},
},
{
extends: ["plugin:@typescript-eslint/recommended"],
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
rules: {
"prefer-rest-params": "off",
"react/prop-types": "off", // TypeScript handles prop validation
"@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",
},
},
{
files: ["frontend/build/**/*.js"],
rules: {
"import/no-commonjs": "off",
},
},
{
files: ["**/*.stories.tsx", "**/preview.tsx"],
rules: {
"import/no-default-export": "off",
},
},
],
};

View File

@@ -1,7 +1,5 @@
# 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
# [merge "yaml-migrations"]
# name = YAML migration changeset-aware merge
# driver = mage -merge-yaml-migrations %O %A %B %L %P
[merge "yaml-migrations"]
name = YAML migration changeset-aware merge
driver = bin/mage -merge-yaml-migrations %O %A %B %L %P

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

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

@@ -2,9 +2,16 @@ 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
@@ -25,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.name }}`);
core.setFailed(`No artifacts found for ${artifactName}`);
return;
}
const artifact_id = artifacts.data.artifacts[0].id;

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,14 +1,13 @@
name: Prepare back-end environment
description: |
Prepare the backend. Installs jdk, Clojure, and fetches the cache for m2.
The CI config fetches `ci-test-config.json` from master and lets us ignore tests at the var level if they are flaking.
inputs:
java-version:
required: true
default: '21'
default: "21"
clojure-version:
required: true
default: '1.12.0.1488'
default: "1.12.0.1488"
runs:
using: "composite"
@@ -17,7 +16,7 @@ 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
@@ -29,6 +28,13 @@ runs:
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:

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,11 +15,10 @@ 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: Get cache keys
@@ -34,9 +33,9 @@ runs:
- 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,4 +1,5 @@
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"
@@ -16,6 +17,12 @@ runs:
node-version: ${{ inputs.node-version }} # this overrides, if present
node-version-file: ".nvmrc"
- 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
@@ -28,12 +35,12 @@ runs:
~/.gitlibs
key: ${{ steps.get-cache-keys.outputs.m2-cache-key }}
- name: Get yarn cache directory
id: yarn-cache-dir
- name: Get bun cache directory
id: bun-cache
run: |
YARN_CACHE_DIR=$(yarn cache dir)
echo "Yarn cache directory: $YARN_CACHE_DIR"
echo "dir=$YARN_CACHE_DIR" >> $GITHUB_OUTPUT
BUN_CACHE_DIR=$(bun pm cache)
echo "Bun cache directory: $BUN_CACHE_DIR"
echo "dir=$BUN_CACHE_DIR" >> $GITHUB_OUTPUT
shell: bash
- name: Restore node_modules cache
@@ -41,7 +48,7 @@ runs:
id: node-modules-cache
with:
path: |
${{ steps.yarn-cache-dir.outputs.dir }}
${{ steps.bun-cache.outputs.dir }}
node_modules
key: ${{ steps.get-cache-keys.outputs.node-cache-key }}
@@ -49,9 +56,9 @@ runs:
# 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: yarn install --frozen-lockfile --prefer-offline
run: bun install --frozen-lockfile
shell: bash
- name: Patch frontend dependencies
if: inputs.apply-patches == 'true'
run: yarn patch-package
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

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

@@ -12,56 +12,32 @@ inputs:
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:
quarantine-skipped:
description: Whether the driver test was skipped due to quarantine
value: ${{ steps.check-driver.outputs.skip }}
test-outcome:
description: "The outcome of the test run (success, failure, cancelled, skipped)"
value: ${{ steps.run-test.outcome }}
runs:
using: "composite"
steps:
- name: Check if driver is ignored
id: check-driver
shell: bash
run: |
# If DRIVERS env var is not set, proceed with tests
if [ -z "$DRIVERS" ]; then
echo "No DRIVERS env var set. Proceeding with tests."
echo "skip=false" >> $GITHUB_OUTPUT
exit 0
fi
# Fetch CI config and check if driver should be skipped
curl -sSf -o ci-test-config.json https://raw.githubusercontent.com/metabase/ci-test-config/refs/heads/master/ci-test-config.json || true
# Check if the driver is in the ignored list (gracefully handle missing/invalid config)
IS_IGNORED=$(jq --arg driver "$DRIVERS" '.ignored.drivers // [] | contains([$driver])' ci-test-config.json 2>/dev/null || echo "false")
if [ "$IS_IGNORED" = "true" ]; then
echo "⚠️ Driver '$DRIVERS' is in the ignored list. Skipping tests."
echo "View the ignored list here: https://github.com/metabase/ci-test-config/blob/master/ci-test-config.json"
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "Driver '$DRIVERS' is not ignored. Proceeding with tests."
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: Prepare back-end environment
if: steps.check-driver.outputs.skip != 'true'
uses: ./.github/actions/prepare-backend
- name: Prepare front-end environment
if: ${{ steps.check-driver.outputs.skip != 'true' && inputs.build-static-viz == 'true' }}
if: ${{ inputs.build-static-viz == 'true' }}
uses: ./.github/actions/prepare-frontend
- name: Build static viz frontend
if: ${{ steps.check-driver.outputs.skip != 'true' && inputs.build-static-viz == 'true' }}
run: yarn build-static-viz
if: ${{ inputs.build-static-viz == 'true' }}
run: bun run build-static-viz
shell: bash
env:
MB_EDITION: ee
- name: Test database driver
if: steps.check-driver.outputs.skip != 'true'
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!
@@ -73,7 +49,7 @@ runs:
# 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' && steps.check-driver.outputs.skip != 'true' }}
if: ${{ steps.run-test.outcome != 'success' }}
with:
path: "target/junit/**/*_test.xml"
name: JUnit Test Report ${{ inputs.junit-name }}
@@ -82,10 +58,10 @@ runs:
list-tests: failed
fail-on-error: false
- name: Upload Logs on Failure
if: always() && steps.run-test.outcome != 'success' && steps.check-driver.outputs.skip != 'true'
if: always() && steps.run-test.outcome != 'success'
uses: actions/upload-artifact@v4
with:
name: ${{ format('test-logs-{0}{1}', github.job, (inputs.logs-artifact-suffix == '' || inputs.logs-artifact-suffix == null) && '' || format('-{0}', inputs.logs-artifact-suffix)) }}
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.

View File

@@ -21,6 +21,8 @@ inputs:
variant:
required: false
default: ""
previous-step-outcome:
required: true
runs:
using: "composite"
@@ -57,3 +59,4 @@ runs:
dry-run: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == true }} # quarantine, but do not upload results
token: ${{ inputs.trunk-api-token }}
use-cache: true
previous-step-outcome: ${{ inputs.previous-step-outcome }}

View File

@@ -1,52 +1,55 @@
# Metabase Developer Assistant Instructions
## Frontend Development
For detailed coding standards and conventions, see `CLAUDE.md` and the skills in `.claude/skills/`.
### Repository Structure
## Code Review Standards
```
frontend/src/
├── metabase/ # Main application components and pages
├── metabase-lib/ # Query building and data modeling utilities
├── metabase-types/ # TypeScript type definitions
└── metabase/ui/ # Design system components
Review focus areas: Security → Performance → Testing → Documentation (in priority order)
e2e/ # Cypress end-to-end tests
frontend/test/ # Jest unit tests
```
When reviewing code, use these emoji prefixes to categorize feedback:
- 🔒 Security concerns
- ⚡ Performance opportunities
- 🧹 Cleanup needs
- 📚 Documentation gaps
- 🚨 Blocking issues
- 💭 Clarification questions
### Technology Stack
### Security Critical Issues
- **Framework**: React 18 with TypeScript
- **State**: Redux Toolkit
- **Styling**: CSS Modules (preferred) > Emotion styled-components
- **UI**: `metabase/ui` components built with Mantine v8
- **Build**: Rspack (primary), Webpack (legacy)
- **Testing**: Jest + React Testing Library, Cypress
- 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)
### Coding Standards
### Performance Red Flags
#### Component Preferences
- 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
- Prefer `metabase/ui`components over `metabase/common/components`
- Use `.tsx` for components, `.ts` for utilities
### Code Quality Essentials
#### Styling
- Functions should be focused and appropriately sized
- Use clear, descriptive naming conventions
- Ensure proper error handling throughout
- Remove dead code and unused imports
ALWAYS prefer Mantine style props,then CSS modules. DO NOT suggest styled components, they are deprecated.
### Review Style
#### TypeScript Migration
- 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
When heavily editing `.js`/`.jsx` files, create a separate PR to convert to TypeScript first, then implement changes.
### Review Format
#### Enterprise Features
- 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
Enterprise functionality MUST use the plugin system. It is very important to not expose enterprise code in the OSS version.
#### Testing Requirements
All PRs should include tests. Prefer Unit tests over E2E tests.
#### Localization
All user-facing strings MUST be localized using the ttag library. Localized strings should be complete phrases, do not concatenate a few separately localized strings. You should add context to strings where the meaning of the string might not be obvious in isolation: e.g. "Home" might have different words in some languages depending on whether you're talking about a dwelling or the landing page for a website.
Language-specific rules are in `.github/instructions/*.instructions.md`.

View File

@@ -26,7 +26,7 @@ frontend_ci: &frontend_ci
- ".github/workflows/frontend.yml"
frontend_configs: &frontend_configs
- "yarn.lock"
- "bun.lock"
- "**/tsconfig*.json"
- "package.json"
- "babel.config.json"
@@ -85,7 +85,9 @@ backend_ci: &backend_ci
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
@@ -197,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`

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 };

40
.github/scripts/find-linear-issue.js vendored Normal file
View File

@@ -0,0 +1,40 @@
async function findLinearIssue({ githubIssueUrl, linearApiKey }) {
const response = await fetch("https://api.linear.app/graphql", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: linearApiKey,
},
body: JSON.stringify({
query: `
query {
attachmentsForURL(url: "${githubIssueUrl}") {
nodes {
issue { identifier }
}
}
}
`,
}),
});
const data = await response.json();
if (!response.ok) {
return { success: false, message: `Linear API error: ${response.status}` };
}
if (!data.data?.attachmentsForURL?.nodes?.length) {
return {
success: false,
message: `No Linear issue linked to ${githubIssueUrl}`,
};
}
return {
success: true,
issue: data.data.attachmentsForURL.nodes[0].issue.identifier,
};
}
module.exports = { findLinearIssue };

26
.github/team.json vendored
View File

@@ -10,14 +10,7 @@
"metamben",
"wzimrin",
"ericnormand",
"galdre"
]
},
{
"name": "Drivers",
"label": ".Team/Drivers",
"members": [
"snoe",
"galdre",
"rileythomp"
]
},
@@ -62,7 +55,8 @@
"tsplude",
"lbrdnk",
"piranha",
"crisptrutski"
"crisptrutski",
"undrfined"
]
},
{
@@ -86,14 +80,12 @@
"eliotmetabase",
"npfitz",
"johnswanson",
"iethree",
"nvoxland",
"edpaget",
"deniskaber",
"alxnddr",
"bpander",
"andsalves",
"gantoreno"
"kevinkelleher12"
]
},
{
@@ -110,6 +102,16 @@
"uladzimirdev",
"egorgrushin"
]
},
{
"name": "Growth Eng",
"label": ".Team/GrowthEng",
"members": [
"iethree",
"bpander",
"gantoreno",
"losrebellos"
]
}
]
}

View File

@@ -15,7 +15,7 @@ jobs:
be-tests-mariadb:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -68,8 +68,8 @@ jobs:
(
github.event_name == 'push' &&
(
github.ref == 'master' ||
startsWith(github.ref, 'release-')
github.ref_name == 'master' ||
startsWith(github.ref_name, 'release-')
) &&
''
) ||
@@ -105,6 +105,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Test ${{ matrix.version.name }}
id: test-driver
uses: ./.github/actions/test-driver
with:
build-static-viz: ${{ matrix.job.build-static-viz }}
@@ -123,11 +124,12 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-mysql:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -182,8 +184,8 @@ jobs:
(
github.event_name == 'push' &&
(
github.ref == 'master' ||
startsWith(github.ref, 'release-')
github.ref_name == 'master' ||
startsWith(github.ref_name, 'release-')
) &&
''
) ||
@@ -227,6 +229,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Test ${{ matrix.version.name }}
id: test-driver
uses: ./.github/actions/test-driver
with:
build-static-viz: ${{ matrix.job.build-static-viz }}
@@ -245,11 +248,12 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-postgres:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -297,8 +301,8 @@ jobs:
(
github.event_name == 'push' &&
(
github.ref == 'master' ||
startsWith(github.ref, 'release-')
github.ref_name == 'master' ||
startsWith(github.ref_name, 'release-')
) &&
''
) ||
@@ -336,6 +340,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Test ${{ matrix.version.name }} (${{ matrix.job.name }})
id: test-driver
uses: ./.github/actions/test-driver
with:
build-static-viz: ${{ matrix.job.build-static-viz }}
@@ -354,6 +359,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
app-db-tests-result:
needs:

View File

@@ -1,12 +1,33 @@
name: Backend-Cloverage
# Module lists are generated dynamically by listing source directories.
# The setup-oss and setup-ee jobs list folders in src/metabase/ and
# enterprise/backend/src/metabase_enterprise/ respectively, convert
# underscores to dashes (for Clojure namespace convention), and output
# as JSON arrays for the matrix jobs to consume.
#
# jq flags: -R (raw string input), -s (slurp all lines into one string),
# -c (compact single-line output for GitHub Actions).
on:
workflow_dispatch:
schedule:
- cron: '0 10 * * 1-5' # every weekday at 5am US eastern time
jobs:
setup-oss:
runs-on: ubuntu-22.04
outputs:
modules: ${{ steps.get-modules.outputs.modules }}
steps:
- uses: actions/checkout@v4
- id: get-modules
run: |
modules=$(ls -1d src/metabase/*/ | xargs -n1 basename | tr '_' '-' | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "modules=$modules" >> $GITHUB_OUTPUT
be-linter-cloverage:
needs: setup-oss
# don't run this workflow on a cron for forks
if: ${{ github.event_name != 'schedule' || github.repository == 'metabase/metabase' }}
runs-on: ubuntu-22.04
@@ -14,96 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
modules:
- actions
- activity-feed
- analytics
- analyze
- api
- api-keys
- api-routes
- app-db
- appearance
- audit-app
- auth-provider
- batch-processing
- bookmarks
- bug-reporting
- cache
- channel
- classloader
- cloud-migration
- cmd
- collections
- config
- connection-pool
- content-translation
- content-verification
- core
- dashboards
- database-routing
- driver
- driver-api
- eid-translation
- embedding
- events
- formatter
- geojson
- glossary
- graph
- indexed-entities
- internal-stats
- legacy-mbql
- lib
- lib-be
- logger
- login-history
- model-persistence
- models
- native-query-snippets
- notification
- parameters
- permissions
- pivot
- plugins
- premium-features
- product-feedback
- public-sharing
- pulse
- queries
- query-permissions
- query-processor
- remote-sync
- request
- revisions
- sample-data
- search
- secrets
- segments
- server
- session
- settings
- setup
- sso
- startup
- store-api
- sync
- system
- task
- task-history
- testing-api
- tiles
- timeline
- types
- upload
- user-key-value
- users
- util
- version
- view-log
- warehouse-schema
- warehouses
- xrays
modules: ${{ fromJson(needs.setup-oss.outputs.modules) }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
@@ -112,7 +44,7 @@ jobs:
uses: ./.github/actions/prepare-backend
- name: Build static viz frontend
run: yarn build-static-viz
run: bun run build-static-viz
env:
MB_EDITION: ee
- name: Collect the test coverage
@@ -130,7 +62,19 @@ jobs:
files: ./target/coverage/codecov.json
flags: back-end
setup-ee:
runs-on: ubuntu-22.04
outputs:
modules: ${{ steps.get-modules.outputs.modules }}
steps:
- uses: actions/checkout@v4
- id: get-modules
run: |
modules=$(ls -1d enterprise/backend/src/metabase_enterprise/*/ | xargs -n1 basename | tr '_' '-' | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "modules=$modules" >> $GITHUB_OUTPUT
be-linter-cloverage-enterprise:
needs: setup-ee
# don't run this workflow on a cron for forks
if: ${{ github.event_name != 'schedule' || github.repository == 'metabase/metabase' }}
runs-on: ubuntu-22.04
@@ -138,53 +82,7 @@ jobs:
strategy:
fail-fast: false
matrix:
modules:
- action-v2
- advanced-config
- advanced-permissions
- ai-entity-analysis
- ai-sql-fixer
- ai-sql-generation
- analytics
- api
- audit-app
- auth-provider
- billing
- bookmarks
- cache
- cloud-add-ons
- comments
- content-translation
- content-verification
- core
- dashboard-subscription-filters
- database-replication
- database-routing
- dependencies
- documents
- email
- embedding-hub
- gsheets
- harbormaster
- impersonation
- internal-stats
- llm
- metabot-v3
- permission-debug
- premium-features
- public-sharing
- remote-sync
- sandbox
- scim
- search
- semantic-search
- serialization
- snippet-collections
- sso
- stale
- transforms
- transforms-python
- upload-management
modules: ${{ fromJson(needs.setup-ee.outputs.modules) }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
@@ -193,7 +91,7 @@ jobs:
uses: ./.github/actions/prepare-backend
- name: Build static viz frontend
run: yarn build-static-viz
run: bun run build-static-viz
env:
MB_EDITION: ee
- name: Collect the test coverage

View File

@@ -39,7 +39,7 @@ jobs:
be-tests:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -88,8 +88,8 @@ jobs:
(
github.event_name == 'push' &&
(
github.ref == 'master' ||
startsWith(github.ref, 'release-')
github.ref_name == 'master' ||
startsWith(github.ref_name, 'release-')
) &&
''
) ||
@@ -104,7 +104,7 @@ jobs:
with:
java-version: "${{ matrix.java-version }}"
- name: Build static-viz frontend
run: yarn build-static-viz
run: bun run build-static-viz
env:
MB_EDITION: ${{ matrix.job.edition }}
@@ -130,6 +130,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.run-java-tests.outcome }}
- name: Publish Test Report (JUnit)
uses: dorny/test-reporter@v1

View File

@@ -19,9 +19,11 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
sparse-checkout: |
release
.github
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Send build start message
uses: actions/github-script@v7
env:
@@ -79,9 +81,11 @@ jobs:
exit 1
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
sparse-checkout: |
release
.github
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Get Release Version
uses: actions/github-script@v7
id: canonical_version
@@ -121,9 +125,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # IMPORTANT! to get all the branches
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
sparse-checkout: |
release
.github
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Get Release Branch
uses: actions/github-script@v7
id: release_branch
@@ -135,12 +141,13 @@ jobs:
const releaseBranch = getReleaseBranch(version);
return releaseBranch;
- name: Ensure that the specified commit exists in the ${{ steps.release_branch.outputs.result }} release branch
run: |
run: | # bash
RELEASE_BRANCH=${{ steps.release_branch.outputs.result }}
git checkout $RELEASE_BRANCH
git branch --contains ${{ inputs.commit }} | grep -q $RELEASE_BRANCH \
&& echo "Commit found in correct release branch" \
|| (echo "Commit not found in correct release branch" && exit 1)
git checkout -
get-build-requirements:
runs-on: ubuntu-22.04
@@ -152,9 +159,11 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
sparse-checkout: |
release
.github
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies

View File

@@ -82,7 +82,7 @@ jobs:
# Frontend preparation and caches
# `prepare-frontend` action (1) prepares Node.js and (2) fetches the node_modules cache if it exists.
# It then (3) runs `yarn install --frozen-lockfile --prefer-offline` which ensures the local cache is fully populated.
# It then (3) runs `bun install --frozen-lockfile` which ensures the local cache is fully populated.
# IMPORTANT: Caching node_modules after patches are already applied will break any PR that attempts to either:
# - upgrade a patched library
# - change a patch
@@ -92,31 +92,31 @@ jobs:
with:
apply-patches: "false"
- name: Get yarn cache directory
id: yarn-cache-dir
- name: Get bun cache directory
id: bun-cache
run: |
YARN_CACHE_DIR=$(yarn cache dir)
echo "Yarn cache directory: $YARN_CACHE_DIR"
echo "dir=$YARN_CACHE_DIR" >> $GITHUB_OUTPUT
BUN_CACHE_DIR=$(bun pm cache)
echo "Bun cache directory: $BUN_CACHE_DIR"
echo "dir=$BUN_CACHE_DIR" >> $GITHUB_OUTPUT
- 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
# Run Prettier to populate its cache (stored in node_modules/.cache/prettier)
# so it gets saved as part of the node_modules cache below
- name: Run Prettier to populate cache
run: yarn lint-prettier-pure
run: bun run lint-prettier-pure
- name: Update node_modules cache
uses: ./.github/actions/update-cache
with:
path: |
${{ steps.yarn-cache-dir.outputs.dir }}
${{ steps.bun-cache.outputs.dir }}
node_modules
key: ${{ env.NODE_CACHE_KEY }}
@@ -128,10 +128,10 @@ jobs:
# ESLint cache (requires both backend and frontend)
- name: Compile CLJS
run: yarn build-pure:cljs
run: bun run build-pure:cljs
- name: Run ESLint to populate cache
run: yarn lint-eslint-pure
run: bun run lint-eslint-pure
- name: Update eslint cache
uses: ./.github/actions/update-cache

View File

@@ -26,11 +26,13 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
sparse-checkout: |
release
.github
fetch-depth: ${{ env.isNewReleaseBranch == 'false' && 3 || 0 }} # we need the full history to get all the commit messages
ref: master # we want the logic from master, even though we're triggering on a release branch
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- uses: actions/github-script@v7
if: ${{ env.isNewReleaseBranch == 'false' }}
name: Set milestone for single commit

View File

@@ -41,7 +41,7 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Compile CLJS
run: NODE_ENV=development yarn build-pure:cljs
run: NODE_ENV=development bun run build-pure:cljs
- name: Publish to Chromatic
uses: chromaui/action@v10.2.0
env:

View File

@@ -70,6 +70,31 @@ jobs:
core.setFailed(error.message);
}
- name: Find linked Linear issue
id: find_linear
continue-on-error: true
uses: actions/github-script@v7
env:
LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }}
ISSUE_NUMBER: ${{ steps.get_issue.outputs.issue_number }}
with:
script: |
const { findLinearIssue } = require('${{ github.workspace }}/.github/scripts/find-linear-issue.js');
const githubIssueUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/issues/${process.env.ISSUE_NUMBER}`;
const result = await findLinearIssue({
githubIssueUrl,
linearApiKey: process.env.LINEAR_API_KEY
});
if (result.success) {
console.log(`Found Linear issue: ${result.issue}`);
core.setOutput('linear_issue', result.issue);
} else {
console.log(`Could not find Linear issue: ${result.message}`);
}
- name: Set up git configuration
run: |
git config --global user.name "Claude Code[bot]"
@@ -205,6 +230,12 @@ jobs:
mkdir -p .claude-scratchpad
echo "Scratchpad directory created for Claude's temporary verification files"
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Generate GitHub App Token for Claude
uses: actions/create-github-app-token@v1
id: claude-app-token
@@ -219,7 +250,7 @@ jobs:
github_token: ${{ steps.claude-app-token.outputs.token }}
prompt: ${{ env.BUG_FIX_PROMPT }}
claude_args: |
--allowedTools "Bash(yarn test-unit*),Bash(yarn lint-eslint-pure),Bash(./bin/mage*),Bash(clojure*),Bash(find*),Bash(ls*),Bash(grep*),Write,Read,Glob,Grep,Edit,MultiEdit"
--allowedTools "Bash(bun run test-unit*),Bash(bun run lint-eslint-pure),Bash(./bin/mage*),Bash(clojure*),Bash(find*),Bash(ls*),Bash(grep*),Write,Read,Glob,Grep,Edit,MultiEdit"
--disallowedTools "Bash(git commit*),Bash(git push*),Bash(gh*)"
- name: Clean up scratchpad directory
@@ -259,6 +290,7 @@ jobs:
core.setOutput('reviewers', issueCreator);
- name: Create Pull Request
id: create_pr
if: steps.check_changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v6
with:
@@ -279,6 +311,8 @@ jobs:
body: |
This PR automatically fixes the bug reported in #${{ env.ISSUE_NUMBER }}.
${{ steps.find_linear.outputs.linear_issue && format('Closes {0}', steps.find_linear.outputs.linear_issue) || '' }}
## Bug Report
**Original Issue:** #${{ env.ISSUE_NUMBER }}
**Reporter:** @${{ env.ISSUE_AUTHOR }}
@@ -299,7 +333,6 @@ jobs:
- If issues are found, either fix them or close this PR
---
Closes #${{ env.ISSUE_NUMBER }}
🤖 Generated with [Claude Code](https://claude.ai/code)
@@ -309,6 +342,7 @@ jobs:
automated-fix
ci skip
reviewers: ${{ steps.prepare_reviewers.outputs.reviewers }}
assignees: ${{ github.actor }}
- name: Log existing branch update
if: steps.check_changes.outputs.has_changes == 'true' && env.BRANCH_EXISTS == 'true'

View File

@@ -1,98 +0,0 @@
name: "Claude Code Review"
on:
pull_request:
types:
- closed
- synchronize
- labeled
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}-claude-code-review
cancel-in-progress: true
jobs:
review:
if: |
(
github.event.action == 'closed' &&
github.event.pull_request.merged == true
) ||
contains(github.event.pull_request.labels.*.name, 'Claude Code Review')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
# Apparently comments on specific lines and top-level comments about the PR as a whole are TWO TOTALLY DIFFERENT
# TYPES OF THINGS. So we have to fetch and delete separately.
- name: Delete old Claude PR review comments
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
shell: bash
run: |
# Get old comment IDs from the bot
old_line_comment_ids=$(gh api "/repos/$REPO/pulls/$PR_NUMBER/comments" --jq '.[] | select(.user.login=="metabase-bot[bot]") | .id')
echo "Deleting line comments: $old_line_comment_ids"
# Delete each comment
for id in $old_line_comment_ids; do
gh api -X DELETE "/repos/$REPO/pulls/comments/$id"
echo "Deleted line comment $id"
done
# Get old top-level comment IDs (technically "issue" comments on the PR?)
old_top_level_comment_ids=$(gh api "/repos/$REPO/issues/$PR_NUMBER/comments" --jq '.[] | select(.user.login=="metabase-bot[bot]") | .id')
echo "Deleting top-level comments: $old_top_level_comment_ids"
# Delete each comment
for id in $old_top_level_comment_ids; do
gh api -X DELETE "/repos/$REPO/issues/comments/$id"
echo "Deleted top-level comment $id"
done
- name: Generate GitHub App Token for Claude
uses: actions/create-github-app-token@v1
id: claude-app-token
with:
app-id: ${{ secrets.METABASE_BOT_APP_ID }}
private-key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }}
permission-contents: read # Required for reading repository files and PR diffs
permission-pull-requests: write # Required for creating inline comments and PR comments
- name: Fetch Community Clojure Style Guide
run: >-
curl https://raw.githubusercontent.com/bbatsov/clojure-style-guide/refs/heads/master/README.adoc -o CLOJURE_STYLE_GUIDE.adoc
- uses: anthropics/claude-code-action@v1
timeout-minutes: 10
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ steps.claude-app-token.outputs.token }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Review this pull request for compliance with project coding standards and conventions.
**Use the appropriate review skill based on the file types changed:**
- Use clojure-review for Clojure/ClojureScript files
- Use typescript-review for TypeScript/JavaScript files
- Follow the review guidelines and checklists in each skill
DO NOT post any comments confirming that something is correct - only post comments for style violations or concerns.
Note: The PR branch is already checked out in the current working directory.
Use `gh pr comment` for top-level feedback.
Use `mcp__github_inline_comment__create_inline_comment` to highlight specific code issues.
Only post GitHub comments - don't submit review text as messages.
claude_args: |
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),ReadFile(CLOJURE_STYLE_GUIDE.adoc)"

View File

@@ -1,101 +0,0 @@
name: "Claude Docs Review"
on:
pull_request:
types:
- opened
- synchronize
- reopened
paths:
- 'docs/**/*.md'
- 'docs/**/*.mdx'
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to review'
required: true
type: number
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}-claude-docs-review
cancel-in-progress: true
jobs:
review:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
- name: Generate GitHub App Token for Claude
uses: actions/create-github-app-token@v1
id: claude-app-token
with:
app-id: ${{ secrets.METABASE_BOT_APP_ID }}
private-key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }}
permission-contents: read # Required for reading repository files and PR diffs
permission-pull-requests: write # Required for creating inline comments and PR comments
- name: Delete old Claude docs review comments
env:
GH_TOKEN: ${{ steps.claude-app-token.outputs.token }}
REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number || github.event.inputs.pr_number }}
shell: bash
run: |
# Delete pending reviews first (these can be deleted entirely)
pending_review_ids=$(gh api "/repos/$REPO/pulls/$PR_NUMBER/reviews" --jq '.[] | select(.user.login=="metabase-bot[bot]" and .state=="PENDING") | .id')
if [ -n "$pending_review_ids" ]; then
echo "Deleting pending reviews: $pending_review_ids"
for id in $pending_review_ids; do
gh api -X DELETE "/repos/$REPO/pulls/$PR_NUMBER/reviews/$id"
echo "Deleted pending review $id"
done
fi
# Delete individual inline comments from submitted reviews (can't delete the review itself)
old_line_comment_ids=$(gh api "/repos/$REPO/pulls/$PR_NUMBER/comments" --jq '.[] | select(.user.login=="metabase-bot[bot]") | .id')
if [ -n "$old_line_comment_ids" ]; then
echo "Deleting line comments: $old_line_comment_ids"
for id in $old_line_comment_ids; do
gh api -X DELETE "/repos/$REPO/pulls/comments/$id"
echo "Deleted line comment $id"
done
fi
# Delete top-level review comments
old_top_level_comment_ids=$(gh api "/repos/$REPO/issues/$PR_NUMBER/comments" --jq '.[] | select(.user.login=="metabase-bot[bot]") | .id')
if [ -n "$old_top_level_comment_ids" ]; then
echo "Deleting top-level comments: $old_top_level_comment_ids"
for id in $old_top_level_comment_ids; do
gh api -X DELETE "/repos/$REPO/issues/comments/$id"
echo "Deleted top-level comment $id"
done
fi
- uses: anthropics/claude-code-action@v1
timeout-minutes: 10
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ steps.claude-app-token.outputs.token }}
show_full_output: true
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number || github.event.inputs.pr_number }}
Review the documentation changes in this pull request.
Use the docs-review skill to review all changed documentation files for compliance with the Metabase writing style guide.
DO NOT post any comments confirming that something is correct - only post comments for style violations or concerns.
claude_args: |
--allowedTools "Skill,mcp__github__get_pull_request,mcp__github__get_pull_request_files,mcp__github__create_pending_pull_request_review,mcp__github__get_pull_request_diff,mcp__github__add_comment_to_pending_review,mcp__github__add_pull_request_review_comment_to_pending_review,mcp__github__delete_pending_pull_request_review,mcp__github__submit_pending_pull_request_review"

View File

@@ -1,33 +0,0 @@
name: Cleanup caches by a branch
on:
pull_request:
types:
- closed
jobs:
cleanup:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -39,4 +39,4 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Run Cljs tests
run: yarn run test-cljs
run: bun run test-cljs

View File

@@ -1,19 +1,110 @@
name: Codespell
on:
push:
branches:
- 'master'
- 'release-**'
pull_request:
schedule:
# Run nightly at 4:00 AM UTC
- cron: "0 4 * * *"
workflow_dispatch:
jobs:
codespell:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: codespell-project/actions-codespell@v1
- uses: actions/checkout@v4
- name: Install codespell
run: pip install codespell
- name: Set up git configuration
run: |
git config --global user.name "Claude Code[bot]"
git config --global user.email "noreply@anthropic.com"
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Run codespell check
id: codespell_check
continue-on-error: true
run: |
set -o pipefail
./bin/mage codespell 2>&1 | tee codespell_output.txt
- name: Generate GitHub App Token for Claude
if: steps.codespell_check.outcome == 'failure'
uses: actions/create-github-app-token@v1
id: claude-app-token
with:
# keep this list in sync with the list in `mage/src/mage/codespell.yml`
path: >-
docs
app-id: ${{ secrets.METABASE_BOT_APP_ID }}
private-key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }}
- name: Fix spelling errors with Claude Code
if: steps.codespell_check.outcome == 'failure'
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ steps.claude-app-token.outputs.token }}
prompt: |
You are tasked with fixing spelling errors detected by codespell in this repository.
## Codespell Output
The following spelling errors were detected:
```
$(cat codespell_output.txt)
```
## Instructions
1. **Review the codespell output and identify reported spelling errors** - The usual format codespell uses is `typo ==> correction`
2. **Fix every spelling error** - Use the Edit tool to fix each misspelling with the suggested correction
- If codespell suggests multiple corrections, choose the most appropriate one based on context
Human reviewers will verify the changes before merging, so fix all errors reported by codespell.
claude_args: |
--allowedTools "Write,Read,Glob,Grep,Edit,MultiEdit,Bash(cat*),Bash(ls*)"
--disallowedTools "Bash(git commit*),Bash(git push*),Bash(gh*)"
- name: Clean up temporary files
if: steps.codespell_check.outcome == 'failure'
run: rm -f codespell_output.txt
- name: Create Pull Request
if: steps.codespell_check.outcome == 'failure'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: claude-fix/codespell-${{ steps.date.outputs.date }}
base: master
delete-branch: true
commit-message: |
Fix spelling errors detected by codespell (${{ steps.date.outputs.date }})
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
committer: "Claude Code[bot] <noreply@anthropic.com>"
author: "Claude Code[bot] <noreply@anthropic.com>"
title: "Fix spelling errors detected by codespell (${{ steps.date.outputs.date }})"
body: |
This PR automatically fixes spelling errors detected by the scheduled codespell check.
## Automated Fix
🤖 This fix was generated automatically by Claude Code based on codespell output.
**Please review carefully:**
- [ ] The spelling fixes are correct
- [ ] No code functionality was changed
- [ ] Technical terms were preserved correctly
---
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
labels: |
automated-fix
backport

View File

@@ -4,8 +4,10 @@ run-name: Containerize ${{ inputs.tag }} Uberjar
on:
workflow_call:
inputs:
artifact-name:
edition:
description: Metabase edition (ee or oss)
type: string
required: true
repo:
description: owner and repo like "metabase/metabase"
type: string
@@ -15,14 +17,18 @@ on:
type: string
release:
type: string
default: 'true'
default: 'false'
build-args:
type: string
workflow_dispatch:
inputs:
artifact-name:
description: usually something like "metabase-release-{{ edition }}-{{ hash }}-uberjar"
type: string
edition:
description: Metabase edition (ee or oss)
type: choice
options:
- ee
- oss
required: true
repo:
description: docker owner and repo like "metabase/metabase"
type: string
@@ -32,6 +38,13 @@ on:
commit:
description: the full commit hash
type: string
release:
description: Whether this is a release artifact (uses metabase-release- prefix)
type: choice
options:
- "false"
- "true"
default: "false"
jobs:
containerize:
@@ -45,12 +58,14 @@ jobs:
fetch-depth: 0
# we want the dockerfile from the commit we're building
- run: git checkout ${{ inputs.commit }} -- bin/docker
- name: Retrieve test build uberjar artifact
- name: Retrieve uberjar artifact
uses: ./.github/actions/fetch-artifact
with:
name: ${{ inputs.artifact-name }}
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
commit: ${{ inputs.commit }}
edition: ${{ inputs.edition }}
release: ${{ inputs.release }}
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Get platforms
id: platforms
uses: actions/github-script@v7

View File

@@ -55,13 +55,13 @@ jobs:
uses: ./.github/workflows/containerize-jar.yml
secrets: inherit
with:
artifact-name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar
commit: ${{ github.event.inputs.commit || github.sha }}
edition: ${{ matrix.edition }}
commit: ${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}
repo: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).repo }}
tag: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).tag }}
release: "false"
build-args: |
GIT_COMMIT_SHA=${{ github.event.inputs.commit || github.sha }}
GIT_COMMIT_SHA=${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}
run-trivy:
needs: [get-container-info, containerize]
@@ -74,7 +74,7 @@ jobs:
- name: Check out the code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit || github.sha }}
ref: ${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.29.0
env:

View File

@@ -17,7 +17,7 @@ jobs:
uses: ./.github/actions/prepare-backend
- name: Run frontend unit tests
run: |
yarn run test-unit \
bun run test-unit \
--silent \
--coverage \
--testTimeout=60000

View File

@@ -8,7 +8,7 @@ on:
target_branch:
description: "Target branch for documentation update"
required: false
default: "release-x.57.x"
default: "release-x.58.x"
type: string
jobs:
@@ -16,6 +16,6 @@ jobs:
name: Call documentation update for release branch
uses: ./.github/workflows/docs-generate-base.yml
with:
target_branch: ${{ inputs.target_branch || 'release-x.57.x' }}
target_branch: ${{ inputs.target_branch || 'release-x.58.x' }}
secrets:
automation_token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}

View File

@@ -12,12 +12,52 @@ concurrency:
cancel-in-progress: true
jobs:
# This job will determine if the tier 3 driver tests should be skipped.
# It will always run first.
# This job determines which driver tests should run based on PR context.
# All decision logic is consolidated in mage driver-decisions.
determine-driver-skips:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check-branch-and-files-changed.outputs.skip }}
# All driver run decisions (from mage driver-decisions)
h2-should-run: ${{ steps.driver-decisions.outputs.h2-should-run }}
athena-should-run: ${{ steps.driver-decisions.outputs.athena-should-run }}
bigquery-should-run: ${{ steps.driver-decisions.outputs.bigquery-should-run }}
clickhouse-should-run: ${{ steps.driver-decisions.outputs.clickhouse-should-run }}
databricks-should-run: ${{ steps.driver-decisions.outputs.databricks-should-run }}
druid-should-run: ${{ steps.driver-decisions.outputs.druid-should-run }}
druid-jdbc-should-run: ${{ steps.driver-decisions.outputs.druid-jdbc-should-run }}
mongo-should-run: ${{ steps.driver-decisions.outputs.mongo-should-run }}
mongo-ssl-should-run: ${{ steps.driver-decisions.outputs.mongo-ssl-should-run }}
mongo-sharded-cluster-should-run: ${{ steps.driver-decisions.outputs.mongo-sharded-cluster-should-run }}
mysql-mariadb-should-run: ${{ steps.driver-decisions.outputs.mysql-mariadb-should-run }}
oracle-should-run: ${{ steps.driver-decisions.outputs.oracle-should-run }}
postgres-should-run: ${{ steps.driver-decisions.outputs.postgres-should-run }}
presto-jdbc-should-run: ${{ steps.driver-decisions.outputs.presto-jdbc-should-run }}
redshift-should-run: ${{ steps.driver-decisions.outputs.redshift-should-run }}
snowflake-should-run: ${{ steps.driver-decisions.outputs.snowflake-should-run }}
sparksql-should-run: ${{ steps.driver-decisions.outputs.sparksql-should-run }}
sqlite-should-run: ${{ steps.driver-decisions.outputs.sqlite-should-run }}
sqlserver-should-run: ${{ steps.driver-decisions.outputs.sqlserver-should-run }}
vertica-should-run: ${{ steps.driver-decisions.outputs.vertica-should-run }}
# Per-driver quarantine conflict flags (set when driver is quarantined but has file changes)
athena-quarantine-conflict: ${{ steps.driver-decisions.outputs.athena-quarantine-conflict }}
bigquery-quarantine-conflict: ${{ steps.driver-decisions.outputs.bigquery-quarantine-conflict }}
clickhouse-quarantine-conflict: ${{ steps.driver-decisions.outputs.clickhouse-quarantine-conflict }}
databricks-quarantine-conflict: ${{ steps.driver-decisions.outputs.databricks-quarantine-conflict }}
druid-quarantine-conflict: ${{ steps.driver-decisions.outputs.druid-quarantine-conflict }}
druid-jdbc-quarantine-conflict: ${{ steps.driver-decisions.outputs.druid-jdbc-quarantine-conflict }}
mongo-quarantine-conflict: ${{ steps.driver-decisions.outputs.mongo-quarantine-conflict }}
mongo-ssl-quarantine-conflict: ${{ steps.driver-decisions.outputs.mongo-ssl-quarantine-conflict }}
mongo-sharded-cluster-quarantine-conflict: ${{ steps.driver-decisions.outputs.mongo-sharded-cluster-quarantine-conflict }}
mysql-mariadb-quarantine-conflict: ${{ steps.driver-decisions.outputs.mysql-mariadb-quarantine-conflict }}
oracle-quarantine-conflict: ${{ steps.driver-decisions.outputs.oracle-quarantine-conflict }}
postgres-quarantine-conflict: ${{ steps.driver-decisions.outputs.postgres-quarantine-conflict }}
presto-jdbc-quarantine-conflict: ${{ steps.driver-decisions.outputs.presto-jdbc-quarantine-conflict }}
redshift-quarantine-conflict: ${{ steps.driver-decisions.outputs.redshift-quarantine-conflict }}
snowflake-quarantine-conflict: ${{ steps.driver-decisions.outputs.snowflake-quarantine-conflict }}
sparksql-quarantine-conflict: ${{ steps.driver-decisions.outputs.sparksql-quarantine-conflict }}
sqlite-quarantine-conflict: ${{ steps.driver-decisions.outputs.sqlite-quarantine-conflict }}
sqlserver-quarantine-conflict: ${{ steps.driver-decisions.outputs.sqlserver-quarantine-conflict }}
vertica-quarantine-conflict: ${{ steps.driver-decisions.outputs.vertica-quarantine-conflict }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -26,31 +66,31 @@ jobs:
run: |
# Fetch the base branch to ensure its history is available for diffing
git fetch --depth=1 origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
# Only run this if it's a pull request and the base ref exists
- name: Check if driver tests should run
id: check-branch-and-files-changed
- name: Determine which drivers should run
id: driver-decisions
run: |
IS_MASTER_OR_RELEASE="${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') }}"
echo "Is master or release: ${IS_MASTER_OR_RELEASE}"
if [[ "${IS_MASTER_OR_RELEASE}" == "true" ]]; then
echo "skip=false" >> $GITHUB_OUTPUT
echo "Merging into master or a release branch. All driver tests will run."
else
echo "Checking for changes in relevant modules..."
if ./bin/mage can-skip-driver-tests "${{ github.event.pull_request.base.ref }}"; then
echo 'skip=true' >> $GITHUB_OUTPUT
else
echo 'skip=false' >> $GITHUB_OUTPUT
fi
fi
# All decision logic is in mage - it analyzes module dependencies,
# branch context, labels, and file changes to decide what runs.
MAGE_ARGS=(
--git-ref="${{ github.event.pull_request.base.ref || github.ref_name }}"
--is-master-or-release="${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release-') }}"
--pr-labels="${{ join(github.event.pull_request.labels.*.name, ',') }}"
--skip="${{ inputs.skip }}"
)
echo "Running:"
echo "./bin/mage -driver-decisions ${MAGE_ARGS[@]}"
echo ""
# First call: show human-readable output for debugging
./bin/mage -driver-decisions "${MAGE_ARGS[@]}"
# Second call: output only key=value lines for GITHUB_OUTPUT
./bin/mage -driver-decisions "${MAGE_ARGS[@]}" --github-output-only >> $GITHUB_OUTPUT
shell: bash
be-tests-athena-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.athena-should-run == 'true' || needs.determine-driver-skips.outputs.athena-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: athena
@@ -65,6 +105,16 @@ jobs:
MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_SECRET_KEY: ${{ secrets.MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_SECRET_KEY }}
name: Athena
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.athena-quarantine-conflict == 'true' }}
run: |
echo "::error::Athena driver is quarantined but you changed files in modules/drivers/athena/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Athena tests, add the label: break-quarantine-athena"
echo ""
echo "If you merge without testing, you risk breaking the Athena driver!"
exit 1
- uses: actions/checkout@v4
- name: Test Athena driver
id: test-driver
@@ -76,7 +126,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -85,10 +135,11 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-bigquery-cloud-sdk-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.bigquery-should-run == 'true' || needs.determine-driver-skips.outputs.bigquery-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
@@ -99,6 +150,7 @@ jobs:
test-args: >-
:only-tags [:mb/driver-tests]
:exclude-tags [:mb/transforms-python-test]
:fail-fast? true
# DS 2025-09-26 temporarily disabled while we diagnose flakes
# - name: Transforms Python Tests
# test-args: >-
@@ -116,6 +168,16 @@ jobs:
MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON_ROUTING: ${{ secrets.MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON_ROUTING }}
name: BigQuery ${{ matrix.job.name }}
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.bigquery-quarantine-conflict == 'true' }}
run: |
echo "::error::BigQuery driver is quarantined but you changed files in modules/drivers/bigquery-cloud-sdk/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run BigQuery tests, add the label: break-quarantine-bigquery"
echo ""
echo "If you merge without testing, you risk breaking the BigQuery driver!"
exit 1
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
@@ -131,7 +193,7 @@ jobs:
logs-artifact-suffix: ${{ matrix.job.name }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -140,6 +202,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
@@ -149,9 +212,9 @@ jobs:
be-tests-clickhouse-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.clickhouse-should-run == 'true' || needs.determine-driver-skips.outputs.clickhouse-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -173,6 +236,16 @@ jobs:
MB_CLICKHOUSE_TEST_NGINX_PORT: 8127
name: Clickhouse ${{ matrix.job.name }}
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.clickhouse-quarantine-conflict == 'true' }}
run: |
echo "::error::ClickHouse driver is quarantined but you changed files in modules/drivers/clickhouse/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run ClickHouse tests, add the label: break-quarantine-clickhouse"
echo ""
echo "If you merge without testing, you risk breaking the ClickHouse driver!"
exit 1
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
@@ -203,7 +276,7 @@ jobs:
logs-artifact-suffix: ${{ matrix.job.name }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -212,6 +285,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
@@ -221,9 +295,9 @@ jobs:
be-tests-druid-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.druid-should-run == 'true' || needs.determine-driver-skips.outputs.druid-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: druid
@@ -236,6 +310,16 @@ jobs:
CLUSTER_SIZE: nano-quickstart
name: Druid (Legacy)
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.druid-quarantine-conflict == 'true' }}
run: |
echo "::error::Druid driver is quarantined but you changed files in modules/drivers/druid/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Druid tests, add the label: break-quarantine-druid"
echo ""
echo "If you merge without testing, you risk breaking the Druid driver!"
exit 1
- uses: actions/checkout@v4
- name: Test Druid driver
id: test-driver
@@ -247,7 +331,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -256,12 +340,13 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-druid-jdbc-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.druid-jdbc-should-run == 'true' || needs.determine-driver-skips.outputs.druid-jdbc-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: druid-jdbc
@@ -274,6 +359,16 @@ jobs:
CLUSTER_SIZE: nano-quickstart
name: Druid (JDBC)
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.druid-jdbc-quarantine-conflict == 'true' }}
run: |
echo "::error::Druid JDBC driver is quarantined but you changed files in modules/drivers/druid-jdbc/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Druid JDBC tests, add the label: break-quarantine-druid-jdbc"
echo ""
echo "If you merge without testing, you risk breaking the Druid JDBC driver!"
exit 1
- uses: actions/checkout@v4
- name: Test Druid JDBC driver
id: test-driver
@@ -285,7 +380,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -294,12 +389,13 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-databricks-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.databricks-should-run == 'true' || needs.determine-driver-skips.outputs.databricks-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: databricks
@@ -312,6 +408,16 @@ jobs:
MB_DATABRICKS_TEST_OAUTH_SECRET: ${{ secrets.MB_DATABRICKS_JDBC_TEST_OAUTH_SECRET }}
name: Databricks
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.databricks-quarantine-conflict == 'true' }}
run: |
echo "::error::Databricks driver is quarantined but you changed files in modules/drivers/databricks/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Databricks tests, add the label: break-quarantine-databricks"
echo ""
echo "If you merge without testing, you risk breaking the Databricks driver!"
exit 1
- uses: actions/checkout@v4
- name: Test Databricks driver
id: test-driver
@@ -323,7 +429,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -332,12 +438,13 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-databricks-multi-catalog-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.databricks-should-run == 'true' || needs.determine-driver-skips.outputs.databricks-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: databricks
@@ -351,6 +458,16 @@ jobs:
MB_DATABRICKS_TEST_OAUTH_SECRET: ${{ secrets.MB_DATABRICKS_JDBC_TEST_OAUTH_SECRET }}
name: Databricks (Multi-Catalog)
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.databricks-quarantine-conflict == 'true' }}
run: |
echo "::error::Databricks driver is quarantined but you changed files in modules/drivers/databricks/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Databricks tests, add the label: break-quarantine-databricks"
echo ""
echo "If you merge without testing, you risk breaking the Databricks driver!"
exit 1
- uses: actions/checkout@v4
- name: Test Databricks driver with multi-catalog
id: test-driver
@@ -362,7 +479,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -371,11 +488,13 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-h2:
if: ${{ !inputs.skip }}
needs: determine-driver-skips
if: ${{ needs.determine-driver-skips.outputs.h2-should-run == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
name: H2
@@ -391,7 +510,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -400,12 +519,45 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-h2-oss:
needs: determine-driver-skips
if: ${{ needs.determine-driver-skips.outputs.h2-should-run == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 40
env:
CI: 'true'
name: H2 (OSS)
steps:
- uses: actions/checkout@v4
- name: Test H2 driver (OSS)
id: test-driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-h2-oss'
edition: 'oss'
test-args: >-
:only-tags [:mb/driver-tests]
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
bucket: ${{ vars.AWS_S3_TEST_RESULTS_BUCKET }}
aws-access-key-id: ${{ secrets.AWS_TEST_RESULTS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-mysql-mariadb:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.mysql-mariadb-should-run == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -461,8 +613,8 @@ jobs:
(
github.event_name == 'push' &&
(
github.ref == 'master' ||
startsWith(github.ref, 'release-')
github.ref_name == 'master' ||
startsWith(github.ref_name, 'release-')
) &&
''
) ||
@@ -521,7 +673,7 @@ jobs:
:exclude-tags '[ ${{ matrix.job.exclude-tag }} ${{ env.__ADDITIONAL_EXCLUDED_TAG__ }}]'
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -530,6 +682,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
- name: Cleanup python-runner
if: always()
uses: ./.github/actions/cleanup-python-runner
@@ -539,9 +692,9 @@ jobs:
be-tests-mongo:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.mongo-should-run == 'true' || needs.determine-driver-skips.outputs.mongo-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -576,6 +729,16 @@ jobs:
MONGO_INITDB_ROOT_PASSWORD: metasample123
name: ${{ matrix.version.name }} ${{ matrix.job.name }}
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.mongo-quarantine-conflict == 'true' }}
run: |
echo "::error::MongoDB driver is quarantined but you changed files in modules/drivers/mongo/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run MongoDB tests, add the label: break-quarantine-mongo"
echo ""
echo "If you merge without testing, you risk breaking the MongoDB driver!"
exit 1
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
@@ -591,7 +754,7 @@ jobs:
logs-artifact-suffix: ${{ matrix.job.name }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -600,6 +763,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
@@ -609,9 +773,9 @@ jobs:
be-tests-mongo-ssl:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.mongo-ssl-should-run == 'true' || needs.determine-driver-skips.outputs.mongo-ssl-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -627,6 +791,16 @@ jobs:
MB_TEST_MONGO_REQUIRES_SSL: true
name: "${{ matrix.version.name }} (SSL)"
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.mongo-ssl-quarantine-conflict == 'true' }}
run: |
echo "::error::MongoDB SSL driver is quarantined but you changed files in modules/drivers/mongo/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run MongoDB SSL tests, add the label: break-quarantine-mongo-ssl"
echo ""
echo "If you merge without testing, you risk breaking the MongoDB SSL driver!"
exit 1
- uses: actions/checkout@v4
- name: Spin up Mongo docker container
run: >-
@@ -663,7 +837,7 @@ jobs:
:only-tags [:mb/driver-tests]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -672,12 +846,13 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-mongo-sharded-cluster-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.mongo-sharded-cluster-should-run == 'true' || needs.determine-driver-skips.outputs.mongo-sharded-cluster-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: mongo
@@ -688,6 +863,16 @@ jobs:
- "27017:17017"
name: MongoDB Sharded Cluster
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.mongo-sharded-cluster-quarantine-conflict == 'true' }}
run: |
echo "::error::MongoDB Sharded Cluster driver is quarantined but you changed files in modules/drivers/mongo/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run MongoDB Sharded Cluster tests, add the label: break-quarantine-mongo-sharded-cluster"
echo ""
echo "If you merge without testing, you risk breaking the MongoDB Sharded Cluster driver!"
exit 1
- uses: actions/checkout@v4
- name: Test MongoDB driver (Sharded cluster)
id: test-driver
@@ -698,7 +883,7 @@ jobs:
:only metabase.driver.mongo.sharded-cluster-test
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -707,12 +892,13 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-oracle:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.oracle-should-run == 'true' || needs.determine-driver-skips.outputs.oracle-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -761,6 +947,16 @@ jobs:
- "1521:${{ matrix.version.port }}"
name: ${{ matrix.version.name }}
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.oracle-quarantine-conflict == 'true' }}
run: |
echo "::error::Oracle driver is quarantined but you changed files in modules/drivers/oracle/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Oracle tests, add the label: break-quarantine-oracle"
echo ""
echo "If you merge without testing, you risk breaking the Oracle driver!"
exit 1
- uses: actions/checkout@v4
- name: Test ${{ matrix.version.name }}
id: test-driver
@@ -773,7 +969,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -782,12 +978,13 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-postgres:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.postgres-should-run == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -823,8 +1020,8 @@ jobs:
(
github.event_name == 'push' &&
(
github.ref == 'master' ||
startsWith(github.ref, 'release-')
github.ref_name == 'master' ||
startsWith(github.ref_name, 'release-')
) &&
''
) ||
@@ -871,12 +1068,13 @@ jobs:
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-${{ matrix.version.junit-name }}'
logs-artifact-suffix: ${{ matrix.version.name }}-${{ matrix.job.name }}
test-args: >-
${{ matrix.job.test-args }}
:exclude-tags '[ ${{ matrix.job.exclude-tag }} ${{ env.__ADDITIONAL_EXCLUDED_TAG__ }}]'
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -885,6 +1083,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
- name: Cleanup python-runner
if: always()
uses: ./.github/actions/cleanup-python-runner
@@ -894,9 +1093,9 @@ jobs:
be-tests-presto-jdbc-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.presto-jdbc-should-run == 'true' || needs.determine-driver-skips.outputs.presto-jdbc-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: presto-jdbc
@@ -917,6 +1116,16 @@ jobs:
env:
JAVA_TOOL_OPTIONS: "-Xmx2g"
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.presto-jdbc-quarantine-conflict == 'true' }}
run: |
echo "::error::Presto JDBC driver is quarantined but you changed files in modules/drivers/presto-jdbc/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Presto JDBC tests, add the label: break-quarantine-presto-jdbc"
echo ""
echo "If you merge without testing, you risk breaking the Presto JDBC driver!"
exit 1
- uses: actions/checkout@v4
- uses: ./.github/actions/await-port
with:
@@ -953,7 +1162,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -962,12 +1171,13 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-redshift-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.redshift-should-run == 'true' || needs.determine-driver-skips.outputs.redshift-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
@@ -1010,6 +1220,16 @@ jobs:
MB_REDSHIFT_TEST_PASSWORD: ${{ secrets.MB_REDSHIFT_TEST_PASSWORD }}
name: ${{ matrix.job.name }}
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.redshift-quarantine-conflict == 'true' }}
run: |
echo "::error::Redshift driver is quarantined but you changed files in modules/drivers/redshift/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Redshift tests, add the label: break-quarantine-redshift"
echo ""
echo "If you merge without testing, you risk breaking the Redshift driver!"
exit 1
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
@@ -1027,7 +1247,7 @@ jobs:
logs-artifact-suffix: ${{ matrix.job.name }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: ${{ !matrix.job.skip && !cancelled() && steps.test-driver.outputs.quarantine-skipped != 'true' }}
if: ${{ !matrix.job.skip && !cancelled() }}
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -1036,6 +1256,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
@@ -1045,7 +1266,7 @@ jobs:
be-tests-snowflake-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.snowflake-should-run == 'true' || needs.determine-driver-skips.outputs.snowflake-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
@@ -1056,6 +1277,7 @@ jobs:
test-args: >-
:only-tags [:mb/driver-tests]
:exclude-tags [:mb/transforms-python-test]
:fail-fast? true
# DS 2025-09-26 temporarily disabled while we diagnose flakes
# - name: Transforms Python Tests
@@ -1083,6 +1305,16 @@ jobs:
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_DB: RSA_ROLE_TEST_DB
name: Snowflake ${{ matrix.job.name }}
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.snowflake-quarantine-conflict == 'true' }}
run: |
echo "::error::Snowflake driver is quarantined but you changed files in modules/drivers/snowflake/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Snowflake tests, add the label: break-quarantine-snowflake"
echo ""
echo "If you merge without testing, you risk breaking the Snowflake driver!"
exit 1
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
@@ -1098,7 +1330,7 @@ jobs:
logs-artifact-suffix: ${{ matrix.job.name }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -1107,6 +1339,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
@@ -1116,9 +1349,9 @@ jobs:
be-tests-sparksql-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.sparksql-should-run == 'true' || needs.determine-driver-skips.outputs.sparksql-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: sparksql
@@ -1129,6 +1362,16 @@ jobs:
- "10000:10000"
name: Spark SQL
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.sparksql-quarantine-conflict == 'true' }}
run: |
echo "::error::SparkSQL driver is quarantined but you changed files in modules/drivers/sparksql/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run SparkSQL tests, add the label: break-quarantine-sparksql"
echo ""
echo "If you merge without testing, you risk breaking the SparkSQL driver!"
exit 1
- uses: actions/checkout@v4
- name: Test Spark driver
id: test-driver
@@ -1140,7 +1383,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -1149,17 +1392,28 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-sqlite-ee:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.sqlite-should-run == 'true' || needs.determine-driver-skips.outputs.sqlite-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: sqlite
name: SQLite
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.sqlite-quarantine-conflict == 'true' }}
run: |
echo "::error::SQLite driver is quarantined but you changed files in modules/drivers/sqlite/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run SQLite tests, add the label: break-quarantine-sqlite"
echo ""
echo "If you merge without testing, you risk breaking the SQLite driver!"
exit 1
- uses: actions/checkout@v4
- name: Test SQLite driver
id: test-driver
@@ -1171,7 +1425,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -1180,10 +1434,11 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
be-tests-sqlserver:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.sqlserver-should-run == 'true' || needs.determine-driver-skips.outputs.sqlserver-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
@@ -1222,6 +1477,16 @@ jobs:
MSSQL_MEMORY_LIMIT_MB: 1024
name: ${{ matrix.version.name }} ${{ matrix.job.name }}
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.sqlserver-quarantine-conflict == 'true' }}
run: |
echo "::error::SQL Server driver is quarantined but you changed files in modules/drivers/sqlserver/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run SQL Server tests, add the label: break-quarantine-sqlserver"
echo ""
echo "If you merge without testing, you risk breaking the SQL Server driver!"
exit 1
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
@@ -1237,7 +1502,7 @@ jobs:
logs-artifact-suffix: ${{ matrix.version.name }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -1246,6 +1511,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
@@ -1258,7 +1524,7 @@ jobs:
# needs: determine-driver-skips
# if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
# runs-on: ubuntu-latest
# timeout-minutes: 60
# timeout-minutes: 40
# env:
# CI: 'true'
# DRIVERS: starburst
@@ -1294,7 +1560,7 @@ jobs:
login-to-ecr:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.vertica-should-run == 'true' || needs.determine-driver-skips.outputs.vertica-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
@@ -1324,9 +1590,9 @@ jobs:
be-tests-vertica-ee:
needs: [determine-driver-skips, login-to-ecr]
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
if: ${{ needs.determine-driver-skips.outputs.vertica-should-run == 'true' || needs.determine-driver-skips.outputs.vertica-quarantine-conflict == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
DRIVERS: vertica
@@ -1340,6 +1606,16 @@ jobs:
password: ${{ needs.login-to-ecr.outputs.docker_password }}
name: Vertica
steps:
- name: Fail on quarantine conflict
if: ${{ needs.determine-driver-skips.outputs.vertica-quarantine-conflict == 'true' }}
run: |
echo "::error::Vertica driver is quarantined but you changed files in modules/drivers/vertica/"
echo ""
echo "Your changes will NOT be tested because the driver is currently quarantined."
echo "To run Vertica tests, add the label: break-quarantine-vertica"
echo ""
echo "If you merge without testing, you risk breaking the Vertica driver!"
exit 1
- uses: actions/checkout@v4
- name: Make plugins directory
run: mkdir plugins
@@ -1353,7 +1629,7 @@ jobs:
:exclude-tags [:mb/transforms-python-test]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always() && steps.test-driver.outputs.quarantine-skipped != 'true'
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
@@ -1362,6 +1638,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
drivers-tests-result:
needs:

View File

@@ -76,19 +76,15 @@ jobs:
timeout-minutes: 60
name: Stress test E2E flake fix
env:
DISPLAY: ""
MB_RUN_MODE: e2e
METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}
DISPLAY: "" # https://github.com/cypress-io/cypress/issues/4034
TERM: xterm
TZ: US/Pacific # to make Node match the instance tz
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.STAGING_MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.STAGING_MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.STAGING_MB_PRO_SELF_HOSTED_TOKEN }}
MB_SNOWPLOW_AVAILABLE: true
MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro
MB_EDITION: ${{ inputs.mb_edition }}
CYPRESS_ENABLE_NETWORK_THROTTLING: ${{ inputs.enable_network_throttling }}
TERM: xterm
TZ: US/Pacific # to make node match the instance tz
steps:
- uses: actions/checkout@v4
with:
@@ -114,24 +110,33 @@ jobs:
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Build Embedding SDK package
if: ${{ needs.determine-test-type.outputs.type == 'component' }}
run: yarn build-embedding-sdk-package
run: bun run build-embedding-sdk-package
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Compile CLJS
run: bun run build-pure:cljs
- name: Run Metabase
run: node e2e/runner/run_cypress_ci.js start
- name: Generate database snapshots
- name: Generate default database snapshot
if: inputs.qa_db == false # true boolean, do not use string here!
run: |
node e2e/runner/run_cypress_ci.js snapshot \
--env grepTags="${{inputs.qa_db && '' || '-@external'}}"
--spec "e2e/snapshot-creators/default.cy.snap.js"
- name: Generate all database snapshots
if: inputs.qa_db
run: |
node e2e/runner/run_cypress_ci.js snapshot
# For all options and fine-grained control, take a look at the documentation
# https://github.com/cypress-io/cypress/tree/develop/npm/grep

View File

@@ -29,28 +29,29 @@ on:
required: false
type: number
env:
DISPLAY: "" # https://github.com/cypress-io/cypress/issues/4034
TERM: xterm
TZ: US/Pacific # to make Node match the instance tz
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
JOB_NAME: ${{ inputs.name }}
jobs:
e2e-tests:
runs-on: ${{ inputs.runner }}
timeout-minutes: 45
timeout-minutes: 40
name: e2e-tests-${{ inputs.name }}-${{ inputs.edition }}
env:
MB_EDITION: ${{ inputs.edition }}
DISPLAY: ""
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
JOB_NAME: ${{ inputs.name }}
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
# Sensitive env vars (tokens, secrets) starting with `CYPRESS_` are accessed via async `cy.env()`
# Example: `cy.env(["FOO"]).then(({ FOO }) => ...)`
# For non-sensitive config, use `Cypress.expose()` in cypress config instead (synchronous)
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.STAGING_MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.STAGING_MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.STAGING_MB_PRO_SELF_HOSTED_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
steps:
- uses: actions/checkout@v4
with:
@@ -79,7 +80,8 @@ jobs:
- name: Retrieve uberjar artifact for ${{ inputs.edition }}
uses: ./.github/actions/fetch-artifact
with:
name: metabase-${{ inputs.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
commit: ${{ github.event.pull_request.head.sha || github.sha }}
edition: ${{ inputs.edition }}
extract-path: "target/uberjar"
output-name: "metabase.jar"
@@ -104,6 +106,9 @@ jobs:
if: github.run_attempt != '1'
run: echo "specs=$(cat failed-specs)" >> $GITHUB_ENV
- name: Compile CLJS
run: bun run build-pure:cljs
- name: Run Metabase
run: node e2e/runner/run_cypress_ci.js start
@@ -113,6 +118,7 @@ jobs:
run: node e2e/runner/run_cypress_ci.js snapshot
- name: Run auto-split Cypress tests on ${{ inputs.name }}
id: split-e2e
if: ${{ !inputs.specs }}
env:
SPLIT: ${{ inputs.total_chunks }}
@@ -136,6 +142,7 @@ jobs:
continue-on-error: true
- name: Run Tagged EE Cypress tests on ${{ inputs.name }}
id: tagged-e2e
if: ${{ inputs.specs }}
shell: bash
env:
@@ -165,10 +172,12 @@ jobs:
# Related to Trunk uploader
variant: e2e-tests
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ inputs.specs && steps.tagged-e2e.outcome || steps.split-e2e.outcome }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: failure()
if: |
!cancelled() && (steps.split-e2e.outcome == 'failure' || steps.tagged-e2e.outcome == 'failure')
with:
name: cypress-recording-${{ inputs.name }}-${{ inputs.edition }}
path: |
@@ -178,10 +187,12 @@ jobs:
- name: Upload Failed Tests
uses: actions/upload-artifact@v4
if: failure()
if: |
!cancelled() && (steps.split-e2e.outcome == 'failure' || steps.tagged-e2e.outcome == 'failure')
with:
name: failed-tests-${{ inputs.name }}-${{ inputs.edition }}
path: ./cypress/test-results
if-no-files-found: ignore
- name: Extract chunk-specific changed timings
id: extract-timings

View File

@@ -3,6 +3,12 @@ name: Embedding SDK Component Tests
on:
workflow_call:
env:
DISPLAY: "" # https://github.com/cypress-io/cypress/issues/4034
TERM: xterm
TZ: US/Pacific # to make Node match the instance tz
MB_EDITION: "ee"
jobs:
sdk-component-tests:
name: "SDK component tests (React ${{ matrix.react-version }})"
@@ -13,17 +19,13 @@ jobs:
react-version: [18, 19]
fail-fast: false
env:
MB_EDITION: ee
DISPLAY: ""
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
# Sensitive env vars (tokens, secrets) starting with `CYPRESS_` are accessed via async `cy.env()`
# Example: `cy.env(["FOO"]).then(({ FOO }) => ...)`
# For non-sensitive config, use `Cypress.expose()` in cypress config instead (synchronous)
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.STAGING_MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.STAGING_MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.STAGING_MB_PRO_SELF_HOSTED_TOKEN }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
steps:
- uses: actions/checkout@v4
@@ -44,7 +46,8 @@ jobs:
- name: Retrieve uberjar artifact for ee
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
commit: ${{ github.event.pull_request.head.sha || github.sha }}
edition: ee
extract-path: "target/uberjar"
output-name: "metabase.jar"
@@ -79,6 +82,7 @@ jobs:
run: ./bin/embedding-sdk/change-react-version.bash ${{ matrix.react-version }}
- name: Run component tests for Embedding SDK
id: run-tests
env:
CYPRESS_BROWSER: ${{ steps.cypress-prep.outputs.chrome-path }}
run: node e2e/runner/run_cypress_ci.js component
@@ -94,6 +98,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.run-tests.outcome }}
- name: "SDK component tests > Upload Cypress Artifacts upon failure"
uses: actions/upload-artifact@v4
@@ -149,19 +154,15 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 45
env:
MB_EDITION: ee
DISPLAY: ""
MB_RUN_MODE: "e2e"
METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
# Sensitive env vars (tokens, secrets) starting with `CYPRESS_` are accessed via async `cy.env()`
# Example: `cy.env(["FOO"]).then(({ FOO }) => ...)`
# For non-sensitive config, use `Cypress.expose()` in cypress config instead (synchronous)
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.STAGING_MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.STAGING_MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.STAGING_MB_PRO_SELF_HOSTED_TOKEN }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
steps:
- name: Check out the code from the previous commit
@@ -198,7 +199,8 @@ jobs:
id: download-uberjar
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ steps.get-commit-sha.outputs.sha }}-uberjar
commit: ${{ steps.get-commit-sha.outputs.sha }}
edition: ee
extract-path: "target/uberjar"
output-name: "metabase.jar"
continue-on-error: true # do not break the whole job if this step doesn't succeed
@@ -232,6 +234,7 @@ jobs:
--spec "e2e/snapshot-creators/default.cy.snap.js"
- name: Run component tests for Embedding SDK
id: run-tests
env:
CYPRESS_BROWSER: ${{ steps.cypress-prep.outputs.chrome-path }}
run: |
@@ -249,6 +252,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.run-tests.outcome }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4

View File

@@ -3,6 +3,13 @@ name: "[NOT REQUIRED] SDK Compatibility tests"
on:
workflow_call:
env:
DISPLAY: "" # https://github.com/cypress-io/cypress/issues/4034
TERM: xterm
TZ: US/Pacific # to make Node match the instance tz
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
MB_EDITION: ee
jobs:
get-sample-apps-data:
runs-on: ubuntu-22.04
@@ -13,12 +20,7 @@ jobs:
TEST_SUITES: |
[
"metabase-nodejs-react-sdk-embedding-sample-e2e",
"metabase-nextjs-sdk-embedding-sample-e2e",
"shoppy-e2e"
]
TEST_SUITES_TO_RUN_IN_MASTER_ONLY: |
[
"shoppy-e2e"
"metabase-nextjs-sdk-embedding-sample-e2e"
]
SAMPLE_APP_MAIN_BRANCH_NAME: "main"
SAMPLE_APP_STABLE_RELEASE_BRANCH_NAME_SUFFIX: "stable"
@@ -28,8 +30,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Build sample app compatibility data
uses: actions/github-script@v7
@@ -42,7 +44,6 @@ jobs:
} = require('${{ github.workspace }}/release/dist/index.cjs');
const testSuites = JSON.parse(process.env.TEST_SUITES);
const testSuitesToRunInMasterOnly = JSON.parse(process.env.TEST_SUITES_TO_RUN_IN_MASTER_ONLY);
const ref = '${{ github.base_ref || github.ref }}';
const branchName = ref.replace(/^refs\/heads\//, '');
@@ -66,19 +67,16 @@ jobs:
const sampleAppBranchName = `${currentBranchVersion}-${{ env.SAMPLE_APP_STABLE_RELEASE_BRANCH_NAME_SUFFIX }}`
const shouldRunTestsForVersion = (currentReleaseVersion - currentBranchVersion) <= (supportedReleasesCount - 1);
const releaseBranchTestSuites = testSuites.filter(testSuite => !testSuitesToRunInMasterOnly.includes(testSuite));
return {
branch_name: sampleAppBranchName,
matrix: shouldRunTestsForVersion
? releaseBranchTestSuites
: []
matrix: shouldRunTestsForVersion ? testSuites : [],
};
}
return {
branch_name: '',
matrix: []
matrix: [],
};
# In order to check compatibility between Sample Apps and Embedding SDK, the job for each sample app:
@@ -100,15 +98,9 @@ jobs:
name: e2e-sample-app-${{ matrix.test_suite }}-tests-${{ matrix.environment }}-bundle
env:
MB_EDITION: ee
DISPLAY: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
MB_RUN_MODE: e2e
METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
SAMPLE_APP_BRANCH_NAME: ${{ needs.get-sample-apps-data.outputs.branch_name }}
SAMPLE_APP_ENVIRONMENT: ${{ matrix.environment }}
permissions:
@@ -117,6 +109,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- 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
@@ -133,7 +127,8 @@ jobs:
- name: Retrieve uberjar artifact for ee
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
commit: ${{ github.event.pull_request.head.sha || github.sha }}
edition: ee
extract-path: "target/uberjar"
output-name: "metabase.jar"
@@ -163,30 +158,16 @@ jobs:
echo "sample_app_branch_exists=false" >> $GITHUB_OUTPUT
fi
- name: Configure AWS credentials
if: ${{ matrix.test_suite == 'shoppy-e2e' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.SHOPPY_IAM_ROLE }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: us-east-1
- name: Download Shoppy's App DB PostgreSQL dump from S3
if: ${{ matrix.test_suite == 'shoppy-e2e' }}
run: |
aws s3 cp s3://${{ secrets.SHOPPY_METABASE_APP_DB_S3_BUCKET }}/${{ secrets.SHOPPY_METABASE_APP_DB_S3_KEY }} ./e2e/tmp/db_dumps/shoppy_metabase_app_db_dump.sql
- name: Prepare and launch Sample Apps for shoppy-e2e test suite
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' && matrix.test_suite == 'shoppy-e2e' }}
env:
METABASE_APP_DB_USER: ${{ secrets.SHOPPY_METABASE_APP_DB_USER }}
METABASE_APP_DB: ${{ secrets.SHOPPY_METABASE_APP_DB_DATABASE }}
run: npx tsx ./e2e/runner/embedding-sdk/sample-apps/start-ci.ts shoppy-e2e
- name: Prepare and launch Sample Apps for other test suites
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' && matrix.test_suite != 'shoppy-e2e' }}
- name: Prepare and launch Sample Apps
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' }}
run: npx tsx ./e2e/runner/embedding-sdk/sample-apps/start-ci.ts ${{ matrix.test_suite }}
- name: Prune build cache
run: docker builder prune -af
- name: Log free disk space
run: df -h /
- name: Run e2e tests for Sample App
id: run-e2e-tests
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' }}
@@ -199,7 +180,7 @@ jobs:
uses: actions/upload-artifact@v4
if: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' && steps.run-e2e-tests.outcome != 'success' }}
with:
name: cypress-recording-sample-app-${{ matrix.test_suite }}-latest
name: cypress-recording-sample-app-${{ matrix.test_suite }}-${{ matrix.environment }}-latest
path: |
./e2e/tmp/${{ steps.get-sample-app-name.outputs.sample_app_name }}/cypress
if-no-files-found: ignore
@@ -209,6 +190,149 @@ jobs:
run: |
exit 1
# Shoppy e2e tests run separately using the shared composite action for setup.
e2e-shoppy-tests:
needs: [get-sample-apps-data]
strategy:
matrix:
environment: ["production", "development"]
if: |
!cancelled() && needs.get-sample-apps-data.result == 'success' &&
(github.ref == 'refs/heads/master' || github.base_ref == 'master')
runs-on: ubuntu-22.04
timeout-minutes: 45
name: e2e-sample-app-shoppy-e2e-tests-${{ matrix.environment }}-bundle
env:
MB_EDITION: ee
MB_RUN_MODE: e2e
METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
SAMPLE_APP_BRANCH_NAME: ${{ needs.get-sample-apps-data.outputs.branch_name }}
SAMPLE_APP_ENVIRONMENT: ${{ matrix.environment }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Prepare Shoppy E2E environment
uses: ./.github/actions/prepare-shoppy-e2e
id: shoppy-prep
with:
commit: ${{ github.event.pull_request.head.sha || github.sha }}
sample-app-branch-name: ${{ needs.get-sample-apps-data.outputs.branch_name }}
sample-app-environment: ${{ matrix.environment }}
staging-mb-all-features-token: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
shoppy-iam-role: ${{ secrets.SHOPPY_IAM_ROLE }}
shoppy-metabase-app-db-s3-bucket: ${{ secrets.SHOPPY_METABASE_APP_DB_S3_BUCKET }}
shoppy-metabase-app-db-s3-key: ${{ secrets.SHOPPY_METABASE_APP_DB_S3_KEY }}
shoppy-metabase-app-db-user: ${{ secrets.SHOPPY_METABASE_APP_DB_USER }}
shoppy-metabase-app-db-database: ${{ secrets.SHOPPY_METABASE_APP_DB_DATABASE }}
metastore-dev-server-url: ${{ secrets.METASTORE_DEV_SERVER_URL }}
shoppy-datadog-application-id: ${{ secrets.SHOPPY_METABASE_APP_DATADOG_APPLICATION_ID }}
shoppy-datadog-client-token: ${{ secrets.SHOPPY_METABASE_APP_DATADOG_CLIENT_TOKEN }}
- name: Run e2e tests for Shoppy
id: run-e2e-tests
if: ${{ steps.shoppy-prep.outputs.sample_app_branch_exists == 'true' }}
continue-on-error: true
env:
CYPRESS_BROWSER: ${{ steps.shoppy-prep.outputs.chrome-path }}
run: node e2e/runner/run_cypress_ci.js shoppy-e2e
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: ${{ steps.shoppy-prep.outputs.sample_app_branch_exists == 'true' && steps.run-e2e-tests.outcome != 'success' }}
with:
name: cypress-recording-sample-app-shoppy-e2e-${{ matrix.environment }}-latest
path: |
./e2e/tmp/shoppy/cypress
if-no-files-found: ignore
- name: Fail job if tests failed
if: ${{ steps.shoppy-prep.outputs.sample_app_branch_exists == 'true' && steps.run-e2e-tests.outcome != 'success' }}
run: |
exit 1
# Synthetic monitoring tests run only on master merges, in parallel with the regular e2e tests.
# They use the shoppy production environment and include performance measurement tests.
e2e-shoppy-synthetic-tests:
needs: [get-sample-apps-data]
if: |
!cancelled() && needs.get-sample-apps-data.result == 'success' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
runs-on: ubuntu-22.04
timeout-minutes: 45
name: e2e-shoppy-synthetic-monitoring-tests
env:
MB_EDITION: ee
MB_RUN_MODE: e2e
METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
SAMPLE_APP_BRANCH_NAME: ${{ needs.get-sample-apps-data.outputs.branch_name }}
SAMPLE_APP_ENVIRONMENT: production
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Prepare Shoppy E2E environment
uses: ./.github/actions/prepare-shoppy-e2e
id: shoppy-prep
with:
commit: ${{ github.event.pull_request.head.sha || github.sha }}
sample-app-branch-name: ${{ needs.get-sample-apps-data.outputs.branch_name }}
sample-app-environment: production
staging-mb-all-features-token: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
shoppy-iam-role: ${{ secrets.SHOPPY_IAM_ROLE }}
shoppy-metabase-app-db-s3-bucket: ${{ secrets.SHOPPY_METABASE_APP_DB_S3_BUCKET }}
shoppy-metabase-app-db-s3-key: ${{ secrets.SHOPPY_METABASE_APP_DB_S3_KEY }}
shoppy-metabase-app-db-user: ${{ secrets.SHOPPY_METABASE_APP_DB_USER }}
shoppy-metabase-app-db-database: ${{ secrets.SHOPPY_METABASE_APP_DB_DATABASE }}
metastore-dev-server-url: ${{ secrets.METASTORE_DEV_SERVER_URL }}
shoppy-datadog-application-id: ${{ secrets.SHOPPY_METABASE_APP_DATADOG_APPLICATION_ID }}
shoppy-datadog-client-token: ${{ secrets.SHOPPY_METABASE_APP_DATADOG_CLIENT_TOKEN }}
- name: Get merged PR number
if: ${{ steps.shoppy-prep.outputs.sample_app_branch_exists == 'true' }}
id: get-merged-pr-number
run: |
PR=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }}/pulls --jq '.[0].number' 2>/dev/null || echo "")
if [ -z "$PR" ] || [ "$PR" = "null" ]; then
echo "number=" >> "$GITHUB_OUTPUT"
else
echo "number=$PR" >> "$GITHUB_OUTPUT"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run synthetic monitoring tests
id: run-e2e-tests
if: ${{ steps.shoppy-prep.outputs.sample_app_branch_exists == 'true' }}
continue-on-error: true
env:
CYPRESS_BROWSER: ${{ steps.shoppy-prep.outputs.chrome-path }}
PR_NUMBER: ${{ steps.get-merged-pr-number.outputs.number }}
INCLUDE_SYNTHETIC_MONITORING_TESTS: "true"
run: node e2e/runner/run_cypress_ci.js shoppy-e2e
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: ${{ steps.shoppy-prep.outputs.sample_app_branch_exists == 'true' && steps.run-e2e-tests.outcome != 'success' }}
with:
name: cypress-recording-shoppy-synthetic-tests-latest
path: |
./e2e/tmp/shoppy/cypress
if-no-files-found: ignore
- name: Fail job if tests failed
if: ${{ steps.shoppy-prep.outputs.sample_app_branch_exists == 'true' && steps.run-e2e-tests.outcome != 'success' }}
run: |
exit 1
# The job checks integration of the Embedding SDK with consumer's apps that use different frameworks/bundlers,
# or when we want to test some tricky integration cases like conflicting types.
# The job
@@ -231,14 +355,7 @@ jobs:
timeout-minutes: 45
name: e2e-host-app-${{ matrix.test_suite }}-tests-${{ matrix.environment }}-bundle
env:
MB_EDITION: ee
DISPLAY: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
HOST_APP_ENVIRONMENT: ${{ matrix.environment }}
permissions:
id-token: write
@@ -249,7 +366,8 @@ jobs:
- name: Retrieve uberjar artifact for ee
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
commit: ${{ github.event.pull_request.head.sha || github.sha }}
edition: ee
extract-path: "target/uberjar"
output-name: "metabase.jar"

View File

@@ -23,7 +23,7 @@ jobs:
# Remove the matchers to not report false positives on every PR
# unrelated to embedding (EMB-765)
echo "::remove-matcher owner=tsc::"
yarn build-embedding-sdk-package
bun run build-embedding-sdk-package
- name: Prepare Embedding SDK artifact
uses: actions/upload-artifact@v4
with:

View File

@@ -23,6 +23,10 @@ on:
description: "Whether to run host and sample apps compatibility tests."
required: true
type: boolean
bundle-size-check:
description: "Whether to run bundle size check."
required: true
type: boolean
skip:
description: Whether to skip running tests due to one of the artifacts failing to build.
required: true
@@ -47,7 +51,7 @@ jobs:
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ github.workspace }}/resources/embedding-sdk
- name: Run frontend embedding SDK snippets type check
run: yarn run embedding-sdk:cli-snippets:type-check
run: bun run embedding-sdk:cli-snippets:type-check
embedding-sdk-docs-snippets-type-check:
if: inputs.docs-snippets-type-check && !inputs.skip
@@ -63,7 +67,7 @@ jobs:
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ github.workspace }}/resources/embedding-sdk
- name: Run frontend embedding SDK snippets type check
run: yarn run embedding-sdk:docs-snippets:type-check
run: bun run embedding-sdk:docs-snippets:type-check
embedding-sdk-api-documentation-generation-validation:
if: inputs.documentation-validation && !inputs.skip
@@ -86,7 +90,7 @@ jobs:
shell: bash
run: |
set -o pipefail
yarn embedding-sdk:docs:generate:pure --emit none 2>&1 \
bun run embedding-sdk:docs:generate:pure --emit none 2>&1 \
| tee /dev/stdout \
| tee >( tail -n 10 \
| sed '1s/^/output<<EOF\n/' \
@@ -98,14 +102,14 @@ jobs:
with:
remove-previous-comment: true
add-new-comment: ${{ steps.docs-generation.outcome == 'failure' && contains(steps.docs-generation.outputs.output, 'not included in the documentation') }}
message: "📝 Some exported types from `@metabase/embedding-sdk-react` reference other types that are not exported, i.e. internal types.<br><br>The internal type reference breaks API documentation generation for the SDK and also may unexpectedly increase the output size of the type declaration file.<br><br>Please check the CI logs to find the name of such type.<br><br>- If a type should be publicly available in the SDK, add a description to it or a TypeDoc annotation and export it from SDK.<br>- If a type is internal and should _not_ be publicly exposed, refactor types to prevent referencing other types that are not exported from SDK.<br><br>You can run `yarn embedding-sdk:docs:generate` locally to verify that the issue has been resolved."
message: "📝 Some exported types from `@metabase/embedding-sdk-react` reference other types that are not exported, i.e. internal types.<br><br>The internal type reference breaks API documentation generation for the SDK and also may unexpectedly increase the output size of the type declaration file.<br><br>Please check the CI logs to find the name of such type.<br><br>- If a type should be publicly available in the SDK, add a description to it or a TypeDoc annotation and export it from SDK.<br>- If a type is internal and should _not_ be publicly exposed, refactor types to prevent referencing other types that are not exported from SDK.<br><br>You can run `bun run embedding-sdk:docs:generate` locally to verify that the issue has been resolved."
include-log: true
- name: Comment on PR if 'Failed to resolve link' error happens
uses: ./.github/actions/notify-pull-request
with:
remove-previous-comment: true
add-new-comment: ${{ steps.docs-generation.outcome == 'failure' && contains(steps.docs-generation.outputs.output, 'Failed to resolve link') }}
message: "📝 A typedoc `{@link <TYPE_NAME>}` annotation is found that can't be resolved.<br><br>Most likely it happens when the referenced type is not exported. Please check the CI logs to find the name of such type.<br><br>- If a referenced in `{@link}` type should be publicly available in the SDK, add a description to it or a TypeDoc annotation and export it from SDK.<br>- If a type is internal and should _not_ be publicly exposed, change types to prevent unexported type reference in `{@link}` annotation.<br><br>You can run `yarn embedding-sdk:docs:generate` locally to verify that the issue has been resolved."
message: "📝 A typedoc `{@link <TYPE_NAME>}` annotation is found that can't be resolved.<br><br>Most likely it happens when the referenced type is not exported. Please check the CI logs to find the name of such type.<br><br>- If a referenced in `{@link}` type should be publicly available in the SDK, add a description to it or a TypeDoc annotation and export it from SDK.<br>- If a type is internal and should _not_ be publicly exposed, change types to prevent unexported type reference in `{@link}` annotation.<br><br>You can run `bun run embedding-sdk:docs:generate` locally to verify that the issue has been resolved."
include-log: true
- name: Fail Job
if: ${{ steps.docs-generation.outcome == 'failure' }}
@@ -124,8 +128,52 @@ jobs:
uses: ./.github/workflows/embedding-sdk-host-sample-apps-tests.yml
secrets: inherit
embedding-sdk-bundle-size-check:
if: inputs.bundle-size-check
continue-on-error: true
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
BUNDLE_SIZE_THRESHOLD_PERCENT: 2
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sdk-bundle-size-check
id: compare
with:
edition: ee
base-ref-commit: ${{ github.event.pull_request.base.sha }}
threshold-percent: ${{ env.BUNDLE_SIZE_THRESHOLD_PERCENT }}
- name: Comment on PR if bundle size has increased
uses: ./.github/actions/notify-pull-request
if: success() && steps.compare.outputs.status == 'increased'
with:
remove-previous-comment: true
add-new-comment: true
message: "⚠️ Embedding SDK bundle size increased by ${{ steps.compare.outputs.size_change_percent }}% compared to the ${{ github.base_ref }} branch (threshold: ${{ env.BUNDLE_SIZE_THRESHOLD_PERCENT }}%). Please contact Embedding team."
include-log: false
- name: Send notification to Slack via Zapier
if: success() && steps.compare.outputs.status == 'increased'
shell: bash
run: |
curl -s -X POST "${{ secrets.EMBEDDING_ZAPIER_WEBHOOK_URL }}" \
-d '⚠️ Embedding SDK bundle size increased by ${{ steps.compare.outputs.size_change_percent }}% (threshold: ${{ env.BUNDLE_SIZE_THRESHOLD_PERCENT }}%)
PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }} (${{ github.event.pull_request.html_url }})'
- name: Comment on PR if bundle size has decreased
uses: ./.github/actions/notify-pull-request
if: success() && steps.compare.outputs.status == 'decreased'
with:
remove-previous-comment: true
add-new-comment: true
message: "🎉 Embedding SDK bundle size decreased by ${{ steps.compare.outputs.size_change_percent }}% compared to the ${{ github.base_ref }} branch. Nice work!"
include-log: false
embedding-sdk-tests-result:
needs:
- embedding-sdk-bundle-size-check
- embedding-sdk-cli-snippets-type-check
- embedding-sdk-docs-snippets-type-check
- embedding-sdk-api-documentation-generation-validation

View File

@@ -44,12 +44,12 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Build cljs
run: yarn build:cljs
run: bun run build:cljs
- name: Stress-test ${{ github.event.inputs.spec }} ${{ github.event.inputs.burn_in }} times
run: |
for i in {1..${{ github.event.inputs.burn_in }}}; do
yarn jest --runInBand --ci --silent --no-cache \
--testPathPattern '${{ github.event.inputs.spec }}' \
bun run jest --runInBand --ci --silent --no-cache \
--testPathPatterns '${{ github.event.inputs.spec }}' \
--testNamePattern '${{ github.event.inputs.grep }}'
if [[ "$?" != 0 ]]; then
echo "Failed after $i attempts" && break;

View File

@@ -46,15 +46,15 @@ jobs:
key: ${{ steps.get-cache-keys.outputs.eslint-cache-key }}
- name: Compile CLJS
run: yarn build-pure:cljs
run: bun run build-pure:cljs
- name: Find CSS variables that are used but never defined
run: yarn find-never-defined-css-variables
run: bun run find-never-defined-css-variables
- name: Run Prettier formatting linter
run: yarn run lint-prettier-pure
run: bun run lint-prettier-pure
- name: Run ESLint linter
run: yarn run lint-eslint-pure
run: bun run lint-eslint-pure
- name: Run CSS linter
run: yarn run lint-css
run: bun run lint-css
fe-type-check:
if: ${{ !inputs.skip }}
@@ -66,9 +66,9 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- run: yarn build-pure:cljs
- run: bun run build-pure:cljs
name: Compile CLJS
- run: yarn type-check-pure
- run: bun run type-check-pure
name: Check types
fe-tests-unit:
@@ -90,7 +90,8 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Run frontend unit tests
run: yarn run test-unit --silent --shard=${{ matrix.shard }}/${{ env.SHARDS }}
id: fe-tests
run: bun run test-unit --silent --shard=${{ matrix.shard }}/${{ env.SHARDS }}
# 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.
@@ -106,6 +107,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.fe-tests.outcome }}
fe-tests-timezones:
if: ${{ !inputs.skip }}
@@ -118,7 +120,7 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Run frontend timezones tests
run: yarn run test-timezones
run: bun run test-timezones
fe-tests-result:
needs:

View File

@@ -1,56 +0,0 @@
name: Fuzzing
on:
workflow_dispatch:
push:
branches:
- "master"
- "release-**"
paths:
- "frontend/src/metabase/querying/expressions/**"
pull_request:
paths:
- "frontend/src/metabase/querying/expressions/**"
jobs:
fe-fuzz-lexifier:
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- run: yarn test-unit frontend/src/metabase/querying/expressions/pratt/fuzz.lexifier.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the lexifier
fe-fuzz-compiler:
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- run: yarn test-unit frontend/src/metabase/querying/expressions/fuzz.compiler.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the custom expression compiler
fe-fuzz-string-quoting:
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- run: yarn test-unit frontend/src/metabase/querying/expressions/fuzz.string.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the custom expression string quoter

51
.github/workflows/js-stats-update.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: JS Stats Update
on:
workflow_dispatch:
schedule:
- cron: 40 1 * * 4 # every Thursday at 1:40
jobs:
js-stats:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: get JS file count
id: get-js-file-count
run: |
oss=$(find ./frontend/src/metabase -type f -name "*.js" -o -name "*.jsx" | wc -l)
ee=$(find ./enterprise/frontend/src/metabase-enterprise -type f -name "*.js" -o -name "*.jsx" | wc -l)
echo $(($oss+$ee)) javascript files
echo "JS_FILES=$(($oss+$ee))" >> $GITHUB_OUTPUT
- name: Upload count to Stats
uses: actions/github-script@v7
env:
JS_FILES: ${{ steps.get-js-file-count.outputs.JS_FILES }}
API_KEY: ${{ secrets.STATS_API_KEY }}
with:
script: | # js
const { uploadCsvToMb } = require('${{ github.workspace }}/.github/scripts/csv-to-mb.js');
console.log("JS_FILES", Number(process.env.JS_FILES));
const data = [
{
'Date': new Date().toISOString().slice(0, 10), // YYYY-MM-DD
'Js files': Number(process.env.JS_FILES),
}
];
uploadCsvToMb({
baseUrl: 'https://stats.metabase.com',
tableId: 73270,
jsonData: data,
mode: 'append',
}).then(() => {
console.log('Data uploaded successfully');
}).catch((error) => {
console.error('Error uploading data:', error);
process.exit(1);
});

View File

@@ -0,0 +1,194 @@
name: Loki Visual Stress Test Flake Fix
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'frontend/**/*.stories.tsx'
- 'enterprise/frontend/**/*.stories.tsx'
workflow_dispatch:
inputs:
story_files:
description: "Comma-separated story file paths relative to repo root"
type: string
required: true
burn_in:
description: "Number of times to run the test (e.g. 50)"
type: string
required: true
default: "50"
jobs:
detect-changed-stories:
name: Detect changed stories
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
story_files: ${{ steps.detect.outputs.story_files }}
should_run: ${{ steps.detect.outputs.should_run }}
steps:
- name: Detect changed story files
id: detect
env:
GH_TOKEN: ${{ github.token }}
run: |
validate_paths() {
local files="$1"
for file in $(echo "$files" | tr ',' '\n'); do
file=$(echo "$file" | xargs) # trim whitespace
if [[ -z "$file" ]]; then
continue
fi
if [[ ! "$file" =~ ^(frontend/|enterprise/frontend/).+\.stories\. ]]; then
echo "::error::Invalid story path: $file"
echo "Paths must start with 'frontend/' or 'enterprise/frontend/' and contain '.stories.'"
return 1
fi
done
return 0
}
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
FILES=$(echo "${{ inputs.story_files }}" | tr ',' '\n' | xargs -n1 | paste -sd',')
if ! validate_paths "$FILES"; then
exit 1
fi
echo "story_files=$FILES" >> $GITHUB_OUTPUT
echo "should_run=true" >> $GITHUB_OUTPUT
exit 0
fi
FILES=$( \
gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json files --jq '.files[].path' \
| grep '\.stories\.tsx$' \
| xargs -n1 \
| sort -u \
| paste -sd',' \
)
if [[ -z "$FILES" ]]; then
echo "No changed story files found"
echo "should_run=false" >> $GITHUB_OUTPUT
exit 0
fi
if ! validate_paths "$FILES"; then
exit 1
fi
echo "Changed story files: $FILES"
echo "story_files=$FILES" >> $GITHUB_OUTPUT
echo "should_run=true" >> $GITHUB_OUTPUT
workflow-summary:
name: Summary
needs: detect-changed-stories
if: needs.detect-changed-stories.outputs.should_run == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Generate workflow summary
run: |
echo '## Loki Stress Test' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '**Branch:** `${{ github.head_ref || github.ref_name }}`' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '**Story files:**' >> $GITHUB_STEP_SUMMARY
echo '${{ needs.detect-changed-stories.outputs.story_files }}' | tr ',' '\n' | while read -r file; do
echo "- \`$file\`" >> $GITHUB_STEP_SUMMARY
done
echo '' >> $GITHUB_STEP_SUMMARY
echo '**Burn-in:** ${{ inputs.burn_in || 50 }} runs' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo 'Triggered by PR #${{ github.event.pull_request.number }} from @${{ github.event.pull_request.user.login }}' >> $GITHUB_STEP_SUMMARY
else
echo 'Triggered manually by @${{ github.actor }}' >> $GITHUB_STEP_SUMMARY
fi
stress-test-loki:
needs: detect-changed-stories
if: needs.detect-changed-stories.outputs.should_run == 'true'
runs-on: ubuntu-latest
timeout-minutes: 60
name: Stress test Loki visual tests
services:
docker:
image: docker:19.03.12
options: --privileged
ports:
- 2376:2376
env:
DOCKER_TLS_CERTDIR: /certs
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/docker-certs:/certs/client
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Prepare frontend environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Compile CLJS
run: NODE_ENV=development bun run build-pure:cljs
- name: Build Storybook
run: bun run build-storybook
env:
STORYBOOK_STORIES_FILTER: ${{ needs.detect-changed-stories.outputs.story_files }}
- name: Stress-test Loki
run: |
BURN_IN=${{ inputs.burn_in || '50' }}
STORY_FILES='${{ needs.detect-changed-stories.outputs.story_files }}'
echo "Story files: $STORY_FILES"
echo "Running Loki $BURN_IN times"
echo ""
FAILED=0
for i in $(seq 1 $BURN_IN); do
echo "=========================================="
echo "Run $i of $BURN_IN"
echo "=========================================="
if bun run test-visual:loki \
--reactUri file:./storybook-static \
--verboseRenderer; then
echo "✅ Run $i passed"
else
echo "❌ Run $i FAILED"
FAILED=$((FAILED + 1))
mkdir -p .loki/failures/run-$i
cp -r .loki/difference/* .loki/failures/run-$i/ 2>/dev/null || true
fi
echo ""
done
echo "=========================================="
echo "Summary: $((BURN_IN - FAILED))/$BURN_IN passed, $FAILED failed"
echo "=========================================="
if [ $FAILED -gt 0 ]; then
echo "::error::$FAILED out of $BURN_IN runs failed"
exit 1
fi
- name: Generate Visual Report on Failure
if: failure()
run: bun run test-visual:loki-report
- name: Upload Artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: loki-stress-test-report
include-hidden-files: true
path: .loki/
if-no-files-found: ignore

View File

@@ -22,10 +22,10 @@ jobs:
uses: ./.github/actions/prepare-backend
- name: Compile CLJS
run: yarn build-pure:cljs
run: bun run build-pure:cljs
- name: Update Loki Snapshots
run: yarn test-visual:loki:ci || yarn test-visual:loki-approve-diff && yarn test-visual:loki-prune
run: bun run test-visual:loki:ci || bun run test-visual:loki-approve-diff && bun run test-visual:loki-prune
- name: Check for changes
id: check-changes

View File

@@ -49,14 +49,14 @@ jobs:
uses: ./.github/actions/prepare-backend
- name: Compile CLJS
run: NODE_ENV=development yarn build-pure:cljs
run: NODE_ENV=development bun run build-pure:cljs
- name: Run Loki Visual Tests
run: yarn test-visual:loki:ci
run: bun run test-visual:loki:ci
- name: Generate Visual Report on Failure
if: failure()
run: yarn test-visual:loki-report
run: bun run test-visual:loki-report
- name: Upload Artifact
id: artifact-upload-step

View File

@@ -30,9 +30,9 @@ jobs:
needs: check-label
if: needs.check-label.outputs.should-run == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
CI: "true"
DRIVERS: postgres
MB_DB_TYPE: postgres
MB_DB_PORT: 5432
@@ -53,10 +53,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Test Postgres App DB
id: test-driver
uses: ./.github/actions/test-driver
with:
build-static-viz: true
junit-name: 'minimal-be-tests-postgres-ee'
junit-name: "minimal-be-tests-postgres-ee"
test-args: >-
:only '["test" "enterprise/backend/test"]'
:exclude-tags '[:mb/driver-tests :mb/transforms-python-test]'
@@ -73,15 +74,16 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
# Postgres driver tests
postgres-driver-test:
needs: check-label
if: needs.check-label.outputs.should-run == 'true'
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 40
env:
CI: 'true'
CI: "true"
DRIVERS: postgres
MB_DB_TYPE: postgres
MB_DB_PORT: 5432
@@ -102,9 +104,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Test Postgres Driver
id: test-driver
uses: ./.github/actions/test-driver
with:
junit-name: 'minimal-be-tests-postgres-driver-ee'
junit-name: "minimal-be-tests-postgres-driver-ee"
test-args: >-
:only-tags [:mb/driver-tests]
:exclude-tags [:mb/transforms-python-test]
@@ -119,6 +122,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.test-driver.outputs.test-outcome }}
# Frontend unit tests
frontend-unit-tests:
@@ -137,7 +141,8 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Run frontend unit tests
run: yarn run test-unit --silent
id: run-tests
run: bun run test-unit --silent
continue-on-error: true
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
@@ -150,6 +155,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
previous-step-outcome: ${{ steps.run-tests.outcome }}
# Summary job
minimal-tests-result:

44
.github/workflows/openapi-check.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: OpenAPI Check
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check-openapi-specs:
runs-on: ubuntu-22.04
timeout-minutes: 5
if: contains(github.event.pull_request.labels.*.name, 'openapi-self-healing')
steps:
- uses: actions/checkout@v4
with:
# we're intentionally using METABASE_AUTOMATION_USER_TOKEN to trigger the whole CI pipeline again
# after the self-healing commit is created
# if we used GITHUB_TOKEN, the self-healing commit would not trigger the CI pipeline again
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
# fetch full git history to allow fetching the latest base branch commit and comparing changes
fetch-depth: 0
- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Generate version.properties
run: ./bin/build.sh :steps [:version]
- name: Get latest base branch commit
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
echo "LATEST_BASE_SHA=$(git rev-parse origin/${{ github.event.pull_request.base.ref }})" >> $GITHUB_ENV
- name: Check OpenAPI specs are up to date
env:
AUTO_COMMIT: "true"
PR_BRANCH: ${{ github.event.pull_request.head.ref }}
BASE_SHA: ${{ env.LATEST_BASE_SHA }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
GITHUB_SHA: ${{ github.sha }}
run: ./bin/openapi-check.sh

46
.github/workflows/openapi.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Validate OpenAPI
on:
push:
branches:
- "master"
- "release-**"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
openapi: ${{ steps.changes.outputs.openapi }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-paths.yaml
validate-openapi:
needs: files-changed
if: needs.files-changed.outputs.openapi == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Generate OpenAPI spec
run: bun run openapi:generate
- name: Validate OpenAPI spec
run: bun run openapi:lint
- name: Split OpenAPI spec
run: bun run openapi:split

View File

@@ -29,7 +29,8 @@ jobs:
- name: Retrieve uberjar artifact for ee
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
commit: ${{ github.event.pull_request.head.sha || github.sha }}
edition: ee
extract-path: "target/uberjar"
output-name: "metabase.jar"
- name: Move uberjar to bin/docker

View File

@@ -5,8 +5,8 @@ on:
types: [ closed, unlabeled ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: false
jobs:
pr-env:

View File

@@ -0,0 +1,29 @@
name: PR Env Destroy (Manual)
on:
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to destroy environment for'
required: true
type: string
self_hosting:
description: 'Self-hosting stack'
type: boolean
default: false
jobs:
approve:
runs-on: ubuntu-latest
environment: pr-env-admin
steps:
- name: Approved
run: echo "Destroying PR environment for PR #${{ inputs.pr_number }}"
destroy:
needs: approve
uses: ./.github/workflows/pr-env-destroy.yml
secrets: inherit
with:
self_hosting: ${{ inputs.self_hosting }}
pr_number: ${{ inputs.pr_number }}

View File

@@ -9,6 +9,13 @@ on:
required: false
type: boolean
default: false
pr_number:
description: 'PR number (required for manual dispatch)'
required: false
type: string
env:
PR_NUMBER: ${{ inputs.pr_number || github.event.number }}
jobs:
destroy_pr:
@@ -62,8 +69,8 @@ jobs:
- name: Destroy PR Review ENV
if: ${{ !inputs.self_hosting }}
run: |
kubectl delete metabase -n hosting-pr${{ github.event.number }} hosting-pr${{ github.event.number }}
kubectl delete ns hosting-pr${{ github.event.number }}
kubectl delete metabase -n hosting-pr${{ env.PR_NUMBER }} hosting-pr${{ env.PR_NUMBER }}
kubectl delete ns hosting-pr${{ env.PR_NUMBER }}
- name: Setup Helm
if: ${{ inputs.self_hosting }}
uses: azure/setup-helm@v4
@@ -72,8 +79,8 @@ jobs:
- name: Destroy PR Review ENV (self-hosting)
if: ${{ inputs.self_hosting }}
run: |
helm uninstall hosting-pr${{ github.event.number }} --namespace hosting-pr${{ github.event.number }} || true
kubectl delete ns hosting-pr${{ github.event.number }} || true
helm uninstall hosting-pr${{ env.PR_NUMBER }} --namespace hosting-pr${{ env.PR_NUMBER }} || true
kubectl delete ns hosting-pr${{ env.PR_NUMBER }} || true
- name: Setup psql client
run: |
sudo apt-get update
@@ -85,4 +92,4 @@ jobs:
-h ${{ secrets.PR_ENV_DB_HOST }} \
-U ${{ secrets.PR_ENV_DB_USER }} \
-d ${{ secrets.PR_ENV_DB_NAME }} \
-c "DROP DATABASE IF EXISTS hosting_pr${{ github.event.number }};"
-c "DROP DATABASE IF EXISTS hosting_pr${{ env.PR_NUMBER }};"

View File

@@ -40,7 +40,8 @@ jobs:
- name: Retrieve uberjar artifact for ee
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
commit: ${{ github.event.pull_request.head.sha || github.sha }}
edition: ee
extract-path: "target/uberjar"
output-name: "metabase.jar"
- name: Move uberjar to bin/docker

View File

@@ -30,12 +30,15 @@ jobs:
outputs:
run_mode: ${{ fromJson(steps.config.outputs.result).runMode }}
dev_server: ${{ fromJson(steps.config.outputs.result).metastoreDevServer }}
package_manager: ${{ fromJson(steps.config.outputs.result).packageManager }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
sparse-checkout: |
release
.github
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
# note: this block can be removed after we stop needing to be able to test versions before v55
- name: Get test mode config
id: config
@@ -48,13 +51,17 @@ jobs:
// with v55 and later we use enterprise tokens that mirror actual Metabase plans
const MULTIPLE_TEST_TOKEN_THRESHOLD = 55;
// Versions before v59 used yarn, v59 and later use bun
const BUN_PACKAGE_MANAGER_THRESHOLD = 59;
const version = '${{ inputs.version }}';
const majorVersion = Number(getMajorVersion(version));
const oldTestToken = majorVersion < MULTIPLE_TEST_TOKEN_THRESHOLD;
return ({
runMode: oldTestToken ? 'prod' : 'e2e',
metastoreDevServer: oldTestToken ? '' : '${{ vars.METASTORE_DEV_SERVER_URL }}'
metastoreDevServer: oldTestToken ? '' : '${{ vars.METASTORE_DEV_SERVER_URL }}',
packageManager: majorVersion < BUN_PACKAGE_MANAGER_THRESHOLD ? 'yarn' : 'bun',
});
release-artifact:
@@ -71,10 +78,12 @@ jobs:
- uses: actions/checkout@v4
with:
sparse-checkout: .github
- name: Retrieve test build uberjar artifact for ${{ matrix.edition }}
- name: Retrieve release uberjar artifact for ${{ matrix.edition }}
uses: ./.github/actions/fetch-artifact
with:
name: metabase-release-${{ matrix.edition }}-${{ inputs.commit }}-uberjar
commit: ${{ inputs.commit }}
edition: ${{ matrix.edition }}
release: "true"
- name: Extract version number from version.properties
id: version-properties
@@ -166,11 +175,10 @@ jobs:
snowplow: true
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: "temurin"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
- name: Compile CLJS
run: ${{ needs.test-mode-config.outputs.package_manager }} run build-pure:cljs
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
@@ -189,8 +197,14 @@ jobs:
- name: Run Metabase
run: node e2e/runner/run_cypress_ci.js start
# For now we only need the default snapshots for pre-release checks.
# If we decide to include tests that rely on the external QA databases, we should:
# 1. remove the --spec ... line
# 2. add postgres, mysql, and mongo to the prepare-containers step
- name: Make app db snapshot
run: node e2e/runner/run_cypress_ci.js snapshot
run: |
node e2e/runner/run_cypress_ci.js snapshot \
--spec "e2e/snapshot-creators/default.cy.snap.js"
- name: Run a few important OSS Cypress tests as sanity check
if: ${{ matrix.edition == 'oss' }}
@@ -225,32 +239,42 @@ jobs:
uses: ./.github/workflows/containerize-jar.yml
secrets: inherit
with:
artifact-name: metabase-release-oss-${{ inputs.commit }}-uberjar
edition: oss
commit: ${{ inputs.commit }}
repo: ${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}
tag: ${{ needs.release-artifact.outputs.oss_version }}-${{ inputs.commit }}
release: "true"
containerize-ee:
needs: release-artifact
uses: ./.github/workflows/containerize-jar.yml
secrets: inherit
with:
artifact-name: metabase-release-ee-${{ inputs.commit }}-uberjar
edition: ee
commit: ${{ inputs.commit }}
repo: ${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}
tag: ${{ needs.release-artifact.outputs.ee_version }}-${{ inputs.commit }}
release: "true"
tests-complete-message:
if: always()
runs-on: ubuntu-22.04
needs: [run-sanity-check, check-uberjar-health, containerize-ee, containerize-oss]
needs:
[
run-sanity-check,
check-uberjar-health,
containerize-ee,
containerize-oss,
]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
sparse-checkout: |
release
.github
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Send tests complete message
uses: actions/github-script@v7
env:

View File

@@ -10,9 +10,15 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 5
if: |
(github.event.label.name == 'Priority: P1' || github.event.label.name == '.Escalation') &&
(github.event.label.name == 'Priority:P0' || github.event.label.name == 'Priority:P1' || github.event.label.name == '.Escalation') &&
contains(github.event.issue.labels.*.name, '.Team/Querying')
steps:
- name: Setting title
uses: actions/github-script@v7
id: vars
with:
script: |
core.setOutput('issue_title', ${{ toJson(github.event.issue.title) }}.replaceAll(/"/g, '\\"'));
- name: Trigger PagerDuty Incident
run: |
curl -X POST https://events.pagerduty.com/v2/enqueue \
@@ -22,7 +28,7 @@ jobs:
"event_action": "trigger",
"dedup_key": "github-issue-${{ github.event.issue.number }}",
"payload": {
"summary": "[${{ github.event.label.name }}] ${{ github.event.issue.title }}",
"summary": "[${{ github.event.label.name }}] ${{ steps.vars.outputs.issue_title }}",
"source": "GitHub Issues - ${{ github.repository }}",
"severity": "critical",
"custom_details": {

View File

@@ -44,10 +44,12 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
sparse-checkout: |
release
.github
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Cache build scripts
uses: actions/upload-artifact@v4
@@ -178,8 +180,8 @@ jobs:
with:
ref: ${{ inputs.branch }}
- name: Prepare build scripts
run: yarn --cwd release --frozen-lockfile && yarn --cwd release build
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Get current SDK version
id: current-sdk-version
@@ -256,7 +258,7 @@ jobs:
uses: ./.github/actions/prepare-backend
- name: Run unit tests
run: yarn embedding-sdk:test-unit
run: bun run embedding-sdk:test-unit
build-sdk:
needs: [test, determine-sdk-version]
@@ -282,10 +284,10 @@ jobs:
./bin/embedding-sdk/release_utils.bash update_package_json_template ${{ needs.determine-sdk-version.outputs.sdk_version }}
- name: Build SDK package
run: yarn run build-embedding-sdk-package
run: bun run build-embedding-sdk-package
- name: Generate SDK package.json in the build directory
run: yarn run embedding-sdk:generate-package
run: bun run embedding-sdk:generate-package
- name: Upload built SDK package as artifact
uses: actions/upload-artifact@v4
@@ -383,28 +385,16 @@ jobs:
run: |
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_RELEASE_TOKEN }} > .npmrc
TAG=$(jq -r --null-input \
--arg branch "${{ inputs.branch }}" \
--arg masterTag "${{ steps.compute-tag.outputs.masterTag }}" '
{
"master": $masterTag,
"release-x.51.x": "51-stable",
"release-x.52.x": "52-stable",
"release-x.53.x": "53-stable",
"release-x.54.x": "54-stable",
"release-x.55.x": "55-stable",
"release-x.56.x": "56-stable"
}[$branch]'
)
TAG="${{ steps.compute-tag.outputs.masterTag }}"
echo "Resolved npm tag: $TAG"
npm publish --tag "$TAG"
- name: Add `latest` tag to the latest release branch (`release-x.55.x`) deployment
if: ${{ inputs.branch == 'release-x.56.x' }}
working-directory: sdk
run: |
npm dist-tag add @metabase/embedding-sdk-react@${{ env.sdk_version }} latest
# ⚠️ This step should only be executed on the latest stable (gold) release branch.
# Only uncomment this when the new release branch becomes stable (gold).
# - name: Add `latest` tag to the latest release branch (`release-x.55.x`) deployment
# working-directory: sdk
# run: |
# npm dist-tag add @metabase/embedding-sdk-react@${{ env.sdk_version }} latest
git-tag:
needs: [publish-npm, determine-sdk-version]

View File

@@ -38,10 +38,10 @@ jobs:
with:
ref: master # this only works on master
fetch-depth: 0 # we want all branches and tags
- name: Install Dependencies
run: yarn --cwd release --frozen-lockfile && npm i -g tsx
- name: Build release scripts
run: yarn --cwd release build
- name: Prepare release scripts
uses: ./.github/actions/prepare-release-scripts
- name: Install tsx
run: npm i -g tsx
- name: Get version number
uses: actions/github-script@v7
with:

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